@nutin/cli 1.3.0 → 2.0.0

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 (284) hide show
  1. package/CHANGELOG.md +122 -8
  2. package/README.md +21 -37
  3. package/bin/add-feature.mjs +9 -0
  4. package/bin/cli.mjs +8 -0
  5. package/bin/create-app.mjs +5 -4
  6. package/bin/update-app.mjs +9 -0
  7. package/lib/index.mjs +81 -30
  8. package/lib/src/add-feature/feature-adder.mjs +83 -0
  9. package/lib/src/add-feature/feature-context-builder.mjs +25 -0
  10. package/lib/src/add-feature/nutin-config-updater.mjs +29 -0
  11. package/lib/src/add-feature/package-json-updater.mjs +49 -0
  12. package/lib/src/common/feature-registry.mjs +11 -0
  13. package/lib/src/common/file-generator.mjs +159 -0
  14. package/lib/src/common/meta-bootstrap-prompt.mjs +33 -0
  15. package/lib/src/common/package-data.mjs +10 -0
  16. package/lib/src/common/package-json-helper.mjs +103 -0
  17. package/lib/src/common/project-meta.mjs +54 -0
  18. package/lib/src/create-app/context-builder.mjs +21 -0
  19. package/lib/src/{git-manager.mjs → create-app/git-manager.mjs} +2 -2
  20. package/lib/src/create-app/json-manager.mjs +73 -0
  21. package/lib/src/create-app/new-app-prompt.mjs +51 -0
  22. package/lib/src/{project-generator.mjs → create-app/project-generator.mjs} +15 -13
  23. package/lib/src/create-app/success-message.mjs +14 -0
  24. package/lib/src/update-app/conflict-report-writer.mjs +31 -0
  25. package/lib/src/update-app/fetch-old-templates.mjs +61 -0
  26. package/lib/src/update-app/project-updater.mjs +136 -0
  27. package/lib/src/update-app/template-differ.mjs +124 -0
  28. package/lib/src/update-app/update-context-builder.mjs +25 -0
  29. package/lib/src/update-app/update-summary-printer.mjs +22 -0
  30. package/lib/src/update-app/version-compare.mjs +12 -0
  31. package/lib/src/utils/print.mjs +36 -0
  32. package/lib/src/utils/promise-exec-alias.mjs +4 -0
  33. package/package.json +17 -12
  34. package/templates/base/.gitignore.hbs +6 -1
  35. package/templates/base/AGENTS.md.hbs +169 -0
  36. package/templates/base/GETTING_STARTED.md.hbs +227 -0
  37. package/templates/base/README.md.hbs +8 -17
  38. package/templates/base/config/languages.json.hbs +6 -0
  39. package/templates/base/config/seo.json.hbs +12 -0
  40. package/templates/base/nutin.config.js.hbs +51 -0
  41. package/templates/base/src/app/components/index.ts.hbs +1 -2
  42. package/templates/base/src/app/globals.d.ts.hbs +3 -15
  43. package/templates/base/src/{libs/guards → app}/guards.ts.hbs +1 -5
  44. package/templates/base/src/app/main.ts.hbs +7 -26
  45. package/templates/base/src/app/services/index.ts.hbs +1 -1
  46. package/templates/base/src/app/views/home/home.view.html.hbs +7 -0
  47. package/templates/base/src/app/views/home/home.view.ts.hbs +1 -56
  48. package/templates/base/src/app/views/index.ts.hbs +1 -0
  49. package/templates/base/src/app/views/not-found/not-found.view.html.hbs +8 -0
  50. package/templates/base/src/app/views/not-found/not-found.view.ts.hbs +4 -37
  51. package/templates/base/src/core/base-classes/base-component/base-component.test.js.hbs +158 -0
  52. package/templates/base/src/core/base-classes/base-component/base-component.ts.hbs +81 -31
  53. package/templates/base/src/core/base-classes/base-component/helpers/catalog.helper.test.js.hbs +124 -0
  54. package/templates/base/src/core/base-classes/base-component/helpers/catalog.helper.ts.hbs +38 -23
  55. package/templates/base/src/core/base-classes/base-component/helpers/children.helper.test.js.hbs +74 -0
  56. package/templates/base/src/core/base-classes/base-component/helpers/children.helper.ts.hbs +1 -1
  57. package/templates/base/src/core/base-classes/base-component/helpers/dom.helper.test.js.hbs +145 -0
  58. package/templates/base/src/core/base-classes/base-component/helpers/dom.helper.ts.hbs +41 -1
  59. package/templates/base/src/core/base-classes/base-component/helpers/event.helper.test.js.hbs +88 -0
  60. package/templates/base/src/core/base-classes/base-component/helpers/event.helper.ts.hbs +13 -14
  61. package/templates/base/src/core/base-classes/base-component/helpers/i18n.helper.test.js.hbs +62 -0
  62. package/templates/base/src/core/base-classes/base-component/helpers/pipe.helper.test.js.hbs +82 -0
  63. package/templates/base/src/core/base-classes/base-component/helpers/security.helper.test.js.hbs +142 -0
  64. package/templates/base/src/core/base-classes/base-component/helpers/security.helper.ts.hbs +67 -22
  65. package/templates/base/src/core/base-classes/base-component/helpers/token.helper.test.js.hbs +183 -0
  66. package/templates/base/src/core/base-classes/component/component.test.js.hbs +85 -0
  67. package/templates/base/src/core/base-classes/component/component.ts.hbs +27 -40
  68. package/templates/base/src/core/base-classes/component/helpers/config.helper.test.js.hbs +58 -0
  69. package/templates/base/src/core/base-classes/component/helpers/config.helper.ts.hbs +17 -0
  70. package/templates/base/src/core/base-classes/component/helpers/data-binding.helper.test.js.hbs +75 -0
  71. package/templates/base/src/core/base-classes/service/service.test.js.hbs +150 -0
  72. package/templates/base/src/core/base-classes/service/service.ts.hbs +26 -20
  73. package/templates/base/src/core/base-classes/view/view.test.js.hbs +74 -0
  74. package/templates/base/src/core/base-classes/view/view.ts.hbs +17 -41
  75. package/templates/base/src/core/config.ts.hbs +7 -0
  76. package/templates/base/src/core/index.ts.hbs +0 -3
  77. package/templates/base/src/core/internals.d.ts.hbs +27 -0
  78. package/templates/base/src/core/nutin-config.d.ts.hbs +4 -0
  79. package/templates/base/src/core/services/event-bus/event-bus.test.js.hbs +67 -3
  80. package/templates/base/src/core/services/event-bus/event-bus.ts.hbs +9 -4
  81. package/templates/base/src/core/services/event-bus/index.ts.hbs +3 -0
  82. package/templates/base/src/core/services/event-bus/lifecycle.facade.test.js.hbs +123 -0
  83. package/templates/base/src/core/services/event-bus/lifecycle.facade.ts.hbs +61 -0
  84. package/templates/base/src/core/services/event-bus/navigation.facade.test.js.hbs +46 -0
  85. package/templates/base/src/core/services/event-bus/navigation.facade.ts.hbs +25 -0
  86. package/templates/base/src/core/services/globals/globals.test.js.hbs +149 -0
  87. package/templates/base/src/core/services/globals/globals.ts.hbs +95 -0
  88. package/templates/base/src/core/services/http-client/helpers/http-builder.helper.test.js.hbs +25 -0
  89. package/templates/base/src/core/services/http-client/helpers/http-manager.helper.test.js.hbs +20 -0
  90. package/templates/base/src/core/services/http-client/http-client.test.js.hbs +43 -0
  91. package/templates/base/src/core/services/i18n/i18n.test.js.hbs +270 -0
  92. package/templates/{features/i18n → base}/src/core/services/i18n/i18n.ts.hbs +60 -9
  93. package/templates/base/src/core/services/index.ts.hbs +5 -6
  94. package/templates/base/src/core/services/pipe-registry/pipe-registry.test.js.hbs +60 -1
  95. package/templates/base/src/core/services/pipe-registry/pipe-registry.ts.hbs +1 -1
  96. package/templates/base/src/core/services/pipe-registry/pipes.test.js.hbs +128 -0
  97. package/templates/base/src/{libs/pipes → core/services/pipe-registry}/pipes.ts.hbs +8 -5
  98. package/templates/base/src/core/services/router/helpers/navigation-manager.helper.test.js.hbs +149 -6
  99. package/templates/base/src/core/services/router/helpers/navigation-manager.helper.ts.hbs +42 -30
  100. package/templates/base/src/core/services/router/helpers/route-guard-manager.helper.test.js.hbs +27 -0
  101. package/templates/base/src/core/services/router/helpers/view-render-manager.helper.test.js.hbs +83 -17
  102. package/templates/base/src/core/services/router/helpers/view-render-manager.helper.ts.hbs +13 -70
  103. package/templates/base/src/core/services/router/router.test.js.hbs +226 -2
  104. package/templates/base/src/core/services/router/router.ts.hbs +40 -9
  105. package/templates/base/src/index.html.hbs +2 -6
  106. package/templates/base/src/styles/_styles.scss.hbs +102 -43
  107. package/templates/base/src/styles/base/_variables.scss.hbs +1 -85
  108. package/templates/base/src/styles/main.scss.hbs +1 -18
  109. package/templates/base/src/styles/tailwind.css.hbs +2 -0
  110. package/templates/base/tools/builder/builder.config.js.hbs +40 -0
  111. package/templates/base/tools/builder/builder.js.hbs +24 -26
  112. package/templates/base/tools/builder/core/app/binary-extensions.test.js.hbs +16 -0
  113. package/templates/base/tools/builder/core/app/compile-ts.js.hbs +16 -0
  114. package/templates/base/tools/builder/core/{copy-static.js.hbs → app/copy-static.js.hbs} +27 -34
  115. package/templates/base/tools/builder/core/app/validate-routes.js.hbs +77 -0
  116. package/templates/base/tools/builder/core/finalize-build.js.hbs +16 -7
  117. package/templates/base/tools/builder/core/{add-tags.js.hbs → html-index/add-tags.js.hbs} +2 -2
  118. package/templates/base/tools/builder/core/html-index/add-tags.test.js.hbs +56 -0
  119. package/templates/base/tools/builder/core/{validate-html.js.hbs → html-index/validate-html.js.hbs} +5 -11
  120. package/templates/base/tools/builder/core/html-templates/merge-templates.js.hbs +152 -0
  121. package/templates/base/tools/builder/core/html-templates/minify-html.js.hbs +15 -0
  122. package/templates/base/tools/builder/core/html-templates/process-html-templates.js.hbs +8 -0
  123. package/templates/{features/i18n/tools/builder/core → base/tools/builder/core/i18n}/build-i18n.js.hbs +6 -17
  124. package/templates/base/tools/builder/core/prod-bundle/compress-files.js.hbs +37 -0
  125. package/templates/base/tools/builder/core/prod-bundle/esbuild.js.hbs +30 -0
  126. package/templates/base/tools/builder/core/{hash-files.js.hbs → prod-bundle/hash-files.js.hbs} +14 -11
  127. package/templates/base/tools/builder/core/seo/generate-robots-txt.js.hbs +51 -0
  128. package/templates/base/tools/builder/core/seo/generate-seo-files.js.hbs +16 -0
  129. package/templates/base/tools/builder/core/seo/generate-seo-html.js.hbs +128 -0
  130. package/templates/base/tools/builder/core/seo/generate-sitemap-xml.js.hbs +43 -0
  131. package/templates/base/tools/builder/core/seo/html-substitutions.js.hbs +99 -0
  132. package/templates/base/tools/builder/core/seo/i18n-resolution.js.hbs +66 -0
  133. package/templates/base/tools/builder/core/seo/route-output.js.hbs +64 -0
  134. package/templates/base/tools/builder/core/seo/ssr/ssr-bundle.js.hbs +54 -0
  135. package/templates/base/tools/builder/core/seo/ssr/ssr-polyfills.js.hbs +132 -0
  136. package/templates/base/tools/builder/core/seo/ssr/ssr-render.js.hbs +95 -0
  137. package/templates/base/tools/builder/core/styles/sass.js.hbs +40 -0
  138. package/templates/base/tools/builder/core/styles/tailwind.js.hbs +84 -0
  139. package/templates/base/tools/dev/dev-serve.js.hbs +26 -18
  140. package/templates/base/tools/dev/serve.js.hbs +11 -1
  141. package/templates/base/tools/dev/watcher.js.hbs +14 -6
  142. package/templates/base/tools/generator/generator.js.hbs +64 -47
  143. package/templates/base/tools/generator/handle-file.js.hbs +17 -44
  144. package/templates/base/tools/generator/handle-file.test.js.hbs +72 -0
  145. package/templates/base/tools/generator/templates/{component.template.js.hbs → component/component.template.js.hbs} +3 -2
  146. package/templates/base/tools/generator/templates/component/component.template.test.js.hbs +23 -0
  147. package/templates/base/tools/generator/templates/html/html.template.js.hbs +2 -0
  148. package/templates/base/tools/generator/templates/html/html.template.test.js.hbs +7 -0
  149. package/templates/base/tools/generator/templates/index.js.hbs +7 -12
  150. package/templates/base/tools/generator/templates/locale/locale.template.js.hbs +4 -0
  151. package/templates/base/tools/generator/templates/locale/locale.template.test.js.hbs +7 -0
  152. package/templates/base/tools/generator/templates/scss/scss.template.js.hbs +1 -0
  153. package/templates/base/tools/generator/templates/scss/scss.template.test.js.hbs +7 -0
  154. package/templates/base/tools/generator/templates/service/service.template.js.hbs +17 -0
  155. package/templates/base/tools/generator/templates/service/service.template.test.js.hbs +22 -0
  156. package/templates/base/tools/generator/templates/test/test.template.js.hbs +10 -0
  157. package/templates/base/tools/generator/templates/test/test.template.test.js.hbs +27 -0
  158. package/templates/base/tools/generator/templates/{view.template.js.hbs → view/view.template.js.hbs} +3 -2
  159. package/templates/base/tools/generator/templates/view/view.template.test.js.hbs +24 -0
  160. package/templates/base/tools/testin-nutin/core/coverage/collect-coverage.js.hbs +39 -0
  161. package/templates/base/tools/testin-nutin/core/coverage/compute-coverage.js.hbs +115 -0
  162. package/templates/base/tools/testin-nutin/core/coverage/compute-coverage.test.js.hbs +74 -0
  163. package/templates/base/tools/testin-nutin/core/coverage/write-summary-report.js.hbs +54 -0
  164. package/templates/base/tools/testin-nutin/core/coverage/write-uncovered-report.js.hbs +44 -0
  165. package/templates/{features/testinNutin/testin-nutin/core/src → base/tools/testin-nutin/core}/globals/assertion-lib.js.hbs +62 -24
  166. package/templates/base/tools/testin-nutin/core/globals/clock.js.hbs +206 -0
  167. package/templates/{features/testinNutin/testin-nutin/core/src → base/tools/testin-nutin/core}/globals/jsdom-setup.js.hbs +19 -6
  168. package/templates/{features/testinNutin/testin-nutin/core/src → base/tools/testin-nutin/core}/globals/register-test-globals.js.hbs +13 -4
  169. package/templates/base/tools/testin-nutin/core/globals/silence-console.js.hbs +23 -0
  170. package/templates/{features/testinNutin/testin-nutin/core/src → base/tools/testin-nutin/core}/globals/spyon.js.hbs +2 -0
  171. package/templates/base/tools/testin-nutin/core/index.js.hbs +9 -0
  172. package/templates/base/tools/testin-nutin/core/printer.js.hbs +85 -0
  173. package/templates/base/tools/testin-nutin/core/queue/queue.test.js.hbs +46 -0
  174. package/templates/base/tools/testin-nutin/core/queue/test-discovery.test.js.hbs +46 -0
  175. package/templates/base/tools/testin-nutin/core/queue/test-queue.js.hbs +154 -0
  176. package/templates/{features/testinNutin → base/tools}/testin-nutin/core/tests/assertions.test.js.hbs +27 -0
  177. package/templates/base/tools/testin-nutin/core/tests/clock.test.js.hbs +118 -0
  178. package/templates/base/tools/testin-nutin/core/tests/globals-each-all.test.js.hbs +28 -0
  179. package/templates/{features/testinNutin → base/tools}/testin-nutin/mocks/create-mock-method.js.hbs +2 -1
  180. package/templates/base/tools/testin-nutin/mocks/create-mock-method.test.js.hbs +64 -0
  181. package/templates/{features/testinNutin → base/tools}/testin-nutin/mocks/mock-event-bus.js.hbs +3 -2
  182. package/templates/base/tools/testin-nutin/mocks/mock-event-bus.test.js.hbs +66 -0
  183. package/templates/base/tools/testin-nutin/mocks/mock-http-client.test.js.hbs +26 -0
  184. package/templates/base/tools/testin-nutin/mocks/mock-i18n.test.js.hbs +61 -0
  185. package/templates/base/tools/testin-nutin/mocks/mock-router.test.js.hbs +29 -0
  186. package/templates/base/tools/testin-nutin/runner.js.hbs +100 -0
  187. package/templates/base/tools/testin-nutin/watch-tests.js.hbs +37 -0
  188. package/templates/base/tools/utils/error-exit.js.hbs +8 -0
  189. package/templates/base/tools/utils/format.js.hbs +10 -10
  190. package/templates/base/tools/utils/format.test.js.hbs +45 -0
  191. package/templates/base/tools/utils/get-files-recursive.js.hbs +6 -1
  192. package/templates/base/tools/utils/get-files-recursive.test.js.hbs +49 -0
  193. package/templates/base/tools/utils/get-rel-to-core.test.js.hbs +18 -0
  194. package/templates/base/tools/utils/index.js.hbs +1 -3
  195. package/templates/base/tools/utils/languages.js.hbs +15 -0
  196. package/templates/base/tools/utils/languages.test.js.hbs +16 -0
  197. package/templates/base/tools/utils/print.js.hbs +19 -13
  198. package/templates/base/tools/utils/print.test.js.hbs +60 -0
  199. package/templates/base/tools/utils/prompt-boolean.js.hbs +7 -0
  200. package/templates/base/tools/utils/prompt-boolean.test.js.hbs +54 -0
  201. package/templates/base/tools/utils/run-command.js.hbs +4 -2
  202. package/templates/base/tools/utils/run-command.test.js.hbs +19 -0
  203. package/templates/base/tools/utils/run-script.js.hbs +14 -3
  204. package/templates/base/tools/utils/run-script.test.js.hbs +40 -0
  205. package/templates/features/{deployHelper → docker}/.dockerignore.hbs +4 -4
  206. package/templates/features/docker/tools/docker/Dockerfile.template.hbs +51 -0
  207. package/templates/features/{deployHelper/tools/deployment/nginx.conf.hbs → docker/tools/docker/nginx.conf.template} +4 -2
  208. package/templates/features/docker/tools/docker/scripts/docker-build.js.hbs +20 -0
  209. package/templates/features/docker/tools/docker/scripts/docker-ports.js.hbs +48 -0
  210. package/templates/features/docker/tools/docker/scripts/docker-ports.test.js.hbs +52 -0
  211. package/templates/features/docker/tools/docker/scripts/docker-run.js.hbs +28 -0
  212. package/templates/features/docker/tools/docker/scripts/render-docker-template.js.hbs +23 -0
  213. package/templates/features/docker/tools/docker/scripts/render-docker-template.test.js.hbs +60 -0
  214. package/templates/features/docker/tools/docker/scripts/validate-docker.js.hbs +30 -0
  215. package/lib/src/context-builder.mjs +0 -35
  216. package/lib/src/file-generator.mjs +0 -109
  217. package/lib/src/json-generator.mjs +0 -31
  218. package/lib/src/package-manager.mjs +0 -139
  219. package/lib/src/print.mjs +0 -31
  220. package/lib/src/prompts.mjs +0 -123
  221. package/lib/src/utils.mjs +0 -18
  222. package/lib/src/version.mjs +0 -1
  223. package/templates/base/builder.config.js.hbs +0 -35
  224. package/templates/base/src/app/components/common/anchor/anchor.component.ts.hbs +0 -32
  225. package/templates/base/src/app/components/common/button/button.component.ts.hbs +0 -40
  226. package/templates/base/src/app/dom.test.js.hbs +0 -13
  227. package/templates/base/src/app/services/example/example.service.ts.hbs +0 -18
  228. package/templates/base/src/app/views/home/home.view.test.js.hbs +0 -26
  229. package/templates/base/src/core/services/store/store.test.js.hbs +0 -8
  230. package/templates/base/src/core/services/store/store.ts.hbs +0 -39
  231. package/templates/base/src/core/utils/anchor-manager/anchor-manager.utils.test.js.hbs +0 -0
  232. package/templates/base/src/core/utils/anchor-manager/anchor-manager.utils.ts.hbs +0 -85
  233. package/templates/base/src/core/utils/button-manager/button-manager.utils.test.js.hbs +0 -249
  234. package/templates/base/src/core/utils/button-manager/button-manager.utils.ts.hbs +0 -108
  235. package/templates/base/src/core/utils/helpers/attributes.helper.ts.hbs +0 -50
  236. package/templates/base/src/core/utils/index.ts.hbs +0 -2
  237. package/templates/base/src/libs/index.ts.hbs +0 -4
  238. package/templates/base/src/libs/popover/popover.ts.hbs +0 -145
  239. package/templates/base/src/libs/snackbar/snackbar.ts.hbs +0 -72
  240. package/templates/base/src/styles/base/_functions.scss.hbs +0 -9
  241. package/templates/base/src/styles/core/_libs.scss.hbs +0 -132
  242. package/templates/base/tools/builder/core/esbuild.js.hbs +0 -25
  243. package/templates/base/tools/builder/core/minify-html.js.hbs +0 -60
  244. package/templates/base/tools/builder/core/sass.js.hbs +0 -22
  245. package/templates/base/tools/builder/core/tsc.js.hbs +0 -12
  246. package/templates/base/tools/generator/templates/service.template.js.hbs +0 -17
  247. package/templates/base/tools/utils/export-flags.js.hbs +0 -6
  248. package/templates/features/deployHelper/tools/builder/core/compress-files.js.hbs +0 -56
  249. package/templates/features/deployHelper/tools/deployment/Dockerfile.hbs +0 -30
  250. package/templates/features/i18n/src/app/views/home/locales/en.json.hbs +0 -9
  251. package/templates/features/i18n/src/app/views/not-found/locales/en.json +0 -8
  252. package/templates/features/i18n/src/app/views/not-found/locales/fr.json +0 -8
  253. package/templates/features/i18n/src/core/config.ts.hbs +0 -3
  254. package/templates/features/i18n/src/core/services/i18n/i18n.test.js.hbs +0 -125
  255. package/templates/features/i18n/tools/generator/templates/json.template.js.hbs +0 -8
  256. package/templates/features/i18n/tools/utils/languages.js.hbs +0 -7
  257. package/templates/features/stylinNutin/src/styles/_custom-classes.scss.hbs +0 -9
  258. package/templates/features/stylinNutin/src/styles/base/_mixins.scss.hbs +0 -372
  259. package/templates/features/stylinNutin/src/styles/components/_index.scss.hbs +0 -3
  260. package/templates/features/stylinNutin/src/styles/core/_utilities.scss.hbs +0 -240
  261. package/templates/features/stylinNutin/src/styles/views/_index.scss.hbs +0 -0
  262. package/templates/features/stylinNutin/tools/generator/templates/scss.template.js.hbs +0 -4
  263. package/templates/features/template/src/app/views/home/home.view.html.hbs +0 -56
  264. package/templates/features/template/src/app/views/not-found/not-found.view.html.hbs +0 -19
  265. package/templates/features/template/tools/builder/core/merge-templates.js.hbs +0 -49
  266. package/templates/features/template/tools/generator/templates/html.template.js.hbs +0 -2
  267. package/templates/features/testinNutin/testin-nutin/core/index.js.hbs +0 -5
  268. package/templates/features/testinNutin/testin-nutin/core/src/utils/print.js.hbs +0 -64
  269. package/templates/features/testinNutin/testin-nutin/core/src/utils/test-queue.js.hbs +0 -64
  270. package/templates/features/testinNutin/testin-nutin/core/tests/globals-each-all.test.js.hbs +0 -28
  271. package/templates/features/testinNutin/testin-nutin/mocks/mock-store.js.hbs +0 -38
  272. package/templates/features/testinNutin/testin-nutin/runner.js.hbs +0 -36
  273. package/templates/features/testinNutin/testin-nutin/watch-tests.js.hbs +0 -21
  274. package/templates/features/testinNutin/testin-nutin.config.js.hbs +0 -14
  275. /package/lib/src/{template-compiler.mjs → common/template-compiler.mjs} +0 -0
  276. /package/templates/{features/i18n → base}/src/core/base-classes/base-component/helpers/i18n.helper.ts.hbs +0 -0
  277. /package/templates/{features/i18n → base}/src/core/services/i18n/languages.ts.hbs +0 -0
  278. /package/templates/base/tools/builder/{variables → core/app}/binary-extensions.js.hbs +0 -0
  279. /package/templates/base/tools/builder/core/{paths.js.hbs → app/paths.js.hbs} +0 -0
  280. /package/templates/{features/testinNutin/testin-nutin/core/src/utils → base/tools/testin-nutin/core/queue}/queue.js.hbs +0 -0
  281. /package/templates/{features/testinNutin/testin-nutin/core/src/utils → base/tools/testin-nutin/core/queue}/test-discovery.js.hbs +0 -0
  282. /package/templates/{features/testinNutin → base/tools}/testin-nutin/mocks/mock-http-client.js.hbs +0 -0
  283. /package/templates/{features/testinNutin → base/tools}/testin-nutin/mocks/mock-i18n.js.hbs +0 -0
  284. /package/templates/{features/testinNutin → base/tools}/testin-nutin/mocks/mock-router.js.hbs +0 -0
