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.
Files changed (424) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/esm2022/lib/build-options.mjs +180 -0
  3. package/browser/esm2022/lib/constants.mjs +3 -3
  4. package/browser/esm2022/lib/helpers.mjs +1 -1
  5. package/browser/esm2022/lib/index.mjs +2 -3
  6. package/browser/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
  7. package/browser/esm2022/lib/project/abstract/index.mjs +1 -1
  8. package/browser/esm2022/lib/project/abstract/project/index.mjs +1 -1
  9. package/browser/esm2022/lib/project/abstract/project/project.mjs +1494 -70
  10. package/browser/esm2022/lib/project/features/package-json/index.mjs +1 -1
  11. package/browser/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
  12. package/browser/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
  13. package/browser/esm2022/lib/project/index.mjs +1 -5
  14. package/browser/esm2022/public-api.mjs +1 -1
  15. package/browser/esm2022/tnp.mjs +1 -1
  16. package/browser/fesm2022/tnp.mjs +1684 -88
  17. package/browser/fesm2022/tnp.mjs.map +1 -1
  18. package/browser/lib/build-options.d.ts +40 -0
  19. package/browser/lib/constants.d.ts +1 -1
  20. package/browser/lib/index.d.ts +1 -0
  21. package/browser/lib/project/abstract/project/project.d.ts +121 -6
  22. package/browser/lib/project/features/package-json/package-json.d.ts +1 -1
  23. package/cli.js +72762 -60372
  24. package/client/esm2022/lib/build-options.mjs +180 -0
  25. package/client/esm2022/lib/constants.mjs +3 -3
  26. package/client/esm2022/lib/helpers.mjs +1 -1
  27. package/client/esm2022/lib/index.mjs +2 -3
  28. package/client/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
  29. package/client/esm2022/lib/project/abstract/index.mjs +1 -1
  30. package/client/esm2022/lib/project/abstract/project/index.mjs +1 -1
  31. package/client/esm2022/lib/project/abstract/project/project.mjs +1494 -70
  32. package/client/esm2022/lib/project/features/package-json/index.mjs +1 -1
  33. package/client/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
  34. package/client/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
  35. package/client/esm2022/lib/project/index.mjs +1 -5
  36. package/client/esm2022/public-api.mjs +1 -1
  37. package/client/esm2022/tnp.mjs +1 -1
  38. package/client/fesm2022/tnp.mjs +1684 -88
  39. package/client/fesm2022/tnp.mjs.map +1 -1
  40. package/client/lib/build-options.d.ts +40 -0
  41. package/client/lib/constants.d.ts +1 -1
  42. package/client/lib/index.d.ts +1 -0
  43. package/client/lib/project/abstract/project/project.d.ts +121 -6
  44. package/client/lib/project/features/package-json/package-json.d.ts +1 -1
  45. package/client/package.json +63 -63
  46. package/lib/build-options.d.ts +39 -0
  47. package/lib/build-options.js +182 -0
  48. package/lib/build-options.js.map +1 -0
  49. package/lib/constants.d.ts +1 -1
  50. package/lib/constants.js +2 -2
  51. package/lib/constants.js.map +1 -1
  52. package/lib/index.d.ts +1 -1
  53. package/lib/index.js +1 -3
  54. package/lib/index.js.map +1 -1
  55. package/lib/project/abstract/command-line-feature.backend.d.ts +14 -0
  56. package/lib/project/abstract/command-line-feature.backend.js +50 -0
  57. package/lib/project/abstract/command-line-feature.backend.js.map +1 -0
  58. package/lib/project/abstract/project/base-project.d.ts +1 -1
  59. package/lib/project/abstract/project/base-project.js +31 -32
  60. package/lib/project/abstract/project/base-project.js.map +1 -1
  61. package/lib/project/abstract/project/buildable-project.backend.d.ts +2 -2
  62. package/lib/project/abstract/project/buildable-project.backend.js +2 -2
  63. package/lib/project/abstract/project/buildable-project.backend.js.map +1 -1
  64. package/lib/project/abstract/project/dependency-project.backend.d.ts +1 -10
  65. package/lib/project/abstract/project/dependency-project.backend.js +1 -74
  66. package/lib/project/abstract/project/dependency-project.backend.js.map +1 -1
  67. package/lib/project/abstract/project/feature-project.d.ts +2 -5
  68. package/lib/project/abstract/project/feature-project.js.map +1 -1
  69. package/lib/project/abstract/project/{tnp-project.d.ts → firedev-project.d.ts} +2 -2
  70. package/lib/project/abstract/project/{tnp-project.js → firedev-project.js} +25 -24
  71. package/lib/project/abstract/project/firedev-project.js.map +1 -0
  72. package/lib/project/abstract/project/folder-project.d.ts +0 -33
  73. package/lib/project/abstract/project/folder-project.js +6 -198
  74. package/lib/project/abstract/project/folder-project.js.map +1 -1
  75. package/lib/project/abstract/project/lib-project-smart-container.backend.js +14 -7
  76. package/lib/project/abstract/project/lib-project-smart-container.backend.js.map +1 -1
  77. package/lib/project/abstract/project/lib-project-standalone.backend.d.ts +0 -1
  78. package/lib/project/abstract/project/lib-project-standalone.backend.js +45 -31
  79. package/lib/project/abstract/project/lib-project-standalone.backend.js.map +1 -1
  80. package/lib/project/abstract/project/lib-project-vscode-ext.js +1 -1
  81. package/lib/project/abstract/project/lib-project-vscode-ext.js.map +1 -1
  82. package/lib/project/abstract/project/lib-project.backend.d.ts +4 -5
  83. package/lib/project/abstract/project/lib-project.backend.js +139 -102
  84. package/lib/project/abstract/project/lib-project.backend.js.map +1 -1
  85. package/lib/project/abstract/project/npm-project.d.ts +1 -1
  86. package/lib/project/abstract/project/npm-project.js +29 -10
  87. package/lib/project/abstract/project/npm-project.js.map +1 -1
  88. package/lib/project/abstract/project/project.d.ts +128 -14
  89. package/lib/project/abstract/project/project.js +1586 -120
  90. package/lib/project/abstract/project/project.js.map +1 -1
  91. package/lib/project/abstract/project/recreatable-project.backend.js +2 -2
  92. package/lib/project/abstract/project/recreatable-project.backend.js.map +1 -1
  93. package/lib/project/abstract/project/vscode-project.backend.js +3 -17
  94. package/lib/project/abstract/project/vscode-project.backend.js.map +1 -1
  95. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.d.ts +1 -1
  96. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js +2 -2
  97. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js.map +1 -1
  98. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.d.ts +3 -3
  99. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js +10 -11
  100. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js.map +1 -1
  101. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.d.ts +3 -3
  102. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js +6 -6
  103. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js.map +1 -1
  104. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.d.ts +2 -2
  105. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js +5 -6
  106. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js.map +1 -1
  107. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.d.ts +5 -5
  108. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js +12 -16
  109. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js.map +1 -1
  110. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.d.ts +1 -1
  111. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js +3 -3
  112. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js.map +1 -1
  113. package/lib/project/compilers/index.d.ts +0 -2
  114. package/lib/project/compilers/index.js +0 -2
  115. package/lib/project/compilers/index.js.map +1 -1
  116. package/lib/project/features/branding.backend.js +1 -0
  117. package/lib/project/features/branding.backend.js.map +1 -1
  118. package/lib/project/features/build-process/build-proces.backend.d.ts +3 -2
  119. package/lib/project/features/build-process/build-proces.backend.js +10 -10
  120. package/lib/project/features/build-process/build-proces.backend.js.map +1 -1
  121. package/lib/project/features/build-process/index.d.ts +1 -2
  122. package/lib/project/features/build-process/index.js +0 -1
  123. package/lib/project/features/build-process/index.js.map +1 -1
  124. package/lib/project/features/compiler-cache.backend.d.ts +1 -1
  125. package/lib/project/features/compiler-cache.backend.js +2 -2
  126. package/lib/project/features/compiler-cache.backend.js.map +1 -1
  127. package/lib/project/features/copy-manager/base-copy-manager.backend.d.ts +5 -5
  128. package/lib/project/features/copy-manager/base-copy-manager.backend.js +12 -13
  129. package/lib/project/features/copy-manager/base-copy-manager.backend.js.map +1 -1
  130. package/lib/project/features/copy-manager/copy-manager-helpers.backend.d.ts +1 -1
  131. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js +5 -5
  132. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js.map +1 -1
  133. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.d.ts +1 -1
  134. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js +5 -4
  135. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js.map +1 -1
  136. package/lib/project/features/copy-manager/copy-manager-organization.backend.d.ts +3 -3
  137. package/lib/project/features/copy-manager/copy-manager-organization.backend.js +30 -30
  138. package/lib/project/features/copy-manager/copy-manager-organization.backend.js.map +1 -1
  139. package/lib/project/features/copy-manager/copy-manager-standalone.backend.d.ts +5 -5
  140. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js +19 -19
  141. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js.map +1 -1
  142. package/lib/project/features/copy-manager/copy-manager.backend.d.ts +2 -2
  143. package/lib/project/features/copy-manager/copy-manager.backend.js.map +1 -1
  144. package/lib/project/features/copy-manager/{bundle-mjs-fesm-module-spliter.backend.d.ts → mjs-fesm-module-spliter.backend.d.ts} +1 -1
  145. package/lib/project/features/copy-manager/{bundle-mjs-fesm-module-spliter.backend.js → mjs-fesm-module-spliter.backend.js} +19 -19
  146. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js.map +1 -0
  147. package/lib/project/features/copy-manager/source-maping-url.backend.js +1 -1
  148. package/lib/project/features/copy-manager/source-maping-url.backend.js.map +1 -1
  149. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.d.ts +1 -1
  150. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js +1 -1
  151. package/lib/project/features/environment-config/environment-config-helpers.d.ts +1 -1
  152. package/lib/project/features/environment-config/environment-config-helpers.js +4 -5
  153. package/lib/project/features/environment-config/environment-config-helpers.js.map +1 -1
  154. package/lib/project/features/environment-config/environment-config.d.ts +2 -3
  155. package/lib/project/features/environment-config/environment-config.js +3 -4
  156. package/lib/project/features/environment-config/environment-config.js.map +1 -1
  157. package/lib/project/features/files-recreation/files-factory.backend.d.ts +1 -1
  158. package/lib/project/features/files-recreation/files-factory.backend.js +2 -2
  159. package/lib/project/features/files-recreation/files-factory.backend.js.map +1 -1
  160. package/lib/project/features/files-recreation/files-recreator.d.ts +1 -1
  161. package/lib/project/features/files-recreation/files-recreator.js +13 -19
  162. package/lib/project/features/files-recreation/files-recreator.js.map +1 -1
  163. package/lib/project/features/files-recreation/files-structure.backend.d.ts +2 -1
  164. package/lib/project/features/files-recreation/files-structure.backend.js +40 -67
  165. package/lib/project/features/files-recreation/files-structure.backend.js.map +1 -1
  166. package/lib/project/features/files-recreation/files-templates.d.ts +1 -1
  167. package/lib/project/features/files-recreation/files-templates.js +2 -3
  168. package/lib/project/features/files-recreation/files-templates.js.map +1 -1
  169. package/lib/project/features/git-actions.backend.d.ts +2 -1
  170. package/lib/project/features/git-actions.backend.js +23 -26
  171. package/lib/project/features/git-actions.backend.js.map +1 -1
  172. package/lib/project/features/index.d.ts +0 -1
  173. package/lib/project/features/index.js +0 -1
  174. package/lib/project/features/index.js.map +1 -1
  175. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js +7 -7
  176. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js.map +1 -1
  177. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js +5 -2
  178. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js.map +1 -1
  179. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js +2 -2
  180. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js.map +1 -1
  181. package/lib/project/features/linked-repos.backend.js +2 -2
  182. package/lib/project/features/linked-repos.backend.js.map +1 -1
  183. package/lib/project/features/node-modules/node-modules-base.backend.d.ts +1 -1
  184. package/lib/project/features/node-modules/node-modules-base.backend.js +5 -5
  185. package/lib/project/features/node-modules/node-modules-base.backend.js.map +1 -1
  186. package/lib/project/features/node-modules/node-modules-core.backend.d.ts +2 -2
  187. package/lib/project/features/node-modules/node-modules-core.backend.js +4 -4
  188. package/lib/project/features/node-modules/node-modules-core.backend.js.map +1 -1
  189. package/lib/project/features/node-modules/node-modules-helpers.backend.d.ts +1 -1
  190. package/lib/project/features/node-modules/node-modules-helpers.backend.js +8 -9
  191. package/lib/project/features/node-modules/node-modules-helpers.backend.js.map +1 -1
  192. package/lib/project/features/npm-packages/npm-packages-base.backend.d.ts +1 -1
  193. package/lib/project/features/npm-packages/npm-packages-base.backend.js +2 -2
  194. package/lib/project/features/npm-packages/npm-packages-base.backend.js.map +1 -1
  195. package/lib/project/features/npm-packages/npm-packages-core.backend.d.ts +1 -1
  196. package/lib/project/features/npm-packages/npm-packages-core.backend.js +5 -7
  197. package/lib/project/features/npm-packages/npm-packages-core.backend.js.map +1 -1
  198. package/lib/project/features/npm-packages/npm-packages-helpers.backend.d.ts +1 -1
  199. package/lib/project/features/package-json/package-json-base.backend.d.ts +1 -1
  200. package/lib/project/features/package-json/package-json-base.backend.js +3 -3
  201. package/lib/project/features/package-json/package-json-base.backend.js.map +1 -1
  202. package/lib/project/features/package-json/package-json-core.backend.d.ts +1 -1
  203. package/lib/project/features/package-json/package-json-core.backend.js +4 -4
  204. package/lib/project/features/package-json/package-json-core.backend.js.map +1 -1
  205. package/lib/project/features/package-json/package-json-deps-categories.backend.d.ts +1 -1
  206. package/lib/project/features/package-json/package-json-deps-categories.backend.js +4 -3
  207. package/lib/project/features/package-json/package-json-deps-categories.backend.js.map +1 -1
  208. package/lib/project/features/package-json/package-json-helpers.backend.d.ts +1 -1
  209. package/lib/project/features/package-json/package-json-helpers.backend.js +15 -15
  210. package/lib/project/features/package-json/package-json-helpers.backend.js.map +1 -1
  211. package/lib/project/features/package-json/package-json.d.ts +1 -1
  212. package/lib/project/features/package-recognition/packages-recognition.js +2 -2
  213. package/lib/project/features/package-recognition/packages-recognition.js.map +1 -1
  214. package/lib/project/features/quick-fixes.d.ts +2 -1
  215. package/lib/project/features/quick-fixes.js +15 -16
  216. package/lib/project/features/quick-fixes.js.map +1 -1
  217. package/lib/project/features/singular-build.backend.d.ts +2 -1
  218. package/lib/project/features/singular-build.backend.js +5 -4
  219. package/lib/project/features/singular-build.backend.js.map +1 -1
  220. package/lib/project/features/smart-node-modules.backend.d.ts +3 -2
  221. package/lib/project/features/smart-node-modules.backend.js +11 -10
  222. package/lib/project/features/smart-node-modules.backend.js.map +1 -1
  223. package/lib/project/features/target-project.backend.js +0 -1
  224. package/lib/project/features/target-project.backend.js.map +1 -1
  225. package/lib/project/features/test-runner/cypress-test-runner.d.ts +1 -1
  226. package/lib/project/features/test-runner/cypress-test-runner.js +3 -3
  227. package/lib/project/features/test-runner/cypress-test-runner.js.map +1 -1
  228. package/lib/project/features/test-runner/jest-test-runner.d.ts +1 -1
  229. package/lib/project/features/test-runner/jest-test-runner.js +2 -2
  230. package/lib/project/features/test-runner/jest-test-runner.js.map +1 -1
  231. package/lib/project/features/test-runner/mocha-test-runner.d.ts +1 -1
  232. package/lib/project/features/test-runner/mocha-test-runner.js +3 -3
  233. package/lib/project/features/test-runner/mocha-test-runner.js.map +1 -1
  234. package/lib/project/features/webpack-backend-compilation.backend.d.ts +3 -3
  235. package/lib/project/features/webpack-backend-compilation.backend.js +1 -1
  236. package/lib/project/features/webpack-backend-compilation.backend.js.map +1 -1
  237. package/lib/project/index.d.ts +0 -3
  238. package/lib/project/index.js +0 -5
  239. package/lib/project/index.js.map +1 -1
  240. package/lib/scripts/{JAVA.backend.d.ts → CI.backend.d.ts} +1 -1
  241. package/lib/scripts/CI.backend.js +28 -0
  242. package/lib/scripts/CI.backend.js.map +1 -0
  243. package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.d.ts +9 -13
  244. package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.js +17 -71
  245. package/lib/scripts/DEPENDENCIES-MANAGEMENT/DEPS.backend.js.map +1 -1
  246. package/lib/scripts/HELP.backend.js +1 -1
  247. package/lib/scripts/HELP.backend.js.map +1 -1
  248. package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.d.ts +3 -0
  249. package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.js +19 -32
  250. package/lib/scripts/NEW-PROJECT_FILES_MODULES/NEW.backend.js.map +1 -1
  251. package/lib/scripts/NEW-PROJECT_FILES_MODULES/project-factory.backend.js +2 -1
  252. package/lib/scripts/NEW-PROJECT_FILES_MODULES/project-factory.backend.js.map +1 -1
  253. package/lib/scripts/OTHER.backend.d.ts +0 -4
  254. package/lib/scripts/OTHER.backend.js +7 -63
  255. package/lib/scripts/OTHER.backend.js.map +1 -1
  256. package/lib/scripts/PROJECTS-DEVELOPMENT/BRANDING.backend.js +1 -1
  257. package/lib/scripts/PROJECTS-DEVELOPMENT/BRANDING.backend.js.map +1 -1
  258. package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.d.ts +2 -42
  259. package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.js +57 -580
  260. package/lib/scripts/PROJECTS-DEVELOPMENT/BUILD.backend.js.map +1 -1
  261. package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.d.ts +2 -0
  262. package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.js +19 -6
  263. package/lib/scripts/PROJECTS-DEVELOPMENT/DEVELOP.backend.js.map +1 -1
  264. package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.d.ts +0 -1
  265. package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.js +9 -17
  266. package/lib/scripts/PROJECTS-DEVELOPMENT/FILES_STRUCTURE.js.map +1 -1
  267. package/lib/scripts/PROJECTS-DEVELOPMENT/RELEASE.backend.js +3 -3
  268. package/lib/scripts/PROJECTS-DEVELOPMENT/RELEASE.backend.js.map +1 -1
  269. package/lib/scripts/PROJECTS-DEVELOPMENT/TESTS.js.map +1 -1
  270. package/lib/scripts/UPDATE.backend.d.ts +0 -1
  271. package/lib/scripts/UPDATE.backend.js +8 -9
  272. package/lib/scripts/UPDATE.backend.js.map +1 -1
  273. package/lib/scripts/VSCODE-EXT/GIT.backend.d.ts +0 -1
  274. package/lib/scripts/VSCODE-EXT/GIT.backend.js +1 -8
  275. package/lib/scripts/VSCODE-EXT/GIT.backend.js.map +1 -1
  276. package/lib/scripts/VSCODE-EXT/OPEN.backend.d.ts +0 -9
  277. package/lib/scripts/VSCODE-EXT/OPEN.backend.js +4 -49
  278. package/lib/scripts/VSCODE-EXT/OPEN.backend.js.map +1 -1
  279. package/lib/scripts/VSCODE-EXT/VSCODE.backend.js.map +1 -1
  280. package/lib/scripts/index.d.ts +221 -1
  281. package/lib/scripts/index.js +2 -12
  282. package/lib/scripts/index.js.map +1 -1
  283. package/package.json +33 -33
  284. package/package.json_tnp.json5 +31 -31
  285. package/start.backend.d.ts +1 -1
  286. package/start.backend.js +13 -3
  287. package/start.backend.js.map +1 -1
  288. package/tmp-environment.json +67 -67
  289. package/websql/esm2022/lib/build-options.mjs +180 -0
  290. package/websql/esm2022/lib/constants.mjs +3 -3
  291. package/websql/esm2022/lib/helpers.mjs +1 -1
  292. package/websql/esm2022/lib/index.mjs +2 -3
  293. package/websql/esm2022/lib/project/abstract/feature-for-project.mjs +1 -1
  294. package/websql/esm2022/lib/project/abstract/index.mjs +1 -1
  295. package/websql/esm2022/lib/project/abstract/project/index.mjs +1 -1
  296. package/websql/esm2022/lib/project/abstract/project/project.mjs +1494 -70
  297. package/websql/esm2022/lib/project/features/package-json/index.mjs +1 -1
  298. package/websql/esm2022/lib/project/features/package-json/package-json-file.mjs +1 -1
  299. package/websql/esm2022/lib/project/features/package-json/package-json.mjs +1 -1
  300. package/websql/esm2022/lib/project/index.mjs +1 -5
  301. package/websql/esm2022/public-api.mjs +1 -1
  302. package/websql/esm2022/tnp.mjs +1 -1
  303. package/websql/fesm2022/tnp.mjs +1684 -88
  304. package/websql/fesm2022/tnp.mjs.map +1 -1
  305. package/websql/lib/build-options.d.ts +40 -0
  306. package/websql/lib/constants.d.ts +1 -1
  307. package/websql/lib/index.d.ts +1 -0
  308. package/websql/lib/project/abstract/project/project.d.ts +121 -6
  309. package/websql/lib/project/features/package-json/package-json.d.ts +1 -1
  310. package/git-log.d.ts +0 -1
  311. package/git-log.js +0 -27
  312. package/git-log.js.map +0 -1
  313. package/lib/console-ui.d.ts +0 -0
  314. package/lib/console-ui.js +0 -172
  315. package/lib/console-ui.js.map +0 -1
  316. package/lib/project/abstract/project/cloud-project.d.ts +0 -4
  317. package/lib/project/abstract/project/cloud-project.js +0 -10
  318. package/lib/project/abstract/project/cloud-project.js.map +0 -1
  319. package/lib/project/abstract/project/db-process-project.backend.d.ts +0 -2
  320. package/lib/project/abstract/project/db-process-project.backend.js +0 -10
  321. package/lib/project/abstract/project/db-process-project.backend.js.map +0 -1
  322. package/lib/project/abstract/project/tnp-project.js.map +0 -1
  323. package/lib/project/compilers/framework-file-generator/controllers-generator.backend.d.ts +0 -6
  324. package/lib/project/compilers/framework-file-generator/controllers-generator.backend.js +0 -17
  325. package/lib/project/compilers/framework-file-generator/controllers-generator.backend.js.map +0 -1
  326. package/lib/project/compilers/framework-file-generator/entities-generator.backend.d.ts +0 -8
  327. package/lib/project/compilers/framework-file-generator/entities-generator.backend.js +0 -20
  328. package/lib/project/compilers/framework-file-generator/entities-generator.backend.js.map +0 -1
  329. package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.d.ts +0 -10
  330. package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.js +0 -67
  331. package/lib/project/compilers/framework-file-generator/framework-files-generator.backend.js.map +0 -1
  332. package/lib/project/compilers/framework-file-generator/index.d.ts +0 -1
  333. package/lib/project/compilers/framework-file-generator/index.js +0 -7
  334. package/lib/project/compilers/framework-file-generator/index.js.map +0 -1
  335. package/lib/project/compilers/source-modifier/index.d.ts +0 -1
  336. package/lib/project/compilers/source-modifier/index.js +0 -7
  337. package/lib/project/compilers/source-modifier/index.js.map +0 -1
  338. package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.d.ts +0 -13
  339. package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.js +0 -181
  340. package/lib/project/compilers/source-modifier/source-mod-for-standalone-projects.backend.js.map +0 -1
  341. package/lib/project/compilers/source-modifier/source-modifier.backend.d.ts +0 -14
  342. package/lib/project/compilers/source-modifier/source-modifier.backend.js +0 -219
  343. package/lib/project/compilers/source-modifier/source-modifier.backend.js.map +0 -1
  344. package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.d.ts +0 -2
  345. package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.js +0 -99
  346. package/lib/project/compilers/source-modifier/source-modifier.helpers.backend.js.map +0 -1
  347. package/lib/project/compilers/source-modifier/source-modifier.models.d.ts +0 -35
  348. package/lib/project/compilers/source-modifier/source-modifier.models.js +0 -3
  349. package/lib/project/compilers/source-modifier/source-modifier.models.js.map +0 -1
  350. package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.d.ts +0 -1
  351. package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.js +0 -4
  352. package/lib/project/features/build-process/waiting-for-builds-conditions-helpers.backend.js.map +0 -1
  353. package/lib/project/features/copy-manager/bundle-mjs-fesm-module-spliter.backend.js.map +0 -1
  354. package/lib/project/features/extension-for-project/extension-for-project.d.ts +0 -7
  355. package/lib/project/features/extension-for-project/extension-for-project.js +0 -29
  356. package/lib/project/features/extension-for-project/extension-for-project.js.map +0 -1
  357. package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.d.ts +0 -12
  358. package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.js +0 -42
  359. package/lib/project/features/files-recreation/files-templates/base-firedev-file-template.backend.js.map +0 -1
  360. package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.d.ts +0 -7
  361. package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.js +0 -19
  362. package/lib/project/features/files-recreation/files-templates/file-tmp-for-save.backend.js.map +0 -1
  363. package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.d.ts +0 -9
  364. package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.js +0 -52
  365. package/lib/project/features/files-recreation/files-templates/firedev-logic-ui-module-template.backend.js.map +0 -1
  366. package/lib/project/features/files-recreation/files-templates/index.d.ts +0 -0
  367. package/lib/project/features/files-recreation/files-templates/index.js +0 -6
  368. package/lib/project/features/files-recreation/files-templates/index.js.map +0 -1
  369. package/lib/project/features/global-worker-apps.d.ts +0 -4
  370. package/lib/project/features/global-worker-apps.js +0 -50
  371. package/lib/project/features/global-worker-apps.js.map +0 -1
  372. package/lib/project/features/proxy-router.d.ts +0 -0
  373. package/lib/project/features/proxy-router.js +0 -77
  374. package/lib/project/features/proxy-router.js.map +0 -1
  375. package/lib/project/features/recent-files.backend.d.ts +0 -13
  376. package/lib/project/features/recent-files.backend.js +0 -126
  377. package/lib/project/features/recent-files.backend.js.map +0 -1
  378. package/lib/project/project-specyfic/index.d.ts +0 -7
  379. package/lib/project/project-specyfic/index.js +0 -11
  380. package/lib/project/project-specyfic/index.js.map +0 -1
  381. package/lib/project/project-specyfic/project-container.d.ts +0 -14
  382. package/lib/project/project-specyfic/project-container.js +0 -132
  383. package/lib/project/project-specyfic/project-container.js.map +0 -1
  384. package/lib/project/project-specyfic/project-docker.d.ts +0 -13
  385. package/lib/project/project-specyfic/project-docker.js +0 -136
  386. package/lib/project/project-specyfic/project-docker.js.map +0 -1
  387. package/lib/project/project-specyfic/project-isomorphic-lib.d.ts +0 -38
  388. package/lib/project/project-specyfic/project-isomorphic-lib.js +0 -958
  389. package/lib/project/project-specyfic/project-isomorphic-lib.js.map +0 -1
  390. package/lib/project/project-specyfic/project-navi.d.ts +0 -11
  391. package/lib/project/project-specyfic/project-navi.js +0 -49
  392. package/lib/project/project-specyfic/project-navi.js.map +0 -1
  393. package/lib/project/project-specyfic/project-scenario.d.ts +0 -11
  394. package/lib/project/project-specyfic/project-scenario.js +0 -49
  395. package/lib/project/project-specyfic/project-scenario.js.map +0 -1
  396. package/lib/project/project-specyfic/project-unknow-npm.d.ts +0 -11
  397. package/lib/project/project-specyfic/project-unknow-npm.js +0 -49
  398. package/lib/project/project-specyfic/project-unknow-npm.js.map +0 -1
  399. package/lib/project/project-specyfic/project-vscode-ext.d.ts +0 -13
  400. package/lib/project/project-specyfic/project-vscode-ext.js +0 -91
  401. package/lib/project/project-specyfic/project-vscode-ext.js.map +0 -1
  402. package/lib/project/project-specyfic/select-clients.backend.d.ts +0 -1
  403. package/lib/project/project-specyfic/select-clients.backend.js +0 -4
  404. package/lib/project/project-specyfic/select-clients.backend.js.map +0 -1
  405. package/lib/scripts/BASH-CONFIG.backend.d.ts +0 -5
  406. package/lib/scripts/BASH-CONFIG.backend.js +0 -19
  407. package/lib/scripts/BASH-CONFIG.backend.js.map +0 -1
  408. package/lib/scripts/CLOUD/CLOUD.backend.d.ts +0 -5
  409. package/lib/scripts/CLOUD/CLOUD.backend.js +0 -29
  410. package/lib/scripts/CLOUD/CLOUD.backend.js.map +0 -1
  411. package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.d.ts +0 -9
  412. package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.js +0 -91
  413. package/lib/scripts/COMPILERS-TESTING/COMPILERS.backend.js.map +0 -1
  414. package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.d.ts +0 -0
  415. package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.js +0 -64
  416. package/lib/scripts/COMPILERS-TESTING/INCREMENTAL-TEST.backend.js.map +0 -1
  417. package/lib/scripts/COMPILERS-TESTING/index.d.ts +0 -1
  418. package/lib/scripts/COMPILERS-TESTING/index.js +0 -7
  419. package/lib/scripts/COMPILERS-TESTING/index.js.map +0 -1
  420. package/lib/scripts/DAEMON.backend.d.ts +0 -2
  421. package/lib/scripts/DAEMON.backend.js +0 -5
  422. package/lib/scripts/DAEMON.backend.js.map +0 -1
  423. package/lib/scripts/JAVA.backend.js +0 -48
  424. package/lib/scripts/JAVA.backend.js.map +0 -1
