tnp 19.0.21 → 19.0.22

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 (555) hide show
  1. package/browser/fesm2022/tnp.mjs +1 -1
  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/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -2
  5. package/browser/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +13 -3
  6. package/browser/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.d.ts +2 -0
  7. package/browser/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  8. package/browser/package.json +1 -1
  9. package/cli.js +32018 -10078
  10. package/client/fesm2022/tnp.mjs +1 -1
  11. package/client/fesm2022/tnp.mjs.map +1 -1
  12. package/client/lib/build-info._auto-generated_.d.ts +1 -1
  13. package/client/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -2
  14. package/client/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +13 -3
  15. package/client/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.d.ts +2 -0
  16. package/client/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  17. package/client/package.json +1 -1
  18. package/lib/build-info._auto-generated_.d.ts +1 -1
  19. package/lib/build-info._auto-generated_.js +1 -1
  20. package/lib/helpers.js +2 -2
  21. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.d.ts +5 -3
  22. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.js +82 -40
  23. package/lib/project/abstract/artifacts/__helpers__/environment-config/environment-config-helpers.js.map +1 -1
  24. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -2
  25. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js +0 -4
  26. package/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.js.map +1 -1
  27. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +13 -3
  28. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.js +130 -35
  29. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.js.map +1 -1
  30. package/lib/project/abstract/artifacts/angular-node-app/tools/docs-app-build-config.d.ts +1 -1
  31. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.d.ts +2 -0
  32. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.js +6 -0
  33. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.js.map +1 -1
  34. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/browser-code-cut.js +5 -4
  35. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/code-cut/browser-code-cut.js.map +1 -1
  36. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/compilations/compilation-browser.js +0 -1
  37. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/build-isomorphic-lib/compilations/compilation-browser.js.map +1 -1
  38. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  39. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.js +3 -0
  40. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.js.map +1 -1
  41. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization.js +2 -2
  42. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/lib-project/lib-project-smart-container.js +2 -2
  43. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.js +2 -2
  44. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/webpack-backend-compilation.js +2 -2
  45. package/lib/project/abstract/taon-worker/taon.context.d.ts +2 -2
  46. package/lib/project/cli/cli-_GLOBAL_.d.ts +2 -0
  47. package/lib/project/cli/cli-_GLOBAL_.js +53 -0
  48. package/lib/project/cli/cli-_GLOBAL_.js.map +1 -1
  49. package/lib/project/index.js +2 -2
  50. package/package.json +1 -1
  51. package/tmp-environment.json +6 -4
  52. package/websql/fesm2022/tnp.mjs +1 -1
  53. package/websql/fesm2022/tnp.mjs.map +1 -1
  54. package/websql/lib/build-info._auto-generated_.d.ts +1 -1
  55. package/websql/lib/project/abstract/artifacts/angular-node-app/artifact-angular-node-app.d.ts +0 -2
  56. package/websql/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.d.ts +13 -3
  57. package/websql/lib/project/abstract/artifacts/npm-lib-and-cli-tool/artifact-npm-lib-and-cli-tool.d.ts +2 -0
  58. package/websql/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/base-copy-manager.d.ts +1 -1
  59. package/websql/package.json +1 -1
  60. package/lib/build-options.d.ts +0 -164
  61. package/lib/build-options.js +0 -198
  62. package/lib/build-options.js.map +0 -1
  63. package/lib/project/abstract/artifacts/__base__/base-artifact.d.ts +0 -52
  64. package/lib/project/abstract/artifacts/__base__/base-artifact.js +0 -81
  65. package/lib/project/abstract/artifacts/__base__/base-artifact.js.map +0 -1
  66. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.controller.d.ts +0 -20
  67. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.controller.js +0 -176
  68. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.controller.js.map +0 -1
  69. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.d.ts +0 -12
  70. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.js +0 -56
  71. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/build-process.js.map +0 -1
  72. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/index.d.ts +0 -2
  73. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/index.js +0 -6
  74. package/lib/project/abstract/artifacts/__base__/build-process/app/build-process/index.js.map +0 -1
  75. package/lib/project/abstract/artifacts/__base__/index.d.ts +0 -1
  76. package/lib/project/abstract/artifacts/__base__/index.js +0 -5
  77. package/lib/project/abstract/artifacts/__base__/index.js.map +0 -1
  78. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.d.ts +0 -5
  79. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.js +0 -111
  80. package/lib/project/abstract/artifacts/angular-node-app/tools/assets-manager.backend.js.map +0 -1
  81. package/lib/project/abstract/artifacts/artifact-angular-node-app/artifact-angular-node-app.d.ts +0 -9
  82. package/lib/project/abstract/artifacts/artifact-angular-node-app/index.d.ts +0 -1
  83. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.d.ts +0 -7
  84. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.js +0 -62
  85. package/lib/project/abstract/artifacts/artifact-angular-node-app copy.js.map +0 -1
  86. package/lib/project/abstract/artifacts/artifact-angular-node-app.d.ts +0 -9
  87. package/lib/project/abstract/artifacts/artifact-angular-node-app.js +0 -62
  88. package/lib/project/abstract/artifacts/artifact-angular-node-app.js.map +0 -1
  89. package/lib/project/abstract/artifacts/artifact-angular-webapp.d.ts +0 -7
  90. package/lib/project/abstract/artifacts/artifact-angular-webapp.js +0 -62
  91. package/lib/project/abstract/artifacts/artifact-angular-webapp.js.map +0 -1
  92. package/lib/project/abstract/artifacts/artifact-docs-webapp.d.ts +0 -7
  93. package/lib/project/abstract/artifacts/artifact-docs-webapp.js +0 -5
  94. package/lib/project/abstract/artifacts/artifact-docs-webapp.js.map +0 -1
  95. package/lib/project/abstract/artifacts/artifact-electron-app copy.d.ts +0 -1
  96. package/lib/project/abstract/artifacts/artifact-electron-app copy.js +0 -5
  97. package/lib/project/abstract/artifacts/artifact-electron-app copy.js.map +0 -1
  98. package/lib/project/abstract/artifacts/artifact-electron-app.d.ts +0 -8
  99. package/lib/project/abstract/artifacts/artifact-electron-app.js +0 -5
  100. package/lib/project/abstract/artifacts/artifact-electron-app.js.map +0 -1
  101. package/lib/project/abstract/artifacts/artifact-lib-cli.d.ts +0 -1
  102. package/lib/project/abstract/artifacts/artifact-lib-cli.js +0 -5
  103. package/lib/project/abstract/artifacts/artifact-lib-cli.js.map +0 -1
  104. package/lib/project/abstract/artifacts/artifact-lib-with-cli.d.ts +0 -1
  105. package/lib/project/abstract/artifacts/artifact-lib-with-cli.js +0 -5
  106. package/lib/project/abstract/artifacts/artifact-lib-with-cli.js.map +0 -1
  107. package/lib/project/abstract/artifacts/artifact-mk-docs-webapp.d.ts +0 -7
  108. package/lib/project/abstract/artifacts/artifact-mobile-app copy.d.ts +0 -1
  109. package/lib/project/abstract/artifacts/artifact-mobile-app copy.js +0 -5
  110. package/lib/project/abstract/artifacts/artifact-mobile-app copy.js.map +0 -1
  111. package/lib/project/abstract/artifacts/artifact-mobile-app.d.ts +0 -7
  112. package/lib/project/abstract/artifacts/artifact-mobile-app.js +0 -5
  113. package/lib/project/abstract/artifacts/artifact-mobile-app.js.map +0 -1
  114. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.d.ts +0 -25
  115. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.js +0 -5
  116. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli-tool.js.map +0 -1
  117. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.d.ts +0 -1
  118. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.js +0 -5
  119. package/lib/project/abstract/artifacts/artifact-npm-lib-and-cli.js.map +0 -1
  120. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.d.ts +0 -1
  121. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.js +0 -5
  122. package/lib/project/abstract/artifacts/artifact-vscode-ext copy.js.map +0 -1
  123. package/lib/project/abstract/artifacts/artifact-vscode-ext.d.ts +0 -1
  124. package/lib/project/abstract/artifacts/artifact-vscode-ext.js +0 -5
  125. package/lib/project/abstract/artifacts/artifact-vscode-ext.js.map +0 -1
  126. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.d.ts +0 -1
  127. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.js +0 -5
  128. package/lib/project/abstract/artifacts/artifact-vscode-plugin copy.js.map +0 -1
  129. package/lib/project/abstract/artifacts/artifact-vscode-plugin.d.ts +0 -9
  130. package/lib/project/abstract/artifacts/artifact-vscode-plugin.js +0 -5
  131. package/lib/project/abstract/artifacts/artifact-vscode-plugin.js.map +0 -1
  132. package/lib/project/abstract/artifacts/artifact-webapp.d.ts +0 -1
  133. package/lib/project/abstract/artifacts/artifact-webapp.js +0 -5
  134. package/lib/project/abstract/artifacts/artifact-webapp.js.map +0 -1
  135. package/lib/project/abstract/artifacts/artifacts-helpers.d.ts +0 -2
  136. package/lib/project/abstract/artifacts/build-process-maanger.d.ts +0 -38
  137. package/lib/project/abstract/artifacts/build-process-maanger.js +0 -269
  138. package/lib/project/abstract/artifacts/build-process-maanger.js.map +0 -1
  139. package/lib/project/abstract/artifacts/build-process-manager.d.ts +0 -0
  140. package/lib/project/abstract/artifacts/build-process-manager.js +0 -392
  141. package/lib/project/abstract/artifacts/build-process-manager.js.map +0 -1
  142. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.d.ts +0 -49
  143. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.js +0 -335
  144. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/copy-manager/copy-manager-organization-angular-files.js.map +0 -1
  145. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.d.ts +0 -17
  146. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.js +0 -383
  147. package/lib/project/abstract/artifacts/npm-lib-and-cli-tool/tools/singular-build.backend.js.map +0 -1
  148. package/lib/project/abstract/base-compiler-for-project.backend.d.ts +0 -6
  149. package/lib/project/abstract/base-compiler-for-project.backend.js +0 -57
  150. package/lib/project/abstract/base-compiler-for-project.backend.js.map +0 -1
  151. package/lib/project/abstract/base-local-release.d.ts +0 -7
  152. package/lib/project/abstract/base-local-release.js +0 -110
  153. package/lib/project/abstract/base-local-release.js.map +0 -1
  154. package/lib/project/abstract/docs.d.ts +0 -51
  155. package/lib/project/abstract/docs.js +0 -813
  156. package/lib/project/abstract/docs.js.map +0 -1
  157. package/lib/project/abstract/migrations-helper.d.ts +0 -18
  158. package/lib/project/abstract/migrations-helper.js +0 -124
  159. package/lib/project/abstract/migrations-helper.js.map +0 -1
  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 +0 -4
  162. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app.js +0 -19
  163. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-electron-app.js.map +0 -1
  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 +0 -4
  166. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp.js +0 -19
  167. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-frontend-webapp.js.map +0 -1
  168. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.d.ts +0 -4
  169. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.js +0 -19
  170. package/lib/project/abstract/release-process/artifacts/artifact-release-angular-ionic-app.js.map +0 -1
  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 +0 -4
  175. package/lib/project/abstract/release-process/artifacts/artifact-release-mkdocs-docs-webapp.js +0 -19
  176. package/lib/project/abstract/release-process/artifacts/artifact-release-mkdocs-docs-webapp.js.map +0 -1
  177. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.d.ts +0 -4
  178. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.js +0 -19
  179. package/lib/project/abstract/release-process/artifacts/artifact-release-nodejs-backend-server.js.map +0 -1
  180. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-and-cli-tool-package.d.ts +0 -6
  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 +0 -4
  183. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-pkg-and-cli-tool.js +0 -19
  184. package/lib/project/abstract/release-process/artifacts/artifact-release-npm-lib-pkg-and-cli-tool.js.map +0 -1
  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 +0 -6
  187. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.d.ts +0 -4
  188. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.js +0 -19
  189. package/lib/project/abstract/release-process/artifacts/artifact-release-vscode-extension.js.map +0 -1
  190. package/lib/project/abstract/release-process/artifacts/artifact-release.d.ts +0 -14
  191. package/lib/project/abstract/release-process/artifacts/artifact-release.js +0 -28
  192. package/lib/project/abstract/release-process/artifacts/artifact-release.js.map +0 -1
  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 +0 -6
  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 +0 -10
  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 +0 -7
  205. package/lib/project/abstract/release-process/release-process-cloud.js +0 -23
  206. package/lib/project/abstract/release-process/release-process-cloud.js.map +0 -1
  207. package/lib/project/abstract/release-process/release-process-local.d.ts +0 -7
  208. package/lib/project/abstract/release-process/release-process-local.js +0 -23
  209. package/lib/project/abstract/release-process/release-process-local.js.map +0 -1
  210. package/lib/project/abstract/release-process/release-process-manual.d.ts +0 -7
  211. package/lib/project/abstract/release-process/release-process-manual.js +0 -23
  212. package/lib/project/abstract/release-process/release-process-manual.js.map +0 -1
  213. package/lib/project/abstract/taon-worker/index.d.ts +0 -1
  214. package/lib/project/abstract/taon-worker/index.js +0 -5
  215. package/lib/project/abstract/taon-worker/index.js.map +0 -1
  216. package/lib/project/abstract/taon-worker/taon-build.entity copy.d.ts +0 -8
  217. package/lib/project/abstract/taon-worker/taon-build.entity copy.js +0 -50
  218. package/lib/project/abstract/taon-worker/taon-build.entity copy.js.map +0 -1
  219. package/lib/project/abstract/taon-worker/taon-project.entity copy.d.ts +0 -5
  220. package/lib/project/abstract/taon-worker/taon-project.entity copy.js +0 -37
  221. package/lib/project/abstract/taon-worker/taon-project.entity copy.js.map +0 -1
  222. package/lib/project/abstract/taon-worker/taon-termina-ui.d.ts +0 -20
  223. package/lib/project/abstract/taon-worker/taon-termina-ui.js +0 -67
  224. package/lib/project/abstract/taon-worker/taon-termina-ui.js.map +0 -1
  225. package/lib/project/abstract/taon-worker/taon.entity.d.ts +0 -6
  226. package/lib/project/abstract/taon-worker/taon.entity.js +0 -46
  227. package/lib/project/abstract/taon-worker/taon.entity.js.map +0 -1
  228. package/lib/project/abstract/taon-worker.d.ts +0 -29
  229. package/lib/project/abstract/taon-worker.js +0 -4
  230. package/lib/project/abstract/taon-worker.js.map +0 -1
  231. package/lib/project/cli/cli-BRANDING.backend.d.ts +0 -26
  232. package/lib/project/cli/cli-BRANDING.backend.js +0 -50
  233. package/lib/project/cli/cli-BRANDING.backend.js.map +0 -1
  234. package/lib/project/cli/cli-BUILD.backend.d.ts +0 -4
  235. package/lib/project/cli/cli-BUILD.backend.js +0 -269
  236. package/lib/project/cli/cli-BUILD.backend.js.map +0 -1
  237. package/lib/project/cli/cli-CI-BUILD.backend.d.ts +0 -4
  238. package/lib/project/cli/cli-CI-BUILD.backend.js +0 -88
  239. package/lib/project/cli/cli-CI-BUILD.backend.js.map +0 -1
  240. package/lib/project/cli/cli-DOCS.backend.d.ts +0 -4
  241. package/lib/project/cli/cli-DOCS.backend.js +0 -48
  242. package/lib/project/cli/cli-DOCS.backend.js.map +0 -1
  243. package/lib/project/cli/cli-ELECTRON.backend.d.ts +0 -4
  244. package/lib/project/cli/cli-ELECTRON.backend.js +0 -80
  245. package/lib/project/cli/cli-ELECTRON.backend.js.map +0 -1
  246. package/lib/project/cli/cli-INIT.backend.d.ts +0 -16
  247. package/lib/project/cli/cli-INIT.backend.js +0 -179
  248. package/lib/project/cli/cli-INIT.backend.js.map +0 -1
  249. package/lib/project/cli/cli-LINK.backend.d.ts +0 -21
  250. package/lib/project/cli/cli-LINK.backend.js +0 -204
  251. package/lib/project/cli/cli-LINK.backend.js.map +0 -1
  252. package/lib/project/cli/cli-LOCAL-RELEASE.backend.d.ts +0 -17
  253. package/lib/project/cli/cli-LOCAL-RELEASE.backend.js +0 -240
  254. package/lib/project/cli/cli-LOCAL-RELEASE.backend.js.map +0 -1
  255. package/lib/project/cli/cli-LOCAL-RELEASE.d.ts +0 -0
  256. package/lib/project/cli/cli-LOCAL-RELEASE.js +0 -184
  257. package/lib/project/cli/cli-LOCAL-RELEASE.js.map +0 -1
  258. package/lib/project/cli/cli-MIGRATION.backend.d.ts +0 -4
  259. package/lib/project/cli/cli-MIGRATION.backend.js +0 -213
  260. package/lib/project/cli/cli-MIGRATION.backend.js.map +0 -1
  261. package/lib/project/cli/cli-NEW.backend.d.ts +0 -18
  262. package/lib/project/cli/cli-NEW.backend.js +0 -393
  263. package/lib/project/cli/cli-NEW.backend.js.map +0 -1
  264. package/lib/project/cli/cli-OPEN.backend.d.ts +0 -17
  265. package/lib/project/cli/cli-OPEN.backend.js +0 -129
  266. package/lib/project/cli/cli-OPEN.backend.js.map +0 -1
  267. package/lib/project/cli/cli-RELEASE.backend.d.ts +0 -4
  268. package/lib/project/cli/cli-RELEASE.backend.js +0 -415
  269. package/lib/project/cli/cli-RELEASE.backend.js.map +0 -1
  270. package/lib/project/cli/cli-SERVICE.backend.d.ts +0 -9
  271. package/lib/project/cli/cli-SERVICE.backend.js +0 -38
  272. package/lib/project/cli/cli-SERVICE.backend.js.map +0 -1
  273. package/lib/project/cli/cli-START.backend.d.ts +0 -2
  274. package/lib/project/cli/cli-START.backend.js +0 -4
  275. package/lib/project/cli/cli-START.backend.js.map +0 -1
  276. package/lib/project/cli/cli-TEST.backend.d.ts +0 -24
  277. package/lib/project/cli/cli-TEST.backend.js +0 -292
  278. package/lib/project/cli/cli-TEST.backend.js.map +0 -1
  279. package/lib/project/cli/cli-TS.backend.d.ts +0 -9
  280. package/lib/project/cli/cli-TS.backend.js +0 -29
  281. package/lib/project/cli/cli-TS.backend.js.map +0 -1
  282. package/lib/project/cli/cli-UPDATE.backend.d.ts +0 -2
  283. package/lib/project/cli/cli-UPDATE.backend.js +0 -4
  284. package/lib/project/cli/cli-UPDATE.backend.js.map +0 -1
  285. package/lib/project/cli/cli-VSCODE.backend.d.ts +0 -20
  286. package/lib/project/cli/cli-VSCODE.backend.js +0 -153
  287. package/lib/project/cli/cli-VSCODE.backend.js.map +0 -1
  288. package/lib/project/cli/cli-_GLOBAL_.backend.d.ts +0 -91
  289. package/lib/project/cli/cli-_GLOBAL_.backend.js +0 -1730
  290. package/lib/project/cli/cli-_GLOBAL_.backend.js.map +0 -1
  291. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.d.ts +0 -21
  292. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js +0 -150
  293. package/lib/project/compilers/assets-list-file-generator/assets-list-file-generator.backend.js.map +0 -1
  294. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.d.ts +0 -102
  295. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js +0 -990
  296. package/lib/project/compilers/build-isomorphic-lib/code-cut/browser-code-cut.backend.js.map +0 -1
  297. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.d.ts +0 -41
  298. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js +0 -85
  299. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-cut.backend.js.map +0 -1
  300. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.d.ts +0 -44
  301. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.js +0 -98
  302. package/lib/project/compilers/build-isomorphic-lib/code-cut/code-split-process.enum.js.map +0 -1
  303. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.d.ts +0 -1
  304. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.js +0 -18
  305. package/lib/project/compilers/build-isomorphic-lib/code-cut/cut-fn.backend.js.map +0 -1
  306. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.d.ts +0 -14
  307. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.js +0 -159
  308. package/lib/project/compilers/build-isomorphic-lib/code-cut/file-split-process.js.map +0 -1
  309. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.d.ts +0 -60
  310. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js +0 -284
  311. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-backend.backend.js.map +0 -1
  312. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.d.ts +0 -42
  313. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js +0 -232
  314. package/lib/project/compilers/build-isomorphic-lib/compilations/compilation-browser.backend.js.map +0 -1
  315. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.d.ts +0 -18
  316. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js +0 -165
  317. package/lib/project/compilers/build-isomorphic-lib/compilations/incremental-build-process.backend.js.map +0 -1
  318. package/lib/project/compilers/index.d.ts +0 -1
  319. package/lib/project/compilers/index.js +0 -8
  320. package/lib/project/compilers/index.js.map +0 -1
  321. package/lib/project/features/assets-manager.backend.d.ts +0 -5
  322. package/lib/project/features/assets-manager.backend.js +0 -110
  323. package/lib/project/features/assets-manager.backend.js.map +0 -1
  324. package/lib/project/features/basename-manager.d.ts +0 -18
  325. package/lib/project/features/basename-manager.js +0 -89
  326. package/lib/project/features/basename-manager.js.map +0 -1
  327. package/lib/project/features/branding.backend.d.ts +0 -11
  328. package/lib/project/features/branding.backend.js +0 -213
  329. package/lib/project/features/branding.backend.js.map +0 -1
  330. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.d.ts +0 -14
  331. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.js +0 -44
  332. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.js.map +0 -1
  333. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.d.ts +0 -0
  334. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.js +0 -2
  335. package/lib/project/features/build-process/app/build-process/backend/build-process-backend.test.js.map +0 -1
  336. package/lib/project/features/build-process/app/build-process/build-process.controller.d.ts +0 -20
  337. package/lib/project/features/build-process/app/build-process/build-process.controller.js +0 -159
  338. package/lib/project/features/build-process/app/build-process/build-process.controller.js.map +0 -1
  339. package/lib/project/features/build-process/app/build-process/build-process.d.ts +0 -12
  340. package/lib/project/features/build-process/app/build-process/build-process.js +0 -56
  341. package/lib/project/features/build-process/app/build-process/build-process.js.map +0 -1
  342. package/lib/project/features/build-process/app/build-process/index.d.ts +0 -2
  343. package/lib/project/features/build-process/app/build-process/index.js +0 -6
  344. package/lib/project/features/build-process/app/build-process/index.js.map +0 -1
  345. package/lib/project/features/copy-manager/base-copy-manager.backend.d.ts +0 -87
  346. package/lib/project/features/copy-manager/base-copy-manager.backend.js +0 -504
  347. package/lib/project/features/copy-manager/base-copy-manager.backend.js.map +0 -1
  348. package/lib/project/features/copy-manager/copy-manager-helpers.backend.d.ts +0 -12
  349. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js +0 -96
  350. package/lib/project/features/copy-manager/copy-manager-helpers.backend.js.map +0 -1
  351. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.d.ts +0 -49
  352. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js +0 -321
  353. package/lib/project/features/copy-manager/copy-manager-organization-angular-files.backend.js.map +0 -1
  354. package/lib/project/features/copy-manager/copy-manager-organization.backend.d.ts +0 -78
  355. package/lib/project/features/copy-manager/copy-manager-organization.backend.js +0 -788
  356. package/lib/project/features/copy-manager/copy-manager-organization.backend.js.map +0 -1
  357. package/lib/project/features/copy-manager/copy-manager-standalone.backend.d.ts +0 -77
  358. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js +0 -575
  359. package/lib/project/features/copy-manager/copy-manager-standalone.backend.js.map +0 -1
  360. package/lib/project/features/copy-manager/copy-manager.backend.d.ts +0 -7
  361. package/lib/project/features/copy-manager/copy-manager.backend.js +0 -27
  362. package/lib/project/features/copy-manager/copy-manager.backend.js.map +0 -1
  363. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.d.ts +0 -46
  364. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js +0 -354
  365. package/lib/project/features/copy-manager/mjs-fesm-module-spliter.backend.js.map +0 -1
  366. package/lib/project/features/copy-manager/source-maping-url.backend.d.ts +0 -12
  367. package/lib/project/features/copy-manager/source-maping-url.backend.js +0 -56
  368. package/lib/project/features/copy-manager/source-maping-url.backend.js.map +0 -1
  369. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.d.ts +0 -25
  370. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js +0 -97
  371. package/lib/project/features/copy-manager/typescript-dts-fixer.backend.js.map +0 -1
  372. package/lib/project/features/docs-app-build-config.backend.d.ts +0 -19
  373. package/lib/project/features/docs-app-build-config.backend.js +0 -81
  374. package/lib/project/features/docs-app-build-config.backend.js.map +0 -1
  375. package/lib/project/features/docs-provider.d.ts +0 -9
  376. package/lib/project/features/docs-provider.js +0 -48
  377. package/lib/project/features/docs-provider.js.map +0 -1
  378. package/lib/project/features/documentation-builder.d.ts +0 -0
  379. package/lib/project/features/documentation-builder.js +0 -5
  380. package/lib/project/features/documentation-builder.js.map +0 -1
  381. package/lib/project/features/environment-config/environment-config-helpers.d.ts +0 -6
  382. package/lib/project/features/environment-config/environment-config-helpers.js +0 -197
  383. package/lib/project/features/environment-config/environment-config-helpers.js.map +0 -1
  384. package/lib/project/features/environment-config/environment-config.d.ts +0 -12
  385. package/lib/project/features/environment-config/environment-config.js +0 -117
  386. package/lib/project/features/environment-config/environment-config.js.map +0 -1
  387. package/lib/project/features/environment-config/example-environment-config.d.ts +0 -2
  388. package/lib/project/features/environment-config/example-environment-config.js +0 -26
  389. package/lib/project/features/environment-config/example-environment-config.js.map +0 -1
  390. package/lib/project/features/files-recreation/files-factory.backend.d.ts +0 -11
  391. package/lib/project/features/files-recreation/files-factory.backend.js +0 -64
  392. package/lib/project/features/files-recreation/files-factory.backend.js.map +0 -1
  393. package/lib/project/features/files-recreation/files-recreator.d.ts +0 -113
  394. package/lib/project/features/files-recreation/files-recreator.js +0 -661
  395. package/lib/project/features/files-recreation/files-recreator.js.map +0 -1
  396. package/lib/project/features/files-recreation/files-templates.d.ts +0 -8
  397. package/lib/project/features/files-recreation/files-templates.js +0 -129
  398. package/lib/project/features/files-recreation/files-templates.js.map +0 -1
  399. package/lib/project/features/files-recreation/index.d.ts +0 -3
  400. package/lib/project/features/files-recreation/index.js +0 -9
  401. package/lib/project/features/files-recreation/index.js.map +0 -1
  402. package/lib/project/features/html-to-md.d.ts +0 -1
  403. package/lib/project/features/html-to-md.js +0 -241
  404. package/lib/project/features/html-to-md.js.map +0 -1
  405. package/lib/project/features/index-autogen-provider.backend.d.ts +0 -14
  406. package/lib/project/features/index-autogen-provider.backend.js +0 -102
  407. package/lib/project/features/index-autogen-provider.backend.js.map +0 -1
  408. package/lib/project/features/index.d.ts +0 -12
  409. package/lib/project/features/index.js +0 -18
  410. package/lib/project/features/index.js.map +0 -1
  411. package/lib/project/features/inside-structures/inside-struct.d.ts +0 -43
  412. package/lib/project/features/inside-structures/inside-struct.js +0 -53
  413. package/lib/project/features/inside-structures/inside-struct.js.map +0 -1
  414. package/lib/project/features/inside-structures/inside-structures.d.ts +0 -11
  415. package/lib/project/features/inside-structures/inside-structures.js +0 -160
  416. package/lib/project/features/inside-structures/inside-structures.js.map +0 -1
  417. package/lib/project/features/inside-structures/structs/base-inside-struct.d.ts +0 -13
  418. package/lib/project/features/inside-structures/structs/base-inside-struct.js +0 -24
  419. package/lib/project/features/inside-structures/structs/base-inside-struct.js.map +0 -1
  420. package/lib/project/features/inside-structures/structs/index.d.ts +0 -2
  421. package/lib/project/features/inside-structures/structs/index.js +0 -6
  422. package/lib/project/features/inside-structures/structs/index.js.map +0 -1
  423. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.d.ts +0 -6
  424. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js +0 -495
  425. package/lib/project/features/inside-structures/structs/inside-struct-angular13-app.js.map +0 -1
  426. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.d.ts +0 -6
  427. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js +0 -240
  428. package/lib/project/features/inside-structures/structs/inside-struct-angular13-lib.js.map +0 -1
  429. package/lib/project/features/inside-structures/structs/inside-struct-constants.d.ts +0 -2
  430. package/lib/project/features/inside-structures/structs/inside-struct-constants.js +0 -6
  431. package/lib/project/features/inside-structures/structs/inside-struct-constants.js.map +0 -1
  432. package/lib/project/features/inside-structures/structs/inside-struct-helpers.d.ts +0 -12
  433. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js +0 -128
  434. package/lib/project/features/inside-structures/structs/inside-struct-helpers.js.map +0 -1
  435. package/lib/project/features/inside-structures/structs/loaders/image-loader.d.ts +0 -1
  436. package/lib/project/features/inside-structures/structs/loaders/image-loader.js +0 -9
  437. package/lib/project/features/inside-structures/structs/loaders/image-loader.js.map +0 -1
  438. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.d.ts +0 -1
  439. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.js +0 -10
  440. package/lib/project/features/inside-structures/structs/loaders/loader-ids-default.js.map +0 -1
  441. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.d.ts +0 -1
  442. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.js +0 -10
  443. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ellipsis.js.map +0 -1
  444. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.d.ts +0 -1
  445. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.js +0 -10
  446. package/lib/project/features/inside-structures/structs/loaders/loader-ids-facebook.js.map +0 -1
  447. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.d.ts +0 -1
  448. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.js +0 -10
  449. package/lib/project/features/inside-structures/structs/loaders/loader-ids-grid.js.map +0 -1
  450. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.d.ts +0 -1
  451. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.js +0 -10
  452. package/lib/project/features/inside-structures/structs/loaders/loader-ids-heart.js.map +0 -1
  453. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.d.ts +0 -1
  454. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.js +0 -10
  455. package/lib/project/features/inside-structures/structs/loaders/loader-ids-ripple.js.map +0 -1
  456. package/lib/project/features/inside-structures/structs/loaders/loaders.d.ts +0 -1
  457. package/lib/project/features/inside-structures/structs/loaders/loaders.js +0 -27
  458. package/lib/project/features/inside-structures/structs/loaders/loaders.js.map +0 -1
  459. package/lib/project/features/lib-project/lib-project-base.backend.d.ts +0 -14
  460. package/lib/project/features/lib-project/lib-project-base.backend.js +0 -120
  461. package/lib/project/features/lib-project/lib-project-base.backend.js.map +0 -1
  462. package/lib/project/features/lib-project/lib-project-smart-container.backend.d.ts +0 -13
  463. package/lib/project/features/lib-project/lib-project-smart-container.backend.js +0 -320
  464. package/lib/project/features/lib-project/lib-project-smart-container.backend.js.map +0 -1
  465. package/lib/project/features/lib-project/lib-project-standalone.backend.d.ts +0 -13
  466. package/lib/project/features/lib-project/lib-project-standalone.backend.js +0 -269
  467. package/lib/project/features/lib-project/lib-project-standalone.backend.js.map +0 -1
  468. package/lib/project/features/lib-project/lib-project-vscode-ext.d.ts +0 -11
  469. package/lib/project/features/lib-project/lib-project-vscode-ext.js +0 -128
  470. package/lib/project/features/lib-project/lib-project-vscode-ext.js.map +0 -1
  471. package/lib/project/features/linked-repos.backend.d.ts +0 -19
  472. package/lib/project/features/linked-repos.backend.js +0 -198
  473. package/lib/project/features/linked-repos.backend.js.map +0 -1
  474. package/lib/project/features/node-modules/index.d.ts +0 -1
  475. package/lib/project/features/node-modules/index.js +0 -7
  476. package/lib/project/features/node-modules/index.js.map +0 -1
  477. package/lib/project/features/node-modules/node-modules-helpers.backend.d.ts +0 -3
  478. package/lib/project/features/node-modules/node-modules-helpers.backend.js +0 -159
  479. package/lib/project/features/node-modules/node-modules-helpers.backend.js.map +0 -1
  480. package/lib/project/features/node-modules/node-modules.d.ts +0 -29
  481. package/lib/project/features/node-modules/node-modules.js +0 -350
  482. package/lib/project/features/node-modules/node-modules.js.map +0 -1
  483. package/lib/project/features/npm-packages/index.d.ts +0 -1
  484. package/lib/project/features/npm-packages/index.js +0 -7
  485. package/lib/project/features/npm-packages/index.js.map +0 -1
  486. package/lib/project/features/npm-packages/npm-packages-base.backend.d.ts +0 -6
  487. package/lib/project/features/npm-packages/npm-packages-base.backend.js +0 -159
  488. package/lib/project/features/npm-packages/npm-packages-base.backend.js.map +0 -1
  489. package/lib/project/features/npm-packages/npm-packages-core.backend.d.ts +0 -15
  490. package/lib/project/features/npm-packages/npm-packages-core.backend.js +0 -166
  491. package/lib/project/features/npm-packages/npm-packages-core.backend.js.map +0 -1
  492. package/lib/project/features/npm-packages/npm-packages-helpers.backend.d.ts +0 -7
  493. package/lib/project/features/npm-packages/npm-packages-helpers.backend.js +0 -85
  494. package/lib/project/features/npm-packages/npm-packages-helpers.backend.js.map +0 -1
  495. package/lib/project/features/npm-packages/npm-packages.d.ts +0 -5
  496. package/lib/project/features/npm-packages/npm-packages.js +0 -72
  497. package/lib/project/features/npm-packages/npm-packages.js.map +0 -1
  498. package/lib/project/features/package-json/index.d.ts +0 -1
  499. package/lib/project/features/package-json/index.js +0 -5
  500. package/lib/project/features/package-json/index.js.map +0 -1
  501. package/lib/project/features/package-json/package-json-base.backend.d.ts +0 -31
  502. package/lib/project/features/package-json/package-json-base.backend.js +0 -157
  503. package/lib/project/features/package-json/package-json-base.backend.js.map +0 -1
  504. package/lib/project/features/package-json/package-json-core.backend.d.ts +0 -56
  505. package/lib/project/features/package-json/package-json-core.backend.js +0 -369
  506. package/lib/project/features/package-json/package-json-core.backend.js.map +0 -1
  507. package/lib/project/features/package-json/package-json-deps-categories.backend.d.ts +0 -17
  508. package/lib/project/features/package-json/package-json-deps-categories.backend.js +0 -145
  509. package/lib/project/features/package-json/package-json-deps-categories.backend.js.map +0 -1
  510. package/lib/project/features/package-json/package-json-helpers.backend.d.ts +0 -14
  511. package/lib/project/features/package-json/package-json-helpers.backend.js +0 -766
  512. package/lib/project/features/package-json/package-json-helpers.backend.js.map +0 -1
  513. package/lib/project/features/package-json/package-json.d.ts +0 -6
  514. package/lib/project/features/package-json/package-json.js +0 -66
  515. package/lib/project/features/package-json/package-json.js.map +0 -1
  516. package/lib/project/features/package-recognition/packages-recognition.d.ts +0 -13
  517. package/lib/project/features/package-recognition/packages-recognition.js +0 -187
  518. package/lib/project/features/package-recognition/packages-recognition.js.map +0 -1
  519. package/lib/project/features/quick-fixes.d.ts +0 -29
  520. package/lib/project/features/quick-fixes.js +0 -433
  521. package/lib/project/features/quick-fixes.js.map +0 -1
  522. package/lib/project/features/singular-build.backend.d.ts +0 -18
  523. package/lib/project/features/singular-build.backend.js +0 -375
  524. package/lib/project/features/singular-build.backend.js.map +0 -1
  525. package/lib/project/features/target-project.backend.d.ts +0 -10
  526. package/lib/project/features/target-project.backend.js +0 -189
  527. package/lib/project/features/target-project.backend.js.map +0 -1
  528. package/lib/project/features/test-runner/cypress-test-runner.d.ts +0 -7
  529. package/lib/project/features/test-runner/cypress-test-runner.js +0 -84
  530. package/lib/project/features/test-runner/cypress-test-runner.js.map +0 -1
  531. package/lib/project/features/test-runner/index.d.ts +0 -3
  532. package/lib/project/features/test-runner/index.js +0 -7
  533. package/lib/project/features/test-runner/index.js.map +0 -1
  534. package/lib/project/features/test-runner/jest-test-runner.d.ts +0 -8
  535. package/lib/project/features/test-runner/jest-test-runner.js +0 -69
  536. package/lib/project/features/test-runner/jest-test-runner.js.map +0 -1
  537. package/lib/project/features/test-runner/mocha-test-runner.d.ts +0 -7
  538. package/lib/project/features/test-runner/mocha-test-runner.js +0 -66
  539. package/lib/project/features/test-runner/mocha-test-runner.js.map +0 -1
  540. package/lib/project/features/webpack-backend-compilation.backend.d.ts +0 -14
  541. package/lib/project/features/webpack-backend-compilation.backend.js +0 -68
  542. package/lib/project/features/webpack-backend-compilation.backend.js.map +0 -1
  543. package/lib/taon-models.d.ts +0 -72
  544. package/migrations/1735324537544_pierwsza.d.ts +0 -1
  545. package/migrations/1735324537544_pierwsza.js +0 -3
  546. package/migrations/1735324537544_pierwsza.js.map +0 -1
  547. package/migrations/1735324809552_pierwsza.d.ts +0 -6
  548. package/migrations/1735324809552_pierwsza.js +0 -33
  549. package/migrations/1735324809552_pierwsza.js.map +0 -1
  550. package/migrations/1735324983861_druga.d.ts +0 -6
  551. package/migrations/1735324983861_druga.js +0 -33
  552. package/migrations/1735324983861_druga.js.map +0 -1
  553. package/migrations/1737301578918_addingSampleData.d.ts +0 -32
  554. package/migrations/1737301578918_addingSampleData.js +0 -111
  555. package/migrations/1737301578918_addingSampleData.js.map +0 -1
@@ -1,990 +0,0 @@
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