tnp-helpers 18.0.20 → 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/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 +10 -2
- 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 +229 -4
- package/browser/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/browser/esm2022/lib/base/classes/base-library-build.mjs +11 -7
- 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 -429
- 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 +76 -61
- package/browser/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/browser/esm2022/lib/base/classes/base-release-process.mjs +44 -11
- 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 +29 -1
- package/browser/esm2022/lib/base/classes/index.mjs +5 -1
- package/browser/esm2022/lib/base/commit-data.mjs +19 -1
- 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 -1
- package/browser/esm2022/lib/models.mjs +173 -3
- package/browser/esm2022/lib/utils.mjs +402 -41
- package/browser/fesm2022/tnp-helpers.mjs +4619 -2888
- 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 +1 -1
- 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 +34 -5
- package/browser/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/browser/lib/base/classes/base-library-build.d.ts +5 -5
- 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 -112
- 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 +14 -16
- package/browser/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/browser/lib/base/classes/base-release-process.d.ts +8 -9
- 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/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/models.d.ts +68 -2
- package/browser/lib/utils.d.ts +72 -13
- 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 +10 -2
- 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 +229 -4
- package/client/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/client/esm2022/lib/base/classes/base-library-build.mjs +11 -7
- 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 -429
- 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 +76 -61
- package/client/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/client/esm2022/lib/base/classes/base-release-process.mjs +44 -11
- 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 +29 -1
- package/client/esm2022/lib/base/classes/index.mjs +5 -1
- package/client/esm2022/lib/base/commit-data.mjs +19 -1
- 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 -1
- package/client/esm2022/lib/models.mjs +173 -3
- package/client/esm2022/lib/utils.mjs +402 -41
- package/client/fesm2022/tnp-helpers.mjs +4619 -2888
- 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 +1 -1
- 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 +34 -5
- package/client/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/client/lib/base/classes/base-library-build.d.ts +5 -5
- 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 -112
- 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 +14 -16
- package/client/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/client/lib/base/classes/base-release-process.d.ts +8 -9
- 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/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/models.d.ts +68 -2
- 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 +1 -1
- package/lib/base/classes/base-cli-worker.js +402 -610
- 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 +32 -3
- package/lib/base/classes/base-git.js +885 -975
- 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 +7 -2
- package/lib/base/classes/base-global-command-line.backend.js +1055 -2021
- 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 +5 -6
- package/lib/base/classes/base-library-build.js +431 -653
- 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 -99
- package/lib/base/classes/base-npm-helpers.js +178 -737
- 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 +17 -15
- package/lib/base/classes/base-project.js +551 -733
- 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 +8 -9
- package/lib/base/classes/base-release-process.js +482 -757
- package/lib/base/classes/base-release-process.js.map +1 -1
- package/lib/base/classes/base-start-config.backend.js +115 -99
- 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 -426
- 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 +408 -460
- 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.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 +28 -3
- package/lib/helpers/for-backend/helpers-git.backend.js +804 -864
- 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 +2 -1
- package/lib/index.js +21 -7
- 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 -2
- 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 +26 -41
- package/tmp-environment.json +8 -389
- 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 +10 -2
- 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 +229 -4
- package/websql/esm2022/lib/base/classes/base-json-file-reader.mjs +114 -0
- package/websql/esm2022/lib/base/classes/base-library-build.mjs +11 -7
- 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 -429
- 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 +75 -61
- package/websql/esm2022/lib/base/classes/base-quick-fixes.mjs +44 -1
- package/websql/esm2022/lib/base/classes/base-release-process.mjs +44 -11
- 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 +29 -1
- package/websql/esm2022/lib/base/classes/index.mjs +5 -1
- package/websql/esm2022/lib/base/commit-data.mjs +19 -1
- 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 -1
- package/websql/esm2022/lib/models.mjs +173 -3
- package/websql/esm2022/lib/utils.mjs +402 -41
- package/websql/fesm2022/tnp-helpers.mjs +4738 -3007
- 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 +1 -1
- 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 +34 -5
- package/websql/lib/base/classes/base-json-file-reader.d.ts +72 -0
- package/websql/lib/base/classes/base-library-build.d.ts +5 -5
- 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 -110
- 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 +14 -16
- package/websql/lib/base/classes/base-quick-fixes.d.ts +3 -1
- package/websql/lib/base/classes/base-release-process.d.ts +8 -9
- 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/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/models.d.ts +68 -2
- package/websql/lib/utils.d.ts +72 -13
- package/browser/package.json +0 -25
- package/websql/package.json +0 -25
|
@@ -1,43 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseLibraryBuild =
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
3
|
+
exports.BaseLibraryBuild = void 0;
|
|
5
4
|
//#region import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var tnp_core_3 = require("tnp-core");
|
|
13
|
-
var base_feature_for_project_1 = require("./base-feature-for-project");
|
|
14
|
-
var index_1 = require("../../index");
|
|
5
|
+
const tnp_config_1 = require("tnp-config");
|
|
6
|
+
const tnp_core_1 = require("tnp-core");
|
|
7
|
+
const tnp_core_2 = require("tnp-core");
|
|
8
|
+
const tnp_core_3 = require("tnp-core");
|
|
9
|
+
const index_1 = require("../../index");
|
|
10
|
+
const base_feature_for_project_1 = require("./base-feature-for-project");
|
|
15
11
|
//#endregion
|
|
16
12
|
/**
|
|
17
13
|
* Base library build for standard angular/typescript projects
|
|
18
14
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
|
|
23
|
-
_this.cache = {};
|
|
24
|
-
_this.tempOrgTsConfigFile = "tmp-original-".concat(tnp_config_1.config.file.tsconfig_json);
|
|
25
|
-
return _this;
|
|
26
|
-
//#endregion
|
|
27
|
-
}
|
|
15
|
+
class BaseLibraryBuild extends base_feature_for_project_1.BaseFeatureForProject {
|
|
16
|
+
cache = {};
|
|
17
|
+
tempOrgTsConfigFile = `tmp-original-${tnp_config_1.config.file.tsconfig_json}`;
|
|
28
18
|
//#region getters & methods / sort by deps
|
|
29
|
-
|
|
19
|
+
sortByDeps(libraries) {
|
|
30
20
|
//#region @backendFunc
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
const libs = libraries;
|
|
22
|
+
const sorted = this.project.ins.sortGroupOfProject(libs, proj => {
|
|
33
23
|
// resolve dependencies names
|
|
34
24
|
if (!tnp_core_3._.isUndefined(proj.cache['deps'])) {
|
|
35
25
|
return proj.cache['deps'];
|
|
36
26
|
}
|
|
37
|
-
|
|
38
|
-
proj.cache['deps'] = allLibs.filter(
|
|
27
|
+
const allLibs = Object.keys(proj.packageJson.allDependencies);
|
|
28
|
+
proj.cache['deps'] = allLibs.filter(f => !tnp_core_3._.isUndefined(libs.find(c => c.name === f)));
|
|
39
29
|
return proj.cache['deps'];
|
|
40
|
-
},
|
|
30
|
+
}, proj => {
|
|
41
31
|
// resolve name to compare
|
|
42
32
|
if (!tnp_core_3._.isUndefined(proj.cache['nameToCompare'])) {
|
|
43
33
|
return proj.cache['nameToCompare'];
|
|
@@ -47,7 +37,7 @@ var BaseLibraryBuild = /** @class */ (function (_super) {
|
|
|
47
37
|
});
|
|
48
38
|
return sorted;
|
|
49
39
|
//#endregion
|
|
50
|
-
}
|
|
40
|
+
}
|
|
51
41
|
//#endregion
|
|
52
42
|
//#region getters & methods / get sorted libraries by deps for build\
|
|
53
43
|
/**
|
|
@@ -61,674 +51,462 @@ var BaseLibraryBuild = /** @class */ (function (_super) {
|
|
|
61
51
|
* 5. build selected libraries in watch mode
|
|
62
52
|
* (skip normal build for not selected libraries)
|
|
63
53
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (_d) return [3 /*break*/, 5];
|
|
102
|
-
return [4 /*yield*/, index_1.Helpers.consoleGui.question.yesNo("Skip rebuilding all libraries for watch mode ?")];
|
|
103
|
-
case 4:
|
|
104
|
-
_d = (_f.sent());
|
|
105
|
-
_f.label = 5;
|
|
106
|
-
case 5:
|
|
107
|
-
skipRebuildingAllForWatch = _d;
|
|
108
|
-
return [3 /*break*/, 7];
|
|
109
|
-
case 6:
|
|
54
|
+
async selectAndSaveLibraries(
|
|
55
|
+
// this: {},
|
|
56
|
+
{ selectedLibs, watch, watchBuildSupported, skipAllLibsQuestion, useLastUserConfiguration, }) {
|
|
57
|
+
//#region @backendFunc
|
|
58
|
+
let buildAll = false;
|
|
59
|
+
let skipRebuildingAllForWatch = false;
|
|
60
|
+
if (selectedLibs.length <= 1) {
|
|
61
|
+
return { selectedLibs, skipRebuildingAllForWatch };
|
|
62
|
+
}
|
|
63
|
+
if (tnp_core_3._.isUndefined(watchBuildSupported)) {
|
|
64
|
+
watchBuildSupported = true;
|
|
65
|
+
}
|
|
66
|
+
const lastSelected = index_1.Helpers.readJson(this.project.pathFor(tnp_config_1.FilesNames.tmpLastSelectedJsonFile))
|
|
67
|
+
?.lastSelected || [];
|
|
68
|
+
if (tnp_core_3._.isArray(lastSelected) && lastSelected.length > 0) {
|
|
69
|
+
const selected = lastSelected
|
|
70
|
+
.map(c => selectedLibs.find(l => l.name == c))
|
|
71
|
+
.filter(c => !!c);
|
|
72
|
+
index_1.Helpers.info(`
|
|
73
|
+
Last selected libs
|
|
74
|
+
|
|
75
|
+
${selected.map((c, i) => `${i + 1}. ${c.basename} ${tnp_core_1.chalk.bold(c.name)}`).join('\n')}
|
|
76
|
+
|
|
77
|
+
`);
|
|
78
|
+
if (useLastUserConfiguration
|
|
79
|
+
? true
|
|
80
|
+
: await index_1.Helpers.consoleGui.question.yesNo(`Continue${watch ? ' watch ' : ' '}build with last selected ?`)) {
|
|
81
|
+
selectedLibs = selected;
|
|
82
|
+
// TODO maybe safe about skip
|
|
83
|
+
if ((watchBuildSupported && watch) || useLastUserConfiguration) {
|
|
84
|
+
// if(this.project)
|
|
85
|
+
if (this.project.hasFolder(tnp_config_1.config.folder.dist)) {
|
|
86
|
+
skipRebuildingAllForWatch =
|
|
87
|
+
useLastUserConfiguration ||
|
|
88
|
+
(await index_1.Helpers.consoleGui.question.yesNo(`Skip rebuilding all libraries for watch mode ?`));
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
110
91
|
// no dist -> rebuild all
|
|
111
92
|
skipRebuildingAllForWatch = false;
|
|
112
|
-
|
|
113
|
-
case 7: return [2 /*return*/, { selectedLibs: selectedLibs, skipRebuildingAllForWatch: skipRebuildingAllForWatch }];
|
|
114
|
-
case 8:
|
|
115
|
-
if (!(!watch || (watch && selectedLibs.length < 6))) return [3 /*break*/, 10];
|
|
116
|
-
if (!!skipAllLibsQuestion) return [3 /*break*/, 10];
|
|
117
|
-
return [4 /*yield*/, index_1.Helpers.consoleGui.question.yesNo("Should all libraries be included in".concat(watch ? ' watch' : ' ', "build ?"))];
|
|
118
|
-
case 9:
|
|
119
|
-
buildAll = _f.sent();
|
|
120
|
-
_f.label = 10;
|
|
121
|
-
case 10:
|
|
122
|
-
if (buildAll) {
|
|
123
|
-
return [2 /*return*/, { selectedLibs: selectedLibs, skipRebuildingAllForWatch: skipRebuildingAllForWatch }];
|
|
124
|
-
}
|
|
125
|
-
_f.label = 11;
|
|
126
|
-
case 11:
|
|
127
|
-
if (!true) return [3 /*break*/, 14];
|
|
128
|
-
defaultSelected = lastSelected
|
|
129
|
-
.map(function (c) { return selectedLibs.find(function (l) { return l.name == c; }); })
|
|
130
|
-
.filter(function (c) { return !!c; })
|
|
131
|
-
.map(function (c) { return c.name; });
|
|
132
|
-
return [4 /*yield*/, tnp_core_3.UtilsTerminal.multiselect({
|
|
133
|
-
question: "Select libraries to ".concat(watch ? 'watch' : '', " build "),
|
|
134
|
-
choices: selectedLibs.map(function (c) {
|
|
135
|
-
return { name: c.name, value: c.name, selected: true };
|
|
136
|
-
}),
|
|
137
|
-
defaultSelected: defaultSelected,
|
|
138
|
-
})];
|
|
139
|
-
case 12:
|
|
140
|
-
pickedLibs = (_f.sent()).map(function (c) { return selectedLibs.find(function (l) { return l.name == c; }); });
|
|
141
|
-
selected = pickedLibs.filter(function (c) {
|
|
142
|
-
// if (!!c) { // TODO QUICK_FIX
|
|
143
|
-
// this.project.removeFile(lastSelectedJsonFile);
|
|
144
|
-
// Helpers.warn(`Please restart this command`);
|
|
145
|
-
// process.exit(0);
|
|
146
|
-
// }
|
|
147
|
-
return !!c;
|
|
148
|
-
});
|
|
149
|
-
index_1.Helpers.info("\n\n".concat(selected.map(function (c, i) { return "".concat(i + 1, ". ").concat(c.basename, " ").concat(tnp_core_1.chalk.bold(c.name)); }).join('\n'), "\n\n "));
|
|
150
|
-
return [4 /*yield*/, index_1.Helpers.consoleGui.question.yesNo("Continue build with ".concat(selected.length, " selected ?"))];
|
|
151
|
-
case 13:
|
|
152
|
-
if (_f.sent()) {
|
|
153
|
-
selectedLibs = selected;
|
|
154
|
-
return [3 /*break*/, 14];
|
|
155
|
-
}
|
|
156
|
-
return [3 /*break*/, 11];
|
|
157
|
-
case 14:
|
|
158
|
-
index_1.Helpers.writeJson(this.project.pathFor(tnp_config_1.FilesNames.tmpLastSelectedJsonFile), {
|
|
159
|
-
lastSelected: selectedLibs.map(function (c) { return c.name; }),
|
|
160
|
-
});
|
|
161
|
-
return [2 /*return*/, { selectedLibs: selectedLibs, skipRebuildingAllForWatch: skipRebuildingAllForWatch }];
|
|
93
|
+
}
|
|
162
94
|
}
|
|
95
|
+
return { selectedLibs, skipRebuildingAllForWatch };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// more than 6 libs can be hard to manage in watch mode
|
|
99
|
+
if (!watch || (watch && selectedLibs.length < 6)) {
|
|
100
|
+
if (!skipAllLibsQuestion) {
|
|
101
|
+
buildAll = await index_1.Helpers.consoleGui.question.yesNo(`Should all libraries be included in${watch ? ' watch' : ' '}build ?`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (buildAll) {
|
|
105
|
+
return { selectedLibs, skipRebuildingAllForWatch };
|
|
106
|
+
}
|
|
107
|
+
while (true) {
|
|
108
|
+
const defaultSelected = lastSelected
|
|
109
|
+
.map(c => selectedLibs.find(l => l.name == c))
|
|
110
|
+
.filter(c => !!c)
|
|
111
|
+
.map(c => c.name);
|
|
112
|
+
const pickedLibs = (await tnp_core_3.UtilsTerminal.multiselect({
|
|
113
|
+
question: `Select libraries to ${watch ? 'watch' : ''} build `,
|
|
114
|
+
choices: selectedLibs.map(c => {
|
|
115
|
+
return { name: c.name, value: c.name, selected: true };
|
|
116
|
+
}),
|
|
117
|
+
defaultSelected,
|
|
118
|
+
})).map(c => selectedLibs.find(l => l.name == c));
|
|
119
|
+
// console.log({ pickedLibs });
|
|
120
|
+
const selected = pickedLibs.filter(c => {
|
|
121
|
+
// if (!!c) { // TODO QUICK_FIX
|
|
122
|
+
// this.project.removeFile(lastSelectedJsonFile);
|
|
123
|
+
// Helpers.warn(`Please restart this command`);
|
|
124
|
+
// process.exit(0);
|
|
125
|
+
// }
|
|
126
|
+
return !!c;
|
|
163
127
|
});
|
|
128
|
+
index_1.Helpers.info(`
|
|
129
|
+
|
|
130
|
+
${selected.map((c, i) => `${i + 1}. ${c.basename} ${tnp_core_1.chalk.bold(c.name)}`).join('\n')}
|
|
131
|
+
|
|
132
|
+
`);
|
|
133
|
+
if (await index_1.Helpers.consoleGui.question.yesNo(`Continue build with ${selected.length} selected ?`)) {
|
|
134
|
+
selectedLibs = selected;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
index_1.Helpers.writeJson(this.project.pathFor(tnp_config_1.FilesNames.tmpLastSelectedJsonFile), {
|
|
139
|
+
lastSelected: selectedLibs.map(c => c.name),
|
|
164
140
|
});
|
|
165
|
-
|
|
166
|
-
Object.defineProperty(BaseLibraryBuild.prototype, "libraries", {
|
|
141
|
+
return { selectedLibs, skipRebuildingAllForWatch };
|
|
167
142
|
//#endregion
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return this.cache['libraries'];
|
|
176
|
-
}
|
|
177
|
-
var libraries = this.getLibraries();
|
|
178
|
-
this.cache['libraries'] = libraries;
|
|
179
|
-
return libraries;
|
|
180
|
-
//#endregion
|
|
181
|
-
},
|
|
182
|
-
enumerable: false,
|
|
183
|
-
configurable: true
|
|
184
|
-
});
|
|
185
|
-
BaseLibraryBuild.prototype.getLibraries = function () {
|
|
186
|
-
var _this = this;
|
|
187
|
-
var _a;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region getters & methods / angular libraries
|
|
146
|
+
/**
|
|
147
|
+
* angular libraries from angular.json
|
|
148
|
+
*/
|
|
149
|
+
get libraries() {
|
|
188
150
|
//#region @backendFunc
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
151
|
+
if (!tnp_core_3._.isUndefined(this.cache['libraries'])) {
|
|
152
|
+
return this.cache['libraries'];
|
|
153
|
+
}
|
|
154
|
+
const libraries = this.getLibraries();
|
|
155
|
+
this.cache['libraries'] = libraries;
|
|
156
|
+
return libraries;
|
|
157
|
+
//#endregion
|
|
158
|
+
}
|
|
159
|
+
getLibraries() {
|
|
160
|
+
//#region @backendFunc
|
|
161
|
+
const projects = Object.values(index_1.Helpers.readJson(this.project.pathFor(tnp_config_1.config.file.angular_json))
|
|
162
|
+
?.projects || {}).filter(f => f.projectType === 'library');
|
|
163
|
+
let libraries = projects.map(c => this.project.ins.From(tnp_core_2.path.join(this.project.location, c.root)));
|
|
193
164
|
libraries = this.sortByDeps(libraries);
|
|
194
165
|
return libraries;
|
|
195
166
|
//#endregion
|
|
196
|
-
}
|
|
167
|
+
}
|
|
197
168
|
//#endregion
|
|
198
169
|
//#region getters & methods / build libraries
|
|
199
170
|
/**
|
|
200
171
|
* Angular library build
|
|
201
172
|
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
], tslib_1.__read(copylink_to_node_modules), false), tslib_1.__read((!useExternalProvidedLibs
|
|
236
|
-
? []
|
|
237
|
-
: index_1.Helpers.uniqArray(libraries.map(function (c) {
|
|
238
|
-
return c.parent.pathFor(tnp_config_1.config.folder.node_modules);
|
|
239
|
-
})))), false);
|
|
240
|
-
return [4 /*yield*/, this.selectAndSaveLibraries({
|
|
241
|
-
selectedLibs: libraries ? libraries : allLibs,
|
|
242
|
-
watch: watch,
|
|
243
|
-
skipAllLibsQuestion: useExternalProvidedLibs,
|
|
244
|
-
useLastUserConfiguration: useLastUserConfiguration,
|
|
245
|
-
})];
|
|
246
|
-
case 3:
|
|
247
|
-
_b = _q.sent(), selectedLibs = _b.selectedLibs, skipRebuildingAllForWatch = _b.skipRebuildingAllForWatch;
|
|
248
|
-
allParenProjsForExtenalLibsBuild = useExternalProvidedLibs
|
|
249
|
-
? index_1.Helpers.uniqArray(libraries.map(function (c) { return c.parent; }), 'location')
|
|
250
|
-
: [this.project];
|
|
251
|
-
_q.label = 4;
|
|
252
|
-
case 4:
|
|
253
|
-
_q.trys.push([4, 16, 17, 18]);
|
|
254
|
-
allParenProjsForExtenalLibsBuild_1 = tslib_1.__values(allParenProjsForExtenalLibsBuild), allParenProjsForExtenalLibsBuild_1_1 = allParenProjsForExtenalLibsBuild_1.next();
|
|
255
|
-
_q.label = 5;
|
|
256
|
-
case 5:
|
|
257
|
-
if (!!allParenProjsForExtenalLibsBuild_1_1.done) return [3 /*break*/, 15];
|
|
258
|
-
libProj = allParenProjsForExtenalLibsBuild_1_1.value;
|
|
259
|
-
return [4 /*yield*/, libProj.init()];
|
|
260
|
-
case 6:
|
|
261
|
-
_q.sent();
|
|
262
|
-
_q.label = 7;
|
|
263
|
-
case 7:
|
|
264
|
-
_q.trys.push([7, 12, 13, 14]);
|
|
265
|
-
_c = (e_1 = void 0, tslib_1.__values(libProj.libraryBuild.libraries.entries())), _d = _c.next();
|
|
266
|
-
_q.label = 8;
|
|
267
|
-
case 8:
|
|
268
|
-
if (!!_d.done) return [3 /*break*/, 11];
|
|
269
|
-
_e = tslib_1.__read(_d.value, 2), index = _e[0], lib = _e[1];
|
|
270
|
-
if (watch && skipRebuildingAllForWatch) {
|
|
271
|
-
index_1.Helpers.info("Skipping build for watch mode (".concat(index + 1, "/").concat(allLibs.length, ")") +
|
|
272
|
-
" ".concat(lib.basename, " (").concat(tnp_core_1.chalk.bold(lib.name), ")"));
|
|
273
|
-
return [3 /*break*/, 10];
|
|
274
|
-
}
|
|
275
|
-
index_1.Helpers.info("Building (".concat(index + 1, "/").concat(allLibs.length, ") ").concat(lib.basename) +
|
|
276
|
-
" (".concat(tnp_core_1.chalk.bold(lib.name), ")"));
|
|
277
|
-
return [4 /*yield*/, libProj.libraryBuild.libNormalBuildProcess({
|
|
278
|
-
lib: lib,
|
|
279
|
-
locationsForNodeModules: useExternalProvidedLibs
|
|
280
|
-
? [
|
|
281
|
-
this.project.pathFor(tnp_config_1.config.folder.node_modules),
|
|
282
|
-
libProj.pathFor(tnp_config_1.config.folder.node_modules),
|
|
283
|
-
]
|
|
284
|
-
: locationsForNodeModules,
|
|
285
|
-
strategy: strategy,
|
|
286
|
-
outputLineReplace: outputLineReplace &&
|
|
287
|
-
outputLineReplace(lib, useExternalProvidedLibs),
|
|
288
|
-
})];
|
|
289
|
-
case 9:
|
|
290
|
-
_q.sent();
|
|
291
|
-
_q.label = 10;
|
|
292
|
-
case 10:
|
|
293
|
-
_d = _c.next();
|
|
294
|
-
return [3 /*break*/, 8];
|
|
295
|
-
case 11: return [3 /*break*/, 14];
|
|
296
|
-
case 12:
|
|
297
|
-
e_1_1 = _q.sent();
|
|
298
|
-
e_1 = { error: e_1_1 };
|
|
299
|
-
return [3 /*break*/, 14];
|
|
300
|
-
case 13:
|
|
301
|
-
try {
|
|
302
|
-
if (_d && !_d.done && (_k = _c.return)) _k.call(_c);
|
|
303
|
-
}
|
|
304
|
-
finally { if (e_1) throw e_1.error; }
|
|
305
|
-
return [7 /*endfinally*/];
|
|
306
|
-
case 14:
|
|
307
|
-
allParenProjsForExtenalLibsBuild_1_1 = allParenProjsForExtenalLibsBuild_1.next();
|
|
308
|
-
return [3 /*break*/, 5];
|
|
309
|
-
case 15: return [3 /*break*/, 18];
|
|
310
|
-
case 16:
|
|
311
|
-
e_2_1 = _q.sent();
|
|
312
|
-
e_2 = { error: e_2_1 };
|
|
313
|
-
return [3 /*break*/, 18];
|
|
314
|
-
case 17:
|
|
315
|
-
try {
|
|
316
|
-
if (allParenProjsForExtenalLibsBuild_1_1 && !allParenProjsForExtenalLibsBuild_1_1.done && (_j = allParenProjsForExtenalLibsBuild_1.return)) _j.call(allParenProjsForExtenalLibsBuild_1);
|
|
317
|
-
}
|
|
318
|
-
finally { if (e_2) throw e_2.error; }
|
|
319
|
-
return [7 /*endfinally*/];
|
|
320
|
-
case 18:
|
|
321
|
-
_q.trys.push([18, 23, 24, 25]);
|
|
322
|
-
_f = tslib_1.__values(selectedLibs.entries()), _g = _f.next();
|
|
323
|
-
_q.label = 19;
|
|
324
|
-
case 19:
|
|
325
|
-
if (!!_g.done) return [3 /*break*/, 22];
|
|
326
|
-
_h = tslib_1.__read(_g.value, 2), index = _h[0], lib = _h[1];
|
|
327
|
-
index_1.Helpers.info("Building for watch (".concat(index + 1, "/").concat(selectedLibs.length, ") ") +
|
|
328
|
-
"".concat(lib.basename, " (").concat(tnp_core_1.chalk.bold(lib.name), ")"));
|
|
329
|
-
return [4 /*yield*/, this.libWatchBuildProcess({
|
|
330
|
-
lib: lib,
|
|
331
|
-
locationsForNodeModules: locationsForNodeModules,
|
|
332
|
-
strategy: strategy,
|
|
333
|
-
outputLineReplace: outputLineReplace && outputLineReplace(lib, useExternalProvidedLibs),
|
|
334
|
-
})];
|
|
335
|
-
case 20:
|
|
336
|
-
_q.sent();
|
|
337
|
-
_q.label = 21;
|
|
338
|
-
case 21:
|
|
339
|
-
_g = _f.next();
|
|
340
|
-
return [3 /*break*/, 19];
|
|
341
|
-
case 22: return [3 /*break*/, 25];
|
|
342
|
-
case 23:
|
|
343
|
-
e_3_1 = _q.sent();
|
|
344
|
-
e_3 = { error: e_3_1 };
|
|
345
|
-
return [3 /*break*/, 25];
|
|
346
|
-
case 24:
|
|
347
|
-
try {
|
|
348
|
-
if (_g && !_g.done && (_l = _f.return)) _l.call(_f);
|
|
349
|
-
}
|
|
350
|
-
finally { if (e_3) throw e_3.error; }
|
|
351
|
-
return [7 /*endfinally*/];
|
|
352
|
-
case 25:
|
|
353
|
-
//#endregion
|
|
354
|
-
//#region success message
|
|
355
|
-
if (watch) {
|
|
356
|
-
index_1.Helpers.success('BUILD DONE.. watching..');
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
// await this.__indexRebuilder.start({ taskName: 'index rebuild watch' });
|
|
360
|
-
index_1.Helpers.success('BUILD DONE');
|
|
361
|
-
}
|
|
362
|
-
return [2 /*return*/];
|
|
363
|
-
}
|
|
364
|
-
});
|
|
173
|
+
async buildLibraries(
|
|
174
|
+
// this:{},
|
|
175
|
+
{ watch = false, strategy, releaseBuild = false, copylink_to_node_modules, outputLineReplace, libraries, useLastUserConfiguration, } = {}) {
|
|
176
|
+
//#region @backend
|
|
177
|
+
await this.project.linkedProjects.saveAllLinkedProjectsToDB();
|
|
178
|
+
await this.changeTsConfigForLibrariesTypes();
|
|
179
|
+
//#region prepare parameters
|
|
180
|
+
if (!Array.isArray(copylink_to_node_modules)) {
|
|
181
|
+
copylink_to_node_modules = [];
|
|
182
|
+
}
|
|
183
|
+
if (!strategy) {
|
|
184
|
+
strategy = 'link';
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region select target node_modules
|
|
188
|
+
const useExternalProvidedLibs = !tnp_core_3._.isNil(libraries);
|
|
189
|
+
const allLibs = useExternalProvidedLibs ? libraries : this.libraries;
|
|
190
|
+
const locationsForNodeModules = releaseBuild
|
|
191
|
+
? []
|
|
192
|
+
: [
|
|
193
|
+
this.project.pathFor(tnp_config_1.config.folder.node_modules),
|
|
194
|
+
...copylink_to_node_modules,
|
|
195
|
+
...(!useExternalProvidedLibs
|
|
196
|
+
? []
|
|
197
|
+
: index_1.Helpers.uniqArray(libraries.map(c => c.parent.pathFor(tnp_config_1.config.folder.node_modules)))),
|
|
198
|
+
];
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region select libs to build
|
|
201
|
+
let { selectedLibs, skipRebuildingAllForWatch } = await this.selectAndSaveLibraries({
|
|
202
|
+
selectedLibs: libraries ? libraries : allLibs,
|
|
203
|
+
watch,
|
|
204
|
+
skipAllLibsQuestion: useExternalProvidedLibs,
|
|
205
|
+
useLastUserConfiguration,
|
|
365
206
|
});
|
|
366
|
-
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region normal build
|
|
209
|
+
const allParenProjsForExtenalLibsBuild = useExternalProvidedLibs
|
|
210
|
+
? index_1.Helpers.uniqArray(libraries.map(c => c.parent), 'location')
|
|
211
|
+
: [this.project];
|
|
212
|
+
// console.log(
|
|
213
|
+
// 'SORTED PROJECTS',
|
|
214
|
+
// additionalLibsProjs.map(c => c.name),
|
|
215
|
+
// );
|
|
216
|
+
selectedLibs = this.sortByDeps(selectedLibs);
|
|
217
|
+
// TODO sort additionalLibsProjs thing before ric
|
|
218
|
+
for (const libProj of allParenProjsForExtenalLibsBuild) {
|
|
219
|
+
await libProj.init();
|
|
220
|
+
for (const [index, lib] of libProj.libraryBuild.libraries.entries()) {
|
|
221
|
+
if (watch && skipRebuildingAllForWatch) {
|
|
222
|
+
const selectedNames = selectedLibs.map(c => c.name);
|
|
223
|
+
if (!selectedNames.includes(lib.name)) {
|
|
224
|
+
index_1.Helpers.info(`Skipping build for watch mode (${index + 1}/${allLibs.length})` +
|
|
225
|
+
` ${lib.basename} (${tnp_core_1.chalk.bold(lib.name)})`);
|
|
226
|
+
}
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
index_1.Helpers.info(`Building (${index + 1}/${allLibs.length}) ${lib.basename}` +
|
|
230
|
+
` (${tnp_core_1.chalk.bold(lib.name)})`);
|
|
231
|
+
await libProj.libraryBuild.libNormalBuildProcess({
|
|
232
|
+
lib,
|
|
233
|
+
locationsForNodeModules: useExternalProvidedLibs
|
|
234
|
+
? [
|
|
235
|
+
this.project.pathFor(tnp_config_1.config.folder.node_modules),
|
|
236
|
+
libProj.pathFor(tnp_config_1.config.folder.node_modules),
|
|
237
|
+
]
|
|
238
|
+
: locationsForNodeModules,
|
|
239
|
+
strategy,
|
|
240
|
+
outputLineReplace: outputLineReplace &&
|
|
241
|
+
outputLineReplace(lib, useExternalProvidedLibs),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region watch build
|
|
247
|
+
if (watch) {
|
|
248
|
+
for (const [index, lib] of selectedLibs.entries()) {
|
|
249
|
+
index_1.Helpers.info(`Building for watch (${index + 1}/${selectedLibs.length}) ` +
|
|
250
|
+
`${lib.basename} (${tnp_core_1.chalk.bold(lib.name)})`);
|
|
251
|
+
await this.libWatchBuildProcess({
|
|
252
|
+
lib,
|
|
253
|
+
locationsForNodeModules,
|
|
254
|
+
strategy,
|
|
255
|
+
outputLineReplace: outputLineReplace &&
|
|
256
|
+
outputLineReplace(lib, useExternalProvidedLibs),
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region success message
|
|
262
|
+
if (watch) {
|
|
263
|
+
index_1.Helpers.success('BUILD DONE.. watching..');
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
// await this.__indexRebuilder.start({ taskName: 'index rebuild watch' });
|
|
267
|
+
index_1.Helpers.success('BUILD DONE');
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#endregion
|
|
271
|
+
}
|
|
367
272
|
//#endregion
|
|
368
273
|
//#region getters & methods / lib watch build process
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
]);
|
|
382
|
-
try {
|
|
383
|
-
for (var locationsForNodeModules_1 = tslib_1.__values(locationsForNodeModules), locationsForNodeModules_1_1 = locationsForNodeModules_1.next(); !locationsForNodeModules_1_1.done; locationsForNodeModules_1_1 = locationsForNodeModules_1.next()) {
|
|
384
|
-
var node_modules = locationsForNodeModules_1_1.value;
|
|
385
|
-
var dest = (0, tnp_core_2.crossPlatformPath)([node_modules, lib.name]);
|
|
386
|
-
if (index_1.Helpers.isSymlinkFileExitedOrUnexisted(dest)) {
|
|
387
|
-
index_1.Helpers.remove(dest);
|
|
388
|
-
}
|
|
389
|
-
index_1.Helpers.copy(sourceDist, dest, {
|
|
390
|
-
recursive: true,
|
|
391
|
-
overwrite: true,
|
|
392
|
-
});
|
|
393
|
-
console.log("Sync (watch|copy) done for ".concat(lib.basename, " to ").concat(lib.name, " (").concat((0, tnp_core_2.crossPlatformPath)([
|
|
394
|
-
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules)),
|
|
395
|
-
tnp_config_1.config.folder.node_modules,
|
|
396
|
-
]), ")"));
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
400
|
-
finally {
|
|
401
|
-
try {
|
|
402
|
-
if (locationsForNodeModules_1_1 && !locationsForNodeModules_1_1.done && (_a = locationsForNodeModules_1.return)) _a.call(locationsForNodeModules_1);
|
|
403
|
-
}
|
|
404
|
-
finally { if (e_4) throw e_4.error; }
|
|
405
|
-
}
|
|
406
|
-
}, 500);
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region watch build process
|
|
409
|
-
return [4 /*yield*/, lib.nearestParent.execute(lib.libraryBuild.getLibraryBuildComamnd({
|
|
410
|
-
watch: true,
|
|
411
|
-
}), {
|
|
412
|
-
outputLineReplace: outputLineReplace,
|
|
413
|
-
resolvePromiseMsg: {
|
|
414
|
-
stdout: lib.libraryBuild.getLibraryBuildSuccessComamnds,
|
|
415
|
-
},
|
|
416
|
-
resolvePromiseMsgCallback: {
|
|
417
|
-
stdout: function () {
|
|
418
|
-
if (strategy === 'copy') {
|
|
419
|
-
debouncedBuild();
|
|
420
|
-
}
|
|
421
|
-
},
|
|
422
|
-
},
|
|
423
|
-
})];
|
|
424
|
-
case 1:
|
|
425
|
-
//#endregion
|
|
426
|
-
//#region watch build process
|
|
427
|
-
_c.sent();
|
|
428
|
-
return [2 /*return*/];
|
|
274
|
+
async libWatchBuildProcess({ lib, locationsForNodeModules, strategy, outputLineReplace, }) {
|
|
275
|
+
//#region @backendFunc
|
|
276
|
+
//#region debouce copy/link
|
|
277
|
+
const debouncedBuild = tnp_core_3._.debounce(() => {
|
|
278
|
+
const sourceDist = lib.nearestParent.pathFor([
|
|
279
|
+
tnp_config_1.config.folder.dist,
|
|
280
|
+
lib.basename,
|
|
281
|
+
]);
|
|
282
|
+
for (const node_modules of locationsForNodeModules) {
|
|
283
|
+
const dest = (0, tnp_core_2.crossPlatformPath)([node_modules, lib.name]);
|
|
284
|
+
if (index_1.Helpers.isSymlinkFileExitedOrUnexisted(dest)) {
|
|
285
|
+
index_1.Helpers.remove(dest);
|
|
429
286
|
}
|
|
430
|
-
|
|
287
|
+
index_1.Helpers.copy(sourceDist, dest, {
|
|
288
|
+
recursive: true,
|
|
289
|
+
overwrite: true,
|
|
290
|
+
});
|
|
291
|
+
console.log(`Sync (watch|copy) done for ${lib.basename} to ${lib.name} (${(0, tnp_core_2.crossPlatformPath)([
|
|
292
|
+
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules)),
|
|
293
|
+
tnp_config_1.config.folder.node_modules,
|
|
294
|
+
])})`);
|
|
295
|
+
}
|
|
296
|
+
}, 500);
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region watch build process
|
|
299
|
+
await lib.nearestParent.execute(lib.libraryBuild.getLibraryBuildCommand({
|
|
300
|
+
watch: true,
|
|
301
|
+
}), {
|
|
302
|
+
outputLineReplace,
|
|
303
|
+
resolvePromiseMsg: {
|
|
304
|
+
stdout: lib.libraryBuild.getLibraryBuildSuccessComamnds,
|
|
305
|
+
},
|
|
306
|
+
resolvePromiseMsgCallback: {
|
|
307
|
+
stdout: () => {
|
|
308
|
+
if (strategy === 'copy') {
|
|
309
|
+
debouncedBuild();
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
},
|
|
431
313
|
});
|
|
432
|
-
|
|
314
|
+
//#endregion
|
|
315
|
+
//#endregion
|
|
316
|
+
}
|
|
433
317
|
//#endregion
|
|
434
318
|
//#region getters & methods / lib normal build process
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
// console.log('linking to ', dest);
|
|
483
|
-
// Helpers.remove(dest);
|
|
484
|
-
index_1.Helpers.createSymLink(libCompiledInDist, libInsideNodeModules, {
|
|
485
|
-
continueWhenExistedFolderDoesntExists: true,
|
|
486
|
-
});
|
|
487
|
-
if (lib.isAngularLib) {
|
|
488
|
-
// recreate index d.ts
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
// create index.ts from index.d.ts
|
|
492
|
-
// QUICK_FIX for typescript
|
|
493
|
-
if (lib.hasFile('src/index.d.ts') && !lib.hasFile('src/index.ts')) {
|
|
494
|
-
index_1.Helpers.createSymLink(lib.pathFor('src/index.d.ts'),
|
|
495
|
-
// crossPlatformPath([libCompiledInDist, 'index.d.ts']),
|
|
496
|
-
lib.pathFor('src/index.ts'), {
|
|
497
|
-
continueWhenExistedFolderDoesntExists: true,
|
|
498
|
-
});
|
|
499
|
-
try {
|
|
500
|
-
lib.removeFile('src/index.d.ts');
|
|
501
|
-
}
|
|
502
|
-
catch (error) { }
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
console.log("Sync (link) done for ".concat(lib.basename, " to ").concat(lib.name, " (").concat((0, tnp_core_2.crossPlatformPath)([
|
|
506
|
-
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules_abs_path)),
|
|
507
|
-
tnp_config_1.config.folder.node_modules,
|
|
508
|
-
]), ")"));
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
512
|
-
finally {
|
|
513
|
-
try {
|
|
514
|
-
if (locationsForNodeModules_2_1 && !locationsForNodeModules_2_1.done && (_c = locationsForNodeModules_2.return)) _c.call(locationsForNodeModules_2);
|
|
515
|
-
}
|
|
516
|
-
finally { if (e_5) throw e_5.error; }
|
|
517
|
-
}
|
|
518
|
-
return [4 /*yield*/, compileProcess()];
|
|
519
|
-
case 1:
|
|
520
|
-
_e.sent();
|
|
521
|
-
return [3 /*break*/, 4];
|
|
522
|
-
case 2:
|
|
523
|
-
if (!(strategy === 'copy')) return [3 /*break*/, 4];
|
|
524
|
-
//#region copy dist to node_modules
|
|
525
|
-
return [4 /*yield*/, compileProcess()];
|
|
526
|
-
case 3:
|
|
527
|
-
//#region copy dist to node_modules
|
|
528
|
-
_e.sent();
|
|
319
|
+
async libNormalBuildProcess({ lib, locationsForNodeModules, strategy, outputLineReplace, }) {
|
|
320
|
+
//#region @backendFunc
|
|
321
|
+
const libCompiledInDist = lib.nearestParent.pathFor([
|
|
322
|
+
tnp_config_1.config.folder.dist,
|
|
323
|
+
lib.basename,
|
|
324
|
+
]);
|
|
325
|
+
//#region compile process
|
|
326
|
+
const compileProcess = async () => {
|
|
327
|
+
index_1.Helpers.info(`Compiling ${lib.name} ...`);
|
|
328
|
+
await lib.nearestParent.execute(lib.libraryBuild.getLibraryBuildCommand({
|
|
329
|
+
watch: false,
|
|
330
|
+
}), {
|
|
331
|
+
resolvePromiseMsg: {
|
|
332
|
+
stdout: lib.libraryBuild.getLibraryBuildSuccessComamnds,
|
|
333
|
+
},
|
|
334
|
+
outputLineReplace,
|
|
335
|
+
});
|
|
336
|
+
};
|
|
337
|
+
//#endregion
|
|
338
|
+
if (strategy === 'link') {
|
|
339
|
+
//#region link dist to node_modules
|
|
340
|
+
for (const node_modules_abs_path of locationsForNodeModules) {
|
|
341
|
+
const libInsideNodeModules = (0, tnp_core_2.crossPlatformPath)([
|
|
342
|
+
node_modules_abs_path,
|
|
343
|
+
lib.name,
|
|
344
|
+
]);
|
|
345
|
+
if (!index_1.Helpers.isSymlinkFileExitedOrUnexisted(libInsideNodeModules)) {
|
|
346
|
+
index_1.Helpers.remove(libInsideNodeModules);
|
|
347
|
+
}
|
|
348
|
+
// console.log('linking from ', sourceDist);
|
|
349
|
+
// console.log('linking to ', dest);
|
|
350
|
+
// Helpers.remove(dest);
|
|
351
|
+
index_1.Helpers.createSymLink(libCompiledInDist, libInsideNodeModules, {
|
|
352
|
+
continueWhenExistedFolderDoesntExists: true,
|
|
353
|
+
});
|
|
354
|
+
if (lib.isAngularLib) {
|
|
355
|
+
// recreate index d.ts
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
// create index.ts from index.d.ts
|
|
359
|
+
// QUICK_FIX for typescript
|
|
360
|
+
if (lib.hasFile('src/index.d.ts') && !lib.hasFile('src/index.ts')) {
|
|
361
|
+
index_1.Helpers.createSymLink(lib.pathFor('src/index.d.ts'),
|
|
362
|
+
// crossPlatformPath([libCompiledInDist, 'index.d.ts']),
|
|
363
|
+
lib.pathFor('src/index.ts'), {
|
|
364
|
+
continueWhenExistedFolderDoesntExists: true,
|
|
365
|
+
});
|
|
529
366
|
try {
|
|
530
|
-
|
|
531
|
-
node_modules_abs_path = locationsForNodeModules_3_1.value;
|
|
532
|
-
libInsideNodeModules = (0, tnp_core_2.crossPlatformPath)([
|
|
533
|
-
node_modules_abs_path,
|
|
534
|
-
lib.name,
|
|
535
|
-
]);
|
|
536
|
-
if (index_1.Helpers.isSymlinkFileExitedOrUnexisted(libInsideNodeModules)) {
|
|
537
|
-
index_1.Helpers.remove(libInsideNodeModules);
|
|
538
|
-
}
|
|
539
|
-
index_1.Helpers.copy(libCompiledInDist, libInsideNodeModules, {
|
|
540
|
-
recursive: true,
|
|
541
|
-
overwrite: true,
|
|
542
|
-
});
|
|
543
|
-
console.log("Sync copy done for ".concat(lib.basename, " to ").concat(lib.name, " (").concat((0, tnp_core_2.crossPlatformPath)([
|
|
544
|
-
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules_abs_path)),
|
|
545
|
-
tnp_config_1.config.folder.node_modules,
|
|
546
|
-
]), ")"));
|
|
547
|
-
}
|
|
367
|
+
lib.removeFile('src/index.d.ts');
|
|
548
368
|
}
|
|
549
|
-
catch (
|
|
550
|
-
|
|
551
|
-
try {
|
|
552
|
-
if (locationsForNodeModules_3_1 && !locationsForNodeModules_3_1.done && (_d = locationsForNodeModules_3.return)) _d.call(locationsForNodeModules_3);
|
|
553
|
-
}
|
|
554
|
-
finally { if (e_6) throw e_6.error; }
|
|
555
|
-
}
|
|
556
|
-
_e.label = 4;
|
|
557
|
-
case 4: return [2 /*return*/];
|
|
369
|
+
catch (error) { }
|
|
370
|
+
}
|
|
558
371
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
372
|
+
console.log(`Sync (link) done for ${lib.basename} to ${lib.name} (${(0, tnp_core_2.crossPlatformPath)([
|
|
373
|
+
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules_abs_path)),
|
|
374
|
+
tnp_config_1.config.folder.node_modules,
|
|
375
|
+
])})`);
|
|
376
|
+
}
|
|
377
|
+
await compileProcess();
|
|
378
|
+
//#endregion
|
|
379
|
+
}
|
|
380
|
+
else if (strategy === 'copy') {
|
|
381
|
+
//#region copy dist to node_modules
|
|
382
|
+
await compileProcess();
|
|
383
|
+
for (const node_modules_abs_path of locationsForNodeModules) {
|
|
384
|
+
const libInsideNodeModules = (0, tnp_core_2.crossPlatformPath)([
|
|
385
|
+
node_modules_abs_path,
|
|
386
|
+
lib.name,
|
|
387
|
+
]);
|
|
388
|
+
if (index_1.Helpers.isSymlinkFileExitedOrUnexisted(libInsideNodeModules)) {
|
|
389
|
+
index_1.Helpers.remove(libInsideNodeModules);
|
|
390
|
+
}
|
|
391
|
+
index_1.Helpers.copy(libCompiledInDist, libInsideNodeModules, {
|
|
392
|
+
recursive: true,
|
|
393
|
+
overwrite: true,
|
|
394
|
+
});
|
|
395
|
+
console.log(`Sync copy done for ${lib.basename} to ${lib.name} (${(0, tnp_core_2.crossPlatformPath)([
|
|
396
|
+
tnp_core_2.path.basename(tnp_core_2.path.dirname(node_modules_abs_path)),
|
|
397
|
+
tnp_config_1.config.folder.node_modules,
|
|
398
|
+
])})`);
|
|
399
|
+
}
|
|
400
|
+
//#endregion
|
|
401
|
+
}
|
|
402
|
+
//#endregion
|
|
403
|
+
}
|
|
562
404
|
//#endregion
|
|
563
405
|
//#region getters & methods / get library build success command
|
|
564
|
-
|
|
406
|
+
getLibraryBuildCommand(options) {
|
|
565
407
|
//#region @backendFunc
|
|
566
|
-
|
|
408
|
+
const { watch } = options;
|
|
567
409
|
if (this.project.isAngularLib) {
|
|
568
|
-
return
|
|
410
|
+
return `npm-run ng build ${this.project.basename} ${watch ? '--watch' : ''}`;
|
|
569
411
|
}
|
|
570
412
|
else {
|
|
571
|
-
return (
|
|
572
|
-
|
|
413
|
+
return (`npm-run tsc -p libraries/${this.project.basename}/tsconfig.lib.json ` +
|
|
414
|
+
` ${watch ? '--watch' : ''} --preserveWatchOutput`);
|
|
573
415
|
}
|
|
574
416
|
//#endregion
|
|
575
|
-
}
|
|
576
|
-
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region getters & methods / get library build success command
|
|
420
|
+
get getLibraryBuildSuccessComamnds() {
|
|
421
|
+
//#region @backendFunc
|
|
422
|
+
const isAngularLib = this.project.isAngularLib;
|
|
423
|
+
if (isAngularLib) {
|
|
424
|
+
return [`Trace: Build complete`, 'Compilation complete'];
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
return [
|
|
428
|
+
`Found 0 errors. Watching for file change`,
|
|
429
|
+
'Compilation complete',
|
|
430
|
+
];
|
|
431
|
+
}
|
|
577
432
|
//#endregion
|
|
578
|
-
|
|
579
|
-
get: function () {
|
|
580
|
-
//#region @backendFunc
|
|
581
|
-
var isAngularLib = index_1.Helpers.exists(this.project.pathFor('ng-package.json'));
|
|
582
|
-
if (isAngularLib) {
|
|
583
|
-
return ["Trace: Build complete", 'Compilation complete'];
|
|
584
|
-
}
|
|
585
|
-
else {
|
|
586
|
-
return [
|
|
587
|
-
"Found 0 errors. Watching for file change",
|
|
588
|
-
'Compilation complete',
|
|
589
|
-
];
|
|
590
|
-
}
|
|
591
|
-
//#endregion
|
|
592
|
-
},
|
|
593
|
-
enumerable: false,
|
|
594
|
-
configurable: true
|
|
595
|
-
});
|
|
433
|
+
}
|
|
596
434
|
//#endregion
|
|
597
435
|
//#region getters & methods / select copy to projects
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
return {
|
|
615
|
-
name: c.genericName,
|
|
616
|
-
value: c.pathFor(tnp_config_1.config.folder.node_modules),
|
|
617
|
-
};
|
|
618
|
-
}), true)];
|
|
619
|
-
case 1:
|
|
620
|
-
locations = _a.sent();
|
|
621
|
-
return [2 /*return*/, locations];
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
});
|
|
625
|
-
};
|
|
436
|
+
async selectCopytoProjects() {
|
|
437
|
+
//#region @backendFunc
|
|
438
|
+
const projects = this.project.ins.allProjectsFromFolder(tnp_core_2.path.dirname(this.project.location))
|
|
439
|
+
.filter(c => c.location !== this.project.location)
|
|
440
|
+
.map(p => p.linkedProjects?.embeddedProject
|
|
441
|
+
? p.linkedProjects.embeddedProject
|
|
442
|
+
: p);
|
|
443
|
+
const locations = await index_1.Helpers.consoleGui.multiselect('Copy compiled version to projects', projects.map(c => {
|
|
444
|
+
return {
|
|
445
|
+
name: c.genericName,
|
|
446
|
+
value: c.pathFor(tnp_config_1.config.folder.node_modules),
|
|
447
|
+
};
|
|
448
|
+
}), true);
|
|
449
|
+
return locations;
|
|
450
|
+
//#endregion
|
|
451
|
+
}
|
|
626
452
|
//#endregion
|
|
627
453
|
//#region private methods / change tsconfig for libraries typescript proper local types
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
return [4 /*yield*/, this.replaceTsConfigsPathes()];
|
|
641
|
-
case 2:
|
|
642
|
-
_d.sent();
|
|
643
|
-
try {
|
|
644
|
-
for (_a = tslib_1.__values(this.project.libraryBuild.libraries), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
645
|
-
libChild = _b.value;
|
|
646
|
-
howMuchBack = this.project
|
|
647
|
-
.relative(libChild.location)
|
|
648
|
-
.split('/').length;
|
|
649
|
-
libChild.setValueToJSONC('tsconfig.lib.json', 'extends', "".concat(tnp_core_3._.times(howMuchBack, function () { return "../"; }).join('')).concat(this.tempOrgTsConfigFile));
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
653
|
-
finally {
|
|
654
|
-
try {
|
|
655
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
656
|
-
}
|
|
657
|
-
finally { if (e_7) throw e_7.error; }
|
|
658
|
-
}
|
|
659
|
-
return [2 /*return*/];
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
});
|
|
663
|
-
};
|
|
454
|
+
async changeTsConfigForLibrariesTypes() {
|
|
455
|
+
//#region @backendFunc
|
|
456
|
+
await this.restoreOriginalTsConfig();
|
|
457
|
+
await this.replaceTsConfigsPathes();
|
|
458
|
+
for (const libChild of this.project.libraryBuild.libraries) {
|
|
459
|
+
const howMuchBack = this.project
|
|
460
|
+
.relative(libChild.location)
|
|
461
|
+
.split('/').length;
|
|
462
|
+
libChild.setValueToJSONC('tsconfig.lib.json', 'extends', `${tnp_core_3._.times(howMuchBack, () => `../`).join('')}${this.tempOrgTsConfigFile}`);
|
|
463
|
+
}
|
|
464
|
+
//#endregion
|
|
465
|
+
}
|
|
664
466
|
//#endregion
|
|
665
467
|
//#region private methods / replace tsconfig pathes
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
(0, tnp_core_2.crossPlatformPath)([_this.project.relative(b.location), 'src', 'lib']),
|
|
680
|
-
],
|
|
681
|
-
_a["".concat(b.name, "/*")] = [
|
|
682
|
-
"".concat((0, tnp_core_2.crossPlatformPath)([_this.project.relative(b.location), 'src', 'lib']), "/*"),
|
|
683
|
-
],
|
|
684
|
-
_a));
|
|
685
|
-
}, {});
|
|
686
|
-
// console.log('paths', paths);
|
|
687
|
-
this.project.setValueToJSONC(tnp_config_1.config.file.tsconfig_json, 'compilerOptions.paths', paths);
|
|
688
|
-
return [2 /*return*/];
|
|
468
|
+
async replaceTsConfigsPathes() {
|
|
469
|
+
//#region @backendFunc
|
|
470
|
+
if (!this.project.hasFile(this.tempOrgTsConfigFile)) {
|
|
471
|
+
index_1.Helpers.copyFile(this.project.pathFor(tnp_config_1.config.file.tsconfig_json), this.project.pathFor(this.tempOrgTsConfigFile));
|
|
472
|
+
}
|
|
473
|
+
const paths = this.project.libraryBuild.libraries.reduce((a, b) => {
|
|
474
|
+
return tnp_core_3._.merge(a, {
|
|
475
|
+
[b.name]: [
|
|
476
|
+
(0, tnp_core_2.crossPlatformPath)([this.project.relative(b.location), 'src', 'lib']),
|
|
477
|
+
],
|
|
478
|
+
[`${b.name}/*`]: [
|
|
479
|
+
`${(0, tnp_core_2.crossPlatformPath)([this.project.relative(b.location), 'src', 'lib'])}/*`,
|
|
480
|
+
],
|
|
689
481
|
});
|
|
690
|
-
});
|
|
691
|
-
|
|
482
|
+
}, {});
|
|
483
|
+
// console.log('paths', paths);
|
|
484
|
+
this.project.setValueToJSONC(tnp_config_1.config.file.tsconfig_json, 'compilerOptions.paths', paths);
|
|
485
|
+
//#endregion
|
|
486
|
+
}
|
|
692
487
|
//#endregion
|
|
693
488
|
//#region private methods / restore original tsconfig
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
catch (err) { }
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
720
|
-
finally {
|
|
721
|
-
try {
|
|
722
|
-
if (commands_1_1 && !commands_1_1.done && (_a = commands_1.return)) _a.call(commands_1);
|
|
723
|
-
}
|
|
724
|
-
finally { if (e_8) throw e_8.error; }
|
|
725
|
-
}
|
|
726
|
-
index_1.Helpers.taskDone('Restore original tsconfig files');
|
|
727
|
-
return [2 /*return*/];
|
|
728
|
-
});
|
|
729
|
-
});
|
|
730
|
-
};
|
|
731
|
-
return BaseLibraryBuild;
|
|
732
|
-
}(base_feature_for_project_1.BaseFeatureForProject));
|
|
489
|
+
async restoreOriginalTsConfig() {
|
|
490
|
+
//#region @backendFunc
|
|
491
|
+
index_1.Helpers.taskStarted(' original tsconfig files');
|
|
492
|
+
const commands = [
|
|
493
|
+
`git checkout ${this.tempOrgTsConfigFile}`,
|
|
494
|
+
`git checkout ${tnp_config_1.config.file.tsconfig_json}`,
|
|
495
|
+
...this.project.libraryBuild.libraries.map(lib => {
|
|
496
|
+
return `git checkout ${this.project.relative(lib.location)}/${tnp_config_1.config.file.tsconfig_lib_json}`;
|
|
497
|
+
}),
|
|
498
|
+
];
|
|
499
|
+
for (const command of commands) {
|
|
500
|
+
try {
|
|
501
|
+
this.project
|
|
502
|
+
.run(command, { output: false, biggerBuffer: false, silence: true })
|
|
503
|
+
.sync();
|
|
504
|
+
}
|
|
505
|
+
catch (err) { }
|
|
506
|
+
}
|
|
507
|
+
index_1.Helpers.taskDone('Restore original tsconfig files');
|
|
508
|
+
//#endregion
|
|
509
|
+
}
|
|
510
|
+
}
|
|
733
511
|
exports.BaseLibraryBuild = BaseLibraryBuild;
|
|
734
512
|
//# sourceMappingURL=base-library-build.js.map
|