tnp 16.5.21 → 16.5.23
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/esm2022/lib/build-options.mjs +180 -0
- package/browser/esm2022/lib/constants.mjs +3 -3
- package/browser/esm2022/lib/helpers.mjs +1 -1
- package/browser/esm2022/lib/index.mjs +2 -3
- package/browser/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
- package/browser/esm2022/lib/project/abstract/index.mjs +1 -1
- package/browser/esm2022/lib/project/abstract/project/index.mjs +1 -1
- package/browser/esm2022/lib/project/abstract/project/project.mjs +1494 -70
- package/browser/esm2022/lib/project/features/package-json/index.mjs +1 -1
- package/browser/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
- package/browser/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
- package/browser/esm2022/lib/project/index.mjs +1 -5
- package/browser/esm2022/public-api.mjs +1 -1
- package/browser/esm2022/tnp.mjs +1 -1
- package/browser/fesm2022/tnp.mjs +1684 -88
- package/browser/fesm2022/tnp.mjs.map +1 -1
- package/browser/lib/build-options.d.ts +40 -0
- package/browser/lib/constants.d.ts +1 -1
- package/browser/lib/index.d.ts +1 -0
- package/browser/lib/project/abstract/project/project.d.ts +121 -6
- package/browser/lib/project/features/package-json/package-json.d.ts +1 -1
- package/cli.js +72762 -60372
- package/client/esm2022/lib/build-options.mjs +180 -0
- package/client/esm2022/lib/constants.mjs +3 -3
- package/client/esm2022/lib/helpers.mjs +1 -1
- package/client/esm2022/lib/index.mjs +2 -3
- package/client/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
- package/client/esm2022/lib/project/abstract/index.mjs +1 -1
- package/client/esm2022/lib/project/abstract/project/index.mjs +1 -1
- package/client/esm2022/lib/project/abstract/project/project.mjs +1494 -70
- package/client/esm2022/lib/project/features/package-json/index.mjs +1 -1
- package/client/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
- package/client/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
- package/client/esm2022/lib/project/index.mjs +1 -5
- package/client/esm2022/public-api.mjs +1 -1
- package/client/esm2022/tnp.mjs +1 -1
- package/client/fesm2022/tnp.mjs +1684 -88
- package/client/fesm2022/tnp.mjs.map +1 -1
- package/client/lib/build-options.d.ts +40 -0
- package/client/lib/constants.d.ts +1 -1
- package/client/lib/index.d.ts +1 -0
- package/client/lib/project/abstract/project/project.d.ts +121 -6
- package/client/lib/project/features/package-json/package-json.d.ts +1 -1
- package/client/package.json +63 -63
- package/lib/build-options.d.ts +39 -0
- package/lib/build-options.js +182 -0
- package/lib/build-options.js.map +1 -0
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +2 -2
- package/lib/constants.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -3
- package/lib/index.js.map +1 -1
- package/lib/project/abstract/command-line-feature.backend.d.ts +14 -0
- package/lib/project/abstract/command-line-feature.backend.js +50 -0
- package/lib/project/abstract/command-line-feature.backend.js.map +1 -0
- package/lib/project/abstract/project/base-project.d.ts +1 -1
- package/lib/project/abstract/project/base-project.js +31 -32
- package/lib/project/abstract/project/base-project.js.map +1 -1
- package/lib/project/abstract/project/buildable-project.backend.d.ts +2 -2
- package/lib/project/abstract/project/buildable-project.backend.js +2 -2
- package/lib/project/abstract/project/buildable-project.backend.js.map +1 -1
- package/lib/project/abstract/project/dependency-project.backend.d.ts +1 -10
- package/lib/project/abstract/project/dependency-project.backend.js +1 -74
- package/lib/project/abstract/project/dependency-project.backend.js.map +1 -1
- package/lib/project/abstract/project/feature-project.d.ts +2 -5
- package/lib/project/abstract/project/feature-project.js.map +1 -1
- package/lib/project/abstract/project/{tnp-project.d.ts → firedev-project.d.ts} +2 -2
- package/lib/project/abstract/project/{tnp-project.js → firedev-project.js} +25 -24
- package/lib/project/abstract/project/firedev-project.js.map +1 -0
- package/lib/project/abstract/project/folder-project.d.ts +0 -33
- package/lib/project/abstract/project/folder-project.js +6 -198
- package/lib/project/abstract/project/folder-project.js.map +1 -1
- package/lib/project/abstract/project/lib-project-smart-container.backend.js +14 -7
- package/lib/project/abstract/project/lib-project-smart-container.backend.js.map +1 -1
- package/lib/project/abstract/project/lib-project-standalone.backend.d.ts +0 -1
- package/lib/project/abstract/project/lib-project-standalone.backend.js +45 -31
- package/lib/project/abstract/project/lib-project-standalone.backend.js.map +1 -1
- package/lib/project/abstract/project/lib-project-vscode-ext.js +1 -1
- package/lib/project/abstract/project/lib-project-vscode-ext.js.map +1 -1
- package/lib/project/abstract/project/lib-project.backend.d.ts +4 -5
- package/lib/project/abstract/project/lib-project.backend.js +139 -102
- package/lib/project/abstract/project/lib-project.backend.js.map +1 -1
- package/lib/project/abstract/project/npm-project.d.ts +1 -1
- package/lib/project/abstract/project/npm-project.js +29 -10
- package/lib/project/abstract/project/npm-project.js.map +1 -1
- package/lib/project/abstract/project/project.d.ts +128 -14
- package/lib/project/abstract/project/project.js +1586 -120
- package/lib/project/abstract/project/project.js.map +1 -1
- package/lib/project/abstract/project/recreatable-project.backend.js +2 -2
- package/lib/project/abstract/project/recreatable-project.backend.js.map +1 -1
- package/lib/project/abstract/project/vscode-project.backend.js +3 -17
- package/lib/project/abstract/project/vscode-project.backend.js.map +1 -1
- package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.d.ts +1 -1
- package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js +2 -2
- package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js.map +1 -1
- package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.d.ts +3 -3
- package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js +10 -11
- package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js.map +1 -1
- package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.d.ts +3 -3
- package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js +6 -6
- package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js.map +1 -1
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.d.ts +2 -2
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js +5 -6
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js.map +1 -1
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.d.ts +5 -5
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js +12 -16
- package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js.map +1 -1
- package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.d.ts +1 -1
- package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js +3 -3
- package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js.map +1 -1
- package/lib/project/compilers/index.d.ts +0 -2
- package/lib/project/compilers/index.js +0 -2
- package/lib/project/compilers/index.js.map +1 -1
- package/lib/project/features/branding.backend.js +1 -0
- package/lib/project/features/branding.backend.js.map +1 -1
- package/lib/project/features/build-process/build-proces.backend.d.ts +3 -2
- package/lib/project/features/build-process/build-proces.backend.js +10 -10
- package/lib/project/features/build-process/build-proces.backend.js.map +1 -1
- package/lib/project/features/build-process/index.d.ts +1 -2
- package/lib/project/features/build-process/index.js +0 -1
- package/lib/project/features/build-process/index.js.map +1 -1
- package/lib/project/features/compiler-cache.backend.d.ts +1 -1
- package/lib/project/features/compiler-cache.backend.js +2 -2
- package/lib/project/features/compiler-cache.backend.js.map +1 -1
- package/lib/project/features/copy-manager/base-copy-manager.backend.d.ts +5 -5
- package/lib/project/features/copy-manager/base-copy-manager.backend.js +12 -13
- package/lib/project/features/copy-manager/base-copy-manager.backend.js.map +1 -1
- package/lib/project/features/copy-manager/copy-manager-helpers.backend.d.ts +1 -1
- package/lib/project/features/copy-manager/copy-manager-helpers.backend.js +5 -5
- package/lib/project/features/copy-manager/copy-manager-helpers.backend.js.map +1 -1
- package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.d.ts +1 -1
- package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js +5 -4
- package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js.map +1 -1
- package/lib/project/features/copy-manager/copy-manager-organization.backend.d.ts +3 -3
- package/lib/project/features/copy-manager/copy-manager-organization.backend.js +30 -30
- package/lib/project/features/copy-manager/copy-manager-organization.backend.js.map +1 -1
- package/lib/project/features/copy-manager/copy-manager-standalone.backend.d.ts +5 -5
- package/lib/project/features/copy-manager/copy-manager-standalone.backend.js +19 -19
- package/lib/project/features/copy-manager/copy-manager-standalone.backend.js.map +1 -1
- package/lib/project/features/copy-manager/copy-manager.backend.d.ts +2 -2
- package/lib/project/features/copy-manager/copy-manager.backend.js.map +1 -1
- package/lib/project/features/copy-manager/{bundle-mjs-fesm-module-spliter.backend.d.ts → mjs-fesm-module-spliter.backend.d.ts} +1 -1
- package/lib/project/features/copy-manager/{bundle-mjs-fesm-module-spliter.backend.js → mjs-fesm-module-spliter.backend.js} +19 -19
- package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js.map +1 -0
- package/lib/project/features/copy-manager/source-maping-url.backend.js +1 -1
- package/lib/project/features/copy-manager/source-maping-url.backend.js.map +1 -1
- package/lib/project/features/copy-manager/typescript-dts-fixer.backend.d.ts +1 -1
- package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js +1 -1
- package/lib/project/features/environment-config/environment-config-helpers.d.ts +1 -1
- package/lib/project/features/environment-config/environment-config-helpers.js +4 -5
- package/lib/project/features/environment-config/environment-config-helpers.js.map +1 -1
- package/lib/project/features/environment-config/environment-config.d.ts +2 -3
- package/lib/project/features/environment-config/environment-config.js +3 -4
- package/lib/project/features/environment-config/environment-config.js.map +1 -1
- package/lib/project/features/files-recreation/files-factory.backend.d.ts +1 -1
- package/lib/project/features/files-recreation/files-factory.backend.js +2 -2
- package/lib/project/features/files-recreation/files-factory.backend.js.map +1 -1
- package/lib/project/features/files-recreation/files-recreator.d.ts +1 -1
- package/lib/project/features/files-recreation/files-recreator.js +13 -19
- package/lib/project/features/files-recreation/files-recreator.js.map +1 -1
- package/lib/project/features/files-recreation/files-structure.backend.d.ts +2 -1
- package/lib/project/features/files-recreation/files-structure.backend.js +40 -67
- package/lib/project/features/files-recreation/files-structure.backend.js.map +1 -1
- package/lib/project/features/files-recreation/files-templates.d.ts +1 -1
- package/lib/project/features/files-recreation/files-templates.js +2 -3
- package/lib/project/features/files-recreation/files-templates.js.map +1 -1
- package/lib/project/features/git-actions.backend.d.ts +2 -1
- package/lib/project/features/git-actions.backend.js +23 -26
- package/lib/project/features/git-actions.backend.js.map +1 -1
- package/lib/project/features/index.d.ts +0 -1
- package/lib/project/features/index.js +0 -1
- package/lib/project/features/index.js.map +1 -1
- package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js +7 -7
- package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js.map +1 -1
- package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js +5 -2
- package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js.map +1 -1
- package/lib/project/features/inside-structures/structs/inside-struct-helpers.js +2 -2
- package/lib/project/features/inside-structures/structs/inside-struct-helpers.js.map +1 -1
- package/lib/project/features/linked-repos.backend.js +2 -2
- package/lib/project/features/linked-repos.backend.js.map +1 -1
- package/lib/project/features/node-modules/node-modules-base.backend.d.ts +1 -1
- package/lib/project/features/node-modules/node-modules-base.backend.js +5 -5
- package/lib/project/features/node-modules/node-modules-base.backend.js.map +1 -1
- package/lib/project/features/node-modules/node-modules-core.backend.d.ts +2 -2
- package/lib/project/features/node-modules/node-modules-core.backend.js +4 -4
- package/lib/project/features/node-modules/node-modules-core.backend.js.map +1 -1
- package/lib/project/features/node-modules/node-modules-helpers.backend.d.ts +1 -1
- package/lib/project/features/node-modules/node-modules-helpers.backend.js +8 -9
- package/lib/project/features/node-modules/node-modules-helpers.backend.js.map +1 -1
- package/lib/project/features/npm-packages/npm-packages-base.backend.d.ts +1 -1
- package/lib/project/features/npm-packages/npm-packages-base.backend.js +2 -2
- package/lib/project/features/npm-packages/npm-packages-base.backend.js.map +1 -1
- package/lib/project/features/npm-packages/npm-packages-core.backend.d.ts +1 -1
- package/lib/project/features/npm-packages/npm-packages-core.backend.js +5 -7
- package/lib/project/features/npm-packages/npm-packages-core.backend.js.map +1 -1
- package/lib/project/features/npm-packages/npm-packages-helpers.backend.d.ts +1 -1
- package/lib/project/features/package-json/package-json-base.backend.d.ts +1 -1
- package/lib/project/features/package-json/package-json-base.backend.js +3 -3
- package/lib/project/features/package-json/package-json-base.backend.js.map +1 -1
- package/lib/project/features/package-json/package-json-core.backend.d.ts +1 -1
- package/lib/project/features/package-json/package-json-core.backend.js +4 -4
- package/lib/project/features/package-json/package-json-core.backend.js.map +1 -1
- package/lib/project/features/package-json/package-json-deps-categories.backend.d.ts +1 -1
- package/lib/project/features/package-json/package-json-deps-categories.backend.js +4 -3
- package/lib/project/features/package-json/package-json-deps-categories.backend.js.map +1 -1
- package/lib/project/features/package-json/package-json-helpers.backend.d.ts +1 -1
- package/lib/project/features/package-json/package-json-helpers.backend.js +15 -15
- package/lib/project/features/package-json/package-json-helpers.backend.js.map +1 -1
- package/lib/project/features/package-json/package-json.d.ts +1 -1
- package/lib/project/features/package-recognition/packages-recognition.js +2 -2
- package/lib/project/features/package-recognition/packages-recognition.js.map +1 -1
- package/lib/project/features/quick-fixes.d.ts +2 -1
- package/lib/project/features/quick-fixes.js +15 -16
- package/lib/project/features/quick-fixes.js.map +1 -1
- package/lib/project/features/singular-build.backend.d.ts +2 -1
- package/lib/project/features/singular-build.backend.js +5 -4
- package/lib/project/features/singular-build.backend.js.map +1 -1
- package/lib/project/features/smart-node-modules.backend.d.ts +3 -2
- package/lib/project/features/smart-node-modules.backend.js +11 -10
- package/lib/project/features/smart-node-modules.backend.js.map +1 -1
- package/lib/project/features/target-project.backend.js +0 -1
- package/lib/project/features/target-project.backend.js.map +1 -1
- package/lib/project/features/test-runner/cypress-test-runner.d.ts +1 -1
- package/lib/project/features/test-runner/cypress-test-runner.js +3 -3
- package/lib/project/features/test-runner/cypress-test-runner.js.map +1 -1
- package/lib/project/features/test-runner/jest-test-runner.d.ts +1 -1
- package/lib/project/features/test-runner/jest-test-runner.js +2 -2
- package/lib/project/features/test-runner/jest-test-runner.js.map +1 -1
- package/lib/project/features/test-runner/mocha-test-runner.d.ts +1 -1
- package/lib/project/features/test-runner/mocha-test-runner.js +3 -3
- package/lib/project/features/test-runner/mocha-test-runner.js.map +1 -1
- package/lib/project/features/webpack-backend-compilation.backend.d.ts +3 -3
- package/lib/project/features/webpack-backend-compilation.backend.js +1 -1
- package/lib/project/features/webpack-backend-compilation.backend.js.map +1 -1
- package/lib/project/index.d.ts +0 -3
- package/lib/project/index.js +0 -5
- package/lib/project/index.js.map +1 -1
- package/lib/scripts/{JAVA.backend.d.ts → CI.backend.d.ts} +1 -1
- package/lib/scripts/CI.backend.js +28 -0
- package/lib/scripts/CI.backend.js.map +1 -0
- package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.d.ts +9 -13
- package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.js +17 -71
- package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.js.map +1 -1
- package/lib/scripts/HELP.backend.js +1 -1
- package/lib/scripts/HELP.backend.js.map +1 -1
- package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.d.ts +3 -0
- package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.js +19 -32
- package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.js.map +1 -1
- package/lib/scripts/NEW-PROJECT_FILES_MODULES/project-factory.backend.js +2 -1
- package/lib/scripts/NEW-PROJECT_FILES_MODULES/project-factory.backend.js.map +1 -1
- package/lib/scripts/OTHER.backend.d.ts +0 -4
- package/lib/scripts/OTHER.backend.js +7 -63
- package/lib/scripts/OTHER.backend.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/BRANDING.backend.js +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/BRANDING.backend.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.d.ts +2 -42
- package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.js +57 -580
- package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.d.ts +2 -0
- package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.js +19 -6
- package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.d.ts +0 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.js +9 -17
- package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/RELEASE.backend.js +3 -3
- package/lib/scripts/PROJECTS-DEVELOPMENT/RELEASE.backend.js.map +1 -1
- package/lib/scripts/PROJECTS-DEVELOPMENT/TESTS.js.map +1 -1
- package/lib/scripts/UPDATE.backend.d.ts +0 -1
- package/lib/scripts/UPDATE.backend.js +8 -9
- package/lib/scripts/UPDATE.backend.js.map +1 -1
- package/lib/scripts/VSCODE-EXT/GIT.backend.d.ts +0 -1
- package/lib/scripts/VSCODE-EXT/GIT.backend.js +1 -8
- package/lib/scripts/VSCODE-EXT/GIT.backend.js.map +1 -1
- package/lib/scripts/VSCODE-EXT/OPEN.backend.d.ts +0 -9
- package/lib/scripts/VSCODE-EXT/OPEN.backend.js +4 -49
- package/lib/scripts/VSCODE-EXT/OPEN.backend.js.map +1 -1
- package/lib/scripts/VSCODE-EXT/VSCODE.backend.js.map +1 -1
- package/lib/scripts/index.d.ts +221 -1
- package/lib/scripts/index.js +2 -12
- package/lib/scripts/index.js.map +1 -1
- package/package.json +33 -33
- package/package.json_tnp.json5 +31 -31
- package/start.backend.d.ts +1 -1
- package/start.backend.js +13 -3
- package/start.backend.js.map +1 -1
- package/tmp-environment.json +67 -67
- package/websql/esm2022/lib/build-options.mjs +180 -0
- package/websql/esm2022/lib/constants.mjs +3 -3
- package/websql/esm2022/lib/helpers.mjs +1 -1
- package/websql/esm2022/lib/index.mjs +2 -3
- package/websql/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
- package/websql/esm2022/lib/project/abstract/index.mjs +1 -1
- package/websql/esm2022/lib/project/abstract/project/index.mjs +1 -1
- package/websql/esm2022/lib/project/abstract/project/project.mjs +1494 -70
- package/websql/esm2022/lib/project/features/package-json/index.mjs +1 -1
- package/websql/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
- package/websql/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
- package/websql/esm2022/lib/project/index.mjs +1 -5
- package/websql/esm2022/public-api.mjs +1 -1
- package/websql/esm2022/tnp.mjs +1 -1
- package/websql/fesm2022/tnp.mjs +1684 -88
- package/websql/fesm2022/tnp.mjs.map +1 -1
- package/websql/lib/build-options.d.ts +40 -0
- package/websql/lib/constants.d.ts +1 -1
- package/websql/lib/index.d.ts +1 -0
- package/websql/lib/project/abstract/project/project.d.ts +121 -6
- package/websql/lib/project/features/package-json/package-json.d.ts +1 -1
- package/git-log.d.ts +0 -1
- package/git-log.js +0 -27
- package/git-log.js.map +0 -1
- package/lib/console-ui.d.ts +0 -0
- package/lib/console-ui.js +0 -172
- package/lib/console-ui.js.map +0 -1
- package/lib/project/abstract/project/cloud-project.d.ts +0 -4
- package/lib/project/abstract/project/cloud-project.js +0 -10
- package/lib/project/abstract/project/cloud-project.js.map +0 -1
- package/lib/project/abstract/project/db-process-project.backend.d.ts +0 -2
- package/lib/project/abstract/project/db-process-project.backend.js +0 -10
- package/lib/project/abstract/project/db-process-project.backend.js.map +0 -1
- package/lib/project/abstract/project/tnp-project.js.map +0 -1
- package/lib/project/compilers/framework-file-generator/controllers-generator.backend.d.ts +0 -6
- package/lib/project/compilers/framework-file-generator/controllers-generator.backend.js +0 -17
- package/lib/project/compilers/framework-file-generator/controllers-generator.backend.js.map +0 -1
- package/lib/project/compilers/framework-file-generator/entities-generator.backend.d.ts +0 -8
- package/lib/project/compilers/framework-file-generator/entities-generator.backend.js +0 -20
- package/lib/project/compilers/framework-file-generator/entities-generator.backend.js.map +0 -1
- package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.d.ts +0 -10
- package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.js +0 -67
- package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.js.map +0 -1
- package/lib/project/compilers/framework-file-generator/index.d.ts +0 -1
- package/lib/project/compilers/framework-file-generator/index.js +0 -7
- package/lib/project/compilers/framework-file-generator/index.js.map +0 -1
- package/lib/project/compilers/source-modifier/index.d.ts +0 -1
- package/lib/project/compilers/source-modifier/index.js +0 -7
- package/lib/project/compilers/source-modifier/index.js.map +0 -1
- package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.d.ts +0 -13
- package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.js +0 -181
- package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.js.map +0 -1
- package/lib/project/compilers/source-modifier/source-modifier.backend.d.ts +0 -14
- package/lib/project/compilers/source-modifier/source-modifier.backend.js +0 -219
- package/lib/project/compilers/source-modifier/source-modifier.backend.js.map +0 -1
- package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.d.ts +0 -2
- package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.js +0 -99
- package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.js.map +0 -1
- package/lib/project/compilers/source-modifier/source-modifier.models.d.ts +0 -35
- package/lib/project/compilers/source-modifier/source-modifier.models.js +0 -3
- package/lib/project/compilers/source-modifier/source-modifier.models.js.map +0 -1
- package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.d.ts +0 -1
- package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.js +0 -4
- package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.js.map +0 -1
- package/lib/project/features/copy-manager/bundle-mjs-fesm-module-spliter.backend.js.map +0 -1
- package/lib/project/features/extension-for-project/extension-for-project.d.ts +0 -7
- package/lib/project/features/extension-for-project/extension-for-project.js +0 -29
- package/lib/project/features/extension-for-project/extension-for-project.js.map +0 -1
- package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.d.ts +0 -12
- package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.js +0 -42
- package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.js.map +0 -1
- package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.d.ts +0 -7
- package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.js +0 -19
- package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.js.map +0 -1
- package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.d.ts +0 -9
- package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.js +0 -52
- package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.js.map +0 -1
- package/lib/project/features/files-recreation/files-templates/index.d.ts +0 -0
- package/lib/project/features/files-recreation/files-templates/index.js +0 -6
- package/lib/project/features/files-recreation/files-templates/index.js.map +0 -1
- package/lib/project/features/global-worker-apps.d.ts +0 -4
- package/lib/project/features/global-worker-apps.js +0 -50
- package/lib/project/features/global-worker-apps.js.map +0 -1
- package/lib/project/features/proxy-router.d.ts +0 -0
- package/lib/project/features/proxy-router.js +0 -77
- package/lib/project/features/proxy-router.js.map +0 -1
- package/lib/project/features/recent-files.backend.d.ts +0 -13
- package/lib/project/features/recent-files.backend.js +0 -126
- package/lib/project/features/recent-files.backend.js.map +0 -1
- package/lib/project/project-specyfic/index.d.ts +0 -7
- package/lib/project/project-specyfic/index.js +0 -11
- package/lib/project/project-specyfic/index.js.map +0 -1
- package/lib/project/project-specyfic/project-container.d.ts +0 -14
- package/lib/project/project-specyfic/project-container.js +0 -132
- package/lib/project/project-specyfic/project-container.js.map +0 -1
- package/lib/project/project-specyfic/project-docker.d.ts +0 -13
- package/lib/project/project-specyfic/project-docker.js +0 -136
- package/lib/project/project-specyfic/project-docker.js.map +0 -1
- package/lib/project/project-specyfic/project-isomorphic-lib.d.ts +0 -38
- package/lib/project/project-specyfic/project-isomorphic-lib.js +0 -958
- package/lib/project/project-specyfic/project-isomorphic-lib.js.map +0 -1
- package/lib/project/project-specyfic/project-navi.d.ts +0 -11
- package/lib/project/project-specyfic/project-navi.js +0 -49
- package/lib/project/project-specyfic/project-navi.js.map +0 -1
- package/lib/project/project-specyfic/project-scenario.d.ts +0 -11
- package/lib/project/project-specyfic/project-scenario.js +0 -49
- package/lib/project/project-specyfic/project-scenario.js.map +0 -1
- package/lib/project/project-specyfic/project-unknow-npm.d.ts +0 -11
- package/lib/project/project-specyfic/project-unknow-npm.js +0 -49
- package/lib/project/project-specyfic/project-unknow-npm.js.map +0 -1
- package/lib/project/project-specyfic/project-vscode-ext.d.ts +0 -13
- package/lib/project/project-specyfic/project-vscode-ext.js +0 -91
- package/lib/project/project-specyfic/project-vscode-ext.js.map +0 -1
- package/lib/project/project-specyfic/select-clients.backend.d.ts +0 -1
- package/lib/project/project-specyfic/select-clients.backend.js +0 -4
- package/lib/project/project-specyfic/select-clients.backend.js.map +0 -1
- package/lib/scripts/BASH-CONFIG.backend.d.ts +0 -5
- package/lib/scripts/BASH-CONFIG.backend.js +0 -19
- package/lib/scripts/BASH-CONFIG.backend.js.map +0 -1
- package/lib/scripts/CLOUD/CLOUD.backend.d.ts +0 -5
- package/lib/scripts/CLOUD/CLOUD.backend.js +0 -29
- package/lib/scripts/CLOUD/CLOUD.backend.js.map +0 -1
- package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.d.ts +0 -9
- package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.js +0 -91
- package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.js.map +0 -1
- package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.d.ts +0 -0
- package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.js +0 -64
- package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.js.map +0 -1
- package/lib/scripts/COMPILERS-TESTING/index.d.ts +0 -1
- package/lib/scripts/COMPILERS-TESTING/index.js +0 -7
- package/lib/scripts/COMPILERS-TESTING/index.js.map +0 -1
- package/lib/scripts/DAEMON.backend.d.ts +0 -2
- package/lib/scripts/DAEMON.backend.js +0 -5
- package/lib/scripts/DAEMON.backend.js.map +0 -1
- package/lib/scripts/JAVA.backend.js +0 -48
- package/lib/scripts/JAVA.backend.js.map +0 -1
|
@@ -1,958 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectIsomorphicLib = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
//#region imports
|
|
6
|
-
//#region @backend
|
|
7
|
-
var tnp_core_1 = require("tnp-core");
|
|
8
|
-
var tnp_core_2 = require("tnp-core");
|
|
9
|
-
var tnp_core_3 = require("tnp-core");
|
|
10
|
-
var inquirer = require("inquirer");
|
|
11
|
-
var tnp_config_1 = require("tnp-config");
|
|
12
|
-
var isomorphic_region_loader_1 = require("isomorphic-region-loader");
|
|
13
|
-
var incremental_build_process_backend_1 = require("../compilers/build-isomorphic-lib/compilations/incremental-build-process.backend");
|
|
14
|
-
var packages_recognition_1 = require("../features/package-recognition/packages-recognition");
|
|
15
|
-
//#endregion
|
|
16
|
-
var project_1 = require("../abstract/project/project");
|
|
17
|
-
var tnp_core_4 = require("tnp-core");
|
|
18
|
-
var tnp_helpers_1 = require("tnp-helpers");
|
|
19
|
-
var typescript_class_helpers_1 = require("typescript-class-helpers");
|
|
20
|
-
var tnp_cli_1 = require("tnp-cli");
|
|
21
|
-
var constants_1 = require("../../constants");
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region consts
|
|
24
|
-
// const loadNvm = ''// 'echo ' // 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && [ -s "$NVM_DIR/nvm.sh" ] && \\. "$NVM_DIR/nvm.sh" && nvm use v14';
|
|
25
|
-
//#endregion
|
|
26
|
-
var ProjectIsomorphicLib = exports.ProjectIsomorphicLib = /** @class */ (function (_super) {
|
|
27
|
-
tslib_1.__extends(ProjectIsomorphicLib, _super);
|
|
28
|
-
function ProjectIsomorphicLib() {
|
|
29
|
-
//#region static
|
|
30
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#endregion
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region fields / getters
|
|
35
|
-
_this.npmRunNg = "npm-run ng"; // when there is not globl "ng" command -> npm-run ng.js works
|
|
36
|
-
return _this;
|
|
37
|
-
//#endregion
|
|
38
|
-
//#endregion
|
|
39
|
-
}
|
|
40
|
-
ProjectIsomorphicLib_1 = ProjectIsomorphicLib;
|
|
41
|
-
//#region static / get angular project proxy path
|
|
42
|
-
//#region @backend
|
|
43
|
-
ProjectIsomorphicLib.angularProjProxyPath = function (project, outFolder, client, websql, type) {
|
|
44
|
-
if (type === void 0) { type = 'app'; }
|
|
45
|
-
var pref = ((type === 'app') ? 'apps' : 'libs');
|
|
46
|
-
var tmpProjectsStandalone = "tmp-".concat(pref, "-for-{{{outFolder}}}").concat(websql ? '-websql' : '', "/").concat(project.name);
|
|
47
|
-
var tmpProjects = "tmp-".concat(pref, "-for-{{{outFolder}}}").concat(websql ? '-websql' : '', "/").concat(project.name, "--for--{{{client}}}");
|
|
48
|
-
if (project.isStandaloneProject) {
|
|
49
|
-
if (outFolder) {
|
|
50
|
-
return tmpProjectsStandalone.replace('{{{outFolder}}}', outFolder);
|
|
51
|
-
}
|
|
52
|
-
return tmpProjectsStandalone;
|
|
53
|
-
}
|
|
54
|
-
if (outFolder && client) {
|
|
55
|
-
return tmpProjects.replace('{{{outFolder}}}', outFolder).replace('{{{client}}}', client);
|
|
56
|
-
}
|
|
57
|
-
return tmpProjects;
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(ProjectIsomorphicLib.prototype, "ignoreInV3", {
|
|
60
|
-
get: function () {
|
|
61
|
-
var files = [
|
|
62
|
-
'angular.json.filetemplate',
|
|
63
|
-
'ngsw-config.json.filetemplate',
|
|
64
|
-
];
|
|
65
|
-
return tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(files), false), tslib_1.__read(files.map(function (f) { return f.replace('.filetemplate', ''); })), false);
|
|
66
|
-
},
|
|
67
|
-
enumerable: false,
|
|
68
|
-
configurable: true
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(ProjectIsomorphicLib.prototype, "forAppRelaseBuild", {
|
|
71
|
-
get: function () {
|
|
72
|
-
var _a, _b, _c;
|
|
73
|
-
return (((_c = (_b = (_a = this.buildOptions) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b.trim()) === null || _c === void 0 ? void 0 : _c.search('--forAppRelaseBuild')) !== -1);
|
|
74
|
-
},
|
|
75
|
-
enumerable: false,
|
|
76
|
-
configurable: true
|
|
77
|
-
});
|
|
78
|
-
;
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region methods
|
|
81
|
-
//#region methods / source files to ignore
|
|
82
|
-
ProjectIsomorphicLib.prototype.sourceFilesToIgnore = function () {
|
|
83
|
-
//#region @backendFunc
|
|
84
|
-
var toIgnore = [
|
|
85
|
-
"src/".concat(tnp_config_1.config.file.entities_ts),
|
|
86
|
-
"src/".concat(tnp_config_1.config.file.controllers_ts),
|
|
87
|
-
];
|
|
88
|
-
return toIgnore;
|
|
89
|
-
//#endregion
|
|
90
|
-
};
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region methods / project specyfic files
|
|
93
|
-
ProjectIsomorphicLib.prototype.projectSpecyficFiles = function () {
|
|
94
|
-
var _this = this;
|
|
95
|
-
//#region @backendFunc
|
|
96
|
-
var files = _super.prototype.projectSpecyficFiles.call(this)
|
|
97
|
-
.concat(tslib_1.__spreadArray([
|
|
98
|
-
'tsconfig.browser.json',
|
|
99
|
-
'webpack.config.js',
|
|
100
|
-
'webpack.backend-bundle-build.js',
|
|
101
|
-
'run.js',
|
|
102
|
-
'run-org.js'
|
|
103
|
-
], tslib_1.__read(this.filesTemplates()), false)).concat(!this.isStandaloneProject ? [
|
|
104
|
-
'src/typings.d.ts',
|
|
105
|
-
] : []);
|
|
106
|
-
if (this.frameworkVersionAtLeast('v2')) {
|
|
107
|
-
files = files.filter(function (f) { return f !== 'tsconfig.browser.json'; });
|
|
108
|
-
}
|
|
109
|
-
if (this.frameworkVersionAtLeast('v3')) {
|
|
110
|
-
files = files.filter(function (f) { return !_this.ignoreInV3.includes(f); });
|
|
111
|
-
}
|
|
112
|
-
return files;
|
|
113
|
-
//#endregion
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region methods / files templates
|
|
117
|
-
ProjectIsomorphicLib.prototype.filesTemplates = function () {
|
|
118
|
-
var _this = this;
|
|
119
|
-
//#region @backendFunc
|
|
120
|
-
var files = [
|
|
121
|
-
'tsconfig.json.filetemplate',
|
|
122
|
-
'tsconfig.backend.dist.json.filetemplate',
|
|
123
|
-
'tsconfig.backend.bundle.json.filetemplate',
|
|
124
|
-
];
|
|
125
|
-
if (this.frameworkVersionAtLeast('v2')) {
|
|
126
|
-
files = tslib_1.__spreadArray(tslib_1.__spreadArray([
|
|
127
|
-
'tsconfig.isomorphic.json.filetemplate',
|
|
128
|
-
'tsconfig.isomorphic-flat-dist.json.filetemplate',
|
|
129
|
-
'tsconfig.isomorphic-flat-bundle.json.filetemplate',
|
|
130
|
-
'tsconfig.browser.json.filetemplate'
|
|
131
|
-
], tslib_1.__read(this.vscodeFileTemplates), false), tslib_1.__read(files), false);
|
|
132
|
-
}
|
|
133
|
-
if (this.frameworkVersionAtLeast('v3')) {
|
|
134
|
-
files = files.filter(function (f) { return !_this.ignoreInV3.includes(f); });
|
|
135
|
-
}
|
|
136
|
-
return files;
|
|
137
|
-
//#endregion
|
|
138
|
-
};
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region methods / project linked files
|
|
141
|
-
ProjectIsomorphicLib.prototype.projectLinkedFiles = function () {
|
|
142
|
-
//#region @backendFunc
|
|
143
|
-
var files = _super.prototype.projectLinkedFiles.call(this);
|
|
144
|
-
if (this.frameworkVersionAtLeast('v2')) {
|
|
145
|
-
files.push({
|
|
146
|
-
sourceProject: project_1.Project.by(this._type, 'v1'),
|
|
147
|
-
relativePath: 'webpack.backend-bundle-build.js'
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return files;
|
|
151
|
-
//#endregion
|
|
152
|
-
};
|
|
153
|
-
//#endregion
|
|
154
|
-
//#region methods / project specyfic ignored files
|
|
155
|
-
ProjectIsomorphicLib.prototype.projectSpecyficIgnoredFiles = function () {
|
|
156
|
-
//#region @backendFunc
|
|
157
|
-
return [
|
|
158
|
-
// 'src/entities.ts',
|
|
159
|
-
// 'src/controllers.ts'
|
|
160
|
-
].concat(this.projectSpecyficFiles());
|
|
161
|
-
//#endregion
|
|
162
|
-
};
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region methods / build steps
|
|
165
|
-
ProjectIsomorphicLib.prototype.buildSteps = function (buildOptions, libBuildDone) {
|
|
166
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
167
|
-
var prod, watch, outDir, onlyWatchNoBuild, appBuild, args, forClient, baseHref, websql;
|
|
168
|
-
var _a;
|
|
169
|
-
return tslib_1.__generator(this, function (_b) {
|
|
170
|
-
switch (_b.label) {
|
|
171
|
-
case 0:
|
|
172
|
-
//#region @backendFunc
|
|
173
|
-
this.buildOptions = buildOptions;
|
|
174
|
-
prod = buildOptions.prod, watch = buildOptions.watch, outDir = buildOptions.outDir, onlyWatchNoBuild = buildOptions.onlyWatchNoBuild, appBuild = buildOptions.appBuild, args = buildOptions.args, forClient = (_a = buildOptions.forClient, _a === void 0 ? [] : _a), baseHref = buildOptions.baseHref, websql = buildOptions.websql;
|
|
175
|
-
if (!!onlyWatchNoBuild) return [3 /*break*/, 4];
|
|
176
|
-
if (!appBuild) return [3 /*break*/, 2];
|
|
177
|
-
return [4 /*yield*/, this.buildApp(outDir, watch, forClient, buildOptions.args, baseHref, prod, websql)];
|
|
178
|
-
case 1:
|
|
179
|
-
_b.sent();
|
|
180
|
-
return [3 /*break*/, 4];
|
|
181
|
-
case 2: return [4 /*yield*/, this.buildLib(libBuildDone)];
|
|
182
|
-
case 3:
|
|
183
|
-
_b.sent();
|
|
184
|
-
_b.label = 4;
|
|
185
|
-
case 4: return [2 /*return*/];
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
//#endregion
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region api
|
|
193
|
-
//#region api / init procedure
|
|
194
|
-
ProjectIsomorphicLib.prototype.initProcedure = function () {
|
|
195
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
196
|
-
return tslib_1.__generator(this, function (_a) {
|
|
197
|
-
//#region @backend
|
|
198
|
-
if (this.isCoreProject && this.frameworkVersionAtLeast('v2')) {
|
|
199
|
-
}
|
|
200
|
-
return [2 /*return*/];
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region api / start on command
|
|
206
|
-
ProjectIsomorphicLib.prototype.startOnCommand = function (args) {
|
|
207
|
-
//#region @backendFunc
|
|
208
|
-
var command = "ts-node run.js ".concat(args);
|
|
209
|
-
return command;
|
|
210
|
-
//#endregion
|
|
211
|
-
};
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region api / build app
|
|
214
|
-
ProjectIsomorphicLib.prototype.buildApp = function (
|
|
215
|
-
//#region options
|
|
216
|
-
//#region @backend
|
|
217
|
-
outDir, watch, forClient, args, baseHref, prod, websql) {
|
|
218
|
-
var _a;
|
|
219
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
220
|
-
var isSmartContainerTarget, isSmartContainerTargetNonClient, basename, webpackEnvParams, backAppTmpFolders, backeFromRelase, backeFromContainerTarget, back, outDirApp, outPutPathCommand, flags, client, portAssignedToAppBuild, argsAdditionalParams, isStandalone, buildOutDir, parent, additionalReplace, command, portAssignedToAppBuildCommandPart, aot, ngBuildCmd, isElectron, answer, proj, showInfoAngular;
|
|
221
|
-
var _this = this;
|
|
222
|
-
return tslib_1.__generator(this, function (_b) {
|
|
223
|
-
switch (_b.label) {
|
|
224
|
-
case 0:
|
|
225
|
-
isSmartContainerTarget = this.isSmartContainerTarget;
|
|
226
|
-
isSmartContainerTargetNonClient = this.isSmartContainerTargetNonClient;
|
|
227
|
-
basename = '';
|
|
228
|
-
if (this.isInRelaseBundle) {
|
|
229
|
-
if (!((_a = this.env.config) === null || _a === void 0 ? void 0 : _a.useDomain)) {
|
|
230
|
-
basename = "--base-href /".concat(isSmartContainerTarget ? this.smartContainerTargetParentContainer.name : this.name, "/");
|
|
231
|
-
if (isSmartContainerTargetNonClient) {
|
|
232
|
-
basename = "--base-href /".concat(isSmartContainerTarget ? this.smartContainerTargetParentContainer.name : this.name, "/-/").concat(this.name, "/");
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
webpackEnvParams = "--env.outFolder=".concat(outDir);
|
|
237
|
-
webpackEnvParams = webpackEnvParams + (watch ? ' --env.watch=true' : '');
|
|
238
|
-
backAppTmpFolders = "../../";
|
|
239
|
-
backeFromRelase = "../../../../";
|
|
240
|
-
backeFromContainerTarget = "../../../";
|
|
241
|
-
back = backAppTmpFolders;
|
|
242
|
-
if (this.isInRelaseBundle) {
|
|
243
|
-
if (isSmartContainerTarget) {
|
|
244
|
-
back = "".concat(backAppTmpFolders).concat(backeFromContainerTarget).concat(backeFromRelase);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
back = "".concat(backAppTmpFolders).concat(backeFromRelase);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
if (isSmartContainerTarget) {
|
|
252
|
-
back = "".concat(backAppTmpFolders).concat(backeFromContainerTarget);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
outDirApp = this.isInRelaseBundle ? tnp_config_1.config.folder.docs : "".concat(outDir, "-app").concat(websql ? '-websql' : '');
|
|
256
|
-
if (isSmartContainerTargetNonClient) {
|
|
257
|
-
outDirApp = "".concat(outDirApp, "/-/").concat(this.name);
|
|
258
|
-
}
|
|
259
|
-
outPutPathCommand = "--output-path ".concat(back).concat(outDirApp, " ").concat(basename);
|
|
260
|
-
flags = require('minimist')(args.split(' ')).flags;
|
|
261
|
-
flags = (tnp_core_4._.isString(flags) ? [flags] : []);
|
|
262
|
-
flags = (!tnp_core_4._.isArray(flags) ? [] : flags);
|
|
263
|
-
client = tnp_core_4._.first(forClient);
|
|
264
|
-
if (client) {
|
|
265
|
-
webpackEnvParams = "".concat(webpackEnvParams, " --env.moduleName=").concat(client.name);
|
|
266
|
-
}
|
|
267
|
-
argsAdditionalParams = tnp_helpers_1.Helpers.cliTool.argsFrom(args) || {};
|
|
268
|
-
if (tnp_core_4._.isNumber(argsAdditionalParams.port)) {
|
|
269
|
-
portAssignedToAppBuild = argsAdditionalParams.port;
|
|
270
|
-
}
|
|
271
|
-
if (!tnp_core_4._.isNumber(portAssignedToAppBuild) || !portAssignedToAppBuild) {
|
|
272
|
-
portAssignedToAppBuild = websql ? this.standaloneWebsqlAppPort : this.standaloneNormalAppPort;
|
|
273
|
-
}
|
|
274
|
-
if (!(!tnp_core_4._.isNumber(portAssignedToAppBuild) || !portAssignedToAppBuild)) return [3 /*break*/, 2];
|
|
275
|
-
return [4 /*yield*/, this.assignFreePort(constants_1.DEFAULT_PORT.APP_BUILD_LOCALHOST)];
|
|
276
|
-
case 1:
|
|
277
|
-
portAssignedToAppBuild = _b.sent();
|
|
278
|
-
_b.label = 2;
|
|
279
|
-
case 2:
|
|
280
|
-
if (!watch) return [3 /*break*/, 4];
|
|
281
|
-
return [4 /*yield*/, tnp_helpers_1.Helpers.killProcessByPort(portAssignedToAppBuild)];
|
|
282
|
-
case 3:
|
|
283
|
-
_b.sent();
|
|
284
|
-
_b.label = 4;
|
|
285
|
-
case 4:
|
|
286
|
-
isStandalone = (this.isStandaloneProject && !isSmartContainerTarget);
|
|
287
|
-
buildOutDir = this.buildOptions.outDir;
|
|
288
|
-
parent = (!isStandalone
|
|
289
|
-
? (isSmartContainerTarget ? this.smartContainerTargetParentContainer : this.parent)
|
|
290
|
-
: void 0);
|
|
291
|
-
additionalReplace = function (line) {
|
|
292
|
-
var beforeModule2 = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(buildOutDir, parent.name, _this.name, "tmp-apps-for-".concat(buildOutDir, "/").concat(_this.name)));
|
|
293
|
-
// console.log({ beforeModule2 })
|
|
294
|
-
if (line.search(beforeModule2) !== -1) {
|
|
295
|
-
line = line.replace(beforeModule2 + '/', '');
|
|
296
|
-
}
|
|
297
|
-
return line;
|
|
298
|
-
};
|
|
299
|
-
if (this.frameworkVersionAtLeast('v3')) {
|
|
300
|
-
portAssignedToAppBuildCommandPart = tnp_core_4._.isNumber(portAssignedToAppBuild) ? "--port=".concat(portAssignedToAppBuild) : '';
|
|
301
|
-
aot = flags.includes('aot');
|
|
302
|
-
ngBuildCmd = "npm-run ng build app"
|
|
303
|
-
+ "".concat(aot ? '--aot=true' : '', " ")
|
|
304
|
-
+ "".concat(prod ? '--configuration production' : '', " ")
|
|
305
|
-
+ "".concat(watch ? '--watch' : '')
|
|
306
|
-
+ "".concat(outPutPathCommand, " ");
|
|
307
|
-
if (watch) {
|
|
308
|
-
if (outDir === 'dist') {
|
|
309
|
-
isElectron = false;
|
|
310
|
-
command = "".concat(this.npmRunNg, " serve ").concat(isElectron ? 'angular-electron' : 'app', " ").concat(portAssignedToAppBuildCommandPart, " ").concat(prod ? '--prod' : '');
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
command = ngBuildCmd;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
command = ngBuildCmd;
|
|
318
|
-
}
|
|
319
|
-
//#endregion
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
//#region @deprecated prepare webpack variables
|
|
323
|
-
if (tnp_core_4._.isNumber(portAssignedToAppBuild)) {
|
|
324
|
-
webpackEnvParams = "".concat(webpackEnvParams, " --env.port=").concat(portAssignedToAppBuild);
|
|
325
|
-
}
|
|
326
|
-
command = "npm-run webpack-dev-server ".concat(webpackEnvParams);
|
|
327
|
-
//#endregion
|
|
328
|
-
}
|
|
329
|
-
if (!!global.tnpNonInteractive) return [3 /*break*/, 6];
|
|
330
|
-
if (!(!this.isStandaloneProject && forClient.length === 0)) return [3 /*break*/, 6];
|
|
331
|
-
return [4 /*yield*/, inquirer
|
|
332
|
-
.prompt([
|
|
333
|
-
{
|
|
334
|
-
type: 'list',
|
|
335
|
-
name: 'project',
|
|
336
|
-
message: 'Which project do you wanna simulate ?',
|
|
337
|
-
choices: this.parent.children
|
|
338
|
-
.filter(function (c) { return c.typeIs.apply(c, tslib_1.__spreadArray([], tslib_1.__read(tnp_config_1.config.allowedTypes.app), false)); })
|
|
339
|
-
.filter(function (c) { return c.name !== _this.name; })
|
|
340
|
-
.map(function (c) { return c.name; }),
|
|
341
|
-
filter: function (val) {
|
|
342
|
-
return val.toLowerCase();
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
])];
|
|
346
|
-
case 5:
|
|
347
|
-
answer = _b.sent();
|
|
348
|
-
client = project_1.Project.From(tnp_core_2.path.join(this.location, '..', answer.project));
|
|
349
|
-
_b.label = 6;
|
|
350
|
-
case 6:
|
|
351
|
-
if (this.frameworkVersionAtLeast('v3')) {
|
|
352
|
-
proj = this.proxyNgProj(this, this.buildOptions);
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
proj = this;
|
|
356
|
-
}
|
|
357
|
-
showInfoAngular = function () {
|
|
358
|
-
tnp_helpers_1.Helpers.log("\n\n ANGULAR BUILD APP COMMAND: ".concat(command, "\n\n inside: ").concat(proj.location, "\n\n "));
|
|
359
|
-
};
|
|
360
|
-
//#endregion
|
|
361
|
-
//#endregion
|
|
362
|
-
showInfoAngular();
|
|
363
|
-
return [4 /*yield*/, proj.execute(command, {
|
|
364
|
-
resolvePromiseMsg: {
|
|
365
|
-
stdout: 'Compiled successfully'
|
|
366
|
-
},
|
|
367
|
-
//#region command execute params
|
|
368
|
-
exitOnError: true,
|
|
369
|
-
exitOnErrorCallback: function (code) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
370
|
-
return tslib_1.__generator(this, function (_a) {
|
|
371
|
-
tnp_helpers_1.Helpers.error("[".concat(tnp_config_1.config.frameworkName, "] Typescript compilation error (code=").concat(code, ")"), false, true);
|
|
372
|
-
return [2 /*return*/];
|
|
373
|
-
});
|
|
374
|
-
}); },
|
|
375
|
-
outputLineReplace: function (line) {
|
|
376
|
-
var _a, _b;
|
|
377
|
-
//#region replace outut line for better debugging
|
|
378
|
-
if (isStandalone) {
|
|
379
|
-
return line.replace("src/app/".concat(_this.name, "/"), "./src/");
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
line = line.trim();
|
|
383
|
-
if (line.search('src/app/') !== -1) {
|
|
384
|
-
line = line.replace('src/app/', './src/app/');
|
|
385
|
-
line = line.replace('././src/app/', './src/app/');
|
|
386
|
-
}
|
|
387
|
-
if (line.search("src/app/".concat(_this.name, "/libs/")) !== -1) {
|
|
388
|
-
var __ = (_a = tslib_1.__read(line.split('/'), 6), _a[0]), ___ = _a[1], ____ = _a[2], _____ = _a[3], ______ = _a[4], moduleName = _a[5];
|
|
389
|
-
return additionalReplace(line.replace("src/app/".concat(_this.name, "/libs/").concat(moduleName, "/"), "".concat(moduleName, "/src/lib/")));
|
|
390
|
-
}
|
|
391
|
-
if (line.search("src/app/") !== -1) {
|
|
392
|
-
var __ = (_b = tslib_1.__read(line.split('/'), 4), _b[0]), ___ = _b[1], ____ = _b[2], moduleName = _b[3];
|
|
393
|
-
return additionalReplace(line.replace("src/app/".concat(moduleName, "/"), "".concat(moduleName, "/src/")));
|
|
394
|
-
}
|
|
395
|
-
return additionalReplace(line);
|
|
396
|
-
}
|
|
397
|
-
//#endregion
|
|
398
|
-
},
|
|
399
|
-
//#endregion
|
|
400
|
-
})];
|
|
401
|
-
case 7:
|
|
402
|
-
_b.sent();
|
|
403
|
-
return [2 /*return*/];
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
};
|
|
408
|
-
//#endregion
|
|
409
|
-
//#region api / build lib
|
|
410
|
-
ProjectIsomorphicLib.prototype.buildLib = function (libBuildDone) {
|
|
411
|
-
var _a;
|
|
412
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
413
|
-
var outDir, ngbuildonly, watch, args, codeCutRelease, obscure, uglify, nodts, includeNodeModules, serveApp, productionModeButIncludePackageJsonDeps, incrementalBuildProcess, incrementalBuildProcessWebsql, proxyProject, proxyProjectWebsql, isStandalone, sharedOptions, commandForLibraryBuild, showInfoAngular, er_1, appBuildOpt, er_2, baseDistGenWebpackDts_1, e_1, e_2, cliJsFile;
|
|
414
|
-
var _b, _c;
|
|
415
|
-
var _this = this;
|
|
416
|
-
return tslib_1.__generator(this, function (_d) {
|
|
417
|
-
switch (_d.label) {
|
|
418
|
-
case 0:
|
|
419
|
-
outDir = (_b = this.buildOptions, _b.outDir), ngbuildonly = _b.ngbuildonly, watch = _b.watch, args = _b.args;
|
|
420
|
-
this.fixBuildDirs(outDir);
|
|
421
|
-
// Helpers.info(`[buildLib] start of building ${websql ? '[WEBSQL]' : ''}`);
|
|
422
|
-
tnp_helpers_1.Helpers.log("[buildLib] start of building...");
|
|
423
|
-
this.copyEssentialFilesTo([(0, tnp_core_1.crossPlatformPath)([this.pathFor(outDir)])], outDir);
|
|
424
|
-
codeCutRelease = require('minimist')((args || '').split(' ')).codeCutRelease;
|
|
425
|
-
obscure = (_c = this.buildOptions, _c.obscure), uglify = _c.uglify, nodts = _c.nodts, includeNodeModules = _c.includeNodeModules, serveApp = _c.serveApp;
|
|
426
|
-
productionModeButIncludePackageJsonDeps = (obscure || uglify) && !includeNodeModules;
|
|
427
|
-
if (outDir === 'bundle' && (obscure || uglify)) {
|
|
428
|
-
this.quickFixes.overritenBadNpmPackages();
|
|
429
|
-
}
|
|
430
|
-
if (productionModeButIncludePackageJsonDeps) {
|
|
431
|
-
this.buildOptions.genOnlyClientCode = true;
|
|
432
|
-
}
|
|
433
|
-
incrementalBuildProcess = new incremental_build_process_backend_1.IncrementalBuildProcess(this, this.buildOptions.clone({
|
|
434
|
-
websql: false
|
|
435
|
-
}));
|
|
436
|
-
incrementalBuildProcessWebsql = new incremental_build_process_backend_1.IncrementalBuildProcess(this, this.buildOptions.clone({
|
|
437
|
-
websql: true,
|
|
438
|
-
genOnlyClientCode: true,
|
|
439
|
-
}));
|
|
440
|
-
proxyProject = this.proxyNgProj(this, this.buildOptions.clone({
|
|
441
|
-
websql: false,
|
|
442
|
-
}), 'lib');
|
|
443
|
-
proxyProjectWebsql = this.proxyNgProj(this, this.buildOptions.clone({
|
|
444
|
-
websql: true
|
|
445
|
-
}), 'lib');
|
|
446
|
-
tnp_helpers_1.Helpers.log("\n\n proxy Proj = ".concat(proxyProject === null || proxyProject === void 0 ? void 0 : proxyProject.location, "\n proxy Proj websql = ").concat(proxyProjectWebsql === null || proxyProjectWebsql === void 0 ? void 0 : proxyProjectWebsql.location, "\n\n "));
|
|
447
|
-
isStandalone = (!this.isSmartContainer);
|
|
448
|
-
sharedOptions = function () {
|
|
449
|
-
return {
|
|
450
|
-
exitOnError: true,
|
|
451
|
-
exitOnErrorCallback: function (code) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
452
|
-
return tslib_1.__generator(this, function (_a) {
|
|
453
|
-
tnp_helpers_1.Helpers.error("[".concat(tnp_config_1.config.frameworkName, "] Typescript compilation lib error (code=").concat(code, ")"), false, true);
|
|
454
|
-
return [2 /*return*/];
|
|
455
|
-
});
|
|
456
|
-
}); },
|
|
457
|
-
outputLineReplace: function (line) {
|
|
458
|
-
if (isStandalone) {
|
|
459
|
-
if (line.startsWith('WARNING: postcss-url')) {
|
|
460
|
-
return ' --- [firedev] IGNORED WARN ---- ';
|
|
461
|
-
}
|
|
462
|
-
line = line.replace("projects/".concat(_this.name, "/src/"), "./src/");
|
|
463
|
-
if (line.search("/src/libs/") !== -1) {
|
|
464
|
-
var _a = tslib_1.__read(line.split('/'), 4), __ = _a[0], ___ = _a[1], ____ = _a[2], moduleName = _a[3];
|
|
465
|
-
// console.log({
|
|
466
|
-
// moduleName,
|
|
467
|
-
// standalone: 'inlib'
|
|
468
|
-
// })
|
|
469
|
-
return line.replace("/src/libs/".concat(moduleName, "/"), "/".concat(moduleName, "/src/lib/"));
|
|
470
|
-
}
|
|
471
|
-
return line;
|
|
472
|
-
}
|
|
473
|
-
return line;
|
|
474
|
-
},
|
|
475
|
-
};
|
|
476
|
-
};
|
|
477
|
-
commandForLibraryBuild = "".concat(this.npmRunNg, " build ").concat(this.name, " ").concat(watch ? '--watch' : '');
|
|
478
|
-
showInfoAngular = function () {
|
|
479
|
-
tnp_helpers_1.Helpers.info("Starting browser Angular/TypeScirpt build.... ".concat(_this.buildOptions.websql ? '[WEBSQL]' : ''));
|
|
480
|
-
tnp_helpers_1.Helpers.log("\n\n ANGULAR 13+ ".concat(_this.buildOptions.watch ? 'WATCH ' : '', " LIB BUILD STARTED... ").concat(_this.buildOptions.websql ? '[WEBSQL]' : '', "\n\n "));
|
|
481
|
-
tnp_helpers_1.Helpers.log(" command: ".concat(commandForLibraryBuild));
|
|
482
|
-
};
|
|
483
|
-
if (!this.buildOptions.watch) return [3 /*break*/, 18];
|
|
484
|
-
if (!productionModeButIncludePackageJsonDeps) return [3 /*break*/, 7];
|
|
485
|
-
//#region webpack bundle build
|
|
486
|
-
return [4 /*yield*/, incrementalBuildProcess.startAndWatch("isomorphic compilation (only browser) ")];
|
|
487
|
-
case 1:
|
|
488
|
-
//#region webpack bundle build
|
|
489
|
-
_d.sent();
|
|
490
|
-
return [4 /*yield*/, incrementalBuildProcessWebsql.startAndWatch("isomorphic compilation (only browser) [WEBSQL]")];
|
|
491
|
-
case 2:
|
|
492
|
-
_d.sent();
|
|
493
|
-
// Helpers.error(`Watch build not available for bundle build`, false, true);
|
|
494
|
-
// Helpers.info(`Starting watch bundle build for fast cli.. ${this.buildOptions.websql ? '[WEBSQL]' : ''}`);
|
|
495
|
-
tnp_helpers_1.Helpers.info("Starting watch bundle build for fast cli.. ");
|
|
496
|
-
_d.label = 3;
|
|
497
|
-
case 3:
|
|
498
|
-
_d.trys.push([3, 5, , 6]);
|
|
499
|
-
return [4 /*yield*/, this.webpackBackendBuild.run({
|
|
500
|
-
appBuild: false,
|
|
501
|
-
outDir: outDir,
|
|
502
|
-
watch: watch,
|
|
503
|
-
})];
|
|
504
|
-
case 4:
|
|
505
|
-
_d.sent();
|
|
506
|
-
return [3 /*break*/, 6];
|
|
507
|
-
case 5:
|
|
508
|
-
er_1 = _d.sent();
|
|
509
|
-
tnp_helpers_1.Helpers.error("WATCH ".concat(outDir.toUpperCase(), " build failed"), false, true);
|
|
510
|
-
return [3 /*break*/, 6];
|
|
511
|
-
case 6: return [3 /*break*/, 17];
|
|
512
|
-
case 7:
|
|
513
|
-
//#region watch backend compilation
|
|
514
|
-
return [4 /*yield*/, incrementalBuildProcess.startAndWatch('isomorphic compilation (watch mode)',
|
|
515
|
-
//#region options
|
|
516
|
-
{
|
|
517
|
-
watchOnly: this.buildOptions.watchOnly,
|
|
518
|
-
afterInitCallBack: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
519
|
-
return tslib_1.__generator(this, function (_a) {
|
|
520
|
-
switch (_a.label) {
|
|
521
|
-
case 0: return [4 /*yield*/, this.compilerCache.setUpdatoDate.incrementalBuildProcess()];
|
|
522
|
-
case 1:
|
|
523
|
-
_a.sent();
|
|
524
|
-
return [2 /*return*/];
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
}); }
|
|
528
|
-
}
|
|
529
|
-
//#endregion
|
|
530
|
-
)];
|
|
531
|
-
case 8:
|
|
532
|
-
//#region watch backend compilation
|
|
533
|
-
_d.sent();
|
|
534
|
-
return [4 /*yield*/, incrementalBuildProcessWebsql.startAndWatch('isomorphic compilation (watch mode) [WEBSQL]',
|
|
535
|
-
//#region options
|
|
536
|
-
{
|
|
537
|
-
watchOnly: this.buildOptions.watchOnly,
|
|
538
|
-
afterInitCallBack: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
539
|
-
return tslib_1.__generator(this, function (_a) {
|
|
540
|
-
switch (_a.label) {
|
|
541
|
-
case 0: return [4 /*yield*/, this.compilerCache.setUpdatoDate.incrementalBuildProcess()];
|
|
542
|
-
case 1:
|
|
543
|
-
_a.sent();
|
|
544
|
-
return [2 /*return*/];
|
|
545
|
-
}
|
|
546
|
-
});
|
|
547
|
-
}); }
|
|
548
|
-
}
|
|
549
|
-
//#endregion
|
|
550
|
-
)];
|
|
551
|
-
case 9:
|
|
552
|
-
_d.sent();
|
|
553
|
-
if (!this.frameworkVersionAtLeast('v3')) return [3 /*break*/, 17];
|
|
554
|
-
showInfoAngular();
|
|
555
|
-
if (!(isStandalone || (this.isSmartContainerTarget && ((_a = this.buildOptions.copyto) === null || _a === void 0 ? void 0 : _a.length) > 0))) return [3 /*break*/, 12];
|
|
556
|
-
if (this.isSmartContainerTarget) { // TODO QUICK_FIX this should be in init/struct
|
|
557
|
-
packages_recognition_1.PackagesRecognition.fromProject(this).start(true, 'before startling lib proxy project');
|
|
558
|
-
}
|
|
559
|
-
return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({ resolvePromiseMsg: {
|
|
560
|
-
stdout: 'Compilation complete. Watching for file changes'
|
|
561
|
-
} }, sharedOptions()))];
|
|
562
|
-
case 10:
|
|
563
|
-
_d.sent();
|
|
564
|
-
return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({ resolvePromiseMsg: {
|
|
565
|
-
stdout: 'Compilation complete. Watching for file changes'
|
|
566
|
-
} }, sharedOptions()))];
|
|
567
|
-
case 11:
|
|
568
|
-
_d.sent();
|
|
569
|
-
_d.label = 12;
|
|
570
|
-
case 12:
|
|
571
|
-
if (!libBuildDone) return [3 /*break*/, 14];
|
|
572
|
-
return [4 /*yield*/, tnp_helpers_1.Helpers.runSyncOrAsync(libBuildDone)];
|
|
573
|
-
case 13:
|
|
574
|
-
_d.sent();
|
|
575
|
-
_d.label = 14;
|
|
576
|
-
case 14:
|
|
577
|
-
if (!serveApp) return [3 /*break*/, 16];
|
|
578
|
-
appBuildOpt = this.buildOptions.clone();
|
|
579
|
-
appBuildOpt.appBuild = true;
|
|
580
|
-
return [4 /*yield*/, this.buildSteps(appBuildOpt)];
|
|
581
|
-
case 15:
|
|
582
|
-
_d.sent();
|
|
583
|
-
return [3 /*break*/, 17];
|
|
584
|
-
case 16:
|
|
585
|
-
this.showMesageWhenBuildLibDoneForSmartContainer(args, watch, this.isInRelaseBundle);
|
|
586
|
-
_d.label = 17;
|
|
587
|
-
case 17: return [3 /*break*/, 38];
|
|
588
|
-
case 18:
|
|
589
|
-
if (codeCutRelease) {
|
|
590
|
-
this.cutReleaseCode();
|
|
591
|
-
}
|
|
592
|
-
if (!productionModeButIncludePackageJsonDeps) return [3 /*break*/, 30];
|
|
593
|
-
//#region release production backend build for firedev/tnp specyfic
|
|
594
|
-
// console.log('k1')
|
|
595
|
-
return [4 /*yield*/, incrementalBuildProcess.start('isomorphic compilation (only browser) ')];
|
|
596
|
-
case 19:
|
|
597
|
-
//#region release production backend build for firedev/tnp specyfic
|
|
598
|
-
// console.log('k1')
|
|
599
|
-
_d.sent();
|
|
600
|
-
return [4 /*yield*/, incrementalBuildProcessWebsql.start('isomorphic compilation (only browser) [WEBSQL] ')];
|
|
601
|
-
case 20:
|
|
602
|
-
_d.sent();
|
|
603
|
-
_d.label = 21;
|
|
604
|
-
case 21:
|
|
605
|
-
_d.trys.push([21, 23, , 24]);
|
|
606
|
-
return [4 /*yield*/, this.webpackBackendBuild.run({
|
|
607
|
-
appBuild: false,
|
|
608
|
-
outDir: outDir,
|
|
609
|
-
watch: watch,
|
|
610
|
-
})];
|
|
611
|
-
case 22:
|
|
612
|
-
_d.sent();
|
|
613
|
-
return [3 /*break*/, 24];
|
|
614
|
-
case 23:
|
|
615
|
-
er_2 = _d.sent();
|
|
616
|
-
tnp_helpers_1.Helpers.error("".concat(outDir.toUpperCase(), " (single file compilation) build failed"), false, true);
|
|
617
|
-
return [3 /*break*/, 24];
|
|
618
|
-
case 24:
|
|
619
|
-
if (nodts) {
|
|
620
|
-
baseDistGenWebpackDts_1 = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, outDir, 'dist'));
|
|
621
|
-
tnp_helpers_1.Helpers
|
|
622
|
-
.filesFrom(baseDistGenWebpackDts_1, true)
|
|
623
|
-
.forEach(function (absSource) {
|
|
624
|
-
var destDtsFile = tnp_core_2.path.join(_this.location, outDir, absSource.replace("".concat(baseDistGenWebpackDts_1, "/"), ''));
|
|
625
|
-
tnp_helpers_1.Helpers.copyFile(absSource, destDtsFile);
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
tnp_helpers_1.Helpers.removeIfExists(tnp_core_2.path.join(this.location, outDir, 'dist'));
|
|
629
|
-
try {
|
|
630
|
-
if (obscure || uglify) {
|
|
631
|
-
this.backendCompileToEs5(outDir);
|
|
632
|
-
}
|
|
633
|
-
if (uglify) {
|
|
634
|
-
this.backendUglifyCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify);
|
|
635
|
-
}
|
|
636
|
-
;
|
|
637
|
-
if (obscure) {
|
|
638
|
-
this.backendObscureCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify);
|
|
639
|
-
}
|
|
640
|
-
// process.exit(0)
|
|
641
|
-
}
|
|
642
|
-
catch (er) {
|
|
643
|
-
tnp_helpers_1.Helpers.error("".concat(outDir.toUpperCase(), " (obscure || uglify) process failed"), false, true);
|
|
644
|
-
}
|
|
645
|
-
_d.label = 25;
|
|
646
|
-
case 25:
|
|
647
|
-
_d.trys.push([25, 28, , 29]);
|
|
648
|
-
showInfoAngular();
|
|
649
|
-
return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
|
|
650
|
-
case 26:
|
|
651
|
-
_d.sent();
|
|
652
|
-
return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
|
|
653
|
-
case 27:
|
|
654
|
-
_d.sent();
|
|
655
|
-
return [3 /*break*/, 29];
|
|
656
|
-
case 28:
|
|
657
|
-
e_1 = _d.sent();
|
|
658
|
-
tnp_helpers_1.Helpers.log(e_1);
|
|
659
|
-
tnp_helpers_1.Helpers.error("\n Command failed: ".concat(commandForLibraryBuild, "\n\n Not able to build project: ").concat(this.genericName), false, true);
|
|
660
|
-
return [3 /*break*/, 29];
|
|
661
|
-
case 29: return [3 /*break*/, 37];
|
|
662
|
-
case 30:
|
|
663
|
-
//#region normal backend compilation
|
|
664
|
-
return [4 /*yield*/, incrementalBuildProcess.start('isomorphic compilation')];
|
|
665
|
-
case 31:
|
|
666
|
-
//#region normal backend compilation
|
|
667
|
-
_d.sent();
|
|
668
|
-
return [4 /*yield*/, incrementalBuildProcessWebsql.start('isomorphic compilation')];
|
|
669
|
-
case 32:
|
|
670
|
-
_d.sent();
|
|
671
|
-
_d.label = 33;
|
|
672
|
-
case 33:
|
|
673
|
-
_d.trys.push([33, 36, , 37]);
|
|
674
|
-
showInfoAngular();
|
|
675
|
-
return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
|
|
676
|
-
case 34:
|
|
677
|
-
_d.sent();
|
|
678
|
-
return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
|
|
679
|
-
case 35:
|
|
680
|
-
_d.sent();
|
|
681
|
-
this.showMesageWhenBuildLibDoneForSmartContainer(args, watch, this.isInRelaseBundle);
|
|
682
|
-
return [3 /*break*/, 37];
|
|
683
|
-
case 36:
|
|
684
|
-
e_2 = _d.sent();
|
|
685
|
-
tnp_helpers_1.Helpers.log(e_2);
|
|
686
|
-
tnp_helpers_1.Helpers.error("\n Command failed: ".concat(commandForLibraryBuild, "\n\n Not able to build project: ").concat(this.genericName), false, true);
|
|
687
|
-
return [3 /*break*/, 37];
|
|
688
|
-
case 37:
|
|
689
|
-
if (includeNodeModules) {
|
|
690
|
-
cliJsFile = 'cli.js';
|
|
691
|
-
this.backendIncludeNodeModulesInCompilation(outDir, false, // uglify,
|
|
692
|
-
cliJsFile);
|
|
693
|
-
if (uglify) {
|
|
694
|
-
this.backendUglifyCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify, cliJsFile);
|
|
695
|
-
}
|
|
696
|
-
;
|
|
697
|
-
if (!productionModeButIncludePackageJsonDeps) {
|
|
698
|
-
if (obscure || uglify) {
|
|
699
|
-
this.backendCompileToEs5(outDir, cliJsFile);
|
|
700
|
-
}
|
|
701
|
-
if (obscure) {
|
|
702
|
-
this.backendObscureCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify, cliJsFile);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
if (nodts) {
|
|
707
|
-
this.backendRemoveDts(outDir);
|
|
708
|
-
}
|
|
709
|
-
//#endregion
|
|
710
|
-
if (codeCutRelease) {
|
|
711
|
-
this.cutReleaseCodeRestore();
|
|
712
|
-
}
|
|
713
|
-
_d.label = 38;
|
|
714
|
-
case 38: return [2 /*return*/];
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
});
|
|
718
|
-
};
|
|
719
|
-
//#endregion
|
|
720
|
-
//#endregion
|
|
721
|
-
//#region private methods
|
|
722
|
-
//#region private methods / show message when build lib done for smart container
|
|
723
|
-
ProjectIsomorphicLib.prototype.showMesageWhenBuildLibDoneForSmartContainer = function (args, watch, isInRelease) {
|
|
724
|
-
if (this.forAppRelaseBuild) {
|
|
725
|
-
tnp_helpers_1.Helpers.logInfo('Lib build for app done... starting app build');
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
if (isInRelease) {
|
|
729
|
-
tnp_helpers_1.Helpers.logInfo('Release lib build done... ');
|
|
730
|
-
return;
|
|
731
|
-
}
|
|
732
|
-
var buildLibDone = "LIB BUILD DONE.. ";
|
|
733
|
-
var ifapp = 'if you want to start app build -> please run in other terminal command:';
|
|
734
|
-
var ngserve = "".concat(watch ? '--port 4201 # or whatever port' : '#', " to run angular ").concat(watch
|
|
735
|
-
? 'ng serve'
|
|
736
|
-
: 'ng build (for application - not lib)', ".");
|
|
737
|
-
var bawOrba = watch ? 'baw' : 'ba';
|
|
738
|
-
var bawOrbaLong = watch ? ' build:app:watch ' : ' build:app ';
|
|
739
|
-
var bawOrbaLongWebsql = watch ? 'build:app:watch --websql' : 'build:app --websql';
|
|
740
|
-
var withPort = '(with custom port - otherwise automatically selected)';
|
|
741
|
-
var orIfWebsql = "or if you want to try websql mode:";
|
|
742
|
-
if (this.isSmartContainerTarget) {
|
|
743
|
-
var parent_1 = this.smartContainerTargetParentContainer;
|
|
744
|
-
args = tnp_helpers_1.Helpers.cliTool.removeArgFromString(args, constants_1.argsToClear);
|
|
745
|
-
var target = ((0, tnp_core_1.crossPlatformPath)(tnp_core_4._.first(args.split(' '))) || '').replace('/', '');
|
|
746
|
-
tnp_helpers_1.Helpers.taskDone("".concat(tnp_cli_1.CLI.chalk.underline("\n\n ".concat(buildLibDone, "... for target project \"")
|
|
747
|
-
+ "".concat(parent_1 ? (parent_1.name + '/') : '').concat(target, "\""))));
|
|
748
|
-
tnp_helpers_1.Helpers.success("\n\n ".concat(ifapp, "\n\n ").concat(tnp_cli_1.CLI.chalk.bold(tnp_config_1.config.frameworkName + bawOrbaLong + target), "\n or\n ").concat(tnp_config_1.config.frameworkName, " ").concat(bawOrba, " ").concat(target, "\n\n ").concat(withPort, "\n ").concat(tnp_config_1.config.frameworkName, " ").concat(bawOrba, " ").concat(target, " ").concat(ngserve, "\n\n ").concat(orIfWebsql, "\n ").concat(tnp_config_1.config.frameworkName, " ").concat(bawOrbaLongWebsql, "\n\n "));
|
|
749
|
-
}
|
|
750
|
-
else if (this.isStandaloneProject) {
|
|
751
|
-
tnp_helpers_1.Helpers.taskDone("".concat(tnp_cli_1.CLI.chalk.underline("".concat(buildLibDone, "..."))));
|
|
752
|
-
tnp_helpers_1.Helpers.success("\n\n ".concat(ifapp, "\n\n ").concat(tnp_cli_1.CLI.chalk.bold(tnp_config_1.config.frameworkName + bawOrbaLong), "\n or\n ").concat(tnp_config_1.config.frameworkName, " ").concat(bawOrba, "\n\n ").concat(withPort, "\n ").concat(tnp_config_1.config.frameworkName, " ").concat(bawOrba, " ").concat(ngserve, "\n\n ").concat(orIfWebsql, "\n ").concat(bawOrbaLongWebsql, "\n\n "));
|
|
753
|
-
}
|
|
754
|
-
};
|
|
755
|
-
//#endregion
|
|
756
|
-
//#region private methods / fix build dirs
|
|
757
|
-
ProjectIsomorphicLib.prototype.fixBuildDirs = function (outDir) {
|
|
758
|
-
//#region @backend
|
|
759
|
-
var p = tnp_core_2.path.join(this.location, outDir);
|
|
760
|
-
if (!tnp_helpers_1.Helpers.isFolder(p)) {
|
|
761
|
-
tnp_helpers_1.Helpers.remove(p);
|
|
762
|
-
tnp_helpers_1.Helpers.mkdirp(p);
|
|
763
|
-
}
|
|
764
|
-
//#endregion
|
|
765
|
-
};
|
|
766
|
-
//#endregion
|
|
767
|
-
//#region private methods / get proxy ng projects
|
|
768
|
-
ProjectIsomorphicLib.prototype.proxyNgProj = function (project, buildOptions, type) {
|
|
769
|
-
if (type === void 0) { type = 'app'; }
|
|
770
|
-
//#region @backendFunc
|
|
771
|
-
var projepath = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, ProjectIsomorphicLib_1.angularProjProxyPath(project, buildOptions.outDir, void 0, // TODO
|
|
772
|
-
buildOptions.websql, type)));
|
|
773
|
-
var proj = project_1.Project.From(projepath);
|
|
774
|
-
return proj;
|
|
775
|
-
//#endregion
|
|
776
|
-
};
|
|
777
|
-
//#endregion
|
|
778
|
-
//#region private methods / compile backend declaration files
|
|
779
|
-
ProjectIsomorphicLib.prototype.backendCompilerDeclarationFiles = function (outDir) {
|
|
780
|
-
//#region @backend
|
|
781
|
-
this.run("npm-run tsc --emitDeclarationOnly --declarationDir ".concat(outDir)).sync();
|
|
782
|
-
//#endregion
|
|
783
|
-
};
|
|
784
|
-
//#endregion
|
|
785
|
-
//#region private methods / include node_modules in compilation
|
|
786
|
-
ProjectIsomorphicLib.prototype.backendRemoveDts = function (outDir) {
|
|
787
|
-
tnp_helpers_1.Helpers
|
|
788
|
-
.filesFrom([this.location, outDir, 'lib'], true)
|
|
789
|
-
.filter(function (f) { return f.endsWith('.d.ts'); })
|
|
790
|
-
.forEach(function (f) { return tnp_helpers_1.Helpers.removeFileIfExists(f); });
|
|
791
|
-
tnp_helpers_1.Helpers.writeFile([this.location, outDir, 'lib/index.d.ts'], "export declare const dummy".concat((new Date()).getTime(), ";"));
|
|
792
|
-
};
|
|
793
|
-
//#endregion
|
|
794
|
-
//#region private methods / include node_modules in compilation
|
|
795
|
-
ProjectIsomorphicLib.prototype.backendIncludeNodeModulesInCompilation = function (outDir, uglify, mainCliJSFileName) {
|
|
796
|
-
//#region @backend
|
|
797
|
-
if (mainCliJSFileName === void 0) { mainCliJSFileName = tnp_config_1.config.file.index_js; }
|
|
798
|
-
// QUICK_FIX TODO ncc input change does not work (it takes always index.js)
|
|
799
|
-
//#region QUICK_FIX
|
|
800
|
-
var indexOrg = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.index_js));
|
|
801
|
-
var indexOrgBackup = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.index_js, "-backup"));
|
|
802
|
-
var mainFileAbs = this.pathFor("".concat(outDir, "/").concat(mainCliJSFileName));
|
|
803
|
-
var useBackupFile = (mainCliJSFileName !== tnp_config_1.config.file.index_js);
|
|
804
|
-
if (useBackupFile) {
|
|
805
|
-
tnp_helpers_1.Helpers.copyFile(indexOrg, indexOrgBackup);
|
|
806
|
-
}
|
|
807
|
-
//#endregion
|
|
808
|
-
var nccComand = "ncc build ".concat(outDir, "/").concat(tnp_config_1.config.file.index_js, " -o ").concat(outDir, "/temp/ncc ").concat(uglify ? '-m' : '', " --no-cache ");
|
|
809
|
-
// console.log({
|
|
810
|
-
// useBackupFile,
|
|
811
|
-
// indexOrg,
|
|
812
|
-
// indexOrgBackup,
|
|
813
|
-
// nccComand
|
|
814
|
-
// })
|
|
815
|
-
this.run(nccComand).sync();
|
|
816
|
-
// Helpers
|
|
817
|
-
// .filesFrom([this.location, outDir, 'lib'], true)
|
|
818
|
-
// .filter(f => f.endsWith('.js') || f.endsWith('.js.map'))
|
|
819
|
-
// .forEach(f => Helpers.removeFileIfExists(f))
|
|
820
|
-
// ;
|
|
821
|
-
var baseBundleOrDist = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, outDir));
|
|
822
|
-
var nccBase = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, outDir, 'temp', 'ncc'));
|
|
823
|
-
tnp_helpers_1.Helpers
|
|
824
|
-
.filesFrom(nccBase, true)
|
|
825
|
-
.filter(function (f) { return f.replace("".concat(nccBase, "/"), '') !== tnp_config_1.config.file.package_json; })
|
|
826
|
-
.forEach(function (f) {
|
|
827
|
-
var relativePath = f.replace("".concat(nccBase, "/"), '');
|
|
828
|
-
var dest = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(baseBundleOrDist, relativePath));
|
|
829
|
-
tnp_helpers_1.Helpers.copyFile(f, dest);
|
|
830
|
-
});
|
|
831
|
-
tnp_helpers_1.Helpers.removeFolderIfExists(tnp_core_2.path.dirname(nccBase));
|
|
832
|
-
// remove dependencies
|
|
833
|
-
var pjPath = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.package_json));
|
|
834
|
-
var pj = tnp_helpers_1.Helpers.readJson(pjPath);
|
|
835
|
-
Object.keys(pj.dependencies).forEach(function (name) {
|
|
836
|
-
if (!['ora'].includes(name)) { // TODO QUICK FIX FOF TNP
|
|
837
|
-
delete pj.dependencies[name];
|
|
838
|
-
}
|
|
839
|
-
});
|
|
840
|
-
pj.peerDependencies = {};
|
|
841
|
-
pj.devDependencies = {};
|
|
842
|
-
tnp_helpers_1.Helpers.removeFileIfExists(pjPath);
|
|
843
|
-
tnp_helpers_1.Helpers.writeFile(pjPath, pj);
|
|
844
|
-
if (useBackupFile) {
|
|
845
|
-
tnp_helpers_1.Helpers.copyFile(indexOrg, mainFileAbs);
|
|
846
|
-
tnp_helpers_1.Helpers.copyFile(indexOrgBackup, indexOrg);
|
|
847
|
-
}
|
|
848
|
-
tnp_helpers_1.Helpers.removeIfExists(indexOrgBackup);
|
|
849
|
-
//#endregion
|
|
850
|
-
};
|
|
851
|
-
//#endregion
|
|
852
|
-
//#region private methods / compile backend es5
|
|
853
|
-
/**
|
|
854
|
-
* TODO not working
|
|
855
|
-
*/
|
|
856
|
-
ProjectIsomorphicLib.prototype.backendCompileToEs5 = function (outDir, mainCliJSFileName) {
|
|
857
|
-
if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
|
|
858
|
-
return;
|
|
859
|
-
//#region @backend
|
|
860
|
-
if (!tnp_helpers_1.Helpers.exists(tnp_core_2.path.join(this.location, outDir, 'index.js'))) {
|
|
861
|
-
tnp_helpers_1.Helpers.warn("[compileToEs5] Nothing to compile to es5... no index.js in ".concat(outDir));
|
|
862
|
-
return;
|
|
863
|
-
}
|
|
864
|
-
var indexEs5js = "index-es5.js";
|
|
865
|
-
tnp_helpers_1.Helpers.writeFile(tnp_core_2.path.join(this.location, outDir, tnp_config_1.config.file._babelrc), '{ "presets": ["env"] }\n');
|
|
866
|
-
this.run("npm-run babel ./".concat(outDir, "/index.js --out-file ./").concat(outDir, "/").concat(indexEs5js)).sync();
|
|
867
|
-
tnp_helpers_1.Helpers.writeFile(tnp_core_2.path.join(this.location, outDir, tnp_config_1.config.file.index_js), tnp_helpers_1.Helpers.readFile(tnp_core_2.path.join(this.location, outDir, indexEs5js)));
|
|
868
|
-
tnp_helpers_1.Helpers.removeFileIfExists(tnp_core_2.path.join(this.location, outDir, indexEs5js));
|
|
869
|
-
tnp_helpers_1.Helpers.removeFileIfExists(tnp_core_2.path.join(this.location, outDir, tnp_config_1.config.file._babelrc));
|
|
870
|
-
//#endregion
|
|
871
|
-
};
|
|
872
|
-
//#endregion
|
|
873
|
-
//#region private methods / compile/uglify backend code
|
|
874
|
-
ProjectIsomorphicLib.prototype.backendUglifyCode = function (outDir, reservedNames, mainCliJSFileName) {
|
|
875
|
-
if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
|
|
876
|
-
//#region @backendFunc
|
|
877
|
-
if (!tnp_helpers_1.Helpers.exists(tnp_core_2.path.join(this.location, outDir, mainCliJSFileName))) {
|
|
878
|
-
tnp_helpers_1.Helpers.warn("[uglifyCode] Nothing to uglify... no ".concat(mainCliJSFileName, " in /").concat(outDir));
|
|
879
|
-
return;
|
|
880
|
-
}
|
|
881
|
-
var command = "npm-run uglifyjs ".concat(outDir, "/").concat(mainCliJSFileName, " --output ").concat(outDir, "/").concat(mainCliJSFileName, " -b")
|
|
882
|
-
+ " --mangle reserved=[".concat(reservedNames.map(function (n) { return "'".concat(n, "'"); }).join(','), "]");
|
|
883
|
-
// + ` --mangle-props reserved=[${reservedNames.join(',')}]` // it breakes code
|
|
884
|
-
tnp_helpers_1.Helpers.info("\n\n JAVASCRIPT-UGLIFY PROCESSING...\n\n ".concat(command, "\n\n "));
|
|
885
|
-
this.run(command).sync();
|
|
886
|
-
//#endregion
|
|
887
|
-
};
|
|
888
|
-
//#endregion
|
|
889
|
-
//#region private methods / compile/obscure backend code
|
|
890
|
-
ProjectIsomorphicLib.prototype.backendObscureCode = function (outDir, reservedNames, mainCliJSFileName) {
|
|
891
|
-
if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
|
|
892
|
-
//#region @backendFunc
|
|
893
|
-
if (!tnp_helpers_1.Helpers.exists(tnp_core_2.path.join(this.location, tnp_config_1.config.folder.bundle, mainCliJSFileName))) {
|
|
894
|
-
tnp_helpers_1.Helpers.warn("[obscureCode] Nothing to obscure... no ".concat(mainCliJSFileName, " in bundle"));
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
var commnad = "npm-run javascript-obfuscator bundle/".concat(mainCliJSFileName, " ")
|
|
898
|
-
+ " --output bundle/".concat(mainCliJSFileName)
|
|
899
|
-
+ " --target node"
|
|
900
|
-
+ " --string-array-rotate true"
|
|
901
|
-
// + ` --stringArray true`
|
|
902
|
-
+ " --string-array-encoding base64"
|
|
903
|
-
+ " --reserved-names '".concat(reservedNames.join(','), "'")
|
|
904
|
-
+ " --reserved-strings '".concat(reservedNames.join(','), "'");
|
|
905
|
-
tnp_helpers_1.Helpers.info("\n\n JAVASCRIPT-OBFUSCATOR PROCESSING...\n\n ".concat(commnad, "\n\n "));
|
|
906
|
-
this.run(commnad).sync();
|
|
907
|
-
//#endregion
|
|
908
|
-
};
|
|
909
|
-
Object.defineProperty(ProjectIsomorphicLib.prototype, "tmpSrcBundleFolder", {
|
|
910
|
-
//#endregion
|
|
911
|
-
//#region private methods / cut release code
|
|
912
|
-
get: function () {
|
|
913
|
-
return "tmp-cut-relase-src-".concat(tnp_config_1.config.folder.bundle).concat(this.buildOptions.websql ? '-websql' : '');
|
|
914
|
-
},
|
|
915
|
-
enumerable: false,
|
|
916
|
-
configurable: true
|
|
917
|
-
});
|
|
918
|
-
ProjectIsomorphicLib.prototype.cutReleaseCodeRestore = function () {
|
|
919
|
-
//#region @backend
|
|
920
|
-
var releaseSrcLocation = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, tnp_config_1.config.folder.src));
|
|
921
|
-
var releaseSrcLocationOrg = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, this.tmpSrcBundleFolder));
|
|
922
|
-
tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocation);
|
|
923
|
-
tnp_helpers_1.Helpers.copy(releaseSrcLocationOrg, releaseSrcLocation);
|
|
924
|
-
//#endregion
|
|
925
|
-
};
|
|
926
|
-
ProjectIsomorphicLib.prototype.cutReleaseCode = function () {
|
|
927
|
-
var _this = this;
|
|
928
|
-
//#region @backend
|
|
929
|
-
var releaseSrcLocation = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, tnp_config_1.config.folder.src));
|
|
930
|
-
var releaseSrcLocationOrg = (0, tnp_core_1.crossPlatformPath)(tnp_core_2.path.join(this.location, this.tmpSrcBundleFolder));
|
|
931
|
-
tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocationOrg);
|
|
932
|
-
tnp_helpers_1.Helpers.copy(releaseSrcLocation, releaseSrcLocationOrg, {
|
|
933
|
-
copySymlinksAsFiles: true,
|
|
934
|
-
copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst: true,
|
|
935
|
-
recursive: true,
|
|
936
|
-
});
|
|
937
|
-
tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocation);
|
|
938
|
-
tnp_helpers_1.Helpers.copy(releaseSrcLocationOrg, releaseSrcLocation);
|
|
939
|
-
var filesForModyficaiton = tnp_core_3.glob.sync("".concat(releaseSrcLocation, "/**/*"));
|
|
940
|
-
filesForModyficaiton
|
|
941
|
-
.filter(function (absolutePath) { return !tnp_helpers_1.Helpers.isFolder(absolutePath) && tnp_config_1.extAllowedToReplace.includes(tnp_core_2.path.extname(absolutePath)); })
|
|
942
|
-
.forEach(function (absolutePath) {
|
|
943
|
-
var rawContent = tnp_helpers_1.Helpers.readFile(absolutePath);
|
|
944
|
-
rawContent = isomorphic_region_loader_1.RegionRemover.from(absolutePath, rawContent, [tnp_config_1.TAGS.NOT_FOR_NPM], _this.project).output;
|
|
945
|
-
// rawContent = this.replaceRegionsWith(rawContent, ['@notFor'+'Npm']);
|
|
946
|
-
tnp_helpers_1.Helpers.writeFile(absolutePath, rawContent);
|
|
947
|
-
});
|
|
948
|
-
//#endregion
|
|
949
|
-
};
|
|
950
|
-
var ProjectIsomorphicLib_1;
|
|
951
|
-
ProjectIsomorphicLib = ProjectIsomorphicLib_1 = tslib_1.__decorate([
|
|
952
|
-
typescript_class_helpers_1.CLASS.NAME('ProjectIsomorphicLib')
|
|
953
|
-
], ProjectIsomorphicLib);
|
|
954
|
-
return ProjectIsomorphicLib;
|
|
955
|
-
}(project_1.Project
|
|
956
|
-
//#endregion
|
|
957
|
-
));
|
|
958
|
-
//# sourceMappingURL=project-isomorphic-lib.js.map
|