tnp-helpers 18.0.19 → 18.0.21
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/browser/esm2022/lib/base/classes/base-bower-json.mjs +14 -0
- package/browser/esm2022/lib/base/classes/base-cli-worker-config.mjs +1 -4
- package/browser/esm2022/lib/base/classes/base-cli-worker-controller.mjs +1 -1
- package/browser/esm2022/lib/base/classes/base-cli-worker.mjs +14 -4
- package/browser/esm2022/lib/base/classes/base-debounce-compiler-for-project.mjs +5 -5
- package/browser/esm2022/lib/base/classes/base-feature-for-project.mjs +4 -1
- package/browser/esm2022/lib/base/classes/base-git.mjs +244 -4
- package/browser/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/browser/esm2022/lib/base/classes/base-library-build.mjs +35 -10
- package/browser/esm2022/lib/base/classes/base-linked-projects.mjs +8 -5
- package/browser/esm2022/lib/base/classes/base-node-modules.mjs +495 -0
- package/browser/esm2022/lib/base/classes/base-npm-helpers.mjs +32 -430
- package/browser/esm2022/lib/base/classes/base-package-json.mjs +340 -0
- package/browser/esm2022/lib/base/classes/base-process-manager.mjs +285 -0
- package/browser/esm2022/lib/base/classes/base-project-resolver.mjs +2 -11
- package/browser/esm2022/lib/base/classes/base-project.mjs +83 -87
- package/browser/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/browser/esm2022/lib/base/classes/base-release-process.mjs +34 -36
- package/browser/esm2022/lib/base/classes/{base-github-pages.mjs → base-static-pages.mjs} +6 -6
- package/browser/esm2022/lib/base/classes/base-vscode.mjs +31 -1
- package/browser/esm2022/lib/base/classes/index.mjs +5 -1
- package/browser/esm2022/lib/base/commit-data.mjs +21 -4
- package/browser/esm2022/lib/base/core-project.mjs +3 -3
- package/browser/esm2022/lib/base/linked-project.mjs +4 -4
- package/browser/esm2022/lib/base/tcp-udp-ports/tcp-udp-ports.context.mjs +2 -4
- package/browser/esm2022/lib/base/translate.mjs +566 -0
- package/browser/esm2022/lib/helpers/helpers-array-obj.mjs +5 -10
- package/browser/esm2022/lib/helpers/helpers.mjs +12 -6
- package/browser/esm2022/lib/index.mjs +2 -4
- package/browser/esm2022/lib/models.mjs +173 -3
- package/browser/esm2022/lib/utils.mjs +402 -41
- package/browser/fesm2022/tnp-helpers.mjs +4616 -2904
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base/classes/base-bower-json.d.ts +35 -0
- package/browser/lib/base/classes/base-cli-worker.d.ts +2 -2
- package/browser/lib/base/classes/base-debounce-compiler-for-project.d.ts +5 -5
- package/browser/lib/base/classes/base-feature-for-project.d.ts +2 -1
- package/browser/lib/base/classes/base-git.d.ts +42 -5
- package/browser/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/browser/lib/base/classes/base-library-build.d.ts +8 -11
- package/browser/lib/base/classes/base-linked-projects.d.ts +1 -2
- package/browser/lib/base/classes/base-node-modules.d.ts +56 -0
- package/browser/lib/base/classes/base-npm-helpers.d.ts +29 -108
- package/browser/lib/base/classes/base-package-json.d.ts +107 -0
- package/browser/lib/base/classes/base-process-manager.d.ts +31 -0
- package/browser/lib/base/classes/base-project-resolver.d.ts +2 -2
- package/browser/lib/base/classes/base-project.d.ts +17 -18
- package/browser/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/browser/lib/base/classes/base-release-process.d.ts +15 -13
- package/browser/lib/base/classes/{base-github-pages.d.ts → base-static-pages.d.ts} +3 -3
- package/browser/lib/base/classes/base-vscode.d.ts +4 -0
- package/browser/lib/base/classes/index.d.ts +5 -1
- package/browser/lib/base/commit-data.d.ts +14 -1
- package/browser/lib/base/core-project.d.ts +1 -1
- package/browser/lib/base/linked-project.d.ts +1 -1
- package/browser/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
- package/browser/lib/base/translate.d.ts +228 -0
- package/browser/lib/helpers/helpers-array-obj.d.ts +3 -0
- package/browser/lib/helpers/helpers.d.ts +12 -8
- package/browser/lib/index.d.ts +1 -3
- package/browser/lib/models.d.ts +68 -8
- package/browser/lib/utils.d.ts +72 -13
- package/client/README.md +24 -24
- package/client/esm2022/lib/base/classes/base-bower-json.mjs +14 -0
- package/client/esm2022/lib/base/classes/base-cli-worker-config.mjs +1 -4
- package/client/esm2022/lib/base/classes/base-cli-worker-controller.mjs +1 -1
- package/client/esm2022/lib/base/classes/base-cli-worker.mjs +14 -4
- package/client/esm2022/lib/base/classes/base-debounce-compiler-for-project.mjs +5 -5
- package/client/esm2022/lib/base/classes/base-feature-for-project.mjs +4 -1
- package/client/esm2022/lib/base/classes/base-git.mjs +244 -4
- package/client/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/client/esm2022/lib/base/classes/base-library-build.mjs +35 -10
- package/client/esm2022/lib/base/classes/base-linked-projects.mjs +8 -5
- package/client/esm2022/lib/base/classes/base-node-modules.mjs +495 -0
- package/client/esm2022/lib/base/classes/base-npm-helpers.mjs +32 -430
- package/client/esm2022/lib/base/classes/base-package-json.mjs +340 -0
- package/client/esm2022/lib/base/classes/base-process-manager.mjs +285 -0
- package/client/esm2022/lib/base/classes/base-project-resolver.mjs +2 -11
- package/client/esm2022/lib/base/classes/base-project.mjs +83 -87
- package/client/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/client/esm2022/lib/base/classes/base-release-process.mjs +34 -36
- package/client/esm2022/lib/base/classes/{base-github-pages.mjs → base-static-pages.mjs} +6 -6
- package/client/esm2022/lib/base/classes/base-vscode.mjs +31 -1
- package/client/esm2022/lib/base/classes/index.mjs +5 -1
- package/client/esm2022/lib/base/commit-data.mjs +21 -4
- package/client/esm2022/lib/base/core-project.mjs +3 -3
- package/client/esm2022/lib/base/linked-project.mjs +4 -4
- package/client/esm2022/lib/base/tcp-udp-ports/tcp-udp-ports.context.mjs +2 -4
- package/client/esm2022/lib/base/translate.mjs +566 -0
- package/client/esm2022/lib/helpers/helpers-array-obj.mjs +5 -10
- package/client/esm2022/lib/helpers/helpers.mjs +12 -6
- package/client/esm2022/lib/index.mjs +2 -4
- package/client/esm2022/lib/models.mjs +173 -3
- package/client/esm2022/lib/utils.mjs +402 -41
- package/client/fesm2022/tnp-helpers.mjs +4616 -2904
- package/client/fesm2022/tnp-helpers.mjs.map +1 -1
- package/client/lib/base/classes/base-bower-json.d.ts +35 -0
- package/client/lib/base/classes/base-cli-worker.d.ts +2 -2
- package/client/lib/base/classes/base-debounce-compiler-for-project.d.ts +5 -5
- package/client/lib/base/classes/base-feature-for-project.d.ts +2 -1
- package/client/lib/base/classes/base-git.d.ts +42 -5
- package/client/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/client/lib/base/classes/base-library-build.d.ts +8 -11
- package/client/lib/base/classes/base-linked-projects.d.ts +1 -2
- package/client/lib/base/classes/base-node-modules.d.ts +56 -0
- package/client/lib/base/classes/base-npm-helpers.d.ts +29 -108
- package/client/lib/base/classes/base-package-json.d.ts +107 -0
- package/client/lib/base/classes/base-process-manager.d.ts +31 -0
- package/client/lib/base/classes/base-project-resolver.d.ts +2 -2
- package/client/lib/base/classes/base-project.d.ts +17 -18
- package/client/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/client/lib/base/classes/base-release-process.d.ts +15 -13
- package/{websql/lib/base/classes/base-github-pages.d.ts → client/lib/base/classes/base-static-pages.d.ts} +3 -3
- package/client/lib/base/classes/base-vscode.d.ts +4 -0
- package/client/lib/base/classes/index.d.ts +5 -1
- package/client/lib/base/commit-data.d.ts +14 -1
- package/client/lib/base/core-project.d.ts +1 -1
- package/client/lib/base/linked-project.d.ts +1 -1
- package/client/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
- package/client/lib/base/translate.d.ts +228 -0
- package/client/lib/helpers/helpers-array-obj.d.ts +3 -0
- package/client/lib/helpers/helpers.d.ts +12 -8
- package/client/lib/index.d.ts +1 -3
- package/client/lib/models.d.ts +68 -8
- package/client/lib/utils.d.ts +72 -13
- package/index.js +15 -2
- package/index.js.map +1 -1
- package/lib/base/base-cli-worker-config.d.ts +27 -0
- package/lib/base/base-cli-worker-config.js +53 -0
- package/lib/base/base-cli-worker-config.js.map +1 -0
- package/lib/base/base-cli-worker-controller.d.ts +15 -0
- package/lib/base/base-cli-worker-controller.js +154 -0
- package/lib/base/base-cli-worker-controller.js.map +1 -0
- package/lib/base/base-cli-worker.d.ts +82 -0
- package/lib/base/base-cli-worker.js +654 -0
- package/lib/base/base-cli-worker.js.map +1 -0
- package/lib/base/base-command-line.backend.d.ts +174 -0
- package/lib/base/base-command-line.backend.js +2221 -0
- package/lib/base/base-command-line.backend.js.map +1 -0
- package/lib/base/base-compiler-for-project.d.ts +7 -0
- package/lib/base/base-compiler-for-project.js +62 -0
- package/lib/base/base-compiler-for-project.js.map +1 -0
- package/lib/base/base-db.d.ts +12 -0
- package/lib/base/base-db.js +74 -0
- package/lib/base/base-db.js.map +1 -0
- package/lib/base/base-debounce-compiler-for-project.d.ts +28 -0
- package/lib/base/base-debounce-compiler-for-project.js +82 -0
- package/lib/base/base-debounce-compiler-for-project.js.map +1 -0
- package/lib/base/base-detached-service.d.ts +6 -0
- package/lib/base/base-detached-service.js +16 -0
- package/lib/base/base-detached-service.js.map +1 -0
- package/lib/base/base-feature-for-project.d.ts +5 -0
- package/lib/base/base-feature-for-project.js +11 -0
- package/lib/base/base-feature-for-project.js.map +1 -0
- package/lib/base/base-git.d.ts +148 -0
- package/lib/base/base-git.js +1202 -0
- package/lib/base/base-git.js.map +1 -0
- package/{client/lib/base/classes → lib/base}/base-github-pages.d.ts +4 -5
- package/lib/base/base-github-pages.js +173 -0
- package/lib/base/base-github-pages.js.map +1 -0
- package/lib/base/base-ignore-hide.d.ts +14 -0
- package/lib/base/base-ignore-hide.js +55 -0
- package/lib/base/base-ignore-hide.js.map +1 -0
- package/lib/base/base-library-build.d.ts +65 -0
- package/lib/base/base-library-build.js +717 -0
- package/lib/base/base-library-build.js.map +1 -0
- package/lib/base/base-linked-projects.d.ts +24 -0
- package/lib/base/base-linked-projects.js +408 -0
- package/lib/base/base-linked-projects.js.map +1 -0
- package/lib/base/base-npm-helpers.d.ts +128 -0
- package/lib/base/base-npm-helpers.js +774 -0
- package/lib/base/base-npm-helpers.js.map +1 -0
- package/lib/base/base-project-resolver.d.ts +41 -0
- package/lib/base/base-project-resolver.js +308 -0
- package/lib/base/base-project-resolver.js.map +1 -0
- package/lib/base/base-project.d.ts +244 -0
- package/lib/base/base-project.js +1223 -0
- package/lib/base/base-project.js.map +1 -0
- package/lib/base/base-quick-fixes.d.ts +6 -0
- package/lib/base/base-quick-fixes.js +31 -0
- package/lib/base/base-quick-fixes.js.map +1 -0
- package/lib/base/base-release-process.d.ts +69 -0
- package/lib/base/base-release-process.js +913 -0
- package/lib/base/base-release-process.js.map +1 -0
- package/lib/base/base-start-config.backend.d.ts +36 -0
- package/lib/base/base-start-config.backend.js +167 -0
- package/lib/base/base-start-config.backend.js.map +1 -0
- package/lib/base/base-vscode.d.ts +12 -0
- package/lib/base/base-vscode.js +139 -0
- package/lib/base/base-vscode.js.map +1 -0
- package/lib/base/classes/base-bower-json.d.ts +34 -0
- package/lib/base/classes/base-bower-json.js +19 -0
- package/lib/base/classes/base-bower-json.js.map +1 -0
- package/lib/base/classes/base-cli-worker-config.js +35 -24
- package/lib/base/classes/base-cli-worker-config.js.map +1 -1
- package/lib/base/classes/base-cli-worker-controller.js +98 -128
- package/lib/base/classes/base-cli-worker-controller.js.map +1 -1
- package/lib/base/classes/base-cli-worker.d.ts +2 -2
- package/lib/base/classes/base-cli-worker.js +402 -606
- package/lib/base/classes/base-cli-worker.js.map +1 -1
- package/lib/base/classes/base-command-line-feature.backend.d.ts +5 -9
- package/lib/base/classes/base-command-line-feature.backend.js +73 -132
- package/lib/base/classes/base-command-line-feature.backend.js.map +1 -1
- package/lib/base/classes/base-command-line.backend.d.ts +175 -0
- package/lib/base/classes/base-command-line.backend.js +2235 -0
- package/lib/base/classes/base-command-line.backend.js.map +1 -0
- package/lib/base/classes/base-compiler-for-project.js +27 -32
- package/lib/base/classes/base-compiler-for-project.js.map +1 -1
- package/lib/base/classes/base-db.js +43 -60
- package/lib/base/classes/base-db.js.map +1 -1
- package/lib/base/classes/base-debounce-compiler-for-project.d.ts +5 -5
- package/lib/base/classes/base-debounce-compiler-for-project.js +44 -70
- package/lib/base/classes/base-debounce-compiler-for-project.js.map +1 -1
- package/lib/base/classes/base-detached-service.js.map +1 -1
- package/lib/base/classes/base-feature-for-project.d.ts +2 -1
- package/lib/base/classes/base-feature-for-project.js +7 -4
- package/lib/base/classes/base-feature-for-project.js.map +1 -1
- package/lib/base/classes/base-git.d.ts +40 -3
- package/lib/base/classes/base-git.js +885 -943
- package/lib/base/classes/base-git.js.map +1 -1
- package/lib/base/classes/base-github-pages.js.map +1 -1
- package/lib/base/classes/base-global-command-line.backend.d.ts +10 -2
- package/lib/base/classes/base-global-command-line.backend.js +1058 -2011
- package/lib/base/classes/base-global-command-line.backend.js.map +1 -1
- package/lib/base/classes/base-ignore-hide.d.ts +2 -2
- package/lib/base/classes/base-ignore-hide.js +24 -28
- package/lib/base/classes/base-ignore-hide.js.map +1 -1
- package/lib/base/classes/base-json-file-reader.d.ts +71 -0
- package/lib/base/classes/base-json-file-reader.js +141 -0
- package/lib/base/classes/base-json-file-reader.js.map +1 -0
- package/lib/base/classes/base-library-build.d.ts +8 -12
- package/lib/base/classes/base-library-build.js +433 -638
- package/lib/base/classes/base-library-build.js.map +1 -1
- package/lib/base/classes/base-linked-projects.d.ts +1 -3
- package/lib/base/classes/base-linked-projects.js +200 -314
- package/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib/base/classes/base-node-modules.d.ts +55 -0
- package/lib/base/classes/base-node-modules.js +415 -0
- package/lib/base/classes/base-node-modules.js.map +1 -0
- package/lib/base/classes/base-npm-helpers.d.ts +29 -97
- package/lib/base/classes/base-npm-helpers.js +178 -729
- package/lib/base/classes/base-npm-helpers.js.map +1 -1
- package/lib/base/classes/base-package-json.d.ts +106 -0
- package/lib/base/classes/base-package-json.js +381 -0
- package/lib/base/classes/base-package-json.js.map +1 -0
- package/lib/base/classes/base-process-manager.d.ts +30 -0
- package/lib/base/classes/base-process-manager.js +269 -0
- package/lib/base/classes/base-process-manager.js.map +1 -0
- package/lib/base/classes/base-project-resolver.d.ts +2 -3
- package/lib/base/classes/base-project-resolver.js +102 -119
- package/lib/base/classes/base-project-resolver.js.map +1 -1
- package/lib/base/classes/base-project.d.ts +20 -17
- package/lib/base/classes/base-project.js +553 -760
- package/lib/base/classes/base-project.js.map +1 -1
- package/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/lib/base/classes/base-quick-fixes.js +45 -17
- package/lib/base/classes/base-quick-fixes.js.map +1 -1
- package/lib/base/classes/base-release-process.d.ts +15 -13
- package/lib/base/classes/base-release-process.js +487 -835
- package/lib/base/classes/base-release-process.js.map +1 -1
- package/lib/base/classes/base-start-config.backend.js +116 -100
- package/lib/base/classes/base-start-config.backend.js.map +1 -1
- package/lib/base/classes/base-static-pages.d.ts +14 -0
- package/lib/base/classes/base-static-pages.js +105 -0
- package/lib/base/classes/base-static-pages.js.map +1 -0
- package/lib/base/classes/base-vscode.d.ts +4 -0
- package/lib/base/classes/base-vscode.js +446 -424
- package/lib/base/classes/base-vscode.js.map +1 -1
- package/lib/base/classes/index copy.d.ts +22 -0
- package/lib/base/classes/index copy.js +28 -0
- package/lib/base/classes/index copy.js.map +1 -0
- package/lib/base/classes/index.d.ts +4 -0
- package/lib/base/classes/index.js +36 -19
- package/lib/base/classes/index.js.map +1 -1
- package/lib/base/command-line-feature.backend.d.ts +51 -0
- package/lib/base/command-line-feature.backend.js +206 -0
- package/lib/base/command-line-feature.backend.js.map +1 -0
- package/lib/base/commit-data.d.ts +14 -1
- package/lib/base/commit-data.js +411 -464
- package/lib/base/commit-data.js.map +1 -1
- package/lib/base/config-database.js +33 -61
- package/lib/base/config-database.js.map +1 -1
- package/lib/base/core-project.d.ts +1 -1
- package/lib/base/core-project.js +110 -146
- package/lib/base/core-project.js.map +1 -1
- package/lib/base/gh-temp-code.d.ts +1 -0
- package/lib/base/gh-temp-code.js +62 -104
- package/lib/base/gh-temp-code.js.map +1 -1
- package/lib/base/index-rebuilder.backend.d.ts +1 -0
- package/lib/base/index-rebuilder.backend.js.map +1 -1
- package/lib/base/index.js +20 -7
- package/lib/base/index.js.map +1 -1
- package/lib/base/linked-project.d.ts +1 -1
- package/lib/base/linked-project.js +59 -38
- package/lib/base/linked-project.js.map +1 -1
- package/lib/base/ports-worker.d.ts +32 -0
- package/lib/base/ports-worker.js +244 -0
- package/lib/base/ports-worker.js.map +1 -0
- package/lib/base/project-database.js +12 -22
- package/lib/base/project-database.js.map +1 -1
- package/lib/base/tcp-udp-ports/index.js +17 -4
- package/lib/base/tcp-udp-ports/index.js.map +1 -1
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.d.ts +1 -0
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js.map +1 -1
- package/lib/base/tcp-udp-ports/port.entity.d.ts +0 -0
- package/lib/base/tcp-udp-ports/port.entity.js +5 -0
- package/lib/base/tcp-udp-ports/port.entity.js.map +1 -0
- package/lib/base/tcp-udp-ports/ports.controller.js +195 -283
- package/lib/base/tcp-udp-ports/ports.controller.js.map +1 -1
- package/lib/base/tcp-udp-ports/ports.entity.d.ts +2 -2
- package/lib/base/tcp-udp-ports/ports.entity.js +74 -62
- package/lib/base/tcp-udp-ports/ports.entity.js.map +1 -1
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js +11 -14
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js.map +1 -1
- package/lib/base/tcp-udp-ports/tcp-upd-ports.worker.js +244 -427
- package/lib/base/tcp-udp-ports/tcp-upd-ports.worker.js.map +1 -1
- package/lib/base/tcp-upd-ports.worker.d.ts +13 -0
- package/lib/base/tcp-upd-ports.worker.js +99 -0
- package/lib/base/tcp-upd-ports.worker.js.map +1 -0
- package/lib/base/translate.d.ts +1 -1
- package/lib/base/translate.js +90 -119
- package/lib/base/translate.js.map +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/helpers/for-backend/helpers-cli-tool.backend.js +109 -115
- package/lib/helpers/for-backend/helpers-cli-tool.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-console-gui.js +55 -102
- package/lib/helpers/for-backend/helpers-console-gui.js.map +1 -1
- package/lib/helpers/for-backend/helpers-dependencies.backend.js +28 -45
- package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-file-folders.backend.d.ts +2 -2
- package/lib/helpers/for-backend/helpers-file-folders.backend.js +277 -266
- package/lib/helpers/for-backend/helpers-file-folders.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-git.backend.d.ts +38 -3
- package/lib/helpers/for-backend/helpers-git.backend.js +806 -807
- package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-network.backend.js +15 -18
- package/lib/helpers/for-backend/helpers-network.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-npm.backend.js +5 -8
- package/lib/helpers/for-backend/helpers-npm.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-path.backend.js +18 -26
- package/lib/helpers/for-backend/helpers-path.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-process.backend.d.ts +2 -2
- package/lib/helpers/for-backend/helpers-process.backend.js +285 -363
- package/lib/helpers/for-backend/helpers-process.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-system-terminal.backend.js +25 -42
- package/lib/helpers/for-backend/helpers-system-terminal.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-vscode.backend.js +9 -12
- package/lib/helpers/for-backend/helpers-vscode.backend.js.map +1 -1
- package/lib/helpers/for-backend/ts-code/index.js +0 -2
- package/lib/helpers/for-backend/ts-code/index.js.map +1 -1
- package/lib/helpers/for-backend/ts-code/ts-code-extractor.d.ts +26 -0
- package/lib/helpers/for-backend/ts-code/ts-code-extractor.js +62 -0
- package/lib/helpers/for-backend/ts-code/ts-code-extractor.js.map +1 -0
- package/lib/helpers/for-backend/ts-code/ts-code-modifier.backend.d.ts +19 -0
- package/lib/helpers/for-backend/ts-code/ts-code-modifier.backend.js +81 -0
- package/lib/helpers/for-backend/ts-code/ts-code-modifier.backend.js.map +1 -0
- package/lib/helpers/for-backend/ts-code/ts-import-export-extractor.js +2 -2
- package/lib/helpers/for-backend/ts-code/ts-import-export-extractor.js.map +1 -1
- package/lib/helpers/for-browser/angular.helper.js +2 -2
- package/lib/helpers/for-browser/angular.helper.js.map +1 -1
- package/lib/helpers/for-browser/helpers-browser.js +27 -40
- package/lib/helpers/for-browser/helpers-browser.js.map +1 -1
- package/lib/helpers/helpers-array-obj.d.ts +3 -0
- package/lib/helpers/helpers-array-obj.js +49 -61
- package/lib/helpers/helpers-array-obj.js.map +1 -1
- package/lib/helpers/helpers-json5.backend.js +44 -55
- package/lib/helpers/helpers-json5.backend.js.map +1 -1
- package/lib/helpers/helpers-numbers.js +7 -10
- package/lib/helpers/helpers-numbers.js.map +1 -1
- package/lib/helpers/helpers-strings-regexes.js +40 -47
- package/lib/helpers/helpers-strings-regexes.js.map +1 -1
- package/lib/helpers/helpers-strings.js +38 -41
- package/lib/helpers/helpers-strings.js.map +1 -1
- package/lib/helpers/helpers.d.ts +12 -8
- package/lib/helpers/helpers.js +313 -393
- package/lib/helpers/helpers.js.map +1 -1
- package/lib/index._auto-generated_.d.ts +1 -0
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/index.js +21 -10
- package/lib/index.js.map +1 -1
- package/lib/lowdb/adapters/Memory.js +14 -20
- package/lib/lowdb/adapters/Memory.js.map +1 -1
- package/lib/lowdb/adapters/browser/LocalStorage.js +5 -8
- package/lib/lowdb/adapters/browser/LocalStorage.js.map +1 -1
- package/lib/lowdb/adapters/browser/SessionStorage.js +5 -8
- package/lib/lowdb/adapters/browser/SessionStorage.js.map +1 -1
- package/lib/lowdb/adapters/browser/WebStorage.js +10 -9
- package/lib/lowdb/adapters/browser/WebStorage.js.map +1 -1
- package/lib/lowdb/adapters/node/DataFile.js +29 -38
- package/lib/lowdb/adapters/node/DataFile.js.map +1 -1
- package/lib/lowdb/adapters/node/JSONFile.js +13 -18
- package/lib/lowdb/adapters/node/JSONFile.js.map +1 -1
- package/lib/lowdb/adapters/node/TextFile.js +36 -44
- package/lib/lowdb/adapters/node/TextFile.js.map +1 -1
- package/lib/lowdb/adapters/node/steno.js +72 -122
- package/lib/lowdb/adapters/node/steno.js.map +1 -1
- package/lib/lowdb/browser.js +17 -4
- package/lib/lowdb/browser.js.map +1 -1
- package/lib/lowdb/core/Low.js +30 -60
- package/lib/lowdb/core/Low.js.map +1 -1
- package/lib/lowdb/examples/browser.js.map +1 -1
- package/lib/lowdb/examples/cli.d.ts +1 -0
- package/lib/lowdb/examples/cli.js.map +1 -1
- package/lib/lowdb/examples/in-memory.d.ts +1 -0
- package/lib/lowdb/examples/in-memory.js.map +1 -1
- package/lib/lowdb/examples/server.d.ts +1 -0
- package/lib/lowdb/examples/server.js.map +1 -1
- package/lib/lowdb/index.js +16 -3
- package/lib/lowdb/index.js.map +1 -1
- package/lib/lowdb/node.js +18 -5
- package/lib/lowdb/node.js.map +1 -1
- package/lib/lowdb/presets/browser.js +7 -7
- package/lib/lowdb/presets/browser.js.map +1 -1
- package/lib/lowdb/presets/node.js +12 -23
- package/lib/lowdb/presets/node.js.map +1 -1
- package/lib/models.d.ts +68 -8
- package/lib/models.js +197 -3
- package/lib/models.js.map +1 -1
- package/lib/old/base-component.d.ts +1 -0
- package/lib/old/base-component.js +2 -2
- package/lib/old/base-component.js.map +1 -1
- package/lib/old/base-formly-component.d.ts +1 -0
- package/lib/old/base-formly-component.js +2 -2
- package/lib/old/base-formly-component.js.map +1 -1
- package/lib/old/condition-wait.d.ts +1 -0
- package/lib/old/condition-wait.js.map +1 -1
- package/lib/old/dual-component-ctrl.d.ts +1 -0
- package/lib/old/dual-component-ctrl.js +2 -2
- package/lib/old/dual-component-ctrl.js.map +1 -1
- package/lib/old/execute-command.d.ts +11 -0
- package/lib/old/execute-command.js +564 -0
- package/lib/old/execute-command.js.map +1 -0
- package/lib/old/helpers.d.ts +62 -0
- package/lib/old/helpers.js +279 -0
- package/lib/old/helpers.js.map +1 -0
- package/lib/old/models.d.ts +80 -0
- package/lib/old/models.js +57 -0
- package/lib/old/models.js.map +1 -0
- package/lib/utils.d.ts +72 -13
- package/lib/utils.js +502 -179
- package/lib/utils.js.map +1 -1
- package/lib/validators/validators-firedev.js +5 -5
- package/lib/validators/validators-firedev.js.map +1 -1
- package/lib/validators/validators-git.js +2 -2
- package/lib/validators/validators-git.js.map +1 -1
- package/lib/validators/validators-network.js +1 -1
- package/lib/validators/validators-network.js.map +1 -1
- package/lib/validators/validators.js +2 -2
- package/lib/validators/validators.js.map +1 -1
- package/migrations/1736198527297_init.js +39 -58
- package/migrations/1736198527297_init.js.map +1 -1
- package/migrations/1736199486472_addingNotAssignablePorts.js +42 -93
- package/migrations/1736199486472_addingNotAssignablePorts.js.map +1 -1
- package/migrations/1736454437350_addFreePorts.js +48 -100
- package/migrations/1736454437350_addFreePorts.js.map +1 -1
- package/migrations/index.js +15 -2
- package/migrations/index.js.map +1 -1
- package/migrations/migrations_index._auto-generated_.js +3 -3
- package/migrations/migrations_index._auto-generated_.js.map +1 -1
- package/package.json +14 -61
- package/src.d.ts +1 -1
- package/taon.jsonc +34 -49
- package/tmp-environment.json +8 -389
- package/websql/README.md +24 -24
- package/websql/esm2022/lib/base/classes/base-bower-json.mjs +14 -0
- package/websql/esm2022/lib/base/classes/base-cli-worker-config.mjs +1 -4
- package/websql/esm2022/lib/base/classes/base-cli-worker-controller.mjs +1 -1
- package/websql/esm2022/lib/base/classes/base-cli-worker.mjs +14 -4
- package/websql/esm2022/lib/base/classes/base-debounce-compiler-for-project.mjs +5 -5
- package/websql/esm2022/lib/base/classes/base-feature-for-project.mjs +4 -1
- package/websql/esm2022/lib/base/classes/base-git.mjs +244 -4
- package/websql/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/websql/esm2022/lib/base/classes/base-library-build.mjs +35 -10
- package/websql/esm2022/lib/base/classes/base-linked-projects.mjs +8 -5
- package/websql/esm2022/lib/base/classes/base-node-modules.mjs +495 -0
- package/websql/esm2022/lib/base/classes/base-npm-helpers.mjs +32 -430
- package/websql/esm2022/lib/base/classes/base-package-json.mjs +340 -0
- package/websql/esm2022/lib/base/classes/base-process-manager.mjs +285 -0
- package/websql/esm2022/lib/base/classes/base-project-resolver.mjs +2 -10
- package/websql/esm2022/lib/base/classes/base-project.mjs +82 -87
- package/websql/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/websql/esm2022/lib/base/classes/base-release-process.mjs +34 -36
- package/websql/esm2022/lib/base/classes/{base-github-pages.mjs → base-static-pages.mjs} +6 -6
- package/websql/esm2022/lib/base/classes/base-vscode.mjs +31 -1
- package/websql/esm2022/lib/base/classes/index.mjs +5 -1
- package/websql/esm2022/lib/base/commit-data.mjs +21 -4
- package/websql/esm2022/lib/base/core-project.mjs +3 -3
- package/websql/esm2022/lib/base/linked-project.mjs +4 -4
- package/websql/esm2022/lib/base/tcp-udp-ports/tcp-udp-ports.context.mjs +2 -4
- package/websql/esm2022/lib/base/translate.mjs +566 -0
- package/websql/esm2022/lib/helpers/helpers-array-obj.mjs +5 -10
- package/websql/esm2022/lib/helpers/helpers.mjs +12 -6
- package/websql/esm2022/lib/index.mjs +2 -4
- package/websql/esm2022/lib/models.mjs +173 -3
- package/websql/esm2022/lib/utils.mjs +402 -41
- package/websql/fesm2022/tnp-helpers.mjs +4744 -3032
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base/classes/base-bower-json.d.ts +35 -0
- package/websql/lib/base/classes/base-cli-worker.d.ts +2 -2
- package/websql/lib/base/classes/base-debounce-compiler-for-project.d.ts +5 -5
- package/websql/lib/base/classes/base-feature-for-project.d.ts +2 -1
- package/websql/lib/base/classes/base-git.d.ts +42 -5
- package/websql/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/websql/lib/base/classes/base-library-build.d.ts +8 -11
- package/websql/lib/base/classes/base-linked-projects.d.ts +1 -2
- package/websql/lib/base/classes/base-node-modules.d.ts +56 -0
- package/websql/lib/base/classes/base-npm-helpers.d.ts +29 -108
- package/websql/lib/base/classes/base-package-json.d.ts +107 -0
- package/websql/lib/base/classes/base-process-manager.d.ts +31 -0
- package/websql/lib/base/classes/base-project-resolver.d.ts +2 -2
- package/websql/lib/base/classes/base-project.d.ts +17 -18
- package/websql/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/websql/lib/base/classes/base-release-process.d.ts +15 -13
- package/websql/lib/base/classes/base-static-pages.d.ts +15 -0
- package/websql/lib/base/classes/base-vscode.d.ts +4 -0
- package/websql/lib/base/classes/index.d.ts +5 -1
- package/websql/lib/base/commit-data.d.ts +14 -1
- package/websql/lib/base/core-project.d.ts +1 -1
- package/websql/lib/base/linked-project.d.ts +1 -1
- package/websql/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
- package/websql/lib/base/translate.d.ts +228 -0
- package/websql/lib/helpers/helpers-array-obj.d.ts +3 -0
- package/websql/lib/helpers/helpers.d.ts +12 -8
- package/websql/lib/index.d.ts +1 -3
- package/websql/lib/models.d.ts +68 -8
- package/websql/lib/utils.d.ts +72 -13
- package/browser/package.json +0 -25
- package/websql/package.json +0 -25
|
@@ -0,0 +1,1223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseProject = exports.ChildProcess = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var tnp_core_1 = require("tnp-core");
|
|
6
|
+
var child_process_1 = require("child_process");
|
|
7
|
+
Object.defineProperty(exports, "ChildProcess", { enumerable: true, get: function () { return child_process_1.ChildProcess; } });
|
|
8
|
+
var tnp_core_2 = require("tnp-core");
|
|
9
|
+
var tnp_core_3 = require("tnp-core");
|
|
10
|
+
var tnp_config_1 = require("tnp-config");
|
|
11
|
+
var tnp_core_4 = require("tnp-core");
|
|
12
|
+
var index_1 = require("../index");
|
|
13
|
+
var base_project_resolver_1 = require("./base-project-resolver");
|
|
14
|
+
//#endregion
|
|
15
|
+
var takenPorts = [];
|
|
16
|
+
var BaseProject = /** @class */ (function () {
|
|
17
|
+
//#region constructor
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
function BaseProject(
|
|
20
|
+
/**
|
|
21
|
+
* doesn't need to be real path -> can be link
|
|
22
|
+
*/
|
|
23
|
+
location) {
|
|
24
|
+
var _this = this;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region fields
|
|
28
|
+
this.cache = {};
|
|
29
|
+
this.type = 'unknow';
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region getters & methods / to string
|
|
32
|
+
this.toString = function () {
|
|
33
|
+
return "".concat(_this.name, "=>").concat(_this.location);
|
|
34
|
+
};
|
|
35
|
+
this.location = location;
|
|
36
|
+
//#region @backend
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
this.libraryBuild = new (require('./base-library-build')
|
|
39
|
+
.BaseLibraryBuild)(this);
|
|
40
|
+
this.npmHelpers = new (require('./base-npm-helpers')
|
|
41
|
+
.BaseNpmHelpers)(this);
|
|
42
|
+
this.linkedProjects = new (require('./base-linked-projects')
|
|
43
|
+
.BaseLinkedProjects)(this);
|
|
44
|
+
this.git = new (require('./base-git').BaseGit)(this);
|
|
45
|
+
this.vsCodeHelpers = new (require('./base-vscode')
|
|
46
|
+
.BaseVscodeHelpers)(this);
|
|
47
|
+
this.githubPages = new (require('./base-github-pages')
|
|
48
|
+
.BaseGithubPages)(this);
|
|
49
|
+
this.releaseProcess = new (require('./base-release-process')
|
|
50
|
+
.BaseReleaseProcess)(this);
|
|
51
|
+
//#endregion
|
|
52
|
+
}
|
|
53
|
+
Object.defineProperty(BaseProject.prototype, "globalCache", {
|
|
54
|
+
get: function () {
|
|
55
|
+
return BaseProject.cache;
|
|
56
|
+
},
|
|
57
|
+
enumerable: false,
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(BaseProject.prototype, "location", {
|
|
61
|
+
get: function () {
|
|
62
|
+
return this.__location;
|
|
63
|
+
},
|
|
64
|
+
set: function (v) {
|
|
65
|
+
this.__location = (0, tnp_core_3.crossPlatformPath)(v);
|
|
66
|
+
},
|
|
67
|
+
enumerable: false,
|
|
68
|
+
configurable: true
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(BaseProject.prototype, "isMonorepo", {
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region methods & getters / is monorepo
|
|
73
|
+
get: function () {
|
|
74
|
+
return false;
|
|
75
|
+
},
|
|
76
|
+
enumerable: false,
|
|
77
|
+
configurable: true
|
|
78
|
+
});
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region getters & methods / order core projects
|
|
81
|
+
BaseProject.prototype.orderCoreProjects = function (coreProjects) {
|
|
82
|
+
var e_1, _a, e_2, _b, e_3, _c;
|
|
83
|
+
var projectMap = new Map();
|
|
84
|
+
try {
|
|
85
|
+
// Initialize the project map
|
|
86
|
+
for (var coreProjects_1 = tslib_1.__values(coreProjects), coreProjects_1_1 = coreProjects_1.next(); !coreProjects_1_1.done; coreProjects_1_1 = coreProjects_1.next()) {
|
|
87
|
+
var project = coreProjects_1_1.value;
|
|
88
|
+
projectMap.set(project, []);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
92
|
+
finally {
|
|
93
|
+
try {
|
|
94
|
+
if (coreProjects_1_1 && !coreProjects_1_1.done && (_a = coreProjects_1.return)) _a.call(coreProjects_1);
|
|
95
|
+
}
|
|
96
|
+
finally { if (e_1) throw e_1.error; }
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
// Populate the project map with dependencies
|
|
100
|
+
for (var coreProjects_2 = tslib_1.__values(coreProjects), coreProjects_2_1 = coreProjects_2.next(); !coreProjects_2_1.done; coreProjects_2_1 = coreProjects_2.next()) {
|
|
101
|
+
var project = coreProjects_2_1.value;
|
|
102
|
+
if (!projectMap.has(project.extends)) {
|
|
103
|
+
projectMap.set(project.extends, []);
|
|
104
|
+
}
|
|
105
|
+
projectMap.get(project.extends).push(project);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
109
|
+
finally {
|
|
110
|
+
try {
|
|
111
|
+
if (coreProjects_2_1 && !coreProjects_2_1.done && (_b = coreProjects_2.return)) _b.call(coreProjects_2);
|
|
112
|
+
}
|
|
113
|
+
finally { if (e_2) throw e_2.error; }
|
|
114
|
+
}
|
|
115
|
+
var orderedProjects = [];
|
|
116
|
+
var visited = new Set();
|
|
117
|
+
var visit = function (project) {
|
|
118
|
+
var e_4, _a;
|
|
119
|
+
if (!visited.has(project)) {
|
|
120
|
+
visited.add(project);
|
|
121
|
+
var dependencies = projectMap.get(project);
|
|
122
|
+
if (dependencies) {
|
|
123
|
+
try {
|
|
124
|
+
for (var dependencies_1 = tslib_1.__values(dependencies), dependencies_1_1 = dependencies_1.next(); !dependencies_1_1.done; dependencies_1_1 = dependencies_1.next()) {
|
|
125
|
+
var dep = dependencies_1_1.value;
|
|
126
|
+
visit(dep);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
130
|
+
finally {
|
|
131
|
+
try {
|
|
132
|
+
if (dependencies_1_1 && !dependencies_1_1.done && (_a = dependencies_1.return)) _a.call(dependencies_1);
|
|
133
|
+
}
|
|
134
|
+
finally { if (e_4) throw e_4.error; }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
orderedProjects.push(project);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
try {
|
|
141
|
+
// Visit each project
|
|
142
|
+
for (var coreProjects_3 = tslib_1.__values(coreProjects), coreProjects_3_1 = coreProjects_3.next(); !coreProjects_3_1.done; coreProjects_3_1 = coreProjects_3.next()) {
|
|
143
|
+
var project = coreProjects_3_1.value;
|
|
144
|
+
visit(project);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
148
|
+
finally {
|
|
149
|
+
try {
|
|
150
|
+
if (coreProjects_3_1 && !coreProjects_3_1.done && (_c = coreProjects_3.return)) _c.call(coreProjects_3);
|
|
151
|
+
}
|
|
152
|
+
finally { if (e_3) throw e_3.error; }
|
|
153
|
+
}
|
|
154
|
+
return orderedProjects.reverse();
|
|
155
|
+
};
|
|
156
|
+
Object.defineProperty(BaseProject.prototype, "core", {
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region methods & getters / core
|
|
159
|
+
get: function () {
|
|
160
|
+
var _this = this;
|
|
161
|
+
if (!tnp_core_4._.isUndefined(this.cache['core'])) {
|
|
162
|
+
return this.cache['core'];
|
|
163
|
+
}
|
|
164
|
+
// Helpers.taskStarted(`Detecting core project for ${this.genericName}`);
|
|
165
|
+
var coreProjects = index_1.CoreProject.coreProjects.filter(function (p) {
|
|
166
|
+
return p.recognizedFn(_this);
|
|
167
|
+
});
|
|
168
|
+
coreProjects = this.orderCoreProjects(coreProjects);
|
|
169
|
+
// Helpers.taskDone(`Core project detected for ${this.genericName}`);
|
|
170
|
+
// console.log('CoreProject.coreProjects', CoreProject.coreProjects.map(c => c.name));
|
|
171
|
+
this.cache['core'] = tnp_core_4._.first(coreProjects);
|
|
172
|
+
return this.cache['core'];
|
|
173
|
+
},
|
|
174
|
+
enumerable: false,
|
|
175
|
+
configurable: true
|
|
176
|
+
});
|
|
177
|
+
Object.defineProperty(BaseProject.prototype, "linkedProjectsExisted", {
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region getters & methods / link project exited
|
|
180
|
+
get: function () {
|
|
181
|
+
var _this = this;
|
|
182
|
+
//#region @backendFunc
|
|
183
|
+
return this.linkedProjects.linkedProjects
|
|
184
|
+
.map(function (f) {
|
|
185
|
+
var proj = _this.ins.From(_this.pathFor(f.relativeClonePath));
|
|
186
|
+
return proj;
|
|
187
|
+
})
|
|
188
|
+
.filter(function (f) { return !!f; });
|
|
189
|
+
//#endregion
|
|
190
|
+
},
|
|
191
|
+
enumerable: false,
|
|
192
|
+
configurable: true
|
|
193
|
+
});
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region methods & getters / set type
|
|
196
|
+
BaseProject.prototype.setType = function (type) {
|
|
197
|
+
// @ts-ignore
|
|
198
|
+
this.type = type;
|
|
199
|
+
};
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region methods & getters / type is
|
|
202
|
+
BaseProject.prototype.typeIs = function () {
|
|
203
|
+
var types = [];
|
|
204
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
205
|
+
types[_i] = arguments[_i];
|
|
206
|
+
}
|
|
207
|
+
return this.type && types.includes(this.type);
|
|
208
|
+
};
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region methods & getters / type is not
|
|
211
|
+
BaseProject.prototype.typeIsNot = function () {
|
|
212
|
+
var types = [];
|
|
213
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
214
|
+
types[_i] = arguments[_i];
|
|
215
|
+
}
|
|
216
|
+
return !this.typeIs.apply(this, tslib_1.__spreadArray([], tslib_1.__read(types), false));
|
|
217
|
+
};
|
|
218
|
+
Object.defineProperty(BaseProject.prototype, "basename", {
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region methods & getters / basename
|
|
221
|
+
/**
|
|
222
|
+
* project folder basename
|
|
223
|
+
*/
|
|
224
|
+
get: function () {
|
|
225
|
+
//#region @websqlFunc
|
|
226
|
+
return tnp_core_3.path.basename(this.location);
|
|
227
|
+
//#endregion
|
|
228
|
+
},
|
|
229
|
+
enumerable: false,
|
|
230
|
+
configurable: true
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(BaseProject.prototype, "parentBasename", {
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region methods & getters / parent basename
|
|
235
|
+
/**
|
|
236
|
+
* project folder parent basename
|
|
237
|
+
*/
|
|
238
|
+
get: function () {
|
|
239
|
+
//#region @websqlFunc
|
|
240
|
+
return tnp_core_3.path.basename(tnp_core_3.path.dirname(this.location));
|
|
241
|
+
//#endregion
|
|
242
|
+
},
|
|
243
|
+
enumerable: false,
|
|
244
|
+
configurable: true
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(BaseProject.prototype, "name", {
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region methods & getters / name
|
|
249
|
+
/**
|
|
250
|
+
* name from package.json
|
|
251
|
+
*/
|
|
252
|
+
get: function () {
|
|
253
|
+
var _a;
|
|
254
|
+
return ((_a = this.npmHelpers) === null || _a === void 0 ? void 0 : _a.name) || this.nameFromPomXML;
|
|
255
|
+
},
|
|
256
|
+
enumerable: false,
|
|
257
|
+
configurable: true
|
|
258
|
+
});
|
|
259
|
+
Object.defineProperty(BaseProject.prototype, "nameForCli", {
|
|
260
|
+
get: function () {
|
|
261
|
+
var _a;
|
|
262
|
+
return ((_a = this.name) === null || _a === void 0 ? void 0 : _a.endsWith('-cli')) ? this.name : "".concat(this.name, "-cli");
|
|
263
|
+
},
|
|
264
|
+
enumerable: false,
|
|
265
|
+
configurable: true
|
|
266
|
+
});
|
|
267
|
+
Object.defineProperty(BaseProject.prototype, "nameFromPomXML", {
|
|
268
|
+
get: function () {
|
|
269
|
+
var artifactIdPattern = /<artifactId>([^<]+)<\/artifactId>/;
|
|
270
|
+
var match = (this.readFile('pom.xml') || '').match(artifactIdPattern);
|
|
271
|
+
if (match && match[1]) {
|
|
272
|
+
return match[1];
|
|
273
|
+
}
|
|
274
|
+
return '';
|
|
275
|
+
},
|
|
276
|
+
enumerable: false,
|
|
277
|
+
configurable: true
|
|
278
|
+
});
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region methods & getters / get folder for possible project chhildrens
|
|
281
|
+
BaseProject.prototype.getFoldersForPossibleProjectChildren = function () {
|
|
282
|
+
//#region @backendFunc
|
|
283
|
+
var isDirectory = function (source) { return tnp_core_1.fse.lstatSync(source).isDirectory(); };
|
|
284
|
+
var getDirectories = function (source) {
|
|
285
|
+
return tnp_core_1.fse
|
|
286
|
+
.readdirSync(source)
|
|
287
|
+
.map(function (name) { return tnp_core_3.path.join(source, name); })
|
|
288
|
+
.filter(isDirectory);
|
|
289
|
+
};
|
|
290
|
+
var subdirectories = getDirectories(this.location).filter(function (f) {
|
|
291
|
+
var folderName = tnp_core_3.path.basename(f);
|
|
292
|
+
return index_1.Helpers.checkIfNameAllowedForTaonProj(folderName);
|
|
293
|
+
});
|
|
294
|
+
// if (this.isTnp' && fse.existsSync(path.join(this.location, '../taon-projects'))) {
|
|
295
|
+
// subdirectories = subdirectories.concat(getDirectories(path.join(this.location, '../taon-projects'))
|
|
296
|
+
// .filter(f => {
|
|
297
|
+
// const folderName = path.basename(f);
|
|
298
|
+
// return Helpers.checkIfNameAllowedForTaonProj(folderName);
|
|
299
|
+
// }))
|
|
300
|
+
// }'
|
|
301
|
+
return subdirectories;
|
|
302
|
+
//#endregion
|
|
303
|
+
};
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region methods & getters / get all childrens
|
|
306
|
+
BaseProject.prototype.getAllChildren = function () {
|
|
307
|
+
var _this = this;
|
|
308
|
+
//#region @backendFunc
|
|
309
|
+
var subdirectories = this.getFoldersForPossibleProjectChildren();
|
|
310
|
+
var res = subdirectories
|
|
311
|
+
.map(function (dir) {
|
|
312
|
+
// console.log('child:', dir)
|
|
313
|
+
return _this.ins.From(dir);
|
|
314
|
+
})
|
|
315
|
+
.filter(function (c) { return !!c; });
|
|
316
|
+
return res;
|
|
317
|
+
//#endregion
|
|
318
|
+
};
|
|
319
|
+
Object.defineProperty(BaseProject.prototype, "children", {
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region methods & getters / children
|
|
322
|
+
/**
|
|
323
|
+
* alias to getAllChildren
|
|
324
|
+
*/
|
|
325
|
+
get: function () {
|
|
326
|
+
//#region @websqlFunc
|
|
327
|
+
return this.getAllChildren();
|
|
328
|
+
//#endregion
|
|
329
|
+
},
|
|
330
|
+
enumerable: false,
|
|
331
|
+
configurable: true
|
|
332
|
+
});
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region methods & getters / get child
|
|
335
|
+
BaseProject.prototype.getChildBy = function (nameOrBasename, errors) {
|
|
336
|
+
if (errors === void 0) { errors = true; }
|
|
337
|
+
//#region @websqlFunc
|
|
338
|
+
var c = this.children.find(function (c) { return c.name === nameOrBasename || c.basename === nameOrBasename; });
|
|
339
|
+
if (errors && !c) {
|
|
340
|
+
index_1.Helpers.warn("Project doesnt contain child with name or basename: ".concat(nameOrBasename));
|
|
341
|
+
}
|
|
342
|
+
return c;
|
|
343
|
+
//#endregion
|
|
344
|
+
};
|
|
345
|
+
Object.defineProperty(BaseProject.prototype, "parent", {
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region methods & getters / parent
|
|
348
|
+
get: function () {
|
|
349
|
+
//#region @websqlFunc
|
|
350
|
+
if (!tnp_core_4._.isString(this.location) || this.location.trim() === '') {
|
|
351
|
+
return void 0;
|
|
352
|
+
}
|
|
353
|
+
return this.ins.From(tnp_core_3.path.join(this.location, '..'));
|
|
354
|
+
//#endregion
|
|
355
|
+
},
|
|
356
|
+
enumerable: false,
|
|
357
|
+
configurable: true
|
|
358
|
+
});
|
|
359
|
+
Object.defineProperty(BaseProject.prototype, "nearestParent", {
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region methods & getters / parent
|
|
362
|
+
get: function () {
|
|
363
|
+
//#region @websqlFunc
|
|
364
|
+
if (this.cache['nearestParent']) {
|
|
365
|
+
return this.cache['nearestParent'];
|
|
366
|
+
}
|
|
367
|
+
var nearestParent = this.ins.nearestTo([this.location, '..']);
|
|
368
|
+
if (nearestParent) {
|
|
369
|
+
// console.log(`
|
|
370
|
+
// nearest parent for ${this.genericName} is ${nearestParent.genericName}
|
|
371
|
+
// `);
|
|
372
|
+
this.cache['nearestParent'] = nearestParent;
|
|
373
|
+
}
|
|
374
|
+
return nearestParent;
|
|
375
|
+
//#endregion
|
|
376
|
+
},
|
|
377
|
+
enumerable: false,
|
|
378
|
+
configurable: true
|
|
379
|
+
});
|
|
380
|
+
Object.defineProperty(BaseProject.prototype, "grandpa", {
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region methods & getters / grandpa
|
|
383
|
+
get: function () {
|
|
384
|
+
//#region @websqlFunc
|
|
385
|
+
if (!tnp_core_4._.isString(this.location) || this.location.trim() === '') {
|
|
386
|
+
return void 0;
|
|
387
|
+
}
|
|
388
|
+
var grandpa = this.ins.From(tnp_core_3.path.join(this.location, '..', '..'));
|
|
389
|
+
return grandpa;
|
|
390
|
+
//#endregion
|
|
391
|
+
},
|
|
392
|
+
enumerable: false,
|
|
393
|
+
configurable: true
|
|
394
|
+
});
|
|
395
|
+
Object.defineProperty(BaseProject.prototype, "allNpmPackagesNames", {
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region methods & getters / generic name
|
|
398
|
+
get: function () {
|
|
399
|
+
return [this.name];
|
|
400
|
+
},
|
|
401
|
+
enumerable: false,
|
|
402
|
+
configurable: true
|
|
403
|
+
});
|
|
404
|
+
Object.defineProperty(BaseProject.prototype, "titleBarName", {
|
|
405
|
+
get: function () {
|
|
406
|
+
var _this = this;
|
|
407
|
+
var allPackagesNames = this.allNpmPackagesNames.filter(function (f) { return f !== _this.basename; }).length === 0
|
|
408
|
+
? ''
|
|
409
|
+
: "(".concat(this.allNpmPackagesNames.filter(function (f) { return f !== _this.basename; }).join(','), ")");
|
|
410
|
+
if (this.parent) {
|
|
411
|
+
return ("".concat(tnp_core_3.path.basename(tnp_core_3.path.dirname(this.parent.location)), "/").concat(this.parent.name, "/") +
|
|
412
|
+
"".concat(this.basename, " ").concat(allPackagesNames, " [ ${activeEditorShort} ]"));
|
|
413
|
+
}
|
|
414
|
+
return ("".concat(tnp_core_3.path.basename(tnp_core_3.path.dirname(this.location)), "/") +
|
|
415
|
+
"".concat(this.basename, " (").concat(allPackagesNames, ") [ ${activeEditorShort}]"));
|
|
416
|
+
},
|
|
417
|
+
enumerable: false,
|
|
418
|
+
configurable: true
|
|
419
|
+
});
|
|
420
|
+
Object.defineProperty(BaseProject.prototype, "genericName", {
|
|
421
|
+
get: function () {
|
|
422
|
+
//#region @websqlFunc
|
|
423
|
+
if (!tnp_core_4._.isUndefined(this.cache['genericName'])) {
|
|
424
|
+
return this.cache['genericName'];
|
|
425
|
+
}
|
|
426
|
+
var nameFromPackageJson = this.name;
|
|
427
|
+
//#region @backend
|
|
428
|
+
nameFromPackageJson = "".concat(tnp_core_1.chalk.bold.gray(this.name));
|
|
429
|
+
//#endregion
|
|
430
|
+
var sliceMinus = 8;
|
|
431
|
+
var shortPath = '/' +
|
|
432
|
+
(0, tnp_core_3.crossPlatformPath)(this.location)
|
|
433
|
+
.split('/')
|
|
434
|
+
.slice(-1 * sliceMinus)
|
|
435
|
+
.join('/');
|
|
436
|
+
var result = (shortPath.includes((0, tnp_core_3.crossPlatformPath)(this.location)) ? '/' : '(..)') +
|
|
437
|
+
this.checkAndBoldenPath(this.location)
|
|
438
|
+
.split('/')
|
|
439
|
+
.slice(-1 * sliceMinus)
|
|
440
|
+
.join('/') +
|
|
441
|
+
"(".concat(nameFromPackageJson, ")");
|
|
442
|
+
this.cache['genericName'] = result.replace(/\/\//g, '/');
|
|
443
|
+
return this.cache['genericName'];
|
|
444
|
+
//#endregion
|
|
445
|
+
},
|
|
446
|
+
enumerable: false,
|
|
447
|
+
configurable: true
|
|
448
|
+
});
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region methods & getters / check and bolden path
|
|
451
|
+
BaseProject.prototype.checkAndBoldenPath = function (fullPath) {
|
|
452
|
+
var _this = this;
|
|
453
|
+
var parts = fullPath.split('/');
|
|
454
|
+
var result = parts.map(function (part, index) {
|
|
455
|
+
var pathTocheck = parts.slice(0, index + 1).join('/');
|
|
456
|
+
// console.log('pathTocheck', pathTocheck);
|
|
457
|
+
//#region @backend
|
|
458
|
+
if (_this.ins.From(pathTocheck)) {
|
|
459
|
+
return tnp_core_1.chalk.underline.italic.bold(part);
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
return part;
|
|
463
|
+
});
|
|
464
|
+
return result.join('/');
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region methods & getters / path exits
|
|
468
|
+
/**
|
|
469
|
+
* same has project.hasFile();
|
|
470
|
+
*/
|
|
471
|
+
BaseProject.prototype.pathExists = function (relativePath) {
|
|
472
|
+
return this.hasFile(relativePath);
|
|
473
|
+
};
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region methods & getters / has file
|
|
476
|
+
/**
|
|
477
|
+
* same as project.pathExists();
|
|
478
|
+
*/
|
|
479
|
+
BaseProject.prototype.hasFile = function (relativePath) {
|
|
480
|
+
//#region @backendFunc
|
|
481
|
+
// TODO prevent absolute path
|
|
482
|
+
return index_1.Helpers.exists(this.pathFor(relativePath));
|
|
483
|
+
//#endregion
|
|
484
|
+
};
|
|
485
|
+
BaseProject.prototype.hasFolder = function (relativePath) {
|
|
486
|
+
//#region @backendFunc
|
|
487
|
+
return (index_1.Helpers.exists(this.pathFor(relativePath)) &&
|
|
488
|
+
tnp_core_1.fse.lstatSync(this.pathFor(relativePath)).isDirectory());
|
|
489
|
+
//#endregion
|
|
490
|
+
};
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region methods & getters / relative
|
|
493
|
+
/**
|
|
494
|
+
* Function will return relative path from project location
|
|
495
|
+
*/
|
|
496
|
+
BaseProject.prototype.relative = function (absoultePath) {
|
|
497
|
+
return (0, tnp_core_3.crossPlatformPath)(tnp_core_3.path.relative(this.location, absoultePath));
|
|
498
|
+
};
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region methods & getters / create folder
|
|
501
|
+
/**
|
|
502
|
+
*
|
|
503
|
+
* @param relativePath
|
|
504
|
+
* @param override it will remove ex
|
|
505
|
+
*/
|
|
506
|
+
BaseProject.prototype.createFolder = function (relativePath, options) {
|
|
507
|
+
//#region @backendFunc
|
|
508
|
+
var override = (options || {}).override;
|
|
509
|
+
try {
|
|
510
|
+
tnp_core_1.fse.unlinkSync(this.pathFor(relativePath));
|
|
511
|
+
}
|
|
512
|
+
catch (error) { }
|
|
513
|
+
if (this.hasFolder(relativePath)) {
|
|
514
|
+
if (override) {
|
|
515
|
+
this.remove(relativePath, true);
|
|
516
|
+
}
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
tnp_core_1.fse.mkdirSync(this.pathFor(relativePath), { recursive: true });
|
|
520
|
+
//#endregion
|
|
521
|
+
};
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region methods & getters / format file(s) with prettier
|
|
524
|
+
BaseProject.prototype.formatFile = function (specificRelativePath) {
|
|
525
|
+
//#region @backendFunc
|
|
526
|
+
var absPathToFile = this.pathFor(specificRelativePath);
|
|
527
|
+
index_1.UtilsTypescript.formatFile(absPathToFile);
|
|
528
|
+
//#endregion
|
|
529
|
+
};
|
|
530
|
+
BaseProject.prototype.formatAllFiles = function () {
|
|
531
|
+
//#region @backendFunc
|
|
532
|
+
index_1.Helpers.info("Formatting all files in ".concat(this.genericName));
|
|
533
|
+
index_1.UtilsTypescript.formatAllFilesInsideFolder(this.location);
|
|
534
|
+
//#endregion
|
|
535
|
+
};
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region methods & getters / contains file
|
|
538
|
+
/**
|
|
539
|
+
* same as project.pathhasFileExists();
|
|
540
|
+
* but with path.resolve
|
|
541
|
+
*/
|
|
542
|
+
BaseProject.prototype.containsFile = function (fileRelativeToProjectPath) {
|
|
543
|
+
var fullPath = tnp_core_3.path.resolve(tnp_core_3.path.join(this.location, fileRelativeToProjectPath));
|
|
544
|
+
return index_1.Helpers.exists(fullPath);
|
|
545
|
+
};
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region methods & getters / path for
|
|
548
|
+
/**
|
|
549
|
+
* absolute path:
|
|
550
|
+
* concated project location with relative path
|
|
551
|
+
*/
|
|
552
|
+
BaseProject.prototype.pathFor = function (relativePath) {
|
|
553
|
+
//#region @backendFunc
|
|
554
|
+
if (Array.isArray(relativePath)) {
|
|
555
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
556
|
+
}
|
|
557
|
+
if (tnp_core_3.path.isAbsolute(relativePath)) {
|
|
558
|
+
index_1.Helpers.error("Cannot join relative path with absolute: ".concat(relativePath));
|
|
559
|
+
}
|
|
560
|
+
return (0, tnp_core_3.crossPlatformPath)([this.location, relativePath]);
|
|
561
|
+
//#endregion
|
|
562
|
+
};
|
|
563
|
+
//#endregion
|
|
564
|
+
//#region methods & getters / write json
|
|
565
|
+
BaseProject.prototype.writeJson = function (relativePath, json) {
|
|
566
|
+
//#region @backendFunc
|
|
567
|
+
if (tnp_core_3.path.isAbsolute(relativePath)) {
|
|
568
|
+
index_1.Helpers.error("Cannot join relative path with absolute: ".concat(relativePath));
|
|
569
|
+
}
|
|
570
|
+
index_1.Helpers.writeJson((0, tnp_core_3.crossPlatformPath)([this.location, relativePath]), json);
|
|
571
|
+
//#endregion
|
|
572
|
+
};
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region methods & getters / write json
|
|
575
|
+
BaseProject.prototype.writeJsonC = function (relativePath, json) {
|
|
576
|
+
//#region @backendFunc
|
|
577
|
+
if (tnp_core_3.path.isAbsolute(relativePath)) {
|
|
578
|
+
index_1.Helpers.error("Cannot join relative path with absolute: ".concat(relativePath));
|
|
579
|
+
}
|
|
580
|
+
index_1.Helpers.writeJsonC((0, tnp_core_3.crossPlatformPath)([this.location, relativePath]), json);
|
|
581
|
+
//#endregion
|
|
582
|
+
};
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region methods & getters / run
|
|
585
|
+
/**
|
|
586
|
+
* @deprecated us execute instead
|
|
587
|
+
* use output from or more preciese crafted api
|
|
588
|
+
*/
|
|
589
|
+
BaseProject.prototype.run = function (command, options) {
|
|
590
|
+
var opt;
|
|
591
|
+
//#region @backend
|
|
592
|
+
options = tnp_core_4._.cloneDeep(options) || {};
|
|
593
|
+
index_1.Helpers.log("command: ".concat(command));
|
|
594
|
+
if (tnp_core_4._.isUndefined(options.showCommand)) {
|
|
595
|
+
options.showCommand = false;
|
|
596
|
+
}
|
|
597
|
+
opt = options;
|
|
598
|
+
if (!opt.cwd) {
|
|
599
|
+
opt.cwd = this.location;
|
|
600
|
+
}
|
|
601
|
+
if (opt.showCommand) {
|
|
602
|
+
index_1.Helpers.info("[".concat(tnp_core_2.CLI.chalk.underline('Executing shell command'), "] \"").concat(command, "\" in [").concat(opt.cwd, "]"));
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
index_1.Helpers.log("[".concat(tnp_core_2.CLI.chalk.underline('Executing shell command'), "] \"").concat(command, "\" in [").concat(opt.cwd, "]"));
|
|
606
|
+
}
|
|
607
|
+
//#endregion
|
|
608
|
+
return index_1.Helpers.run(command, opt);
|
|
609
|
+
};
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region methods & getters / execute
|
|
612
|
+
/**
|
|
613
|
+
* same as run but async
|
|
614
|
+
*/
|
|
615
|
+
BaseProject.prototype.execute = function (command, options) {
|
|
616
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
617
|
+
var cwd;
|
|
618
|
+
return tslib_1.__generator(this, function (_a) {
|
|
619
|
+
switch (_a.label) {
|
|
620
|
+
case 0:
|
|
621
|
+
//#region @backendFunc
|
|
622
|
+
options = options || {};
|
|
623
|
+
if (tnp_core_4._.isUndefined(options.showCommand)) {
|
|
624
|
+
options.showCommand = true;
|
|
625
|
+
}
|
|
626
|
+
if (!options) {
|
|
627
|
+
options = {};
|
|
628
|
+
}
|
|
629
|
+
cwd = this.location;
|
|
630
|
+
if (options.showCommand) {
|
|
631
|
+
index_1.Helpers.logInfo("[".concat(tnp_core_2.CLI.chalk.underline('Executing shell command'), "] \"").concat(command, "\" in [").concat(cwd, "]"));
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
index_1.Helpers.log("[".concat(tnp_core_2.CLI.chalk.underline('Executing shell command'), "] \"").concat(command, "\" in [").concat(cwd, "]"));
|
|
635
|
+
}
|
|
636
|
+
return [4 /*yield*/, index_1.Helpers.execute(command, cwd, options)];
|
|
637
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region methods & getters / try run sync command
|
|
644
|
+
/**
|
|
645
|
+
* try run but continue when it fails
|
|
646
|
+
* @param command
|
|
647
|
+
* @param options
|
|
648
|
+
* @returns
|
|
649
|
+
*/
|
|
650
|
+
BaseProject.prototype.tryRunSync = function (command,
|
|
651
|
+
//#region @backend
|
|
652
|
+
options) {
|
|
653
|
+
//#region @backendFunc
|
|
654
|
+
try {
|
|
655
|
+
this.run(command, options).sync();
|
|
656
|
+
}
|
|
657
|
+
catch (error) {
|
|
658
|
+
index_1.Helpers.warn("Not able to execute: ".concat(command));
|
|
659
|
+
}
|
|
660
|
+
//#endregion
|
|
661
|
+
};
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region methods & getters / output from command
|
|
664
|
+
BaseProject.prototype.outputFrom = function (command,
|
|
665
|
+
//#region @backend
|
|
666
|
+
options) {
|
|
667
|
+
//#region @backendFunc
|
|
668
|
+
return index_1.Helpers.commnadOutputAsString(command, this.location, options);
|
|
669
|
+
//#endregion
|
|
670
|
+
};
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region methods & getters / remove file
|
|
673
|
+
BaseProject.prototype.removeFile = function (fileRelativeToProjectPath) {
|
|
674
|
+
//#region @backendFunc
|
|
675
|
+
var fullPath = tnp_core_3.path.resolve(tnp_core_3.path.join(this.location, fileRelativeToProjectPath));
|
|
676
|
+
return index_1.Helpers.removeFileIfExists(fullPath);
|
|
677
|
+
//#endregion
|
|
678
|
+
};
|
|
679
|
+
//#endregion
|
|
680
|
+
//#region methods & getters / read file
|
|
681
|
+
BaseProject.prototype.readFile = function (fileRelativeToProjectPath) {
|
|
682
|
+
//#region @backendFunc
|
|
683
|
+
var fullPath = tnp_core_3.path.resolve(tnp_core_3.path.join(this.location, fileRelativeToProjectPath));
|
|
684
|
+
// console.log('fullPath', fullPath);
|
|
685
|
+
return index_1.Helpers.readFile(fullPath);
|
|
686
|
+
//#endregion
|
|
687
|
+
};
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region methods & getters / read file
|
|
690
|
+
/**
|
|
691
|
+
* read json file
|
|
692
|
+
* handle all json files
|
|
693
|
+
* jsonc, json5 , json
|
|
694
|
+
* @param fileRelativeToProjectPath
|
|
695
|
+
* @returns
|
|
696
|
+
*/
|
|
697
|
+
BaseProject.prototype.readJson = function (fileRelativeToProjectPath) {
|
|
698
|
+
//#region @backendFunc
|
|
699
|
+
var fullPath = tnp_core_3.path.resolve(tnp_core_3.path.join(this.location, fileRelativeToProjectPath));
|
|
700
|
+
return index_1.Helpers.readJson5(fullPath);
|
|
701
|
+
//#endregion
|
|
702
|
+
};
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region methods & getters / copy files or folders
|
|
705
|
+
/**
|
|
706
|
+
* copy files or folders from
|
|
707
|
+
* project to destination
|
|
708
|
+
*/
|
|
709
|
+
BaseProject.prototype.copy = function (filesOrFolderRelativePathes) {
|
|
710
|
+
var _this = this;
|
|
711
|
+
return {
|
|
712
|
+
to: function (destination) {
|
|
713
|
+
//#region @backendFunc
|
|
714
|
+
for (var index = 0; index < filesOrFolderRelativePathes.length; index++) {
|
|
715
|
+
var source = _this.pathFor(filesOrFolderRelativePathes[index]);
|
|
716
|
+
var dest = (0, tnp_core_3.crossPlatformPath)([
|
|
717
|
+
destination,
|
|
718
|
+
filesOrFolderRelativePathes[index],
|
|
719
|
+
]);
|
|
720
|
+
if (index_1.Helpers.isFolder(source)) {
|
|
721
|
+
index_1.Helpers.copy(source, dest);
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
index_1.Helpers.copyFile(source, dest);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
//#endregion
|
|
728
|
+
},
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region methods & getters / remove (fiel or folder)
|
|
733
|
+
BaseProject.prototype.remove = function (relativePath, exactPath) {
|
|
734
|
+
if (exactPath === void 0) { exactPath = true; }
|
|
735
|
+
//#region @backendFunc
|
|
736
|
+
if (Array.isArray(relativePath)) {
|
|
737
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
738
|
+
}
|
|
739
|
+
relativePath = relativePath.replace(/^\//, '');
|
|
740
|
+
if (tnp_core_3.path.basename(relativePath) === tnp_config_1.config.folder.node_modules) {
|
|
741
|
+
index_1.Helpers.info('Removing node_modules folder...');
|
|
742
|
+
}
|
|
743
|
+
index_1.Helpers.remove([this.location, relativePath], exactPath);
|
|
744
|
+
//#endregion
|
|
745
|
+
};
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region methods & getters / remove folder by relative path
|
|
748
|
+
BaseProject.prototype.removeFolderByRelativePath = function (relativePathToFolder) {
|
|
749
|
+
//#region @backend
|
|
750
|
+
relativePathToFolder = relativePathToFolder.replace(/^\//, '');
|
|
751
|
+
var location = this.location;
|
|
752
|
+
var p = tnp_core_3.path.join(location, relativePathToFolder);
|
|
753
|
+
index_1.Helpers.remove(p, true);
|
|
754
|
+
//#endregion
|
|
755
|
+
};
|
|
756
|
+
//#endregion
|
|
757
|
+
BaseProject.prototype.registerAndAssignPort = function () {
|
|
758
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
759
|
+
return tslib_1.__generator(this, function (_a) {
|
|
760
|
+
//#region @backendFunc
|
|
761
|
+
throw '[registerAndAssignPort] Not implemented';
|
|
762
|
+
});
|
|
763
|
+
});
|
|
764
|
+
};
|
|
765
|
+
//#region methods & getters / assign free port to project instance
|
|
766
|
+
/**
|
|
767
|
+
* @deprecated
|
|
768
|
+
*/
|
|
769
|
+
BaseProject.prototype.assignFreePort = function () {
|
|
770
|
+
return tslib_1.__awaiter(this, arguments, void 0, function (startFrom, howManyFreePortsAfterThatPort) {
|
|
771
|
+
var max, i, port, err_1;
|
|
772
|
+
if (startFrom === void 0) { startFrom = 4200; }
|
|
773
|
+
if (howManyFreePortsAfterThatPort === void 0) { howManyFreePortsAfterThatPort = 0; }
|
|
774
|
+
return tslib_1.__generator(this, function (_a) {
|
|
775
|
+
switch (_a.label) {
|
|
776
|
+
case 0:
|
|
777
|
+
//#region @backendFunc
|
|
778
|
+
if (tnp_core_4._.isNumber(this.port) && this.port >= startFrom) {
|
|
779
|
+
return [2 /*return*/, startFrom];
|
|
780
|
+
}
|
|
781
|
+
max = 2000;
|
|
782
|
+
i = 0;
|
|
783
|
+
while (takenPorts.includes(startFrom)) {
|
|
784
|
+
startFrom += 1 + howManyFreePortsAfterThatPort;
|
|
785
|
+
}
|
|
786
|
+
_a.label = 1;
|
|
787
|
+
case 1:
|
|
788
|
+
if (!true) return [3 /*break*/, 6];
|
|
789
|
+
_a.label = 2;
|
|
790
|
+
case 2:
|
|
791
|
+
_a.trys.push([2, 4, , 5]);
|
|
792
|
+
return [4 /*yield*/, tnp_core_1.portfinder.getPortPromise({ port: startFrom })];
|
|
793
|
+
case 3:
|
|
794
|
+
port = _a.sent();
|
|
795
|
+
takenPorts.push(port);
|
|
796
|
+
// @ts-ignore
|
|
797
|
+
this.port = port;
|
|
798
|
+
return [2 /*return*/, port];
|
|
799
|
+
case 4:
|
|
800
|
+
err_1 = _a.sent();
|
|
801
|
+
console.log(err_1);
|
|
802
|
+
index_1.Helpers.warn("Trying to assign port :".concat(startFrom, " but already in use."), false);
|
|
803
|
+
return [3 /*break*/, 5];
|
|
804
|
+
case 5:
|
|
805
|
+
startFrom += 1;
|
|
806
|
+
if (i++ === max) {
|
|
807
|
+
index_1.Helpers.error("[taon-helpers]] failed to assign free port after ".concat(max, " trys..."));
|
|
808
|
+
}
|
|
809
|
+
return [3 /*break*/, 1];
|
|
810
|
+
case 6: return [2 /*return*/];
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
//#endregion
|
|
816
|
+
//#region methods & getters / remove project from disk/memory
|
|
817
|
+
BaseProject.prototype.removeItself = function () {
|
|
818
|
+
//#region @backend
|
|
819
|
+
this.ins.remove(this);
|
|
820
|
+
//#endregion
|
|
821
|
+
};
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region methods & getters / define property
|
|
824
|
+
/**
|
|
825
|
+
* Purpose: not initializing all classes at the beginning
|
|
826
|
+
* Only for BaseFeatureForProject class
|
|
827
|
+
*/
|
|
828
|
+
BaseProject.prototype.defineProperty = function (variableName, classFn, options) {
|
|
829
|
+
//#region @backendFunc
|
|
830
|
+
var customInstanceReturn = (options || {}).customInstanceReturn;
|
|
831
|
+
var that = this;
|
|
832
|
+
// @ts-ignore
|
|
833
|
+
var prefixedName = "__".concat(variableName);
|
|
834
|
+
Object.defineProperty(this, variableName, {
|
|
835
|
+
get: function () {
|
|
836
|
+
if (!that[prefixedName]) {
|
|
837
|
+
if (typeof classFn === 'function') {
|
|
838
|
+
if (!!customInstanceReturn) {
|
|
839
|
+
that[prefixedName] = customInstanceReturn();
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
that[prefixedName] = new classFn(that);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
index_1.Helpers.warn("[taon-helpers] Cannot create dynamic instance of class \"".concat(tnp_core_4._.kebabCase(prefixedName.replace('__', '')), "\"."));
|
|
847
|
+
}
|
|
848
|
+
// }
|
|
849
|
+
}
|
|
850
|
+
return that[prefixedName];
|
|
851
|
+
},
|
|
852
|
+
set: function (v) {
|
|
853
|
+
that[prefixedName] = v;
|
|
854
|
+
},
|
|
855
|
+
});
|
|
856
|
+
//#endregion
|
|
857
|
+
};
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region methods & getters / filter only copy
|
|
860
|
+
/**
|
|
861
|
+
* fs.copy option filter function for copying only selected folders from project
|
|
862
|
+
*/
|
|
863
|
+
BaseProject.prototype.filterOnlyCopy = function (basePathFoldersOnlyToInclude) {
|
|
864
|
+
//#region @backendFunc
|
|
865
|
+
return index_1.Helpers.filterOnlyCopy(basePathFoldersOnlyToInclude, this.location);
|
|
866
|
+
//#endregion
|
|
867
|
+
};
|
|
868
|
+
//#endregion
|
|
869
|
+
//#region methods & getters / filter don't copy
|
|
870
|
+
/**
|
|
871
|
+
* fs.copy option filter function for copying only not selected folders from project
|
|
872
|
+
*/
|
|
873
|
+
BaseProject.prototype.filterDontCopy = function (basePathFoldersTosSkip) {
|
|
874
|
+
//#region @backendFunc
|
|
875
|
+
return index_1.Helpers.filterDontCopy(basePathFoldersTosSkip, this.location);
|
|
876
|
+
//#endregion
|
|
877
|
+
};
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region methods & getters / get default develop Branch
|
|
880
|
+
/**
|
|
881
|
+
* general default development branch for all kinds of projects
|
|
882
|
+
*/
|
|
883
|
+
BaseProject.prototype.getDefaultDevelopmentBranch = function () {
|
|
884
|
+
return 'develop';
|
|
885
|
+
};
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region methods & getters / get main branches
|
|
888
|
+
/**
|
|
889
|
+
* main/default hardcoded branches
|
|
890
|
+
*/
|
|
891
|
+
BaseProject.prototype.getMainBranches = function () {
|
|
892
|
+
return ['master', 'develop', 'stage', 'prod', 'test'];
|
|
893
|
+
};
|
|
894
|
+
//#endregion
|
|
895
|
+
//#region methods & getters / is using action commit
|
|
896
|
+
BaseProject.prototype.isUnsingActionCommit = function () {
|
|
897
|
+
return false;
|
|
898
|
+
};
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region methods & getters / use feature in branch name for tests
|
|
901
|
+
BaseProject.prototype.useFeatureInBranchNameForTests = function () {
|
|
902
|
+
return false;
|
|
903
|
+
};
|
|
904
|
+
//#endregion
|
|
905
|
+
//#region methods & getters / reset process
|
|
906
|
+
BaseProject.prototype.resetProcess = function (overrideBranch_1) {
|
|
907
|
+
return tslib_1.__awaiter(this, arguments, void 0, function (overrideBranch, recrusive) {
|
|
908
|
+
var branchToReset, _a, _b, linked, child, e_5_1;
|
|
909
|
+
var e_5, _c;
|
|
910
|
+
var _d;
|
|
911
|
+
if (recrusive === void 0) { recrusive = false; }
|
|
912
|
+
return tslib_1.__generator(this, function (_e) {
|
|
913
|
+
switch (_e.label) {
|
|
914
|
+
case 0:
|
|
915
|
+
//#region @backend
|
|
916
|
+
// console.log(`CORE PROJECT BRANCH ${this.name}: ${this.core?.branch}, overrideBranch: ${overrideBranch}`)
|
|
917
|
+
index_1.Helpers.taskStarted("\n\n Starting reset process for ".concat(this.name || this.basename, "\n\n "));
|
|
918
|
+
this.git._beforeAnyActionOnGitRoot();
|
|
919
|
+
branchToReset = overrideBranch || ((_d = this.core) === null || _d === void 0 ? void 0 : _d.branch) || this.getDefaultDevelopmentBranch();
|
|
920
|
+
index_1.Helpers.info("fetch data in ".concat(this.genericName));
|
|
921
|
+
this.git.fetch();
|
|
922
|
+
if (!!this.linkedProjects.getLinkedProjectsConfig().resetOnlyChildren) return [3 /*break*/, 3];
|
|
923
|
+
index_1.Helpers.logInfo("reseting hard in ".concat(this.genericName));
|
|
924
|
+
this.git.resetHard();
|
|
925
|
+
index_1.Helpers.logInfo("checking out branch \"".concat(branchToReset, "\" in ").concat(this.genericName));
|
|
926
|
+
this.git.checkout(branchToReset);
|
|
927
|
+
index_1.Helpers.logInfo("pulling current branch in ".concat(this.genericName));
|
|
928
|
+
return [4 /*yield*/, this.git.pullCurrentBranch({ askToRetry: true })];
|
|
929
|
+
case 1:
|
|
930
|
+
_e.sent();
|
|
931
|
+
index_1.Helpers.logInfo("initing (struct) in ".concat(this.genericName));
|
|
932
|
+
return [4 /*yield*/, this.struct()];
|
|
933
|
+
case 2:
|
|
934
|
+
_e.sent();
|
|
935
|
+
index_1.Helpers.taskDone("RESET DONE BRANCH: ".concat(tnp_core_1.chalk.bold(branchToReset), " in ").concat(this.genericName));
|
|
936
|
+
_e.label = 3;
|
|
937
|
+
case 3:
|
|
938
|
+
_e.trys.push([3, 8, 9, 10]);
|
|
939
|
+
_a = tslib_1.__values(this.linkedProjects.linkedProjects), _b = _a.next();
|
|
940
|
+
_e.label = 4;
|
|
941
|
+
case 4:
|
|
942
|
+
if (!!_b.done) return [3 /*break*/, 7];
|
|
943
|
+
linked = _b.value;
|
|
944
|
+
child = this.ins.From(this.pathFor([linked.relativeClonePath]));
|
|
945
|
+
if (!child) return [3 /*break*/, 6];
|
|
946
|
+
return [4 /*yield*/, child.resetProcess(child.linkedProjects.resetLinkedProjectsOnlyToCoreBranches()
|
|
947
|
+
? void 0
|
|
948
|
+
: branchToReset, true)];
|
|
949
|
+
case 5:
|
|
950
|
+
_e.sent();
|
|
951
|
+
_e.label = 6;
|
|
952
|
+
case 6:
|
|
953
|
+
_b = _a.next();
|
|
954
|
+
return [3 /*break*/, 4];
|
|
955
|
+
case 7: return [3 /*break*/, 10];
|
|
956
|
+
case 8:
|
|
957
|
+
e_5_1 = _e.sent();
|
|
958
|
+
e_5 = { error: e_5_1 };
|
|
959
|
+
return [3 /*break*/, 10];
|
|
960
|
+
case 9:
|
|
961
|
+
try {
|
|
962
|
+
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
963
|
+
}
|
|
964
|
+
finally { if (e_5) throw e_5.error; }
|
|
965
|
+
return [7 /*endfinally*/];
|
|
966
|
+
case 10: return [2 /*return*/];
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
});
|
|
970
|
+
};
|
|
971
|
+
//#endregion
|
|
972
|
+
//#region methods & getters / link project to
|
|
973
|
+
BaseProject.prototype.linkTo = function (destPackageLocation) {
|
|
974
|
+
//#region @backend
|
|
975
|
+
index_1.Helpers.createSymLink(this.location, destPackageLocation);
|
|
976
|
+
//#endregion
|
|
977
|
+
};
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region methods & getters / set value to json
|
|
980
|
+
BaseProject.prototype.setValueToJSON = function (relativePath, lodashGetPath, value) {
|
|
981
|
+
//#region @backendFunc
|
|
982
|
+
if (Array.isArray(relativePath)) {
|
|
983
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
984
|
+
}
|
|
985
|
+
index_1.Helpers.setValueToJSON(this.pathFor(relativePath), lodashGetPath, value);
|
|
986
|
+
//#endregion
|
|
987
|
+
};
|
|
988
|
+
//#endregion
|
|
989
|
+
//#region methods & getters / set value to json
|
|
990
|
+
BaseProject.prototype.setValueToJSONC = function (relativePath, lodashGetPath, value) {
|
|
991
|
+
//#region @backendFunc
|
|
992
|
+
if (Array.isArray(relativePath)) {
|
|
993
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
994
|
+
}
|
|
995
|
+
index_1.Helpers.setValueToJSONC(this.pathFor(relativePath), lodashGetPath, value);
|
|
996
|
+
//#endregion
|
|
997
|
+
};
|
|
998
|
+
//#endregion
|
|
999
|
+
//#region methods & getters / set value to json
|
|
1000
|
+
BaseProject.prototype.setValueToJSON5 = function (relativePath, lodashGetPath, value) {
|
|
1001
|
+
//#region @backendFunc
|
|
1002
|
+
if (Array.isArray(relativePath)) {
|
|
1003
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
1004
|
+
}
|
|
1005
|
+
index_1.Helpers.setValueToJSONC(this.pathFor(relativePath), lodashGetPath, value);
|
|
1006
|
+
//#endregion
|
|
1007
|
+
};
|
|
1008
|
+
//#endregion
|
|
1009
|
+
//#region methods & getters / get value from json
|
|
1010
|
+
BaseProject.prototype.getValueFromJSON = function (relativePath, lodashGetPath, defaultValue) {
|
|
1011
|
+
if (defaultValue === void 0) { defaultValue = void 0; }
|
|
1012
|
+
//#region @backendFunc
|
|
1013
|
+
if (Array.isArray(relativePath)) {
|
|
1014
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
1015
|
+
}
|
|
1016
|
+
return index_1.Helpers.getValueFromJSON(this.pathFor(relativePath), lodashGetPath, defaultValue);
|
|
1017
|
+
//#endregion
|
|
1018
|
+
};
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region methods & getters / get value from jsonc
|
|
1021
|
+
BaseProject.prototype.getValueFromJSONC = function (relativePath, lodashGetPath, defaultValue) {
|
|
1022
|
+
if (defaultValue === void 0) { defaultValue = void 0; }
|
|
1023
|
+
//#region @backendFunc
|
|
1024
|
+
if (Array.isArray(relativePath)) {
|
|
1025
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
1026
|
+
}
|
|
1027
|
+
return index_1.Helpers.getValueFromJSONC(this.pathFor(relativePath), lodashGetPath, defaultValue);
|
|
1028
|
+
//#endregion
|
|
1029
|
+
};
|
|
1030
|
+
//#endregion
|
|
1031
|
+
//#region methods & getters / write file
|
|
1032
|
+
BaseProject.prototype.writeFile = function (relativePath, content) {
|
|
1033
|
+
//#region @backend
|
|
1034
|
+
if (Array.isArray(relativePath)) {
|
|
1035
|
+
relativePath = (0, tnp_core_3.crossPlatformPath)(relativePath);
|
|
1036
|
+
}
|
|
1037
|
+
index_1.Helpers.writeFile([this.location, relativePath], content);
|
|
1038
|
+
//#endregion
|
|
1039
|
+
};
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region getters & methods / run command and get string
|
|
1042
|
+
BaseProject.prototype.runCommandGetString = function (command) {
|
|
1043
|
+
//#region @backendFunc
|
|
1044
|
+
return index_1.Helpers.commnadOutputAsString(command, this.location, {
|
|
1045
|
+
biggerBuffer: false,
|
|
1046
|
+
});
|
|
1047
|
+
//#endregion
|
|
1048
|
+
};
|
|
1049
|
+
Object.defineProperty(BaseProject.prototype, "parentsNames", {
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region getters & methods / find partners names
|
|
1052
|
+
get: function () {
|
|
1053
|
+
//#region @backendFunc
|
|
1054
|
+
return this.findParentsNames();
|
|
1055
|
+
//#endregion
|
|
1056
|
+
},
|
|
1057
|
+
enumerable: false,
|
|
1058
|
+
configurable: true
|
|
1059
|
+
});
|
|
1060
|
+
//#region getters & methods / open location
|
|
1061
|
+
BaseProject.prototype.openLocation = function (relativeFolderPath) {
|
|
1062
|
+
//#region @backendFunc
|
|
1063
|
+
index_1.Helpers.openFolderInFileExploer(this.pathFor(relativeFolderPath));
|
|
1064
|
+
//#endregion
|
|
1065
|
+
};
|
|
1066
|
+
//#endregion
|
|
1067
|
+
BaseProject.prototype.findParentsNames = function (project, parent, result) {
|
|
1068
|
+
if (result === void 0) { result = []; }
|
|
1069
|
+
//#region @backendFunc
|
|
1070
|
+
if (!project && !parent) {
|
|
1071
|
+
project = this;
|
|
1072
|
+
}
|
|
1073
|
+
if (!project && parent) {
|
|
1074
|
+
return result.reverse();
|
|
1075
|
+
}
|
|
1076
|
+
if (project && project.parent) {
|
|
1077
|
+
result.push(project.parent.name);
|
|
1078
|
+
}
|
|
1079
|
+
return this.findParentsNames(project.parent, project, result);
|
|
1080
|
+
//#endregion
|
|
1081
|
+
};
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region getters & methods / kill all instance
|
|
1084
|
+
BaseProject.prototype.tryKillAllElectronInstances = function () {
|
|
1085
|
+
//#region @backendFunc
|
|
1086
|
+
index_1.Helpers.taskStarted('Killing all app instances');
|
|
1087
|
+
try {
|
|
1088
|
+
if (process.platform === 'win32') {
|
|
1089
|
+
index_1.Helpers.run("taskkill /f /im ".concat(this.name, ".exe")).sync();
|
|
1090
|
+
}
|
|
1091
|
+
else {
|
|
1092
|
+
index_1.Helpers.run("fkill -f ".concat(this.name)).sync();
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
catch (error) { }
|
|
1096
|
+
index_1.Helpers.taskDone('Done kill all app instances');
|
|
1097
|
+
//#endregion
|
|
1098
|
+
};
|
|
1099
|
+
//#endregion
|
|
1100
|
+
//#region getters & methods / init
|
|
1101
|
+
/**
|
|
1102
|
+
* init project files structure and depedencies
|
|
1103
|
+
*/
|
|
1104
|
+
BaseProject.prototype.init = function (initOptions) {
|
|
1105
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1106
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1107
|
+
throw new Error('TODO IMPLEMENT');
|
|
1108
|
+
});
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1111
|
+
//#endregion
|
|
1112
|
+
//#region getters & methods / link
|
|
1113
|
+
/**
|
|
1114
|
+
* globally link npm as package
|
|
1115
|
+
*/
|
|
1116
|
+
BaseProject.prototype.link = function () {
|
|
1117
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1118
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1119
|
+
throw new Error('TODO IMPLEMENT');
|
|
1120
|
+
});
|
|
1121
|
+
});
|
|
1122
|
+
};
|
|
1123
|
+
//#endregion
|
|
1124
|
+
//#region getters & methods / struct
|
|
1125
|
+
/**
|
|
1126
|
+
* init project files structure without depedencies
|
|
1127
|
+
*/
|
|
1128
|
+
BaseProject.prototype.struct = function (initOptions) {
|
|
1129
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1130
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1131
|
+
throw new Error('TODO IMPLEMENT');
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
};
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region getters & methods / build
|
|
1137
|
+
/**
|
|
1138
|
+
* init and build() project
|
|
1139
|
+
*/
|
|
1140
|
+
BaseProject.prototype.test = function (testOptions) {
|
|
1141
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1142
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1143
|
+
throw new Error('TODO IMPLEMENT');
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
};
|
|
1147
|
+
//#endregion
|
|
1148
|
+
//#region getters & methods / build
|
|
1149
|
+
/**
|
|
1150
|
+
* init and build() project
|
|
1151
|
+
*/
|
|
1152
|
+
BaseProject.prototype.build = function (buildOptions) {
|
|
1153
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1154
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1155
|
+
throw new Error('TODO IMPLEMENT');
|
|
1156
|
+
});
|
|
1157
|
+
});
|
|
1158
|
+
};
|
|
1159
|
+
//#endregion
|
|
1160
|
+
//#region getters & methods / publish
|
|
1161
|
+
/**
|
|
1162
|
+
* publish project to npm
|
|
1163
|
+
*/
|
|
1164
|
+
BaseProject.prototype.publish = function (publishOptions) {
|
|
1165
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1166
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1167
|
+
throw new Error('TODO IMPLEMENT');
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region getters & methods / build
|
|
1173
|
+
BaseProject.prototype.release = function (releaseOptions) {
|
|
1174
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1175
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1176
|
+
throw new Error('TODO IMPLEMENT');
|
|
1177
|
+
});
|
|
1178
|
+
});
|
|
1179
|
+
};
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region getters & methods / lint
|
|
1182
|
+
/**
|
|
1183
|
+
* lint porject
|
|
1184
|
+
*/
|
|
1185
|
+
BaseProject.prototype.lint = function (lintOptions) {
|
|
1186
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1187
|
+
return tslib_1.__generator(this, function (_a) {
|
|
1188
|
+
index_1.Helpers.info("\n\n\n COMMIT LINT NOT IMPLEMENTED\n\n\n ");
|
|
1189
|
+
return [2 /*return*/];
|
|
1190
|
+
});
|
|
1191
|
+
});
|
|
1192
|
+
};
|
|
1193
|
+
//#endregion
|
|
1194
|
+
//#region getters & methods / info
|
|
1195
|
+
/**
|
|
1196
|
+
* get info about porject
|
|
1197
|
+
*/
|
|
1198
|
+
BaseProject.prototype.info = function () {
|
|
1199
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1200
|
+
var proj;
|
|
1201
|
+
var _this = this;
|
|
1202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1203
|
+
return tslib_1.__generator(this, function (_l) {
|
|
1204
|
+
proj = this;
|
|
1205
|
+
index_1.Helpers.info("\n\n name: ".concat(proj === null || proj === void 0 ? void 0 : proj.name, "\n type: ").concat(proj === null || proj === void 0 ? void 0 : proj.type, "\n parent: ").concat(((_a = proj === null || proj === void 0 ? void 0 : proj.parent) === null || _a === void 0 ? void 0 : _a.genericName) || '< none >', "\n core project name: '").concat((_b = proj === null || proj === void 0 ? void 0 : proj.core) === null || _b === void 0 ? void 0 : _b.name, "'\n embedded project: ").concat(((_c = proj === null || proj === void 0 ? void 0 : proj.linkedProjects.embeddedProject) === null || _c === void 0 ? void 0 : _c.genericName) || '< none >', "\n children (").concat(proj === null || proj === void 0 ? void 0 : proj.children.length, "): ").concat(!proj || !proj.children.length ? '< none >' : '', "\n").concat(proj === null || proj === void 0 ? void 0 : proj.children.map(function (c) { return '+' + c.genericName; }).join('\n'), "\n\n libraries (").concat((_e = (_d = proj === null || proj === void 0 ? void 0 : proj.libraryBuild) === null || _d === void 0 ? void 0 : _d.libraries) === null || _e === void 0 ? void 0 : _e.length, "): ").concat(!proj || !((_g = (_f = proj.libraryBuild) === null || _f === void 0 ? void 0 : _f.libraries) === null || _g === void 0 ? void 0 : _g.length) ? '< none >' : '', "\n").concat((_j = (_h = proj === null || proj === void 0 ? void 0 : proj.libraryBuild) === null || _h === void 0 ? void 0 : _h.libraries) === null || _j === void 0 ? void 0 : _j.map(function (c) { return '+' + c.genericName; }).join('\n'), "\n") +
|
|
1206
|
+
"\nlinked porject prefix: \"".concat(this.linkedProjects.linkedProjectsPrefix, "\"\n\nlinked projects from json (").concat(((_k = this.linkedProjects.linkedProjects) === null || _k === void 0 ? void 0 : _k.length) || 0, "):\n").concat((this.linkedProjects.linkedProjects || [])
|
|
1207
|
+
.map(function (c) {
|
|
1208
|
+
var proj = _this.ins.From(_this.pathFor(c.relativeClonePath));
|
|
1209
|
+
return '- ' + proj ? proj === null || proj === void 0 ? void 0 : proj.genericName : c.relativeClonePath;
|
|
1210
|
+
})
|
|
1211
|
+
.join('\n'), "\n\n "));
|
|
1212
|
+
return [2 /*return*/];
|
|
1213
|
+
});
|
|
1214
|
+
});
|
|
1215
|
+
};
|
|
1216
|
+
//#region static
|
|
1217
|
+
//#region static / instance of resovle
|
|
1218
|
+
BaseProject.ins = new base_project_resolver_1.BaseProjectResolver(BaseProject, 'taon');
|
|
1219
|
+
BaseProject.cache = {};
|
|
1220
|
+
return BaseProject;
|
|
1221
|
+
}());
|
|
1222
|
+
exports.BaseProject = BaseProject;
|
|
1223
|
+
//# sourceMappingURL=base-project.js.map
|