@@ -1,372 +0,0 @@
1
- @use "sass:map";
2
- @use "variables" as *;
3
-
4
- @mixin flex-center {
5
- display: flex;
6
- justify-content: center;
7
- align-items: center;
8
- }
9
-
10
- @mixin flex-column {
11
- display: flex;
12
- flex-direction: column;
13
- }
14
-
15
- @mixin flex-row {
16
- display: flex;
17
- flex-direction: row;
18
- }
19
-
20
- @mixin flex-between {
21
- display: flex;
22
- justify-content: space-between;
23
- align-items: center;
24
- }
25
-
26
- @mixin flex-around {
27
- display: flex;
28
- justify-content: space-around;
29
- align-items: center;
30
- }
31
-
32
- @mixin flex-wrap {
33
- display: flex;
34
- flex-wrap: wrap;
35
- }
36
-
37
- @mixin grid($columns: 1, $gap: 1rem) {
38
- display: grid;
39
- grid-template-columns: repeat($columns, 1fr);
40
- gap: $gap;
41
- }
42
-
43
- @mixin responsive-grid($default: 1, $breakpoints: (), $gap: 1rem) {
44
- @include grid($default, $gap);
45
-
46
- @each $breakpoint, $columns in $breakpoints {
47
- @media (min-width: $breakpoint) {
48
- grid-template-columns: repeat($columns, 1fr);
49
- }
50
- }
51
- }
52
-
53
- @mixin grid-row($span: null, $start: null) {
54
- @if $span {
55
- grid-row-end: span $span;
56
- }
57
- @if $start {
58
- grid-row-start: $start;
59
- }
60
- }
61
-
62
- @mixin grid-column($span: null, $start: null) {
63
- @if $span {
64
- grid-column-end: span $span;
65
- }
66
- @if $start {
67
- grid-column-start: $start;
68
- }
69
- }
70
-
71
- @mixin fr-grid($columns: "1fr", $gap: 1rem) {
72
- display: grid;
73
- grid-template-columns: unquote($columns);
74
- gap: $gap;
75
- }
76
-
77
- @mixin responsive-fr-grid($default: "1fr", $breakpoints: (), $gap: 1rem) {
78
- @include fr-grid($default, $gap);
79
-
80
- @each $breakpoint, $columns in $breakpoints {
81
- @media (min-width: $breakpoint) {
82
- grid-template-columns: unquote($columns);
83
- }
84
- }
85
- }
86
-
87
- @mixin fr-grid-rows($rows: "1fr", $gap: 1rem) {
88
- grid-template-rows: unquote($rows);
89
- row-gap: $gap;
90
- }
91
-
92
- @mixin minmax-fr-grid($min: "200px", $max: "1fr", $repeat: 3, $gap: 1rem) {
93
- display: grid;
94
- grid-template-columns: repeat($repeat, minmax(unquote($min), unquote($max)));
95
- gap: $gap;
96
- }
97
-
98
- @mixin mixed-fr-grid($fixed: null, $flexible: "1fr", $gap: 1rem) {
99
- display: grid;
100
- grid-template-columns: unquote("#{$fixed} #{$flexible}");
101
- gap: $gap;
102
- }
103
-
104
- @mixin advanced-fr-grid(
105
- $columns: "1fr",
106
- $rows: null,
107
- $gap: 1rem,
108
- $dense: false
109
- ) {
110
- display: grid;
111
- grid-template-columns: unquote($columns);
112
-
113
- @if $rows {
114
- grid-template-rows: unquote($rows);
115
- }
116
-
117
- gap: $gap;
118
-
119
- @if $dense {
120
- grid-auto-flow: dense;
121
- }
122
- }
123
-
124
- @mixin grid-area($area) {
125
- grid-area: $area;
126
- }
127
-
128
- @mixin grid-template-areas($areas) {
129
- grid-template-areas: $areas;
130
- }
131
-
132
- @mixin box($w, $h) {
133
- width: $w;
134
- height: $h;
135
- }
136
-
137
- @mixin margin-y($val) {
138
- margin-top: $val;
139
- margin-bottom: $val;
140
- }
141
-
142
- @mixin margin-x($val) {
143
- margin-left: $val;
144
- margin-right: $val;
145
- }
146
-
147
- @mixin padding-y($val) {
148
- padding-top: $val;
149
- padding-bottom: $val;
150
- }
151
-
152
- @mixin padding-x($val) {
153
- padding-left: $val;
154
- padding-right: $val;
155
- }
156
-
157
- @mixin text-ellipsis {
158
- overflow: hidden;
159
- text-overflow: ellipsis;
160
- white-space: nowrap;
161
- }
162
-
163
- @mixin font($size, $weight: normal) {
164
- font-size: $size;
165
- font-weight: $weight;
166
- }
167
-
168
- @mixin line-clamp($lines) {
169
- display: -webkit-box;
170
- -webkit-line-clamp: $lines;
171
- -webkit-box-orient: vertical;
172
- overflow: hidden;
173
- }
174
-
175
- @mixin absolute-center {
176
- position: absolute;
177
- top: 50%;
178
- left: 50%;
179
- transform: translate(-50%, -50%);
180
- }
181
-
182
- @mixin fixed-full {
183
- position: fixed;
184
- top: 0;
185
- right: 0;
186
- bottom: 0;
187
- left: 0;
188
- }
189
-
190
- @mixin pos($pos, $t: auto, $r: auto, $b: auto, $l: auto) {
191
- position: $pos;
192
- top: $t;
193
- right: $r;
194
- bottom: $b;
195
- left: $l;
196
- }
197
-
198
- @mixin bg-cover {
199
- background-size: cover;
200
- background-position: center;
201
- background-repeat: no-repeat;
202
- }
203
-
204
- @mixin bg-gradient($dir, $from, $to) {
205
- background: linear-gradient(to $dir, $from, $to);
206
- }
207
-
208
- @mixin box-shadow($shadow...) {
209
- box-shadow: $shadow;
210
- }
211
-
212
- @mixin transition($props...) {
213
- transition: $props;
214
- }
215
-
216
- @mixin hover-scale($scale: 1.05) {
217
- transition: transform 0.2s;
218
- &:hover {
219
- transform: scale($scale);
220
- }
221
- }
222
-
223
- @mixin border($color, $width: 1px, $style: solid) {
224
- border: $width $style $color;
225
- }
226
-
227
- @mixin rounded($radius: 4px) {
228
- border-radius: $radius;
229
- }
230
-
231
- @mixin hide {
232
- display: none !important;
233
- }
234
-
235
- @mixin sr-only {
236
- position: absolute;
237
- width: 1px;
238
- height: 1px;
239
- overflow: hidden;
240
- clip: rect(1px, 1px, 1px, 1px);
241
- white-space: nowrap;
242
- }
243
-
244
- @mixin clearfix {
245
- &::after {
246
- content: '';
247
- display: table;
248
- clear: both;
249
- }
250
- }
251
-
252
- @mixin cursor-pointer {
253
- cursor: pointer;
254
- }
255
-
256
- @mixin image-cover {
257
- -webkit-background-size: 100vw 100vh;
258
- -moz-background-size: 100vw 100vh;
259
- -o-background-size: 100vw 100vh;
260
- background-size: 100vw 100vh;
261
- background-attachment: fixed;
262
- };
263
-
264
- @mixin button-disabled {
265
- button:disabled {
266
- pointer-events: none !important;
267
- cursor: not-allowed !important;
268
- opacity: 0.6 !important;
269
- a {
270
- cursor: not-allowed !important;
271
- }
272
- }
273
- }
274
-
275
- @mixin respond-to($breakpoint) {
276
- $value: map.get($breakpoints, $breakpoint);
277
-
278
- @if $value {
279
- @media (max-width: $value) {
280
- @content;
281
- }
282
- }
283
- }
284
-
285
- @mixin fade-in($duration: 0.5s, $delay: 0s) {
286
- @keyframes fade-in {
287
- from { opacity: 0; }
288
- to { opacity: 1; }
289
- }
290
- & {
291
- animation: fade-in $duration ease-in $delay forwards;
292
- }
293
- }
294
-
295
- @mixin slide-in-left($distance: 100%, $duration: 0.6s, $delay: 0s) {
296
- @keyframes slide-in-left {
297
- from {
298
- transform: translateX(-#{$distance});
299
- opacity: 0;
300
- }
301
- to {
302
- transform: translateX(0);
303
- opacity: 1;
304
- }
305
- }
306
- & {
307
- animation: slide-in-left $duration ease-out $delay forwards;
308
- }
309
- }
310
-
311
- @mixin scale-up($from: 0.8, $to: 1, $duration: 0.4s, $delay: 0s) {
312
- @keyframes scale-up {
313
- from {
314
- transform: scale(#{$from});
315
- opacity: 0;
316
- }
317
- to {
318
- transform: scale(#{$to});
319
- opacity: 1;
320
- }
321
- }
322
- & {
323
- animation: scale-up $duration ease $delay forwards;
324
- }
325
- }
326
-
327
- @mixin bounce-in($duration: 0.8s, $delay: 0s) {
328
- @keyframes bounce-in {
329
- 0% { transform: scale(0.9); opacity: 0; }
330
- 60% { transform: scale(1.05); opacity: 1; }
331
- 80% { transform: scale(0.95); }
332
- 100% { transform: scale(1); }
333
- }
334
-
335
- & {
336
- animation: bounce-in $duration ease-out $delay forwards;
337
- }
338
- }
339
-
340
- @mixin spin($duration: 1s, $delay: 0s, $direction: normal) {
341
- @keyframes spin {
342
- to { transform: rotate(360deg); }
343
- }
344
-
345
- & {
346
- animation: spin $duration linear $delay infinite;
347
- animation-direction: $direction;
348
- }
349
- }
350
-
351
- @mixin pulse($duration: 1.5s, $delay: 0s) {
352
- @keyframes pulse {
353
- 0%, 100% { opacity: 1; }
354
- 50% { opacity: 0.5; }
355
- }
356
-
357
- & {
358
- animation: pulse $duration ease-in-out $delay infinite;
359
- }
360
- }
361
-
362
- @mixin shake($duration: 0.5s, $delay: 0s) {
363
- @keyframes shake {
364
- 0%, 100% { transform: translateX(0); }
365
- 20%, 60% { transform: translateX(-10px); }
366
- 40%, 80% { transform: translateX(10px); }
367
- }
368
-
369
- & {
370
- animation: shake $duration ease-in-out $delay;
371
- }
372
- }
@@ -1,3 +0,0 @@
1
- // global components style export
2
-
3
- // @forward "my-component";
@@ -1,240 +0,0 @@
1
- @use "sass:map";
2
- @use "variables" as *;
3
- @use "mixins";
4
-
5
- // Utility classes prefix : 'u-'
6
-
7
- // font size
8
- @each $name, $size in $font-sizes {
9
- .u-font-#{$name} {
10
- font-size: $size;
11
- }
12
- }
13
-
14
- // padding
15
- @each $name, $space in $spacings {
16
- .u-padd-x-#{$name} {
17
- padding-left: $space;
18
- padding-right: $space;
19
- }
20
- }
21
- @each $name, $space in $spacings {
22
- .u-padd-y-#{$name} {
23
- padding-top: $space;
24
- padding-bottom: $space;
25
- }
26
- }
27
-
28
- //margin
29
- @each $name, $space in $spacings {
30
- .u-marg-x-#{$name} {
31
- margin-left: $space;
32
- margin-right: $space;
33
- }
34
- }
35
- @each $name, $space in $spacings {
36
- .u-marg-y-#{$name} {
37
- margin-top: $space;
38
- margin-bottom: $space;
39
- }
40
- }
41
-
42
- //border-radius
43
- @each $name, $radius in $border-radius {
44
- .u-rounded-#{$name} {
45
- border-radius: $radius;
46
- }
47
- }
48
-
49
- // box-shadow
50
- @each $name, $shadow in $shadows {
51
- .u-shadow-#{$name} {
52
- box-shadow: $shadow;
53
- }
54
- }
55
-
56
- // transition
57
- @each $name, $transition in $transitions {
58
- .u-transition-#{$name} {
59
- transition: $transition;
60
- }
61
- }
62
-
63
- // color
64
- .u-color-base {
65
- color: $text-color;
66
- }
67
-
68
- .u-color-prim {
69
- color: $primary-color;
70
- }
71
-
72
- .u-color-sec {
73
- color: $secondary-color;
74
- }
75
-
76
- .u-color-bg {
77
- color: $background-color;
78
- }
79
-
80
- // font weight / style
81
- .u-italic {
82
- font-style: italic;
83
- }
84
-
85
- .u-bold {
86
- font-weight: bold;
87
- }
88
-
89
- .u-font-secondary {
90
- font-family: $secondary-font;
91
- }
92
-
93
- .u-font-primary {
94
- font-family: $primary-font;
95
- }
96
-
97
- // text
98
- .u-text-center {
99
- text-align: center;
100
- }
101
-
102
- .u-text-right {
103
- text-align: right;
104
- }
105
-
106
- .u-text-left {
107
- text-align: left;
108
- }
109
-
110
- // flex
111
- .u-flex-center {
112
- @include mixins.flex-center;
113
- }
114
-
115
- .u-flex-column {
116
- @include mixins.flex-column;
117
- }
118
-
119
- .u-flex-row {
120
- @include mixins.flex-row;
121
- }
122
-
123
- .u-flex-between {
124
- @include mixins.flex-between;
125
- }
126
-
127
- .u-flex-around {
128
- @include mixins.flex-around;
129
- }
130
-
131
- .u-flex-wrap {
132
- @include mixins.flex-wrap;
133
- }
134
-
135
- //
136
- .u-ellipsis {
137
- @include mixins.text-ellipsis;
138
- }
139
-
140
- .u-clamp-2 {
141
- @include mixins.line-clamp(2);
142
- }
143
-
144
- // positioning
145
- .u-absolute-center {
146
- @include mixins.absolute-center;
147
- }
148
-
149
- .u-fixed-full {
150
- @include mixins.fixed-full;
151
- }
152
-
153
- // backgrounds
154
- .u-bg-base {
155
- background-color: $background-color;
156
- }
157
-
158
- .u-bg-inherit {
159
- background-color: inherit;
160
- }
161
-
162
- .u-bg-primary {
163
- background-color: $primary-color;
164
- }
165
-
166
- .u-bg-secondary {
167
- background-color: $secondary-color;
168
- }
169
-
170
- .u-bg-gradient-right {
171
- @include mixins.bg-gradient(right, rgba($primary-color, .7), rgba($secondary-color, .7));
172
- }
173
-
174
- .u-bg-gradient-left {
175
- @include mixins.bg-gradient(left, rgba($primary-color, .7), rgba($secondary-color, .7));
176
- }
177
-
178
- .u-bg-gradient-top {
179
- @include mixins.bg-gradient(top, rgba($primary-color, .7), rgba($secondary-color, .7));
180
- }
181
-
182
- .u-bg-gradient-bottom {
183
- @include mixins.bg-gradient(bottom, rgba($primary-color, .7), rgba($secondary-color, .7));
184
- }
185
-
186
- .u-bg-cover {
187
- @include mixins.bg-cover;
188
- }
189
-
190
- .u-img-cover {
191
- @include mixins.image-cover;
192
- }
193
-
194
- // animations
195
- .u-transition {
196
- @include mixins.transition(all 0.3s ease);
197
- }
198
-
199
- .u-hover-scale {
200
- @include mixins.hover-scale;
201
- }
202
-
203
- // borders / radius
204
- .u-border {
205
- @include mixins.border($primary-color);
206
- }
207
-
208
- .u-border-none {
209
- border: 0px solid white;
210
- }
211
-
212
- .u-rounded {
213
- @include mixins.rounded;
214
- }
215
-
216
- // utility
217
- .u-btn-disabled {
218
- @include mixins.button-disabled;
219
- }
220
-
221
- .u-hide {
222
- @include mixins.hide;
223
- }
224
-
225
- .u-sr-only {
226
- @include mixins.sr-only;
227
- }
228
-
229
- .u-clearfix {
230
- @include mixins.clearfix;
231
- }
232
-
233
- .u-pointer {
234
- @include mixins.cursor-pointer;
235
- }
236
-
237
- .u-pre-wrap {
238
- white-space:pre-wrap;
239
- overflow-wrap:break-word;
240
- }
@@ -1,4 +0,0 @@
1
- export const scssTemplate = () => `@use "sass:map";
2
- @use "variables" as *;
3
- @use "mixins";
4
- `;
@@ -1,56 +0,0 @@
1
- <div
2
- {{#if stylinNutin}}
3
- class="u-flex-center u-flex-column u-padd-y-large"
4
- {{else}}
5
- style="display:flex;justify-content:center;align-items:center;flex-direction:column;padding-top:1rem;padding-bottom:1rem;"
6
- {{/if}}>
7
- <h1
8
- {{#if i18n}}
9
- data-i18n="home.title"
10
- {{/if}}
11
- {{#if stylinNutin}}
12
- class="u-color-prim u-font-largest u-bold u-font-secondary"
13
- style="color:#6C8359;"
14
- {{else}}
15
- style="color:#6C8359;font-size:2rem;font-weight:bold;"
16
- {{/if}}
17
- >{{#unless i18n}}{{projectName}}{{/unless}}</h1>
18
- <span
19
- {{#if stylinNutin}}
20
- class="u-italic u-font-smallest u-font-secondary"
21
- {{else}}
22
- style="font-style:italic;font-size:0.75rem;"
23
- {{/if}}
24
- >nutin v{{version}}</span>
25
- <img src="/assets/images/logo-trans.avif" width=250 height=250 alt="nutin's logo. A frame opened on the top left through which a plant grows.">
26
- <div
27
- {{#if i18n}}
28
- data-i18n="home.ready"
29
- {{/if}}
30
- {{#if stylinNutin}}
31
- class="u-font-large u-padd-y-medium"
32
- style="margin-top:-2rem;"
33
- {{else}}
34
- style="font-size:1.5rem;paddin-top:1rem;padding-bottom:1rem;margin-top:2rem;"
35
- {{/if}}
36
- >{{#unless i18n}}You're all set !{{/unless}}</div>
37
- <div
38
- {{#if i18n}}
39
- data-i18n="home.enjoy"
40
- {{/if}}
41
- {{#if stylinNutin}}
42
- class="u-font-large u-color-sec"
43
- style="color:#C56648;"
44
- {{else}}
45
- style="color:#C56648;font-size:1.5rem;"
46
- {{/if}}
47
- >{{#unless i18n}}Happy Coding 🎉{{/unless}}</div>
48
- <div
49
- {{#if stylinNutin}}
50
- class="u-italic u-font-secondary u-font-small"
51
- {{#unless transition}}style="position:fixed;bottom:0;"{{/unless}}
52
- {{else}}
53
- style="font-size:.875rem;font-style:italic;{{#unless transition}}position:fixed;bottom:0;{{/unless}}"
54
- {{/if}}
55
- >so lightweight it's <span {{#if stylinNutin}}class="u-bold"{{else}}style="font-weight:bold;"{{/if}}>nutin</span>.</div>
56
- </div>
@@ -1,19 +0,0 @@
1
- <div
2
- {{#if stylinNutin}}
3
- class="u-flex-center u-flex-column u-padd-y-large"
4
- {{else}}
5
- style="display:flex;justify-content:center;align-items:center;flex-direction:column"
6
- {{/if}}>
7
- <h1
8
- {{#if i18n}}
9
- data-i18n="not-found.content"
10
- {{/if}}
11
- {{#if stylinNutin}}
12
- class="u-color-sec u-font-largest u-bold u-font-secondary"
13
- {{else}}
14
- style="font-size:2rem;font-weight:bold;"
15
- {{/if}}
16
- >{{#unless i18n}}Page Not Found{{/unless}}</h1>
17
- <img src="/assets/images/logo-small-trans.avif" width=250 height=250 alt="nutin's small logo with a growing plant.">
18
- <div data-component="home"></div>
19
- </div>