@@ -1,19 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Project = exports.ChildProcess = void 0;
3
+ exports.ProjectVscodeExt = exports.ProjectUnknowNpm = exports.ProjectScenarioReqRes = exports.ProjectNavi = exports.ProjectIsomorphicLib = exports.ProjectContainer = exports.Project = exports.FiredevProjectResolve = void 0;
4
4
  var tslib_1 = require("tslib");
5
+ //#region imports
6
+ var tnp_config_1 = require("tnp-config");
5
7
  var tnp_core_1 = require("tnp-core");
6
- var child_process_1 = require("child_process");
7
- Object.defineProperty(exports, "ChildProcess", { enumerable: true, get: function () { return child_process_1.ChildProcess; } });
8
- //#endregion
9
8
  var tnp_helpers_1 = require("tnp-helpers");
10
- var tnp_helpers_2 = require("tnp-helpers");
11
- var morphi_1 = require("morphi");
9
+ var typescript_class_helpers_1 = require("typescript-class-helpers");
10
+ var tnp_config_2 = require("tnp-config");
12
11
  //#region @backend
12
+ var tnp_core_2 = require("tnp-core");
13
+ var tnp_core_3 = require("tnp-core");
13
14
  var base_project_1 = require("./base-project");
14
15
  var npm_project_1 = require("./npm-project");
