tnp 19.0.19 → 19.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (587) hide show
  1. package/browser/fesm2022/tnp.mjs +2 -4
  2. package/browser/fesm2022/tnp.mjs.map +1 -1
  3. package/browser/lib/build-info._auto-generated_.d.ts +1 -1
  4. package/browser/lib/models.d.ts +9 -0
  5. package/browser/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -1
  6. package/browser/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +1 -1
  7. package/browser/lib/project/abstract/artifacts/base-artifact.d.ts +1 -0
  8. package/browser/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.d.ts +1 -0
  9. package/browser/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  10. package/browser/lib/project/abstract/git.d.ts +1 -0
  11. package/browser/lib/project/abstract/taonJson.d.ts +1 -0
  12. package/browser/package.json +1 -1
  13. package/cli.js +840 -602
  14. package/client/fesm2022/tnp.mjs +2 -4
  15. package/client/fesm2022/tnp.mjs.map +1 -1
  16. package/client/lib/build-info._auto-generated_.d.ts +1 -1
  17. package/client/lib/models.d.ts +9 -0
  18. package/client/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -1
  19. package/client/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +1 -1
  20. package/client/lib/project/abstract/artifacts/base-artifact.d.ts +1 -0
  21. package/client/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.d.ts +1 -0
  22. package/client/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  23. package/client/lib/project/abstract/git.d.ts +1 -0
  24. package/client/lib/project/abstract/taonJson.d.ts +1 -0
  25. package/client/package.json +1 -1
  26. package/lib/build-info._auto-generated_.d.ts +1 -1
  27. package/lib/build-info._auto-generated_.js +1 -1
  28. package/lib/build-options.d.ts +164 -0
  29. package/lib/build-options.js +198 -0
  30. package/lib/build-options.js.map +1 -0
  31. package/lib/constants.js +1 -3
  32. package/lib/constants.js.map +1 -1
  33. package/lib/helpers.js +2 -2
  34. package/lib/models.d.ts +9 -0
  35. package/lib/models.js.map +1 -1
  36. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.d.ts +3 -5
  37. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.js +62 -76
  38. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.js.map +1 -1
  39. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -1
  40. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js +20 -31
  41. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js.map +1 -1
  42. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.d.ts +5 -0
  43. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.js +111 -0
  44. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.js.map +1 -0
  45. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.js +6 -55
  46. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.js.map +1 -1
  47. package/lib/project/abstract/artifacts/angular-node-app/tools/basename-manager.js +3 -1
  48. package/lib/project/abstract/artifacts/angular-node-app/tools/basename-manager.js.map +1 -1
  49. package/lib/project/abstract/artifacts/artifact-angular-node-app/artifact-angular-node-app.d.ts +9 -0
  50. package/lib/project/abstract/artifacts/artifact-angular-node-app/index.d.ts +1 -0
  51. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.d.ts +7 -0
  52. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.js +62 -0
  53. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.js.map +1 -0
  54. package/lib/project/abstract/artifacts/artifact-angular-node-app.d.ts +9 -0
  55. package/lib/project/abstract/artifacts/artifact-angular-node-app.js +62 -0
  56. package/lib/project/abstract/artifacts/artifact-angular-node-app.js.map +1 -0
  57. package/lib/project/abstract/artifacts/artifact-angular-webapp.d.ts +7 -0
  58. package/lib/project/abstract/artifacts/artifact-angular-webapp.js +62 -0
  59. package/lib/project/abstract/artifacts/artifact-angular-webapp.js.map +1 -0
  60. package/lib/project/abstract/artifacts/artifact-docs-webapp.d.ts +7 -0
  61. package/lib/project/abstract/artifacts/artifact-docs-webapp.js +5 -0
  62. package/lib/project/abstract/artifacts/artifact-docs-webapp.js.map +1 -0
  63. package/lib/project/abstract/artifacts/artifact-electron-app copy.d.ts +1 -0
  64. package/lib/project/abstract/artifacts/artifact-electron-app copy.js +5 -0
  65. package/lib/project/abstract/artifacts/artifact-electron-app copy.js.map +1 -0
  66. package/lib/project/abstract/artifacts/artifact-electron-app.d.ts +8 -0
  67. package/lib/project/abstract/artifacts/artifact-electron-app.js +5 -0
  68. package/lib/project/abstract/artifacts/artifact-electron-app.js.map +1 -0
  69. package/lib/project/abstract/artifacts/artifact-lib-cli.d.ts +1 -0
  70. package/lib/project/abstract/artifacts/artifact-lib-cli.js +5 -0
  71. package/lib/project/abstract/artifacts/artifact-lib-cli.js.map +1 -0
  72. package/lib/project/abstract/artifacts/artifact-lib-with-cli.d.ts +1 -0
  73. package/lib/project/abstract/artifacts/artifact-lib-with-cli.js +5 -0
  74. package/lib/project/abstract/artifacts/artifact-lib-with-cli.js.map +1 -0
  75. package/lib/project/abstract/artifacts/artifact-mk-docs-webapp.d.ts +7 -0
  76. package/lib/project/abstract/artifacts/artifact-mobile-app copy.d.ts +1 -0
  77. package/lib/project/abstract/artifacts/artifact-mobile-app copy.js +5 -0
  78. package/lib/project/abstract/artifacts/artifact-mobile-app copy.js.map +1 -0
  79. package/lib/project/abstract/artifacts/artifact-mobile-app.d.ts +7 -0
  80. package/lib/project/abstract/artifacts/artifact-mobile-app.js +5 -0
  81. package/lib/project/abstract/artifacts/artifact-mobile-app.js.map +1 -0
  82. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.d.ts +25 -0
  83. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.js +5 -0
  84. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.js.map +1 -0
  85. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.d.ts +1 -0
  86. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.js +5 -0
  87. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.js.map +1 -0
  88. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.d.ts +1 -0
  89. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.js +5 -0
  90. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.js.map +1 -0
  91. package/lib/project/abstract/artifacts/artifact-vscode-ext.d.ts +1 -0
  92. package/lib/project/abstract/artifacts/artifact-vscode-ext.js +5 -0
  93. package/lib/project/abstract/artifacts/artifact-vscode-ext.js.map +1 -0
  94. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.d.ts +1 -0
  95. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.js +5 -0
  96. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.js.map +1 -0
  97. package/lib/project/abstract/artifacts/artifact-vscode-plugin.d.ts +9 -0
  98. package/lib/project/abstract/artifacts/artifact-vscode-plugin.js +5 -0
  99. package/lib/project/abstract/artifacts/artifact-vscode-plugin.js.map +1 -0
  100. package/lib/project/abstract/artifacts/artifact-webapp.d.ts +1 -0
  101. package/lib/project/abstract/artifacts/artifact-webapp.js +5 -0
  102. package/lib/project/abstract/artifacts/artifact-webapp.js.map +1 -0
  103. package/lib/project/abstract/artifacts/artifacts-helpers.d.ts +2 -0
  104. package/lib/project/abstract/artifacts/base-artifact.d.ts +1 -0
  105. package/lib/project/abstract/artifacts/base-artifact.js +29 -0
  106. package/lib/project/abstract/artifacts/base-artifact.js.map +1 -1
  107. package/lib/project/abstract/artifacts/build-process-maanger.d.ts +38 -0
  108. package/lib/project/abstract/artifacts/build-process-maanger.js +269 -0
  109. package/lib/project/abstract/artifacts/build-process-maanger.js.map +1 -0
  110. package/lib/project/abstract/artifacts/build-process-manager.d.ts +0 -51
  111. package/lib/project/abstract/artifacts/build-process-manager.js +388 -415
  112. package/lib/project/abstract/artifacts/build-process-manager.js.map +1 -1
  113. package/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.d.ts +1 -0
  114. package/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.js +68 -8
  115. package/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.js.map +1 -1
  116. package/lib/project/abstract/artifacts/docs-webapp/docs.js +1 -1
  117. package/lib/project/abstract/artifacts/docs-webapp/docs.js.map +1 -1
  118. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.js +7 -0
  119. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.js.map +1 -1
  120. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/browser-code-cut.js +13 -12
  121. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/browser-code-cut.js.map +1 -1
  122. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  123. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.js +6 -10
  124. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.js.map +1 -1
  125. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.d.ts +49 -0
  126. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.js +335 -0
  127. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.js.map +1 -0
  128. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization.js +2 -2
  129. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-standalone.js +6 -2
  130. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-standalone.js.map +1 -1
  131. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/source-maping-url.js +0 -1
  132. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/source-maping-url.js.map +1 -1
  133. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/files-recreation/files-recreator.js +4 -7
  134. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/files-recreation/files-recreator.js.map +1 -1
  135. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/inside-structures/structs/inside-struct-helpers.js +14 -1
  136. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/inside-structures/structs/inside-struct-helpers.js.map +1 -1
  137. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/inside-structures/structs/loaders/image-loader.js +4 -3
  138. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/inside-structures/structs/loaders/image-loader.js.map +1 -1
  139. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/lib-project/lib-project-smart-container.js +2 -2
  140. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.d.ts +17 -0
  141. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.js +383 -0
  142. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.js.map +1 -0
  143. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.js +2 -2
  144. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/webpack-backend-compilation.js +2 -2
  145. package/lib/project/abstract/base-compiler-for-project.backend.d.ts +6 -0
  146. package/lib/project/abstract/base-compiler-for-project.backend.js +57 -0
  147. package/lib/project/abstract/base-compiler-for-project.backend.js.map +1 -0
  148. package/lib/project/abstract/base-local-release.d.ts +7 -0
  149. package/lib/project/abstract/base-local-release.js +110 -0
  150. package/lib/project/abstract/base-local-release.js.map +1 -0
  151. package/lib/project/abstract/docs.d.ts +51 -0
  152. package/lib/project/abstract/docs.js +813 -0
  153. package/lib/project/abstract/docs.js.map +1 -0
  154. package/lib/project/abstract/git.d.ts +1 -0
  155. package/lib/project/abstract/git.js +30 -3
  156. package/lib/project/abstract/git.js.map +1 -1
  157. package/lib/project/abstract/migrations-helper.d.ts +18 -0
  158. package/lib/project/abstract/migrations-helper.js +124 -0
  159. package/lib/project/abstract/migrations-helper.js.map +1 -0
  160. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app copy.d.ts +0 -0
  161. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app.d.ts +4 -0
  162. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app.js +19 -0
  163. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app.js.map +1 -0
  164. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp copy.d.ts +0 -0
  165. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp.d.ts +4 -0
  166. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp.js +19 -0
  167. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp.js.map +1 -0
  168. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.d.ts +4 -0
  169. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.js +19 -0
  170. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.js.map +1 -0
  171. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-appy.d.ts +0 -0
  172. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-nodejs-webapp copy.d.ts +0 -0
  173. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-nodejs-webapp.d.ts +0 -0
  174. package/lib/project/abstract/release-process/artifacts/artifact-release-mkdocs-docs-webapp.d.ts +4 -0
  175. package/lib/project/abstract/release-process/artifacts/artifact-release-mkdocs-docs-webapp.js +19 -0
  176. package/lib/project/abstract/release-process/artifacts/artifact-release-mkdocs-docs-webapp.js.map +1 -0
  177. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.d.ts +4 -0
  178. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.js +19 -0
  179. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.js.map +1 -0
  180. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-and-cli-tool-package.d.ts +6 -0
  181. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-cli-package.d.ts +0 -0
  182. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-pkg-and-cli-tool.d.ts +4 -0
  183. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-pkg-and-cli-tool.js +19 -0
  184. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-pkg-and-cli-tool.js.map +1 -0
  185. package/lib/project/abstract/release-process/artifacts/artifact-release-process-angular-electron-app.d.ts +0 -0
  186. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension copy.d.ts +6 -0
  187. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.d.ts +4 -0
  188. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.js +19 -0
  189. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.js.map +1 -0
  190. package/lib/project/abstract/release-process/artifacts/artifact-release.d.ts +14 -0
  191. package/lib/project/abstract/release-process/artifacts/artifact-release.js +28 -0
  192. package/lib/project/abstract/release-process/artifacts/artifact-release.js.map +1 -0
  193. package/lib/project/abstract/release-process/artifacts/base-artifact-release-process.d.ts +0 -0
  194. package/lib/project/abstract/release-process/artifacts/base-artifact-release.d.ts +6 -0
  195. package/lib/project/abstract/release-process/artifacts/release-angular-nodejs-webapp.d.ts +0 -0
  196. package/lib/project/abstract/release-process/artifacts/release-npm-lib-cli-package copy.d.ts +0 -0
  197. package/lib/project/abstract/release-process/artifacts/release-npm-lib-cli-package.d.ts +0 -0
  198. package/lib/project/abstract/release-process/artifacts/release-process-angular-electron-app.d.ts +0 -0
  199. package/lib/project/abstract/release-process/artifacts copy/artifact-release-angular-nodejs-webapp.d.ts +0 -0
  200. package/lib/project/abstract/release-process/artifacts copy/artifact-release-npm-lib-cli-package.d.ts +0 -0
  201. package/lib/project/abstract/release-process/release-npm-lib-cli-package.d.ts +0 -0
  202. package/lib/project/abstract/release-process/release-process copy.d.ts +10 -0
  203. package/lib/project/abstract/release-process/release-process-artifact-npm-lib-cli.d.ts +0 -0
  204. package/lib/project/abstract/release-process/release-process-cloud.d.ts +7 -0
  205. package/lib/project/abstract/release-process/release-process-cloud.js +23 -0
  206. package/lib/project/abstract/release-process/release-process-cloud.js.map +1 -0
  207. package/lib/project/abstract/release-process/release-process-local.d.ts +7 -0
  208. package/lib/project/abstract/release-process/release-process-local.js +23 -0
  209. package/lib/project/abstract/release-process/release-process-local.js.map +1 -0
  210. package/lib/project/abstract/release-process/release-process-manual.d.ts +7 -0
  211. package/lib/project/abstract/release-process/release-process-manual.js +23 -0
  212. package/lib/project/abstract/release-process/release-process-manual.js.map +1 -0
  213. package/lib/project/abstract/taon-worker/index.d.ts +1 -0
  214. package/lib/project/abstract/taon-worker/index.js +5 -0
  215. package/lib/project/abstract/taon-worker/index.js.map +1 -0
  216. package/lib/project/abstract/taon-worker/taon-build.entity copy.d.ts +8 -0
  217. package/lib/project/abstract/taon-worker/taon-build.entity copy.js +50 -0
  218. package/lib/project/abstract/taon-worker/taon-build.entity copy.js.map +1 -0
  219. package/lib/project/abstract/taon-worker/taon-project.entity copy.d.ts +5 -0
  220. package/lib/project/abstract/taon-worker/taon-project.entity copy.js +37 -0
  221. package/lib/project/abstract/taon-worker/taon-project.entity copy.js.map +1 -0
  222. package/lib/project/abstract/taon-worker/taon-termina-ui.d.ts +20 -0
  223. package/lib/project/abstract/taon-worker/taon-termina-ui.js +67 -0
  224. package/lib/project/abstract/taon-worker/taon-termina-ui.js.map +1 -0
  225. package/lib/project/abstract/taon-worker/taon.context.d.ts +2 -2
  226. package/lib/project/abstract/taon-worker/taon.entity.d.ts +6 -0
  227. package/lib/project/abstract/taon-worker/taon.entity.js +46 -0
  228. package/lib/project/abstract/taon-worker/taon.entity.js.map +1 -0
  229. package/lib/project/abstract/taon-worker.d.ts +29 -0
  230. package/lib/project/abstract/taon-worker.js +4 -0
  231. package/lib/project/abstract/taon-worker.js.map +1 -0
  232. package/lib/project/abstract/taonJson.d.ts +1 -0
  233. package/lib/project/abstract/taonJson.js +10 -0
  234. package/lib/project/abstract/taonJson.js.map +1 -1
  235. package/lib/project/abstract/vscode.js +1 -1
  236. package/lib/project/abstract/vscode.js.map +1 -1
  237. package/lib/project/cli/cli-BRANDING.backend.d.ts +26 -0
  238. package/lib/project/cli/cli-BRANDING.backend.js +50 -0
  239. package/lib/project/cli/cli-BRANDING.backend.js.map +1 -0
  240. package/lib/project/cli/cli-BUILD.backend.d.ts +4 -0
  241. package/lib/project/cli/cli-BUILD.backend.js +269 -0
  242. package/lib/project/cli/cli-BUILD.backend.js.map +1 -0
  243. package/lib/project/cli/cli-BUILD.js +2 -4
  244. package/lib/project/cli/cli-BUILD.js.map +1 -1
  245. package/lib/project/cli/cli-CI-BUILD.backend.d.ts +4 -0
  246. package/lib/project/cli/cli-CI-BUILD.backend.js +88 -0
  247. package/lib/project/cli/cli-CI-BUILD.backend.js.map +1 -0
  248. package/lib/project/cli/cli-DOCS.backend.d.ts +4 -0
  249. package/lib/project/cli/cli-DOCS.backend.js +48 -0
  250. package/lib/project/cli/cli-DOCS.backend.js.map +1 -0
  251. package/lib/project/cli/cli-DOCS.js +5 -5
  252. package/lib/project/cli/cli-DOCS.js.map +1 -1
  253. package/lib/project/cli/cli-ELECTRON.backend.d.ts +4 -0
  254. package/lib/project/cli/cli-ELECTRON.backend.js +80 -0
  255. package/lib/project/cli/cli-ELECTRON.backend.js.map +1 -0
  256. package/lib/project/cli/cli-GENERATE.js +1 -1
  257. package/lib/project/cli/cli-GENERATE.js.map +1 -1
  258. package/lib/project/cli/cli-INIT.backend.d.ts +16 -0
  259. package/lib/project/cli/cli-INIT.backend.js +179 -0
  260. package/lib/project/cli/cli-INIT.backend.js.map +1 -0
  261. package/lib/project/cli/cli-LINK.backend.d.ts +21 -0
  262. package/lib/project/cli/cli-LINK.backend.js +204 -0
  263. package/lib/project/cli/cli-LINK.backend.js.map +1 -0
  264. package/lib/project/cli/cli-LINK.d.ts +1 -1
  265. package/lib/project/cli/cli-LINK.js +19 -6
  266. package/lib/project/cli/cli-LINK.js.map +1 -1
  267. package/lib/project/cli/cli-LOCAL-RELEASE.backend.d.ts +17 -0
  268. package/lib/project/cli/cli-LOCAL-RELEASE.backend.js +240 -0
  269. package/lib/project/cli/cli-LOCAL-RELEASE.backend.js.map +1 -0
  270. package/lib/project/cli/cli-LOCAL-RELEASE.d.ts +0 -0
  271. package/lib/project/cli/cli-LOCAL-RELEASE.js +184 -0
  272. package/lib/project/cli/cli-LOCAL-RELEASE.js.map +1 -0
  273. package/lib/project/cli/cli-MIGRATION.backend.d.ts +4 -0
  274. package/lib/project/cli/cli-MIGRATION.backend.js +213 -0
  275. package/lib/project/cli/cli-MIGRATION.backend.js.map +1 -0
  276. package/lib/project/cli/cli-NEW.backend.d.ts +18 -0
  277. package/lib/project/cli/cli-NEW.backend.js +393 -0
  278. package/lib/project/cli/cli-NEW.backend.js.map +1 -0
  279. package/lib/project/cli/cli-OPEN.backend.d.ts +17 -0
  280. package/lib/project/cli/cli-OPEN.backend.js +129 -0
  281. package/lib/project/cli/cli-OPEN.backend.js.map +1 -0
  282. package/lib/project/cli/cli-RELEASE.backend.d.ts +4 -0
  283. package/lib/project/cli/cli-RELEASE.backend.js +415 -0
  284. package/lib/project/cli/cli-RELEASE.backend.js.map +1 -0
  285. package/lib/project/cli/cli-SERVICE.backend.d.ts +9 -0
  286. package/lib/project/cli/cli-SERVICE.backend.js +38 -0
  287. package/lib/project/cli/cli-SERVICE.backend.js.map +1 -0
  288. package/lib/project/cli/cli-START.backend.d.ts +2 -0
  289. package/lib/project/cli/cli-START.backend.js +4 -0
  290. package/lib/project/cli/cli-START.backend.js.map +1 -0
  291. package/lib/project/cli/cli-TEST.backend.d.ts +24 -0
  292. package/lib/project/cli/cli-TEST.backend.js +292 -0
  293. package/lib/project/cli/cli-TEST.backend.js.map +1 -0
  294. package/lib/project/cli/cli-TS.backend.d.ts +9 -0
  295. package/lib/project/cli/cli-TS.backend.js +29 -0
  296. package/lib/project/cli/cli-TS.backend.js.map +1 -0
  297. package/lib/project/cli/cli-UPDATE.backend.d.ts +2 -0
  298. package/lib/project/cli/cli-UPDATE.backend.js +4 -0
  299. package/lib/project/cli/cli-UPDATE.backend.js.map +1 -0
  300. package/lib/project/cli/cli-VSCODE.backend.d.ts +20 -0
  301. package/lib/project/cli/cli-VSCODE.backend.js +153 -0
  302. package/lib/project/cli/cli-VSCODE.backend.js.map +1 -0
  303. package/lib/project/cli/cli-_GLOBAL_.backend.d.ts +91 -0
  304. package/lib/project/cli/cli-_GLOBAL_.backend.js +1730 -0
  305. package/lib/project/cli/cli-_GLOBAL_.backend.js.map +1 -0
  306. package/lib/project/cli/cli-_GLOBAL_.js +1 -1
  307. package/lib/project/cli/cli-_GLOBAL_.js.map +1 -1
  308. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.d.ts +21 -0
  309. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js +150 -0
  310. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js.map +1 -0
  311. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.d.ts +102 -0
  312. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js +990 -0
  313. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js.map +1 -0
  314. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.d.ts +41 -0
  315. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js +85 -0
  316. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js.map +1 -0
  317. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +44 -0
  318. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.js +98 -0
  319. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.js.map +1 -0
  320. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.d.ts +1 -0
  321. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.js +18 -0
  322. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.js.map +1 -0
  323. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.d.ts +14 -0
  324. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.js +159 -0
  325. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.js.map +1 -0
  326. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.d.ts +60 -0
  327. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js +284 -0
  328. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js.map +1 -0
  329. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.d.ts +42 -0
  330. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js +232 -0
  331. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js.map +1 -0
  332. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.d.ts +18 -0
  333. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js +165 -0
  334. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js.map +1 -0
  335. package/lib/project/compilers/index.d.ts +1 -0
  336. package/lib/project/compilers/index.js +8 -0
  337. package/lib/project/compilers/index.js.map +1 -0
  338. package/lib/project/features/assets-manager.backend.d.ts +5 -0
  339. package/lib/project/features/assets-manager.backend.js +110 -0
  340. package/lib/project/features/assets-manager.backend.js.map +1 -0
  341. package/lib/project/features/basename-manager.d.ts +18 -0
  342. package/lib/project/features/basename-manager.js +89 -0
  343. package/lib/project/features/basename-manager.js.map +1 -0
  344. package/lib/project/features/branding.backend.d.ts +11 -0
  345. package/lib/project/features/branding.backend.js +213 -0
  346. package/lib/project/features/branding.backend.js.map +1 -0
  347. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.d.ts +14 -0
  348. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.js +44 -0
  349. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.js.map +1 -0
  350. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.d.ts +0 -0
  351. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.js +2 -0
  352. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.js.map +1 -0
  353. package/lib/project/features/build-process/app/build-process/build-process.controller.d.ts +20 -0
  354. package/lib/project/features/build-process/app/build-process/build-process.controller.js +159 -0
  355. package/lib/project/features/build-process/app/build-process/build-process.controller.js.map +1 -0
  356. package/lib/project/features/build-process/app/build-process/build-process.d.ts +12 -0
  357. package/lib/project/features/build-process/app/build-process/build-process.js +56 -0
  358. package/lib/project/features/build-process/app/build-process/build-process.js.map +1 -0
  359. package/lib/project/features/build-process/app/build-process/index.d.ts +2 -0
  360. package/lib/project/features/build-process/app/build-process/index.js +6 -0
  361. package/lib/project/features/build-process/app/build-process/index.js.map +1 -0
  362. package/lib/project/features/copy-manager/base-copy-manager.backend.d.ts +87 -0
  363. package/lib/project/features/copy-manager/base-copy-manager.backend.js +504 -0
  364. package/lib/project/features/copy-manager/base-copy-manager.backend.js.map +1 -0
  365. package/lib/project/features/copy-manager/copy-manager-helpers.backend.d.ts +12 -0
  366. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js +96 -0
  367. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js.map +1 -0
  368. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.d.ts +49 -0
  369. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js +321 -0
  370. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js.map +1 -0
  371. package/lib/project/features/copy-manager/copy-manager-organization.backend.d.ts +78 -0
  372. package/lib/project/features/copy-manager/copy-manager-organization.backend.js +788 -0
  373. package/lib/project/features/copy-manager/copy-manager-organization.backend.js.map +1 -0
  374. package/lib/project/features/copy-manager/copy-manager-standalone.backend.d.ts +77 -0
  375. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js +575 -0
  376. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js.map +1 -0
  377. package/lib/project/features/copy-manager/copy-manager.backend.d.ts +7 -0
  378. package/lib/project/features/copy-manager/copy-manager.backend.js +27 -0
  379. package/lib/project/features/copy-manager/copy-manager.backend.js.map +1 -0
  380. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.d.ts +46 -0
  381. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js +354 -0
  382. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js.map +1 -0
  383. package/lib/project/features/copy-manager/source-maping-url.backend.d.ts +12 -0
  384. package/lib/project/features/copy-manager/source-maping-url.backend.js +56 -0
  385. package/lib/project/features/copy-manager/source-maping-url.backend.js.map +1 -0
  386. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.d.ts +25 -0
  387. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js +97 -0
  388. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js.map +1 -0
  389. package/lib/project/features/docs-app-build-config.backend.d.ts +19 -0
  390. package/lib/project/features/docs-app-build-config.backend.js +81 -0
  391. package/lib/project/features/docs-app-build-config.backend.js.map +1 -0
  392. package/lib/project/features/docs-provider.d.ts +9 -0
  393. package/lib/project/features/docs-provider.js +48 -0
  394. package/lib/project/features/docs-provider.js.map +1 -0
  395. package/lib/project/features/documentation-builder.d.ts +0 -0
  396. package/lib/project/features/documentation-builder.js +5 -0
  397. package/lib/project/features/documentation-builder.js.map +1 -0
  398. package/lib/project/features/environment-config/environment-config-helpers.d.ts +6 -0
  399. package/lib/project/features/environment-config/environment-config-helpers.js +197 -0
  400. package/lib/project/features/environment-config/environment-config-helpers.js.map +1 -0
  401. package/lib/project/features/environment-config/environment-config.d.ts +12 -0
  402. package/lib/project/features/environment-config/environment-config.js +117 -0
  403. package/lib/project/features/environment-config/environment-config.js.map +1 -0
  404. package/lib/project/features/environment-config/example-environment-config.d.ts +2 -0
  405. package/lib/project/features/environment-config/example-environment-config.js +26 -0
  406. package/lib/project/features/environment-config/example-environment-config.js.map +1 -0
  407. package/lib/project/features/files-recreation/files-factory.backend.d.ts +11 -0
  408. package/lib/project/features/files-recreation/files-factory.backend.js +64 -0
  409. package/lib/project/features/files-recreation/files-factory.backend.js.map +1 -0
  410. package/lib/project/features/files-recreation/files-recreator.d.ts +113 -0
  411. package/lib/project/features/files-recreation/files-recreator.js +661 -0
  412. package/lib/project/features/files-recreation/files-recreator.js.map +1 -0
  413. package/lib/project/features/files-recreation/files-templates.d.ts +8 -0
  414. package/lib/project/features/files-recreation/files-templates.js +129 -0
  415. package/lib/project/features/files-recreation/files-templates.js.map +1 -0
  416. package/lib/project/features/files-recreation/index.d.ts +3 -0
  417. package/lib/project/features/files-recreation/index.js +9 -0
  418. package/lib/project/features/files-recreation/index.js.map +1 -0
  419. package/lib/project/features/html-to-md.d.ts +1 -0
  420. package/lib/project/features/html-to-md.js +241 -0
  421. package/lib/project/features/html-to-md.js.map +1 -0
  422. package/lib/project/features/index-autogen-provider.backend.d.ts +14 -0
  423. package/lib/project/features/index-autogen-provider.backend.js +102 -0
  424. package/lib/project/features/index-autogen-provider.backend.js.map +1 -0
  425. package/lib/project/features/index.d.ts +12 -0
  426. package/lib/project/features/index.js +18 -0
  427. package/lib/project/features/index.js.map +1 -0
  428. package/lib/project/features/inside-structures/inside-struct.d.ts +43 -0
  429. package/lib/project/features/inside-structures/inside-struct.js +53 -0
  430. package/lib/project/features/inside-structures/inside-struct.js.map +1 -0
  431. package/lib/project/features/inside-structures/inside-structures.d.ts +11 -0
  432. package/lib/project/features/inside-structures/inside-structures.js +160 -0
  433. package/lib/project/features/inside-structures/inside-structures.js.map +1 -0
  434. package/lib/project/features/inside-structures/structs/base-inside-struct.d.ts +13 -0
  435. package/lib/project/features/inside-structures/structs/base-inside-struct.js +24 -0
  436. package/lib/project/features/inside-structures/structs/base-inside-struct.js.map +1 -0
  437. package/lib/project/features/inside-structures/structs/index.d.ts +2 -0
  438. package/lib/project/features/inside-structures/structs/index.js +6 -0
  439. package/lib/project/features/inside-structures/structs/index.js.map +1 -0
  440. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.d.ts +6 -0
  441. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js +495 -0
  442. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js.map +1 -0
  443. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.d.ts +6 -0
  444. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js +240 -0
  445. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js.map +1 -0
  446. package/lib/project/features/inside-structures/structs/inside-struct-constants.d.ts +2 -0
  447. package/lib/project/features/inside-structures/structs/inside-struct-constants.js +6 -0
  448. package/lib/project/features/inside-structures/structs/inside-struct-constants.js.map +1 -0
  449. package/lib/project/features/inside-structures/structs/inside-struct-helpers.d.ts +12 -0
  450. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js +128 -0
  451. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js.map +1 -0
  452. package/lib/project/features/inside-structures/structs/loaders/image-loader.d.ts +1 -0
  453. package/lib/project/features/inside-structures/structs/loaders/image-loader.js +9 -0
  454. package/lib/project/features/inside-structures/structs/loaders/image-loader.js.map +1 -0
  455. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.d.ts +1 -0
  456. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.js +10 -0
  457. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.js.map +1 -0
  458. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.d.ts +1 -0
  459. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.js +10 -0
  460. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.js.map +1 -0
  461. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.d.ts +1 -0
  462. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.js +10 -0
  463. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.js.map +1 -0
  464. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.d.ts +1 -0
  465. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.js +10 -0
  466. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.js.map +1 -0
  467. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.d.ts +1 -0
  468. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.js +10 -0
  469. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.js.map +1 -0
  470. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.d.ts +1 -0
  471. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.js +10 -0
  472. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.js.map +1 -0
  473. package/lib/project/features/inside-structures/structs/loaders/loaders.d.ts +1 -0
  474. package/lib/project/features/inside-structures/structs/loaders/loaders.js +27 -0
  475. package/lib/project/features/inside-structures/structs/loaders/loaders.js.map +1 -0
  476. package/lib/project/features/lib-project/lib-project-base.backend.d.ts +14 -0
  477. package/lib/project/features/lib-project/lib-project-base.backend.js +120 -0
  478. package/lib/project/features/lib-project/lib-project-base.backend.js.map +1 -0
  479. package/lib/project/features/lib-project/lib-project-smart-container.backend.d.ts +13 -0
  480. package/lib/project/features/lib-project/lib-project-smart-container.backend.js +320 -0
  481. package/lib/project/features/lib-project/lib-project-smart-container.backend.js.map +1 -0
  482. package/lib/project/features/lib-project/lib-project-standalone.backend.d.ts +13 -0
  483. package/lib/project/features/lib-project/lib-project-standalone.backend.js +269 -0
  484. package/lib/project/features/lib-project/lib-project-standalone.backend.js.map +1 -0
  485. package/lib/project/features/lib-project/lib-project-vscode-ext.d.ts +11 -0
  486. package/lib/project/features/lib-project/lib-project-vscode-ext.js +128 -0
  487. package/lib/project/features/lib-project/lib-project-vscode-ext.js.map +1 -0
  488. package/lib/project/features/linked-repos.backend.d.ts +19 -0
  489. package/lib/project/features/linked-repos.backend.js +198 -0
  490. package/lib/project/features/linked-repos.backend.js.map +1 -0
  491. package/lib/project/features/node-modules/index.d.ts +1 -0
  492. package/lib/project/features/node-modules/index.js +7 -0
  493. package/lib/project/features/node-modules/index.js.map +1 -0
  494. package/lib/project/features/node-modules/node-modules-helpers.backend.d.ts +3 -0
  495. package/lib/project/features/node-modules/node-modules-helpers.backend.js +159 -0
  496. package/lib/project/features/node-modules/node-modules-helpers.backend.js.map +1 -0
  497. package/lib/project/features/node-modules/node-modules.d.ts +29 -0
  498. package/lib/project/features/node-modules/node-modules.js +350 -0
  499. package/lib/project/features/node-modules/node-modules.js.map +1 -0
  500. package/lib/project/features/npm-packages/index.d.ts +1 -0
  501. package/lib/project/features/npm-packages/index.js +7 -0
  502. package/lib/project/features/npm-packages/index.js.map +1 -0
  503. package/lib/project/features/npm-packages/npm-packages-base.backend.d.ts +6 -0
  504. package/lib/project/features/npm-packages/npm-packages-base.backend.js +159 -0
  505. package/lib/project/features/npm-packages/npm-packages-base.backend.js.map +1 -0
  506. package/lib/project/features/npm-packages/npm-packages-core.backend.d.ts +15 -0
  507. package/lib/project/features/npm-packages/npm-packages-core.backend.js +166 -0
  508. package/lib/project/features/npm-packages/npm-packages-core.backend.js.map +1 -0
  509. package/lib/project/features/npm-packages/npm-packages-helpers.backend.d.ts +7 -0
  510. package/lib/project/features/npm-packages/npm-packages-helpers.backend.js +85 -0
  511. package/lib/project/features/npm-packages/npm-packages-helpers.backend.js.map +1 -0
  512. package/lib/project/features/npm-packages/npm-packages.d.ts +5 -0
  513. package/lib/project/features/npm-packages/npm-packages.js +72 -0
  514. package/lib/project/features/npm-packages/npm-packages.js.map +1 -0
  515. package/lib/project/features/package-json/index.d.ts +1 -0
  516. package/lib/project/features/package-json/index.js +5 -0
  517. package/lib/project/features/package-json/index.js.map +1 -0
  518. package/lib/project/features/package-json/package-json-base.backend.d.ts +31 -0
  519. package/lib/project/features/package-json/package-json-base.backend.js +157 -0
  520. package/lib/project/features/package-json/package-json-base.backend.js.map +1 -0
  521. package/lib/project/features/package-json/package-json-core.backend.d.ts +56 -0
  522. package/lib/project/features/package-json/package-json-core.backend.js +369 -0
  523. package/lib/project/features/package-json/package-json-core.backend.js.map +1 -0
  524. package/lib/project/features/package-json/package-json-deps-categories.backend.d.ts +17 -0
  525. package/lib/project/features/package-json/package-json-deps-categories.backend.js +145 -0
  526. package/lib/project/features/package-json/package-json-deps-categories.backend.js.map +1 -0
  527. package/lib/project/features/package-json/package-json-helpers.backend.d.ts +14 -0
  528. package/lib/project/features/package-json/package-json-helpers.backend.js +766 -0
  529. package/lib/project/features/package-json/package-json-helpers.backend.js.map +1 -0
  530. package/lib/project/features/package-json/package-json.d.ts +6 -0
  531. package/lib/project/features/package-json/package-json.js +66 -0
  532. package/lib/project/features/package-json/package-json.js.map +1 -0
  533. package/lib/project/features/package-recognition/packages-recognition.d.ts +13 -0
  534. package/lib/project/features/package-recognition/packages-recognition.js +187 -0
  535. package/lib/project/features/package-recognition/packages-recognition.js.map +1 -0
  536. package/lib/project/features/quick-fixes.d.ts +29 -0
  537. package/lib/project/features/quick-fixes.js +433 -0
  538. package/lib/project/features/quick-fixes.js.map +1 -0
  539. package/lib/project/features/singular-build.backend.d.ts +18 -0
  540. package/lib/project/features/singular-build.backend.js +375 -0
  541. package/lib/project/features/singular-build.backend.js.map +1 -0
  542. package/lib/project/features/target-project.backend.d.ts +10 -0
  543. package/lib/project/features/target-project.backend.js +189 -0
  544. package/lib/project/features/target-project.backend.js.map +1 -0
  545. package/lib/project/features/test-runner/cypress-test-runner.d.ts +7 -0
  546. package/lib/project/features/test-runner/cypress-test-runner.js +84 -0
  547. package/lib/project/features/test-runner/cypress-test-runner.js.map +1 -0
  548. package/lib/project/features/test-runner/index.d.ts +3 -0
  549. package/lib/project/features/test-runner/index.js +7 -0
  550. package/lib/project/features/test-runner/index.js.map +1 -0
  551. package/lib/project/features/test-runner/jest-test-runner.d.ts +8 -0
  552. package/lib/project/features/test-runner/jest-test-runner.js +69 -0
  553. package/lib/project/features/test-runner/jest-test-runner.js.map +1 -0
  554. package/lib/project/features/test-runner/mocha-test-runner.d.ts +7 -0
  555. package/lib/project/features/test-runner/mocha-test-runner.js +66 -0
  556. package/lib/project/features/test-runner/mocha-test-runner.js.map +1 -0
  557. package/lib/project/features/webpack-backend-compilation.backend.d.ts +14 -0
  558. package/lib/project/features/webpack-backend-compilation.backend.js +68 -0
  559. package/lib/project/features/webpack-backend-compilation.backend.js.map +1 -0
  560. package/lib/project/index.js +2 -2
  561. package/lib/taon-models.d.ts +72 -0
  562. package/migrations/1735324537544_pierwsza.d.ts +1 -0
  563. package/migrations/1735324537544_pierwsza.js +3 -0
  564. package/migrations/1735324537544_pierwsza.js.map +1 -0
  565. package/migrations/1735324809552_pierwsza.d.ts +6 -0
  566. package/migrations/1735324809552_pierwsza.js +33 -0
  567. package/migrations/1735324809552_pierwsza.js.map +1 -0
  568. package/migrations/1735324983861_druga.d.ts +6 -0
  569. package/migrations/1735324983861_druga.js +33 -0
  570. package/migrations/1735324983861_druga.js.map +1 -0
  571. package/migrations/1737301578918_addingSampleData.d.ts +32 -0
  572. package/migrations/1737301578918_addingSampleData.js +111 -0
  573. package/migrations/1737301578918_addingSampleData.js.map +1 -0
  574. package/package.json +1 -1
  575. package/tmp-environment.json +3 -3
  576. package/websql/fesm2022/tnp.mjs +2 -4
  577. package/websql/fesm2022/tnp.mjs.map +1 -1
  578. package/websql/lib/build-info._auto-generated_.d.ts +1 -1
  579. package/websql/lib/models.d.ts +9 -0
  580. package/websql/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -1
  581. package/websql/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +1 -1
  582. package/websql/lib/project/abstract/artifacts/base-artifact.d.ts +1 -0
  583. package/websql/lib/project/abstract/artifacts/docs-webapp/artifact-docs-webapp.d.ts +1 -0
  584. package/websql/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  585. package/websql/lib/project/abstract/git.d.ts +1 -0
  586. package/websql/lib/project/abstract/taonJson.d.ts +1 -0
  587. package/websql/package.json +1 -1
