tnp-helpers 21.0.2 → 21.0.5
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 +179 -52
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/tnp-helpers.d.ts +3202 -0
- package/lib/base/classes/base-bower-json.js.map +1 -1
- 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-controller.d.ts +2 -2
- package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js +31 -13
- package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-database-config.js.map +1 -1
- 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.js +1 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.utils.js.map +1 -1
- package/lib/base/classes/base-command-line-feature.js.map +1 -1
- package/lib/base/classes/base-compiler-for-project.js.map +1 -1
- package/lib/base/classes/base-db.js.map +1 -1
- package/lib/base/classes/base-docker.js.map +1 -1
- package/lib/base/classes/base-file-folders-operations.js.map +1 -1
- package/lib/base/classes/base-git.js.map +1 -1
- package/lib/base/classes/base-global-command-line.js +2 -5
- package/lib/base/classes/base-global-command-line.js.map +1 -1
- package/lib/base/classes/base-ignore-hide.js.map +1 -1
- package/lib/base/classes/base-java-jdk.js.map +1 -1
- package/lib/base/classes/base-json-file-reader.js.map +1 -1
- package/lib/base/classes/base-library-build.js.map +1 -1
- package/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib/base/classes/base-linter.js.map +1 -1
- package/lib/base/classes/base-node-modules.js +10 -1
- package/lib/base/classes/base-node-modules.js.map +1 -1
- package/lib/base/classes/base-npm-helpers.js.map +1 -1
- package/lib/base/classes/base-package-json.d.ts +3 -2
- package/lib/base/classes/base-package-json.js +7 -1
- package/lib/base/classes/base-package-json.js.map +1 -1
- package/lib/base/classes/base-process-manager.js.map +1 -1
- package/lib/base/classes/base-project-resolver.js.map +1 -1
- package/lib/base/classes/base-project.d.ts +4 -4
- package/lib/base/classes/base-project.js +0 -3
- package/lib/base/classes/base-project.js.map +1 -1
- package/lib/base/classes/base-quick-fixes.js +7 -3
- package/lib/base/classes/base-quick-fixes.js.map +1 -1
- package/lib/base/classes/base-release-process.js.map +1 -1
- package/lib/base/classes/base-start-config.backend.js.map +1 -1
- package/lib/base/classes/base-static-pages.js.map +1 -1
- package/lib/base/classes/base-vscode.js +2 -0
- package/lib/base/classes/base-vscode.js.map +1 -1
- package/lib/base/commit-data.js.map +1 -1
- package/lib/base/config-database.js.map +1 -1
- package/lib/base/core-project.d.ts +2 -2
- package/lib/base/core-project.js.map +1 -1
- package/lib/base/gh-temp-code.js.map +1 -1
- package/lib/base/index.js.map +1 -1
- package/lib/base/linked-project.js.map +1 -1
- package/lib/base/project-database.js.map +1 -1
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/base/tcp-udp-ports/ports.controller.js +41 -17
- package/lib/base/tcp-udp-ports/ports.controller.js.map +1 -1
- package/lib/base/tcp-udp-ports/ports.entity.d.ts +3 -3
- package/lib/base/tcp-udp-ports/ports.entity.js +21 -9
- package/lib/base/tcp-udp-ports/ports.entity.js.map +1 -1
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +19 -1
- package/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/helpers/for-backend/helpers-cli-tool.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-console-gui.js.map +1 -1
- package/lib/helpers/for-backend/helpers-file-folders.js.map +1 -1
- package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-npm.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-process.js.map +1 -1
- package/lib/helpers/for-backend/helpers-vscode.backend.js.map +1 -1
- package/lib/helpers/for-browser/angular.helper.d.ts +0 -1
- package/lib/helpers/for-browser/angular.helper.js +2 -2
- package/lib/helpers/for-browser/helpers-browser.js.map +1 -1
- package/lib/helpers/helpers-json5.backend.js.map +1 -1
- package/lib/helpers/helpers-numbers.js.map +1 -1
- package/lib/helpers/helpers-strings-regexes.js.map +1 -1
- package/lib/helpers/helpers-strings.js.map +1 -1
- package/lib/helpers/helpers.js.map +1 -1
- package/lib/models.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/old/execute-command.js.map +1 -1
- package/lib/old/helpers.js.map +1 -1
- package/lib/utils.d.ts +6 -0
- package/lib/utils.js +58 -1
- package/lib/utils.js.map +1 -1
- package/migrations/1736198527297_init.d.ts +3 -3
- package/migrations/1736198527297_init.js +4 -4
- package/migrations/1736198527297_init.js.map +1 -1
- package/migrations/1736199486472_addingNotAssignablePorts.d.ts +2 -3
- package/migrations/1736199486472_addingNotAssignablePorts.js +2 -3
- package/migrations/1736199486472_addingNotAssignablePorts.js.map +1 -1
- package/migrations/1736454437350_addFreePorts.d.ts +2 -3
- package/migrations/1736454437350_addFreePorts.js +2 -3
- package/migrations/1736454437350_addFreePorts.js.map +1 -1
- package/package.json +2 -3
- package/websql/fesm2022/tnp-helpers.mjs +183 -56
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/tnp-helpers.d.ts +3202 -0
- package/browser/index.d.ts +0 -6
- package/browser/lib/base/classes/base-bower-json.d.ts +0 -35
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +0 -32
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-controller.d.ts +0 -15
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-database-config.d.ts +0 -10
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +0 -42
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +0 -150
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +0 -45
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +0 -6
- package/browser/lib/base/classes/base-cli-worker/index.d.ts +0 -8
- package/browser/lib/base/classes/base-command-line-feature.d.ts +0 -48
- package/browser/lib/base/classes/base-compiler-for-project.d.ts +0 -8
- package/browser/lib/base/classes/base-db.d.ts +0 -10
- package/browser/lib/base/classes/base-debounce-compiler-for-project.d.ts +0 -29
- package/browser/lib/base/classes/base-docker.d.ts +0 -13
- package/browser/lib/base/classes/base-feature-for-project.d.ts +0 -7
- package/browser/lib/base/classes/base-file-folders-operations.d.ts +0 -17
- package/browser/lib/base/classes/base-git.d.ts +0 -211
- package/browser/lib/base/classes/base-global-command-line.d.ts +0 -294
- package/browser/lib/base/classes/base-ignore-hide.d.ts +0 -47
- package/browser/lib/base/classes/base-java-jdk.d.ts +0 -9
- package/browser/lib/base/classes/base-json-file-reader.d.ts +0 -72
- package/browser/lib/base/classes/base-library-build.d.ts +0 -62
- package/browser/lib/base/classes/base-linked-projects.d.ts +0 -30
- package/browser/lib/base/classes/base-linter.d.ts +0 -12
- package/browser/lib/base/classes/base-node-modules.d.ts +0 -70
- package/browser/lib/base/classes/base-npm-helpers.d.ts +0 -53
- package/browser/lib/base/classes/base-package-json.d.ts +0 -122
- package/browser/lib/base/classes/base-process-manager.d.ts +0 -31
- package/browser/lib/base/classes/base-project-resolver.d.ts +0 -41
- package/browser/lib/base/classes/base-project.d.ts +0 -259
- package/browser/lib/base/classes/base-quick-fixes.d.ts +0 -16
- package/browser/lib/base/classes/base-release-process.d.ts +0 -75
- package/browser/lib/base/classes/base-static-pages.d.ts +0 -15
- package/browser/lib/base/classes/base-vscode.d.ts +0 -54
- package/browser/lib/base/classes/index.d.ts +0 -23
- package/browser/lib/base/commit-data.d.ts +0 -94
- package/browser/lib/base/config-database.d.ts +0 -15
- package/browser/lib/base/core-project.d.ts +0 -113
- package/browser/lib/base/gh-temp-code.d.ts +0 -17
- package/browser/lib/base/index.d.ts +0 -6
- package/browser/lib/base/linked-project.d.ts +0 -41
- package/browser/lib/base/project-database.d.ts +0 -13
- package/browser/lib/base/tcp-udp-ports/index.d.ts +0 -4
- package/browser/lib/base/tcp-udp-ports/ports.controller.d.ts +0 -29
- package/browser/lib/base/tcp-udp-ports/ports.entity.d.ts +0 -19
- package/browser/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +0 -20
- package/browser/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.d.ts +0 -20
- package/browser/lib/base/tcp-udp-ports/tcp-upd-ports.worker.d.ts +0 -9
- package/browser/lib/base/translate.d.ts +0 -228
- package/browser/lib/build-info._auto-generated_.d.ts +0 -21
- package/browser/lib/helpers/for-backend/helpers-file-folders.d.ts +0 -114
- package/browser/lib/helpers/for-backend/helpers-process.d.ts +0 -88
- package/browser/lib/helpers/for-browser/angular.helper.d.ts +0 -37
- package/browser/lib/helpers/for-browser/helpers-browser.d.ts +0 -12
- package/browser/lib/helpers/helpers-array-obj.d.ts +0 -32
- package/browser/lib/helpers/helpers-numbers.d.ts +0 -8
- package/browser/lib/helpers/helpers-strings-regexes.d.ts +0 -29
- package/browser/lib/helpers/helpers-strings.d.ts +0 -56
- package/browser/lib/helpers/helpers.d.ts +0 -84
- package/browser/lib/index.d.ts +0 -9
- package/browser/lib/models.d.ts +0 -178
- package/browser/lib/old/execute-command.d.ts +0 -15
- package/browser/lib/old/helpers.d.ts +0 -62
- package/browser/lib/old/models.d.ts +0 -81
- package/browser/lib/utils.d.ts +0 -272
- package/browser/migrations/1736198527297_init.d.ts +0 -19
- package/browser/migrations/1736199486472_addingNotAssignablePorts.d.ts +0 -11
- package/browser/migrations/1736454437350_addFreePorts.d.ts +0 -10
- package/browser/migrations/index.d.ts +0 -2
- package/browser/migrations/migrations_index._auto-generated_.d.ts +0 -12
- package/browser/public-api.d.ts +0 -2
- package/lib/base/classes/base-command-line-feature.backend.d.ts +0 -47
- package/lib/base/classes/base-command-line-feature.backend.js +0 -147
- package/lib/base/classes/base-command-line-feature.backend.js.map +0 -1
- package/lib/base/classes/base-global-command-line.backend.d.ts +0 -243
- package/lib/base/classes/base-global-command-line.backend.js +0 -2212
- package/lib/base/classes/base-global-command-line.backend.js.map +0 -1
- package/lib/base/classes/base-powershell.d.ts +0 -58
- package/lib/base/classes/base-powershell.js +0 -105
- package/lib/base/classes/base-powershell.js.map +0 -1
- package/lib/base/classes/base-process/base-process-api.service.d.ts +0 -7
- package/lib/base/classes/base-process/base-process.context.d.ts +0 -19
- package/lib/base/classes/base-process/base-process.context.js +0 -22
- package/lib/base/classes/base-process/base-process.context.js.map +0 -1
- package/lib/base/classes/base-process/base-process.controller.d.ts +0 -17
- package/lib/base/classes/base-process/base-process.controller.js +0 -91
- package/lib/base/classes/base-process/base-process.controller.js.map +0 -1
- package/lib/base/classes/base-process/base-process.d.ts +0 -8
- package/lib/base/classes/base-process/base-process.defaults-values.d.ts +0 -2
- package/lib/base/classes/base-process/base-process.defaults-values.js +0 -9
- package/lib/base/classes/base-process/base-process.defaults-values.js.map +0 -1
- package/lib/base/classes/base-process/base-process.js +0 -62
- package/lib/base/classes/base-process/base-process.js.map +0 -1
- package/lib/base/classes/base-process/base-process.models.d.ts +0 -6
- package/lib/base/classes/base-process/base-process.models.js +0 -3
- package/lib/base/classes/base-process/base-process.models.js.map +0 -1
- package/lib/base/classes/base-process/base-process.provider.d.ts +0 -16
- package/lib/base/classes/base-process/base-process.provider.js +0 -69
- package/lib/base/classes/base-process/base-process.provider.js.map +0 -1
- package/lib/base/classes/base-process/base-process.repository copy.d.ts +0 -8
- package/lib/base/classes/base-process/base-process.repository copy.js +0 -32
- package/lib/base/classes/base-process/base-process.repository copy.js.map +0 -1
- package/lib/base/classes/base-process/base-process.repository.d.ts +0 -8
- package/lib/base/classes/base-process/base-process.repository.js +0 -32
- package/lib/base/classes/base-process/base-process.repository.js.map +0 -1
- package/lib/base/classes/base-process/base-process.terminal-ui.d.ts +0 -11
- package/lib/base/classes/base-process/base-process.terminal-ui.js +0 -54
- package/lib/base/classes/base-process/base-process.terminal-ui.js.map +0 -1
- package/lib/base/classes/base-process/base-process.worker.d.ts +0 -16
- package/lib/base/classes/base-process/base-process.worker.js +0 -29
- package/lib/base/classes/base-process/base-process.worker.js.map +0 -1
- package/lib/base/classes/base-process/index.d.ts +0 -1
- package/lib/base/classes/base-process/index.js +0 -22
- package/lib/base/classes/base-process/index.js.map +0 -1
- package/lib/base/classes/base-process/processes.repository.d.ts +0 -0
- package/lib/base/classes/base-process/processes.repository.js +0 -5
- package/lib/base/classes/base-process/processes.repository.js.map +0 -1
- package/lib/env-backend._auto-generated_.d.ts +0 -34
- package/lib/env-backend._auto-generated_.js +0 -38
- package/lib/env-backend._auto-generated_.js.map +0 -1
- package/lib/env-browser._auto-generated_.d.ts +0 -34
- package/lib/env-browser._auto-generated_.js +0 -38
- package/lib/env-browser._auto-generated_.js.map +0 -1
- package/lib/env.backend.d.ts +0 -34
- package/lib/env.backend.js +0 -40
- package/lib/env.backend.js.map +0 -1
- package/lib/env.browser.d.ts +0 -34
- package/lib/helpers/for-backend/helpers-dependencies.backend.d.ts +0 -2
- package/lib/helpers/for-backend/helpers-dependencies.backend.js +0 -7
- package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +0 -1
- package/lib/helpers/for-backend/helpers-network.backend.d.ts +0 -9
- package/lib/helpers/for-backend/helpers-network.backend.js +0 -44
- package/lib/helpers/for-backend/helpers-network.backend.js.map +0 -1
- package/lib/validators/validators-firedev.d.ts +0 -3
- package/lib/validators/validators-firedev.js +0 -34
- package/lib/validators/validators-firedev.js.map +0 -1
- package/lib/validators/validators-git.d.ts +0 -3
- package/lib/validators/validators-git.js +0 -13
- package/lib/validators/validators-git.js.map +0 -1
- package/lib/validators/validators-network.d.ts +0 -3
- package/lib/validators/validators-network.js +0 -19
- package/lib/validators/validators-network.js.map +0 -1
- package/lib/validators/validators.d.ts +0 -6
- package/lib/validators/validators.js +0 -11
- package/lib/validators/validators.js.map +0 -1
- package/tmp-environment.json +0 -33
- package/websql/index.d.ts +0 -6
- package/websql/lib/base/classes/base-bower-json.d.ts +0 -35
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +0 -32
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-controller.d.ts +0 -15
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-database-config.d.ts +0 -10
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +0 -42
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +0 -150
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +0 -45
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +0 -6
- package/websql/lib/base/classes/base-cli-worker/index.d.ts +0 -8
- package/websql/lib/base/classes/base-command-line-feature.d.ts +0 -48
- package/websql/lib/base/classes/base-compiler-for-project.d.ts +0 -8
- package/websql/lib/base/classes/base-db.d.ts +0 -10
- package/websql/lib/base/classes/base-debounce-compiler-for-project.d.ts +0 -29
- package/websql/lib/base/classes/base-docker.d.ts +0 -13
- package/websql/lib/base/classes/base-feature-for-project.d.ts +0 -7
- package/websql/lib/base/classes/base-file-folders-operations.d.ts +0 -17
- package/websql/lib/base/classes/base-git.d.ts +0 -211
- package/websql/lib/base/classes/base-global-command-line.d.ts +0 -294
- package/websql/lib/base/classes/base-ignore-hide.d.ts +0 -47
- package/websql/lib/base/classes/base-java-jdk.d.ts +0 -9
- package/websql/lib/base/classes/base-json-file-reader.d.ts +0 -72
- package/websql/lib/base/classes/base-library-build.d.ts +0 -62
- package/websql/lib/base/classes/base-linked-projects.d.ts +0 -30
- package/websql/lib/base/classes/base-linter.d.ts +0 -12
- package/websql/lib/base/classes/base-node-modules.d.ts +0 -70
- package/websql/lib/base/classes/base-npm-helpers.d.ts +0 -53
- package/websql/lib/base/classes/base-package-json.d.ts +0 -122
- package/websql/lib/base/classes/base-process-manager.d.ts +0 -31
- package/websql/lib/base/classes/base-project-resolver.d.ts +0 -41
- package/websql/lib/base/classes/base-project.d.ts +0 -259
- package/websql/lib/base/classes/base-quick-fixes.d.ts +0 -16
- package/websql/lib/base/classes/base-release-process.d.ts +0 -75
- package/websql/lib/base/classes/base-static-pages.d.ts +0 -15
- package/websql/lib/base/classes/base-vscode.d.ts +0 -54
- package/websql/lib/base/classes/index.d.ts +0 -23
- package/websql/lib/base/commit-data.d.ts +0 -94
- package/websql/lib/base/config-database.d.ts +0 -15
- package/websql/lib/base/core-project.d.ts +0 -113
- package/websql/lib/base/gh-temp-code.d.ts +0 -17
- package/websql/lib/base/index.d.ts +0 -6
- package/websql/lib/base/linked-project.d.ts +0 -41
- package/websql/lib/base/project-database.d.ts +0 -13
- package/websql/lib/base/tcp-udp-ports/index.d.ts +0 -4
- package/websql/lib/base/tcp-udp-ports/ports.controller.d.ts +0 -29
- package/websql/lib/base/tcp-udp-ports/ports.entity.d.ts +0 -19
- package/websql/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +0 -20
- package/websql/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.d.ts +0 -20
- package/websql/lib/base/tcp-udp-ports/tcp-upd-ports.worker.d.ts +0 -9
- package/websql/lib/base/translate.d.ts +0 -228
- package/websql/lib/build-info._auto-generated_.d.ts +0 -21
- package/websql/lib/helpers/for-backend/helpers-file-folders.d.ts +0 -114
- package/websql/lib/helpers/for-backend/helpers-process.d.ts +0 -88
- package/websql/lib/helpers/for-browser/angular.helper.d.ts +0 -37
- package/websql/lib/helpers/for-browser/helpers-browser.d.ts +0 -12
- package/websql/lib/helpers/helpers-array-obj.d.ts +0 -32
- package/websql/lib/helpers/helpers-numbers.d.ts +0 -8
- package/websql/lib/helpers/helpers-strings-regexes.d.ts +0 -29
- package/websql/lib/helpers/helpers-strings.d.ts +0 -56
- package/websql/lib/helpers/helpers.d.ts +0 -84
- package/websql/lib/index.d.ts +0 -9
- package/websql/lib/models.d.ts +0 -178
- package/websql/lib/old/execute-command.d.ts +0 -15
- package/websql/lib/old/helpers.d.ts +0 -62
- package/websql/lib/old/models.d.ts +0 -81
- package/websql/lib/utils.d.ts +0 -272
- package/websql/migrations/1736198527297_init.d.ts +0 -19
- package/websql/migrations/1736199486472_addingNotAssignablePorts.d.ts +0 -11
- package/websql/migrations/1736454437350_addFreePorts.d.ts +0 -10
- package/websql/migrations/index.d.ts +0 -2
- package/websql/migrations/migrations_index._auto-generated_.d.ts +0 -12
- package/websql/public-api.d.ts +0 -2
|
@@ -0,0 +1,3202 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import * as child_process from 'child_process';
|
|
3
|
+
import { ChildProcess as ChildProcess$1 } from 'child_process';
|
|
4
|
+
import { Level } from 'ng2-logger/browser';
|
|
5
|
+
import { CopyOptionsSync } from 'fs-extra';
|
|
6
|
+
import * as tnp_core_browser from 'tnp-core/browser';
|
|
7
|
+
import { CoreHelpers, CoreModels } from 'tnp-core/browser';
|
|
8
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
9
|
+
import { StdioOptions, ChildProcess } from 'node:child_process';
|
|
10
|
+
import * as ts from 'typescript';
|
|
11
|
+
import * as tnp_helpers from 'tnp-helpers';
|
|
12
|
+
import { PackageJson as PackageJson$1 } from 'type-fest';
|
|
13
|
+
import { TaonBaseEntity, TaonBaseController, Taon, TaonBaseClass, EndpointContext, Models } from 'taon/browser';
|
|
14
|
+
import { BaseClientCompiler, BaseClientCompilerOptions, ChangeOfFile } from 'incremental-compiler/browser';
|
|
15
|
+
import * as vscode from 'vscode';
|
|
16
|
+
import { OutputChannel, ExtensionContext, Uri } from 'vscode';
|
|
17
|
+
|
|
18
|
+
declare namespace HelpersAngular {
|
|
19
|
+
class SerializedSubject<T> {
|
|
20
|
+
id: string;
|
|
21
|
+
constructor(id: string);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
25
|
+
*/
|
|
26
|
+
function serialize(destroy$: Subject<any>): SerializedSubject<any>;
|
|
27
|
+
/**
|
|
28
|
+
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
29
|
+
*/
|
|
30
|
+
function deserialize(destroy$: SerializedSubject<any>): Subject<any>;
|
|
31
|
+
function unsubscribe(destroy$: Subject<any>): void;
|
|
32
|
+
/**
|
|
33
|
+
get properties from scss file
|
|
34
|
+
|
|
35
|
+
import styles from './tasks-ngrx-data.component.scss';
|
|
36
|
+
|
|
37
|
+
export class ExampleComponent {
|
|
38
|
+
sassFile = sassFile(styles);
|
|
39
|
+
|
|
40
|
+
async ngOnInit() {
|
|
41
|
+
this.tasksService.getAll();
|
|
42
|
+
console.log(this.sassFile.stringValue('--max-container-size'))
|
|
43
|
+
console.log(this.sassFile.numberValue('--max-container-size'))
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
*/
|
|
47
|
+
function sassFile(styles: string): {
|
|
48
|
+
stringValue: (name: string) => string;
|
|
49
|
+
numberValue: (name: string) => number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare namespace UtilsNpm {
|
|
54
|
+
export const isProperVersion: (npmVersion: string) => any;
|
|
55
|
+
export const isSpecialVersion: (version: string) => boolean;
|
|
56
|
+
export const clearVersion: (version: string, options: {
|
|
57
|
+
removePrefixes?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Remove alpha, beta, rc, latest, next etc.
|
|
60
|
+
*/
|
|
61
|
+
removeSuffix?: boolean;
|
|
62
|
+
}) => string;
|
|
63
|
+
export const fixMajorVerNumber: (version: string) => string;
|
|
64
|
+
type LatestType = 'major' | 'minor' | 'patch' | {
|
|
65
|
+
majorUpTo?: number;
|
|
66
|
+
minorUpTo?: number;
|
|
67
|
+
};
|
|
68
|
+
export const getLatestVersionFromNpm: (packageName: string, options?: {
|
|
69
|
+
currentPackageVersion?: string;
|
|
70
|
+
latestType?: LatestType;
|
|
71
|
+
skipAlphaBetaNext?: boolean;
|
|
72
|
+
}) => Promise<string>;
|
|
73
|
+
export const checkIfPackageVersionAvailable: (pkgName: string, pkgVersion: string) => Promise<boolean>;
|
|
74
|
+
export const getLastMajorVersions: (pkgName: string) => Promise<string[]>;
|
|
75
|
+
export const getLastMinorVersionsForMajor: (majorVer: number, pkgName: string) => Promise<string[]>;
|
|
76
|
+
export interface VersionObjectNpm {
|
|
77
|
+
major: number;
|
|
78
|
+
minor: number;
|
|
79
|
+
patch: number;
|
|
80
|
+
}
|
|
81
|
+
export const getVerObj: (version: string) => VersionObjectNpm;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated TODO remvoe
|
|
84
|
+
*/
|
|
85
|
+
export const getLastVersions: (pkgName: string, currentVerObj: VersionObjectNpm, latestVerObj: VersionObjectNpm) => Promise<string[]>;
|
|
86
|
+
export {};
|
|
87
|
+
}
|
|
88
|
+
declare namespace UtilsTypescript {
|
|
89
|
+
/**
|
|
90
|
+
* Remove TypeScript region blocks by their name, including nested regions.
|
|
91
|
+
*
|
|
92
|
+
* @param sourceCode - The TypeScript source code as a string.
|
|
93
|
+
* @param regionName - The name of the region to remove.
|
|
94
|
+
* @returns Modified TypeScript code without the specified regions.
|
|
95
|
+
*/
|
|
96
|
+
const removeRegionByName: (sourceCode: string, regionName: string) => string;
|
|
97
|
+
interface ExportInfo {
|
|
98
|
+
type: 'class' | 'function' | 'const' | 'let' | 'var' | 'enum' | 'type' | 'interface' | 'default' | 'module' | 'namespace';
|
|
99
|
+
name: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Function to extract exports from a TypeScript file
|
|
103
|
+
*/
|
|
104
|
+
const exportsFromFile: (filePath: string) => ExportInfo[];
|
|
105
|
+
/**
|
|
106
|
+
* Function to extract exports from a TypeScript file
|
|
107
|
+
*/
|
|
108
|
+
const exportsFromContent: (fileContent: string) => ExportInfo[];
|
|
109
|
+
const extractDefaultClassNameFromString: (sourceCode: string) => string | undefined;
|
|
110
|
+
const extractClassNameFromString: (sourceCode: string) => string[];
|
|
111
|
+
const extractClassNamesFromFile: (absoluteFilePath: string) => string[];
|
|
112
|
+
const extractDefaultClassNameFromFile: (absoluteFilePath: string) => any;
|
|
113
|
+
const formatFile: (absPathToFile: string | string[]) => void;
|
|
114
|
+
const formatAllFilesInsideFolder: (absPathToFolder: string) => void;
|
|
115
|
+
const eslintFixFile: (absPathToFile: string | string[]) => void;
|
|
116
|
+
const eslintFixAllFilesInsideFolder: (absPathToFolder: string | string[]) => void;
|
|
117
|
+
const getTaonContextFromContent: (fileContent: string) => string[];
|
|
118
|
+
const getTaonContextsNamesFromFile: (tsAbsFilePath: string) => string[];
|
|
119
|
+
const extractAngularComponentSelectors: (fileAbsPath: string) => {
|
|
120
|
+
className: string;
|
|
121
|
+
selector: string;
|
|
122
|
+
}[];
|
|
123
|
+
const wrapWithComment: (oneLineComment: string, absDestFilePath: string) => any;
|
|
124
|
+
/**
|
|
125
|
+
* Attempts to set or add an exported const with given name and value.
|
|
126
|
+
*/
|
|
127
|
+
const setValueToVariableInTsFile: (tsAbsFilePath: string, variableName: string, valueOfVariable: any, options?: {
|
|
128
|
+
skipAddIfNotExists?: boolean;
|
|
129
|
+
useRawStringValue?: boolean;
|
|
130
|
+
}) => void;
|
|
131
|
+
class TsImportExport {
|
|
132
|
+
/**
|
|
133
|
+
* for external modification
|
|
134
|
+
*/
|
|
135
|
+
embeddedPathToFileResult: string;
|
|
136
|
+
/**
|
|
137
|
+
* for external modification
|
|
138
|
+
*/
|
|
139
|
+
packageName: string;
|
|
140
|
+
/**
|
|
141
|
+
* for external modification
|
|
142
|
+
*/
|
|
143
|
+
isIsomorphic?: boolean;
|
|
144
|
+
readonly type: 'export' | 'import' | 'async-import' | 'require';
|
|
145
|
+
/**
|
|
146
|
+
* ORIGNAL
|
|
147
|
+
* Name of the file that is being imported/exported
|
|
148
|
+
* with parenthesis included , example
|
|
149
|
+
* 'my-file' or "my-file" or `my-file`
|
|
150
|
+
*/
|
|
151
|
+
readonly embeddedPathToFile: string;
|
|
152
|
+
/**
|
|
153
|
+
* same as cleanEmbeddedPathToFile but without quotes (parenthesis), example:
|
|
154
|
+
* my-file or my-file or my-file
|
|
155
|
+
*/
|
|
156
|
+
readonly cleanEmbeddedPathToFile: string;
|
|
157
|
+
readonly startRow: number;
|
|
158
|
+
readonly startCol: number;
|
|
159
|
+
readonly endRow: number;
|
|
160
|
+
readonly endCol: number;
|
|
161
|
+
readonly parenthesisType: 'single' | 'double' | 'tics';
|
|
162
|
+
readonly importElements: string[];
|
|
163
|
+
constructor(type: 'export' | 'import' | 'async-import' | 'require', embeddedPathToFile: string, start: ts.LineAndCharacter, end: ts.LineAndCharacter, parenthesisType: 'single' | 'double' | 'tics', importElements?: string[]);
|
|
164
|
+
private removeStartEndQuotes;
|
|
165
|
+
/**
|
|
166
|
+
* it will extract part of the file content
|
|
167
|
+
* that is between startRow, startCol and endRow, endCol
|
|
168
|
+
* and contains import/export/require statement
|
|
169
|
+
*/
|
|
170
|
+
getStringPartFrom(wholeContentOfFile: string): string;
|
|
171
|
+
wrapInParenthesis(str: string): string;
|
|
172
|
+
}
|
|
173
|
+
const recognizeImportsFromFile: (fileAbsPAth: string) => TsImportExport[];
|
|
174
|
+
const recognizeImportsFromContent: (fileContent: string) => TsImportExport[];
|
|
175
|
+
/**
|
|
176
|
+
* Transition methods ng18 => ng19
|
|
177
|
+
* Adds standalone: false if not exists in component decorator
|
|
178
|
+
*/
|
|
179
|
+
function transformComponentStandaloneOption(sourceText: string): string;
|
|
180
|
+
const fixHtmlTemplatesInDir: (directoryPath: string) => void;
|
|
181
|
+
function removeTaggedImportExport(tsFileContent: string, tags: string[]): string;
|
|
182
|
+
const wrapFirstImportsInImportsRegion: (fileContent: string) => string;
|
|
183
|
+
/**
|
|
184
|
+
* wrap class field with decorators
|
|
185
|
+
* wrap class methods with decorators
|
|
186
|
+
*/
|
|
187
|
+
function wrapContentClassMembersDecoratorsWithRegion(classFileContent: string, wrapTag?: string): string;
|
|
188
|
+
type FlattenMapping = {
|
|
189
|
+
[modulePath: string]: {
|
|
190
|
+
[oldQualifiedName: string]: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
function transformFlatImports(sourceText: string, mapping: FlattenMapping): string;
|
|
194
|
+
const clearRequireCacheRecursive: (modulePath: string, seen?: Set<string>) => void;
|
|
195
|
+
type DeepWritable<T> = {
|
|
196
|
+
-readonly [P in keyof T]: T[P] extends object ? T[P] extends Function ? T[P] : DeepWritable<T[P]> : T[P];
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
declare namespace UtilsHttp {
|
|
200
|
+
const startHttpServer: (cwd: string, port: number, options?: {
|
|
201
|
+
startMessage?: string;
|
|
202
|
+
}) => Promise<any>;
|
|
203
|
+
}
|
|
204
|
+
declare namespace UtilsMd {
|
|
205
|
+
/**
|
|
206
|
+
* extract assets pathes from .md file
|
|
207
|
+
*/
|
|
208
|
+
const getAssets: (mdfileContent: string) => string[];
|
|
209
|
+
const getAssetsFromFile: (absPathToFile: string) => string[];
|
|
210
|
+
/**
|
|
211
|
+
* Extract links to other Markdown files from a given Markdown content.
|
|
212
|
+
* @param mdfileContent
|
|
213
|
+
*/
|
|
214
|
+
const getLinksToOtherMdFiles: (mdfileContent: string) => string[];
|
|
215
|
+
const moveAssetsPathsToLevelFromFile: (absFilePath: string, level?: number) => string | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* Move asset paths to a higher directory level by adding "../" before each path.
|
|
218
|
+
*
|
|
219
|
+
* @param mdfileContent - The content of the .md file.
|
|
220
|
+
* @param level - The number of levels to go up (default is 1).
|
|
221
|
+
* @returns The modified content with updated asset paths.
|
|
222
|
+
*/
|
|
223
|
+
const moveAssetsPathsToLevel: (mdfileContent: string, level?: number) => string;
|
|
224
|
+
}
|
|
225
|
+
declare namespace UtilsQuickFixes {
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
228
|
+
* @param node_modules/sql.js/dist/sql-wasm.js
|
|
229
|
+
*/
|
|
230
|
+
const replaceKnownFaultyCode: (contentofSQLWasmJS: string) => string;
|
|
231
|
+
/**
|
|
232
|
+
* for some reason electron is being bundled - and it is not needed for cli
|
|
233
|
+
*/
|
|
234
|
+
const replaceElectronWithNothing: (jsContent: string, packageName: string) => string;
|
|
235
|
+
}
|
|
236
|
+
declare namespace UtilsVSCode {
|
|
237
|
+
const calculateContrastingHexColor: (hex: string) => string;
|
|
238
|
+
const generateFancyColor: () => string;
|
|
239
|
+
const vscodeImport: () => any;
|
|
240
|
+
const regenerateVsCodeSettingsColors: (cwd: string, overideBottomColor?: string) => void;
|
|
241
|
+
}
|
|
242
|
+
declare namespace UtilsZipBrowser {
|
|
243
|
+
const zipDirBrowser: (fileList: FileList) => Promise<Blob>;
|
|
244
|
+
const unzipArchiveBrowser: (zipBlob: Blob) => Promise<Map<string, Blob>>;
|
|
245
|
+
}
|
|
246
|
+
declare namespace UtilsZip {
|
|
247
|
+
const splitFile7Zip: (inputPath: string, partSizeMB?: number) => Promise<number>;
|
|
248
|
+
/**
|
|
249
|
+
* Splits a file into smaller parts if its size exceeds the specified part size.
|
|
250
|
+
* @returns true if file was split, false if not needed
|
|
251
|
+
*/
|
|
252
|
+
const splitFile: (inputPath: string, partSizeMB?: number) => Promise<number>;
|
|
253
|
+
/**
|
|
254
|
+
* @returns absolute path to zip file
|
|
255
|
+
*/
|
|
256
|
+
const zipDir: (absPathToDir: string, options?: {
|
|
257
|
+
/**
|
|
258
|
+
* default false
|
|
259
|
+
*/
|
|
260
|
+
overrideIfZipFileExists?: boolean;
|
|
261
|
+
}) => Promise<string>;
|
|
262
|
+
const unzipArchive: (absPathToZip: string) => Promise<void>;
|
|
263
|
+
}
|
|
264
|
+
declare namespace UtilsTaonWorker {
|
|
265
|
+
const getUniqueForTask: (task: string, location: string | string[]) => string;
|
|
266
|
+
}
|
|
267
|
+
declare namespace UtilsJava {
|
|
268
|
+
const selectJdkVersion: () => Promise<string | undefined>;
|
|
269
|
+
const detectJavaVersionMacOS: (javaHome: string) => string;
|
|
270
|
+
const updateJavaHomePath: (selectedPath: string) => void;
|
|
271
|
+
const selectTomcatVersion: () => Promise<string>;
|
|
272
|
+
const updateTomcatHomePath: (selectedPath: string) => void;
|
|
273
|
+
}
|
|
274
|
+
declare namespace UtilsPasswords {
|
|
275
|
+
const hashPassword: (password: string) => Promise<string>;
|
|
276
|
+
const verifyPassword: (password: string, stored: string) => Promise<boolean>;
|
|
277
|
+
}
|
|
278
|
+
declare namespace UtilsDocker {
|
|
279
|
+
const DOCKER_LABEL_KEY = "com.docker.compose.project";
|
|
280
|
+
const DOCKER_TAON_PROJECT_LABEL = "com.docker.compose.taon.project=true";
|
|
281
|
+
const cleanImagesAndContainersByDockerLabel: (labelKey: string, labelValue: string) => Promise<void>;
|
|
282
|
+
interface DockerComposeActionOptions {
|
|
283
|
+
composeFileName?: string;
|
|
284
|
+
cwd?: string;
|
|
285
|
+
env?: NodeJS.ProcessEnv;
|
|
286
|
+
skipBuild?: boolean;
|
|
287
|
+
stdio?: StdioOptions;
|
|
288
|
+
useFirstYmlFound?: boolean;
|
|
289
|
+
}
|
|
290
|
+
type DockerComposeActionType = 'up' | 'down';
|
|
291
|
+
/**
|
|
292
|
+
* @returns cmd + args array
|
|
293
|
+
* you can use with child_process.spawn
|
|
294
|
+
* const [cmd, ...args] = getDockerComposeActionCommand('up');
|
|
295
|
+
* child.spawn(cmd, args, { ... });
|
|
296
|
+
*
|
|
297
|
+
* @param action 'up' | 'down'
|
|
298
|
+
*/
|
|
299
|
+
const getDockerComposeActionCommand: (action: DockerComposeActionType, options?: Omit<DockerComposeActionOptions, "cwd" | "env" | "stdio" | "useFirstYmlFound">) => string[];
|
|
300
|
+
const getDockerComposeActionChildProcess: (action: DockerComposeActionType, options?: DockerComposeActionOptions) => ChildProcess;
|
|
301
|
+
const removeAllTaonContainersAndImagesFromDocker: () => Promise<void>;
|
|
302
|
+
/**
|
|
303
|
+
* @TODO @REFACTOR use async stuff
|
|
304
|
+
*/
|
|
305
|
+
const linkPodmanAsDockerIfNecessary: () => Promise<void>;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* ! TODO @IN_PROGRESS @LAST
|
|
309
|
+
*/
|
|
310
|
+
declare namespace UtilsFileSync {
|
|
311
|
+
interface FoldersSyncOptions {
|
|
312
|
+
androidFolder: string;
|
|
313
|
+
macPhotosLibrary: string;
|
|
314
|
+
tempConvertFolder: string;
|
|
315
|
+
/**
|
|
316
|
+
* If true, skips the terminal menu confirmation on startup
|
|
317
|
+
* (default: false) - perfect for automated scripts
|
|
318
|
+
*/
|
|
319
|
+
skipTerminalMenu?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* for testing purposes only
|
|
322
|
+
*/
|
|
323
|
+
onlyProcessFiles?: string[];
|
|
324
|
+
}
|
|
325
|
+
export const forFolders: (folder: FoldersSyncOptions) => Promise<void>;
|
|
326
|
+
export {};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
declare class HelpersArrayObj {
|
|
330
|
+
from(s: string | string[]): string[];
|
|
331
|
+
second(arr: any): any;
|
|
332
|
+
/**
|
|
333
|
+
* @deprecated
|
|
334
|
+
* use moveObjectBefore
|
|
335
|
+
*/
|
|
336
|
+
arrayMoveElementBefore<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
|
|
337
|
+
/**
|
|
338
|
+
* @deprecated
|
|
339
|
+
* use moveObjectAfter
|
|
340
|
+
*/
|
|
341
|
+
arrayMoveElementAfterB<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
|
|
342
|
+
moveObjectBefore<T = any>(array: T[], target: T, before: T): T[];
|
|
343
|
+
moveObjectAfter<T = any>(array: T[], target: T, after: T): T[];
|
|
344
|
+
/**
|
|
345
|
+
* @deprecated use Utils.uniqArray from tnp-core
|
|
346
|
+
*/
|
|
347
|
+
uniqArray<T = any>(array: any[], uniqueProperty?: keyof T): T[];
|
|
348
|
+
/**
|
|
349
|
+
* @deprecated use Utils.uniqArray from tnp-core
|
|
350
|
+
*/
|
|
351
|
+
sortKeys(obj: any): any;
|
|
352
|
+
/**
|
|
353
|
+
* Fuzzy search
|
|
354
|
+
*/
|
|
355
|
+
fuzzy<T = any>(query: string, list: T[], valueFn?: (modelFromList: T) => string): {
|
|
356
|
+
matches: string[];
|
|
357
|
+
results: T[];
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
declare class HelpersStringsRegexes {
|
|
362
|
+
escapeStringForRegEx(s: string): string;
|
|
363
|
+
matchExactOnce(s: string, regex: RegExp): string;
|
|
364
|
+
get regex(): {
|
|
365
|
+
/**
|
|
366
|
+
* mathes
|
|
367
|
+
* xxx.xxx.xxx.xxx
|
|
368
|
+
* xxx.xxx.xxx.xxx:port
|
|
369
|
+
* http://xxx.xxx.xxx.xxx:port
|
|
370
|
+
* http://xxx.xxx.xxx.xxx
|
|
371
|
+
* https://xxx.xxx.xxx.xxx:port
|
|
372
|
+
* https://xxx.xxx.xxx.xxx *
|
|
373
|
+
*/
|
|
374
|
+
readonly forStringWithIpHost: RegExp;
|
|
375
|
+
/**
|
|
376
|
+
* mathes
|
|
377
|
+
* http://domain.com:port
|
|
378
|
+
* http://domain.com
|
|
379
|
+
* http://domain:port
|
|
380
|
+
* http://domain
|
|
381
|
+
* https://domain.com:port
|
|
382
|
+
* https://domain.com
|
|
383
|
+
* https://domain:port
|
|
384
|
+
* https://domain
|
|
385
|
+
*/
|
|
386
|
+
readonly forStringWithDomainHost: RegExp;
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
declare class HelpersStrings {
|
|
391
|
+
/**
|
|
392
|
+
* Example:
|
|
393
|
+
*
|
|
394
|
+
* const result = interpolateString("I'm {age} years old!")
|
|
395
|
+
* .withParameters({ age: 29 });
|
|
396
|
+
*
|
|
397
|
+
* const result = interpolateString("The {a} says {n}, {n}, {n}!")
|
|
398
|
+
* .withParameters({ a: 'cow', n: 'moo' });
|
|
399
|
+
*
|
|
400
|
+
*
|
|
401
|
+
* @param value string to interpolate
|
|
402
|
+
* @param parameters object with parametes
|
|
403
|
+
*/
|
|
404
|
+
interpolateString<T = any>(value: string): {
|
|
405
|
+
withParameters(parameters: T): string;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
*
|
|
409
|
+
* @param pixelsCss exmaple: 100px
|
|
410
|
+
* @returns number value
|
|
411
|
+
*/
|
|
412
|
+
numValue(pixelsCss: string): number;
|
|
413
|
+
/**
|
|
414
|
+
* examples:
|
|
415
|
+
* 'aa bb bb' => ['aa','bb','cc'],
|
|
416
|
+
* 'aa' => ['aa']
|
|
417
|
+
* ['aa'] => ['aa']
|
|
418
|
+
*/
|
|
419
|
+
splitIfNeed(stringOrArr: string | string[]): string[];
|
|
420
|
+
removeDoubleOrMoreEmptyLines(s: string): string;
|
|
421
|
+
/**
|
|
422
|
+
*
|
|
423
|
+
* https://stackoverflow.com/a/57129703/1345101
|
|
424
|
+
*
|
|
425
|
+
* Returns the plural of an English word.
|
|
426
|
+
*
|
|
427
|
+
* @export
|
|
428
|
+
* @param {string} word
|
|
429
|
+
* @param {number} [amount]
|
|
430
|
+
* @returns {string}
|
|
431
|
+
*/
|
|
432
|
+
plural(word: string, amount?: number): string;
|
|
433
|
+
/**
|
|
434
|
+
* https://stackoverflow.com/a/57129703/1345101
|
|
435
|
+
*
|
|
436
|
+
* Returns the singular of an English word.
|
|
437
|
+
*
|
|
438
|
+
* @export
|
|
439
|
+
* @param {string} word
|
|
440
|
+
* @param {number} [amount]
|
|
441
|
+
* @returns {string}
|
|
442
|
+
*/
|
|
443
|
+
singular(word: string, amount?: number): string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
declare class HelpersProcess {
|
|
447
|
+
restartApplicationItself(nameOfApp: string): Promise<any>;
|
|
448
|
+
osIsMacOs(versino: 'big-sur' | 'catalina'): any;
|
|
449
|
+
generatedFileWrap(content: string): any;
|
|
450
|
+
changeCwdWrapper(dir: string, functionToExecure: Function, logLevel?: Level): Promise<any>;
|
|
451
|
+
changeCwd(dir?: string): any;
|
|
452
|
+
/**
|
|
453
|
+
* // TODO refactor this
|
|
454
|
+
* @deprecated
|
|
455
|
+
*/
|
|
456
|
+
goToDir(dir?: string): any;
|
|
457
|
+
pressKeyOrWait(message?: string, printWaitMessages?: number): Promise<any>;
|
|
458
|
+
/**
|
|
459
|
+
* @deprecated use UtilsTerminal.pressAnyKey
|
|
460
|
+
*/
|
|
461
|
+
pressKeyAndContinue(message?: string): any;
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated use UtilsTerminal.multiselect
|
|
464
|
+
*/
|
|
465
|
+
list<T = string>(question: string, choices: {
|
|
466
|
+
name: string;
|
|
467
|
+
value: T;
|
|
468
|
+
}[] | {
|
|
469
|
+
[choice: string]: {
|
|
470
|
+
name: string;
|
|
471
|
+
};
|
|
472
|
+
}): Promise<any>;
|
|
473
|
+
/**
|
|
474
|
+
* @deprecated use UtilsTerminal.multiselect
|
|
475
|
+
*/
|
|
476
|
+
multipleChoicesAsk(question: string, choices: {
|
|
477
|
+
name: string;
|
|
478
|
+
value: string;
|
|
479
|
+
}[], autocomplete?: boolean, selected?: {
|
|
480
|
+
name: string;
|
|
481
|
+
value: string;
|
|
482
|
+
}[]): Promise<string[]>;
|
|
483
|
+
/**
|
|
484
|
+
* @deprecated use UtilsTerminal.input
|
|
485
|
+
*/
|
|
486
|
+
input(options: {
|
|
487
|
+
defaultValue?: string;
|
|
488
|
+
question: string;
|
|
489
|
+
validate?: (value: string) => boolean;
|
|
490
|
+
}): Promise<string>;
|
|
491
|
+
/**
|
|
492
|
+
* @deprecated use UtilsTerminal.multiselect
|
|
493
|
+
* TODO wierd problem when pressing key like "i"
|
|
494
|
+
*/
|
|
495
|
+
selectChoicesAsk<T = string>(question: string, choices: {
|
|
496
|
+
name: string;
|
|
497
|
+
value: T;
|
|
498
|
+
}[] | {
|
|
499
|
+
[choice: string]: {
|
|
500
|
+
name: string;
|
|
501
|
+
};
|
|
502
|
+
}): Promise<T>;
|
|
503
|
+
autocompleteAsk<T = string>(question: string, choices: {
|
|
504
|
+
name: string;
|
|
505
|
+
value: T;
|
|
506
|
+
}[], pageSize?: number): Promise<T>;
|
|
507
|
+
getWorkingDirOfProcess(PID: number): any;
|
|
508
|
+
outputToVScode(data: {
|
|
509
|
+
label: string;
|
|
510
|
+
option: string;
|
|
511
|
+
}[] | string, disableEncode?: boolean): any;
|
|
512
|
+
actionWrapper(fn: () => void, taskName?: string): Promise<any>;
|
|
513
|
+
terminalLine(): any;
|
|
514
|
+
/**
|
|
515
|
+
* THIS DEOS NOT WORK !
|
|
516
|
+
* ! TOOD FIX THIS
|
|
517
|
+
*/
|
|
518
|
+
killAllNodeExceptCurrentProcess(): Promise<any>;
|
|
519
|
+
killAllNode(): any;
|
|
520
|
+
formatPath(pathToFileOrFolder: string): any;
|
|
521
|
+
/**
|
|
522
|
+
* @deprecated
|
|
523
|
+
*/
|
|
524
|
+
prepareWatchCommand(cmd: any): any;
|
|
525
|
+
/**
|
|
526
|
+
* @deprecated
|
|
527
|
+
*/
|
|
528
|
+
getStringFrom(command: string, descriptionOfCommand?: string): any;
|
|
529
|
+
waitForMessegeInStdout(proc: ChildProcess$1, message: string): Promise<any>;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
interface GetRecrusiveFilesFromOptions {
|
|
533
|
+
}
|
|
534
|
+
declare class HelpersFileFolders {
|
|
535
|
+
/**
|
|
536
|
+
* Calculate file or string checksum
|
|
537
|
+
*/
|
|
538
|
+
checksum(absolutePathToFileOrContent: string, algorithm?: 'md5' | 'sha1'): any;
|
|
539
|
+
getValueFromJSON(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
540
|
+
getValueFromJSONC(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
541
|
+
readValueFromJson(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
542
|
+
readValueFromJsonC(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
543
|
+
setValueToJSON(filepath: string | string[], lodashGetPath: string, value: any): void;
|
|
544
|
+
setValueToJSONC(filepath: string, lodashGetPath: string, value: any): void;
|
|
545
|
+
/**
|
|
546
|
+
* file size in bytes
|
|
547
|
+
*/
|
|
548
|
+
size(filePath: string): number;
|
|
549
|
+
pathFromLink(filePath: string): string;
|
|
550
|
+
/**
|
|
551
|
+
* @deprecated
|
|
552
|
+
*/
|
|
553
|
+
renameFolder(from: string, to: string, cwd?: string): void;
|
|
554
|
+
/**
|
|
555
|
+
* @deprecated
|
|
556
|
+
*/
|
|
557
|
+
renameFiles(from: string, to: string, cwd?: string): void;
|
|
558
|
+
getTempFolder(): any;
|
|
559
|
+
isPlainFileOrFolder(filePath: string): boolean;
|
|
560
|
+
/**
|
|
561
|
+
* @deprecated
|
|
562
|
+
* use import (or modules only on backend)
|
|
563
|
+
*/
|
|
564
|
+
requireUncached(module: string): any;
|
|
565
|
+
/**
|
|
566
|
+
* @deprecated
|
|
567
|
+
* use import (or modules only on backend)
|
|
568
|
+
*
|
|
569
|
+
* get default export object from js file
|
|
570
|
+
* @param jsFilePath
|
|
571
|
+
*/
|
|
572
|
+
require(jsFilePath: string): any;
|
|
573
|
+
tryRecreateDir(dirpath: string): void;
|
|
574
|
+
/**
|
|
575
|
+
* @deprecated
|
|
576
|
+
*/
|
|
577
|
+
tryCopyFrom(source: string, destination: string, options?: {}): void;
|
|
578
|
+
move(from: string, to: string, options?: {
|
|
579
|
+
purpose?: string;
|
|
580
|
+
}): void;
|
|
581
|
+
findChildren<T>(location: string, createFn: (childLocation: string) => T, options?: {
|
|
582
|
+
allowAllNames: boolean;
|
|
583
|
+
}): T[];
|
|
584
|
+
/**
|
|
585
|
+
* @deprecated
|
|
586
|
+
*/
|
|
587
|
+
findChildrenNavi<T>(location: string, createFn: (childLocation: string) => T): T[];
|
|
588
|
+
/**
|
|
589
|
+
* get all files from folder
|
|
590
|
+
* absolute paths
|
|
591
|
+
*/
|
|
592
|
+
getRecrusiveFilesFrom(dir: string, ommitFolders?: string[], options?: GetRecrusiveFilesFromOptions): string[];
|
|
593
|
+
checkIfNameAllowedForTaonProj(folderName: string): boolean;
|
|
594
|
+
getLinesFromFiles(filename: string, lineCount?: number): Promise<string[]>;
|
|
595
|
+
/**
|
|
596
|
+
* Get the most recent changes file in direcory
|
|
597
|
+
* @param dir absoulute path to file
|
|
598
|
+
*/
|
|
599
|
+
getMostRecentFileName(dir: string): string;
|
|
600
|
+
getMostRecentFilesNames(dir: string): string[];
|
|
601
|
+
removeExcept(fromPath: string, exceptFolderAndFiles: string[]): void;
|
|
602
|
+
/**
|
|
603
|
+
* Copy folder using os native command
|
|
604
|
+
* (perfect for large folders/files)
|
|
605
|
+
*/
|
|
606
|
+
copyFolderOsNative(from: string, to: string, options?: {
|
|
607
|
+
removeDestination?: boolean;
|
|
608
|
+
}): Promise<void>;
|
|
609
|
+
copy(sourceDir: string | string[], destinationDir: string | string[], options?: {
|
|
610
|
+
filter?: any;
|
|
611
|
+
overwrite?: boolean;
|
|
612
|
+
recursive?: boolean;
|
|
613
|
+
asSeparatedFiles?: boolean;
|
|
614
|
+
asSeparatedFilesAllowNotCopied?: boolean;
|
|
615
|
+
asSeparatedFilesSymlinkAsFile?: boolean;
|
|
616
|
+
/**
|
|
617
|
+
* folders to omit: example: ['src','node_modules']
|
|
618
|
+
*
|
|
619
|
+
* This option works only with omitFoldersBaseFolder
|
|
620
|
+
*/
|
|
621
|
+
omitFolders?: string[];
|
|
622
|
+
/**
|
|
623
|
+
* absolute path for base folder for omitFolder option
|
|
624
|
+
*/
|
|
625
|
+
omitFoldersBaseFolder?: string;
|
|
626
|
+
copySymlinksAsFiles?: boolean;
|
|
627
|
+
copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean;
|
|
628
|
+
useTempFolder?: boolean;
|
|
629
|
+
dontAskOnError?: boolean;
|
|
630
|
+
} & CopyOptionsSync): void;
|
|
631
|
+
filterDontCopy(basePathFoldersTosSkip: string[], projectOrBasepath: string): any;
|
|
632
|
+
filterOnlyCopy(basePathFoldersOnlyToInclude: string[], projectOrBasepath: string): any;
|
|
633
|
+
copyFile(sourcePath: string | string[], destinationPath: string | string[], options?: {
|
|
634
|
+
transformTextFn?: (input: string) => string;
|
|
635
|
+
debugMode?: boolean;
|
|
636
|
+
fast?: boolean;
|
|
637
|
+
dontCopySameContent?: boolean;
|
|
638
|
+
}): boolean;
|
|
639
|
+
/**
|
|
640
|
+
* get real absolute path
|
|
641
|
+
*/
|
|
642
|
+
resolve(fileOrFolderPath: string): string;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
declare class HelpersNumber {
|
|
646
|
+
/**
|
|
647
|
+
* @deprecated
|
|
648
|
+
* use _.random()
|
|
649
|
+
*/
|
|
650
|
+
randomInteger: (max: any, min: any) => any;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
declare class HelpersBrowser {
|
|
654
|
+
private static callbacks;
|
|
655
|
+
static onInit(callback: (ins: HelpersBrowser) => any): void;
|
|
656
|
+
get win(): Window & typeof globalThis;
|
|
657
|
+
private get tabIdSessionStorage();
|
|
658
|
+
readonly tabId: number;
|
|
659
|
+
private static inst;
|
|
660
|
+
init: void;
|
|
661
|
+
private constructor();
|
|
662
|
+
static get instance(): HelpersBrowser;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Mixing for multiclass inheritance
|
|
667
|
+
*
|
|
668
|
+
* How to use It:
|
|
669
|
+
*
|
|
670
|
+
* class Wolverine {}
|
|
671
|
+
* class Jean {}
|
|
672
|
+
* export class Child {}
|
|
673
|
+
* export interface MyChild implements Wolverine, Jean {}
|
|
674
|
+
* applyMixing(Child,[Wolverine, Jean]);
|
|
675
|
+
*
|
|
676
|
+
* @param derivedCtor Target Class
|
|
677
|
+
* @param baseCtors Base Classes
|
|
678
|
+
*/
|
|
679
|
+
declare function applyMixins(derivedCtor: any, baseCtors: any[]): void;
|
|
680
|
+
declare class HelpersTaon extends CoreHelpers {
|
|
681
|
+
arrays: HelpersArrayObj;
|
|
682
|
+
strings: HelpersStrings;
|
|
683
|
+
numbers: HelpersNumber;
|
|
684
|
+
browser: HelpersBrowser;
|
|
685
|
+
ng: typeof HelpersAngular;
|
|
686
|
+
private static _instance;
|
|
687
|
+
static get Instance(): HelpersTaon;
|
|
688
|
+
private constructor();
|
|
689
|
+
CLIWRAP(f: Function, name: string): Function;
|
|
690
|
+
/**
|
|
691
|
+
* Bundle file with node_modules into one file
|
|
692
|
+
* default strategy is cli
|
|
693
|
+
* Please keep: 'ts-node', 'typescript' as dependency in your package.json
|
|
694
|
+
*/
|
|
695
|
+
bundleCodeIntoSingleFile(pathToJsFile: string, outputFilePath: string, options?: {
|
|
696
|
+
strategy?: 'cli' | 'vscode-ext' | 'node-app' | 'electron-app';
|
|
697
|
+
/**
|
|
698
|
+
* ! beforeWrite needs to return output
|
|
699
|
+
*/
|
|
700
|
+
beforeWrite?: (options: {
|
|
701
|
+
output?: string;
|
|
702
|
+
copyToDestination?: (fileOrFolderAbsPath: string) => void;
|
|
703
|
+
}) => string;
|
|
704
|
+
additionalExternals?: string[];
|
|
705
|
+
additionalReplaceWithNothing?: string[];
|
|
706
|
+
skipFixingSQLlite?: boolean;
|
|
707
|
+
minify?: boolean;
|
|
708
|
+
}): Promise<void>;
|
|
709
|
+
/**
|
|
710
|
+
* @deprecated
|
|
711
|
+
* use Utils.uniqArray from tnp-core
|
|
712
|
+
*/
|
|
713
|
+
uniqArray<T = any>(array: any[], uniqueProperty?: keyof T): T[];
|
|
714
|
+
slash(pathFromWindowsOrUnixType: string): any;
|
|
715
|
+
isElevated(): Promise<void>;
|
|
716
|
+
mesureExectionInMs(description: string, functionToExecute: Function, ...functionArguments: any[]): Promise<number>;
|
|
717
|
+
mesureExectionInMsSync(description: string, functionToExecute: () => void): number;
|
|
718
|
+
waitForCondition(conditionFn: (any: any) => boolean, howOfftenCheckInMs?: number): Promise<unknown>;
|
|
719
|
+
getMethodName(classObject: any, method: any): string;
|
|
720
|
+
/**
|
|
721
|
+
* @deprecated
|
|
722
|
+
*/
|
|
723
|
+
fixWebpackEnv(env: Object): void;
|
|
724
|
+
/**
|
|
725
|
+
* @deprecated
|
|
726
|
+
*/
|
|
727
|
+
workerCalculateArray(dataToSplit: any[], operation: (dataChunk: any[], workerNumber?: number | undefined) => Promise<void>, options?: {
|
|
728
|
+
maxesForWorkes?: {
|
|
729
|
+
[workerMaxes: number]: number;
|
|
730
|
+
};
|
|
731
|
+
workerLimit?: number;
|
|
732
|
+
globals?: any;
|
|
733
|
+
}): Promise<void>;
|
|
734
|
+
checkEnvironment(deps?: CoreModels.GlobalDependencies): any;
|
|
735
|
+
applyMixins: typeof applyMixins;
|
|
736
|
+
}
|
|
737
|
+
interface HelpersTaon extends HelpersStringsRegexes, HelpersProcess, HelpersFileFolders {
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
declare abstract class BaseFeatureForProject<PROJECT extends BaseProject<any, any> = BaseProject<any, any>> {
|
|
741
|
+
protected project: PROJECT;
|
|
742
|
+
get ins(): tnp_helpers.BaseProjectResolver<any>;
|
|
743
|
+
constructor(project: PROJECT);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
declare class BaseProcessManger<PROJECT extends BaseProject<any, any> = BaseProject<any, any>> extends BaseFeatureForProject<PROJECT> {
|
|
747
|
+
private initialOptions;
|
|
748
|
+
private allProcesses;
|
|
749
|
+
private selectedProcesses;
|
|
750
|
+
outputBuffer: string[];
|
|
751
|
+
startedProcesses: Set<CommandProcess>;
|
|
752
|
+
watch: boolean;
|
|
753
|
+
private _showLogs;
|
|
754
|
+
set showLogs(value: boolean);
|
|
755
|
+
get showLogs(): boolean;
|
|
756
|
+
/**
|
|
757
|
+
* special config for Helpers.executer
|
|
758
|
+
*/
|
|
759
|
+
hideOutput: {
|
|
760
|
+
stderr: boolean;
|
|
761
|
+
stdout: boolean;
|
|
762
|
+
acceptAllExitCodeAsSuccess: boolean;
|
|
763
|
+
};
|
|
764
|
+
constructor(project: PROJECT);
|
|
765
|
+
init<PROJECT = BaseProject<any, any>>(initialOptions: ProcessManagerConfig<PROJECT>): Promise<void>;
|
|
766
|
+
private showOutput;
|
|
767
|
+
private killOrBuildMenu;
|
|
768
|
+
makeSureSelectedProcessesAreRunning(): Promise<void>;
|
|
769
|
+
private startProcessWithDependencies;
|
|
770
|
+
private buildMenu;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
type BaseProjectType = CoreModels.BaseProjectType;
|
|
774
|
+
declare const BaseProjectTypeArr: string[];
|
|
775
|
+
/**
|
|
776
|
+
* Angular project type
|
|
777
|
+
*/
|
|
778
|
+
type NgProject = {
|
|
779
|
+
projectType: 'library' | 'application';
|
|
780
|
+
/**
|
|
781
|
+
* where ng-packagr.json is located, tsconfig etc.
|
|
782
|
+
*/
|
|
783
|
+
root: string;
|
|
784
|
+
/**
|
|
785
|
+
* Source code project
|
|
786
|
+
*/
|
|
787
|
+
sourceRoot: string;
|
|
788
|
+
prefix: string;
|
|
789
|
+
};
|
|
790
|
+
type LibraryBuildCommandOptions = {
|
|
791
|
+
watch?: boolean;
|
|
792
|
+
};
|
|
793
|
+
type LibrariesBuildOptions<PROJECT extends BaseProject = BaseProject> = {
|
|
794
|
+
strategy?: 'link' | 'copy';
|
|
795
|
+
/**
|
|
796
|
+
* by default we are copying all libraries to node_modules of itself
|
|
797
|
+
*/
|
|
798
|
+
copylink_to_node_modules?: string[];
|
|
799
|
+
releaseBuild?: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* override build options for specific libraries
|
|
802
|
+
* @todo
|
|
803
|
+
*/
|
|
804
|
+
libraries?: PROJECT[];
|
|
805
|
+
outputLineReplace?: (libForOutput: PROJECT, useExternalProvidedLibs: boolean) => (line: string) => string;
|
|
806
|
+
useLastUserConfiguration?: boolean;
|
|
807
|
+
};
|
|
808
|
+
type TestBuildOptions = {
|
|
809
|
+
onlySpecyficFiles?: string[];
|
|
810
|
+
updateSnapshot?: boolean;
|
|
811
|
+
};
|
|
812
|
+
interface ChangelogData {
|
|
813
|
+
changes: string[];
|
|
814
|
+
version: string;
|
|
815
|
+
date: string;
|
|
816
|
+
}
|
|
817
|
+
interface PushProcessOptions {
|
|
818
|
+
force?: boolean;
|
|
819
|
+
typeofCommit?: TypeOfCommit;
|
|
820
|
+
mergeUpdateCommits?: boolean;
|
|
821
|
+
askToConfirmPush?: boolean;
|
|
822
|
+
askToConfirmCommit?: boolean;
|
|
823
|
+
skipLint?: boolean;
|
|
824
|
+
askToConfirmBranchChange?: boolean;
|
|
825
|
+
origin?: string;
|
|
826
|
+
args?: string[];
|
|
827
|
+
setOrigin?: 'ssh' | 'http';
|
|
828
|
+
exitCallBack?: () => void;
|
|
829
|
+
forcePushNoQuestion?: boolean;
|
|
830
|
+
overrideCommitMessage?: string;
|
|
831
|
+
commitMessageRequired?: boolean;
|
|
832
|
+
/**
|
|
833
|
+
* only needed when push github
|
|
834
|
+
* and I forgot to add my username before issue
|
|
835
|
+
* taon pfix proper input my-repo#344
|
|
836
|
+
* that should be
|
|
837
|
+
* taon pfix proper input my-username/my-repo#344
|
|
838
|
+
*/
|
|
839
|
+
currentOrigin?: string;
|
|
840
|
+
skipChildren?: boolean;
|
|
841
|
+
noExit?: boolean;
|
|
842
|
+
}
|
|
843
|
+
declare class CommandConfig {
|
|
844
|
+
static from(config: CommandConfig): CommandConfig;
|
|
845
|
+
private constructor();
|
|
846
|
+
name: string;
|
|
847
|
+
cmd: string;
|
|
848
|
+
headerMessageWhenActive?: string;
|
|
849
|
+
/**
|
|
850
|
+
* If true, the output will be stored in a buffer and displayed when requested.
|
|
851
|
+
* Default: true
|
|
852
|
+
*/
|
|
853
|
+
useDataBuffer?: boolean;
|
|
854
|
+
/**
|
|
855
|
+
* Process that should be started
|
|
856
|
+
* before this process starts.
|
|
857
|
+
*/
|
|
858
|
+
shouldBeActiveOrAlreadyBuild?: CommandConfig[];
|
|
859
|
+
goToNextCommandWhenOutput?: string | {
|
|
860
|
+
stdoutContains?: string | string[];
|
|
861
|
+
stderrContains?: string | string[];
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
interface ProcessManagerConfig<PROJECT> {
|
|
865
|
+
title: string;
|
|
866
|
+
header?: string;
|
|
867
|
+
commands: CommandConfig[];
|
|
868
|
+
/**
|
|
869
|
+
* Default: false
|
|
870
|
+
* If false - after first selection of processes, it will be not possible
|
|
871
|
+
* to add new processes to build and build will be done after
|
|
872
|
+
* all processes are done.
|
|
873
|
+
*/
|
|
874
|
+
watch?: boolean;
|
|
875
|
+
}
|
|
876
|
+
declare enum CommandProcessState {
|
|
877
|
+
NOT_STARTED = "not-started",
|
|
878
|
+
WAITING_TO_START = "waiting-to-start",
|
|
879
|
+
RUNNING = "running",
|
|
880
|
+
FINISHED_AND_RUNNING = "finished-and-running",// only for watch mode
|
|
881
|
+
FINISHED = "finished"
|
|
882
|
+
}
|
|
883
|
+
interface CommandProcessRunOptions {
|
|
884
|
+
progress?: (n: number, total: number) => void;
|
|
885
|
+
resolveNextProcess?: (currentProcess: CommandProcess) => Promise<CommandProcess>;
|
|
886
|
+
resolveWhenFinish?: boolean;
|
|
887
|
+
}
|
|
888
|
+
declare class CommandProcess {
|
|
889
|
+
private project;
|
|
890
|
+
private config;
|
|
891
|
+
private manager;
|
|
892
|
+
private state;
|
|
893
|
+
readonly child_process?: ChildProcess$1;
|
|
894
|
+
protected get cmd(): string;
|
|
895
|
+
get name(): string;
|
|
896
|
+
get headerMessageWhenActive(): string | undefined;
|
|
897
|
+
get pid(): number | undefined;
|
|
898
|
+
get isFinished(): boolean;
|
|
899
|
+
get isRunning(): boolean;
|
|
900
|
+
get isWaitingToStart(): boolean;
|
|
901
|
+
markForStart(): void;
|
|
902
|
+
dependenciesProcesses: CommandProcess[];
|
|
903
|
+
constructor(project: BaseProject, config: CommandConfig, manager: BaseProcessManger);
|
|
904
|
+
start(options?: CommandProcessRunOptions): Promise<void>;
|
|
905
|
+
stop(): Promise<void>;
|
|
906
|
+
}
|
|
907
|
+
interface DockerComposeFile {
|
|
908
|
+
version: string;
|
|
909
|
+
services: Record<string, DockerService>;
|
|
910
|
+
networks?: Record<string, DockerNetwork>;
|
|
911
|
+
volumes?: Record<string, DockerVolume>;
|
|
912
|
+
}
|
|
913
|
+
interface DockerService {
|
|
914
|
+
build?: string | DockerBuild;
|
|
915
|
+
image?: string;
|
|
916
|
+
container_name?: string;
|
|
917
|
+
ports?: string[];
|
|
918
|
+
environment?: Record<string, string> | string[];
|
|
919
|
+
volumes?: string[];
|
|
920
|
+
depends_on?: string[];
|
|
921
|
+
command?: string | string[];
|
|
922
|
+
networks?: string[] | Record<string, unknown>;
|
|
923
|
+
restart?: string;
|
|
924
|
+
entrypoint?: string | string[];
|
|
925
|
+
working_dir?: string;
|
|
926
|
+
labels?: Record<string, string>;
|
|
927
|
+
env_file?: string | string[];
|
|
928
|
+
args?: Record<string, string> | string[];
|
|
929
|
+
}
|
|
930
|
+
interface DockerBuild {
|
|
931
|
+
context: string;
|
|
932
|
+
dockerfile?: string;
|
|
933
|
+
args?: Record<string, string>;
|
|
934
|
+
target?: string;
|
|
935
|
+
}
|
|
936
|
+
interface DockerNetwork {
|
|
937
|
+
driver?: string;
|
|
938
|
+
external?: boolean;
|
|
939
|
+
name?: string;
|
|
940
|
+
}
|
|
941
|
+
interface DockerVolume {
|
|
942
|
+
driver?: string;
|
|
943
|
+
external?: boolean;
|
|
944
|
+
name?: string;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
declare class BaseDocker<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
948
|
+
/**
|
|
949
|
+
* Updates ports in .env file based on available ports range.
|
|
950
|
+
*/
|
|
951
|
+
updateDockerComposePorts(): Promise<void>;
|
|
952
|
+
getDockerComposeActionChildProcess(action: UtilsDocker.DockerComposeActionType, options?: UtilsDocker.DockerComposeActionOptions): ChildProcess$1;
|
|
953
|
+
removeAllImagesBy_Env_COMPOSE_PROJECT_NAME(): Promise<void>;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
declare class BaseFileFoldersOperations<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
957
|
+
/**
|
|
958
|
+
* Relative to project root
|
|
959
|
+
* @returns list of files and folders to copy when copying project
|
|
960
|
+
*/
|
|
961
|
+
protected fielsAndFoldersToCopy(): string[];
|
|
962
|
+
moveProjectTo(destination: string): Promise<void>;
|
|
963
|
+
deleteProject(options?: {
|
|
964
|
+
skipChildren?: boolean;
|
|
965
|
+
}): void;
|
|
966
|
+
copyProjectTo(destination: string, options?: {
|
|
967
|
+
skipChildren?: boolean;
|
|
968
|
+
}): Promise<void>;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
declare class BaseGit<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
972
|
+
unstageAllFiles(): void;
|
|
973
|
+
revertFileChanges(fileReletivePath: string): void;
|
|
974
|
+
clone(url: string, destinationFolderName?: string, branchName?: string): Promise<string>;
|
|
975
|
+
restoreLastVersion(relativeFilePath: string): void;
|
|
976
|
+
stageAllFiles(): void;
|
|
977
|
+
stageFile(relativeFilePath: string): void;
|
|
978
|
+
stash(options?: {
|
|
979
|
+
onlyStaged?: boolean;
|
|
980
|
+
}): void;
|
|
981
|
+
rebase(toBranch: string): void;
|
|
982
|
+
stashApply(): void;
|
|
983
|
+
fetch(all?: boolean): void;
|
|
984
|
+
resetFiles(...relativePathes: string[]): void;
|
|
985
|
+
get isInsideGitRepo(): boolean;
|
|
986
|
+
get isWithoutGitRepository(): boolean;
|
|
987
|
+
get isGitRoot(): boolean;
|
|
988
|
+
get originURL(): string;
|
|
989
|
+
commit(commitMessage?: string): void;
|
|
990
|
+
/**
|
|
991
|
+
* alias to stage all and commit
|
|
992
|
+
*/
|
|
993
|
+
addAndCommit(commitMessage: string): void;
|
|
994
|
+
/**
|
|
995
|
+
* general default development branch for all kinds of projects
|
|
996
|
+
*/
|
|
997
|
+
getDefaultDevelopmentBranch(): string;
|
|
998
|
+
isUsingActionCommit(): boolean;
|
|
999
|
+
jiraIssuesAreOutsideBrackets(): boolean;
|
|
1000
|
+
getUserInfo(global?: boolean): Promise<{
|
|
1001
|
+
name?: string;
|
|
1002
|
+
email?: string;
|
|
1003
|
+
}>;
|
|
1004
|
+
setUserInfo({ name, email }: {
|
|
1005
|
+
name?: string;
|
|
1006
|
+
email?: string;
|
|
1007
|
+
}, global?: boolean): Promise<void>;
|
|
1008
|
+
stageAllAndCommit(commitMessage: string): void;
|
|
1009
|
+
pushCurrentBranch(options?: {
|
|
1010
|
+
force?: boolean;
|
|
1011
|
+
origin?: string;
|
|
1012
|
+
askToRetry?: boolean;
|
|
1013
|
+
forcePushNoQuestion?: boolean;
|
|
1014
|
+
}): Promise<boolean>;
|
|
1015
|
+
get allOrigins(): {
|
|
1016
|
+
origin: string;
|
|
1017
|
+
url: string;
|
|
1018
|
+
}[];
|
|
1019
|
+
get uncommitedFiles(): string[];
|
|
1020
|
+
get thereAreSomeUncommitedChange(): boolean;
|
|
1021
|
+
thereAreSomeUncommitedChangeExcept(filesList?: string[]): boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Resolve last changes
|
|
1024
|
+
* - uncommited changes
|
|
1025
|
+
* - action commits to melt
|
|
1026
|
+
*/
|
|
1027
|
+
resolveLastChanges(options?: {
|
|
1028
|
+
tryAutomaticActionFirst?: boolean;
|
|
1029
|
+
projectNameAsOutputPrefix?: string;
|
|
1030
|
+
questionPrefixMessage?: string;
|
|
1031
|
+
}): Promise<void>;
|
|
1032
|
+
get hasActionCommitsToMelt(): boolean;
|
|
1033
|
+
/**
|
|
1034
|
+
* @returns number of melted commits
|
|
1035
|
+
*/
|
|
1036
|
+
meltActionCommits(): number;
|
|
1037
|
+
/**
|
|
1038
|
+
*
|
|
1039
|
+
* @param newVersion
|
|
1040
|
+
* @param pushWithoutAsking
|
|
1041
|
+
*/
|
|
1042
|
+
tagAndPushToGitRepo(newVersion: string, autoReleaseUsingConfig: boolean, isCiProcess: boolean): Promise<void>;
|
|
1043
|
+
pullCurrentBranch(options?: {
|
|
1044
|
+
askToRetry?: boolean;
|
|
1045
|
+
/**
|
|
1046
|
+
* default true, when false it will throw error instead process.exit(0)
|
|
1047
|
+
*/
|
|
1048
|
+
exitOnError?: boolean;
|
|
1049
|
+
defaultHardResetCommits?: number;
|
|
1050
|
+
}): Promise<void>;
|
|
1051
|
+
get currentBranchName(): string;
|
|
1052
|
+
get listOfCurrentGitChanges(): {
|
|
1053
|
+
modified: string[];
|
|
1054
|
+
deleted: string[];
|
|
1055
|
+
created: string[];
|
|
1056
|
+
};
|
|
1057
|
+
getBranchesNamesBy(pattern: string | RegExp): string[];
|
|
1058
|
+
resetSoftHEAD(HEAD?: number): void;
|
|
1059
|
+
resetHard(options?: {
|
|
1060
|
+
HEAD?: number;
|
|
1061
|
+
}): void;
|
|
1062
|
+
countCommits(): number;
|
|
1063
|
+
hasAnyCommits(): any;
|
|
1064
|
+
get isInMergeProcess(): any;
|
|
1065
|
+
lastCommitDate(): any;
|
|
1066
|
+
lastCommitHash(): any;
|
|
1067
|
+
lastCommitMessage(): string;
|
|
1068
|
+
penultimateCommitMessage(): Promise<string>;
|
|
1069
|
+
getCommitMessageByIndex(index: number): Promise<string>;
|
|
1070
|
+
getCommitMessageByHash(hash: string): Promise<string>;
|
|
1071
|
+
getCommitHashByIndex(index: number): Promise<string>;
|
|
1072
|
+
penultimateCommitHash(): string;
|
|
1073
|
+
checkTagExists(tag: string): boolean;
|
|
1074
|
+
checkout(branchName: string, options?: {
|
|
1075
|
+
createBranchIfNotExists?: boolean;
|
|
1076
|
+
fetchBeforeCheckout?: boolean;
|
|
1077
|
+
switchBranchWhenExists?: boolean;
|
|
1078
|
+
}): void;
|
|
1079
|
+
allowedGitEmailDomains(): string[];
|
|
1080
|
+
cleanRepoFromAnyFilesExceptDotGitFolder(): void;
|
|
1081
|
+
checkoutFromTo(checkoutFromBranch: string, branch: string, origin?: string): void;
|
|
1082
|
+
/**
|
|
1083
|
+
*
|
|
1084
|
+
* @param majorVersion example: v1, v2 etc.
|
|
1085
|
+
* @returns tag name
|
|
1086
|
+
*/
|
|
1087
|
+
lastTagNameForMajorVersion(majorVersion: any): string;
|
|
1088
|
+
lastTagHash(): string;
|
|
1089
|
+
get remoteOriginUrl(): string;
|
|
1090
|
+
/**
|
|
1091
|
+
* get provider of remote origin
|
|
1092
|
+
*/
|
|
1093
|
+
get remoteProvider(): string;
|
|
1094
|
+
get lastTagVersionName(): string;
|
|
1095
|
+
get stagedFiles(): string[];
|
|
1096
|
+
get stagedFilesRelativePaths(): string[];
|
|
1097
|
+
/**
|
|
1098
|
+
* TODO does this make any sense
|
|
1099
|
+
*/
|
|
1100
|
+
renameOrigin(newNameOrUlr: string): void;
|
|
1101
|
+
/**
|
|
1102
|
+
* By default no translation of commit
|
|
1103
|
+
*/
|
|
1104
|
+
transalteGitCommitFromArgs(): {
|
|
1105
|
+
from: string;
|
|
1106
|
+
to: string;
|
|
1107
|
+
};
|
|
1108
|
+
/**
|
|
1109
|
+
* By defult true.. when commit branches will not function.
|
|
1110
|
+
* (false is better for simple projects)
|
|
1111
|
+
*/
|
|
1112
|
+
useGitBranchesWhenCommitingAndPushing(): boolean;
|
|
1113
|
+
/**
|
|
1114
|
+
* usefull when pushing in project with childrens as git repos
|
|
1115
|
+
*/
|
|
1116
|
+
automaticallyAddAllChangesWhenPushingToGit(): boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* usefull when pushing in project with childrens as git repos
|
|
1119
|
+
*/
|
|
1120
|
+
useGitBranchesAsMetadataForCommits(): boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* @returns true if clone was successful
|
|
1123
|
+
*/
|
|
1124
|
+
cloneTo(cwd: string, newProjectName?: string): Promise<boolean>;
|
|
1125
|
+
/**
|
|
1126
|
+
* This is only for push/pull process
|
|
1127
|
+
*
|
|
1128
|
+
* There are 2 types of projects:
|
|
1129
|
+
* - with linked-projects.json
|
|
1130
|
+
* - with children from external folder
|
|
1131
|
+
*
|
|
1132
|
+
* projects that are children of this project (with its own git repo)
|
|
1133
|
+
*/
|
|
1134
|
+
get gitChildren(): PROJECT[];
|
|
1135
|
+
protected setRemoteOriginType(setOrigin: 'ssh' | 'http'): Promise<void>;
|
|
1136
|
+
pullProcess(options?: {
|
|
1137
|
+
skipCloneGitChildren?: boolean;
|
|
1138
|
+
setOrigin?: 'ssh' | 'http';
|
|
1139
|
+
}): Promise<void>;
|
|
1140
|
+
validateEmailDomain(allowedEmailsEnds: string[]): Promise<void>;
|
|
1141
|
+
protected _afterPullProcessAction(setOrigin: 'ssh' | 'http', skipCloneGitChildren?: boolean): Promise<void>;
|
|
1142
|
+
backupBranch(branchName?: string): Promise<string>;
|
|
1143
|
+
pushProcess(options?: PushProcessOptions): Promise<void>;
|
|
1144
|
+
_beforeAnyActionOnGitRoot(): void;
|
|
1145
|
+
protected _beforePushProcessAction(setOrigin: 'ssh' | 'http'): Promise<void>;
|
|
1146
|
+
protected _beforePullProcessAction(setOrigin: 'ssh' | 'http', skipCloneGitChildren?: boolean): Promise<void>;
|
|
1147
|
+
protected _getCommitMessage(typeOfCommit: TypeOfCommit, args: string[], commitMessageRequired?: boolean,
|
|
1148
|
+
/**
|
|
1149
|
+
* only needed when push github
|
|
1150
|
+
* and I forgot to add my username before issue
|
|
1151
|
+
* taon pfix proper input my-repo#344
|
|
1152
|
+
* that should be
|
|
1153
|
+
* taon pfix proper input my-username/my-repo#344
|
|
1154
|
+
*/
|
|
1155
|
+
currentOrigin?: string): Promise<CommitData>;
|
|
1156
|
+
/**
|
|
1157
|
+
* This will prevent accidental branch change for taon projects
|
|
1158
|
+
* @returns branch name
|
|
1159
|
+
*/
|
|
1160
|
+
duringPushWarnIfProjectNotOnSpecyficDevBranch(): string;
|
|
1161
|
+
getChangedFilesInCommitByHash(hash: string): Promise<string[]>;
|
|
1162
|
+
/**
|
|
1163
|
+
* @param index 0 - means last commit
|
|
1164
|
+
*/
|
|
1165
|
+
getChangedFilesInCommitByIndex(index: number): Promise<string[]>;
|
|
1166
|
+
changesSummary(options?: {
|
|
1167
|
+
prefix?: string;
|
|
1168
|
+
}): Promise<string>;
|
|
1169
|
+
/**
|
|
1170
|
+
* If true command navi reset will reset project
|
|
1171
|
+
* and its children.
|
|
1172
|
+
*
|
|
1173
|
+
* If false command navi reset will reset only project.
|
|
1174
|
+
*/
|
|
1175
|
+
resetIsRestingAlsoChildren(): boolean;
|
|
1176
|
+
useBranchNameDirectlyAsCommitMessage(): boolean;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Git Ignore
|
|
1181
|
+
* Vscode Files Hide
|
|
1182
|
+
* Npm Ignore
|
|
1183
|
+
*/
|
|
1184
|
+
declare class BaseIgnoreHideHelpers<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
1185
|
+
/**
|
|
1186
|
+
* (@default: false)
|
|
1187
|
+
*
|
|
1188
|
+
* If true, the files/folders/patterns that aren't really code and can
|
|
1189
|
+
* be recreated from template project like (tsconfig.json, .babelrc, .prettierc etc.)
|
|
1190
|
+
* will are stored in the repo
|
|
1191
|
+
*/
|
|
1192
|
+
protected storeInRepoConfigFiles(): boolean;
|
|
1193
|
+
init(): Promise<void>;
|
|
1194
|
+
/**
|
|
1195
|
+
* @param data list of patterns
|
|
1196
|
+
* @returns list of patterns for recrusive ignore
|
|
1197
|
+
*/
|
|
1198
|
+
private recursivePatternTransformFn;
|
|
1199
|
+
/**
|
|
1200
|
+
* Have to start with /
|
|
1201
|
+
*
|
|
1202
|
+
* Usefull if you are generating some files and folder in src/*.* folder
|
|
1203
|
+
* (Taon CLI does this for automatic host generation)
|
|
1204
|
+
* @returns patterns that are ignored in repo but visible to user
|
|
1205
|
+
*/
|
|
1206
|
+
protected getPatternsIgnoredInRepoButVisibleToUser(): string[];
|
|
1207
|
+
protected alwaysIgnoredHiddenPatterns(): string[];
|
|
1208
|
+
alwaysUseRecursivePattern(): string[];
|
|
1209
|
+
protected alwaysIgnoredAndHiddenFilesAndFolders(): string[];
|
|
1210
|
+
protected hiddenButNeverIgnoredInRepo(): string[];
|
|
1211
|
+
protected hiddenButNotNecessaryIgnoredInRepoFilesAndFolders(): string[];
|
|
1212
|
+
protected hiddenButNotNecessaryIgnoredInRepoPatterns(): string[];
|
|
1213
|
+
protected npmIgnoreFilesFoldersPatterns(): string[];
|
|
1214
|
+
writeGitIgnore(): void;
|
|
1215
|
+
/**
|
|
1216
|
+
* Use can apply this to .vscode/settings.json [files.exclude] property
|
|
1217
|
+
*/
|
|
1218
|
+
getVscodeFilesFoldersAndPatternsToHide(): {
|
|
1219
|
+
[fileFolderOrPattern: string]: true;
|
|
1220
|
+
};
|
|
1221
|
+
writeNpmIgnore(): void;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
declare class BaseJavaJdk<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
1225
|
+
selectJdkVersion(): Promise<string | undefined>;
|
|
1226
|
+
updateJavaHomePath(selectedPath: string): void;
|
|
1227
|
+
selectTomcatVersion(): Promise<string>;
|
|
1228
|
+
updateTomcatHomePath(selectedPath: string): void;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Base library build for standard angular/typescript projects
|
|
1233
|
+
*/
|
|
1234
|
+
declare abstract class BaseLibraryBuild<PROJECT extends BaseProject<BaseProject, any>> extends BaseFeatureForProject<PROJECT> {
|
|
1235
|
+
private cache;
|
|
1236
|
+
protected readonly tempOrgTsConfigFile: string;
|
|
1237
|
+
protected sortByDeps(libraries: PROJECT[]): PROJECT[];
|
|
1238
|
+
/**
|
|
1239
|
+
* Use cases:
|
|
1240
|
+
* 1. build all libraries in normal mode
|
|
1241
|
+
* 2. build all libraries in watch mode
|
|
1242
|
+
* 3. build selected libraries in normal mode
|
|
1243
|
+
* (with first time all libraries will be build)
|
|
1244
|
+
* 4. build selected libraries in watch mode
|
|
1245
|
+
* (use normal build for not selected libraries)
|
|
1246
|
+
* 5. build selected libraries in watch mode
|
|
1247
|
+
* (skip normal build for not selected libraries)
|
|
1248
|
+
*/
|
|
1249
|
+
selectAndSaveLibraries({ selectedLibs, watch, watchBuildSupported, skipAllLibsQuestion, useLastUserConfiguration, }: {
|
|
1250
|
+
selectedLibs: PROJECT[];
|
|
1251
|
+
watch: boolean;
|
|
1252
|
+
watchBuildSupported?: boolean;
|
|
1253
|
+
skipAllLibsQuestion?: boolean;
|
|
1254
|
+
useLastUserConfiguration?: boolean;
|
|
1255
|
+
}): Promise<{
|
|
1256
|
+
selectedLibs: PROJECT[];
|
|
1257
|
+
skipRebuildingAllForWatch: boolean;
|
|
1258
|
+
}>;
|
|
1259
|
+
/**
|
|
1260
|
+
* angular libraries from angular.json
|
|
1261
|
+
*/
|
|
1262
|
+
get libraries(): PROJECT[];
|
|
1263
|
+
protected getLibraries(): any;
|
|
1264
|
+
/**
|
|
1265
|
+
* Angular library build
|
|
1266
|
+
*/
|
|
1267
|
+
buildLibraries({ watch, strategy, releaseBuild, copylink_to_node_modules, outputLineReplace, libraries, useLastUserConfiguration, }?: LibrariesBuildOptions<PROJECT> & {
|
|
1268
|
+
watch?: boolean;
|
|
1269
|
+
}): Promise<void>;
|
|
1270
|
+
protected libWatchBuildProcess({ lib, locationsForNodeModules, strategy, outputLineReplace, }: {
|
|
1271
|
+
lib: PROJECT;
|
|
1272
|
+
locationsForNodeModules: string[];
|
|
1273
|
+
strategy: 'link' | 'copy';
|
|
1274
|
+
outputLineReplace?: (outputLine: string) => string;
|
|
1275
|
+
}): Promise<any>;
|
|
1276
|
+
protected libNormalBuildProcess({ lib, locationsForNodeModules, strategy, outputLineReplace, }: {
|
|
1277
|
+
lib: PROJECT;
|
|
1278
|
+
locationsForNodeModules: string[];
|
|
1279
|
+
strategy: 'link' | 'copy';
|
|
1280
|
+
outputLineReplace?: (outputLine: string) => string;
|
|
1281
|
+
}): Promise<any>;
|
|
1282
|
+
getLibraryBuildCommand(options?: LibraryBuildCommandOptions): string | undefined;
|
|
1283
|
+
get getLibraryBuildSuccessComamnds(): string[];
|
|
1284
|
+
selectCopytoProjects(): Promise<string[]>;
|
|
1285
|
+
private changeTsConfigForLibrariesTypes;
|
|
1286
|
+
protected replaceTsConfigsPathes(): Promise<any>;
|
|
1287
|
+
private restoreOriginalTsConfig;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
declare class BaseLinkedProjects<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
1291
|
+
private cache;
|
|
1292
|
+
get embeddedProject(): PROJECT;
|
|
1293
|
+
get projectsDbLocation(): any;
|
|
1294
|
+
saveLocationToDB(): Promise<any>;
|
|
1295
|
+
saveAllLinkedProjectsToDB(): Promise<void>;
|
|
1296
|
+
addLinkedProject(linkedProj: LinkedProject | string, options?: {
|
|
1297
|
+
skipFormat?: boolean;
|
|
1298
|
+
}): any;
|
|
1299
|
+
addLinkedProjects(linkedProjs: LinkedProject[], options?: {
|
|
1300
|
+
skipFormat?: boolean;
|
|
1301
|
+
}): any;
|
|
1302
|
+
setLinkedProjectsConfig(linkedPorjectsConfig: Partial<LinkedPorjectsConfig>, options?: {
|
|
1303
|
+
skipFormat?: boolean;
|
|
1304
|
+
}): any;
|
|
1305
|
+
formatConfigFile(): any;
|
|
1306
|
+
private get linkedProjectsConfigPath();
|
|
1307
|
+
private get linkedProjectsConfigTempPath();
|
|
1308
|
+
protected recreateLinkedProjectsConfig(): any;
|
|
1309
|
+
getLinkedProjectsConfig(): LinkedPorjectsConfig;
|
|
1310
|
+
get linkedProjects(): LinkedProject[];
|
|
1311
|
+
get detectedLinkedProjects(): LinkedProject[];
|
|
1312
|
+
get linkedProjectsPrefix(): string;
|
|
1313
|
+
resetLinkedProjectsOnlyToCoreBranches(): boolean;
|
|
1314
|
+
cloneNonexistedLinkedProjects(setOrigin: 'ssh' | 'http'): Promise<any>;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
declare class BaseLinter<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
1318
|
+
init(): Promise<void>;
|
|
1319
|
+
getLintFiles(): string[];
|
|
1320
|
+
getConfigEditorconfig(): string;
|
|
1321
|
+
getConfigPrettierrc(): object;
|
|
1322
|
+
getConfigPrettierignore(): string;
|
|
1323
|
+
isEnableForProject(): boolean;
|
|
1324
|
+
writeLintFiles(): void;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
interface BaseJsonFileReaderOptions<DATA> {
|
|
1328
|
+
/**
|
|
1329
|
+
* cwd for <my-json>.json
|
|
1330
|
+
* <cwd>/<my-json>
|
|
1331
|
+
* (you can also provide full path - basename will be cut)
|
|
1332
|
+
*/
|
|
1333
|
+
cwd?: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* file name
|
|
1336
|
+
* example: package.json, taon.json etc.
|
|
1337
|
+
*/
|
|
1338
|
+
fileName?: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* json content to read from memory
|
|
1341
|
+
*/
|
|
1342
|
+
jsonContent?: Partial<DATA>;
|
|
1343
|
+
/**
|
|
1344
|
+
* callback for external reload
|
|
1345
|
+
*/
|
|
1346
|
+
reloadInMemoryCallback?: (data: DATA) => void;
|
|
1347
|
+
/**
|
|
1348
|
+
* use json with comments reader to read json file
|
|
1349
|
+
*/
|
|
1350
|
+
readJsonAsJsonWithComments?: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* default value for data
|
|
1353
|
+
* if file not exist
|
|
1354
|
+
* (ONLY FOR cwd + fileName mode)
|
|
1355
|
+
*/
|
|
1356
|
+
defaultValue?: Partial<DATA>;
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Base class for reading json files
|
|
1360
|
+
* There are 2 modes of reading json files:
|
|
1361
|
+
* - cwd + fileName (read and write to disk in cwd)
|
|
1362
|
+
* - jsonContent (read and write to memory and use
|
|
1363
|
+
* reloadInMemoryCallback for external reload)
|
|
1364
|
+
*/
|
|
1365
|
+
declare class BaseJsonFileReader<DATA> {
|
|
1366
|
+
/**
|
|
1367
|
+
* null when package.json not exist
|
|
1368
|
+
*/
|
|
1369
|
+
protected data: DATA | null;
|
|
1370
|
+
/**
|
|
1371
|
+
* use json with comments reader to read package.json
|
|
1372
|
+
*/
|
|
1373
|
+
protected readonly readJsonAsJsonWithComments: boolean;
|
|
1374
|
+
readonly cwd: string;
|
|
1375
|
+
protected readonly fileName: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* @deprecated
|
|
1378
|
+
* use only when cwd and fileName are not provided
|
|
1379
|
+
*/
|
|
1380
|
+
protected readonly jsonContent?: Partial<DATA>;
|
|
1381
|
+
protected readonly defaultValue?: Partial<DATA>;
|
|
1382
|
+
protected readonly reloadInMemoryCallback?: (data: DATA) => void;
|
|
1383
|
+
constructor(options: BaseJsonFileReaderOptions<DATA>);
|
|
1384
|
+
/**
|
|
1385
|
+
* cwd + fileName
|
|
1386
|
+
*/
|
|
1387
|
+
get path(): string;
|
|
1388
|
+
/**
|
|
1389
|
+
* if something else change package.json in this project
|
|
1390
|
+
* and you know that you need to reload it..
|
|
1391
|
+
*/
|
|
1392
|
+
reloadPackageJsonInMemory(): void;
|
|
1393
|
+
saveToDisk(purpose?: string): any;
|
|
1394
|
+
linkTo(destination: string): void;
|
|
1395
|
+
getAllData(): DATA;
|
|
1396
|
+
setAllData(data: DATA): void;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Minimal interface describing a bower.json file according to:
|
|
1401
|
+
* https://github.com/bower/spec/blob/master/json.md
|
|
1402
|
+
*/
|
|
1403
|
+
interface BowerJson {
|
|
1404
|
+
name: string;
|
|
1405
|
+
version?: string;
|
|
1406
|
+
description?: string;
|
|
1407
|
+
main?: string | string[];
|
|
1408
|
+
keywords?: string[];
|
|
1409
|
+
authors?: Array<string | {
|
|
1410
|
+
name: string;
|
|
1411
|
+
email?: string;
|
|
1412
|
+
homepage?: string;
|
|
1413
|
+
}>;
|
|
1414
|
+
license?: string;
|
|
1415
|
+
homepage?: string;
|
|
1416
|
+
private?: boolean;
|
|
1417
|
+
repository?: {
|
|
1418
|
+
type: string;
|
|
1419
|
+
url: string;
|
|
1420
|
+
};
|
|
1421
|
+
ignore?: string[];
|
|
1422
|
+
dependencies?: Record<string, string>;
|
|
1423
|
+
devDependencies?: Record<string, string>;
|
|
1424
|
+
resolutions?: Record<string, string>;
|
|
1425
|
+
moduleType?: string | string[];
|
|
1426
|
+
}
|
|
1427
|
+
declare class BaseBowerJson extends BaseJsonFileReader<BowerJson> {
|
|
1428
|
+
cwd: string;
|
|
1429
|
+
constructor(cwd: string);
|
|
1430
|
+
get dependencies(): Record<string, string>;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
type DedupePackage = string | {
|
|
1434
|
+
package: string;
|
|
1435
|
+
excludeFrom?: string[];
|
|
1436
|
+
includeOnlyIn?: string[];
|
|
1437
|
+
};
|
|
1438
|
+
declare class BaseNodeModules<NPM_HELPERS extends BaseNpmHelpers = BaseNpmHelpers> {
|
|
1439
|
+
/**
|
|
1440
|
+
* my-path/node_modules
|
|
1441
|
+
*/
|
|
1442
|
+
protected cwd: string;
|
|
1443
|
+
protected npmHelpers: NPM_HELPERS;
|
|
1444
|
+
protected _npmHelpersType: NPM_HELPERS;
|
|
1445
|
+
constructor(
|
|
1446
|
+
/**
|
|
1447
|
+
* my-path/node_modules
|
|
1448
|
+
*/
|
|
1449
|
+
cwd: string, npmHelpers: NPM_HELPERS);
|
|
1450
|
+
/**
|
|
1451
|
+
* cwd + node_modules
|
|
1452
|
+
*/
|
|
1453
|
+
get path(): string;
|
|
1454
|
+
/**
|
|
1455
|
+
* Path to package inside node_modules folder
|
|
1456
|
+
* @example <project-path>/node_modules/<package-name>
|
|
1457
|
+
*/
|
|
1458
|
+
pathFor(packageName: string | string[]): string;
|
|
1459
|
+
/**
|
|
1460
|
+
* real path of node_modules
|
|
1461
|
+
* if node_modules is a link
|
|
1462
|
+
* it will return real path.
|
|
1463
|
+
* if node_modules is folder = path
|
|
1464
|
+
*/
|
|
1465
|
+
get realPath(): string;
|
|
1466
|
+
protected preventWrongLinkDestination(dest: string): string;
|
|
1467
|
+
linkToProject(project: Partial<BaseProject>): any;
|
|
1468
|
+
copyToProject(project: BaseProject): void;
|
|
1469
|
+
linkToLocation(location: string): void;
|
|
1470
|
+
makeSureInstalled(options?: Omit<CoreModels.NpmInstallOptions, 'pkg'>): Promise<void>;
|
|
1471
|
+
remove(options?: {
|
|
1472
|
+
skipQuestion?: boolean;
|
|
1473
|
+
}): Promise<void>;
|
|
1474
|
+
removePackage(packageInside: string): void;
|
|
1475
|
+
reinstall(options?: Omit<CoreModels.NpmInstallOptions, 'pkg'>): Promise<any>;
|
|
1476
|
+
get isLink(): boolean;
|
|
1477
|
+
unlinkNodeModulesWhenLinked(): any;
|
|
1478
|
+
get empty(): any;
|
|
1479
|
+
/**
|
|
1480
|
+
* @returns true if node_modules folder is empty
|
|
1481
|
+
* DEEP CHECK - also if node_modules is a link
|
|
1482
|
+
* and is not existent
|
|
1483
|
+
*/
|
|
1484
|
+
isEmpty(): any;
|
|
1485
|
+
/**
|
|
1486
|
+
* Prepare command for npm install
|
|
1487
|
+
* (or yarn install)
|
|
1488
|
+
*/
|
|
1489
|
+
prepareCommand(options: CoreModels.NpmInstallOptions, cwd?: string): Promise<string>;
|
|
1490
|
+
/**
|
|
1491
|
+
*
|
|
1492
|
+
* @param rootDir
|
|
1493
|
+
* @param packageName
|
|
1494
|
+
* @returns absolute paths to package dirs
|
|
1495
|
+
*/
|
|
1496
|
+
private findPackageDirs;
|
|
1497
|
+
dedupePackages(packagesConfig?: DedupePackage[], countOnly?: boolean, fake?: boolean): void;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
type PackageJson = PackageJson$1 & {
|
|
1501
|
+
lastBuildTagHash?: string;
|
|
1502
|
+
publisher?: string;
|
|
1503
|
+
displayName?: string;
|
|
1504
|
+
};
|
|
1505
|
+
type PackageJsonDependencyObj = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'resolutions';
|
|
1506
|
+
declare const PackageJsonDependencyObjArr: PackageJsonDependencyObj[];
|
|
1507
|
+
declare class BasePackageJson extends BaseJsonFileReader<PackageJson> {
|
|
1508
|
+
constructor(options: Omit<BaseJsonFileReaderOptions<PackageJson>, 'fileName'>);
|
|
1509
|
+
/**
|
|
1510
|
+
* 'dependencies'
|
|
1511
|
+
* 'devDependencies'
|
|
1512
|
+
* 'peerDependencies'
|
|
1513
|
+
* 'resolutions';
|
|
1514
|
+
* and whatever is in package.json to npm install
|
|
1515
|
+
*/
|
|
1516
|
+
get dependenciesTypesArray(): PackageJsonDependencyObj[];
|
|
1517
|
+
get name(): string;
|
|
1518
|
+
setName(name: string): Promise<void>;
|
|
1519
|
+
/**
|
|
1520
|
+
* devDependencies dependencies
|
|
1521
|
+
*/
|
|
1522
|
+
get devDependencies(): PackageJson['devDependencies'];
|
|
1523
|
+
/**
|
|
1524
|
+
* resolutions dependencies
|
|
1525
|
+
*/
|
|
1526
|
+
get resolutions(): PackageJson['resolutions'];
|
|
1527
|
+
/**
|
|
1528
|
+
* npm dependencies from package.json
|
|
1529
|
+
*/
|
|
1530
|
+
get dependencies(): PackageJson['dependencies'];
|
|
1531
|
+
get optionalDependencies(): PackageJson['optionalDependencies'];
|
|
1532
|
+
get description(): string;
|
|
1533
|
+
get displayName(): string;
|
|
1534
|
+
get publisher(): string;
|
|
1535
|
+
get contributes(): PackageJson['contributes'];
|
|
1536
|
+
get repository(): PackageJson['repository'];
|
|
1537
|
+
setRepository(repository: PackageJson['repository']): void;
|
|
1538
|
+
/**
|
|
1539
|
+
* set the WHOLE dependencies object
|
|
1540
|
+
* THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE DEPENDENCIES OBJECT
|
|
1541
|
+
*/
|
|
1542
|
+
setDependencies(dependencies: PackageJson['dependencies']): void;
|
|
1543
|
+
/**
|
|
1544
|
+
* set the WHOLE dependencies object
|
|
1545
|
+
* THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE DEPENDENCIES OBJECT
|
|
1546
|
+
*/
|
|
1547
|
+
setDevDependencies(devDependencies: PackageJson['devDependencies']): void;
|
|
1548
|
+
/**
|
|
1549
|
+
* peerDependencies dependencies
|
|
1550
|
+
*/
|
|
1551
|
+
get peerDependencies(): PackageJson['peerDependencies'];
|
|
1552
|
+
/**
|
|
1553
|
+
* set the WHOLE peerDependencies object
|
|
1554
|
+
* THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE PEER DEPENDENCIES OBJECT
|
|
1555
|
+
*/
|
|
1556
|
+
setPeerDependencies(peerDependencies: PackageJson['peerDependencies']): void;
|
|
1557
|
+
setOptionalDependencies(optionalDependencies: PackageJson['optionalDependencies']): void;
|
|
1558
|
+
removeDevDependencies(): void;
|
|
1559
|
+
/**
|
|
1560
|
+
* @returns object witl all deps from current project package json
|
|
1561
|
+
*/
|
|
1562
|
+
get allDependencies(): {
|
|
1563
|
+
[packageName: string]: string;
|
|
1564
|
+
};
|
|
1565
|
+
/**
|
|
1566
|
+
* @returns object witl all deps from package json
|
|
1567
|
+
*/
|
|
1568
|
+
allDepsFromPackageJson(packageJson: PackageJson): any;
|
|
1569
|
+
/**
|
|
1570
|
+
* version from package.json -> property version
|
|
1571
|
+
*/
|
|
1572
|
+
get version(): string;
|
|
1573
|
+
setVersion(version: string): void;
|
|
1574
|
+
/**
|
|
1575
|
+
* bin with cli config from package.json
|
|
1576
|
+
*/
|
|
1577
|
+
get bin(): Partial<Record<string, string>>;
|
|
1578
|
+
set bin(value: Partial<Record<string, string>>);
|
|
1579
|
+
get engines(): PackageJson['engines'];
|
|
1580
|
+
setEngines(engines: PackageJson['engines']): Promise<void>;
|
|
1581
|
+
get homepage(): PackageJson['homepage'];
|
|
1582
|
+
setHomepage(homepage: PackageJson['homepage']): Promise<void>;
|
|
1583
|
+
get versionWithPatchPlusOne(): string;
|
|
1584
|
+
get versionWithMinorPlusOneAndPatchZero(): string;
|
|
1585
|
+
get versionWithMajorPlusOneAndMinorZeroAndPatchZero(): string;
|
|
1586
|
+
get versionPathAsNumber(): number;
|
|
1587
|
+
/**
|
|
1588
|
+
* Major Version from package.json
|
|
1589
|
+
*/
|
|
1590
|
+
get majorVersion(): number;
|
|
1591
|
+
/**
|
|
1592
|
+
* Minor Version from package.json
|
|
1593
|
+
*/
|
|
1594
|
+
get minorVersion(): number;
|
|
1595
|
+
/**
|
|
1596
|
+
* @deprecated TODO not usefull ?
|
|
1597
|
+
*/
|
|
1598
|
+
getVersionAsNumber(releaseType: CoreModels.ReleaseVersionType): number;
|
|
1599
|
+
bumpPatchVersion(): Promise<any>;
|
|
1600
|
+
getBumpedVersionFor(releaseType: CoreModels.ReleaseVersionType): string;
|
|
1601
|
+
updateDepsFrom(locations: string[]): any;
|
|
1602
|
+
/**
|
|
1603
|
+
* this will NOT SET dependency if
|
|
1604
|
+
* dependency name is not in package.json
|
|
1605
|
+
*/
|
|
1606
|
+
updateDependency({ packageName, version, createNewEntryIfNotExist, }: {
|
|
1607
|
+
packageName: string;
|
|
1608
|
+
version: string | null;
|
|
1609
|
+
createNewEntryIfNotExist?: boolean;
|
|
1610
|
+
}): void;
|
|
1611
|
+
get isPrivate(): boolean;
|
|
1612
|
+
setIsPrivate(value: boolean): any;
|
|
1613
|
+
get sideEffects(): boolean;
|
|
1614
|
+
setMainProperty(main: string, purpose?: string): Promise<void>;
|
|
1615
|
+
setBuildHash(hash: string): void;
|
|
1616
|
+
getBuildHash(): string;
|
|
1617
|
+
copyTo(location: string | string[]): void;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
declare class BaseNpmHelpers<PROJECT extends BaseProject = BaseProject> extends BaseFeatureForProject<PROJECT> {
|
|
1621
|
+
readonly packageJson: BasePackageJson;
|
|
1622
|
+
readonly _packageJsonType: typeof BasePackageJson;
|
|
1623
|
+
private readonly _packageJsonTypeOriginal;
|
|
1624
|
+
readonly nodeModules: BaseNodeModules;
|
|
1625
|
+
readonly _nodeModulesType: typeof BaseNodeModules;
|
|
1626
|
+
private readonly __nodeModulesTypeOriginal;
|
|
1627
|
+
readonly bowerJson: BaseBowerJson;
|
|
1628
|
+
constructor(project: PROJECT);
|
|
1629
|
+
preferYarnOverNpm(): boolean;
|
|
1630
|
+
resetPackageLockJson(): Promise<any>;
|
|
1631
|
+
startNpmTask(taskName: string, additionalArguments?: string | object): any;
|
|
1632
|
+
/**
|
|
1633
|
+
*
|
|
1634
|
+
* @param registry without specified registr is checking npm registry
|
|
1635
|
+
* @returns
|
|
1636
|
+
*/
|
|
1637
|
+
isLoggedInToRegistry(registry?: string): Promise<boolean>;
|
|
1638
|
+
/**
|
|
1639
|
+
* Prompt the user to log in to a specific npm registry.
|
|
1640
|
+
* @param {string} [registry] - Optional npm registry URL.
|
|
1641
|
+
* @returns {Promise<void>} - A promise that resolves when the login process completes.
|
|
1642
|
+
*/
|
|
1643
|
+
loginToRegistry(registry?: string): Promise<void>;
|
|
1644
|
+
makeSureLoggedInToNpmRegistry(registry?: string): Promise<void>;
|
|
1645
|
+
shouldReleaseMessage(options: {
|
|
1646
|
+
releaseVersionBumpType: CoreModels.ReleaseVersionType;
|
|
1647
|
+
versionToUse?: string;
|
|
1648
|
+
children?: BaseProject[];
|
|
1649
|
+
whatToRelease: {
|
|
1650
|
+
itself: boolean;
|
|
1651
|
+
children: boolean;
|
|
1652
|
+
};
|
|
1653
|
+
skipQuestionToUser?: boolean;
|
|
1654
|
+
messagePrefix?: string;
|
|
1655
|
+
}): Promise<boolean>;
|
|
1656
|
+
/**
|
|
1657
|
+
* @param registry when not specified, it will use the default npm registry
|
|
1658
|
+
*/
|
|
1659
|
+
publishToNpmRegistry(options?: {
|
|
1660
|
+
registry?: string;
|
|
1661
|
+
}): Promise<void>;
|
|
1662
|
+
getPackageVersionFromNpmRegistry(packageName: string, options?: {
|
|
1663
|
+
registry?: string;
|
|
1664
|
+
}): Promise<string | undefined>;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
declare class BaseDb<DB extends object> {
|
|
1668
|
+
private ins;
|
|
1669
|
+
private dbName;
|
|
1670
|
+
private defaultDb;
|
|
1671
|
+
constructor(ins: BaseProjectResolver, dbName: string, defaultDb: DB);
|
|
1672
|
+
get isUsingDB(): boolean;
|
|
1673
|
+
get projectsDbLocation(): any;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
declare const defaultDb$1: {
|
|
1677
|
+
config: {
|
|
1678
|
+
[key: string]: string | number | boolean | null;
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
declare class ConfigDatabase extends BaseDb<typeof defaultDb$1> {
|
|
1682
|
+
constructor(ins: BaseProjectResolver);
|
|
1683
|
+
private get selectedCodeEditorKey();
|
|
1684
|
+
selectCodeEditor(): Promise<'code' | 'idea' | 'idea64' | string>;
|
|
1685
|
+
getCodeEditor(): Promise<'code' | 'idea' | 'idea64' | string>;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
declare const defaultDb: {
|
|
1689
|
+
projects: {
|
|
1690
|
+
location: string;
|
|
1691
|
+
}[];
|
|
1692
|
+
};
|
|
1693
|
+
declare class ProjectDatabase extends BaseDb<typeof defaultDb> {
|
|
1694
|
+
constructor(ins: BaseProjectResolver);
|
|
1695
|
+
getAllProjectsFromDB(): Promise<any>;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
type PortStatus = 'unassigned' | 'assigned' | 'assigned-not-registered' | 'assigned-taken-by-os';
|
|
1699
|
+
declare const PortStatusArr: PortStatus[];
|
|
1700
|
+
declare class Port extends TaonBaseEntity {
|
|
1701
|
+
static from(opt: Omit<Port, 'version' | '_' | 'clone' | 'titleOnList' | 'relation' | 'relations'>): Port & Omit<Port, "_" | "version" | "clone" | "titleOnList" | "relation" | "relations">;
|
|
1702
|
+
static getTitleForFreePort(port: Number): string;
|
|
1703
|
+
get titleOnList(): string;
|
|
1704
|
+
port: number;
|
|
1705
|
+
serviceId: string;
|
|
1706
|
+
/**
|
|
1707
|
+
* Port status
|
|
1708
|
+
*/
|
|
1709
|
+
status: PortStatus;
|
|
1710
|
+
/**
|
|
1711
|
+
* When port was assigned as registered service
|
|
1712
|
+
*/
|
|
1713
|
+
whenAssignedTimestamp?: Number;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
declare class BaseCliWorkerConfig {
|
|
1717
|
+
static from(opt: Partial<BaseCliWorkerConfig>): BaseCliWorkerConfig;
|
|
1718
|
+
/**
|
|
1719
|
+
* path to file where config is stored
|
|
1720
|
+
*/
|
|
1721
|
+
pathToFile: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* port taken by service
|
|
1724
|
+
*/
|
|
1725
|
+
port: number;
|
|
1726
|
+
/**
|
|
1727
|
+
* unique in whole system id of service
|
|
1728
|
+
*/
|
|
1729
|
+
serviceID: string;
|
|
1730
|
+
/**
|
|
1731
|
+
* pid of service process
|
|
1732
|
+
*/
|
|
1733
|
+
pid: number;
|
|
1734
|
+
/**
|
|
1735
|
+
* timestamp when service was started
|
|
1736
|
+
* (in other cases = null)
|
|
1737
|
+
*/
|
|
1738
|
+
startTimestamp: number;
|
|
1739
|
+
/**
|
|
1740
|
+
* version
|
|
1741
|
+
*/
|
|
1742
|
+
version: string;
|
|
1743
|
+
hasBiggerOrEqualWorkerVersionThan(other: BaseCliWorkerConfig): boolean;
|
|
1744
|
+
isEquals(other: BaseCliWorkerConfig): boolean;
|
|
1745
|
+
get isEmpty(): boolean;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
declare abstract class TaonBaseCliWorkerController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBaseController<UPLOAD_FILE_QUERY_PARAMS> {
|
|
1749
|
+
/**
|
|
1750
|
+
* service id
|
|
1751
|
+
*/
|
|
1752
|
+
private cliWorkerServiceId;
|
|
1753
|
+
private cliWorkerServiceVersion;
|
|
1754
|
+
baseCLiWorkerCommand_initializeMetadata(serviceId: string, serviceVersion: string): Taon.Response<void>;
|
|
1755
|
+
baseCLiWorkerCommand_kill(dontRemoveConfigFile?: boolean): Taon.Response<void>;
|
|
1756
|
+
info(): Taon.ResponseHtml;
|
|
1757
|
+
baseCLiWorkerCommand_isHealthy(checkingProcessConfig: BaseCliWorkerConfig): Taon.Response<boolean>;
|
|
1758
|
+
baseCLiWorkerCommand_hasUpToDateVersion(checkingProcessConfig: BaseCliWorkerConfig): Taon.Response<boolean>;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
type BaseWorkerTerminalActionReturnType = {
|
|
1762
|
+
[uniqeActionName: string]: {
|
|
1763
|
+
name: string;
|
|
1764
|
+
action: () => unknown | Promise<unknown>;
|
|
1765
|
+
};
|
|
1766
|
+
};
|
|
1767
|
+
declare class BaseCliWorkerTerminalUI<WORKER extends BaseCliWorker<TaonBaseCliWorkerController<any>, any>> {
|
|
1768
|
+
protected worker: WORKER;
|
|
1769
|
+
constructor(worker: WORKER);
|
|
1770
|
+
protected headerText(): Promise<string>;
|
|
1771
|
+
protected textHeaderStyle(): CoreModels.CfontStyle;
|
|
1772
|
+
protected headerTextAlign(): CoreModels.CfontAlign;
|
|
1773
|
+
/**
|
|
1774
|
+
* override whole terminal header
|
|
1775
|
+
*/
|
|
1776
|
+
protected header(): Promise<void>;
|
|
1777
|
+
infoMessageBelowHeader(options?: BaseCliWorkerGuiUrlOptions): Promise<void>;
|
|
1778
|
+
protected get backAction(): {
|
|
1779
|
+
back: {
|
|
1780
|
+
name: string;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
protected get chooseAction(): {
|
|
1784
|
+
emptyAction: {
|
|
1785
|
+
name: string;
|
|
1786
|
+
action: () => Promise<void>;
|
|
1787
|
+
};
|
|
1788
|
+
};
|
|
1789
|
+
protected getWorkerTerminalActions(options?: {
|
|
1790
|
+
exitIsOnlyReturn?: boolean;
|
|
1791
|
+
chooseAction?: boolean;
|
|
1792
|
+
}): BaseWorkerTerminalActionReturnType;
|
|
1793
|
+
private headerDisplayed;
|
|
1794
|
+
infoScreen(options?: {
|
|
1795
|
+
exitIsOnlyReturn?: boolean;
|
|
1796
|
+
}): Promise<void>;
|
|
1797
|
+
displaySpecialWorkerReadyMessage(): void;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
interface BaseCliWorkerOptionCallable {
|
|
1801
|
+
/**
|
|
1802
|
+
* Name of the function from which the option was called
|
|
1803
|
+
*/
|
|
1804
|
+
calledFrom: string;
|
|
1805
|
+
}
|
|
1806
|
+
declare class BaseCliWorkerConfigGetContextOptions {
|
|
1807
|
+
/**
|
|
1808
|
+
* default localhost
|
|
1809
|
+
*/
|
|
1810
|
+
ipAddressOfTaonInstance?: string;
|
|
1811
|
+
/**
|
|
1812
|
+
* if null nothing is used as port (ip address will be clean)
|
|
1813
|
+
*/
|
|
1814
|
+
port?: number | null;
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Default mode: DETACHED_CHILD_PROCESS
|
|
1818
|
+
*/
|
|
1819
|
+
declare enum BaseCLiWorkerStartMode {
|
|
1820
|
+
CHILD_PROCESS = "child",
|
|
1821
|
+
IN_CURRENT_PROCESS = "process",
|
|
1822
|
+
DETACHED_WINDOW = "window"
|
|
1823
|
+
}
|
|
1824
|
+
declare class BaseCLiWorkerStartParams {
|
|
1825
|
+
/**
|
|
1826
|
+
* Start mode
|
|
1827
|
+
* Default mode DETACHED_CHILD_PROCESS
|
|
1828
|
+
*/
|
|
1829
|
+
mode: BaseCLiWorkerStartMode;
|
|
1830
|
+
restart?: boolean;
|
|
1831
|
+
kill?: boolean;
|
|
1832
|
+
}
|
|
1833
|
+
declare class BaseCliMethodOptions extends TaonBaseClass<BaseCliMethodOptions> implements BaseCliWorkerOptionCallable {
|
|
1834
|
+
static from(opt?: Partial<BaseCliMethodOptions>): BaseCliMethodOptions;
|
|
1835
|
+
connectionOptions?: BaseCliWorkerConfigGetContextOptions;
|
|
1836
|
+
cliParams?: BaseCLiWorkerStartParams;
|
|
1837
|
+
/**
|
|
1838
|
+
* Name of the function from which the option was called
|
|
1839
|
+
*/
|
|
1840
|
+
calledFrom: string;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
interface BaseCliWorkerGuiUrlOptions {
|
|
1844
|
+
domain?: string;
|
|
1845
|
+
port?: number | null;
|
|
1846
|
+
useHttps?: boolean;
|
|
1847
|
+
}
|
|
1848
|
+
declare abstract class BaseCliWorker<REMOTE_CTRL extends TaonBaseCliWorkerController<any>, TERMINAL_UI extends BaseCliWorkerTerminalUI<any> = any> {
|
|
1849
|
+
/**
|
|
1850
|
+
* unique id for service
|
|
1851
|
+
*/
|
|
1852
|
+
readonly serviceID: string;
|
|
1853
|
+
/**
|
|
1854
|
+
* external command that will start service
|
|
1855
|
+
*/
|
|
1856
|
+
readonly startCommand: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* unique id for service
|
|
1859
|
+
*/
|
|
1860
|
+
readonly serviceVersion: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* Indicates if worker is part of cloud
|
|
1863
|
+
* and should use cloud ip address
|
|
1864
|
+
*/
|
|
1865
|
+
static readonly isCloudEnable: Pick<BehaviorSubject<boolean>, 'next' | 'getValue'>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Cloud ip address of the worker (if part of cloud)
|
|
1868
|
+
*/
|
|
1869
|
+
static readonly cloudIp: Pick<BehaviorSubject<string | null>, 'next' | 'getValue'>;
|
|
1870
|
+
private static workers;
|
|
1871
|
+
readonly SPECIAL_WORKER_READY_MESSAGE = "$$$ WORKER_READY $$$";
|
|
1872
|
+
/**
|
|
1873
|
+
* dependency workers that should be started before this worker
|
|
1874
|
+
*/
|
|
1875
|
+
readonly dependencyWorkers: Map<string, BaseCliWorker<any, any>>;
|
|
1876
|
+
readonly terminalUI: TERMINAL_UI;
|
|
1877
|
+
readonly workerContextTemplate: ReturnType<typeof Taon.createContextTemplate>;
|
|
1878
|
+
/**
|
|
1879
|
+
* Name of the worker context
|
|
1880
|
+
*/
|
|
1881
|
+
get contextName(): string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Port where worker is running
|
|
1884
|
+
* (getter only accessible from host machine)
|
|
1885
|
+
*/
|
|
1886
|
+
get port(): number | undefined;
|
|
1887
|
+
getWorkerInfoGuiUrl(options?: BaseCliWorkerGuiUrlOptions): string;
|
|
1888
|
+
readonly controllerClass: new () => REMOTE_CTRL;
|
|
1889
|
+
constructor(
|
|
1890
|
+
/**
|
|
1891
|
+
* unique id for service
|
|
1892
|
+
*/
|
|
1893
|
+
serviceID: string,
|
|
1894
|
+
/**
|
|
1895
|
+
* external command that will start service
|
|
1896
|
+
*/
|
|
1897
|
+
startCommand: string,
|
|
1898
|
+
/**
|
|
1899
|
+
* unique id for service
|
|
1900
|
+
*/
|
|
1901
|
+
serviceVersion: string);
|
|
1902
|
+
static getAllWorkersStartedInSystemFromCurrentCli(): BaseCliWorker<any, any>[];
|
|
1903
|
+
get processLocalInfoObj(): BaseCliWorkerConfig;
|
|
1904
|
+
getRemoteControllerFor<ctrl = REMOTE_CTRL>(options?: {
|
|
1905
|
+
methodOptions: Partial<BaseCliMethodOptions>;
|
|
1906
|
+
/**
|
|
1907
|
+
* Optionally get other controller from remote context
|
|
1908
|
+
*/
|
|
1909
|
+
controllerClass?: new () => ctrl;
|
|
1910
|
+
}): Promise<ctrl>;
|
|
1911
|
+
/**
|
|
1912
|
+
* stop if started
|
|
1913
|
+
*/
|
|
1914
|
+
kill(options?: {
|
|
1915
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1916
|
+
dontRemoveConfigFile?: boolean;
|
|
1917
|
+
}): Promise<void>;
|
|
1918
|
+
/**
|
|
1919
|
+
* kill detached process and start again
|
|
1920
|
+
* @param options.detached - default true
|
|
1921
|
+
*/
|
|
1922
|
+
restart(options?: {
|
|
1923
|
+
methodOptions?: BaseCliMethodOptions;
|
|
1924
|
+
}): Promise<void>;
|
|
1925
|
+
/**
|
|
1926
|
+
* only for cli start
|
|
1927
|
+
* @param cliParams on from cli
|
|
1928
|
+
*/
|
|
1929
|
+
cliStartProcedure(options: {
|
|
1930
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1931
|
+
}): Promise<{
|
|
1932
|
+
controller: REMOTE_CTRL;
|
|
1933
|
+
worker: BaseCliWorker<any, any>;
|
|
1934
|
+
serviceId: string;
|
|
1935
|
+
}>;
|
|
1936
|
+
protected getRemoteContextFor(options?: {
|
|
1937
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1938
|
+
}): Promise<EndpointContext>;
|
|
1939
|
+
protected get pathToProcessLocalInfoJson(): string;
|
|
1940
|
+
protected get processLocalInfoPortNotInited(): boolean;
|
|
1941
|
+
protected get workerIsStarting(): boolean;
|
|
1942
|
+
protected startDetachedIfNeedsToBeStarted(options?: {
|
|
1943
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1944
|
+
}): Promise<void>;
|
|
1945
|
+
/**
|
|
1946
|
+
* <strong>IMPORTANT USE ONLY IN DEVELOPMENT !!!</strong>
|
|
1947
|
+
* for production use startDetachedIfNeedsToBeStarted()
|
|
1948
|
+
* start normally process
|
|
1949
|
+
* this will crash if process already started
|
|
1950
|
+
*/
|
|
1951
|
+
protected startNormallyInCurrentProcess(options?: {
|
|
1952
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1953
|
+
actionBeforeTerminalUI?: () => Promise<void>;
|
|
1954
|
+
}): Promise<void>;
|
|
1955
|
+
protected preventExternalConfigChange(): void;
|
|
1956
|
+
protected preventStartIfAlreadyStarted(options?: {
|
|
1957
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1958
|
+
}): Promise<void>;
|
|
1959
|
+
protected killWorkerWithLowerVersion(options?: {
|
|
1960
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1961
|
+
}): Promise<void>;
|
|
1962
|
+
/**
|
|
1963
|
+
* This has 2 purposes:
|
|
1964
|
+
* - infinite check when when detached process finished starting
|
|
1965
|
+
* - quick check if service is healthy / already started
|
|
1966
|
+
*/
|
|
1967
|
+
protected isServiceHealthy(options: {
|
|
1968
|
+
healthCheckRequestTrys?: number;
|
|
1969
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1970
|
+
}): Promise<boolean>;
|
|
1971
|
+
/**
|
|
1972
|
+
* start if not started detached process
|
|
1973
|
+
*/
|
|
1974
|
+
protected startDetached(options?: {
|
|
1975
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1976
|
+
}): Promise<void>;
|
|
1977
|
+
private saveProcessInfo;
|
|
1978
|
+
protected initializeWorkerMetadata(options?: {
|
|
1979
|
+
methodOptions?: Partial<BaseCliMethodOptions>;
|
|
1980
|
+
}): Promise<void>;
|
|
1981
|
+
protected waitForProcessPortSavedToDisk(options: {
|
|
1982
|
+
methodOptions: BaseCliMethodOptions;
|
|
1983
|
+
}): Promise<void>;
|
|
1984
|
+
protected getServicePort(): Promise<number>;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* Get taon service database config
|
|
1989
|
+
* (database is stored in user's home directory)
|
|
1990
|
+
* @param serviceNameUniqueInSystem - unique name of the service in the system
|
|
1991
|
+
* @param recreateMode - mode of database recreation, default is 'DROP_DB+MIGRATIONS'
|
|
1992
|
+
* @returns DatabaseConfig object with location and recreateMode
|
|
1993
|
+
*/
|
|
1994
|
+
declare const getBaseCliWorkerDatabaseConfig: (serviceNameUniqueInSystem: string, recreateMode?: Models.DBRecreateMode) => any;
|
|
1995
|
+
|
|
1996
|
+
declare namespace BaseCliWorkerUtils {
|
|
1997
|
+
const getPathToProcessLocalInfoJson: (serviceID: string) => string;
|
|
1998
|
+
const getAllServicesFromOS: () => BaseCliWorkerConfig[];
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
declare class TaonPortsController extends TaonBaseCliWorkerController {
|
|
2002
|
+
START_PORT: number;
|
|
2003
|
+
END_PORT: number;
|
|
2004
|
+
readonly portsCache: Map<string, Port>;
|
|
2005
|
+
protected get firstFreePort(): Port | null | undefined;
|
|
2006
|
+
protected firstUnassignedPortMoreThan(port: number): any;
|
|
2007
|
+
getFirstFreePort(): Taon.Response<Port>;
|
|
2008
|
+
getPortByNumber(portNumber: number): Taon.Response<Port>;
|
|
2009
|
+
getPortsByStatus(status: PortStatus): Taon.Response<Port[]>;
|
|
2010
|
+
/**
|
|
2011
|
+
* make it unassigned
|
|
2012
|
+
*/
|
|
2013
|
+
deletePort(portNumber: number): Taon.Response<Port>;
|
|
2014
|
+
/**
|
|
2015
|
+
* make it unassigned
|
|
2016
|
+
*/
|
|
2017
|
+
updatePortUniqueId(portNumber: number, serviceId: string): Taon.Response<Port>;
|
|
2018
|
+
addTakeByOsPort(portNumber: number, uniqueId: string): Taon.Response<Port>;
|
|
2019
|
+
/**
|
|
2020
|
+
* @param uniqueServiceName unique service name
|
|
2021
|
+
* @param startFrom start searching for free port from this number
|
|
2022
|
+
* @returns
|
|
2023
|
+
*/
|
|
2024
|
+
registerAndAssignPort(uniqueServiceName: string, startFrom?: number): Taon.Response<Port>;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
declare class TcpUdpPortsTerminalUI extends BaseCliWorkerTerminalUI<PortsWorker> {
|
|
2028
|
+
protected headerText(): Promise<string>;
|
|
2029
|
+
protected textHeaderStyle(): CoreModels.CfontStyle;
|
|
2030
|
+
protected crudMenuForTakeByOsPorts(): Promise<void>;
|
|
2031
|
+
protected addPortTerminalUiProcess(): Promise<void>;
|
|
2032
|
+
protected selectPortProcess(ports: Port[], title: string): Promise<Port>;
|
|
2033
|
+
protected deletePortTerminalUiProcess(): Promise<void>;
|
|
2034
|
+
protected editPortTerminalUiProcess(): Promise<void>;
|
|
2035
|
+
getWorkerTerminalActions(options?: {
|
|
2036
|
+
exitIsOnlyReturn?: boolean;
|
|
2037
|
+
}): any;
|
|
2038
|
+
protected displayItemsForPortsStatus(status: PortStatus): Promise<any>;
|
|
2039
|
+
private getNewPortToAdd;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
declare class PortsWorker extends BaseCliWorker<TaonPortsController, TcpUdpPortsTerminalUI> {
|
|
2043
|
+
terminalUI: TcpUdpPortsTerminalUI;
|
|
2044
|
+
workerContextTemplate: any;
|
|
2045
|
+
controllerClass: typeof TaonPortsController;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
declare class BaseProjectResolver<PROJECT extends Partial<BaseProject> = any> {
|
|
2049
|
+
protected readonly classFn: any;
|
|
2050
|
+
readonly cliToolName: string;
|
|
2051
|
+
configDb: ConfigDatabase;
|
|
2052
|
+
projectsDb: ProjectDatabase;
|
|
2053
|
+
readonly portsWorker: PortsWorker;
|
|
2054
|
+
protected readonly NPM_PROJECT_KEY = "npm";
|
|
2055
|
+
protected projects: PROJECT[];
|
|
2056
|
+
/**
|
|
2057
|
+
* To speed up checking folder I am keeping paths for already checked folder
|
|
2058
|
+
* This may break things that are creating new projects
|
|
2059
|
+
*/
|
|
2060
|
+
protected emptyLocations: string[];
|
|
2061
|
+
constructor(classFn: any, cliToolName: string);
|
|
2062
|
+
get allowedTypes(): string[];
|
|
2063
|
+
/**
|
|
2064
|
+
* project from process.cwd()
|
|
2065
|
+
*/
|
|
2066
|
+
get Current(): PROJECT;
|
|
2067
|
+
/**
|
|
2068
|
+
* override this
|
|
2069
|
+
*/
|
|
2070
|
+
typeFrom(location: string, recrusiveCall?: boolean): string;
|
|
2071
|
+
From(locationOfProject: string | string[], options?: any): PROJECT;
|
|
2072
|
+
nearestTo(absoluteLocation: string | string[], options?: {
|
|
2073
|
+
type?: string | string[];
|
|
2074
|
+
findGitRoot?: boolean;
|
|
2075
|
+
onlyOutSideNodeModules?: boolean;
|
|
2076
|
+
}): PROJECT;
|
|
2077
|
+
unload(projectOrLocationOfProject: PROJECT | string): void;
|
|
2078
|
+
remove(project: PROJECT): void;
|
|
2079
|
+
add(project: PROJECT): void;
|
|
2080
|
+
allProjectFrom(absoluteLocation: string, stopOnCwd?: string): any;
|
|
2081
|
+
allProjectsFromFolder(folderLocation: string): PROJECT[];
|
|
2082
|
+
sortGroupOfProject<T extends BaseProject<any, any> = BaseProject<any, any>>(projects: T[], resoveDepsArray: (proj: T) => string[], projNameToCompare: (proj: T) => string): T[];
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
declare class BaseQuickFixes<PROJECT extends BaseProject<any, any> = BaseProject<any, any>> extends BaseFeatureForProject<PROJECT> {
|
|
2086
|
+
project: PROJECT;
|
|
2087
|
+
constructor(project: PROJECT);
|
|
2088
|
+
/**
|
|
2089
|
+
* filesRelativePaths example:
|
|
2090
|
+
* ['node_modules/@types/glob/index.d.ts', '/home/user/project/src/app.ts']
|
|
2091
|
+
*
|
|
2092
|
+
* @param filesRelativeAbsPaths\ Quick fix for typescript check
|
|
2093
|
+
*/
|
|
2094
|
+
excludeNodeModulesDtsFromTypescriptCheck(filesRelativeAbsPaths: string[]): any;
|
|
2095
|
+
fixSQLLiteModuleInNodeModules(): any;
|
|
2096
|
+
createDummyEmptyLibsReplacements(missingLibsNames?: string[]): any;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
declare class BaseReleaseProcess<PROJECT extends BaseProject<any, any> = any> extends BaseFeatureForProject<PROJECT> {
|
|
2100
|
+
/**
|
|
2101
|
+
* Automatic release process of patch plus one version
|
|
2102
|
+
*/
|
|
2103
|
+
automaticRelease: boolean;
|
|
2104
|
+
versionType: CoreModels.ReleaseVersionType;
|
|
2105
|
+
preReleaseVersionTag: CoreModels.PreReleaseVersionTag;
|
|
2106
|
+
lastChangesSummary: string;
|
|
2107
|
+
newVersion: string;
|
|
2108
|
+
commitsForChangelog: {
|
|
2109
|
+
commitMessages: string;
|
|
2110
|
+
index: number;
|
|
2111
|
+
}[];
|
|
2112
|
+
startRelease(options?: Partial<BaseReleaseProcess<PROJECT>>): Promise<void>;
|
|
2113
|
+
getReleaseWords(): string[];
|
|
2114
|
+
selectChangelogCommits(): Promise<{
|
|
2115
|
+
commitMessages: string;
|
|
2116
|
+
index: number;
|
|
2117
|
+
}[]>;
|
|
2118
|
+
private getCommitsUpToReleaseCommit;
|
|
2119
|
+
checkBundleQuestion(cwdForCode: string, checkMessage?: string): Promise<boolean>;
|
|
2120
|
+
/**
|
|
2121
|
+
* @returns true if publish , faslse if just version bump
|
|
2122
|
+
*/
|
|
2123
|
+
publishToNpm(cwdForCode?: any, automaticRelease?: boolean): Promise<boolean>;
|
|
2124
|
+
protected testAfterPublish(): Promise<boolean>;
|
|
2125
|
+
protected testBeforePublish(): Promise<boolean>;
|
|
2126
|
+
protected commitAndPush(): Promise<void>;
|
|
2127
|
+
protected releaseCommitTemplate(): string;
|
|
2128
|
+
private testLibraries;
|
|
2129
|
+
buildAllLibraries(): Promise<void>;
|
|
2130
|
+
resetReleaseFiles(): Promise<any>;
|
|
2131
|
+
get toBumpProjects(): PROJECT[];
|
|
2132
|
+
bumpNewVersionEverywhere(): Promise<any>;
|
|
2133
|
+
confirmNewVersion(): Promise<void>;
|
|
2134
|
+
protected selectReleaseType(versionToUseResolveFn?: (releaseVersionBumpType: CoreModels.ReleaseVersionType) => string, options?: {
|
|
2135
|
+
quesitonPrefixMessage?: string;
|
|
2136
|
+
}): Promise<CoreModels.ReleaseVersionType>;
|
|
2137
|
+
protected commitMessageInChangelogTransformFn(message: string): Promise<string>;
|
|
2138
|
+
getChangelogContentToAppend(askForEveryItem: boolean): Promise<string>;
|
|
2139
|
+
/**
|
|
2140
|
+
* TODO extend this to all commits from last release
|
|
2141
|
+
*/
|
|
2142
|
+
updateChangeLogFromCommits(): Promise<void>;
|
|
2143
|
+
extractChangedLibrariesInCommit(hashOrIndex: string | number): Promise<string>;
|
|
2144
|
+
changelogItemTemplate(hashOrIndex: string | number, confirmEveryItem?: boolean): Promise<string>;
|
|
2145
|
+
generateLastChangesSummary(): Promise<string>;
|
|
2146
|
+
getLastChangesFromCommits({ maxMessagesToCheck, stopOnCommitMessage, }?: {
|
|
2147
|
+
/**
|
|
2148
|
+
* default 3
|
|
2149
|
+
*/
|
|
2150
|
+
maxMessagesToCheck?: number;
|
|
2151
|
+
/**
|
|
2152
|
+
* stop serching on commit message
|
|
2153
|
+
*/
|
|
2154
|
+
stopOnCommitMessage?: string;
|
|
2155
|
+
}): Promise<string>;
|
|
2156
|
+
getLastReleaseCommitData(): Promise<{
|
|
2157
|
+
lastReleaseCommitMsg: string;
|
|
2158
|
+
/**
|
|
2159
|
+
* -1 if not found
|
|
2160
|
+
*/
|
|
2161
|
+
index: number;
|
|
2162
|
+
}>;
|
|
2163
|
+
getLastPackageVersionChangesFromChnagelog(): Promise<string>;
|
|
2164
|
+
private get changeLogPath();
|
|
2165
|
+
get changelogContent(): any;
|
|
2166
|
+
changeLogKeyWord(): string;
|
|
2167
|
+
getChnagelogData(): ChangelogData[];
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Easy way to create github pages
|
|
2172
|
+
* (or similar static site hosting)
|
|
2173
|
+
*/
|
|
2174
|
+
declare class BaseStaticPages<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
2175
|
+
readonly TMP_STATIC_PAGE_SITE_REPOS = "tmp-static-pages-sites-repos";
|
|
2176
|
+
protected cleanFolderForStaticPages(pathToBranchRepoFolder: string): Promise<any>;
|
|
2177
|
+
protected get mainFolder(): any;
|
|
2178
|
+
get mainFolderAbsPath(): any;
|
|
2179
|
+
get pagesBranchName(): string;
|
|
2180
|
+
init(mainFolder: string, completeProcess?: boolean): Promise<any>;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
declare class BaseVscodeHelpers<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
|
|
2184
|
+
init(options?: {
|
|
2185
|
+
skipHiddingTempFiles?: boolean;
|
|
2186
|
+
}): Promise<void>;
|
|
2187
|
+
/**
|
|
2188
|
+
* settings.json relative path
|
|
2189
|
+
*/
|
|
2190
|
+
readonly relativePathSettingsJsonVscode = ".vscode/settings.json";
|
|
2191
|
+
readonly relativePathExtensionJsonVScode = ".vscode/extensions.json";
|
|
2192
|
+
readonly currentSettingsValue: CoreModels.VSCodeSettings;
|
|
2193
|
+
constructor(project: PROJECT);
|
|
2194
|
+
protected modifyVscode(modifyFN: (settings: CoreModels.VSCodeSettings) => CoreModels.VSCodeSettings): void;
|
|
2195
|
+
saveCurrentSettings(): void;
|
|
2196
|
+
getExtensions(): string[];
|
|
2197
|
+
/**
|
|
2198
|
+
* @deprecated use getExtensions() instead
|
|
2199
|
+
*/
|
|
2200
|
+
private get extensions();
|
|
2201
|
+
recreateExtensions(): void;
|
|
2202
|
+
protected getExecuteParamsForSettings(): any[];
|
|
2203
|
+
recreateBaseSettings(options?: {
|
|
2204
|
+
save?: boolean;
|
|
2205
|
+
}): Promise<void>;
|
|
2206
|
+
recreateWindowTitle(options?: {
|
|
2207
|
+
save?: boolean;
|
|
2208
|
+
}): void;
|
|
2209
|
+
installExtensions(extensions?: string[], defaultSelectedAll?: boolean): Promise<void>;
|
|
2210
|
+
/**
|
|
2211
|
+
* This pattern finds a dash followed by at least one digit.
|
|
2212
|
+
* It removes everything from that dash to the end of the string.
|
|
2213
|
+
* Examples:
|
|
2214
|
+
* "name-of-extension-1.2.3" -> "name-of-extension"
|
|
2215
|
+
* "extension-0.9.5-win32-x64" -> "extension"
|
|
2216
|
+
*/
|
|
2217
|
+
protected stripVersion(folderName: string): string;
|
|
2218
|
+
get installedExtensions(): string[];
|
|
2219
|
+
static applyProperGlobalSettings(): Promise<void>;
|
|
2220
|
+
/**
|
|
2221
|
+
* by default left menu color and bottom status bar are the same
|
|
2222
|
+
*/
|
|
2223
|
+
getVscodeBottomColor(): string;
|
|
2224
|
+
refreshColorsInSettings(): void;
|
|
2225
|
+
getBasicSettins(): Promise<object>;
|
|
2226
|
+
protected resolveParamsVscode(obj: any, prams: any[]): Promise<void>;
|
|
2227
|
+
toogleFilesVisibilityInVscode(options: {
|
|
2228
|
+
action: 'show-files' | 'hide-files';
|
|
2229
|
+
skipSaving?: boolean;
|
|
2230
|
+
}): void;
|
|
2231
|
+
changeColorThemeVscode(white?: boolean): void;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
declare abstract class BaseProject<PROJECT extends BaseProject<any, any> = BaseProject<any, any>, TYPE = BaseProjectType> {
|
|
2235
|
+
static ins: BaseProjectResolver<BaseProject<BaseProject<any, any>, CoreModels.BaseProjectType>>;
|
|
2236
|
+
cache: any;
|
|
2237
|
+
static cache: any;
|
|
2238
|
+
get globalCache(): any;
|
|
2239
|
+
readonly type: TYPE | string;
|
|
2240
|
+
/**
|
|
2241
|
+
* resolve instance
|
|
2242
|
+
*/
|
|
2243
|
+
abstract readonly ins: BaseProjectResolver<PROJECT>;
|
|
2244
|
+
/**
|
|
2245
|
+
* Unique free port for project instance
|
|
2246
|
+
* only available after executing *this.assignFreePort()*
|
|
2247
|
+
*/
|
|
2248
|
+
readonly port: string;
|
|
2249
|
+
libraryBuild?: BaseLibraryBuild<BaseProject>;
|
|
2250
|
+
npmHelpers?: BaseNpmHelpers;
|
|
2251
|
+
fileFoldersOperations?: BaseFileFoldersOperations;
|
|
2252
|
+
get packageJson(): Partial<BasePackageJson>;
|
|
2253
|
+
get nodeModules(): Partial<BaseNodeModules>;
|
|
2254
|
+
linkedProjects?: BaseLinkedProjects;
|
|
2255
|
+
vsCodeHelpers?: BaseVscodeHelpers;
|
|
2256
|
+
releaseProcess?: BaseReleaseProcess;
|
|
2257
|
+
git?: BaseGit;
|
|
2258
|
+
linter?: BaseLinter;
|
|
2259
|
+
ignoreHide: BaseIgnoreHideHelpers;
|
|
2260
|
+
quickFixes?: BaseQuickFixes;
|
|
2261
|
+
staticPages?: BaseStaticPages;
|
|
2262
|
+
javaJdk?: BaseJavaJdk;
|
|
2263
|
+
docker?: BaseDocker;
|
|
2264
|
+
private __location;
|
|
2265
|
+
get location(): string;
|
|
2266
|
+
set location(v: string);
|
|
2267
|
+
/**
|
|
2268
|
+
* TODO move this to framework
|
|
2269
|
+
* Linked projects are actual inside repo
|
|
2270
|
+
* not in separated folders/git sub repos
|
|
2271
|
+
*/
|
|
2272
|
+
get isMonorepo(): boolean;
|
|
2273
|
+
protected orderCoreProjects(coreProjects: CoreProject[]): CoreProject[];
|
|
2274
|
+
get core(): CoreProject;
|
|
2275
|
+
get linkedProjectsExisted(): PROJECT[];
|
|
2276
|
+
setType(type: TYPE): void;
|
|
2277
|
+
typeIs(...types: TYPE[]): boolean;
|
|
2278
|
+
typeIsNot(...types: TYPE[]): boolean;
|
|
2279
|
+
/**
|
|
2280
|
+
* project folder basename
|
|
2281
|
+
*/
|
|
2282
|
+
get basename(): string;
|
|
2283
|
+
/**
|
|
2284
|
+
* project folder parent basename
|
|
2285
|
+
*/
|
|
2286
|
+
get parentBasename(): string;
|
|
2287
|
+
/**
|
|
2288
|
+
* name from package.json
|
|
2289
|
+
*/
|
|
2290
|
+
get name(): string;
|
|
2291
|
+
get nameForCli(): string;
|
|
2292
|
+
get nameForNpmPackage(): string;
|
|
2293
|
+
get nameFromPomXML(): string;
|
|
2294
|
+
protected getFoldersForPossibleProjectChildren(): string[];
|
|
2295
|
+
protected getAllChildren(): any;
|
|
2296
|
+
/**
|
|
2297
|
+
* alias to getAllChildren
|
|
2298
|
+
*/
|
|
2299
|
+
get children(): PROJECT[];
|
|
2300
|
+
getChildBy(nameOrBasename: string, errors?: boolean): PROJECT;
|
|
2301
|
+
get parent(): PROJECT;
|
|
2302
|
+
get nearestParent(): PROJECT;
|
|
2303
|
+
get grandpa(): PROJECT;
|
|
2304
|
+
get allNpmPackagesNames(): string[];
|
|
2305
|
+
get titleBarName(): string;
|
|
2306
|
+
get genericName(): any;
|
|
2307
|
+
private checkAndBoldenPath;
|
|
2308
|
+
/**
|
|
2309
|
+
* same has project.hasFile();
|
|
2310
|
+
*/
|
|
2311
|
+
pathExists(relativePath: string | string[]): boolean;
|
|
2312
|
+
/**
|
|
2313
|
+
* same as project.pathExists();
|
|
2314
|
+
*/
|
|
2315
|
+
hasFile(relativePath: string | string[]): boolean;
|
|
2316
|
+
hasFolder(relativePath: string | string[]): boolean;
|
|
2317
|
+
/**
|
|
2318
|
+
* Function will return relative path from project location
|
|
2319
|
+
*/
|
|
2320
|
+
relative(absoultePath: string): string;
|
|
2321
|
+
/**
|
|
2322
|
+
*
|
|
2323
|
+
* @param relativePath
|
|
2324
|
+
* @param override it will remove ex
|
|
2325
|
+
*/
|
|
2326
|
+
createFolder(relativePath: string | string[], options?: {
|
|
2327
|
+
override?: boolean;
|
|
2328
|
+
}): any;
|
|
2329
|
+
formatFile(specificRelativePath: string | string[]): any;
|
|
2330
|
+
formatAllFiles(): any;
|
|
2331
|
+
/**
|
|
2332
|
+
* same as project.pathhasFileExists();
|
|
2333
|
+
* but with path.resolve
|
|
2334
|
+
*/
|
|
2335
|
+
containsFile(fileRelativeToProjectPath: string): any;
|
|
2336
|
+
/**
|
|
2337
|
+
* absolute path:
|
|
2338
|
+
* concated project location with relative path
|
|
2339
|
+
*/
|
|
2340
|
+
pathFor(relativePath: string | string[]): any;
|
|
2341
|
+
writeJson(relativePath: string, json: object): any;
|
|
2342
|
+
writeJsonC(relativePath: string, json: object): any;
|
|
2343
|
+
/**
|
|
2344
|
+
* @deprecated us execute instead
|
|
2345
|
+
* use output from or more preciese crafted api
|
|
2346
|
+
*/
|
|
2347
|
+
run(command: string, options?: Omit<CoreModels.RunOptions, 'cwd'>): {
|
|
2348
|
+
sync(): any;
|
|
2349
|
+
async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => Promise<number> | number): child_process.ChildProcess;
|
|
2350
|
+
asyncAsPromise(): Promise<void>;
|
|
2351
|
+
unitlOutput(optionsOutput: {
|
|
2352
|
+
stdoutMsg: string | string[];
|
|
2353
|
+
stderMsg?: string | string[];
|
|
2354
|
+
timeout?: number;
|
|
2355
|
+
stdoutOutputContainsCallback?: () => any;
|
|
2356
|
+
outputLineReplace?: (outputLine: string) => string;
|
|
2357
|
+
}): Promise<void>;
|
|
2358
|
+
unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any;
|
|
2359
|
+
};
|
|
2360
|
+
/**
|
|
2361
|
+
* same as run but async
|
|
2362
|
+
*/
|
|
2363
|
+
execute(command: string, options?: CoreModels.ExecuteOptions & {
|
|
2364
|
+
showCommand?: boolean;
|
|
2365
|
+
}): Promise<any>;
|
|
2366
|
+
/**
|
|
2367
|
+
* try run but continue when it fails
|
|
2368
|
+
* @param command
|
|
2369
|
+
* @param options
|
|
2370
|
+
* @returns
|
|
2371
|
+
*/
|
|
2372
|
+
tryRunSync(command: string): void;
|
|
2373
|
+
outputFrom(command: string): any;
|
|
2374
|
+
removeFile(fileRelativeToProjectPath: string): any;
|
|
2375
|
+
readFile(fileRelativeToProjectPath: string): any;
|
|
2376
|
+
/**
|
|
2377
|
+
* read json file
|
|
2378
|
+
* handle all json files
|
|
2379
|
+
* jsonc, json5 , json
|
|
2380
|
+
* @param fileRelativeToProjectPath
|
|
2381
|
+
* @returns
|
|
2382
|
+
*/
|
|
2383
|
+
readJson<T = {}>(fileRelativeToProjectPath: string): T;
|
|
2384
|
+
/**
|
|
2385
|
+
* copy files or folders from
|
|
2386
|
+
* project to destination
|
|
2387
|
+
*/
|
|
2388
|
+
copy(filesOrFolderRelativePathes: string[]): {
|
|
2389
|
+
to: (destination: string) => void;
|
|
2390
|
+
};
|
|
2391
|
+
remove(relativePath: string | string[], exactPath?: boolean): any;
|
|
2392
|
+
removeFolderByRelativePath(relativePathToFolder: string): void;
|
|
2393
|
+
get isAngularLib(): any;
|
|
2394
|
+
refreshChildrenProjects(options?: {
|
|
2395
|
+
askUserAboutUpdate?: boolean;
|
|
2396
|
+
}): Promise<void>;
|
|
2397
|
+
protected getUniqueForTask(task: string): string;
|
|
2398
|
+
registerAndAssignPort(taskName: string, options?: {
|
|
2399
|
+
startFrom?: number;
|
|
2400
|
+
}): Promise<number>;
|
|
2401
|
+
/**
|
|
2402
|
+
* @deprecated use this.registerAndAssignPort() or Utils.getFreePort() instead
|
|
2403
|
+
*/
|
|
2404
|
+
assignFreePort(startFrom?: number): Promise<number>;
|
|
2405
|
+
/**
|
|
2406
|
+
* Purpose: not initializing all classes at the beginning
|
|
2407
|
+
* Only for BaseFeatureForProject class
|
|
2408
|
+
*/
|
|
2409
|
+
defineProperty<PROJECT>(variableName: keyof PROJECT, classFn: Function, options?: {
|
|
2410
|
+
customInstanceReturn?: () => object;
|
|
2411
|
+
}): any;
|
|
2412
|
+
/**
|
|
2413
|
+
* fs.copy option filter function for copying only selected folders from project
|
|
2414
|
+
*/
|
|
2415
|
+
filterOnlyCopy(basePathFoldersOnlyToInclude: string[]): any;
|
|
2416
|
+
/**
|
|
2417
|
+
* fs.copy option filter function for copying only not selected folders from project
|
|
2418
|
+
*/
|
|
2419
|
+
filterDontCopy(basePathFoldersTosSkip: string[]): any;
|
|
2420
|
+
/**
|
|
2421
|
+
* main/default hardcoded branches
|
|
2422
|
+
*/
|
|
2423
|
+
getMainBranches(): string[];
|
|
2424
|
+
useFeatureInBranchNameForTests(): boolean;
|
|
2425
|
+
resetProcess(overrideBranch?: string, recrusive?: boolean): Promise<void>;
|
|
2426
|
+
linkTo(destPackageLocation: string): void;
|
|
2427
|
+
setValueToJSON(relativePath: string | string[], lodashGetPath: string, value: any): void;
|
|
2428
|
+
setValueToJSONC(relativePath: string | string[], lodashGetPath: string, value: any): void;
|
|
2429
|
+
setValueToJSON5(relativePath: string | string[], lodashGetPath: string, value: any): void;
|
|
2430
|
+
getValueFromJSON(relativePath: string | string[], lodashGetPath: string, defaultValue?: any): any;
|
|
2431
|
+
getValueFromJSONC(relativePath: string | string[], lodashGetPath: string, defaultValue?: any): any;
|
|
2432
|
+
writeFile(relativePath: string | string[], content: string, options?: {
|
|
2433
|
+
formatWithPrettier?: boolean;
|
|
2434
|
+
}): void;
|
|
2435
|
+
runCommandGetString(this: BaseProject, command: string): any;
|
|
2436
|
+
toString: () => string;
|
|
2437
|
+
get parentsNames(): any;
|
|
2438
|
+
openLocation(relativeFolderPath: string): any;
|
|
2439
|
+
private findParentsNames;
|
|
2440
|
+
tryKillAllElectronInstances(): any;
|
|
2441
|
+
/**
|
|
2442
|
+
* init project files structure and depedencies
|
|
2443
|
+
*/
|
|
2444
|
+
init(initOptions?: any): Promise<void>;
|
|
2445
|
+
/**
|
|
2446
|
+
* globally link npm as package
|
|
2447
|
+
*/
|
|
2448
|
+
link(): Promise<void>;
|
|
2449
|
+
/**
|
|
2450
|
+
* init project files structure without depedencies
|
|
2451
|
+
*/
|
|
2452
|
+
struct(initOptions?: any): Promise<void>;
|
|
2453
|
+
/**
|
|
2454
|
+
* init and build() project
|
|
2455
|
+
*/
|
|
2456
|
+
test(testOptions?: any): Promise<void>;
|
|
2457
|
+
/**
|
|
2458
|
+
* init and build() project
|
|
2459
|
+
*/
|
|
2460
|
+
build(buildOptions?: any): Promise<void>;
|
|
2461
|
+
/**
|
|
2462
|
+
* publish project to npm
|
|
2463
|
+
*/
|
|
2464
|
+
publish(publishOptions?: any): Promise<void>;
|
|
2465
|
+
release(releaseOptions?: any): Promise<void>;
|
|
2466
|
+
/**
|
|
2467
|
+
* lint porject
|
|
2468
|
+
*/
|
|
2469
|
+
lint(lintOptions?: any): Promise<void>;
|
|
2470
|
+
/**
|
|
2471
|
+
* get info about porject
|
|
2472
|
+
*/
|
|
2473
|
+
info(): Promise<string>;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
declare abstract class BaseCompilerForProject<ADDITIONAL_DATA = any, PROJECT extends BaseProject = BaseProject> extends BaseClientCompiler<ADDITIONAL_DATA> {
|
|
2477
|
+
project: PROJECT;
|
|
2478
|
+
protected checkFolderCompiler(project: PROJECT, options: BaseClientCompilerOptions, dontCheck?: boolean): BaseClientCompilerOptions;
|
|
2479
|
+
constructor(project: PROJECT, options?: BaseClientCompilerOptions, allowFolderOutSideProject?: boolean);
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
declare abstract class BaseDebounceCompilerForProject<ADDITIONAL_DATA = any, PROJECT extends BaseProject = BaseProject> extends BaseCompilerForProject<ADDITIONAL_DATA, PROJECT> {
|
|
2483
|
+
protected initialParams: ADDITIONAL_DATA;
|
|
2484
|
+
/**
|
|
2485
|
+
* default debounce time is 1s
|
|
2486
|
+
*/
|
|
2487
|
+
protected debounceTime: number;
|
|
2488
|
+
abstract action({ changeOfFiles, asyncEvent, }: {
|
|
2489
|
+
changeOfFiles: ChangeOfFile[];
|
|
2490
|
+
asyncEvent: boolean;
|
|
2491
|
+
}): any;
|
|
2492
|
+
/**
|
|
2493
|
+
* current files that are in project
|
|
2494
|
+
*/
|
|
2495
|
+
protected exitedFilesAbsPathes: string[];
|
|
2496
|
+
/**
|
|
2497
|
+
* @deprecated use action() instead
|
|
2498
|
+
*/
|
|
2499
|
+
syncAction(absFilesPathes: string[], initialParams: ADDITIONAL_DATA): Promise<void>;
|
|
2500
|
+
private lastAsyncFilesChanges;
|
|
2501
|
+
private debounceAction;
|
|
2502
|
+
/**
|
|
2503
|
+
* @deprecated use action() instead
|
|
2504
|
+
*/
|
|
2505
|
+
asyncAction(asyncEvents: ChangeOfFile, initialParams?: ADDITIONAL_DATA): Promise<void>;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
declare abstract class BaseCommandLineFeature<PARAMS extends {} = any, PROJECT extends BaseProject<any, any> = BaseProject, PROJECT_RESOLVER extends BaseProjectResolver<PROJECT> = BaseProjectResolver<PROJECT>> {
|
|
2509
|
+
readonly argsWithParams: string;
|
|
2510
|
+
protected readonly methodNameToCall: string;
|
|
2511
|
+
/**
|
|
2512
|
+
* process.cwd()
|
|
2513
|
+
*/
|
|
2514
|
+
protected cwd: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* params from command line
|
|
2517
|
+
*/
|
|
2518
|
+
protected params: PARAMS;
|
|
2519
|
+
protected ins: PROJECT_RESOLVER;
|
|
2520
|
+
protected __transformArgsBeforeResolvingParams__(args: string[]): string[];
|
|
2521
|
+
/**
|
|
2522
|
+
* clean args without params from command line
|
|
2523
|
+
*/
|
|
2524
|
+
args: string[];
|
|
2525
|
+
/**
|
|
2526
|
+
* first arg from args
|
|
2527
|
+
*/
|
|
2528
|
+
get firstArg(): string;
|
|
2529
|
+
/**
|
|
2530
|
+
* last arg from args
|
|
2531
|
+
*/
|
|
2532
|
+
get lastArg(): string;
|
|
2533
|
+
private __project;
|
|
2534
|
+
protected get project(): PROJECT;
|
|
2535
|
+
protected set project(v: PROJECT);
|
|
2536
|
+
constructor(argsWithParams: string, methodNameToCall: string,
|
|
2537
|
+
/**
|
|
2538
|
+
* nearest project to cwd
|
|
2539
|
+
*/
|
|
2540
|
+
project: PROJECT,
|
|
2541
|
+
/**
|
|
2542
|
+
* process.cwd()
|
|
2543
|
+
*/
|
|
2544
|
+
cwd: string, ins: PROJECT_RESOLVER);
|
|
2545
|
+
_exit(code?: number): void;
|
|
2546
|
+
protected __initialize__(): void;
|
|
2547
|
+
_tryResolveChildIfInsideArg(): void;
|
|
2548
|
+
/**
|
|
2549
|
+
* method called when not using class methods
|
|
2550
|
+
*/
|
|
2551
|
+
abstract _(): any;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
type CommonCommitMsgBranch = 'refactor' | 'chore' | 'style' | 'docs' | 'test' | 'ci' | 'build' | 'release';
|
|
2555
|
+
type TypeOfCommit = 'feature' | 'bugfix' | 'performance' | CommonCommitMsgBranch;
|
|
2556
|
+
type TypeOfMsgPrefix = 'feat' | 'fix' | 'perf' | CommonCommitMsgBranch;
|
|
2557
|
+
declare class CommitData {
|
|
2558
|
+
private static cleanHttpFromCommitMessage;
|
|
2559
|
+
private static getTeamsIdFrom;
|
|
2560
|
+
private static getModuleNameFrom;
|
|
2561
|
+
/**
|
|
2562
|
+
*
|
|
2563
|
+
* @returns jiras (from oldest to newset)
|
|
2564
|
+
*/
|
|
2565
|
+
static extractAndOrderJiraNumbers(commitOrBranchName: string): string[];
|
|
2566
|
+
/**
|
|
2567
|
+
*
|
|
2568
|
+
* @returns jiras (from oldest to newset)
|
|
2569
|
+
*/
|
|
2570
|
+
static extractAndOrderIssuesFromOtherProjects(
|
|
2571
|
+
/**
|
|
2572
|
+
* example:
|
|
2573
|
+
* commit: proper git commands tnp/GH-9 darekf77/tnp-helpers/GH-10
|
|
2574
|
+
* feature/__tnp-GH-9____darekf77_tnp-helpers-GH10__-proper-git-commands
|
|
2575
|
+
*/
|
|
2576
|
+
commitOrBranchName: string, currentOrigin?: string): string[];
|
|
2577
|
+
static cleanMessageFromJiraNumTeamIdEtc(message: string, optinos?: {
|
|
2578
|
+
teamID: string;
|
|
2579
|
+
commitModuleName: string;
|
|
2580
|
+
jiraNumbers: string[];
|
|
2581
|
+
issuesFromOtherProjects: string[];
|
|
2582
|
+
}): string;
|
|
2583
|
+
private static getModuleNameFromBranch;
|
|
2584
|
+
static getFromArgs(args: string[], options: {
|
|
2585
|
+
typeOfCommit: TypeOfCommit;
|
|
2586
|
+
/**
|
|
2587
|
+
* only needed when push github
|
|
2588
|
+
* and I forgot to add my username before issue
|
|
2589
|
+
* taon pfix proper input my-repo#344
|
|
2590
|
+
* that should be
|
|
2591
|
+
* taon pfix proper input my-username/my-repo#344
|
|
2592
|
+
*/
|
|
2593
|
+
currentOrigin?: string;
|
|
2594
|
+
jiraIssuesAreOutsideBrackets?: boolean;
|
|
2595
|
+
}): Promise<CommitData>;
|
|
2596
|
+
static getFromBranch(currentBranchName: string, options?: {
|
|
2597
|
+
releaseWords?: string[];
|
|
2598
|
+
/**
|
|
2599
|
+
* only needed when push github
|
|
2600
|
+
* and I forgot to add my username before issue
|
|
2601
|
+
* taon pfix proper input my-repo#344
|
|
2602
|
+
* that should be
|
|
2603
|
+
* taon pfix proper input my-username/my-repo#344
|
|
2604
|
+
*/
|
|
2605
|
+
currentOrigin?: string;
|
|
2606
|
+
jiraIssuesAreOutsideBrackets?: boolean;
|
|
2607
|
+
}): Promise<CommitData>;
|
|
2608
|
+
static from(options: Pick<CommitData, 'message' | 'jiraNumbers' | 'typeOfCommit' | 'commitModuleName' | 'teamID' | 'issuesFromOtherProjects' | 'jiraIssuesAreOutsideBrackets'>): CommitData;
|
|
2609
|
+
private _message;
|
|
2610
|
+
typeOfCommit: TypeOfCommit;
|
|
2611
|
+
/**
|
|
2612
|
+
* ex. JIRA-2132 or MYJIRAREFIX-234234
|
|
2613
|
+
*/
|
|
2614
|
+
jiraNumbers: string[];
|
|
2615
|
+
/**
|
|
2616
|
+
* if true then jira issues are outside brackets
|
|
2617
|
+
* feat: proper git commands JIRA-1234
|
|
2618
|
+
*
|
|
2619
|
+
* by default is false
|
|
2620
|
+
* feat(JIRA-1234): proper git commands
|
|
2621
|
+
*/
|
|
2622
|
+
jiraIssuesAreOutsideBrackets: boolean;
|
|
2623
|
+
/**
|
|
2624
|
+
* when set -> jiraIssuesAreOutsideBrackets is true
|
|
2625
|
+
*/
|
|
2626
|
+
readonly commitModuleName: string;
|
|
2627
|
+
readonly teamID: string;
|
|
2628
|
+
private clearMessage;
|
|
2629
|
+
/**
|
|
2630
|
+
* pure message what was done (without jira or prefixes)
|
|
2631
|
+
* => is included in this.commitMessage
|
|
2632
|
+
*/
|
|
2633
|
+
get message(): string;
|
|
2634
|
+
set message(message: string);
|
|
2635
|
+
useFeatureBranchForTestBranch: boolean;
|
|
2636
|
+
get branchPrefix(): TypeOfMsgPrefix;
|
|
2637
|
+
/**
|
|
2638
|
+
* ex. taon/GH-12 darekf77/tnp-helpers/GH-4
|
|
2639
|
+
*/
|
|
2640
|
+
get issuesFromOtherProjects(): string[];
|
|
2641
|
+
set issuesFromOtherProjects(value: string[]);
|
|
2642
|
+
private __issuesFromOtherProjects;
|
|
2643
|
+
get commitMessage(): string;
|
|
2644
|
+
get branchName(): string;
|
|
2645
|
+
get isActionCommit(): any;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
declare class BaseGlobalCommandLine<PARAMS = any, PROJECT extends BaseProject<any, any> = BaseProject<any, any>, PROJECT_RESOLVER extends BaseProjectResolver<PROJECT> = BaseProjectResolver<PROJECT>> extends BaseCommandLineFeature<PARAMS, PROJECT, PROJECT_RESOLVER> {
|
|
2649
|
+
_(): void;
|
|
2650
|
+
/**
|
|
2651
|
+
* @returns true is sudo was used to restart the process
|
|
2652
|
+
*/
|
|
2653
|
+
protected _runAsSudoIfNotElevated({ globalCommandName, }: {
|
|
2654
|
+
globalCommandName?: string;
|
|
2655
|
+
}): Promise<boolean>;
|
|
2656
|
+
/**
|
|
2657
|
+
* TODO return argument not need for now
|
|
2658
|
+
*/
|
|
2659
|
+
cwdIsProject(options?: {
|
|
2660
|
+
requireProjectWithGitRoot?: boolean;
|
|
2661
|
+
}): Promise<boolean>;
|
|
2662
|
+
hosts(): any;
|
|
2663
|
+
countCommits(): any;
|
|
2664
|
+
removeSubmodules(): any;
|
|
2665
|
+
removeSubmodule(): any;
|
|
2666
|
+
setEditor(): Promise<any>;
|
|
2667
|
+
upapi(): Promise<any>;
|
|
2668
|
+
apiup(): Promise<any>;
|
|
2669
|
+
apiUpdate(): Promise<any>;
|
|
2670
|
+
cu(): Promise<any>;
|
|
2671
|
+
choreUpdate(): Promise<any>;
|
|
2672
|
+
colorvscode(): any;
|
|
2673
|
+
/**
|
|
2674
|
+
* Generate or update .vscode/settings.json file color settings
|
|
2675
|
+
*/
|
|
2676
|
+
settingsVscode(): any;
|
|
2677
|
+
refreshVscodeColors(): any;
|
|
2678
|
+
protected _regenerateVscodeSettingsColors(overideBottomColor?: string): void;
|
|
2679
|
+
private updateProject;
|
|
2680
|
+
forceUpdate(): Promise<void>;
|
|
2681
|
+
/**
|
|
2682
|
+
* alias for forceupdate
|
|
2683
|
+
*/
|
|
2684
|
+
forceup(): Promise<void>;
|
|
2685
|
+
update(): Promise<void>;
|
|
2686
|
+
/**
|
|
2687
|
+
* alias for update
|
|
2688
|
+
*/
|
|
2689
|
+
up(): Promise<void>;
|
|
2690
|
+
/**
|
|
2691
|
+
* alias for update
|
|
2692
|
+
*/
|
|
2693
|
+
pu(): Promise<void>;
|
|
2694
|
+
docsUpdate(): Promise<void>;
|
|
2695
|
+
/**
|
|
2696
|
+
* alias for docsUpdate
|
|
2697
|
+
*/
|
|
2698
|
+
docsUp(): Promise<void>;
|
|
2699
|
+
deepUpdate(): Promise<void>;
|
|
2700
|
+
/**
|
|
2701
|
+
* alias for deepupdate
|
|
2702
|
+
*/
|
|
2703
|
+
deepUp(): Promise<void>;
|
|
2704
|
+
updateAll(): Promise<void>;
|
|
2705
|
+
/**
|
|
2706
|
+
* alias for updateAll
|
|
2707
|
+
*/
|
|
2708
|
+
upAll(): Promise<void>;
|
|
2709
|
+
deepUpdateForce(): Promise<void>;
|
|
2710
|
+
/**
|
|
2711
|
+
* alias for deepUpdateForce
|
|
2712
|
+
*/
|
|
2713
|
+
deepUpForce(): Promise<void>;
|
|
2714
|
+
develop(): Promise<any>;
|
|
2715
|
+
dev(): Promise<any>;
|
|
2716
|
+
repul(): Promise<any>;
|
|
2717
|
+
repull(): Promise<any>;
|
|
2718
|
+
pul(): Promise<any>;
|
|
2719
|
+
pull(): Promise<any>;
|
|
2720
|
+
pullAll(): Promise<any>;
|
|
2721
|
+
pp(): Promise<any>;
|
|
2722
|
+
private __resetInfo;
|
|
2723
|
+
fetch(): Promise<any>;
|
|
2724
|
+
reset(): Promise<any>;
|
|
2725
|
+
soft(): Promise<any>;
|
|
2726
|
+
rebase(): Promise<any>;
|
|
2727
|
+
/**
|
|
2728
|
+
* stash only staged files
|
|
2729
|
+
*/
|
|
2730
|
+
stash(): Promise<any>;
|
|
2731
|
+
/**
|
|
2732
|
+
* stash all files
|
|
2733
|
+
*/
|
|
2734
|
+
stashAll(): Promise<any>;
|
|
2735
|
+
/**
|
|
2736
|
+
* push force to all origins
|
|
2737
|
+
*/
|
|
2738
|
+
pushAllForce(): Promise<void>;
|
|
2739
|
+
pAllForce(): Promise<void>;
|
|
2740
|
+
pAllf(): Promise<void>;
|
|
2741
|
+
pAll(): Promise<void>;
|
|
2742
|
+
/**
|
|
2743
|
+
* push to all origins
|
|
2744
|
+
*/
|
|
2745
|
+
pushAll(force?: boolean): Promise<void>;
|
|
2746
|
+
forcePush(): Promise<void>;
|
|
2747
|
+
pushForce(): Promise<void>;
|
|
2748
|
+
/**
|
|
2749
|
+
* Commit and push this for single repo
|
|
2750
|
+
*/
|
|
2751
|
+
commit(options?: {
|
|
2752
|
+
force?: boolean;
|
|
2753
|
+
typeofCommit?: TypeOfCommit;
|
|
2754
|
+
origin?: string;
|
|
2755
|
+
commitMessageRequired?: boolean;
|
|
2756
|
+
noExit?: boolean;
|
|
2757
|
+
}): Promise<void>;
|
|
2758
|
+
_preventPushPullFromNotCorrectBranch(): Promise<void>;
|
|
2759
|
+
qPush(): Promise<void>;
|
|
2760
|
+
quickPush(): Promise<void>;
|
|
2761
|
+
repushauto(): Promise<void>;
|
|
2762
|
+
rePush(skipQuesion?: boolean): Promise<void>;
|
|
2763
|
+
push(options?: PushProcessOptions): Promise<void>;
|
|
2764
|
+
melt(): Promise<void>;
|
|
2765
|
+
meltUp(): Promise<any>;
|
|
2766
|
+
meltAll(): Promise<any>;
|
|
2767
|
+
private __meltCommitsFunc;
|
|
2768
|
+
private meltUpdateCommits;
|
|
2769
|
+
pf(): Promise<any>;
|
|
2770
|
+
pRel(): Promise<any>;
|
|
2771
|
+
pRelease(): Promise<any>;
|
|
2772
|
+
pushRelease(): Promise<any>;
|
|
2773
|
+
mPush(): Promise<any>;
|
|
2774
|
+
fmPush(): Promise<any>;
|
|
2775
|
+
mfPush(): Promise<any>;
|
|
2776
|
+
mforcePush(): Promise<any>;
|
|
2777
|
+
meltforcePush(): Promise<any>;
|
|
2778
|
+
forceMeltPush(): Promise<any>;
|
|
2779
|
+
meltPush(force?: boolean): Promise<any>;
|
|
2780
|
+
pushFeature(): Promise<any>;
|
|
2781
|
+
pushFix(): Promise<any>;
|
|
2782
|
+
pfix(): any;
|
|
2783
|
+
pushChore(): Promise<any>;
|
|
2784
|
+
pc(): Promise<any>;
|
|
2785
|
+
pushRefactor(): Promise<any>;
|
|
2786
|
+
pushref(): Promise<any>;
|
|
2787
|
+
pref(): Promise<any>;
|
|
2788
|
+
pushStyle(): Promise<any>;
|
|
2789
|
+
pstyl(): Promise<any>;
|
|
2790
|
+
pstyle(): Promise<any>;
|
|
2791
|
+
pushDocs(): Promise<any>;
|
|
2792
|
+
pd(): Promise<any>;
|
|
2793
|
+
pdocs(): Promise<any>;
|
|
2794
|
+
pushTest(): Promise<any>;
|
|
2795
|
+
pTest(): Promise<any>;
|
|
2796
|
+
pTests(): Promise<any>;
|
|
2797
|
+
pushPerf(): Promise<any>;
|
|
2798
|
+
pushCi(): Promise<any>;
|
|
2799
|
+
branch(): Promise<any>;
|
|
2800
|
+
pushBuild(): Promise<any>;
|
|
2801
|
+
SET_ORIGIN(): Promise<any>;
|
|
2802
|
+
$COPY_AND_RENAME(): Promise<any>;
|
|
2803
|
+
RENAME_ORIGIN(): Promise<any>;
|
|
2804
|
+
LAST_TAG_HASH(): Promise<any>;
|
|
2805
|
+
LAST_TAG(): Promise<any>;
|
|
2806
|
+
CHECK_TAG_EXISTS(): any;
|
|
2807
|
+
/**
|
|
2808
|
+
* TODO move somewhere
|
|
2809
|
+
*/
|
|
2810
|
+
lint(): Promise<any>;
|
|
2811
|
+
/**
|
|
2812
|
+
* TODO move somewhere
|
|
2813
|
+
*/
|
|
2814
|
+
version(): Promise<any>;
|
|
2815
|
+
/**
|
|
2816
|
+
* TODO move somewhere
|
|
2817
|
+
*/
|
|
2818
|
+
init(): Promise<any>;
|
|
2819
|
+
/**
|
|
2820
|
+
* init parent and first level children
|
|
2821
|
+
*/
|
|
2822
|
+
initAll(): Promise<any>;
|
|
2823
|
+
/**
|
|
2824
|
+
* TODO move somewhere
|
|
2825
|
+
*/
|
|
2826
|
+
struct(): Promise<any>;
|
|
2827
|
+
/**
|
|
2828
|
+
* TODO move somewhere
|
|
2829
|
+
*/
|
|
2830
|
+
info(): Promise<any>;
|
|
2831
|
+
modified(): Promise<any>;
|
|
2832
|
+
refresh(): Promise<void>;
|
|
2833
|
+
changes(): Promise<any>;
|
|
2834
|
+
allTags(): Promise<any>;
|
|
2835
|
+
removeTag(): Promise<any>;
|
|
2836
|
+
BRANCH_NAME(): any;
|
|
2837
|
+
REMOTES(): any;
|
|
2838
|
+
SET_REMOTE_SSH(): Promise<any>;
|
|
2839
|
+
SET_REMOTE_http(): Promise<any>;
|
|
2840
|
+
SET_REMOTE_https(): Promise<any>;
|
|
2841
|
+
protected _resolveChildFromArg(): any;
|
|
2842
|
+
origin(): any;
|
|
2843
|
+
remote(): any;
|
|
2844
|
+
originHttp(): any;
|
|
2845
|
+
originHttps(): any;
|
|
2846
|
+
originssh(): any;
|
|
2847
|
+
origins(): any;
|
|
2848
|
+
gitConfig(): any;
|
|
2849
|
+
LAST_COMMIT_HASH(): any;
|
|
2850
|
+
COMMIT_MESSAGE_BY_HASH(): Promise<any>;
|
|
2851
|
+
LAST_5_COMMITS(): Promise<any>;
|
|
2852
|
+
updateDepsFrom(): Promise<any>;
|
|
2853
|
+
isSupportedTaonTerminal(): any;
|
|
2854
|
+
isRunningInWindowsCmd(): any;
|
|
2855
|
+
isRunningInWindowsPowerShell(): any;
|
|
2856
|
+
INSTALL_PROJECT_EXTENSIONS(): Promise<void>;
|
|
2857
|
+
INSTALL_PROJECT_EXT(): Promise<void>;
|
|
2858
|
+
INS_PROJ_EXT(): Promise<void>;
|
|
2859
|
+
INSTALL_PROJ_EXT(): Promise<void>;
|
|
2860
|
+
projdb(): Promise<any>;
|
|
2861
|
+
private __filterBranchesByPattern;
|
|
2862
|
+
private __selectBrach;
|
|
2863
|
+
clone(): Promise<any>;
|
|
2864
|
+
ghSave(): Promise<any>;
|
|
2865
|
+
ghRestore(): Promise<any>;
|
|
2866
|
+
ports(): Promise<any>;
|
|
2867
|
+
/**
|
|
2868
|
+
* tnp startCliServicePortsWorker --restart
|
|
2869
|
+
*/
|
|
2870
|
+
startCliServicePortsWorker(): Promise<void>;
|
|
2871
|
+
waitForUserAnyKey(): Promise<any>;
|
|
2872
|
+
pauseTerminal(): any;
|
|
2873
|
+
sleepTerminal(): any;
|
|
2874
|
+
ghPagesInit(): Promise<any>;
|
|
2875
|
+
isPortInUse(): Promise<any>;
|
|
2876
|
+
procInfo(): any;
|
|
2877
|
+
processInfo(): any;
|
|
2878
|
+
lastGitTag(): any;
|
|
2879
|
+
checkPort(): Promise<any>;
|
|
2880
|
+
checkPorts(): Promise<any>;
|
|
2881
|
+
symlink(): any;
|
|
2882
|
+
removeSymlinksDryRun(): any;
|
|
2883
|
+
selectJava(): Promise<any>;
|
|
2884
|
+
selectTomcat(): Promise<any>;
|
|
2885
|
+
LN(): any;
|
|
2886
|
+
copy(): any;
|
|
2887
|
+
simulateDomain(): Promise<void>;
|
|
2888
|
+
preview(): Promise<void>;
|
|
2889
|
+
/**
|
|
2890
|
+
* read huge file and display only lines with specyfic words
|
|
2891
|
+
*/
|
|
2892
|
+
shorten(): Promise<any>;
|
|
2893
|
+
dumpPackagesVersions(): void;
|
|
2894
|
+
zip(): Promise<any>;
|
|
2895
|
+
unzip(): Promise<any>;
|
|
2896
|
+
startTransmission(): Promise<any>;
|
|
2897
|
+
_removeTransmission(): Promise<any>;
|
|
2898
|
+
backupBranch(): Promise<any>;
|
|
2899
|
+
bb(): Promise<any>;
|
|
2900
|
+
countCodeLines(): Promise<any>;
|
|
2901
|
+
countCode(): Promise<any>;
|
|
2902
|
+
countLines(): Promise<any>;
|
|
2903
|
+
isNodeVersionOk(): any;
|
|
2904
|
+
pwd(): void;
|
|
2905
|
+
more(): Promise<any>;
|
|
2906
|
+
less(): Promise<any>;
|
|
2907
|
+
/**
|
|
2908
|
+
* npm install --global bin-version-check-cli
|
|
2909
|
+
* npm i -g yt-dlp
|
|
2910
|
+
* choco install ffmpeg
|
|
2911
|
+
*/
|
|
2912
|
+
MP3(args: any): any;
|
|
2913
|
+
MP4(args: any): any;
|
|
2914
|
+
gif(): void;
|
|
2915
|
+
killZs(): any;
|
|
2916
|
+
startZs(): any;
|
|
2917
|
+
zsKill(): any;
|
|
2918
|
+
zsStart(): any;
|
|
2919
|
+
startZscaller(): any;
|
|
2920
|
+
killZscaller(): any;
|
|
2921
|
+
hasCommand(): Promise<void>;
|
|
2922
|
+
hasCommandSync(): void;
|
|
2923
|
+
publicIpAddress(): Promise<void>;
|
|
2924
|
+
publicIp(): Promise<void>;
|
|
2925
|
+
localIps(): Promise<void>;
|
|
2926
|
+
isOnline(): Promise<any>;
|
|
2927
|
+
configureBash(): Promise<void>;
|
|
2928
|
+
configureShell(): Promise<void>;
|
|
2929
|
+
confBash(): void;
|
|
2930
|
+
confShell(): void;
|
|
2931
|
+
gitResetAll(): any;
|
|
2932
|
+
isElevated(): Promise<any>;
|
|
2933
|
+
sudoCheck(): Promise<void>;
|
|
2934
|
+
pythonModuleExists(): Promise<any>;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
type CoreProjectEnvironment = {
|
|
2938
|
+
shortName?: string;
|
|
2939
|
+
name?: string;
|
|
2940
|
+
description?: string;
|
|
2941
|
+
onlineLink?: string;
|
|
2942
|
+
};
|
|
2943
|
+
type CoreCommandArgOptions<PROJECT extends BaseProject<any, any>> = {
|
|
2944
|
+
project?: PROJECT;
|
|
2945
|
+
/**
|
|
2946
|
+
* watch mode
|
|
2947
|
+
*/
|
|
2948
|
+
watch?: boolean;
|
|
2949
|
+
prod?: boolean;
|
|
2950
|
+
debug?: boolean;
|
|
2951
|
+
isInReleaseProcess?: boolean;
|
|
2952
|
+
libraryBuildOptions?: LibrariesBuildOptions;
|
|
2953
|
+
testBuildOptions?: TestBuildOptions;
|
|
2954
|
+
/**
|
|
2955
|
+
* first arg from command line
|
|
2956
|
+
*/
|
|
2957
|
+
firstArg?: string;
|
|
2958
|
+
/**
|
|
2959
|
+
* Not question for user ex.
|
|
2960
|
+
* - automatic process of patch release
|
|
2961
|
+
* - automatic deployment for default server
|
|
2962
|
+
*/
|
|
2963
|
+
automaticProcess?: boolean;
|
|
2964
|
+
/**
|
|
2965
|
+
* orignal args with params
|
|
2966
|
+
*/
|
|
2967
|
+
argsWithParams?: string;
|
|
2968
|
+
copyto?: string[];
|
|
2969
|
+
copytoall?: boolean;
|
|
2970
|
+
/**
|
|
2971
|
+
* args from command line (clearn from params)
|
|
2972
|
+
*/
|
|
2973
|
+
args?: string[];
|
|
2974
|
+
exitCallback?: () => void;
|
|
2975
|
+
};
|
|
2976
|
+
declare class CoreProject<PROJECT extends BaseProject = BaseProject> {
|
|
2977
|
+
static coreProjects: CoreProject<any>[];
|
|
2978
|
+
static from<Proj extends BaseProject = BaseProject<any, any>>(options: Omit<CoreProject<Proj>, 'name' | 'url' | 'branch'>): CoreProject<Proj>;
|
|
2979
|
+
private constructor();
|
|
2980
|
+
extends?: CoreProject<any>;
|
|
2981
|
+
color?: string;
|
|
2982
|
+
/**
|
|
2983
|
+
* second color for project (optional)
|
|
2984
|
+
*/
|
|
2985
|
+
secondColor?: string;
|
|
2986
|
+
/**
|
|
2987
|
+
* second color for project (optional)
|
|
2988
|
+
*/
|
|
2989
|
+
thirdColor?: string;
|
|
2990
|
+
npmRegistry?: string;
|
|
2991
|
+
description?: string;
|
|
2992
|
+
/**
|
|
2993
|
+
* ssh url for git repo
|
|
2994
|
+
*/
|
|
2995
|
+
urlSSH?: string;
|
|
2996
|
+
/**
|
|
2997
|
+
* https url for git repo
|
|
2998
|
+
*/
|
|
2999
|
+
urlHttp?: string;
|
|
3000
|
+
/**
|
|
3001
|
+
* main branches - first is default
|
|
3002
|
+
*/
|
|
3003
|
+
branches: string[];
|
|
3004
|
+
/**
|
|
3005
|
+
* project environments
|
|
3006
|
+
*/
|
|
3007
|
+
environments?: CoreProjectEnvironment[];
|
|
3008
|
+
cleanCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3009
|
+
initCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3010
|
+
/**
|
|
3011
|
+
* Build whatever is needed to run project
|
|
3012
|
+
* buildCommand includes initCommand
|
|
3013
|
+
*/
|
|
3014
|
+
buildCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3015
|
+
/**
|
|
3016
|
+
* startCommand includes initCommand, buildCommand and launchCommand
|
|
3017
|
+
*/
|
|
3018
|
+
startCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3019
|
+
/**
|
|
3020
|
+
* launch already built project
|
|
3021
|
+
*/
|
|
3022
|
+
launchCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3023
|
+
releaseCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3024
|
+
publishCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3025
|
+
deployCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3026
|
+
testCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3027
|
+
docsCommand?: (options: CoreCommandArgOptions<PROJECT>) => Promise<void>;
|
|
3028
|
+
/**
|
|
3029
|
+
* function to recognize project
|
|
3030
|
+
*/
|
|
3031
|
+
recognizedFn: (project: PROJECT) => boolean;
|
|
3032
|
+
/**
|
|
3033
|
+
* core porject name from repo basename
|
|
3034
|
+
*/
|
|
3035
|
+
get name(): string;
|
|
3036
|
+
/**
|
|
3037
|
+
* main (default for reset) branch
|
|
3038
|
+
*/
|
|
3039
|
+
get branch(): string;
|
|
3040
|
+
/**
|
|
3041
|
+
* url for git repo
|
|
3042
|
+
*/
|
|
3043
|
+
get url(): string;
|
|
3044
|
+
}
|
|
3045
|
+
declare const CoreTypescriptProject: CoreProject<BaseProject<BaseProject<any, any>, tnp_core_browser.CoreModels.BaseProjectType>>;
|
|
3046
|
+
declare const CoreAngularProject: CoreProject<BaseProject<BaseProject<any, any>, tnp_core_browser.CoreModels.BaseProjectType>>;
|
|
3047
|
+
|
|
3048
|
+
declare class LinkedProject {
|
|
3049
|
+
static from(options: Partial<LinkedProject>): LinkedProject;
|
|
3050
|
+
static fromName(projectName: string, currentRemoteUrl?: string, currentBranch?: string): any;
|
|
3051
|
+
static detect(insideLocation: string, options?: {
|
|
3052
|
+
recursive?: boolean;
|
|
3053
|
+
checkAlsoNonRepos?: boolean;
|
|
3054
|
+
}): LinkedProject[];
|
|
3055
|
+
/**
|
|
3056
|
+
* sometime there is project that has one project
|
|
3057
|
+
* embede inside another project
|
|
3058
|
+
*/
|
|
3059
|
+
internalRealtiveProjectPath?: string;
|
|
3060
|
+
/**
|
|
3061
|
+
* don't access directly, use remoteUrl() instead
|
|
3062
|
+
*/
|
|
3063
|
+
repoUrlSsh?: string;
|
|
3064
|
+
/**
|
|
3065
|
+
* don't access directly, use remoteUrl() instead
|
|
3066
|
+
*/
|
|
3067
|
+
repoUrlHttp?: string;
|
|
3068
|
+
/**
|
|
3069
|
+
* don't access directly, use remoteUrl() instead
|
|
3070
|
+
*/
|
|
3071
|
+
repoUrl?: string;
|
|
3072
|
+
/**
|
|
3073
|
+
* url for git repo
|
|
3074
|
+
*/
|
|
3075
|
+
remoteUrl(): string;
|
|
3076
|
+
remoteUrlTransformed(setOrigin: 'ssh' | 'http'): string;
|
|
3077
|
+
defaultBranch?: string;
|
|
3078
|
+
purpose?: string;
|
|
3079
|
+
relativeClonePath?: string;
|
|
3080
|
+
}
|
|
3081
|
+
declare class LinkedPorjectsConfig {
|
|
3082
|
+
static from(options: Partial<LinkedPorjectsConfig>): any;
|
|
3083
|
+
prefix?: string;
|
|
3084
|
+
skipRecrusivePush?: boolean;
|
|
3085
|
+
resetOnlyChildren?: boolean;
|
|
3086
|
+
projects: LinkedProject[];
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
type CommandType = {
|
|
3090
|
+
command?: string;
|
|
3091
|
+
exec?: ExecCommandType;
|
|
3092
|
+
title?: string;
|
|
3093
|
+
group?: string;
|
|
3094
|
+
hideContextMenu?: boolean;
|
|
3095
|
+
options?: ProcesOptions;
|
|
3096
|
+
isDefaultBuildCommand?: boolean;
|
|
3097
|
+
};
|
|
3098
|
+
type ResolveVariable = {
|
|
3099
|
+
variable: string;
|
|
3100
|
+
resolveValueFromCommand?: string;
|
|
3101
|
+
prompt?: string;
|
|
3102
|
+
placeholder?: string | Function;
|
|
3103
|
+
variableValue?: any;
|
|
3104
|
+
encode?: boolean;
|
|
3105
|
+
options?: {
|
|
3106
|
+
option: any;
|
|
3107
|
+
label: string;
|
|
3108
|
+
}[] | string;
|
|
3109
|
+
optionsResolved?: {
|
|
3110
|
+
option: any;
|
|
3111
|
+
label: string;
|
|
3112
|
+
skipNextVariableResolve?: boolean;
|
|
3113
|
+
}[];
|
|
3114
|
+
useResultAsLinkAndExit?: boolean;
|
|
3115
|
+
exitWithMessgeWhenNoOptions?: string;
|
|
3116
|
+
/**
|
|
3117
|
+
* { label: 'action item !!!', option: { action: 'STRING_SECRET_CODE' } }
|
|
3118
|
+
* { label: 'normal item', option: < primitive value > }
|
|
3119
|
+
*/
|
|
3120
|
+
fillNextVariableResolveWhenSelectedIsActionOption?: boolean;
|
|
3121
|
+
};
|
|
3122
|
+
type ProcesOptions = {
|
|
3123
|
+
progressLocation?: 'notification' | 'statusbar';
|
|
3124
|
+
findNearestProject?: boolean;
|
|
3125
|
+
findNearestProjectWithGitRoot?: boolean;
|
|
3126
|
+
findNearestProjectType?: CoreModels.LibType;
|
|
3127
|
+
findNearestProjectTypeWithGitRoot?: CoreModels.LibType;
|
|
3128
|
+
syncProcess?: boolean;
|
|
3129
|
+
reloadAfterSuccesFinish?: boolean;
|
|
3130
|
+
cancellable?: boolean;
|
|
3131
|
+
titleWhenProcessing?: string;
|
|
3132
|
+
tnpNonInteractive?: boolean;
|
|
3133
|
+
tnpShowProgress?: boolean;
|
|
3134
|
+
debug?: boolean;
|
|
3135
|
+
showOutputDataOnSuccess?: boolean;
|
|
3136
|
+
showSuccessMessage?: boolean;
|
|
3137
|
+
askBeforeExecute?: boolean;
|
|
3138
|
+
resolveVariables?: ResolveVariable[];
|
|
3139
|
+
};
|
|
3140
|
+
/**
|
|
3141
|
+
* @deprecated
|
|
3142
|
+
*/
|
|
3143
|
+
type PROGRESS_DATA_TYPE = 'info' | 'error' | 'warning' | 'event';
|
|
3144
|
+
/**
|
|
3145
|
+
* @deprecated
|
|
3146
|
+
*/
|
|
3147
|
+
interface IProgressData {
|
|
3148
|
+
/**
|
|
3149
|
+
* How man percent of progress
|
|
3150
|
+
*/
|
|
3151
|
+
value?: number;
|
|
3152
|
+
msg?: string;
|
|
3153
|
+
type?: PROGRESS_DATA_TYPE;
|
|
3154
|
+
date?: Date;
|
|
3155
|
+
}
|
|
3156
|
+
/**
|
|
3157
|
+
* @deprecated
|
|
3158
|
+
*/
|
|
3159
|
+
declare class ProgressData implements IProgressData {
|
|
3160
|
+
value: number;
|
|
3161
|
+
msg: string;
|
|
3162
|
+
type: PROGRESS_DATA_TYPE;
|
|
3163
|
+
date: Date;
|
|
3164
|
+
static resolveFrom(chunk: string, callbackOnFounded?: (json: ProgressData) => any, checkSplit?: boolean): ProgressData[];
|
|
3165
|
+
constructor(value?: number, msg?: string, type?: PROGRESS_DATA_TYPE, date?: Date);
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
/**
|
|
3169
|
+
* @deprecated
|
|
3170
|
+
*/
|
|
3171
|
+
type LogMode = 'dialog' | 'logmsg';
|
|
3172
|
+
/**
|
|
3173
|
+
* @deprecated
|
|
3174
|
+
*/
|
|
3175
|
+
declare class Log {
|
|
3176
|
+
private name;
|
|
3177
|
+
private mode;
|
|
3178
|
+
private debugMode;
|
|
3179
|
+
outputChannel: OutputChannel;
|
|
3180
|
+
constructor(name: string, mode?: LogMode, debugMode?: boolean);
|
|
3181
|
+
static instance(name: string, mode: LogMode, debugMode?: boolean): Log;
|
|
3182
|
+
data(data: string): void;
|
|
3183
|
+
info(data: string): void;
|
|
3184
|
+
error(data: string): void;
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
type ExecCommandTypeOpt = {
|
|
3188
|
+
vscode?: typeof vscode;
|
|
3189
|
+
log?: Log;
|
|
3190
|
+
context?: ExtensionContext;
|
|
3191
|
+
cwd?: string;
|
|
3192
|
+
uri: Uri;
|
|
3193
|
+
selectedUris: Uri[];
|
|
3194
|
+
rootFolderPath?: string;
|
|
3195
|
+
};
|
|
3196
|
+
type ExecCommandType = string | string[] | ((opt: ExecCommandTypeOpt) => any);
|
|
3197
|
+
declare function executeCommand(titleOfTask: any, registerName: string, commandToExecute: ExecCommandType, pOptions?: ProcesOptions, isDefaultBuildCommand?: boolean, context?: ExtensionContext, debug?: boolean): any;
|
|
3198
|
+
|
|
3199
|
+
declare const Helpers: HelpersTaon;
|
|
3200
|
+
|
|
3201
|
+
export { BaseCLiWorkerStartMode, BaseCLiWorkerStartParams, BaseCliMethodOptions, BaseCliWorker, BaseCliWorkerConfig, BaseCliWorkerConfigGetContextOptions, 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, PortsWorker, ProgressData, TaonBaseCliWorkerController, TaonPortsController, UtilsDocker, UtilsFileSync, UtilsHttp, UtilsJava, UtilsMd, UtilsNpm, UtilsPasswords, UtilsQuickFixes, UtilsTaonWorker, UtilsTypescript, UtilsVSCode, UtilsZip, UtilsZipBrowser, executeCommand, getBaseCliWorkerDatabaseConfig };
|
|
3202
|
+
export type { BaseCliWorkerGuiUrlOptions, BaseJsonFileReaderOptions, BaseProjectType, BaseWorkerTerminalActionReturnType, ChangelogData, CommandProcessRunOptions, CommandType, CommonCommitMsgBranch, CoreCommandArgOptions, CoreProjectEnvironment, DedupePackage, DockerBuild, DockerComposeFile, DockerNetwork, DockerService, DockerVolume, ExecCommandType, ExecCommandTypeOpt, IProgressData, LibrariesBuildOptions, LibraryBuildCommandOptions, NgProject, PROGRESS_DATA_TYPE, PackageJson, PackageJsonDependencyObj, PortStatus, ProcesOptions, ProcessManagerConfig, PushProcessOptions, ResolveVariable, TestBuildOptions, TypeOfCommit, TypeOfMsgPrefix };
|