15
16
  var feature_project_1 = require("./feature-project");
16
- var tnp_project_1 = require("./tnp-project");
17
+ var firedev_project_1 = require("./firedev-project");
17
18
  var folder_project_1 = require("./folder-project");
18
19
  var lib_project_backend_1 = require("./lib-project.backend");
19
20
  var vscode_project_backend_1 = require("./vscode-project.backend");
@@ -24,18 +25,183 @@ var electron_project_backend_1 = require("./electron-project.backend");
24
25
  var features_1 = require("../../features");
25
26
  var compilers_1 = require("../../compilers");
26
27
  var copy_manager_1 = require("../../features/copy-manager");
27
- var db_process_project_backend_1 = require("./db-process-project.backend");
28
28
  var dependency_project_backend_1 = require("./dependency-project.backend");
29
29
  var compiler_cache_backend_1 = require("../../features/compiler-cache.backend");
30
30
  var smart_node_modules_backend_1 = require("../../features/smart-node-modules.backend");
31
- var recent_files_backend_1 = require("../../features/recent-files.backend");
32
- var cloud_project_1 = require("./cloud-project");
33
- var global_worker_apps_1 = require("../../features/global-worker-apps");
34
31
  var inside_structures_1 = require("../../features/inside-structures/inside-structures");
35
32
  var singular_build_backend_1 = require("../../features/singular-build.backend");
36
- var typescript_class_helpers_1 = require("typescript-class-helpers");
37
33
  var constants_1 = require("../../../constants");
34
+ var isomorphic_region_loader_1 = require("isomorphic-region-loader");
35
+ var incremental_build_process_backend_1 = require("../../../project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend");
36
+ var packages_recognition_1 = require("../../../project/features/package-recognition/packages-recognition");
37
+ var tnp_cli_1 = require("tnp-cli");
38
+ var tnp_core_4 = require("tnp-core");
38
39
  //#endregion