@@ -0,0 +1,990 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BrowserCodeCut = void 0;
4
+ var tslib_1 = require("tslib");
5
+ //#region imports
6
+ var tnp_core_1 = require("tnp-core");
7
+ var tnp_config_1 = require("tnp-config");
8
+ var tnp_helpers_1 = require("tnp-helpers");
9
+ var options_1 = require("../../../../options");
10
+ var isomorphic_region_loader_1 = require("isomorphic-region-loader");
11
+ var mjs_fesm_module_spliter_backend_1 = require("../../../features/copy-manager/mjs-fesm-module-spliter.backend");
12
+ var isomorphic_region_loader_2 = require("isomorphic-region-loader");
13
+ var file_split_process_1 = require("./file-split-process");
14
+ var constants_1 = require("../../../../constants");
15
+ //#endregion
16
+ //#region consts
17
+ var regexAsyncImport = /\ import\((\`|\'|\")([a-zA-Z|\-|\@|\/|\.]+)(\`|\'|\")\)/;
18
+ var regexAsyncImportG = /\ import\((\`|\'|\")([a-zA-Z|\-|\@|\/|\.]+)(\`|\'|\")\)/g;
19
+ var debugFiles = [
20
+ // 'taon-cms.models.ts'
21
+ // 'app.ts'
22
+ ];
23
+ /**
24
+ * Allow imports or exports with '/src' at tthe end
25
+ *
26
+ * import { ProcessController, Process } from '@codete-ngrx-quick-start/shared';
27
+ * loadChildren: () => import(`@codete-ngrx-quick-start/realtime-process`)
28
+ *
29
+ * to be changed into:
30
+ *
31
+ * import { ProcessController, Process } from '@codete-ngrx-quick-start/shared';
32
+ * loadChildren: () => import(`@codete-ngrx-quick-start/realtime-process`)
33
+ *
34
+ */
35
+ //#endregion
36
+ var BrowserCodeCut = /** @class */ (function () {
37
+ //#endregion
38
+ //#region constructor
39
+ function BrowserCodeCut(
40
+ /**
41
+ * ex.< project location >/src/something.ts
42
+ */
43
+ absSourcePathFromSrc,
44
+ /**
45
+ * ex. < project location >/tmp-src-dist-websql/my/relative/path.ts
46
+ */
47
+ absFileSourcePathBrowserOrWebsql,
48
+ /**
49
+ * ex. < project location >/tmp-src-dist-websql
50
+ */
51
+ absPathTmpSrcDistFolder, project, buildOptions) {
52
+ // console.log(`[incremental-build-process INSIDE BROWSER!!! '${this.buildOptions.baseHref}'`)
53
+ this.absSourcePathFromSrc = absSourcePathFromSrc;
54
+ this.absFileSourcePathBrowserOrWebsql = absFileSourcePathBrowserOrWebsql;
55
+ this.absPathTmpSrcDistFolder = absPathTmpSrcDistFolder;
56
+ this.project = project;
57
+ this.buildOptions = buildOptions;
58
+ //#region fields
59
+ this.isAssetsFile = false;
60
+ //#endregion
61
+ //#region private / methods & getters / process browser not correct imports exports
62
+ this.processBrowserNotCorrectImportsExports = function (importOrExportLine) {
63
+ // console.log({ importOrExportLine })
64
+ // TODO
65
+ return importOrExportLine;
66
+ };
67
+ this.absPathTmpSrcDistFolder = (0, tnp_core_1.crossPlatformPath)(absPathTmpSrcDistFolder);
68
+ this.absFileSourcePathBrowserOrWebsql = (0, tnp_core_1.crossPlatformPath)(absFileSourcePathBrowserOrWebsql);
69
+ this.absFileSourcePathBrowserOrWebsqlAPPONLY =
70
+ this.absFileSourcePathBrowserOrWebsql.replace("tmp-src-".concat(buildOptions.outDir).concat(buildOptions.websql ? '-websql' : ''), "tmp-src-app-".concat(buildOptions.outDir).concat(buildOptions.websql ? '-websql' : '')); // for slighted modifed app release dist
71
+ this.absSourcePathFromSrc = (0, tnp_core_1.crossPlatformPath)(absSourcePathFromSrc);
72
+ // console.log('absSourcePathFromSrc:', absSourcePathFromSrc)
73
+ // if (absSourcePathFromSrc.endsWith('/file.ts')) {
74
+ // debugger
75
+ // }
76
+ if (project.__isStandaloneProject) {
77
+ if (absSourcePathFromSrc
78
+ .replace((0, tnp_core_1.crossPlatformPath)([project.location, tnp_config_1.config.folder.src]), '')
79
+ .startsWith('/assets/')) {
80
+ this.isAssetsFile = true;
81
+ }
82
+ }
83
+ this.relativePath = (0, tnp_core_1.crossPlatformPath)(this.absFileSourcePathBrowserOrWebsql).replace("".concat(this.absPathTmpSrcDistFolder, "/"), '');
84
+ this.absoluteBackendDestFilePath = (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.join(this.absPathTmpSrcDistFolder.replace('tmp-src', 'tmp-source'), this.relativePath));
85
+ // console.log('RELATIVE ', this.relativePath)
86
+ this.isWebsqlMode = this.relativePath.startsWith("tmp-src-".concat(tnp_config_1.config.folder.dist, "-").concat(tnp_config_1.config.folder.websql));
87
+ }
88
+ //#endregion
89
+ BrowserCodeCut.prototype.processFile = function (_a) {
90
+ var fileRemovedEvent = _a.fileRemovedEvent, regionReplaceOptions = _a.regionReplaceOptions, isCuttableFile = _a.isCuttableFile;
91
+ if (isCuttableFile) {
92
+ this.initAndSaveCuttableFile(regionReplaceOptions);
93
+ }
94
+ else {
95
+ this.initAndSaveAssetFile(fileRemovedEvent);
96
+ }
97
+ };
98
+ //#region private / methods & getters / init and save cuttabl file
99
+ BrowserCodeCut.prototype.initAndSaveCuttableFile = function (options) {
100
+ return this.init()
101
+ .REPLACERegionsForIsomorphicLib(tnp_core_1._.cloneDeep(options))
102
+ .FLATTypescriptImportExport('export')
103
+ .FLATTypescriptImportExport('import')
104
+ .REPLACERegionsFromTsImportExport('export')
105
+ .REPLACERegionsFromTsImportExport('import')
106
+ .REPLACERegionsFromJSrequire()
107
+ .save();
108
+ };
109
+ //#endregion
110
+ //#region private / methods & getters / init and save
111
+ BrowserCodeCut.prototype.initAndSaveAssetFile = function (remove) {
112
+ if (remove === void 0) { remove = false; }
113
+ if (remove) {
114
+ tnp_helpers_1.Helpers.removeIfExists(this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsql));
115
+ tnp_helpers_1.Helpers.removeIfExists(this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsqlAPPONLY));
116
+ tnp_helpers_1.Helpers.removeIfExists(this.replaceAssetsPath(this.absoluteBackendDestFilePath));
117
+ }
118
+ else {
119
+ // this is needed for json in src/lib or something
120
+ var realAbsSourcePathFromSrc = tnp_core_1.fse.realpathSync(this.absSourcePathFromSrc);
121
+ if (!tnp_helpers_1.Helpers.exists(realAbsSourcePathFromSrc) ||
122
+ tnp_helpers_1.Helpers.isFolder(realAbsSourcePathFromSrc)) {
123
+ return;
124
+ }
125
+ try {
126
+ tnp_helpers_1.Helpers.copyFile(this.absSourcePathFromSrc, this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsql));
127
+ tnp_helpers_1.Helpers.copyFile(this.absSourcePathFromSrc, this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsqlAPPONLY));
128
+ // final straight copy to tmp-source-folder
129
+ tnp_helpers_1.Helpers.copyFile(this.absSourcePathFromSrc, this.replaceAssetsPath(this.absoluteBackendDestFilePath));
130
+ }
131
+ catch (error) {
132
+ tnp_helpers_1.Helpers.warn("[taon][browser-code-cut] file not found ".concat(this.absSourcePathFromSrc));
133
+ }
134
+ }
135
+ };
136
+ //#endregion
137
+ //#region private / methods & getters / init
138
+ BrowserCodeCut.prototype.init = function () {
139
+ var _a;
140
+ var orgContent = tnp_helpers_1.Helpers.readFile(this.absSourcePathFromSrc, void 0, true) || '';
141
+ this.splitFileProcess = new file_split_process_1.SplitFileProcess(orgContent, this.absSourcePathFromSrc, this.project.allIsomorphicPackagesFromMemory);
142
+ var _b = this.splitFileProcess.content, firstPass = _b.modifiedContent, firstTimeRewriteFile = _b.rewriteFile;
143
+ var _c = new file_split_process_1.SplitFileProcess(firstPass, this.absSourcePathFromSrc, this.project.allIsomorphicPackagesFromMemory).content, secondPass = _c.modifiedContent, secondTimeRewriteFile = _c.rewriteFile;
144
+ if ((orgContent || '').trim() !== ((_a = (firstPass || '')) === null || _a === void 0 ? void 0 : _a.trim())) {
145
+ if (firstTimeRewriteFile &&
146
+ (firstPass || '').trim() === (secondPass || '').trim() // it means it is stable
147
+ ) {
148
+ tnp_helpers_1.Helpers.logInfo("Rewrite file ".concat(this.absSourcePathFromSrc));
149
+ tnp_helpers_1.Helpers.writeFile(this.absSourcePathFromSrc, firstPass);
150
+ }
151
+ else {
152
+ tnp_helpers_1.Helpers.logWarn("Unstable file modification ".concat(this.absSourcePathFromSrc));
153
+ }
154
+ }
155
+ this.rawContentForBrowser = this.removeSrcAtEndFromImortExports(orgContent);
156
+ this.rawContentForAPPONLYBrowser = this.rawContentForBrowser; // TODO not needed ?
157
+ this.rawContentBackend = this.rawContentForBrowser; // at the beginning those are normal files from src
158
+ return this;
159
+ };
160
+ Object.defineProperty(BrowserCodeCut.prototype, "isEmptyBrowserFile", {
161
+ //#endregion
162
+ //#region private / methods & getters / is empty browser file
163
+ get: function () {
164
+ return this.rawContentForBrowser.replace(/\s/g, '').trim() === '';
165
+ },
166
+ enumerable: false,
167
+ configurable: true
168
+ });
169
+ Object.defineProperty(BrowserCodeCut.prototype, "isEmptyModuleBackendFile", {
170
+ //#endregion
171
+ //#region private / methods & getters / is empty module backend file
172
+ get: function () {
173
+ return ((this.rawContentBackend || '').replace(/\/\*\ \*\//g, '').trim()
174
+ .length === 0);
175
+ },
176
+ enumerable: false,
177
+ configurable: true
178
+ });
179
+ //#endregion
180
+ //#region private / methods & getters / save empty file
181
+ BrowserCodeCut.prototype.saveEmptyFile = function (isTsFile, endOfBrowserOrWebsqlCode) {
182
+ if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsql))) {
183
+ // write empty instead unlink
184
+ tnp_core_1.fse.mkdirpSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsql));
185
+ }
186
+ if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsqlAPPONLY))) {
187
+ // write empty instead unlink
188
+ tnp_core_1.fse.mkdirpSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsqlAPPONLY));
189
+ }
190
+ if (isTsFile) {
191
+ if (!this.relativePath.startsWith('app/')) {
192
+ try {
193
+ // QUICK_FIX remove directory when trying to save as file
194
+ tnp_core_1.fse.removeSync(this.absFileSourcePathBrowserOrWebsql);
195
+ }
196
+ catch (error) { }
197
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsql, "/* files for browser".concat(this.isWebsqlMode
198
+ ? '-websql' + endOfBrowserOrWebsqlCode
199
+ : '' + endOfBrowserOrWebsqlCode, " mode */"), 'utf8');
200
+ }
201
+ try {
202
+ // QUICK_FIX remove directory when trying to save as file
203
+ tnp_core_1.fse.removeSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY);
204
+ }
205
+ catch (error) { }
206
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY, "/* files for browser".concat(this.isWebsqlMode
207
+ ? '-websql' + endOfBrowserOrWebsqlCode
208
+ : '' + endOfBrowserOrWebsqlCode, " mode */"), 'utf8');
209
+ }
210
+ else {
211
+ if (!this.relativePath.startsWith('app/')) {
212
+ try {
213
+ // QUICK_FIX remove directory when trying to save as file
214
+ tnp_core_1.fse.removeSync(this.absFileSourcePathBrowserOrWebsql);
215
+ }
216
+ catch (error) { }
217
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsql, "", 'utf8');
218
+ }
219
+ try {
220
+ // QUICK_FIX remove directory when trying to save as file
221
+ tnp_core_1.fse.removeSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY);
222
+ }
223
+ catch (error) { }
224
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY, "", 'utf8');
225
+ }
226
+ };
227
+ //#endregion
228
+ //#region private / methods & getters / save normal file
229
+ BrowserCodeCut.prototype.saveNormalFile = function (isTsFile, endOfBrowserOrWebsqlCode) {
230
+ // console.log('SAVE NORMAL FILE')
231
+ if (this.isAssetsFile) {
232
+ this.absFileSourcePathBrowserOrWebsql = this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsql);
233
+ // console.log(`ASSETE: ${this.absFileSourcePathBrowserOrWebsql}`)
234
+ }
235
+ if (this.isAssetsFile) {
236
+ this.absFileSourcePathBrowserOrWebsqlAPPONLY = this.replaceAssetsPath(this.absFileSourcePathBrowserOrWebsqlAPPONLY);
237
+ // console.log(`ASSETE: ${this.absFileSourcePathBrowserOrWebsql}`)
238
+ }
239
+ if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsql))) {
240
+ tnp_core_1.fse.mkdirpSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsql));
241
+ }
242
+ if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsqlAPPONLY))) {
243
+ tnp_core_1.fse.mkdirpSync(tnp_core_1.path.dirname(this.absFileSourcePathBrowserOrWebsqlAPPONLY));
244
+ }
245
+ this.processAssetsLinksForApp();
246
+ this.warnAboutUsingFilesFromNodeModulesWithLibFiles(this.rawContentForAPPONLYBrowser, this.absFileSourcePathBrowserOrWebsqlAPPONLY);
247
+ if (!this.isAssetsFile && this.relativePath.endsWith('.backend.ts')) {
248
+ return;
249
+ }
250
+ if (isTsFile) {
251
+ if (!this.relativePath.startsWith('app/')) {
252
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsql, this.changeBrowserOrWebsqlFileContentBeforeSave(this.rawContentForBrowser, endOfBrowserOrWebsqlCode, this.absFileSourcePathBrowserOrWebsql), 'utf8');
253
+ }
254
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY, this.changeBrowserOrWebsqlFileContentBeforeSave(this.rawContentForAPPONLYBrowser, endOfBrowserOrWebsqlCode, this.absFileSourcePathBrowserOrWebsqlAPPONLY), 'utf8');
255
+ }
256
+ else {
257
+ if (!this.relativePath.startsWith('app/')) {
258
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsql, this.rawContentForBrowser, 'utf8');
259
+ }
260
+ tnp_core_1.fse.writeFileSync(this.absFileSourcePathBrowserOrWebsqlAPPONLY, this.rawContentForAPPONLYBrowser, 'utf8');
261
+ }
262
+ };
263
+ //#endregion
264
+ //#region private / methods & getters / remove src from imports
265
+ BrowserCodeCut.prototype.processRegexForSrcRemove = function (regexEnd, line, matchType) {
266
+ var matches = line.match(regexEnd);
267
+ var firstMatch = tnp_core_1._.first(matches);
268
+ var clean;
269
+ if (matchType === 'require' || matchType === 'imports') {
270
+ var endCharacters = firstMatch.slice(-2);
271
+ clean = firstMatch.replace('/src' + endCharacters, endCharacters);
272
+ }
273
+ else {
274
+ var endCharacters = firstMatch.slice(-1);
275
+ clean = firstMatch.replace('/src' + endCharacters, endCharacters);
276
+ }
277
+ return line.replace(firstMatch, clean);
278
+ };
279
+ //#endregion
280
+ //#region private / methods & getters / remove src from imports/exports
281
+ BrowserCodeCut.prototype.removeSrcAtEndFromImortExports = function (content) {
282
+ var _this = this;
283
+ var regexEnd = /from\s+(\'|\").+\/src(\'|\")/g;
284
+ var singleLineImporrt = /import\((\'|\"|\`).+\/src(\'|\"|\`)\)/g;
285
+ var singleLineRequire = /require\((\'|\"|\`).+\/src(\'|\"|\`)\)/g;
286
+ var commentMultilieStart = /^\/\*/;
287
+ var commentSingleLineStart = /^\/\//;
288
+ return content
289
+ .split(/\r?\n/)
290
+ .map(function (line, index) {
291
+ var trimedLine = line.trimStart();
292
+ if (commentMultilieStart.test(trimedLine) ||
293
+ commentSingleLineStart.test(trimedLine)) {
294
+ return line;
295
+ }
296
+ if (regexEnd.test(line)) {
297
+ return _this.processRegexForSrcRemove(regexEnd, line, 'from_import_export');
298
+ }
299
+ if (singleLineImporrt.test(line)) {
300
+ return _this.processRegexForSrcRemove(singleLineImporrt, line, 'imports');
301
+ }
302
+ if (singleLineRequire.test(line)) {
303
+ return _this.processRegexForSrcRemove(singleLineRequire, line, 'require');
304
+ }
305
+ return line;
306
+ })
307
+ .join('\n');
308
+ };
309
+ //#endregion
310
+ //#region private / methods & getters / flat typescript import export
311
+ BrowserCodeCut.prototype.FLATTypescriptImportExport = function (usage) {
312
+ var _this = this;
313
+ if (this.isAssetsFile) {
314
+ return this;
315
+ }
316
+ if (!this.relativePath.endsWith('.ts')) {
317
+ return this;
318
+ }
319
+ var isExport = usage === 'export';
320
+ var fileContent = this.rawContentForBrowser;
321
+ var commentStart = new RegExp("\\/\\*");
322
+ var commentEnds = new RegExp("\\*\\/");
323
+ var commentEndExportOnly = new RegExp("^(\\ )*\\}\\;?\\ *");
324
+ var singleLineExport = new RegExp("^\\ *export\\ +\\{.*\\}\\;?");
325
+ var regexEnd = new RegExp("from\\s+(\\'|\\\").+(\\'|\\\")");
326
+ var regextStart = new RegExp("".concat(usage, "\\s+{"));
327
+ var toAppendLines = 0;
328
+ var insideComment = false;
329
+ if (tnp_core_1._.isString(fileContent)) {
330
+ var appendingToNewFlatOutput_1 = false;
331
+ var newFlatOutput_1 = '';
332
+ fileContent.split(/\r?\n/).forEach(function (line, index) {
333
+ var matchSingleLineExport = isExport && singleLineExport.test(line);
334
+ var matchCommentStart = commentStart.test(line);
335
+ var matchCommentEnd = commentEnds.test(line);
336
+ var matchStart = regextStart.test(line);
337
+ var matchEndExportOnly = isExport &&
338
+ commentEndExportOnly.test(line) &&
339
+ line.replace(commentEndExportOnly, '') === '';
340
+ var matchEnd = matchEndExportOnly || regexEnd.test(line);
341
+ if (matchCommentStart) {
342
+ insideComment = true;
343
+ }
344
+ if (insideComment && matchCommentEnd) {
345
+ insideComment = false;
346
+ }
347
+ // (path.basename(this.absoluteFilePath) === 'core-imports.ts') && console.log(`${insideComment}: ${line}`)
348
+ // isExport && (path.basename(this.absoluteFilePath) === 'core-imports.ts') && console.log(`export end: ${matchEndExportOnly}: >>>${line}<<<`)
349
+ // console.log(`I(${regexParialUsage.test(line)}) F(${regexFrom.test(line)})\t: ${line} `)
350
+ // (path.basename(this.absoluteFilePath) === 'core-imports.ts') && console.log(`matchSingleLineExport: ${matchSingleLineExport}: >>>${line}<<<`)
351
+ // if (insideComment || matchSingleLineExport) {
352
+ // newFlatOutput += (((index > 0) ? '\n' : '') + line);
353
+ // toAppendLines++;
354
+ // }
355
+ if (appendingToNewFlatOutput_1) {
356
+ if (!matchStart && !matchEnd) {
357
+ newFlatOutput_1 += " ".concat(line);
358
+ toAppendLines++;
359
+ }
360
+ else if (insideComment) {
361
+ newFlatOutput_1 += " ".concat(line);
362
+ toAppendLines++;
363
+ }
364
+ else if (matchEnd) {
365
+ appendingToNewFlatOutput_1 = false;
366
+ newFlatOutput_1 += " ".concat(_this.processBrowserNotCorrectImportsExports(line)).concat(tnp_core_1._.times(toAppendLines, function () { return "".concat(isomorphic_region_loader_2.labelReplacementCode.flatenImportExportRequred, "\n"); }).join('')); // TOOD @UNCOMMENT
367
+ toAppendLines = 0;
368
+ }
369
+ }
370
+ else {
371
+ if (insideComment) {
372
+ newFlatOutput_1 += (index > 0 ? '\n' : '') + line;
373
+ }
374
+ else {
375
+ if (matchSingleLineExport) {
376
+ newFlatOutput_1 += (index > 0 ? '\n' : '') + line;
377
+ }
378
+ else {
379
+ appendingToNewFlatOutput_1 = matchStart && !matchEnd;
380
+ // if (joiningLine) console.log('line', line)
381
+ newFlatOutput_1 +=
382
+ (index > 0 ? '\n' : '') +
383
+ _this.processBrowserNotCorrectImportsExports(line);
384
+ }
385
+ toAppendLines = 1;
386
+ }
387
+ }
388
+ });
389
+ this.rawContentForBrowser = newFlatOutput_1;
390
+ }
391
+ // console.log('\n\n\n\n')
392
+ return this;
393
+ };
394
+ Object.defineProperty(BrowserCodeCut.prototype, "resolvePackageNameFrom", {
395
+ //#endregion
396
+ //#region private / methods & getters / resolved pacakge name from
397
+ /**
398
+ * Get "npm package name" from line of code in .ts or .js files
399
+ */
400
+ get: function () {
401
+ var self = this;
402
+ return {
403
+ JSrequired: function (rawImport) {
404
+ rawImport = rawImport.replace(new RegExp("require\\((\\'|\\\")"), '');
405
+ rawImport = rawImport.replace(new RegExp("(\\'|\\\")\\)"), '');
406
+ rawImport = rawImport.trim();
407
+ if (rawImport.startsWith("./"))
408
+ return void 0;
409
+ if (rawImport.startsWith("../"))
410
+ return void 0;
411
+ var fisrtName = rawImport.match(new RegExp("@?([a-zA-z]|-)+\\/"));
412
+ var res = tnp_core_1._.isArray(fisrtName) && fisrtName.length > 0
413
+ ? fisrtName[0]
414
+ : rawImport;
415
+ if (res.endsWith('/') && res.length > 1) {
416
+ res = res.substring(0, res.length - 1);
417
+ }
418
+ return res;
419
+ },
420
+ TSimportExport: function (rawImport, usage) {
421
+ // const orgImport = rawImport;
422
+ if (usage === 'import') {
423
+ var matches = rawImport.match(regexAsyncImport);
424
+ if (Array.isArray(matches) && matches.length > 0) {
425
+ var first = tnp_core_1._.first(matches);
426
+ rawImport = first;
427
+ rawImport = rawImport.replace(/\ import\((\`|\'|\")/, '');
428
+ rawImport = rawImport.replace(/(\`|\'|\")\)/, '');
429
+ }
430
+ }
431
+ rawImport = rawImport.replace(new RegExp("".concat(usage, ".+from\\s+")), '');
432
+ rawImport = rawImport.replace(new RegExp("('|\")", 'g'), '').trim();
433
+ if (rawImport.startsWith("./"))
434
+ return void 0;
435
+ if (rawImport.startsWith("../"))
436
+ return void 0;
437
+ var workspacePackgeMatch = (rawImport.match(new RegExp("^\\@([a-zA-z]|\\-)+\\/([a-zA-z]|\\-)+$")) || []) // @ts-ignore
438
+ .filter(function (d) { return d.length > 1; });
439
+ var worskpacePackageName = tnp_core_1._.isArray(workspacePackgeMatch) && workspacePackgeMatch.length === 1
440
+ ? tnp_core_1._.first(workspacePackgeMatch)
441
+ : void 0;
442
+ // const normalPackageMatch = (rawImport.match(new RegExp(`^([a-zA-z]|\\-)+\\/`)) || []);
443
+ // const normalPackageName = (_.isArray(normalPackageMatch) && normalPackageMatch.length === 1)
444
+ // ? _.first(normalPackageMatch) : '';
445
+ var res = worskpacePackageName
446
+ ? worskpacePackageName
447
+ : rawImport;
448
+ if (res.endsWith('/') && res.length > 1) {
449
+ res = res.substring(0, res.length - 1);
450
+ }
451
+ return res;
452
+ },
453
+ };
454
+ },
455
+ enumerable: false,
456
+ configurable: true
457
+ });
458
+ //#endregion
459
+ //#region private / methods & getters / get inline package
460
+ BrowserCodeCut.prototype.getInlinePackage = function (packageName) {
461
+ var packagesNames = this.project.allIsomorphicPackagesFromMemory;
462
+ var realName = packageName;
463
+ var isIsomorphic = false;
464
+ if (packageName !== void 0) {
465
+ isIsomorphic = !!packagesNames.find(function (p) {
466
+ if (p === packageName) {
467
+ return true;
468
+ }
469
+ var slashes = (p.match(new RegExp('/', 'g')) || []).length;
470
+ if (slashes === 0) {
471
+ return p === packageName;
472
+ }
473
+ // console.log('am here ', packageName)
474
+ // console.log('p', p)
475
+ if (p.startsWith(packageName)) {
476
+ realName = p;
477
+ // console.log('FOUDNED for ', packageName)
478
+ // console.log('is REAL', p)
479
+ return true;
480
+ }
481
+ return false;
482
+ });
483
+ }
484
+ return {
485
+ isIsomorphic: isIsomorphic,
486
+ realName: realName,
487
+ };
488
+ };
489
+ //#endregion
490
+ //#region private / methods & getters / regex region
491
+ BrowserCodeCut.prototype.REGEX_REGION = function (word) {
492
+ return new RegExp('[\\t ]*\\/\\/\\s*#?region\\s+' +
493
+ word +
494
+ ' ?[\\s\\S]*?\\/\\/\\s*#?endregion ?[\\t ]*\\n?', 'g');
495
+ };
496
+ //#endregion
497
+ //#region private / methods & getters / replace region with
498
+ BrowserCodeCut.prototype.replaceRegionsWith = function (stringContent, words) {
499
+ if (stringContent === void 0) { stringContent = ''; }
500
+ if (words === void 0) { words = []; }
501
+ if (words.length === 0)
502
+ return stringContent;
503
+ var word = words.shift();
504
+ var replacement = '';
505
+ if (Array.isArray(word) && word.length === 2) {
506
+ replacement = word[1];
507
+ word = word[0];
508
+ }
509
+ stringContent = stringContent.replace(this.REGEX_REGION(word), replacement);
510
+ return this.replaceRegionsWith(stringContent, words);
511
+ };
512
+ //#endregion
513
+ //#region private / methods & getters / replace from line
514
+ BrowserCodeCut.prototype.replaceFromLine = function (pkgName, imp) {
515
+ // console.log(`Check package: "${pkgName}"`)
516
+ // console.log(`imp: "${imp}"`)
517
+ var inlinePkg = this.getInlinePackage(pkgName);
518
+ if (inlinePkg.isIsomorphic) {
519
+ // console.log('inlinePkg ', inlinePkg.realName)
520
+ var replacedImp = imp.replace(inlinePkg.realName, "".concat(inlinePkg.realName, "/").concat(this.buildOptions.websql
521
+ ? tnp_config_1.config.folder.websql
522
+ : tnp_config_1.config.folder.browser));
523
+ this.rawContentForBrowser = this.rawContentForBrowser.replace(imp, replacedImp);
524
+ return;
525
+ }
526
+ };
527
+ //#endregion
528
+ //#region private / methods & getters / replace regions from ts import export
529
+ BrowserCodeCut.prototype.REPLACERegionsFromTsImportExport = function (usage) {
530
+ var _this = this;
531
+ // const debug = filesToDebug.includes(path.basename(this.absoluteFilePath));
532
+ // if (debug) {
533
+ // debugger
534
+ // }
535
+ if (this.isAssetsFile) {
536
+ return this;
537
+ }
538
+ if (!this.relativePath.endsWith('.ts')) {
539
+ return this;
540
+ }
541
+ if (!tnp_core_1._.isString(this.rawContentForBrowser))
542
+ return;
543
+ var importRegex = new RegExp("".concat(usage, ".+from\\s+(\\'|\\\").+(\\'|\\\")"), 'g');
544
+ var asynMatches = usage === 'import'
545
+ ? this.rawContentForBrowser.match(regexAsyncImportG)
546
+ : [];
547
+ var normalMatches = this.rawContentForBrowser.match(importRegex);
548
+ var asyncImports = Array.isArray(asynMatches) ? asynMatches : [];
549
+ var imports = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read((Array.isArray(normalMatches) ? normalMatches : [])), false), tslib_1.__read(asyncImports), false);
550
+ // debug && console.log(imports)
551
+ if (tnp_core_1._.isArray(imports)) {
552
+ imports.forEach(function (imp) {
553
+ // debug && console.log('imp: ' + imp)
554
+ var pkgName = _this.resolvePackageNameFrom.TSimportExport(imp, usage);
555
+ // debug && console.log('pkgName: ' + pkgName)
556
+ if (pkgName) {
557
+ _this.replaceFromLine(pkgName, imp);
558
+ }
559
+ });
560
+ }
561
+ return this;
562
+ };
563
+ //#endregion
564
+ //#region private / methods & getters / replace regions from js require
565
+ BrowserCodeCut.prototype.REPLACERegionsFromJSrequire = function () {
566
+ var _this = this;
567
+ if (this.isAssetsFile) {
568
+ return this;
569
+ }
570
+ if (!this.relativePath.endsWith('.ts')) {
571
+ return this;
572
+ }
573
+ if (!tnp_core_1._.isString(this.rawContentForBrowser))
574
+ return;
575
+ // fileContent = IsomorphicRegions.flattenRequiresForContent(fileContent, usage)
576
+ var importRegex = new RegExp("require\\((\\'|\\\").+(\\'|\\\")\\)", 'g');
577
+ var imports = this.rawContentForBrowser.match(importRegex);
578
+ // console.log(imports)
579
+ if (tnp_core_1._.isArray(imports)) {
580
+ imports.forEach(function (imp) {
581
+ var pkgName = _this.resolvePackageNameFrom.JSrequired(imp);
582
+ if (pkgName) {
583
+ _this.replaceFromLine(pkgName, imp);
584
+ }
585
+ });
586
+ }
587
+ return this;
588
+ };
589
+ //#endregion
590
+ //#region private / methods & getters / replace regions for isomorphic lib
591
+ BrowserCodeCut.prototype.REPLACERegionsForIsomorphicLib = function (options) {
592
+ var _this = this;
593
+ if (this.isAssetsFile) {
594
+ return this;
595
+ }
596
+ options = tnp_core_1._.clone(options);
597
+ // Helpers.log(`[REPLACERegionsForIsomorphicLib] options.replacements ${this.absoluteFilePath}`)
598
+ var ext = tnp_core_1.path.extname(this.relativePath);
599
+ // console.log(`Ext: "${ext}" for file: ${path.basename(this.absoluteFilePath)}`)
600
+ if (tnp_config_1.extAllowedToReplace.includes(ext)) {
601
+ var orgContent = this.rawContentForBrowser;
602
+ this.rawContentForBrowser = isomorphic_region_loader_1.RegionRemover.from(this.relativePath, orgContent, options.replacements, this.project).output;
603
+ if ((this.project.__isStandaloneProject ||
604
+ this.project.__isSmartContainer) &&
605
+ !this.isWebsqlMode) {
606
+ var regionsToRemove = [tnp_config_1.TAGS.BROWSER, tnp_config_1.TAGS.WEBSQL_ONLY];
607
+ var orgContentBackend = this.rawContentBackend;
608
+ this.rawContentBackend = isomorphic_region_loader_1.RegionRemover.from(this.absoluteBackendDestFilePath, orgContentBackend, regionsToRemove, this.project).output;
609
+ }
610
+ }
611
+ if (this.project.__isSmartContainerTarget) {
612
+ var parent_1 = this.project.__smartContainerTargetParentContainer;
613
+ parent_1.children
614
+ .filter(function (f) { return f.typeIs('isomorphic-lib'); })
615
+ .map(function (c) {
616
+ if (true) {
617
+ var from = "".concat(c.name, "/src/assets/");
618
+ var to = "".concat(constants_1.TO_REMOVE_TAG, "assets/assets-for/").concat(parent_1.name + '--' + c.name, "/");
619
+ _this.rawContentForBrowser = _this.rawContentForBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx("/".concat(from)), 'g'), to);
620
+ _this.rawContentForBrowser = _this.rawContentForBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), to);
621
+ }
622
+ });
623
+ }
624
+ else if (this.project.__isStandaloneProject) {
625
+ [this.project]
626
+ .filter(function (f) { return f.typeIs('isomorphic-lib'); })
627
+ .forEach(function (c) {
628
+ var from = "src/assets/";
629
+ var to = "".concat(constants_1.TO_REMOVE_TAG, "assets/assets-for/").concat(c.name, "/");
630
+ _this.rawContentForBrowser = _this.rawContentForBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx("/".concat(from)), 'g'), to);
631
+ _this.rawContentForBrowser = _this.rawContentForBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), to);
632
+ });
633
+ }
634
+ return this;
635
+ };
636
+ //#endregion
637
+ //#region private / methods & getters / processing asset link for app
638
+ BrowserCodeCut.prototype.processAssetsLinksForApp = function () {
639
+ var _this = this;
640
+ this.rawContentForAPPONLYBrowser = this.rawContentForBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(constants_1.TO_REMOVE_TAG), 'g'), '');
641
+ // console.log(`[incremental-build-process processAssetsLinksForApp '${this.buildOptions.baseHref}'`)
642
+ var baseHref = this.project.angularFeBasenameManager.getBaseHref(options_1.InitOptions.fromBuild(this.buildOptions));
643
+ // console.log(`Fixing with basehref: '${baseHref}'`)
644
+ var howMuchBack = this.relativePath.split('/').length - 1;
645
+ var back = howMuchBack === 0
646
+ ? './'
647
+ : tnp_core_1._.times(howMuchBack)
648
+ .map(function () { return '../'; })
649
+ .join('');
650
+ var toReplaceFn = function (relativeAssetPathPart) {
651
+ return [
652
+ {
653
+ from: "assets/assets-for/".concat(relativeAssetPathPart, "/"),
654
+ to: "assets/assets-for/".concat(relativeAssetPathPart, "/"),
655
+ makeSureSlashAtBegin: true,
656
+ },
657
+ {
658
+ from: "src=\"/assets/assets-for/".concat(relativeAssetPathPart, "/"),
659
+ to: "src=\"".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
660
+ },
661
+ {
662
+ from: "[src]=\"'/assets/assets-for/".concat(relativeAssetPathPart, "/"),
663
+ to: "[src]=\"'".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
664
+ },
665
+ {
666
+ from: "href=\"/assets/assets-for/".concat(relativeAssetPathPart, "/"),
667
+ to: "href=\"".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
668
+ },
669
+ {
670
+ from: "[href]=\"'/assets/assets-for/".concat(relativeAssetPathPart, "/"),
671
+ to: "[href]=\"'".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
672
+ },
673
+ {
674
+ from: "url('/assets/assets-for/".concat(relativeAssetPathPart, "/"),
675
+ to: "url('".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
676
+ },
677
+ {
678
+ from: "url(\"/assets/assets-for/".concat(relativeAssetPathPart, "/"),
679
+ to: "url(\"".concat(baseHref, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
680
+ },
681
+ /**
682
+ *
683
+
684
+ import * as json1 from '/shared/src/assets/hamsters/test.json';
685
+ console.log({ json1 }) -> WORKS NOW
686
+ */
687
+ {
688
+ from: " from '/assets/assets-for/".concat(relativeAssetPathPart, "/"),
689
+ to: " from '".concat(back, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
690
+ },
691
+ {
692
+ from: " from \"/assets/assets-for/".concat(relativeAssetPathPart, "/"),
693
+ to: " from \"".concat(back, "assets/assets-for/").concat(relativeAssetPathPart, "/"),
694
+ },
695
+ /**
696
+ * what can be done more
697
+ * import * as json2 from '@codete-rxjs-quick-start/shared/assets/shared/';
698
+ console.log({ json2 })
699
+
700
+ declare module "*.json" {
701
+ const value: any;
702
+ export default value;
703
+ }
704
+
705
+ */
706
+ ];
707
+ };
708
+ if (this.project.__isSmartContainerTarget) {
709
+ var parent_2 = this.project.__smartContainerTargetParentContainer;
710
+ parent_2.children
711
+ .filter(function (f) { return f.typeIs('isomorphic-lib'); })
712
+ .forEach(function (c) {
713
+ var relative = parent_2.name + '--' + c.name;
714
+ var cases = toReplaceFn(relative);
715
+ for (var index = 0; index < cases.length; index++) {
716
+ var _a = cases[index], to = _a.to, from = _a.from, makeSureSlashAtBegin = _a.makeSureSlashAtBegin;
717
+ if (makeSureSlashAtBegin) {
718
+ _this.rawContentForAPPONLYBrowser =
719
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx("/".concat(from)), 'g'), "/".concat(to));
720
+ _this.rawContentForAPPONLYBrowser =
721
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), "/".concat(to));
722
+ }
723
+ else {
724
+ _this.rawContentForAPPONLYBrowser =
725
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), to);
726
+ }
727
+ }
728
+ });
729
+ }
730
+ else if (this.project.__isStandaloneProject) {
731
+ [this.project]
732
+ .filter(function (f) { return f.typeIs('isomorphic-lib'); })
733
+ .forEach(function (c) {
734
+ var relative = c.name;
735
+ var cases = toReplaceFn(relative);
736
+ for (var index = 0; index < cases.length; index++) {
737
+ var _a = cases[index], to = _a.to, from = _a.from, makeSureSlashAtBegin = _a.makeSureSlashAtBegin;
738
+ if (makeSureSlashAtBegin) {
739
+ _this.rawContentForAPPONLYBrowser =
740
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx("/".concat(from)), 'g'), "/".concat(to));
741
+ _this.rawContentForAPPONLYBrowser =
742
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), "/".concat(to));
743
+ }
744
+ else {
745
+ _this.rawContentForAPPONLYBrowser =
746
+ _this.rawContentForAPPONLYBrowser.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), to);
747
+ }
748
+ }
749
+ });
750
+ }
751
+ };
752
+ //#endregion
753
+ //#region private / methods & getters / save
754
+ BrowserCodeCut.prototype.save = function () {
755
+ if (this.isAssetsFile) {
756
+ this.saveNormalFile(false);
757
+ return;
758
+ }
759
+ // Helpers.log(`saving ismoprhic file: ${this.absoluteFilePath}`, 1)
760
+ var isFromLibs = tnp_core_1._.first(this.relativePath.split('/')) === tnp_config_1.config.folder.libs;
761
+ var module = isFromLibs
762
+ ? tnp_core_1._.first(this.relativePath.split('/').slice(1))
763
+ : this.project.name; // taget
764
+ var endOfBrowserOrWebsqlCode = "\n ".concat(mjs_fesm_module_spliter_backend_1.MjsModule.KEY_END_MODULE_FILE).concat(module, " ").concat(this.relativePath);
765
+ var isTsFile = ['.ts'].includes(tnp_core_1.path.extname(this.absFileSourcePathBrowserOrWebsql));
766
+ var backendFileSaveMode = !this.isWebsqlMode; // websql does not do anything on be
767
+ if (this.isEmptyBrowserFile) {
768
+ this.saveEmptyFile(isTsFile, endOfBrowserOrWebsqlCode);
769
+ }
770
+ else {
771
+ this.saveNormalFile(isTsFile, endOfBrowserOrWebsqlCode);
772
+ }
773
+ if (backendFileSaveMode) {
774
+ var isEmptyModuleBackendFile = this.isEmptyModuleBackendFile;
775
+ var absoluteBackendDestFilePath_1 = this.absoluteBackendDestFilePath;
776
+ if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(absoluteBackendDestFilePath_1))) {
777
+ tnp_core_1.fse.mkdirpSync(tnp_core_1.path.dirname(absoluteBackendDestFilePath_1));
778
+ }
779
+ var isFrontendFile = !tnp_core_1._.isUndefined(tnp_config_1.frontEndOnly.find(function (f) { return absoluteBackendDestFilePath_1.endsWith(f); }));
780
+ if (isFrontendFile) {
781
+ // console.log(`Ommiting for backend: ${absoluteBackendDestFilePath} `)
782
+ return;
783
+ }
784
+ if (this.project.__isSmartContainerTarget) {
785
+ var contentSmartTarget = isEmptyModuleBackendFile && isTsFile
786
+ ? "\n export function dummy".concat(new Date().getTime(), "() { }\n export default function dummyDefault").concat(new Date().getTime(), "() { }\n ")
787
+ : this.changeOrganizationBackendFileContentBeforeSave(this.rawContentBackend, absoluteBackendDestFilePath_1);
788
+ tnp_core_1.fse.writeFileSync(absoluteBackendDestFilePath_1, contentSmartTarget, 'utf8');
789
+ }
790
+ else {
791
+ var contentStandalone = isEmptyModuleBackendFile && isTsFile
792
+ ? "export function dummy".concat(new Date().getTime(), "() { }")
793
+ : this.changeStandaloneBackendFileContentBeforeSave(this.rawContentBackend, absoluteBackendDestFilePath_1);
794
+ tnp_core_1.fse.writeFileSync(absoluteBackendDestFilePath_1, contentStandalone, 'utf8');
795
+ }
796
+ }
797
+ };
798
+ //#endregion
799
+ //#region private / methods & getters / warn about using file from node_modules with lib files
800
+ BrowserCodeCut.prototype.warnAboutUsingFilesFromNodeModulesWithLibFiles = function (content, absFilePath) {
801
+ if (!absFilePath.endsWith('.ts')) {
802
+ // console.log(`NOT_FIXING: ${absFilePath}`)
803
+ return content;
804
+ }
805
+ if (this.project.__isSmartContainerTarget ||
806
+ !(this.relativePath.startsWith('app.ts') ||
807
+ this.relativePath.startsWith('app/'))) {
808
+ return;
809
+ }
810
+ var howMuchBack = this.relativePath.split('/').length - 1;
811
+ // const debugFiles = [
812
+ // // 'files.container.ts',
813
+ // // 'app.ts',
814
+ // ];
815
+ // if (debugFiles.length > 0 && !debugFiles.includes(path.basename(absFilePath))) {
816
+ // return;
817
+ // }
818
+ var recognizeImport = function (usage) {
819
+ var importRegex = new RegExp("".concat(usage, ".+from\\s+(\\'|\\\").+(\\'|\\\")"), 'g');
820
+ var asynMatches = usage === 'import' ? content.match(regexAsyncImportG) : [];
821
+ var normalMatches = content.match(importRegex);
822
+ var asyncImports = Array.isArray(asynMatches) ? asynMatches : [];
823
+ var importsLines = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read((Array.isArray(normalMatches) ? normalMatches : [])), false), tslib_1.__read(asyncImports), false);
824
+ return importsLines;
825
+ };
826
+ var lines = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(recognizeImport('import')), false), tslib_1.__read(recognizeImport('export')), false).map(function (line, index) {
827
+ if (howMuchBack === 0) {
828
+ var importRegex = new RegExp("from\\s+(\\'|\\\")\\.\\/lib(\\/|(\\'|\\\"))", 'g');
829
+ var match = importRegex.test(line);
830
+ return match ? [line, index] : void 0;
831
+ }
832
+ else {
833
+ var importRegex = new RegExp("from\\s+(\\'|\\\")".concat(tnp_core_1._.times(howMuchBack, function () {
834
+ return '\\.\\.';
835
+ }).join('\\/'), "\\/lib(\\/|(\\'|\\\"))"), 'g');
836
+ var match = importRegex.test(line);
837
+ return match ? [line, index] : void 0;
838
+ }
839
+ })
840
+ .filter(function (f) { return !!f; });
841
+ // if(lines.length > 0) {
842
+ // console.log({
843
+ // 'this.relativePath': this.relativePath,
844
+ // 'absFilePath': absFilePath,
845
+ // })
846
+ // }
847
+ for (var index = 0; index < lines.length; index++) {
848
+ var _a = tslib_1.__read(lines[index], 2), wrongImport = _a[0], lineindex = _a[1];
849
+ tnp_helpers_1.Helpers.warn("\n".concat(tnp_core_1.chalk.bold('WARNING'), ": ").concat(tnp_core_1.chalk.underline('./src/' + this.relativePath + ":".concat(lineindex + 2, ":1")), " Don't import things from lib like that (it may not work in your ").concat(this.project.name, "/src/app project);\n").concat(tnp_core_1.chalk.bold(wrongImport), ";\nPlease use version compiled in node_modules:\nimport { < My Stuff > } from '").concat(this.project.name, "';"), false);
850
+ }
851
+ };
852
+ //#endregion
853
+ //#region private / methods & getters / fix comments
854
+ BrowserCodeCut.prototype.changeBrowserOrWebsqlFileContentBeforeSave = function (browserOrWebsqlFileContent, endComment, absFilePath, packageName) {
855
+ if (packageName === void 0) { packageName = this.project.name; }
856
+ if (!this.relativePath.endsWith('.ts')) {
857
+ return browserOrWebsqlFileContent;
858
+ }
859
+ var endOfFile = this.relativePath.endsWith('.ts') && endComment ? endComment : '';
860
+ var standaloneRegexImportExport = new RegExp("from\\s+(\\'|\\\")".concat(tnp_helpers_1.Helpers.escapeStringForRegEx(packageName), "\\/(browser|websql)(\\'|\\\")"), 'g');
861
+ var standaloneRegexImports = new RegExp("imports\\((\\'|\\\")".concat(tnp_helpers_1.Helpers.escapeStringForRegEx(packageName), "\\/(browser|websql)(\\'|\\\")\\)"), 'g');
862
+ //#region debug stuff
863
+ // const debug = debugFiles.includes(path.basename(absFilePath));
864
+ // if (debug) {
865
+ // console.log('Fixing browser/websqlf file: ' + absFilePath)
866
+ // console.log({
867
+ // standaloneRegexImportExport,
868
+ // standaloneRegexImports,
869
+ // })
870
+ // }
871
+ //#endregion
872
+ var splited = tslib_1.__spreadArray([
873
+ '\n'
874
+ ], tslib_1.__read(browserOrWebsqlFileContent.split('\n')), false);
875
+ var ignoreIndex = [];
876
+ var res = splited.map(function (line, index) {
877
+ if (standaloneRegexImportExport.test(line) ||
878
+ standaloneRegexImports.test(line)) {
879
+ ignoreIndex.push(index - 1);
880
+ }
881
+ if ((line.trimLeft().startsWith('// ') ||
882
+ line.trimLeft().startsWith('//#')) &&
883
+ line.search('@ts-ignore') === -1) {
884
+ return '';
885
+ }
886
+ return line;
887
+ });
888
+ for (var index = 0; index < ignoreIndex.length; index++) {
889
+ res[ignoreIndex[index]] = res[ignoreIndex[index]] + ' // @ts-ignore';
890
+ }
891
+ var result = res.join('\n') + endOfFile;
892
+ if (this.project.__isSmartContainerTarget) {
893
+ // TODO check this
894
+ // result = this.changeOrganizationBackendFileContentBeforeSave(result, absFilePath, true);
895
+ }
896
+ else {
897
+ result = this.changeStandaloneBackendFileContentBeforeSave(result, absFilePath, true);
898
+ }
899
+ return result;
900
+ };
901
+ //#endregion
902
+ //#region private / methods & getters / change content before saving file
903
+ BrowserCodeCut.prototype.changeContenBeforeSave = function (content, absFilePath, options) {
904
+ if (!absFilePath.endsWith('.ts')) {
905
+ // console.log(`NOT_FIXING: ${absFilePath}`)
906
+ return content;
907
+ }
908
+ var isBrowser = options.isBrowser, isStandalone = options.isStandalone, additionalSmartPckages = options.additionalSmartPckages;
909
+ // const debug = debugFiles.includes(path.basename(absFilePath));
910
+ // debug && console.log(`FIXING: ${absFilePath} for ${isStandalone ? 'STANDALONE' : 'ORGANIZATION'}`)
911
+ var howMuchBack = this.relativePath.split('/').length - 1;
912
+ for (var index = 0; index < additionalSmartPckages.length; index++) {
913
+ var rootChildPackage = additionalSmartPckages[index];
914
+ var _a = tslib_1.__read(rootChildPackage.split('/'), 2), __ = _a[0], childName = _a[1];
915
+ var libName = isStandalone
916
+ ? tnp_config_1.config.folder.lib
917
+ : "".concat(tnp_config_1.config.folder.libs, "/").concat(childName);
918
+ var back = howMuchBack === 0
919
+ ? './'
920
+ : tnp_core_1._.times(howMuchBack)
921
+ .map(function () { return '../'; })
922
+ .join('');
923
+ var escapedName = tnp_helpers_1.Helpers.escapeStringForRegEx(rootChildPackage);
924
+ if (isBrowser) {
925
+ var regexFull = new RegExp("from\\s+(\\'|\\\")".concat(escapedName, "\\/(browser|websql)(\\'|\\\")"), 'g');
926
+ var regexPartial = new RegExp("from\\s+(\\'|\\\")".concat(escapedName, "\\/(browser|websql)\\/"), 'g');
927
+ // debug && console.log({
928
+ // escapedName,
929
+ // regexFull,
930
+ // regexPartial,
931
+ // });
932
+ content = content.replace(regexFull, "from '".concat(back).concat(libName, "'"));
933
+ content = content.replace(regexPartial, "from '".concat(back).concat(libName, "/"));
934
+ }
935
+ else {
936
+ var regexFull = new RegExp("from\\s+(\\'|\\\")".concat(escapedName, "(\\'|\\\")"), 'g');
937
+ var regexPartial = new RegExp("from\\s+(\\'|\\\")".concat(escapedName, "\\/"), 'g');
938
+ // debug && console.log({
939
+ // escapedName,
940
+ // regexFull,
941
+ // regexPartial,
942
+ // });
943
+ content = content.replace(regexFull, "from '".concat(back).concat(libName, "'"));
944
+ content = content.replace(regexPartial, "from '".concat(back).concat(libName, "/"));
945
+ }
946
+ }
947
+ // Helpers.warn(`[copytomanager] Empty content for ${absFilePath}`);
948
+ // console.log({ absFilePathJSJSJ: absFilePath })
949
+ return content;
950
+ };
951
+ //#endregion
952
+ //#region private / methods & getters / change file import/export for organization
953
+ /**
954
+ * TODO may be weak solutin
955
+ */
956
+ BrowserCodeCut.prototype.changeOrganizationBackendFileContentBeforeSave = function (content, absFilePath, isBrowser) {
957
+ if (isBrowser === void 0) { isBrowser = false; }
958
+ return this.changeContenBeforeSave(content, absFilePath, {
959
+ additionalSmartPckages: this.project.packageNamesFromProject,
960
+ isStandalone: false,
961
+ isBrowser: isBrowser,
962
+ });
963
+ };
964
+ //#endregion
965
+ //#region private / methods & getters / change file import/export for standalone
966
+ /**
967
+ * TODO may be weak solutin
968
+ */
969
+ BrowserCodeCut.prototype.changeStandaloneBackendFileContentBeforeSave = function (content, absFilePath, isBrowser) {
970
+ if (isBrowser === void 0) { isBrowser = false; }
971
+ return this.changeContenBeforeSave(content, absFilePath, {
972
+ additionalSmartPckages: [this.project.name],
973
+ isStandalone: true,
974
+ isBrowser: isBrowser,
975
+ });
976
+ };
977
+ //#endregion
978
+ //#region private / methods & getters / repalce accesets path
979
+ BrowserCodeCut.prototype.replaceAssetsPath = function (absDestinationPath) {
980
+ var isAsset = !this.project.__isSmartContainerTarget &&
981
+ this.relativePath.startsWith("".concat(tnp_config_1.config.folder.assets, "/"));
982
+ // isAsset && console.log('isAsset', absDestinationPath);
983
+ return isAsset
984
+ ? absDestinationPath.replace('/assets/', "/assets/assets-for/".concat(this.project.name, "/"))
985
+ : absDestinationPath;
986
+ };
987
+ return BrowserCodeCut;
988
+ }());
989
+ exports.BrowserCodeCut = BrowserCodeCut;
990
+ //# sourceMappingURL=browser-code-cut.backend.js.map