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
package/browser/lib/utils.d.ts
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { ChildProcess, StdioOptions } from 'node:child_process';
|
|
3
|
-
import type * as ts from 'typescript';
|
|
4
|
-
export declare namespace UtilsNpm {
|
|
5
|
-
export const isProperVersion: (npmVersion: string) => any;
|
|
6
|
-
export const isSpecialVersion: (version: string) => boolean;
|
|
7
|
-
export const clearVersion: (version: string, options: {
|
|
8
|
-
removePrefixes?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Remove alpha, beta, rc, latest, next etc.
|
|
11
|
-
*/
|
|
12
|
-
removeSuffix?: boolean;
|
|
13
|
-
}) => string;
|
|
14
|
-
export const fixMajorVerNumber: (version: string) => string;
|
|
15
|
-
type LatestType = 'major' | 'minor' | 'patch' | {
|
|
16
|
-
majorUpTo?: number;
|
|
17
|
-
minorUpTo?: number;
|
|
18
|
-
};
|
|
19
|
-
export const getLatestVersionFromNpm: (packageName: string, options?: {
|
|
20
|
-
currentPackageVersion?: string;
|
|
21
|
-
latestType?: LatestType;
|
|
22
|
-
skipAlphaBetaNext?: boolean;
|
|
23
|
-
}) => Promise<string>;
|
|
24
|
-
export const checkIfPackageVersionAvailable: (pkgName: string, pkgVersion: string) => Promise<boolean>;
|
|
25
|
-
export const getLastMajorVersions: (pkgName: string) => Promise<string[]>;
|
|
26
|
-
export const getLastMinorVersionsForMajor: (majorVer: number, pkgName: string) => Promise<string[]>;
|
|
27
|
-
export interface VersionObjectNpm {
|
|
28
|
-
major: number;
|
|
29
|
-
minor: number;
|
|
30
|
-
patch: number;
|
|
31
|
-
}
|
|
32
|
-
export const getVerObj: (version: string) => VersionObjectNpm;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated TODO remvoe
|
|
35
|
-
*/
|
|
36
|
-
export const getLastVersions: (pkgName: string, currentVerObj: VersionObjectNpm, latestVerObj: VersionObjectNpm) => Promise<string[]>;
|
|
37
|
-
export {};
|
|
38
|
-
}
|
|
39
|
-
export declare namespace UtilsTypescript {
|
|
40
|
-
/**
|
|
41
|
-
* Remove TypeScript region blocks by their name, including nested regions.
|
|
42
|
-
*
|
|
43
|
-
* @param sourceCode - The TypeScript source code as a string.
|
|
44
|
-
* @param regionName - The name of the region to remove.
|
|
45
|
-
* @returns Modified TypeScript code without the specified regions.
|
|
46
|
-
*/
|
|
47
|
-
const removeRegionByName: (sourceCode: string, regionName: string) => string;
|
|
48
|
-
interface ExportInfo {
|
|
49
|
-
type: 'class' | 'function' | 'const' | 'let' | 'var' | 'enum' | 'type' | 'interface' | 'default' | 'module' | 'namespace';
|
|
50
|
-
name: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Function to extract exports from a TypeScript file
|
|
54
|
-
*/
|
|
55
|
-
const exportsFromFile: (filePath: string) => ExportInfo[];
|
|
56
|
-
/**
|
|
57
|
-
* Function to extract exports from a TypeScript file
|
|
58
|
-
*/
|
|
59
|
-
const exportsFromContent: (fileContent: string) => ExportInfo[];
|
|
60
|
-
const extractDefaultClassNameFromString: (sourceCode: string) => string | undefined;
|
|
61
|
-
const extractClassNameFromString: (sourceCode: string) => string[];
|
|
62
|
-
const extractClassNamesFromFile: (absoluteFilePath: string) => string[];
|
|
63
|
-
const extractDefaultClassNameFromFile: (absoluteFilePath: string) => any;
|
|
64
|
-
const formatFile: (absPathToFile: string | string[]) => void;
|
|
65
|
-
const formatAllFilesInsideFolder: (absPathToFolder: string) => void;
|
|
66
|
-
const eslintFixFile: (absPathToFile: string | string[]) => void;
|
|
67
|
-
const eslintFixAllFilesInsideFolder: (absPathToFolder: string | string[]) => void;
|
|
68
|
-
const getTaonContextFromContent: (fileContent: string) => string[];
|
|
69
|
-
const getTaonContextsNamesFromFile: (tsAbsFilePath: string) => string[];
|
|
70
|
-
const extractAngularComponentSelectors: (fileAbsPath: string) => {
|
|
71
|
-
className: string;
|
|
72
|
-
selector: string;
|
|
73
|
-
}[];
|
|
74
|
-
const wrapWithComment: (oneLineComment: string, absDestFilePath: string) => any;
|
|
75
|
-
/**
|
|
76
|
-
* Attempts to set or add an exported const with given name and value.
|
|
77
|
-
*/
|
|
78
|
-
const setValueToVariableInTsFile: (tsAbsFilePath: string, variableName: string, valueOfVariable: any, options?: {
|
|
79
|
-
skipAddIfNotExists?: boolean;
|
|
80
|
-
useRawStringValue?: boolean;
|
|
81
|
-
}) => void;
|
|
82
|
-
class TsImportExport {
|
|
83
|
-
/**
|
|
84
|
-
* for external modification
|
|
85
|
-
*/
|
|
86
|
-
embeddedPathToFileResult: string;
|
|
87
|
-
/**
|
|
88
|
-
* for external modification
|
|
89
|
-
*/
|
|
90
|
-
packageName: string;
|
|
91
|
-
/**
|
|
92
|
-
* for external modification
|
|
93
|
-
*/
|
|
94
|
-
isIsomorphic?: boolean;
|
|
95
|
-
readonly type: 'export' | 'import' | 'async-import' | 'require';
|
|
96
|
-
/**
|
|
97
|
-
* ORIGNAL
|
|
98
|
-
* Name of the file that is being imported/exported
|
|
99
|
-
* with parenthesis included , example
|
|
100
|
-
* 'my-file' or "my-file" or `my-file`
|
|
101
|
-
*/
|
|
102
|
-
readonly embeddedPathToFile: string;
|
|
103
|
-
/**
|
|
104
|
-
* same as cleanEmbeddedPathToFile but without quotes (parenthesis), example:
|
|
105
|
-
* my-file or my-file or my-file
|
|
106
|
-
*/
|
|
107
|
-
readonly cleanEmbeddedPathToFile: string;
|
|
108
|
-
readonly startRow: number;
|
|
109
|
-
readonly startCol: number;
|
|
110
|
-
readonly endRow: number;
|
|
111
|
-
readonly endCol: number;
|
|
112
|
-
readonly parenthesisType: 'single' | 'double' | 'tics';
|
|
113
|
-
readonly importElements: string[];
|
|
114
|
-
constructor(type: 'export' | 'import' | 'async-import' | 'require', embeddedPathToFile: string, start: ts.LineAndCharacter, end: ts.LineAndCharacter, parenthesisType: 'single' | 'double' | 'tics', importElements?: string[]);
|
|
115
|
-
private removeStartEndQuotes;
|
|
116
|
-
/**
|
|
117
|
-
* it will extract part of the file content
|
|
118
|
-
* that is between startRow, startCol and endRow, endCol
|
|
119
|
-
* and contains import/export/require statement
|
|
120
|
-
*/
|
|
121
|
-
getStringPartFrom(wholeContentOfFile: string): string;
|
|
122
|
-
wrapInParenthesis(str: string): string;
|
|
123
|
-
}
|
|
124
|
-
const recognizeImportsFromFile: (fileAbsPAth: string) => TsImportExport[];
|
|
125
|
-
const recognizeImportsFromContent: (fileContent: string) => TsImportExport[];
|
|
126
|
-
/**
|
|
127
|
-
* Transition methods ng18 => ng19
|
|
128
|
-
* Adds standalone: false if not exists in component decorator
|
|
129
|
-
*/
|
|
130
|
-
function transformComponentStandaloneOption(sourceText: string): string;
|
|
131
|
-
const fixHtmlTemplatesInDir: (directoryPath: string) => void;
|
|
132
|
-
function removeTaggedImportExport(tsFileContent: string, tags: string[]): string;
|
|
133
|
-
const wrapFirstImportsInImportsRegion: (fileContent: string) => string;
|
|
134
|
-
/**
|
|
135
|
-
* wrap class field with decorators
|
|
136
|
-
* wrap class methods with decorators
|
|
137
|
-
*/
|
|
138
|
-
function wrapContentClassMembersDecoratorsWithRegion(classFileContent: string, wrapTag?: string): string;
|
|
139
|
-
const clearRequireCacheRecursive: (modulePath: string, seen?: Set<string>) => void;
|
|
140
|
-
type DeepWritable<T> = {
|
|
141
|
-
-readonly [P in keyof T]: T[P] extends object ? T[P] extends Function ? T[P] : DeepWritable<T[P]> : T[P];
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
export declare namespace UtilsHttp {
|
|
145
|
-
const startHttpServer: (cwd: string, port: number, options?: {
|
|
146
|
-
startMessage?: string;
|
|
147
|
-
}) => Promise<any>;
|
|
148
|
-
}
|
|
149
|
-
export declare namespace UtilsMd {
|
|
150
|
-
/**
|
|
151
|
-
* extract assets pathes from .md file
|
|
152
|
-
*/
|
|
153
|
-
const getAssets: (mdfileContent: string) => string[];
|
|
154
|
-
const getAssetsFromFile: (absPathToFile: string) => string[];
|
|
155
|
-
/**
|
|
156
|
-
* Extract links to other Markdown files from a given Markdown content.
|
|
157
|
-
* @param mdfileContent
|
|
158
|
-
*/
|
|
159
|
-
const getLinksToOtherMdFiles: (mdfileContent: string) => string[];
|
|
160
|
-
const moveAssetsPathsToLevelFromFile: (absFilePath: string, level?: number) => string | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* Move asset paths to a higher directory level by adding "../" before each path.
|
|
163
|
-
*
|
|
164
|
-
* @param mdfileContent - The content of the .md file.
|
|
165
|
-
* @param level - The number of levels to go up (default is 1).
|
|
166
|
-
* @returns The modified content with updated asset paths.
|
|
167
|
-
*/
|
|
168
|
-
const moveAssetsPathsToLevel: (mdfileContent: string, level?: number) => string;
|
|
169
|
-
}
|
|
170
|
-
export declare namespace UtilsQuickFixes {
|
|
171
|
-
/**
|
|
172
|
-
*
|
|
173
|
-
* @param node_modules/sql.js/dist/sql-wasm.js
|
|
174
|
-
*/
|
|
175
|
-
const replaceKnownFaultyCode: (contentofSQLWasmJS: string) => string;
|
|
176
|
-
/**
|
|
177
|
-
* for some reason electron is being bundled - and it is not needed for cli
|
|
178
|
-
*/
|
|
179
|
-
const replaceElectronWithNothing: (jsContent: string, packageName: string) => string;
|
|
180
|
-
}
|
|
181
|
-
export declare namespace UtilsVSCode {
|
|
182
|
-
const calculateContrastingHexColor: (hex: string) => string;
|
|
183
|
-
const generateFancyColor: () => string;
|
|
184
|
-
const vscodeImport: () => any;
|
|
185
|
-
const regenerateVsCodeSettingsColors: (cwd: string, overideBottomColor?: string) => void;
|
|
186
|
-
}
|
|
187
|
-
export declare namespace UtilsZipBrowser {
|
|
188
|
-
const zipDirBrowser: (fileList: FileList) => Promise<Blob>;
|
|
189
|
-
const unzipArchiveBrowser: (zipBlob: Blob) => Promise<Map<string, Blob>>;
|
|
190
|
-
}
|
|
191
|
-
export declare namespace UtilsZip {
|
|
192
|
-
const splitFile7Zip: (inputPath: string, partSizeMB?: number) => Promise<number>;
|
|
193
|
-
/**
|
|
194
|
-
* Splits a file into smaller parts if its size exceeds the specified part size.
|
|
195
|
-
* @returns true if file was split, false if not needed
|
|
196
|
-
*/
|
|
197
|
-
const splitFile: (inputPath: string, partSizeMB?: number) => Promise<number>;
|
|
198
|
-
/**
|
|
199
|
-
* @returns absolute path to zip file
|
|
200
|
-
*/
|
|
201
|
-
const zipDir: (absPathToDir: string, options?: {
|
|
202
|
-
/**
|
|
203
|
-
* default false
|
|
204
|
-
*/
|
|
205
|
-
overrideIfZipFileExists?: boolean;
|
|
206
|
-
}) => Promise<string>;
|
|
207
|
-
const unzipArchive: (absPathToZip: string) => Promise<void>;
|
|
208
|
-
}
|
|
209
|
-
export declare namespace UtilsTaonWorker {
|
|
210
|
-
const getUniqueForTask: (task: string, location: string | string[]) => string;
|
|
211
|
-
}
|
|
212
|
-
export declare namespace UtilsJava {
|
|
213
|
-
const selectJdkVersion: () => Promise<string | undefined>;
|
|
214
|
-
const detectJavaVersionMacOS: (javaHome: string) => string;
|
|
215
|
-
const updateJavaHomePath: (selectedPath: string) => void;
|
|
216
|
-
const selectTomcatVersion: () => Promise<string>;
|
|
217
|
-
const updateTomcatHomePath: (selectedPath: string) => void;
|
|
218
|
-
}
|
|
219
|
-
export declare namespace UtilsPasswords {
|
|
220
|
-
const hashPassword: (password: string) => Promise<string>;
|
|
221
|
-
const verifyPassword: (password: string, stored: string) => Promise<boolean>;
|
|
222
|
-
}
|
|
223
|
-
export declare namespace UtilsDocker {
|
|
224
|
-
const DOCKER_LABEL_KEY = "com.docker.compose.project";
|
|
225
|
-
const DOCKER_TAON_PROJECT_LABEL = "com.docker.compose.taon.project=true";
|
|
226
|
-
const cleanImagesAndContainersByDockerLabel: (labelKey: string, labelValue: string) => Promise<void>;
|
|
227
|
-
interface DockerComposeActionOptions {
|
|
228
|
-
composeFileName?: string;
|
|
229
|
-
cwd?: string;
|
|
230
|
-
env?: NodeJS.ProcessEnv;
|
|
231
|
-
skipBuild?: boolean;
|
|
232
|
-
stdio?: StdioOptions;
|
|
233
|
-
useFirstYmlFound?: boolean;
|
|
234
|
-
}
|
|
235
|
-
type DockerComposeActionType = 'up' | 'down';
|
|
236
|
-
/**
|
|
237
|
-
* @returns cmd + args array
|
|
238
|
-
* you can use with child_process.spawn
|
|
239
|
-
* const [cmd, ...args] = getDockerComposeActionCommand('up');
|
|
240
|
-
* child.spawn(cmd, args, { ... });
|
|
241
|
-
*
|
|
242
|
-
* @param action 'up' | 'down'
|
|
243
|
-
*/
|
|
244
|
-
const getDockerComposeActionCommand: (action: DockerComposeActionType, options?: Omit<DockerComposeActionOptions, "cwd" | "env" | "stdio" | "useFirstYmlFound">) => string[];
|
|
245
|
-
const getDockerComposeActionChildProcess: (action: DockerComposeActionType, options?: DockerComposeActionOptions) => ChildProcess;
|
|
246
|
-
const removeAllTaonContainersAndImagesFromDocker: () => Promise<void>;
|
|
247
|
-
/**
|
|
248
|
-
* @TODO @REFACTOR use async stuff
|
|
249
|
-
*/
|
|
250
|
-
const linkPodmanAsDockerIfNecessary: () => Promise<void>;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* ! TODO @IN_PROGRESS @LAST
|
|
254
|
-
*/
|
|
255
|
-
export declare namespace UtilsFileSync {
|
|
256
|
-
interface FoldersSyncOptions {
|
|
257
|
-
androidFolder: string;
|
|
258
|
-
macPhotosLibrary: string;
|
|
259
|
-
tempConvertFolder: string;
|
|
260
|
-
/**
|
|
261
|
-
* If true, skips the terminal menu confirmation on startup
|
|
262
|
-
* (default: false) - perfect for automated scripts
|
|
263
|
-
*/
|
|
264
|
-
skipTerminalMenu?: boolean;
|
|
265
|
-
/**
|
|
266
|
-
* for testing purposes only
|
|
267
|
-
*/
|
|
268
|
-
onlyProcessFiles?: string[];
|
|
269
|
-
}
|
|
270
|
-
export const forFolders: (folder: FoldersSyncOptions) => Promise<void>;
|
|
271
|
-
export {};
|
|
272
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Taon } from 'taon/browser';
|
|
3
|
-
import { QueryRunner } from 'taon-typeorm/browser';
|
|
4
|
-
export declare class MainContext_1736198527297_init extends Taon.Base.Migration {
|
|
5
|
-
/**
|
|
6
|
-
* remove this method if you are ready to run this migration
|
|
7
|
-
*/
|
|
8
|
-
isReadyToRun(): boolean;
|
|
9
|
-
up(queryRunner: QueryRunner): Promise<any>;
|
|
10
|
-
down(queryRunner: QueryRunner): Promise<any>;
|
|
11
|
-
}
|
|
12
|
-
export declare class TaonPortsContext_1736198527297_init extends Taon.Base.Migration {
|
|
13
|
-
/**
|
|
14
|
-
* remove this method if you are ready to run this migration
|
|
15
|
-
*/
|
|
16
|
-
isReadyToRun(): boolean;
|
|
17
|
-
up(queryRunner: QueryRunner): Promise<any>;
|
|
18
|
-
down(queryRunner: QueryRunner): Promise<any>;
|
|
19
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Taon } from 'taon/browser';
|
|
3
|
-
import { QueryRunner } from 'taon-typeorm/browser';
|
|
4
|
-
import { TaonPortsController } from '../lib';
|
|
5
|
-
export declare class TaonPortsContext_1736199486472_addingNotAssignablePorts extends Taon
|
|
6
|
-
.Base.Migration {
|
|
7
|
-
protected portsController: TaonPortsController;
|
|
8
|
-
private readonly commonPortsFrom3000to6000;
|
|
9
|
-
up(queryRunner: QueryRunner): Promise<any>;
|
|
10
|
-
down(queryRunner: QueryRunner): Promise<any>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Taon } from 'taon/browser';
|
|
3
|
-
import { QueryRunner } from 'taon-typeorm/browser';
|
|
4
|
-
import { TaonPortsController } from '../lib';
|
|
5
|
-
export declare class TaonPortsContext_1736454437350_addFreePorts extends Taon.Base
|
|
6
|
-
.Migration {
|
|
7
|
-
protected portsController: TaonPortsController;
|
|
8
|
-
up(queryRunner: QueryRunner): Promise<any>;
|
|
9
|
-
down(queryRunner: QueryRunner): Promise<any>;
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { MainContext_1736198527297_init, TaonPortsContext_1736198527297_init } from './1736198527297_init';
|
|
3
|
-
import { TaonPortsContext_1736199486472_addingNotAssignablePorts } from './1736199486472_addingNotAssignablePorts';
|
|
4
|
-
import { TaonPortsContext_1736454437350_addFreePorts } from './1736454437350_addFreePorts';
|
|
5
|
-
export declare const MIGRATIONS_CLASSES_FOR_MainContext: {
|
|
6
|
-
MainContext_1736198527297_init: typeof MainContext_1736198527297_init;
|
|
7
|
-
};
|
|
8
|
-
export declare const MIGRATIONS_CLASSES_FOR_TaonPortsContext: {
|
|
9
|
-
TaonPortsContext_1736198527297_init: typeof TaonPortsContext_1736198527297_init;
|
|
10
|
-
TaonPortsContext_1736199486472_addingNotAssignablePorts: typeof TaonPortsContext_1736199486472_addingNotAssignablePorts;
|
|
11
|
-
TaonPortsContext_1736454437350_addFreePorts: typeof TaonPortsContext_1736454437350_addFreePorts;
|
|
12
|
-
};
|
package/browser/public-api.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { BaseProject } from './base-project';
|
|
2
|
-
import type { BaseProjectResolver } from './base-project-resolver';
|
|
3
|
-
export declare abstract class BaseCommandLineFeature<PARAMS extends {} = any, PROJECT extends BaseProject<any, any> = BaseProject, PROJECT_RESOLVER extends BaseProjectResolver<PROJECT> = BaseProjectResolver<PROJECT>> {
|
|
4
|
-
protected readonly argsWithParams: string;
|
|
5
|
-
protected readonly methodNameToCall: string;
|
|
6
|
-
/**
|
|
7
|
-
* process.cwd()
|
|
8
|
-
*/
|
|
9
|
-
protected cwd: string;
|
|
10
|
-
/**
|
|
11
|
-
* params from command line
|
|
12
|
-
*/
|
|
13
|
-
protected params: PARAMS;
|
|
14
|
-
protected ins: PROJECT_RESOLVER;
|
|
15
|
-
protected __transformArgsBeforeResolvingParams__(args: string[]): string[];
|
|
16
|
-
/**
|
|
17
|
-
* clean args without params from command line
|
|
18
|
-
*/
|
|
19
|
-
protected args: string[];
|
|
20
|
-
/**
|
|
21
|
-
* first arg from args
|
|
22
|
-
*/
|
|
23
|
-
get firstArg(): string;
|
|
24
|
-
/**
|
|
25
|
-
* last arg from args
|
|
26
|
-
*/
|
|
27
|
-
get lastArg(): string;
|
|
28
|
-
private __project;
|
|
29
|
-
protected get project(): PROJECT;
|
|
30
|
-
protected set project(v: PROJECT);
|
|
31
|
-
constructor(argsWithParams: string, methodNameToCall: string,
|
|
32
|
-
/**
|
|
33
|
-
* nearest project to cwd
|
|
34
|
-
*/
|
|
35
|
-
project: PROJECT,
|
|
36
|
-
/**
|
|
37
|
-
* process.cwd()
|
|
38
|
-
*/
|
|
39
|
-
cwd: string, ins: PROJECT_RESOLVER);
|
|
40
|
-
protected _exit(code?: number): void;
|
|
41
|
-
protected __initialize__(): void;
|
|
42
|
-
_tryResolveChildIfInsideArg(): void;
|
|
43
|
-
/**
|
|
44
|
-
* method called when not using class methods
|
|
45
|
-
*/
|
|
46
|
-
abstract _(): any;
|
|
47
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseCommandLineFeature = void 0;
|
|
4
|
-
const lib_1 = require("tnp-core/lib");
|
|
5
|
-
const lib_2 = require("typescript-class-helpers/lib");
|
|
6
|
-
const index_1 = require("../../index");
|
|
7
|
-
//#endregion
|
|
8
|
-
class BaseCommandLineFeature {
|
|
9
|
-
argsWithParams;
|
|
10
|
-
methodNameToCall;
|
|
11
|
-
cwd;
|
|
12
|
-
/**
|
|
13
|
-
* params from command line
|
|
14
|
-
*/
|
|
15
|
-
params;
|
|
16
|
-
ins;
|
|
17
|
-
__transformArgsBeforeResolvingParams__(args) {
|
|
18
|
-
const transformaed = args.map(a => {
|
|
19
|
-
return a
|
|
20
|
-
.replace(`--copyTo`, '--copyto')
|
|
21
|
-
.replace(`copyTo`, '--copyto')
|
|
22
|
-
.replace(`copyto`, '--copyto');
|
|
23
|
-
});
|
|
24
|
-
return transformaed;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* clean args without params from command line
|
|
28
|
-
*/
|
|
29
|
-
args;
|
|
30
|
-
/**
|
|
31
|
-
* first arg from args
|
|
32
|
-
*/
|
|
33
|
-
get firstArg() {
|
|
34
|
-
return lib_1._.first(this.args);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* last arg from args
|
|
38
|
-
*/
|
|
39
|
-
get lastArg() {
|
|
40
|
-
return lib_1._.last(this.args);
|
|
41
|
-
}
|
|
42
|
-
__project;
|
|
43
|
-
get project() {
|
|
44
|
-
return this.__project;
|
|
45
|
-
}
|
|
46
|
-
set project(v) {
|
|
47
|
-
// if (!v) {
|
|
48
|
-
// Helpers.error(
|
|
49
|
-
// `Command line cannot be executed on folder that is not know project.`,
|
|
50
|
-
// false,
|
|
51
|
-
// true,
|
|
52
|
-
// );
|
|
53
|
-
// }
|
|
54
|
-
this.__project = v;
|
|
55
|
-
}
|
|
56
|
-
//#region @backend
|
|
57
|
-
constructor(argsWithParams, methodNameToCall,
|
|
58
|
-
/**
|
|
59
|
-
* nearest project to cwd
|
|
60
|
-
*/
|
|
61
|
-
project,
|
|
62
|
-
/**
|
|
63
|
-
* process.cwd()
|
|
64
|
-
*/
|
|
65
|
-
cwd, ins) {
|
|
66
|
-
this.argsWithParams = argsWithParams;
|
|
67
|
-
this.methodNameToCall = methodNameToCall;
|
|
68
|
-
this.cwd = cwd;
|
|
69
|
-
this.ins = ins;
|
|
70
|
-
this.project = project;
|
|
71
|
-
this.cwd = (0, lib_1.crossPlatformPath)(cwd);
|
|
72
|
-
//#region resolve params and args
|
|
73
|
-
// this.project = Project.Current as Project;
|
|
74
|
-
const className = lib_2.CLASS.getNameFromObject(this);
|
|
75
|
-
const methods = lib_2.CLASS.getMethodsNames(this).filter(f => !f.startsWith('_'));
|
|
76
|
-
// console.log({ className, methods })
|
|
77
|
-
//#region methods names from prototype hack
|
|
78
|
-
// const classFn = Object.getPrototypeOf(this).constructor;
|
|
79
|
-
// console.log({ className, methods });
|
|
80
|
-
// Object.defineProperty($Global.prototype.version, 'name', { value: 'version', writable: true });
|
|
81
|
-
// HACK: to set name of global methods
|
|
82
|
-
// TODO this will not survive minification
|
|
83
|
-
// for (const classMethodsName of methods) {
|
|
84
|
-
// Object.defineProperty(classFn.prototype[classMethodsName], 'name', {
|
|
85
|
-
// value:
|
|
86
|
-
// classFn === '$Global' // TODO register alywas $Global as ''
|
|
87
|
-
// ? classMethodsName
|
|
88
|
-
// : `${className}.${classMethodsName}`,
|
|
89
|
-
// writable: false,
|
|
90
|
-
// });
|
|
91
|
-
// }
|
|
92
|
-
//#endregion
|
|
93
|
-
const firstArg = lib_1._.first(argsWithParams.split(' '));
|
|
94
|
-
const method = methods.find(m => m === firstArg);
|
|
95
|
-
// console.log('className',className)
|
|
96
|
-
if (method && !!className) {
|
|
97
|
-
// this prevents taon reset develop => to run: taon develop
|
|
98
|
-
methodNameToCall = method;
|
|
99
|
-
argsWithParams = argsWithParams.split(' ').slice(1).join(' ');
|
|
100
|
-
this.argsWithParams = argsWithParams;
|
|
101
|
-
}
|
|
102
|
-
this.params =
|
|
103
|
-
require('minimist')(this.__transformArgsBeforeResolvingParams__(argsWithParams.split(' '))) || {};
|
|
104
|
-
delete this.params['_']; // TODO quickfix
|
|
105
|
-
const allArgsToClear = Object.keys(this.params);
|
|
106
|
-
// console.log(this.params)
|
|
107
|
-
// for (const deleteArgKey of allArgsToClear) {
|
|
108
|
-
// delete this.params[deleteArgKey];
|
|
109
|
-
// }
|
|
110
|
-
// console.log({ clearArgs: allArgsToClear })
|
|
111
|
-
this.args = index_1.Helpers.cliTool
|
|
112
|
-
.removeArgsFromCommand(argsWithParams, allArgsToClear)
|
|
113
|
-
.split(' ')
|
|
114
|
-
.filter(f => !!f);
|
|
115
|
-
index_1.Helpers.runSyncOrAsync({
|
|
116
|
-
functionFn: this.__initialize__,
|
|
117
|
-
arrayOfParams: [this.params, this.project, this.args],
|
|
118
|
-
context: this,
|
|
119
|
-
}).then(() => {
|
|
120
|
-
if (methodNameToCall) {
|
|
121
|
-
if (lib_1._.isFunction(this[methodNameToCall])) {
|
|
122
|
-
this[methodNameToCall]();
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
index_1.Helpers.error(`Class ${lib_2.CLASS.getName(this)} doesn't have method '${methodNameToCall}'`, false, true);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
this._();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
//#endregion
|
|
133
|
-
}
|
|
134
|
-
//#endregion
|
|
135
|
-
_exit(code = 0) {
|
|
136
|
-
process.exit(code);
|
|
137
|
-
}
|
|
138
|
-
__initialize__() { }
|
|
139
|
-
_tryResolveChildIfInsideArg() {
|
|
140
|
-
const { resolved, clearedCommand, } = // @ts-ignore
|
|
141
|
-
index_1.Helpers.cliTool.resolveItemFromArgsBegin(this.args, arg => this.project.getChildBy(arg.replace(/\/$/, '')));
|
|
142
|
-
this.project = resolved ? resolved : this.project;
|
|
143
|
-
this.args = resolved ? clearedCommand.split(' ') : this.args;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
exports.BaseCommandLineFeature = BaseCommandLineFeature;
|
|
147
|
-
//# sourceMappingURL=base-command-line-feature.backend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-command-line-feature.backend.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAEA,sCAA0D;AAC1D,sDAAqD;AAErD,uCAAsC;AAKtC,YAAY;AAEZ,MAAsB,sBAAsB;IAyDrB;IACA;IAQT;IA5DZ;;OAEG;IACO,MAAM,CAAS;IACf,GAAG,CAAmB;IAEtB,sCAAsC,CAAC,IAAc;QAC7D,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YAChC,OAAO,CAAC;iBACL,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;iBAC/B,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC;iBAC7B,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QACH,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACO,IAAI,CAAW;IACzB;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,OAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,OAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEO,SAAS,CAAU;IAC3B,IAAc,OAAO;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,IAAc,OAAO,CAAC,CAAU;QAC9B,YAAY;QACZ,mBAAmB;QACnB,6EAA6E;QAC7E,aAAa;QACb,YAAY;QACZ,OAAO;QACP,IAAI;QACJ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,kBAAkB;IAClB,YACqB,cAAsB,EACtB,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