40
+ //#endregion
41
+ //#region FIREDEF PROJECT RESOLVE
42
+ var FiredevProjectResolve = /** @class */ (function (_super) {
43
+ tslib_1.__extends(FiredevProjectResolve, _super);
44
+ function FiredevProjectResolve() {
45
+ return _super !== null && _super.apply(this, arguments) || this;
46
+ }
47
+ //#region methods / type from
48
+ FiredevProjectResolve.prototype.typeFrom = function (location) {
49
+ //#region @backendFunc
50
+ var PackageJSON = typescript_class_helpers_1.CLASS.getBy('PackageJSON');
51
+ location = (0, tnp_core_1.crossPlatformPath)(location);
52
+ if (!tnp_core_2.fse.existsSync(location)) {
53
+ return void 0;
54
+ }
55
+ var packageJson = PackageJSON && PackageJSON.fromLocation(location);
56
+ if (!tnp_core_1._.isObject(packageJson)) {
57
+ return void 0;
58
+ }
59
+ var type = packageJson.type;
60
+ return type;
61
+ //#endregion
62
+ };
63
+ //#endregion
64
+ //#region methods / from
65
+ /**
66
+ * TODO use base resolve
67
+ */
68
+ FiredevProjectResolve.prototype.From = function (locationOfProj, options) {
69
+ //#region @backendFunc
70
+ if (Array.isArray(locationOfProj)) {
71
+ locationOfProj = locationOfProj.join('/');
72
+ }
73
+ var location = locationOfProj.replace(/\/\//g, '/');
74
+ if (!tnp_core_1._.isString(location)) {
75
+ tnp_helpers_1.Helpers.warn("[project.from] location is not a string");
76
+ return;
77
+ }
78
+ if (tnp_core_3.path.basename(location) === 'dist') {
79
+ location = tnp_core_3.path.dirname(location);
80
+ }
81
+ location = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.resolve(location));
82
+ if (this.emptyLocations.includes(location)) {
83
+ if (location.search("/".concat(tnp_config_1.config.folder.dist)) === -1) {
84
+ tnp_helpers_1.Helpers.log("[project.from] empty location ".concat(location), 2);
85
+ return;
86
+ }
87
+ }
88
+ var alreadyExist = this.projects.find(function (l) { return l.location.trim() === location.trim(); });
89
+ if (alreadyExist) {
90
+ return alreadyExist;
91
+ }
92
+ if (!tnp_core_2.fse.existsSync(location)) {
93
+ tnp_helpers_1.Helpers.log("[firedev-helpers][project.from] Cannot find project in location: ".concat(location), 1);
94
+ this.emptyLocations.push(location);
95
+ return;
96
+ }
97
+ var type = this.typeFrom(location);
98
+ var resultProject;
99
+ if (type === 'isomorphic-lib') {
100
+ resultProject = new ProjectIsomorphicLib(location);
101
+ }
102
+ if (type === 'vscode-ext') {
103
+ resultProject = new ProjectVscodeExt(location);
104
+ }
105
+ if (type === 'container') {
106
+ resultProject = new ProjectContainer(location);
107
+ }
108
+ if (type === 'unknow-npm-project') {
109
+ // resultProject = new (getClassFunction('ProjectUnknowNpm'))(location);
110
+ // const ProjectUnknowNpm = require('tnp/lib/project/abstract/project/project').ProjectUnknowNpm;
111
+ resultProject = new ProjectUnknowNpm(location);
112
+ }
113
+ return resultProject;
114
+ //#endregion
115
+ };
116
+ //#endregion
117
+ //#region methods / nearest to
118
+ FiredevProjectResolve.prototype.nearestTo = function (absoluteLocation, options) {
119
+ //#region @backendFunc
120
+ options = options || {};
121
+ var type = options.type, findGitRoot = options.findGitRoot, onlyOutSideNodeModules = options.onlyOutSideNodeModules;
122
+ if (tnp_core_1._.isString(type) && !tnp_config_2.LibTypeArr.includes(type)) {
123
+ tnp_helpers_1.Helpers.error("[firedev-helpers][project.nearestTo] wrong type: ".concat(type), false, true);
124
+ }
125
+ if (tnp_core_2.fse.existsSync(absoluteLocation)) {
126
+ absoluteLocation = tnp_core_2.fse.realpathSync(absoluteLocation);
127
+ }
128
+ if (tnp_core_2.fse.existsSync(absoluteLocation) && !tnp_core_2.fse.lstatSync(absoluteLocation).isDirectory()) {
129
+ absoluteLocation = tnp_core_3.path.dirname(absoluteLocation);
130
+ }
131
+ var project;
132
+ var previousLocation;
133
+ while (true) {
134
+ if (onlyOutSideNodeModules && (tnp_core_3.path.basename(tnp_core_3.path.dirname(absoluteLocation)) === 'node_modules')) {
135
+ absoluteLocation = tnp_core_3.path.dirname(tnp_core_3.path.dirname(absoluteLocation));
136
+ }
137
+ project = this.From(absoluteLocation);
138
+ if (tnp_core_1._.isString(type)) {
139
+ if (project === null || project === void 0 ? void 0 : project.typeIs(type)) {
140
+ if (findGitRoot) {
141
+ if (project.git.isGitRoot) {
142
+ break;
143
+ }
144
+ }
145
+ else {
146
+ break;
147
+ }
148
+ }
149
+ }
150
+ else {
151
+ if (project) {
152
+ if (findGitRoot) {
153
+ if (project.git.isGitRoot) {
154
+ break;
155
+ }
156
+ }
157
+ else {
158
+ break;
159
+ }
160
+ }
161
+ }
162
+ previousLocation = absoluteLocation;
163
+ var newAbsLocation = tnp_core_3.path.join(absoluteLocation, '..');
164
+ if (!tnp_core_3.path.isAbsolute(newAbsLocation)) {
165
+ return;
166
+ }
167
+ absoluteLocation = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.resolve(newAbsLocation));
168
+ if (!tnp_core_2.fse.existsSync(absoluteLocation) && absoluteLocation.split('/').length < 2) {
169
+ return;
170
+ }
171
+ if (previousLocation === absoluteLocation) {
172
+ return;
173
+ }
174
+ }
175
+ return project;
176
+ //#endregion
177
+ };
178
+ //#endregion
179
+ //#region methods / get class function
180
+ /**
181
+ * @deprecated
182
+ */
183
+ FiredevProjectResolve.prototype.getClassFunction = function (className) {
184
+ var classFN = typescript_class_helpers_1.CLASS.getBy(className);
185
+ if (!classFN) {
186
+ tnp_helpers_1.Helpers.error("[firedev-helpers][Project.From] cannot find class function by name ".concat(className));
187
+ }
188
+ return classFN;
189
+ };
190
+ //#endregion
191
+ //#region methods / check if type is not correct
192
+ /**
193
+ * @deprecated
194
+ */
195
+ FiredevProjectResolve.prototype.checkIfTypeIsNotCorrect = function (type, location) {
196
+ if (tnp_core_1._.isString(type) && !tnp_config_2.LibTypeArr.includes(type)) {
197
+ tnp_helpers_1.Helpers.error("Incorrect type: \"".concat(type, "\"\n\n Please use one of this: ").concat(tnp_config_2.LibTypeArr.join(','), "\n\n in\n package.json > ").concat(tnp_config_1.config.frameworkName, ".type\n\n location: ").concat(location, "\n\n "), false, true);
198
+ }
199
+ };
200
+ return FiredevProjectResolve;
201
+ }(tnp_helpers_1.BaseProjectResolver));
202
+ exports.FiredevProjectResolve = FiredevProjectResolve;
203
+ //#endregion
204
+ //#region PROJECT
39
205
  var Project = exports.Project = /** @class */ (function (_super) {
40
206
  tslib_1.__extends(Project, _super);
41
207
  //#region @backend
@@ -43,8 +209,7 @@ var Project = exports.Project = /** @class */ (function (_super) {
43
209
  * DO NOT USE function isWorkspace, isWOrkspace child.. it is to expensive
44
210
  */
45
211
  function Project(location) {
46
- var _this = _super.call(this) || this;
47
- _this.location = (0, tnp_core_1.crossPlatformPath)(tnp_core_1._.isString(location) ? location : '');
212
+ var _this = _super.call(this, (0, tnp_core_1.crossPlatformPath)(tnp_core_1._.isString(location) ? location : '')) || this;
48
213
  if (!global.codePurposeBrowser) { // TODO when on weird on node 12
49
214
  _this.defineProperty('compilerCache', compiler_cache_backend_1.CompilerCache);
50
215
  _this.cache = {};
@@ -56,8 +221,6 @@ var Project = exports.Project = /** @class */ (function (_super) {
56
221
  _this.defineProperty('npmPackages', features_1.NpmPackages);
57
222
  _this.defineProperty('recreate', features_1.FilesRecreator);
58
223
  _this.defineProperty('filesFactory', features_1.FilesFactory);
59
- _this.defineProperty('sourceModifier', compilers_1.SourceModifier);
60
- _this.defineProperty('frameworkFileGenerator', compilers_1.FrameworkFilesGenerator);
61
224
  _this.defineProperty('filesTemplatesBuilder', features_1.FilesTemplatesBuilder);
62
225
  // console.log({
63
226
  // MochaTestRunner, JestTestRunner, CypressTestRunner,
@@ -65,7 +228,7 @@ var Project = exports.Project = /** @class */ (function (_super) {
65
228
  _this.defineProperty('tests', features_1.MochaTestRunner);
66
229
  _this.defineProperty('testsJest', features_1.JestTestRunner);
67
230
  _this.defineProperty('testsCypress', features_1.CypressTestRunner);
68
- Project_1.projects.push(_this);
231
+ Project.ins.add(_this);
69
232
  _this.defineProperty('env', features_1.EnvironmentConfig);
70
233
  _this.defineProperty('copyManager', copy_manager_1.CopyManager);
71
234
  _this.defineProperty('filesStructure', features_1.FilesStructure);
@@ -73,8 +236,6 @@ var Project = exports.Project = /** @class */ (function (_super) {
73
236
  _this.defineProperty('targetProjects', features_1.TargetProject);
74
237
  _this.defineProperty('gitActions', features_1.GitActions);
75
238
  _this.defineProperty('smartNodeModules', smart_node_modules_backend_1.SmartNodeModules);
76
- _this.defineProperty('recent', recent_files_backend_1.RecentFilesForContainer);
77
- _this.defineProperty('workerApps', global_worker_apps_1.GlobalWorkerApps);
78
239
  _this.defineProperty('insideStructure', inside_structures_1.InsideStructures);
79
240
  _this.defineProperty('singluarBuild', singular_build_backend_1.SingularBuild);
80
241
  _this.defineProperty('webpackBackendBuild', features_1.WebpackBackendCompilation);
@@ -87,21 +248,165 @@ var Project = exports.Project = /** @class */ (function (_super) {
87
248
  }
88
249
  return _this;
89
250
  }
90
- Project_1 = Project;
251
+ Object.defineProperty(Project, "Tnp", {
252
+ //#endregion
253
+ //#region static / tnp proj
254
+ /**
255
+ * @deprecated
256
+ */
257
+ get: function () {
258
+ //#region @backendFunc
259
+ var tnpPorject = this.ins.From(tnp_config_1.config.pathes.tnp_folder_location);
260
+ tnp_helpers_1.Helpers.log("Using ".concat(tnp_config_1.config.frameworkName, " path: ").concat(tnp_config_1.config.pathes.tnp_folder_location), 1);
261
+ if (!tnpPorject && !global.globalSystemToolMode) {
262
+ tnp_helpers_1.Helpers.error("Not able to find tnp project in \"".concat(tnp_config_1.config.pathes.tnp_folder_location, "\"."));
263
+ }
264
+ return tnpPorject;
265
+ //#endregion
266
+ },
267
+ enumerable: false,
268
+ configurable: true
269
+ });
270
+ //#endregion
271
+ //#region static / from
272
+ Project.From = function (locationOfProject) {
273
+ return this.ins.From(locationOfProject);
274
+ };
275
+ //#endregion
276
+ //#region static / by
277
+ Project.by = function (libraryType, version
278
+ //#endregion
279
+ ) {
280
+ //#region @backendFunc
281
+ if (version === void 0) { version = tnp_config_1.config.defaultFrameworkVersion; }
282
+ if (libraryType === 'container') {
283
+ var pathToContainer = tnp_config_1.config.pathes.projectsExamples(version).container;
284
+ var containerProject = Project.From(pathToContainer);
285
+ return containerProject;
286
+ }
287
+ if (libraryType === 'single-file-project') {
288
+ var singleFileProject = Project.From(tnp_config_1.config.pathes.projectsExamples(version).singlefileproject);
289
+ return singleFileProject;
290
+ }
291
+ var projectPath = tnp_config_1.config.pathes.projectsExamples(version).projectByType(libraryType);
292
+ if (!tnp_core_2.fse.existsSync(projectPath)) {
293
+ tnp_helpers_1.Helpers.error("\n ".concat(projectPath, "\n ").concat(projectPath.replace(/\//g, '\\\\'), "\n ").concat((0, tnp_core_1.crossPlatformPath)(projectPath), "\n [firedev-helpers] Bad library type \"").concat(libraryType, "\" for this framework version \"").concat(version, "\"\n\n "), false, false);
294
+ }
295
+ return this.ins.From(projectPath);
296
+ //#endregion
297
+ };
298
+ Object.defineProperty(Project, "Current", {
299
+ //#endregion
300
+ //#region static / curremt
301
+ get: function () {
302
+ return this.ins.Current;
303
+ },
304
+ enumerable: false,
305
+ configurable: true
306
+ });
307
+ //#endregion
308
+ //#region static / resovle child project
309
+ Project.resolveChildProject = function (args) {
310
+ return this.ins.resolveChildProject(args);
311
+ };
312
+ //#endregion
313
+ //#region static / angular major version for current cli
314
+ Project.angularMajorVersionForCurrentCli = function () {
315
+ //#region @backendFunc
316
+ var tnp = (Project.Tnp);
317
+ var angularFrameworkVersion = Number(tnp_core_1._.first(tnp.version.replace('v', '').split('.')));
318
+ return angularFrameworkVersion;
319
+ //#endregion
320
+ };
321
+ //#endregion
322
+ //#region static / morphi tag to checkout for current cli version
323
+ Project.morphiTagToCheckoutForCurrentCliVersion = function (cwd) {
324
+ //#region @backendFunc
325
+ var ngVer = Project.angularMajorVersionForCurrentCli();
326
+ var lastTagForVer = Project.From(cwd).git.lastTagNameForMajorVersion(ngVer);
327
+ return lastTagForVer;
328
+ //#endregion
329
+ };
330
+ Object.defineProperty(Project.prototype, "ins", {
331
+ //#endregion
332
+ //#endregion
333
+ //#region ins
334
+ // @ts-ignore
335
+ get: function () {
336
+ return Project.ins;
337
+ },
338
+ enumerable: false,
339
+ configurable: true
340
+ });
341
+ ;
342
+ Object.defineProperty(Project.prototype, "children", {
343
+ get: function () {
344
+ if (tnp_helpers_1.Helpers.isBrowser) {
345
+ return this.browser.children;
346
+ }
347
+ //#region @backend
348
+ if (this.pathExists('taon.json')) {
349
+ var taonChildren = tnp_helpers_1.Helpers.foldersFrom(this.location)
350
+ .filter(function (f) { return !f.startsWith('.') && ![
351
+ tnp_config_1.config.folder.node_modules,
352
+ ].includes(tnp_core_3.path.basename(f)); })
353
+ .map(function (f) { return Project.From(f); })
354
+ .filter(function (f) { return !!f; });
355
+ // console.log({
356
+ // taonChildren: taonChildren.map(c => c.location)
357
+ // })
358
+ return taonChildren;
359
+ }
360
+ if (this.isTnp && !global.globalSystemToolMode) {
361
+ return [];
362
+ }
363
+ if (this.typeIs('unknow')) {
364
+ return [];
365
+ }
366
+ var all = this.getAllChildren();
367
+ // console.log({
368
+ // all: all.map(c => c.location)
369
+ // })
370
+ return all;
371
+ //#endregion
372
+ },
373
+ enumerable: false,
374
+ configurable: true
375
+ });
376
+ Project.prototype.setType = function (type) {
377
+ // @ts-ignore
378
+ this.type = type;
379
+ };
380
+ Project.prototype.typeIs = function () {
381
+ var types = [];
382
+ for (var _i = 0; _i < arguments.length; _i++) {
383
+ types[_i] = arguments[_i];
384
+ }
385
+ return this.type && types.includes(this.type);
386
+ };
387
+ Project.prototype.typeIsNot = function () {
388
+ var types = [];
389
+ for (var _i = 0; _i < arguments.length; _i++) {
390
+ types[_i] = arguments[_i];
391
+ }
392
+ return !this.typeIs.apply(this, tslib_1.__spreadArray([], tslib_1.__read(types), false));
393
+ };
91
394
  Project.prototype.setProjectInfoPort = function (v) {
92
395
  var e_1, _a;
396
+ var _this = this;
93
397
  //#region @backend
94
398
  this._projectInfoPort = v;
399
+ var children = this.children.filter(function (f) { return f.location !== _this.location; });
95
400
  try {
96
- for (var _b = tslib_1.__values(this.children), _c = _b.next(); !_c.done; _c = _b.next()) {
97
- var child = _c.value;
98
- child.setProjectInfoPort(v);
401
+ for (var children_1 = tslib_1.__values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
402
+ var child = children_1_1.value;
403
+ child.setProjectInfoPort(v); // @LAST why error
99
404
  }
100
405
  }
101
406
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
102
407
  finally {
103
408
  try {
104
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
409
+ if (children_1_1 && !children_1_1.done && (_a = children_1.return)) _a.call(children_1);
105
410
  }
106
411
  finally { if (e_1) throw e_1.error; }
107
412
  }
@@ -148,133 +453,1294 @@ var Project = exports.Project = /** @class */ (function (_super) {
148
453
  enumerable: false,
149
454
  configurable: true
150
455
  });
151
- //#region @backend
152
- Project.angularMajorVersionForCurrentCli = function () {
153
- var tnp = Project_1.Tnp;
154
- var angularFrameworkVersion = Number(tnp_core_1._.first(tnp.version.replace('v', '').split('.')));
155
- return angularFrameworkVersion;
156
- };
157
- //#endregion
158
- //#region @backend
159
- Project.morphiTagToCheckoutForCurrentCliVersion = function (cwd) {
160
- var ngVer = Project_1.angularMajorVersionForCurrentCli();
161
- var lastTagForVer = Project_1.From(cwd).git.lastTagNameForMajorVersion(ngVer);
162
- return lastTagForVer;
163
- };
164
456
  Object.defineProperty(Project.prototype, "info", {
165
- //#endregion
166
457
  get: function (
167
458
  //#endregion
168
459
  ) {
169
- if (morphi_1.Morphi.IsBrowser) {
460
+ if (tnp_helpers_1.Helpers.isBrowser) {
170
461
  return this.browser.info;
171
462
  }
172
463
  //#region @backend
173
- return "(".concat(this._type, ") ").concat(this.genericName, " ");
464
+ return "(".concat(this.type, ") ").concat(this.genericName, " ");
174
465
  //#endregion
175
466
  },
176
467
  enumerable: false,
177
468
  configurable: true
178
469
  });
179
- Object.defineProperty(Project.prototype, "TnpProject", {
180
- get: function () {
181
- return Project_1.Tnp;
182
- },
183
- enumerable: false,
184
- configurable: true
185
- });
186
- Object.defineProperty(Project.prototype, "isBundleMode", {
470
+ Object.defineProperty(Project.prototype, "FiredevProject", {
187
471
  get: function () {
188
- return Project_1.isBundleMode;
472
+ return Project.Tnp;
189
473
  },
190
474
  enumerable: false,
191
475
  configurable: true
192
476
  });
193
- Project.prototype.removeItself = function () {
194
- //#region @backend
195
- var location = this.location;
196
- Project_1.projects = Project_1.projects.filter(function (p) { return p.location !== location; });
197
- tnp_helpers_2.Helpers.tryRemoveDir(location);
198
- //#endregion
199
- };
200
- var Project_1;
201
- Project = Project_1 = tslib_1.__decorate([
202
- morphi_1.Morphi.Entity({
203
- className: 'Project',
204
- classFamily: 'Project',
205
- classNameInBrowser: 'PROJECT',
206
- uniqueKeyProp: 'location',
207
- mapping: {
208
- packageJson: 'PackageJSON'
209
- },
210
- additionalMapping: {
211
- 'browser.children': ['Project'],
212
- 'browser.children.browser.childeren': ['Project'],
213
- 'browser.children.browser.childeren.browser.childeren': ['Project'],
214
- 'browser.parent': 'Project',
215
- 'browser.parent.browser.parent': 'Project',
216
- 'browser.baseline': 'Project',
217
- 'browser.baseline.browser.baseline': 'Project',
218
- 'browser.preview': 'Project',
219
- 'browser.preview.browser.preview': 'Project',
220
- },
221
- //#region @backend
222
- createTable: false,
223
- browserTransformFn: function (entity, mdc) {
224
- // log('I AM TRANSFORMING ENTITY!!!', mdc)
225
- var exclude = [];
226
- if (!entity.browser) {
227
- entity.browser = {};
228
- }
229
- if (!!mdc && mdc.exclude.length > 0) {
230
- exclude = mdc.exclude;
231
- }
232
- // if(exclude.length > 0) {
233
- // log('exclude in Project', exclude)
234
- // }
235
- if (!(exclude.length > 0 && exclude.includes('children'))) {
236
- // log('SET CHILDREND')
237
- entity.browser.children = entity.children;
238
- }
239
- else {
240
- entity.browser.children = void 0;
241
- }
242
- if (!(exclude.length > 0 && exclude.includes('parent'))) {
243
- entity.browser.parent = entity.parent;
244
- }
245
- else {
246
- entity.browser.parent = void 0;
247
- }
248
- entity.browser.genericName = entity.genericName;
249
- entity.browser.name = entity.name;
250
- entity.browser.isStandaloneProject = entity.isStandaloneProject;
251
- entity.browser.isContainer = entity.isContainer;
252
- }
253
- //#endregion
254
- }) // @ts-ignore
255
- ,
256
- tslib_1.__metadata("design:paramtypes", [String])
257
- ], Project);
477
+ //#region static
478
+ //#region static / instace of resolve
479
+ Project.ins = new FiredevProjectResolve(Project);
258
480
  return Project;
259
- }(tnp_helpers_1.Project));
481
+ }(tnp_helpers_1.BaseProject));
260
482
  //#endregion
261
483
  //#region @backend
262
- tnp_helpers_2.Helpers.applyMixins(Project, [
263
- base_project_1.BaseProject,
484
+ tnp_helpers_1.Helpers.applyMixins(Project, [
485
+ base_project_1.BaseFiredevProject,
264
486
  npm_project_1.NpmProject,
265
487
  feature_project_1.FeatureProject,
266
- tnp_project_1.TnpProject,
488
+ firedev_project_1.FiredevProject,
267
489
  folder_project_1.FolderProject,
268
- cloud_project_1.CloudProject,
269
490
  lib_project_backend_1.LibProject,
270
491
  vscode_project_backend_1.VscodeProject,
271
492
  recreatable_project_backend_1.RecreatableProject,
272
493
  entity_projects_backend_1.EntityProject,
273
494
  buildable_project_backend_1.BuildableProject,
274
495
  electron_project_backend_1.ElectronProject,
275
- db_process_project_backend_1.DbProcessProject,
276
496
  dependency_project_backend_1.DependencyProject,
277
497
  compiler_cache_backend_1.CompilerCache
278
498
  ]);
279
499
  //#endregion
500
+ //#endregion
501
+ //#endregion
502
+ //#region PROJECT CONTAINER
503
+ var ProjectContainer = exports.ProjectContainer = /** @class */ (function (_super) {
504
+ tslib_1.__extends(ProjectContainer, _super);
505
+ function ProjectContainer() {
506
+ return _super !== null && _super.apply(this, arguments) || this;
507
+ }
508
+ ProjectContainer.prototype.initProcedure = function () {
509
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
510
+ return tslib_1.__generator(this, function (_a) {
511
+ //#region @backendFunc
512
+ this.addGitReposAsLinkedProjects();
513
+ return [2 /*return*/];
514
+ });
515
+ });
516
+ };
517
+ ProjectContainer.prototype.addGitReposAsLinkedProjects = function () {
518
+ //#region @backendFunc
519
+ var repoChilds = this.getFoldersForPossibleProjectChildren()
520
+ .sort()
521
+ .map(function (c) {
522
+ var proj = Project.From(c);
523
+ if (!proj) {
524
+ tnp_helpers_1.Helpers.log("No project from ".concat(c));
525
+ }
526
+ return proj;
527
+ })
528
+ .filter(function (f) { return !!f; })
529
+ .filter(function (c) { return c.git.isGitRoot; })
530
+ .map(function (c) { return c.name; });
531
+ // TODO Too much things to check here
532
+ // let chagned = false;
533
+ // repoChilds.forEach(name => {
534
+ // if (_.isUndefined(this.packageJson.linkedProjects.find(p => p === name))
535
+ // && Project.From(path.join(this.location, name))?.git.isGitRepo) {
536
+ // chagned = true;
537
+ // this.packageJson.linkedProjects.push(name);
538
+ // }
539
+ // });
540
+ // if (chagned) {
541
+ // this.packageJson.writeToDisc();
542
+ // }
543
+ //#endregion
544
+ };
545
+ ProjectContainer.prototype.buildLib = function () {
546
+ return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
547
+ return [2 /*return*/];
548
+ }); });
549
+ };
550
+ ProjectContainer.prototype.filesTemplates = function () {
551
+ //#region @backendFunc
552
+ var templates = _super.prototype.filesTemplates.call(this);
553
+ if (this.isSmartContainer) {
554
+ templates = tslib_1.__spreadArray([
555
+ 'tsconfig.json.filetemplate'
556
+ ], tslib_1.__read(templates), false);
557
+ }
558
+ return templates;
559
+ //#endregion
560
+ };
561
+ ProjectContainer.prototype.startOnCommand = function () {
562
+ //#region @backendFunc
563
+ return 'echo "no container support jet"';
564
+ //#endregion
565
+ };
566
+ ProjectContainer.prototype.projectSpecyficFiles = function () {
567
+ //#region @backendFunc
568
+ if (this.isSmartContainer) {
569
+ return tslib_1.__spreadArray([], tslib_1.__read(this.filesTemplates()), false);
570
+ }
571
+ return [];
572
+ //#endregion
573
+ };
574
+ ProjectContainer.prototype.proxyProjFor = function (client, outFolder) {
575
+ //#region @backendFunc
576
+ return Project.From(singular_build_backend_1.SingularBuild.getProxyProj(this, client, outFolder));
577
+ //#endregion
578
+ };
579
+ ProjectContainer.prototype.buildSteps = function (buildOptions, libBuildDone) {
580
+ var _a, _b;
581
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
582
+ var outDir, args, client, proxyForTarget, proxy, tmp_1;
583
+ return tslib_1.__generator(this, function (_c) {
584
+ switch (_c.label) {
585
+ case 0:
586
+ //#region @backend
587
+ if (!tnp_core_2.fse.existsSync(this.location)) {
588
+ return [2 /*return*/];
589
+ }
590
+ outDir = buildOptions.outDir, args = buildOptions.args;
591
+ args = tnp_helpers_1.Helpers.cliTool.removeArgFromString(args, constants_1.argsToClear);
592
+ client = tnp_helpers_1.Helpers.removeSlashAtEnd(tnp_core_1._.first((args || '').split(' ')));
593
+ if (!client) {
594
+ client = (_a = this.smartContainerBuildTarget) === null || _a === void 0 ? void 0 : _a.name;
595
+ }
596
+ proxyForTarget = this.proxyProjFor((_b = this.smartContainerBuildTarget) === null || _b === void 0 ? void 0 : _b.name, outDir);
597
+ if (!proxyForTarget) {
598
+ tnp_helpers_1.Helpers.error("Please start lib build for smart container:\n ".concat(tnp_config_1.config.frameworkName, " build:dist:watch\n or\n ").concat(tnp_config_1.config.frameworkName, " dev\n or\n ").concat(tnp_config_1.config.frameworkName, " build:watch # for global build\n\n "), false, true);
599
+ }
600
+ proxy = this.proxyProjFor(client, outDir);
601
+ if (!proxy && this.isSmartContainer) {
602
+ tmp_1 = function (c) { return "".concat(tnp_config_1.config.frameworkName, " build:app:watch ").concat(c); };
603
+ tnp_helpers_1.Helpers.error("\n\n Please provide target for angular build:\n\n".concat(this.children.filter(function (c) { return c.typeIs('isomorphic-lib'); }).map(function (c) {
604
+ return tmp_1(c.name);
605
+ }).join('\n'), "\n\n or please update:\n ...\n linkedProjects: [ ... ]\n ...\n in you configuraiton and run: firedev init\n\n\n "), false, true);
606
+ }
607
+ return [4 /*yield*/, proxy.buildSteps(buildOptions, libBuildDone)];
608
+ case 1:
609
+ _c.sent();
610
+ return [2 /*return*/];
611
+ }
612
+ });
613
+ });
614
+ };
615
+ ProjectContainer = tslib_1.__decorate([
616
+ typescript_class_helpers_1.CLASS.NAME('ProjectContainer')
617
+ ], ProjectContainer);
618
+ return ProjectContainer;
619
+ }(Project
620
+ //#endregion
621
+ ));
622
+ //#endregion
623
+ //#region PROJECT ISOMORPHIC LIB
624
+ //#region consts
625
+ // 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';
626
+ //#endregion
627
+ var ProjectIsomorphicLib = exports.ProjectIsomorphicLib = /** @class */ (function (_super) {
628
+ tslib_1.__extends(ProjectIsomorphicLib, _super);
629
+ function ProjectIsomorphicLib() {
630
+ //#region static
631
+ var _this = _super !== null && _super.apply(this, arguments) || this;
632
+ //#endregion
633
+ //#endregion
634
+ //#endregion
635
+ //#region fields / getters
636
+ _this.npmRunNg = "npm-run ng"; // when there is not globl "ng" command -> npm-run ng.js works
637
+ return _this;
638
+ //#endregion
639
+ //#endregion
640
+ }
641
+ ProjectIsomorphicLib_1 = ProjectIsomorphicLib;
642
+ //#region static / get angular project proxy path
643
+ //#region @backend
644
+ ProjectIsomorphicLib.angularProjProxyPath = function (project, outFolder, client, websql, type) {
645
+ if (type === void 0) { type = 'app'; }
646
+ var pref = ((type === 'app') ? 'apps' : 'libs');
647
+ var tmpProjectsStandalone = "tmp-".concat(pref, "-for-{{{outFolder}}}").concat(websql ? '-websql' : '', "/").concat(project.name);
648
+ var tmpProjects = "tmp-".concat(pref, "-for-{{{outFolder}}}").concat(websql ? '-websql' : '', "/").concat(project.name, "--for--{{{client}}}");
649
+ if (project.isStandaloneProject) {
650
+ if (outFolder) {
651
+ return tmpProjectsStandalone.replace('{{{outFolder}}}', outFolder);
652
+ }
653
+ return tmpProjectsStandalone;
654
+ }
655
+ if (outFolder && client) {
656
+ return tmpProjects.replace('{{{outFolder}}}', outFolder).replace('{{{client}}}', client);
657
+ }
658
+ return tmpProjects;
659
+ };
660
+ Object.defineProperty(ProjectIsomorphicLib.prototype, "ignoreInV3", {
661
+ get: function () {
662
+ var files = [
663
+ 'angular.json.filetemplate',
664
+ 'ngsw-config.json.filetemplate',
665
+ ];
666
+ return tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(files), false), tslib_1.__read(files.map(function (f) { return f.replace('.filetemplate', ''); })), false);
667
+ },
668
+ enumerable: false,
669
+ configurable: true
670
+ });
671
+ Object.defineProperty(ProjectIsomorphicLib.prototype, "forAppRelaseBuild", {
672
+ get: function () {
673
+ var _a, _b, _c;
674
+ //#region @backendFunc
675
+ 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);
676
+ //#endregion
677
+ },
678
+ enumerable: false,
679
+ configurable: true
680
+ });
681
+ ;
682
+ //#endregion
683
+ //#region methods
684
+ //#region methods / source files to ignore
685
+ ProjectIsomorphicLib.prototype.sourceFilesToIgnore = function () {
686
+ //#region @backendFunc
687
+ var toIgnore = [
688
+ "src/".concat(tnp_config_1.config.file.entities_ts),
689
+ "src/".concat(tnp_config_1.config.file.controllers_ts),
690
+ ];
691
+ return toIgnore;
692
+ //#endregion
693
+ };
694
+ //#endregion
695
+ //#region methods / project specyfic files
696
+ ProjectIsomorphicLib.prototype.projectSpecyficFiles = function () {
697
+ var _this = this;
698
+ //#region @backendFunc
699
+ var files = _super.prototype.projectSpecyficFiles.call(this)
700
+ .concat(tslib_1.__spreadArray([
701
+ 'tsconfig.browser.json',
702
+ 'webpack.config.js',
703
+ 'webpack.backend-dist-build.js',
704
+ 'run.js',
705
+ 'run-org.js'
706
+ ], tslib_1.__read(this.filesTemplates()), false)).concat(!this.isStandaloneProject ? [
707
+ 'src/typings.d.ts',
708
+ ] : []);
709
+ if (this.frameworkVersionAtLeast('v2')) {
710
+ files = files.filter(function (f) { return f !== 'tsconfig.browser.json'; });
711
+ }
712
+ if (this.frameworkVersionAtLeast('v3')) {
713
+ files = files.filter(function (f) { return !_this.ignoreInV3.includes(f); });
714
+ }
715
+ return files;
716
+ //#endregion
717
+ };
718
+ //#endregion
719
+ //#region methods / files templates
720
+ ProjectIsomorphicLib.prototype.filesTemplates = function () {
721
+ var _this = this;
722
+ //#region @backendFunc
723
+ var files = [
724
+ 'tsconfig.json.filetemplate',
725
+ 'tsconfig.backend.dist.json.filetemplate',
726
+ ];
727
+ if (this.frameworkVersionAtLeast('v2')) {
728
+ files = tslib_1.__spreadArray(tslib_1.__spreadArray([
729
+ 'tsconfig.isomorphic.json.filetemplate',
730
+ 'tsconfig.isomorphic-flat-dist.json.filetemplate',
731
+ 'tsconfig.browser.json.filetemplate'
732
+ ], tslib_1.__read(this.vscodeFileTemplates), false), tslib_1.__read(files), false);
733
+ }
734
+ if (this.frameworkVersionAtLeast('v3')) {
735
+ files = files.filter(function (f) { return !_this.ignoreInV3.includes(f); });
736
+ }
737
+ return files;
738
+ //#endregion
739
+ };
740
+ //#endregion
741
+ //#region methods / project linked files
742
+ ProjectIsomorphicLib.prototype.projectLinkedFiles = function () {
743
+ //#region @backendFunc
744
+ var files = _super.prototype.projectLinkedFiles.call(this);
745
+ if (this.frameworkVersionAtLeast('v2')) {
746
+ files.push({
747
+ sourceProject: Project.by(this.type, 'v1'),
748
+ relativePath: 'webpack.backend-dist-build.js'
749
+ });
750
+ }
751
+ return files;
752
+ //#endregion
753
+ };
754
+ //#endregion
755
+ //#region methods / project specyfic ignored files
756
+ ProjectIsomorphicLib.prototype.projectSpecyficIgnoredFiles = function () {
757
+ //#region @backendFunc
758
+ return [
759
+ // 'src/entities.ts',
760
+ // 'src/controllers.ts'
761
+ ].concat(this.projectSpecyficFiles());
762
+ //#endregion
763
+ };
764
+ //#endregion
765
+ //#region methods / build steps
766
+ ProjectIsomorphicLib.prototype.buildSteps = function (buildOptions, libBuildDone) {
767
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
768
+ var prod, watch, outDir, onlyWatchNoBuild, appBuild, args, baseHref, websql;
769
+ return tslib_1.__generator(this, function (_a) {
770
+ switch (_a.label) {
771
+ case 0:
772
+ //#region @backendFunc
773
+ this.buildOptions = buildOptions;
774
+ prod = buildOptions.prod, watch = buildOptions.watch, outDir = buildOptions.outDir, onlyWatchNoBuild = buildOptions.onlyWatchNoBuild, appBuild = buildOptions.appBuild, args = buildOptions.args, baseHref = buildOptions.baseHref, websql = buildOptions.websql;
775
+ if (!!onlyWatchNoBuild) return [3 /*break*/, 4];
776
+ if (!appBuild) return [3 /*break*/, 2];
777
+ return [4 /*yield*/, this.buildApp(outDir, watch, buildOptions.args, baseHref, prod, websql)];
778
+ case 1:
779
+ _a.sent();
780
+ return [3 /*break*/, 4];
781
+ case 2: return [4 /*yield*/, this.buildLib(libBuildDone)];
782
+ case 3:
783
+ _a.sent();
784
+ _a.label = 4;
785
+ case 4: return [2 /*return*/];
786
+ }
787
+ });
788
+ });
789
+ };
790
+ //#endregion
791
+ //#endregion
792
+ //#region api
793
+ //#region api / init procedure
794
+ ProjectIsomorphicLib.prototype.initProcedure = function () {
795
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
796
+ return tslib_1.__generator(this, function (_a) {
797
+ //#region @backend
798
+ if (this.isCoreProject && this.frameworkVersionAtLeast('v2')) {
799
+ }
800
+ return [2 /*return*/];
801
+ });
802
+ });
803
+ };
804
+ //#endregion
805
+ //#region api / start on command
806
+ ProjectIsomorphicLib.prototype.startOnCommand = function (args) {
807
+ //#region @backendFunc
808
+ var command = "ts-node run.js ".concat(args);
809
+ return command;
810
+ //#endregion
811
+ };
812
+ //#endregion
813
+ //#region api / build app
814
+ ProjectIsomorphicLib.prototype.buildApp = function (
815
+ //#region options
816
+ //#region @backend
817
+ outDir, watch, args, baseHref, prod, websql) {
818
+ var _a;
819
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
820
+ var isSmartContainerTarget, isSmartContainerTargetNonClient, basename, webpackEnvParams, backAppTmpFolders, backeFromRelase, backeFromContainerTarget, back, outDirApp, outPutPathCommand, flags, portAssignedToAppBuild, argsAdditionalParams, isStandalone, buildOutDir, parent, additionalReplace, command, portAssignedToAppBuildCommandPart, aot, ngBuildCmd, isElectron, proj, showInfoAngular;
821
+ var _this = this;
822
+ return tslib_1.__generator(this, function (_b) {
823
+ switch (_b.label) {
824
+ case 0:
825
+ isSmartContainerTarget = this.isSmartContainerTarget;
826
+ isSmartContainerTargetNonClient = this.isSmartContainerTargetNonClient;
827
+ basename = '';
828
+ if (this.isInRelaseDist) {
829
+ if (!((_a = this.env.config) === null || _a === void 0 ? void 0 : _a.useDomain)) {
830
+ basename = "--base-href /".concat(isSmartContainerTarget ? this.smartContainerTargetParentContainer.name : this.name, "/");
831
+ if (isSmartContainerTargetNonClient) {
832
+ basename = "--base-href /".concat(isSmartContainerTarget ? this.smartContainerTargetParentContainer.name : this.name, "/-/").concat(this.name, "/");
833
+ }
834
+ }
835
+ }
836
+ webpackEnvParams = "--env.outFolder=".concat(outDir);
837
+ webpackEnvParams = webpackEnvParams + (watch ? ' --env.watch=true' : '');
838
+ backAppTmpFolders = "../../";
839
+ backeFromRelase = "../../../../";
840
+ backeFromContainerTarget = "../../../";
841
+ back = backAppTmpFolders;
842
+ if (this.isInRelaseDist) {
843
+ if (isSmartContainerTarget) {
844
+ back = "".concat(backAppTmpFolders).concat(backeFromContainerTarget).concat(backeFromRelase);
845
+ }
846
+ else {
847
+ back = "".concat(backAppTmpFolders).concat(backeFromRelase);
848
+ }
849
+ }
850
+ else {
851
+ if (isSmartContainerTarget) {
852
+ back = "".concat(backAppTmpFolders).concat(backeFromContainerTarget);
853
+ }
854
+ }
855
+ outDirApp = this.isInRelaseDist ? tnp_config_1.config.folder.docs : "".concat(outDir, "-app").concat(websql ? '-websql' : '');
856
+ if (isSmartContainerTargetNonClient) {
857
+ outDirApp = "".concat(outDirApp, "/-/").concat(this.name);
858
+ }
859
+ outPutPathCommand = "--output-path ".concat(back).concat(outDirApp, " ").concat(basename);
860
+ flags = require('minimist')(args.split(' ')).flags;
861
+ flags = (tnp_core_1._.isString(flags) ? [flags] : []);
862
+ flags = (!tnp_core_1._.isArray(flags) ? [] : flags);
863
+ argsAdditionalParams = tnp_helpers_1.Helpers.cliTool.argsFrom(args) || {};
864
+ if (tnp_core_1._.isNumber(argsAdditionalParams.port)) {
865
+ portAssignedToAppBuild = argsAdditionalParams.port;
866
+ }
867
+ if (!tnp_core_1._.isNumber(portAssignedToAppBuild) || !portAssignedToAppBuild) {
868
+ portAssignedToAppBuild = websql ? this.standaloneWebsqlAppPort : this.standaloneNormalAppPort;
869
+ }
870
+ if (!(!tnp_core_1._.isNumber(portAssignedToAppBuild) || !portAssignedToAppBuild)) return [3 /*break*/, 2];
871
+ return [4 /*yield*/, this.assignFreePort(constants_1.DEFAULT_PORT.APP_BUILD_LOCALHOST)];
872
+ case 1:
873
+ portAssignedToAppBuild = _b.sent();
874
+ _b.label = 2;
875
+ case 2:
876
+ if (!watch) return [3 /*break*/, 4];
877
+ return [4 /*yield*/, tnp_helpers_1.Helpers.killProcessByPort(portAssignedToAppBuild)];
878
+ case 3:
879
+ _b.sent();
880
+ _b.label = 4;
881
+ case 4:
882
+ isStandalone = (this.isStandaloneProject && !isSmartContainerTarget);
883
+ buildOutDir = this.buildOptions.outDir;
884
+ parent = (!isStandalone
885
+ ? (isSmartContainerTarget ? this.smartContainerTargetParentContainer : this.parent)
886
+ : void 0);
887
+ additionalReplace = function (line) {
888
+ var beforeModule2 = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(buildOutDir, parent.name, _this.name, "tmp-apps-for-".concat(buildOutDir, "/").concat(_this.name)));
889
+ // console.log({ beforeModule2 })
890
+ if (line.search(beforeModule2) !== -1) {
891
+ line = line.replace(beforeModule2 + '/', '');
892
+ }
893
+ return line;
894
+ };
895
+ if (this.frameworkVersionAtLeast('v3')) {
896
+ portAssignedToAppBuildCommandPart = tnp_core_1._.isNumber(portAssignedToAppBuild) ? "--port=".concat(portAssignedToAppBuild) : '';
897
+ aot = flags.includes('aot');
898
+ ngBuildCmd = "npm-run ng build app"
899
+ + "".concat(aot ? '--aot=true' : '', " ")
900
+ + "".concat(prod ? '--configuration production' : '', " ")
901
+ + "".concat(watch ? '--watch' : '')
902
+ + "".concat(outPutPathCommand, " ");
903
+ if (watch) {
904
+ if (outDir === 'dist') {
905
+ isElectron = false;
906
+ command = "".concat(this.npmRunNg, " serve ").concat(isElectron ? 'angular-electron' : 'app', " ").concat(portAssignedToAppBuildCommandPart, " ").concat(prod ? '--prod' : '');
907
+ }
908
+ else {
909
+ command = ngBuildCmd;
910
+ }
911
+ }
912
+ else {
913
+ command = ngBuildCmd;
914
+ }
915
+ //#endregion
916
+ }
917
+ else {
918
+ //#region @deprecated prepare webpack variables
919
+ if (tnp_core_1._.isNumber(portAssignedToAppBuild)) {
920
+ webpackEnvParams = "".concat(webpackEnvParams, " --env.port=").concat(portAssignedToAppBuild);
921
+ }
922
+ command = "npm-run webpack-dev-server ".concat(webpackEnvParams);
923
+ //#endregion
924
+ }
925
+ if (this.frameworkVersionAtLeast('v3')) {
926
+ proj = this.proxyNgProj(this, this.buildOptions);
927
+ }
928
+ else {
929
+ proj = this;
930
+ }
931
+ showInfoAngular = function () {
932
+ tnp_helpers_1.Helpers.log("\n\n ANGULAR BUILD APP COMMAND: ".concat(command, "\n\n inside: ").concat(proj.location, "\n\n "));
933
+ };
934
+ //#endregion
935
+ //#endregion
936
+ showInfoAngular();
937
+ return [4 /*yield*/, proj.execute(command, {
938
+ resolvePromiseMsg: {
939
+ stdout: 'Compiled successfully'
940
+ },
941
+ //#region command execute params
942
+ exitOnError: true,
943
+ exitOnErrorCallback: function (code) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
944
+ return tslib_1.__generator(this, function (_a) {
945
+ tnp_helpers_1.Helpers.error("[".concat(tnp_config_1.config.frameworkName, "] Typescript compilation error (code=").concat(code, ")"), false, true);
946
+ return [2 /*return*/];
947
+ });
948
+ }); },
949
+ outputLineReplace: function (line) {
950
+ var _a, _b;
951
+ //#region replace outut line for better debugging
952
+ if (isStandalone) {
953
+ return line.replace("src/app/".concat(_this.name, "/"), "./src/");
954
+ }
955
+ else {
956
+ line = line.trim();
957
+ if (line.search('src/app/') !== -1) {
958
+ line = line.replace('src/app/', './src/app/');
959
+ line = line.replace('././src/app/', './src/app/');
960
+ }
961
+ if (line.search("src/app/".concat(_this.name, "/libs/")) !== -1) {
962
+ var __ = (_a = tslib_1.__read(line.split('/'), 6), _a[0]), ___ = _a[1], ____ = _a[2], _____ = _a[3], ______ = _a[4], moduleName = _a[5];
963
+ return additionalReplace(line.replace("src/app/".concat(_this.name, "/libs/").concat(moduleName, "/"), "".concat(moduleName, "/src/lib/")));
964
+ }
965
+ if (line.search("src/app/") !== -1) {
966
+ var __ = (_b = tslib_1.__read(line.split('/'), 4), _b[0]), ___ = _b[1], ____ = _b[2], moduleName = _b[3];
967
+ return additionalReplace(line.replace("src/app/".concat(moduleName, "/"), "".concat(moduleName, "/src/")));
968
+ }
969
+ return additionalReplace(line);
970
+ }
971
+ //#endregion
972
+ },
973
+ //#endregion
974
+ })];
975
+ case 5:
976
+ _b.sent();
977
+ return [2 /*return*/];
978
+ }
979
+ });
980
+ });
981
+ };
982
+ //#endregion
983
+ //#region api / build lib
984
+ ProjectIsomorphicLib.prototype.buildLib = function (libBuildDone) {
985
+ var _a;
986
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
987
+ 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_2, e_3, cliJsFile;
988
+ var _b, _c;
989
+ var _this = this;
990
+ return tslib_1.__generator(this, function (_d) {
991
+ switch (_d.label) {
992
+ case 0:
993
+ outDir = (_b = this.buildOptions, _b.outDir), ngbuildonly = _b.ngbuildonly, watch = _b.watch, args = _b.args;
994
+ this.fixBuildDirs(outDir);
995
+ // Helpers.info(`[buildLib] start of building ${websql ? '[WEBSQL]' : ''}`);
996
+ tnp_helpers_1.Helpers.log("[buildLib] start of building...");
997
+ this.copyEssentialFilesTo([(0, tnp_core_1.crossPlatformPath)([this.pathFor(outDir)])], outDir);
998
+ codeCutRelease = require('minimist')((args || '').split(' ')).codeCutRelease;
999
+ obscure = (_c = this.buildOptions, _c.obscure), uglify = _c.uglify, nodts = _c.nodts, includeNodeModules = _c.includeNodeModules, serveApp = _c.serveApp;
1000
+ productionModeButIncludePackageJsonDeps = (obscure || uglify) && !includeNodeModules;
1001
+ if (this.isInRelaseDist && (obscure || uglify)) { // @LAST
1002
+ this.quickFixes.overritenBadNpmPackages();
1003
+ }
1004
+ if (productionModeButIncludePackageJsonDeps) {
1005
+ this.buildOptions.genOnlyClientCode = true;
1006
+ }
1007
+ incrementalBuildProcess = new incremental_build_process_backend_1.IncrementalBuildProcess(this, this.buildOptions.clone({
1008
+ websql: false
1009
+ }));
1010
+ incrementalBuildProcessWebsql = new incremental_build_process_backend_1.IncrementalBuildProcess(this, this.buildOptions.clone({
1011
+ websql: true,
1012
+ genOnlyClientCode: true,
1013
+ }));
1014
+ proxyProject = this.proxyNgProj(this, this.buildOptions.clone({
1015
+ websql: false,
1016
+ }), 'lib');
1017
+ proxyProjectWebsql = this.proxyNgProj(this, this.buildOptions.clone({
1018
+ websql: true
1019
+ }), 'lib');
1020
+ 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 "));
1021
+ isStandalone = (!this.isSmartContainer);
1022
+ sharedOptions = function () {
1023
+ return {
1024
+ exitOnError: true,
1025
+ exitOnErrorCallback: function (code) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
1026
+ return tslib_1.__generator(this, function (_a) {
1027
+ tnp_helpers_1.Helpers.error("[".concat(tnp_config_1.config.frameworkName, "] Typescript compilation lib error (code=").concat(code, ")"), false, true);
1028
+ return [2 /*return*/];
1029
+ });
1030
+ }); },
1031
+ outputLineReplace: function (line) {
1032
+ if (isStandalone) {
1033
+ if (line.startsWith('WARNING: postcss-url')) {
1034
+ return ' --- [firedev] IGNORED WARN ---- ';
1035
+ }
1036
+ line = line.replace("projects/".concat(_this.name, "/src/"), "./src/");
1037
+ if (line.search("/src/libs/") !== -1) {
1038
+ var _a = tslib_1.__read(line.split('/'), 4), __ = _a[0], ___ = _a[1], ____ = _a[2], moduleName = _a[3];
1039
+ // console.log({
1040
+ // moduleName,
1041
+ // standalone: 'inlib'
1042
+ // })
1043
+ return line.replace("/src/libs/".concat(moduleName, "/"), "/".concat(moduleName, "/src/lib/"));
1044
+ }
1045
+ return line;
1046
+ }
1047
+ return line;
1048
+ },
1049
+ };
1050
+ };
1051
+ commandForLibraryBuild = "".concat(this.npmRunNg, " build ").concat(this.name, " ").concat(watch ? '--watch' : '');
1052
+ showInfoAngular = function () {
1053
+ tnp_helpers_1.Helpers.info("Starting browser Angular/TypeScirpt build.... ".concat(_this.buildOptions.websql ? '[WEBSQL]' : ''));
1054
+ tnp_helpers_1.Helpers.log("\n\n ANGULAR 13+ ".concat(_this.buildOptions.watch ? 'WATCH ' : '', " LIB BUILD STARTED... ").concat(_this.buildOptions.websql ? '[WEBSQL]' : '', "\n\n "));
1055
+ tnp_helpers_1.Helpers.log(" command: ".concat(commandForLibraryBuild));
1056
+ };
1057
+ if (!this.buildOptions.watch) return [3 /*break*/, 18];
1058
+ if (!productionModeButIncludePackageJsonDeps) return [3 /*break*/, 7];
1059
+ //#region webpack dist release build
1060
+ return [4 /*yield*/, incrementalBuildProcess.startAndWatch("isomorphic compilation (only browser) ")];
1061
+ case 1:
1062
+ //#region webpack dist release build
1063
+ _d.sent();
1064
+ return [4 /*yield*/, incrementalBuildProcessWebsql.startAndWatch("isomorphic compilation (only browser) [WEBSQL]")];
1065
+ case 2:
1066
+ _d.sent();
1067
+ // Helpers.error(`Watch build not available for dist release build`, false, true);
1068
+ // Helpers.info(`Starting watch dist release build for fast cli.. ${this.buildOptions.websql ? '[WEBSQL]' : ''}`);
1069
+ tnp_helpers_1.Helpers.info("Starting watch dist release build for fast cli.. ");
1070
+ _d.label = 3;
1071
+ case 3:
1072
+ _d.trys.push([3, 5, , 6]);
1073
+ return [4 /*yield*/, this.webpackBackendBuild.run({
1074
+ appBuild: false,
1075
+ outDir: outDir,
1076
+ watch: watch,
1077
+ })];
1078
+ case 4:
1079
+ _d.sent();
1080
+ return [3 /*break*/, 6];
1081
+ case 5:
1082
+ er_1 = _d.sent();
1083
+ tnp_helpers_1.Helpers.error("WATCH ".concat(outDir.toUpperCase(), " build failed"), false, true);
1084
+ return [3 /*break*/, 6];
1085
+ case 6: return [3 /*break*/, 17];
1086
+ case 7:
1087
+ //#region watch backend compilation
1088
+ return [4 /*yield*/, incrementalBuildProcess.startAndWatch('isomorphic compilation (watch mode)',
1089
+ //#region options
1090
+ {
1091
+ watchOnly: this.buildOptions.watchOnly,
1092
+ afterInitCallBack: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
1093
+ return tslib_1.__generator(this, function (_a) {
1094
+ switch (_a.label) {
1095
+ case 0: return [4 /*yield*/, this.compilerCache.setUpdatoDate.incrementalBuildProcess()];
1096
+ case 1:
1097
+ _a.sent();
1098
+ return [2 /*return*/];
1099
+ }
1100
+ });
1101
+ }); }
1102
+ }
1103
+ //#endregion
1104
+ )];
1105
+ case 8:
1106
+ //#region watch backend compilation
1107
+ _d.sent();
1108
+ return [4 /*yield*/, incrementalBuildProcessWebsql.startAndWatch('isomorphic compilation (watch mode) [WEBSQL]',
1109
+ //#region options
1110
+ {
1111
+ watchOnly: this.buildOptions.watchOnly,
1112
+ afterInitCallBack: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
1113
+ return tslib_1.__generator(this, function (_a) {
1114
+ switch (_a.label) {
1115
+ case 0: return [4 /*yield*/, this.compilerCache.setUpdatoDate.incrementalBuildProcess()];
1116
+ case 1:
1117
+ _a.sent();
1118
+ return [2 /*return*/];
1119
+ }
1120
+ });
1121
+ }); }
1122
+ }
1123
+ //#endregion
1124
+ )];
1125
+ case 9:
1126
+ _d.sent();
1127
+ if (!this.frameworkVersionAtLeast('v3')) return [3 /*break*/, 17];
1128
+ showInfoAngular();
1129
+ if (!(isStandalone || (this.isSmartContainerTarget && ((_a = this.buildOptions.copyto) === null || _a === void 0 ? void 0 : _a.length) > 0))) return [3 /*break*/, 12];
1130
+ if (this.isSmartContainerTarget) { // TODO QUICK_FIX this should be in init/struct
1131
+ packages_recognition_1.PackagesRecognition.fromProject(this).start(true, 'before startling lib proxy project');
1132
+ }
1133
+ return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({ resolvePromiseMsg: {
1134
+ stdout: 'Compilation complete. Watching for file changes'
1135
+ } }, sharedOptions()))];
1136
+ case 10:
1137
+ _d.sent();
1138
+ return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({ resolvePromiseMsg: {
1139
+ stdout: 'Compilation complete. Watching for file changes'
1140
+ } }, sharedOptions()))];
1141
+ case 11:
1142
+ _d.sent();
1143
+ _d.label = 12;
1144
+ case 12:
1145
+ if (!libBuildDone) return [3 /*break*/, 14];
1146
+ return [4 /*yield*/, tnp_helpers_1.Helpers.runSyncOrAsync(libBuildDone)];
1147
+ case 13:
1148
+ _d.sent();
1149
+ _d.label = 14;
1150
+ case 14:
1151
+ if (!serveApp) return [3 /*break*/, 16];
1152
+ appBuildOpt = this.buildOptions.clone();
1153
+ appBuildOpt.appBuild = true;
1154
+ return [4 /*yield*/, this.buildSteps(appBuildOpt)];
1155
+ case 15:
1156
+ _d.sent();
1157
+ return [3 /*break*/, 17];
1158
+ case 16:
1159
+ this.showMesageWhenBuildLibDoneForSmartContainer(args, watch, this.isInRelaseDist);
1160
+ _d.label = 17;
1161
+ case 17: return [3 /*break*/, 38];
1162
+ case 18:
1163
+ //#region non watch build
1164
+ if (codeCutRelease) {
1165
+ this.cutReleaseCode();
1166
+ }
1167
+ if (!productionModeButIncludePackageJsonDeps) return [3 /*break*/, 30];
1168
+ //#region release production backend build for firedev/tnp specyfic
1169
+ // console.log('k1')
1170
+ return [4 /*yield*/, incrementalBuildProcess.start('isomorphic compilation (only browser) ')];
1171
+ case 19:
1172
+ //#region release production backend build for firedev/tnp specyfic
1173
+ // console.log('k1')
1174
+ _d.sent();
1175
+ return [4 /*yield*/, incrementalBuildProcessWebsql.start('isomorphic compilation (only browser) [WEBSQL] ')];
1176
+ case 20:
1177
+ _d.sent();
1178
+ _d.label = 21;
1179
+ case 21:
1180
+ _d.trys.push([21, 23, , 24]);
1181
+ return [4 /*yield*/, this.webpackBackendBuild.run({
1182
+ appBuild: false,
1183
+ outDir: outDir,
1184
+ watch: watch,
1185
+ })];
1186
+ case 22:
1187
+ _d.sent();
1188
+ return [3 /*break*/, 24];
1189
+ case 23:
1190
+ er_2 = _d.sent();
1191
+ tnp_helpers_1.Helpers.error("".concat(outDir.toUpperCase(), " (single file compilation) build failed"), false, true);
1192
+ return [3 /*break*/, 24];
1193
+ case 24:
1194
+ if (nodts) {
1195
+ baseDistGenWebpackDts_1 = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, outDir, 'dist'));
1196
+ tnp_helpers_1.Helpers
1197
+ .filesFrom(baseDistGenWebpackDts_1, true)
1198
+ .forEach(function (absSource) {
1199
+ var destDtsFile = tnp_core_3.path.join(_this.location, outDir, absSource.replace("".concat(baseDistGenWebpackDts_1, "/"), ''));
1200
+ tnp_helpers_1.Helpers.copyFile(absSource, destDtsFile);
1201
+ });
1202
+ }
1203
+ tnp_helpers_1.Helpers.removeIfExists(tnp_core_3.path.join(this.location, outDir, 'dist'));
1204
+ try {
1205
+ if (obscure || uglify) {
1206
+ this.backendCompileToEs5(outDir);
1207
+ }
1208
+ if (uglify) {
1209
+ this.backendUglifyCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify);
1210
+ }
1211
+ ;
1212
+ if (obscure) {
1213
+ this.backendObscureCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify);
1214
+ }
1215
+ // process.exit(0)
1216
+ }
1217
+ catch (er) {
1218
+ tnp_helpers_1.Helpers.error("".concat(outDir.toUpperCase(), " (obscure || uglify) process failed"), false, true);
1219
+ }
1220
+ _d.label = 25;
1221
+ case 25:
1222
+ _d.trys.push([25, 28, , 29]);
1223
+ showInfoAngular();
1224
+ return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
1225
+ case 26:
1226
+ _d.sent();
1227
+ return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
1228
+ case 27:
1229
+ _d.sent();
1230
+ return [3 /*break*/, 29];
1231
+ case 28:
1232
+ e_2 = _d.sent();
1233
+ tnp_helpers_1.Helpers.log(e_2);
1234
+ tnp_helpers_1.Helpers.error("\n Command failed: ".concat(commandForLibraryBuild, "\n\n Not able to build project: ").concat(this.genericName), false, true);
1235
+ return [3 /*break*/, 29];
1236
+ case 29: return [3 /*break*/, 37];
1237
+ case 30:
1238
+ //#region normal backend compilation
1239
+ return [4 /*yield*/, incrementalBuildProcess.start('isomorphic compilation')];
1240
+ case 31:
1241
+ //#region normal backend compilation
1242
+ _d.sent();
1243
+ return [4 /*yield*/, incrementalBuildProcessWebsql.start('isomorphic compilation')];
1244
+ case 32:
1245
+ _d.sent();
1246
+ _d.label = 33;
1247
+ case 33:
1248
+ _d.trys.push([33, 36, , 37]);
1249
+ showInfoAngular();
1250
+ return [4 /*yield*/, proxyProject.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
1251
+ case 34:
1252
+ _d.sent();
1253
+ return [4 /*yield*/, proxyProjectWebsql.execute(commandForLibraryBuild, tslib_1.__assign({}, sharedOptions()))];
1254
+ case 35:
1255
+ _d.sent();
1256
+ this.showMesageWhenBuildLibDoneForSmartContainer(args, watch, this.isInRelaseDist);
1257
+ return [3 /*break*/, 37];
1258
+ case 36:
1259
+ e_3 = _d.sent();
1260
+ tnp_helpers_1.Helpers.log(e_3);
1261
+ tnp_helpers_1.Helpers.error("\n Command failed: ".concat(commandForLibraryBuild, "\n\n Not able to build project: ").concat(this.genericName), false, true);
1262
+ return [3 /*break*/, 37];
1263
+ case 37:
1264
+ if (includeNodeModules) {
1265
+ cliJsFile = 'cli.js';
1266
+ this.backendIncludeNodeModulesInCompilation(outDir, false, // uglify,
1267
+ cliJsFile);
1268
+ if (uglify) {
1269
+ this.backendUglifyCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify, cliJsFile);
1270
+ }
1271
+ ;
1272
+ if (!productionModeButIncludePackageJsonDeps) {
1273
+ if (obscure || uglify) {
1274
+ this.backendCompileToEs5(outDir, cliJsFile);
1275
+ }
1276
+ if (obscure) {
1277
+ this.backendObscureCode(outDir, tnp_config_1.config.reservedArgumentsNamesUglify, cliJsFile);
1278
+ }
1279
+ }
1280
+ }
1281
+ if (nodts) {
1282
+ this.backendRemoveDts(outDir);
1283
+ }
1284
+ if (codeCutRelease) {
1285
+ this.cutReleaseCodeRestore();
1286
+ }
1287
+ _d.label = 38;
1288
+ case 38: return [2 /*return*/];
1289
+ }
1290
+ });
1291
+ });
1292
+ };
1293
+ //#endregion
1294
+ //#endregion
1295
+ //#region private methods
1296
+ //#region private methods / show message when build lib done for smart container
1297
+ ProjectIsomorphicLib.prototype.showMesageWhenBuildLibDoneForSmartContainer = function (args, watch, isInRelease) {
1298
+ //#region @backend
1299
+ if (this.forAppRelaseBuild) {
1300
+ tnp_helpers_1.Helpers.logInfo('Lib build for app done... starting app build');
1301
+ return;
1302
+ }
1303
+ if (isInRelease) {
1304
+ tnp_helpers_1.Helpers.logInfo('Release lib build done... ');
1305
+ return;
1306
+ }
1307
+ var buildLibDone = "LIB BUILD DONE.. ";
1308
+ var ifapp = 'if you want to start app build -> please run in other terminal command:';
1309
+ var ngserve = "".concat(watch ? '--port 4201 # or whatever port' : '#', " to run angular ").concat(watch
1310
+ ? 'ng serve'
1311
+ : 'ng build (for application - not lib)', ".");
1312
+ var bawOrba = watch ? 'baw' : 'ba';
1313
+ var bawOrbaLong = watch ? ' build:app:watch ' : ' build:app ';
1314
+ var bawOrbaLongWebsql = watch ? 'build:app:watch --websql' : 'build:app --websql';
1315
+ var withPort = '(with custom port - otherwise automatically selected)';
1316
+ var orIfWebsql = "or if you want to try websql mode:";
1317
+ if (this.isSmartContainerTarget) {
1318
+ var parent_1 = this.smartContainerTargetParentContainer;
1319
+ args = tnp_helpers_1.Helpers.cliTool.removeArgFromString(args, constants_1.argsToClear);
1320
+ var target = ((0, tnp_core_1.crossPlatformPath)(tnp_core_1._.first(args.split(' '))) || '').replace('/', '');
1321
+ tnp_helpers_1.Helpers.taskDone("".concat(tnp_cli_1.CLI.chalk.underline("\n\n ".concat(buildLibDone, "... for target project \"")
1322
+ + "".concat(parent_1 ? (parent_1.name + '/') : '').concat(target, "\""))));
1323
+ 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 "));
1324
+ }
1325
+ else if (this.isStandaloneProject) {
1326
+ tnp_helpers_1.Helpers.taskDone("".concat(tnp_cli_1.CLI.chalk.underline("".concat(buildLibDone, "..."))));
1327
+ 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 "));
1328
+ }
1329
+ //#endregion
1330
+ };
1331
+ //#endregion
1332
+ //#region private methods / fix build dirs
1333
+ ProjectIsomorphicLib.prototype.fixBuildDirs = function (outDir) {
1334
+ //#region @backend
1335
+ var p = tnp_core_3.path.join(this.location, outDir);
1336
+ if (!tnp_helpers_1.Helpers.isFolder(p)) {
1337
+ tnp_helpers_1.Helpers.remove(p);
1338
+ tnp_helpers_1.Helpers.mkdirp(p);
1339
+ }
1340
+ //#endregion
1341
+ };
1342
+ //#endregion
1343
+ //#region private methods / get proxy ng projects
1344
+ ProjectIsomorphicLib.prototype.proxyNgProj = function (project, buildOptions, type) {
1345
+ if (type === void 0) { type = 'app'; }
1346
+ //#region @backendFunc
1347
+ var projepath = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, ProjectIsomorphicLib_1.angularProjProxyPath(project, buildOptions.outDir, void 0, // TODO
1348
+ buildOptions.websql, type)));
1349
+ var proj = Project.From(projepath);
1350
+ return proj;
1351
+ //#endregion
1352
+ };
1353
+ //#endregion
1354
+ //#region private methods / compile backend declaration files
1355
+ ProjectIsomorphicLib.prototype.backendCompilerDeclarationFiles = function (outDir) {
1356
+ //#region @backend
1357
+ this.run("npm-run tsc --emitDeclarationOnly --declarationDir ".concat(outDir)).sync();
1358
+ //#endregion
1359
+ };
1360
+ //#endregion
1361
+ //#region private methods / include node_modules in compilation
1362
+ ProjectIsomorphicLib.prototype.backendRemoveDts = function (outDir) {
1363
+ //#region @backend
1364
+ tnp_helpers_1.Helpers
1365
+ .filesFrom([this.location, outDir, 'lib'], true)
1366
+ .filter(function (f) { return f.endsWith('.d.ts'); })
1367
+ .forEach(function (f) { return tnp_helpers_1.Helpers.removeFileIfExists(f); });
1368
+ tnp_helpers_1.Helpers.writeFile([this.location, outDir, 'lib/index.d.ts'], "export declare const dummy".concat((new Date()).getTime(), ";"));
1369
+ //#endregion
1370
+ };
1371
+ //#endregion
1372
+ //#region private methods / include node_modules in compilation
1373
+ ProjectIsomorphicLib.prototype.backendIncludeNodeModulesInCompilation = function (outDir, uglify, mainCliJSFileName) {
1374
+ //#region @backend
1375
+ if (mainCliJSFileName === void 0) { mainCliJSFileName = tnp_config_1.config.file.index_js; }
1376
+ // QUICK_FIX TODO ncc input change does not work (it takes always index.js)
1377
+ //#region QUICK_FIX
1378
+ var indexOrg = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.index_js));
1379
+ var indexOrgBackup = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.index_js, "-backup"));
1380
+ var mainFileAbs = this.pathFor("".concat(outDir, "/").concat(mainCliJSFileName));
1381
+ var useBackupFile = (mainCliJSFileName !== tnp_config_1.config.file.index_js);
1382
+ if (useBackupFile) {
1383
+ tnp_helpers_1.Helpers.copyFile(indexOrg, indexOrgBackup);
1384
+ }
1385
+ //#endregion
1386
+ var nccComand = "ncc build ".concat(outDir, "/").concat(tnp_config_1.config.file.index_js, " -o ").concat(outDir, "/temp/ncc ").concat(uglify ? '-m' : '', " --no-cache ");
1387
+ // console.log({
1388
+ // useBackupFile,
1389
+ // indexOrg,
1390
+ // indexOrgBackup,
1391
+ // nccComand
1392
+ // })
1393
+ this.run(nccComand).sync();
1394
+ // Helpers
1395
+ // .filesFrom([this.location, outDir, 'lib'], true)
1396
+ // .filter(f => f.endsWith('.js') || f.endsWith('.js.map'))
1397
+ // .forEach(f => Helpers.removeFileIfExists(f))
1398
+ // ;
1399
+ var baseDistRelease = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, outDir));
1400
+ var nccBase = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, outDir, 'temp', 'ncc'));
1401
+ tnp_helpers_1.Helpers
1402
+ .filesFrom(nccBase, true)
1403
+ .filter(function (f) { return f.replace("".concat(nccBase, "/"), '') !== tnp_config_1.config.file.package_json; })
1404
+ .forEach(function (f) {
1405
+ var relativePath = f.replace("".concat(nccBase, "/"), '');
1406
+ var dest = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(baseDistRelease, relativePath));
1407
+ tnp_helpers_1.Helpers.copyFile(f, dest);
1408
+ });
1409
+ tnp_helpers_1.Helpers.removeFolderIfExists(tnp_core_3.path.dirname(nccBase));
1410
+ // remove dependencies
1411
+ var pjPath = this.pathFor("".concat(outDir, "/").concat(tnp_config_1.config.file.package_json));
1412
+ var pj = tnp_helpers_1.Helpers.readJson(pjPath);
1413
+ Object.keys(pj.dependencies).forEach(function (name) {
1414
+ if (!['ora'].includes(name)) { // TODO QUICK FIX FOF TNP
1415
+ delete pj.dependencies[name];
1416
+ }
1417
+ });
1418
+ pj.peerDependencies = {};
1419
+ pj.devDependencies = {};
1420
+ tnp_helpers_1.Helpers.removeFileIfExists(pjPath);
1421
+ tnp_helpers_1.Helpers.writeFile(pjPath, pj);
1422
+ if (useBackupFile) {
1423
+ tnp_helpers_1.Helpers.copyFile(indexOrg, mainFileAbs);
1424
+ tnp_helpers_1.Helpers.copyFile(indexOrgBackup, indexOrg);
1425
+ }
1426
+ tnp_helpers_1.Helpers.removeIfExists(indexOrgBackup);
1427
+ //#endregion
1428
+ };
1429
+ //#endregion
1430
+ //#region private methods / compile backend es5
1431
+ /**
1432
+ * TODO not working
1433
+ */
1434
+ ProjectIsomorphicLib.prototype.backendCompileToEs5 = function (outDir, mainCliJSFileName) {
1435
+ if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
1436
+ return;
1437
+ //#region @backend
1438
+ if (!tnp_helpers_1.Helpers.exists(tnp_core_3.path.join(this.location, outDir, 'index.js'))) {
1439
+ tnp_helpers_1.Helpers.warn("[compileToEs5] Nothing to compile to es5... no index.js in ".concat(outDir));
1440
+ return;
1441
+ }
1442
+ var indexEs5js = "index-es5.js";
1443
+ tnp_helpers_1.Helpers.writeFile(tnp_core_3.path.join(this.location, outDir, tnp_config_1.config.file._babelrc), '{ "presets": ["env"] }\n');
1444
+ this.run("npm-run babel ./".concat(outDir, "/index.js --out-file ./").concat(outDir, "/").concat(indexEs5js)).sync();
1445
+ tnp_helpers_1.Helpers.writeFile(tnp_core_3.path.join(this.location, outDir, tnp_config_1.config.file.index_js), tnp_helpers_1.Helpers.readFile(tnp_core_3.path.join(this.location, outDir, indexEs5js)));
1446
+ tnp_helpers_1.Helpers.removeFileIfExists(tnp_core_3.path.join(this.location, outDir, indexEs5js));
1447
+ tnp_helpers_1.Helpers.removeFileIfExists(tnp_core_3.path.join(this.location, outDir, tnp_config_1.config.file._babelrc));
1448
+ //#endregion
1449
+ };
1450
+ //#endregion
1451
+ //#region private methods / compile/uglify backend code
1452
+ ProjectIsomorphicLib.prototype.backendUglifyCode = function (outDir, reservedNames, mainCliJSFileName) {
1453
+ if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
1454
+ //#region @backendFunc
1455
+ if (!tnp_helpers_1.Helpers.exists(tnp_core_3.path.join(this.location, outDir, mainCliJSFileName))) {
1456
+ tnp_helpers_1.Helpers.warn("[uglifyCode] Nothing to uglify... no ".concat(mainCliJSFileName, " in /").concat(outDir));
1457
+ return;
1458
+ }
1459
+ var command = "npm-run uglifyjs ".concat(outDir, "/").concat(mainCliJSFileName, " --output ").concat(outDir, "/").concat(mainCliJSFileName, " -b")
1460
+ + " --mangle reserved=[".concat(reservedNames.map(function (n) { return "'".concat(n, "'"); }).join(','), "]");
1461
+ // + ` --mangle-props reserved=[${reservedNames.join(',')}]` // it breakes code
1462
+ tnp_helpers_1.Helpers.info("\n\n JAVASCRIPT-UGLIFY PROCESSING...\n\n ".concat(command, "\n\n "));
1463
+ this.run(command).sync();
1464
+ //#endregion
1465
+ };
1466
+ //#endregion
1467
+ //#region private methods / compile/obscure backend code
1468
+ ProjectIsomorphicLib.prototype.backendObscureCode = function (outDir, reservedNames, mainCliJSFileName) {
1469
+ if (mainCliJSFileName === void 0) { mainCliJSFileName = 'index.js'; }
1470
+ //#region @backendFunc
1471
+ if (!tnp_helpers_1.Helpers.exists(tnp_core_3.path.join(this.location, tnp_config_1.config.folder.dist, mainCliJSFileName))) {
1472
+ tnp_helpers_1.Helpers.warn("[obscureCode] Nothing to obscure... no ".concat(mainCliJSFileName, " in release dist"));
1473
+ return;
1474
+ }
1475
+ var commnad = "npm-run javascript-obfuscator dist/".concat(mainCliJSFileName, " ")
1476
+ + " --output dist/".concat(mainCliJSFileName)
1477
+ + " --target node"
1478
+ + " --string-array-rotate true"
1479
+ // + ` --stringArray true`
1480
+ + " --string-array-encoding base64"
1481
+ + " --reserved-names '".concat(reservedNames.join(','), "'")
1482
+ + " --reserved-strings '".concat(reservedNames.join(','), "'");
1483
+ tnp_helpers_1.Helpers.info("\n\n JAVASCRIPT-OBFUSCATOR PROCESSING...\n\n ".concat(commnad, "\n\n "));
1484
+ this.run(commnad).sync();
1485
+ //#endregion
1486
+ };
1487
+ Object.defineProperty(ProjectIsomorphicLib.prototype, "tmpSrcDistReleaseFolder", {
1488
+ //#endregion
1489
+ //#region private methods / cut release code
1490
+ get: function () {
1491
+ //#region @backendFunc
1492
+ return "tmp-cut-relase-src-".concat(tnp_config_1.config.folder.dist).concat(this.buildOptions.websql ? '-websql' : '');
1493
+ //#endregion
1494
+ },
1495
+ enumerable: false,
1496
+ configurable: true
1497
+ });
1498
+ ProjectIsomorphicLib.prototype.cutReleaseCodeRestore = function () {
1499
+ //#region @backend
1500
+ var releaseSrcLocation = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, tnp_config_1.config.folder.src));
1501
+ var releaseSrcLocationOrg = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, this.tmpSrcDistReleaseFolder));
1502
+ tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocation);
1503
+ tnp_helpers_1.Helpers.copy(releaseSrcLocationOrg, releaseSrcLocation);
1504
+ //#endregion
1505
+ };
1506
+ ProjectIsomorphicLib.prototype.cutReleaseCode = function () {
1507
+ var _this = this;
1508
+ //#region @backend
1509
+ var releaseSrcLocation = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, tnp_config_1.config.folder.src));
1510
+ var releaseSrcLocationOrg = (0, tnp_core_1.crossPlatformPath)(tnp_core_3.path.join(this.location, this.tmpSrcDistReleaseFolder));
1511
+ tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocationOrg);
1512
+ tnp_helpers_1.Helpers.copy(releaseSrcLocation, releaseSrcLocationOrg, {
1513
+ copySymlinksAsFiles: true,
1514
+ copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst: true,
1515
+ recursive: true,
1516
+ });
1517
+ tnp_helpers_1.Helpers.removeFolderIfExists(releaseSrcLocation);
1518
+ tnp_helpers_1.Helpers.copy(releaseSrcLocationOrg, releaseSrcLocation);
1519
+ var filesForModyficaiton = tnp_core_4.glob.sync("".concat(releaseSrcLocation, "/**/*"));
1520
+ filesForModyficaiton
1521
+ .filter(function (absolutePath) { return !tnp_helpers_1.Helpers.isFolder(absolutePath) && tnp_config_1.extAllowedToReplace.includes(tnp_core_3.path.extname(absolutePath)); })
1522
+ .forEach(function (absolutePath) {
1523
+ var rawContent = tnp_helpers_1.Helpers.readFile(absolutePath);
1524
+ rawContent = isomorphic_region_loader_1.RegionRemover.from(absolutePath, rawContent, [tnp_config_1.TAGS.NOT_FOR_NPM], _this.project).output;
1525
+ // rawContent = this.replaceRegionsWith(rawContent, ['@notFor'+'Npm']);
1526
+ tnp_helpers_1.Helpers.writeFile(absolutePath, rawContent);
1527
+ });
1528
+ //#endregion
1529
+ };
1530
+ var ProjectIsomorphicLib_1;
1531
+ ProjectIsomorphicLib = ProjectIsomorphicLib_1 = tslib_1.__decorate([
1532
+ typescript_class_helpers_1.CLASS.NAME('ProjectIsomorphicLib')
1533
+ ], ProjectIsomorphicLib);
1534
+ return ProjectIsomorphicLib;
1535
+ }(Project
1536
+ //#endregion
1537
+ ));
1538
+ //#endregion
1539
+ //#region PROJECT NAVI
1540
+ /**
1541
+ * DO NOT USE environment variables in this project directly
1542
+ */
1543
+ //#region @backend
1544
+ var ProjectNavi = exports.ProjectNavi = /** @class */ (function (_super) {
1545
+ tslib_1.__extends(ProjectNavi, _super);
1546
+ //#endregion
1547
+ function ProjectNavi() {
1548
+ return _super !== null && _super.apply(this, arguments) || this;
1549
+ }
1550
+ ProjectNavi.prototype.buildLib = function () {
1551
+ return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
1552
+ return [2 /*return*/];
1553
+ }); });
1554
+ };
1555
+ ProjectNavi.prototype.projectSpecyficFiles = function () {
1556
+ //#region @backendFunc
1557
+ return [];
1558
+ //#endregion
1559
+ };
1560
+ ProjectNavi.prototype.buildSteps = function (buildOptions) {
1561
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1562
+ return tslib_1.__generator(this, function (_a) {
1563
+ //#region @backend
1564
+ throw new Error("Method not implemented.");
1565
+ });
1566
+ });
1567
+ };
1568
+ ProjectNavi.prototype.startOnCommand = function (args) {
1569
+ //#region @backendFunc
1570
+ throw new Error("Method not implemented.");
1571
+ //#endregion
1572
+ };
1573
+ ProjectNavi = tslib_1.__decorate([
1574
+ typescript_class_helpers_1.CLASS.NAME('ProjectNavi')
1575
+ //#endregion
1576
+ ], ProjectNavi);
1577
+ return ProjectNavi;
1578
+ }(Project));
1579
+ //#endregion
1580
+ //#region PROJECT SCENARIO REQ RES
1581
+ /**
1582
+ * DO NOT USE environment variables in this project directly
1583
+ */
1584
+ //#region @backend
1585
+ var ProjectScenarioReqRes = exports.ProjectScenarioReqRes = /** @class */ (function (_super) {
1586
+ tslib_1.__extends(ProjectScenarioReqRes, _super);
1587
+ //#endregion
1588
+ function ProjectScenarioReqRes() {
1589
+ return _super !== null && _super.apply(this, arguments) || this;
1590
+ }
1591
+ ProjectScenarioReqRes.prototype.buildLib = function () {
1592
+ return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
1593
+ return [2 /*return*/];
1594
+ }); });
1595
+ };
1596
+ ProjectScenarioReqRes.prototype.projectSpecyficFiles = function () {
1597
+ //#region @backendFunc
1598
+ return [];
1599
+ //#endregion
1600
+ };
1601
+ ProjectScenarioReqRes.prototype.buildSteps = function (buildOptions) {
1602
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1603
+ return tslib_1.__generator(this, function (_a) {
1604
+ //#region @backend
1605
+ throw new Error("Method not implemented.");
1606
+ });
1607
+ });
1608
+ };
1609
+ ProjectScenarioReqRes.prototype.startOnCommand = function (args) {
1610
+ //#region @backendFunc
1611
+ throw new Error("Method not implemented.");
1612
+ //#endregion
1613
+ };
1614
+ ProjectScenarioReqRes = tslib_1.__decorate([
1615
+ typescript_class_helpers_1.CLASS.NAME('ProjectScenarioReqRes')
1616
+ //#endregion
1617
+ ], ProjectScenarioReqRes);
1618
+ return ProjectScenarioReqRes;
1619
+ }(Project));
1620
+ //#endregion
1621
+ //#region UNKNOW NPM PROJEC
1622
+ /**
1623
+ * DO NOT USE environment variables in this project directly
1624
+ */
1625
+ //#region @backend
1626
+ var ProjectUnknowNpm = exports.ProjectUnknowNpm = /** @class */ (function (_super) {
1627
+ tslib_1.__extends(ProjectUnknowNpm, _super);
1628
+ //#endregion
1629
+ function ProjectUnknowNpm() {
1630
+ return _super !== null && _super.apply(this, arguments) || this;
1631
+ }
1632
+ ProjectUnknowNpm.prototype.buildLib = function () {
1633
+ return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
1634
+ return [2 /*return*/];
1635
+ }); });
1636
+ };
1637
+ ProjectUnknowNpm.prototype.projectSpecyficFiles = function () {
1638
+ //#region @backendFunc
1639
+ this.children;
1640
+ return [];
1641
+ //#endregion
1642
+ };
1643
+ ProjectUnknowNpm.prototype.buildSteps = function (buildOptions) {
1644
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1645
+ return tslib_1.__generator(this, function (_a) {
1646
+ //#region @backend
1647
+ throw new Error("Method not implemented.");
1648
+ });
1649
+ });
1650
+ };
1651
+ ProjectUnknowNpm.prototype.startOnCommand = function (args) {
1652
+ //#region @backendFunc
1653
+ throw new Error("Method not implemented.");
1654
+ //#endregion
1655
+ };
1656
+ ProjectUnknowNpm = tslib_1.__decorate([
1657
+ typescript_class_helpers_1.CLASS.NAME('ProjectUnknowNpm')
1658
+ //#endregion
1659
+ ], ProjectUnknowNpm);
1660
+ return ProjectUnknowNpm;
1661
+ }(Project));
1662
+ //#endregion
1663
+ //#region VSCODE EXT PROJECT
1664
+ /**
1665
+ * DO NOT USE environment variables in this project directly
1666
+ */
1667
+ //#region @backend
1668
+ var ProjectVscodeExt = exports.ProjectVscodeExt = /** @class */ (function (_super) {
1669
+ tslib_1.__extends(ProjectVscodeExt, _super);
1670
+ //#endregion
1671
+ function ProjectVscodeExt() {
1672
+ return _super !== null && _super.apply(this, arguments) || this;
1673
+ }
1674
+ ProjectVscodeExt.prototype.buildLib = function () {
1675
+ return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
1676
+ return [2 /*return*/];
1677
+ }); });
1678
+ };
1679
+ ProjectVscodeExt.prototype.recreateIfNotExists = function () {
1680
+ return [
1681
+ 'src/config.ts',
1682
+ ];
1683
+ };
1684
+ ProjectVscodeExt.prototype.projectSpecyficFiles = function () {
1685
+ //#region @backendFunc
1686
+ return tslib_1.__spreadArray(tslib_1.__spreadArray([
1687
+ '.vscode/tasks.json',
1688
+ '.vscode/launch.json',
1689
+ '.vscodeignore',
1690
+ 'vsc-extension-quickstart.md',
1691
+ 'tsconfig.json',
1692
+ 'update-proj.js'
1693
+ ], tslib_1.__read(this.projectSpecyficFilesLinked()), false), tslib_1.__read(this.recreateIfNotExists()), false);
1694
+ //#endregion
1695
+ };
1696
+ ProjectVscodeExt.prototype.projectSpecyficFilesLinked = function () {
1697
+ //#region @backendFunc
1698
+ var files = [
1699
+ 'src/extension.ts',
1700
+ 'src/helpers.ts',
1701
+ 'src/helpers-vscode.ts',
1702
+ 'src/models.ts',
1703
+ 'src/execute-command.ts',
1704
+ 'src/progress-output.ts',
1705
+ ];
1706
+ if (this.frameworkVersionAtLeast('v3')) {
1707
+ files = files.filter(function (f) { return f !== 'src/helpers-vscode.ts'; });
1708
+ }
1709
+ return files;
1710
+ //#endregion
1711
+ };
1712
+ ProjectVscodeExt.prototype.buildSteps = function (buildOptions) {
1713
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1714
+ return tslib_1.__generator(this, function (_a) {
1715
+ //#region @backend
1716
+ try {
1717
+ if (buildOptions.watch) {
1718
+ this.run("npm-run tsc -p ./").sync();
1719
+ this.run("node update-proj.js --watch").async();
1720
+ this.run("npm-run tsc -watch -p ./").async();
1721
+ }
1722
+ else {
1723
+ this.run("npm-run tsc -p ./").sync();
1724
+ this.run("node update-proj.js").sync();
1725
+ }
1726
+ }
1727
+ catch (error) {
1728
+ tnp_helpers_1.Helpers.error("Not able to build extension...", false, true);
1729
+ }
1730
+ return [2 /*return*/];
1731
+ });
1732
+ });
1733
+ };
1734
+ ProjectVscodeExt.prototype.startOnCommand = function (args) {
1735
+ //#region @backendFunc
1736
+ throw new Error("Method not implemented.");
1737
+ //#endregion
1738
+ };
1739
+ ProjectVscodeExt = tslib_1.__decorate([
1740
+ typescript_class_helpers_1.CLASS.NAME('ProjectVscodeExt')
1741
+ //#endregion
1742
+ ], ProjectVscodeExt);
1743
+ return ProjectVscodeExt;
1744
+ }(Project));
1745
+ //#endregion
280
1746
  //# sourceMappingURL=project.js.map