@nathapp/na-cli 1.0.1-rc.1 → 1.0.1

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 (387) hide show
  1. package/README.md +7 -5
  2. package/dist/templates/k8s-cert-manager/README.md +60 -0
  3. package/dist/templates/k8s-cert-manager/cloudflare-cert-manager-issuer.yaml +26 -0
  4. package/dist/templates/k8s-deployment/templates/_deployment.tpl +1 -1
  5. package/dist/templates/k8s-deployment/templates/_endpointslice.tpl +42 -0
  6. package/dist/templates/k8s-deployment/templates/_gateway.tpl +94 -0
  7. package/dist/templates/k8s-deployment/templates/_grpcroute.tpl +186 -0
  8. package/dist/templates/k8s-deployment/templates/_httproute.tpl +209 -0
  9. package/dist/templates/k8s-deployment/templates/_ingressroute.tpl +178 -0
  10. package/dist/templates/k8s-deployment/templates/_middleware.tpl +553 -0
  11. package/dist/templates/k8s-deployment/templates/_serverstransport.tpl +73 -0
  12. package/dist/templates/k8s-deployment/templates/_service.tpl +4 -1
  13. package/dist/templates/k8s-helm-chart/templates/endpointslice.yaml +1 -0
  14. package/dist/templates/k8s-helm-chart/templates/gateway.yaml +1 -0
  15. package/dist/templates/k8s-helm-chart/templates/grpcroute.yaml +1 -0
  16. package/dist/templates/k8s-helm-chart/templates/httproute.yaml +1 -0
  17. package/dist/templates/k8s-helm-chart/templates/ingressroute.yaml +1 -0
  18. package/dist/templates/k8s-helm-chart/templates/middleware.yaml +1 -0
  19. package/dist/templates/k8s-helm-chart/templates/serverstransport.yaml +1 -0
  20. package/dist/templates/k8s-helm-chart/values.yaml +3 -5
  21. package/dist/templates/nestjs-api/{.env → .env.local} +5 -0
  22. package/dist/templates/nestjs-api/.gitignore-rename +2 -1
  23. package/dist/templates/nestjs-api/Dockerfile +33 -13
  24. package/dist/templates/nestjs-api/package.json +31 -17
  25. package/dist/templates/nestjs-api/src/i18n/en_US/date.json +7 -0
  26. package/dist/templates/nestjs-api/src/i18n/en_US/exception.json +1 -1
  27. package/dist/templates/nestjs-api/src/i18n/en_US/validation.json +16 -0
  28. package/dist/templates/nestjs-api/src/i18n/zh_CN/date.json +7 -0
  29. package/dist/templates/nestjs-api/src/i18n/zh_CN/validation.json +16 -0
  30. package/dist/templates/nestjs-api/src/i18n/zh_TW/date.json +7 -0
  31. package/dist/templates/nestjs-api/src/i18n/zh_TW/validation.json +16 -0
  32. package/dist/templates/nestjs-api/test/jest-e2e.json +4 -1
  33. package/dist/templates/nestjs-library/.npmignore-rename +4 -0
  34. package/dist/templates/nestjs-library/package.json +3 -3
  35. package/dist/templates/ts-library/.npmignore-rename +4 -0
  36. package/dist/templates/ts-library/package.json +1 -1
  37. package/dist/templates/turbo-nestjs-vuexy/README.md +3 -0
  38. package/dist/templates/turbo-nestjs-vuexy/package.json +49 -0
  39. package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/README.md +3 -0
  40. package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/library.js +43 -0
  41. package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/package.json +18 -0
  42. package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/vue.js +236 -0
  43. package/dist/templates/{ts-library/tsconfig.json → turbo-nestjs-vuexy/packages/typescript-config/base.json} +4 -6
  44. package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/nestjs.json +12 -0
  45. package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/package.json +9 -0
  46. package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/vue.json +82 -0
  47. package/dist/templates/turbo-nestjs-vuexy/turbo.json +24 -0
  48. package/dist/templates/vuexy-portal/.editorconfig +1 -0
  49. package/dist/templates/vuexy-portal/.eslintrc.cjs +237 -0
  50. package/dist/templates/vuexy-portal/.gitignore-rename +42 -0
  51. package/dist/templates/vuexy-portal/.stylelintrc.json +46 -0
  52. package/dist/templates/vuexy-portal/Dockerfile +43 -0
  53. package/dist/templates/vuexy-portal/README.md +35 -0
  54. package/dist/templates/vuexy-portal/auto-imports.d.ts +1131 -0
  55. package/dist/templates/vuexy-portal/components.d.ts +68 -0
  56. package/dist/templates/vuexy-portal/dev.Dockerfile +25 -0
  57. package/dist/templates/vuexy-portal/docker-compose.dev.yml +14 -0
  58. package/dist/templates/vuexy-portal/docker-compose.prod.yml +13 -0
  59. package/dist/templates/vuexy-portal/entrypoint.sh +6 -0
  60. package/dist/templates/vuexy-portal/env.d.ts +12 -0
  61. package/dist/templates/vuexy-portal/index.html +57 -0
  62. package/dist/templates/vuexy-portal/nginx.conf +14 -0
  63. package/dist/templates/vuexy-portal/package.json +140 -0
  64. package/dist/templates/vuexy-portal/pnpm-lock.yaml +7963 -0
  65. package/dist/templates/vuexy-portal/prod.Dockerfile +41 -0
  66. package/dist/templates/vuexy-portal/public/favicon.ico +0 -0
  67. package/dist/templates/vuexy-portal/public/images/avatars/avatar-1.png +0 -0
  68. package/dist/templates/vuexy-portal/public/images/avatars/avatar-2.png +0 -0
  69. package/dist/templates/vuexy-portal/public/images/svg/discord.svg +10 -0
  70. package/dist/templates/vuexy-portal/public/images/svg/gift.svg +8 -0
  71. package/dist/templates/vuexy-portal/public/images/svg/keyboard.svg +8 -0
  72. package/dist/templates/vuexy-portal/public/images/svg/laptop.svg +8 -0
  73. package/dist/templates/vuexy-portal/public/images/svg/lightbulb.svg +8 -0
  74. package/dist/templates/vuexy-portal/public/images/svg/rocket.svg +8 -0
  75. package/dist/templates/vuexy-portal/public/loader.css +79 -0
  76. package/dist/templates/vuexy-portal/public/mockServiceWorker.js +287 -0
  77. package/dist/templates/vuexy-portal/shims.d.ts +15 -0
  78. package/dist/templates/vuexy-portal/src/@core/components/AppBarSearch.vue +278 -0
  79. package/dist/templates/vuexy-portal/src/@core/components/AppDrawerHeaderSection.vue +30 -0
  80. package/dist/templates/vuexy-portal/src/@core/components/AppStepper.vue +371 -0
  81. package/dist/templates/vuexy-portal/src/@core/components/BuyNow.vue +92 -0
  82. package/dist/templates/vuexy-portal/src/@core/components/CardStatisticsVerticalSimple.vue +35 -0
  83. package/dist/templates/vuexy-portal/src/@core/components/CustomizerSection.vue +27 -0
  84. package/dist/templates/vuexy-portal/src/@core/components/DialogCloseBtn.vue +25 -0
  85. package/dist/templates/vuexy-portal/src/@core/components/DropZone.vue +135 -0
  86. package/dist/templates/vuexy-portal/src/@core/components/I18n.vue +48 -0
  87. package/dist/templates/vuexy-portal/src/@core/components/MoreBtn.vue +24 -0
  88. package/dist/templates/vuexy-portal/src/@core/components/Notifications.vue +245 -0
  89. package/dist/templates/vuexy-portal/src/@core/components/ProductDescriptionEditor.vue +198 -0
  90. package/dist/templates/vuexy-portal/src/@core/components/ScrollToTop.vue +41 -0
  91. package/dist/templates/vuexy-portal/src/@core/components/Shortcuts.vue +99 -0
  92. package/dist/templates/vuexy-portal/src/@core/components/TablePagination.vue +39 -0
  93. package/dist/templates/vuexy-portal/src/@core/components/TheCustomizer.vue +618 -0
  94. package/dist/templates/vuexy-portal/src/@core/components/ThemeSwitcher.vue +61 -0
  95. package/dist/templates/vuexy-portal/src/@core/components/TiptapEditor.vue +166 -0
  96. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppAutocomplete.vue +57 -0
  97. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppCombobox.vue +57 -0
  98. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppDateTimePicker.vue +543 -0
  99. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppSelect.vue +50 -0
  100. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppTextField.vue +78 -0
  101. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppTextarea.vue +50 -0
  102. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxes.vue +81 -0
  103. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxesWithIcon.vue +95 -0
  104. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxesWithImage.vue +93 -0
  105. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadios.vue +81 -0
  106. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadiosWithIcon.vue +88 -0
  107. package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadiosWithImage.vue +99 -0
  108. package/dist/templates/vuexy-portal/src/@core/components/cards/AppCardActions.vue +167 -0
  109. package/dist/templates/vuexy-portal/src/@core/components/cards/AppCardCode.vue +152 -0
  110. package/dist/templates/vuexy-portal/src/@core/components/cards/CardStatisticsHorizontal.vue +41 -0
  111. package/dist/templates/vuexy-portal/src/@core/components/cards/CardStatisticsVertical.vue +48 -0
  112. package/dist/templates/vuexy-portal/src/@core/scss/base/_components.scss +185 -0
  113. package/dist/templates/vuexy-portal/src/@core/scss/base/_dark.scss +16 -0
  114. package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout-w-horizontal-nav.scss +45 -0
  115. package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout-w-vertical-nav.scss +103 -0
  116. package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout.scss +16 -0
  117. package/dist/templates/vuexy-portal/src/@core/scss/base/_horizontal-nav.scss +194 -0
  118. package/dist/templates/vuexy-portal/src/@core/scss/base/_index.scss +48 -0
  119. package/dist/templates/vuexy-portal/src/@core/scss/base/_layouts.scss +63 -0
  120. package/dist/templates/vuexy-portal/src/@core/scss/base/_misc.scss +20 -0
  121. package/dist/templates/vuexy-portal/src/@core/scss/base/_mixins.scss +63 -0
  122. package/dist/templates/vuexy-portal/src/@core/scss/base/_route-transitions.scss +70 -0
  123. package/dist/templates/vuexy-portal/src/@core/scss/base/_utilities.scss +181 -0
  124. package/dist/templates/vuexy-portal/src/@core/scss/base/_utils.scss +90 -0
  125. package/dist/templates/vuexy-portal/src/@core/scss/base/_variables.scss +198 -0
  126. package/dist/templates/vuexy-portal/src/@core/scss/base/_vertical-nav.scss +255 -0
  127. package/dist/templates/vuexy-portal/src/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
  128. package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_index.scss +1 -0
  129. package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_overrides.scss +264 -0
  130. package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_variables.scss +62 -0
  131. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout-horizontal-nav.scss +27 -0
  132. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +45 -0
  133. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout.scss +3 -0
  134. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_horizontal-nav.scss +98 -0
  135. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_index.scss +7 -0
  136. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_misc.scss +7 -0
  137. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_nav.scss +33 -0
  138. package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_vertical-nav.scss +80 -0
  139. package/dist/templates/vuexy-portal/src/@core/scss/base/skins/_bordered.scss +72 -0
  140. package/dist/templates/vuexy-portal/src/@core/scss/base/skins/_index.scss +1 -0
  141. package/dist/templates/vuexy-portal/src/@core/scss/template/_default-layout-w-horizontal-nav.scss +9 -0
  142. package/dist/templates/vuexy-portal/src/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
  143. package/dist/templates/vuexy-portal/src/@core/scss/template/_horizontal-nav.scss +40 -0
  144. package/dist/templates/vuexy-portal/src/@core/scss/template/_mixins.scss +6 -0
  145. package/dist/templates/vuexy-portal/src/@core/scss/template/_utilities.scss +49 -0
  146. package/dist/templates/vuexy-portal/src/@core/scss/template/_variables.scss +102 -0
  147. package/dist/templates/vuexy-portal/src/@core/scss/template/_vertical-nav.scss +47 -0
  148. package/dist/templates/vuexy-portal/src/@core/scss/template/index.scss +17 -0
  149. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/apex-chart.scss +108 -0
  150. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/full-calendar.scss +351 -0
  151. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/shepherd.scss +94 -0
  152. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/swiper.scss +5 -0
  153. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/_variables.scss +351 -0
  154. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_alert.scss +114 -0
  155. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_avatar.scss +27 -0
  156. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_badge.scss +25 -0
  157. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_button.scss +280 -0
  158. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_cards.scss +3 -0
  159. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_checkbox.scss +57 -0
  160. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_chip.scss +102 -0
  161. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_dialog.scss +27 -0
  162. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_expansion-panels.scss +106 -0
  163. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_field.scss +308 -0
  164. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_list.scss +30 -0
  165. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_menu.scss +35 -0
  166. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_otp-input.scss +17 -0
  167. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_pagination.scss +140 -0
  168. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_progress.scss +13 -0
  169. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_radio.scss +46 -0
  170. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_rating.scss +20 -0
  171. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_slider.scss +27 -0
  172. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_snackbar.scss +10 -0
  173. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_switch.scss +58 -0
  174. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_table.scss +48 -0
  175. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_tabs.scss +91 -0
  176. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_textarea.scss +9 -0
  177. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_timeline.scss +99 -0
  178. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_tooltip.scss +6 -0
  179. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/index.scss +25 -0
  180. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/index.scss +3 -0
  181. package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/overrides.scss +18 -0
  182. package/dist/templates/vuexy-portal/src/@core/scss/template/pages/misc.scss +20 -0
  183. package/dist/templates/vuexy-portal/src/@core/scss/template/pages/page-auth.scss +63 -0
  184. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_default-layout-horizontal-nav.scss +7 -0
  185. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +8 -0
  186. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_horizontal-nav.scss +47 -0
  187. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_index.scss +6 -0
  188. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_misc.scss +3 -0
  189. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_nav.scss +27 -0
  190. package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_vertical-nav.scss +35 -0
  191. package/dist/templates/vuexy-portal/src/@core/scss/template/skins/_bordered.scss +82 -0
  192. package/dist/templates/vuexy-portal/src/@core/scss/template/skins/_index.scss +1 -0
  193. package/dist/templates/vuexy-portal/src/@custom/assets/images/user-profile-header.png +0 -0
  194. package/dist/templates/vuexy-portal/src/@custom/components/ConfirmationDialog.vue +155 -0
  195. package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNav.vue +35 -0
  196. package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavGroup.vue +110 -0
  197. package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavLayout.vue +150 -0
  198. package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavLink.vue +56 -0
  199. package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavPopper.vue +175 -0
  200. package/dist/templates/vuexy-portal/src/@layouts/components/TransitionExpand.vue +92 -0
  201. package/dist/templates/vuexy-portal/src/@layouts/components/VNodeRenderer.tsx +17 -0
  202. package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNav.vue +236 -0
  203. package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavGroup.vue +267 -0
  204. package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavLayout.vue +232 -0
  205. package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavLink.vue +68 -0
  206. package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavSectionTitle.vue +37 -0
  207. package/dist/templates/vuexy-portal/src/@layouts/styles/_classes.scss +3 -0
  208. package/dist/templates/vuexy-portal/src/@layouts/styles/_default-layout.scss +35 -0
  209. package/dist/templates/vuexy-portal/src/@layouts/styles/_global.scss +10 -0
  210. package/dist/templates/vuexy-portal/src/@layouts/styles/_mixins.scss +30 -0
  211. package/dist/templates/vuexy-portal/src/@layouts/styles/_placeholders.scss +53 -0
  212. package/dist/templates/vuexy-portal/src/@layouts/styles/_rtl.scss +7 -0
  213. package/dist/templates/vuexy-portal/src/@layouts/styles/_variables.scss +29 -0
  214. package/dist/templates/vuexy-portal/src/@layouts/styles/index.scss +3 -0
  215. package/dist/templates/vuexy-portal/src/App.vue +26 -0
  216. package/dist/templates/vuexy-portal/src/assets/images/avatars/avatar-1.png +0 -0
  217. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/border-light.svg +16 -0
  218. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/collapsed-light.svg +17 -0
  219. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/compact-light.svg +11 -0
  220. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/default-light.svg +17 -0
  221. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/horizontal-light.svg +12 -0
  222. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/ltr-light.svg +15 -0
  223. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/rtl-light.svg +15 -0
  224. package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/wide-light.svg +11 -0
  225. package/dist/templates/vuexy-portal/src/assets/images/logo.svg +6 -0
  226. package/dist/templates/vuexy-portal/src/assets/images/misc/3d-safe-box-with-golden-dollar-coins.png +0 -0
  227. package/dist/templates/vuexy-portal/src/assets/images/misc/3d-space-rocket-with-smoke.png +0 -0
  228. package/dist/templates/vuexy-portal/src/assets/images/misc/dollar-coins-flying-pink-piggy-bank.png +0 -0
  229. package/dist/templates/vuexy-portal/src/assets/images/misc/fleet-car.png +0 -0
  230. package/dist/templates/vuexy-portal/src/assets/images/pages/misc-mask-dark.png +0 -0
  231. package/dist/templates/vuexy-portal/src/assets/images/pages/misc-mask-light.png +0 -0
  232. package/dist/templates/vuexy-portal/src/assets/images/svg/Card.svg +8 -0
  233. package/dist/templates/vuexy-portal/src/assets/images/svg/Check.svg +4 -0
  234. package/dist/templates/vuexy-portal/src/assets/images/svg/Diamond.svg +12 -0
  235. package/dist/templates/vuexy-portal/src/assets/images/svg/Suitcase.svg +4 -0
  236. package/dist/templates/vuexy-portal/src/assets/images/svg/Wallet.svg +10 -0
  237. package/dist/templates/vuexy-portal/src/assets/images/svg/address.svg +25 -0
  238. package/dist/templates/vuexy-portal/src/assets/images/svg/auth-v1-bottom-shape.svg +4 -0
  239. package/dist/templates/vuexy-portal/src/assets/images/svg/auth-v1-top-shape.svg +4 -0
  240. package/dist/templates/vuexy-portal/src/assets/images/svg/cart.svg +5 -0
  241. package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-checked.svg +4 -0
  242. package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-indeterminate.svg +4 -0
  243. package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-unchecked.svg +10 -0
  244. package/dist/templates/vuexy-portal/src/assets/images/svg/discord.svg +10 -0
  245. package/dist/templates/vuexy-portal/src/assets/images/svg/gift.svg +8 -0
  246. package/dist/templates/vuexy-portal/src/assets/images/svg/home.svg +5 -0
  247. package/dist/templates/vuexy-portal/src/assets/images/svg/keyboard.svg +4 -0
  248. package/dist/templates/vuexy-portal/src/assets/images/svg/laptop.svg +4 -0
  249. package/dist/templates/vuexy-portal/src/assets/images/svg/lightbulb.svg +8 -0
  250. package/dist/templates/vuexy-portal/src/assets/images/svg/office.svg +4 -0
  251. package/dist/templates/vuexy-portal/src/assets/images/svg/paper-send.svg +4 -0
  252. package/dist/templates/vuexy-portal/src/assets/images/svg/payment.svg +21 -0
  253. package/dist/templates/vuexy-portal/src/assets/images/svg/radio-checked.svg +3 -0
  254. package/dist/templates/vuexy-portal/src/assets/images/svg/radio-unchecked.svg +3 -0
  255. package/dist/templates/vuexy-portal/src/assets/images/svg/rocket.svg +4 -0
  256. package/dist/templates/vuexy-portal/src/assets/images/svg/trending.svg +14 -0
  257. package/dist/templates/vuexy-portal/src/assets/images/svg/user-info.svg +4 -0
  258. package/dist/templates/vuexy-portal/src/assets/images/svg/user.svg +6 -0
  259. package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-account.svg +6 -0
  260. package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-address.svg +18 -0
  261. package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-personal.svg +6 -0
  262. package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-social-link.svg +6 -0
  263. package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-submit.svg +6 -0
  264. package/dist/templates/vuexy-portal/src/assets/styles/styles.scss +1 -0
  265. package/dist/templates/vuexy-portal/src/assets/styles/variables/_template.scss +6 -0
  266. package/dist/templates/vuexy-portal/src/assets/styles/variables/_vuetify.scss +7 -0
  267. package/dist/templates/vuexy-portal/src/components/AppLoadingIndicator.vue +63 -0
  268. package/dist/templates/vuexy-portal/src/components/AppPricing.vue +247 -0
  269. package/dist/templates/vuexy-portal/src/components/AppSearchHeader.vue +77 -0
  270. package/dist/templates/vuexy-portal/src/components/ErrorHeader.vue +40 -0
  271. package/dist/templates/vuexy-portal/src/components/dialogs/AddAuthenticatorAppDialog.vue +101 -0
  272. package/dist/templates/vuexy-portal/src/components/dialogs/AddEditAddressDialog.vue +238 -0
  273. package/dist/templates/vuexy-portal/src/components/dialogs/AddEditPermissionDialog.vue +93 -0
  274. package/dist/templates/vuexy-portal/src/components/dialogs/AddEditRoleDialog.vue +302 -0
  275. package/dist/templates/vuexy-portal/src/components/dialogs/AddPaymentMethodDialog.vue +120 -0
  276. package/dist/templates/vuexy-portal/src/components/dialogs/CardAddEditDialog.vue +153 -0
  277. package/dist/templates/vuexy-portal/src/components/dialogs/ConfirmDialog.vue +151 -0
  278. package/dist/templates/vuexy-portal/src/components/dialogs/CreateAppDialog.vue +459 -0
  279. package/dist/templates/vuexy-portal/src/components/dialogs/EnableOneTimePasswordDialog.vue +85 -0
  280. package/dist/templates/vuexy-portal/src/components/dialogs/PaymentProvidersDialog.vue +123 -0
  281. package/dist/templates/vuexy-portal/src/components/dialogs/PricingPlanDialog.vue +34 -0
  282. package/dist/templates/vuexy-portal/src/components/dialogs/ReferAndEarnDialog.vue +181 -0
  283. package/dist/templates/vuexy-portal/src/components/dialogs/ShareProjectDialog.vue +198 -0
  284. package/dist/templates/vuexy-portal/src/components/dialogs/TwoFactorAuthDialog.vue +120 -0
  285. package/dist/templates/vuexy-portal/src/components/dialogs/UserInfoEditDialog.vue +246 -0
  286. package/dist/templates/vuexy-portal/src/components/dialogs/UserUpgradePlanDialog.vue +101 -0
  287. package/dist/templates/vuexy-portal/src/layouts/blank.vue +42 -0
  288. package/dist/templates/vuexy-portal/src/layouts/components/DefaultLayoutWithHorizontalNav.vue +75 -0
  289. package/dist/templates/vuexy-portal/src/layouts/components/DefaultLayoutWithVerticalNav.vue +79 -0
  290. package/dist/templates/vuexy-portal/src/layouts/components/Footer.vue +17 -0
  291. package/dist/templates/vuexy-portal/src/layouts/components/NavSearchBar.vue +266 -0
  292. package/dist/templates/vuexy-portal/src/layouts/components/NavbarShortcuts.vue +45 -0
  293. package/dist/templates/vuexy-portal/src/layouts/components/NavbarThemeSwitcher.vue +22 -0
  294. package/dist/templates/vuexy-portal/src/layouts/components/UserProfile.vue +114 -0
  295. package/dist/templates/vuexy-portal/src/layouts/default.vue +30 -0
  296. package/dist/templates/vuexy-portal/src/pages/[...error].vue +46 -0
  297. package/dist/templates/vuexy-portal/src/pages/account-settings/[tab].vue +57 -0
  298. package/dist/templates/vuexy-portal/src/pages/index.vue +32 -0
  299. package/dist/templates/vuexy-portal/src/pages/login.vue +178 -0
  300. package/dist/templates/vuexy-portal/src/pages/not-authorized.vue +47 -0
  301. package/dist/templates/vuexy-portal/src/pages/second-page.vue +13 -0
  302. package/dist/templates/vuexy-portal/src/plugins/casl/shims-ability.d.ts +8 -0
  303. package/dist/templates/vuexy-portal/src/plugins/i18n/locales/en_US.json +88 -0
  304. package/dist/templates/vuexy-portal/src/plugins/i18n/locales/zh_CN.json +88 -0
  305. package/dist/templates/vuexy-portal/src/plugins/i18n/vue-i18n.d.ts +17 -0
  306. package/dist/templates/vuexy-portal/src/plugins/iconify/icons.css +21039 -0
  307. package/dist/templates/vuexy-portal/src/plugins/iconify/package.json +3 -0
  308. package/dist/templates/vuexy-portal/src/views/account-settings/AccountSettingsSecurity.vue +179 -0
  309. package/dist/templates/vuexy-portal/typed-router.d.ts +146 -0
  310. package/dist/utils/template.js +1 -0
  311. package/dist/utils/template.js.map +1 -1
  312. package/package.json +1 -1
  313. package/.gitlab-ci.yml +0 -145
  314. package/Makefile +0 -62
  315. package/dist/templates/db-schema/.gitlab-ci.yml +0 -139
  316. package/dist/templates/db-schema/Makefile +0 -885
  317. package/dist/templates/k8s-deployment/.gitlab-ci.yml +0 -128
  318. package/dist/templates/k8s-deployment/Makefile +0 -196
  319. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/script/Makefile +0 -12
  320. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/script/Makefile +0 -8
  321. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/Makefile +0 -49
  322. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Makefile +0 -9
  323. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/script/Makefile +0 -14
  324. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/_t-0100-readiness-liveness.ts +0 -84
  325. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/hub.ts +0 -372
  326. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contact.ts +0 -158
  327. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contract.ts +0 -328
  328. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-kyc.ts +0 -304
  329. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-app.ts +0 -823
  330. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-web.ts +0 -493
  331. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-profile.ts +0 -277
  332. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-whitelist.ts +0 -133
  333. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/t-0200-start.ts +0 -172
  334. package/dist/templates/mxw-base-api-express/.dockerignore +0 -2
  335. package/dist/templates/mxw-base-api-express/.env +0 -10
  336. package/dist/templates/mxw-base-api-express/.gitlab-ci.yml +0 -174
  337. package/dist/templates/mxw-base-api-express/.nvmrc +0 -1
  338. package/dist/templates/mxw-base-api-express/Makefile +0 -84
  339. package/dist/templates/mxw-base-api-express/src/app-service.test.ts +0 -94
  340. package/dist/templates/mxw-base-api-express/src/app-service.ts +0 -498
  341. package/dist/templates/mxw-base-api-express/src/auth/auth-user.test.ts +0 -215
  342. package/dist/templates/mxw-base-api-express/src/auth/auth-user.ts +0 -86
  343. package/dist/templates/mxw-base-api-express/src/auth/auth.ts +0 -81
  344. package/dist/templates/mxw-base-api-express/src/core-service.ts +0 -72
  345. package/dist/templates/mxw-base-api-express/src/crud.ts +0 -84
  346. package/dist/templates/mxw-base-api-express/src/http-handler.ts +0 -71
  347. package/dist/templates/mxw-base-api-express/src/server.ts +0 -54
  348. package/dist/templates/mxw-base-api-express/src/test.ts +0 -38
  349. package/dist/templates/mxw-base-api-express/src/utils/api-utilities.ts +0 -52
  350. package/dist/templates/mxw-base-api-express/src/utils/file-utilities.ts +0 -55
  351. package/dist/templates/mxw-base-api-express/tsconfig.json +0 -32
  352. package/dist/templates/nestjs-api/.dockerignore +0 -6
  353. package/dist/templates/nestjs-api/.gitlab-ci.yml +0 -174
  354. package/dist/templates/nestjs-api/.nvmrc +0 -1
  355. package/dist/templates/nestjs-api/.prettierrc +0 -4
  356. package/dist/templates/nestjs-api/Makefile +0 -95
  357. package/dist/templates/nestjs-api/nest-cli.json +0 -11
  358. package/dist/templates/nestjs-api/src/app.controller.spec.ts +0 -22
  359. package/dist/templates/nestjs-api/src/app.controller.ts +0 -27
  360. package/dist/templates/nestjs-api/src/app.module.ts +0 -32
  361. package/dist/templates/nestjs-api/src/app.service.ts +0 -27
  362. package/dist/templates/nestjs-api/src/main.ts +0 -26
  363. package/dist/templates/nestjs-api/test/app.e2e-spec.ts +0 -24
  364. package/dist/templates/nestjs-api/tsconfig.build.json +0 -4
  365. package/dist/templates/nestjs-api/tsconfig.json +0 -21
  366. package/dist/templates/nestjs-library/.eslintrc.js +0 -24
  367. package/dist/templates/nestjs-library/.gitlab-ci.yml +0 -138
  368. package/dist/templates/nestjs-library/.prettierrc +0 -6
  369. package/dist/templates/nestjs-library/Makefile +0 -60
  370. package/dist/templates/nestjs-library/index.ts +0 -1
  371. package/dist/templates/nestjs-library/lib/index.ts +0 -2
  372. package/dist/templates/nestjs-library/test/app/controller/hello.controller.ts +0 -7
  373. package/dist/templates/nestjs-library/tsconfig.build.json +0 -7
  374. package/dist/templates/nestjs-library/tsconfig.json +0 -18
  375. package/dist/templates/ts-library/.dockerignore +0 -2
  376. package/dist/templates/ts-library/.eslintrc.js +0 -24
  377. package/dist/templates/ts-library/.gitlab-ci.yml +0 -136
  378. package/dist/templates/ts-library/.prettierrc +0 -6
  379. package/dist/templates/ts-library/Makefile +0 -58
  380. package/dist/templates/ts-library/index.ts +0 -1
  381. package/dist/templates/ts-library/lib/index.ts +0 -1
  382. package/dist/templates/ts-library/lib/samples/index.ts +0 -5
  383. package/dist/templates/ts-library/lib/samples/samples-function.ts +0 -3
  384. package/dist/templates/ts-library/test/sample.e2e-spec.ts +0 -10
  385. package/dist/templates/ts-library/tsconfig.build.json +0 -4
  386. package/tsconfig.json +0 -24
  387. /package/dist/templates/{nestjs-api/.eslintrc.js → turbo-nestjs-vuexy/packages/eslint-config/nest.js} +0 -0
@@ -1,885 +0,0 @@
1
- # REQUIREMENT:
2
- # - GET_VERSION.sql file must be exists in repo root folder
3
- # - SET_VERSION.sql file must be exists in repo root folder, {{VERSION}} keyword in the script will be replace with actual target version number
4
- # - All script must be on repo root folder, and filename start with XXX_*.sql or XXX-*.sql
5
-
6
- # Environment variables:
7
- # PRERELEASE_TAG (default=false): true=prerelease only, false=otherwise
8
- # GIT_TAG: the target version
9
- # VERSION: the installed version
10
-
11
- MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
12
- ROOT_PATH := $(shell pwd)
13
- REPO_PATH := $(ROOT_PATH)
14
- GIT_PATH := $(REPO_PATH)/.git
15
-
16
- .PHONY:
17
-
18
- release: version-sync
19
- @bash -e -o pipefail -c '\
20
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit --remove-orphans mysql release || \
21
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
22
- docker-compose down --remove-orphans -v --rmi local | true; \
23
- echo ">>== DONE ==<<"'
24
-
25
- run-release: prepare-patch wait-for
26
- @set -e -o pipefail; \
27
- if [ -f $(REPO_PATH)/patch.sql ]; then \
28
- ((cat $(REPO_PATH)/patch.sql | (mysql --abort-source-on-error=1 --comments -h"mysql" -u"root" 2> $(REPO_PATH)/error.txt)) && \
29
- ( \
30
- make --no-print-directory -f$(MAKEFILE) run-exp-table; \
31
- make --no-print-directory -f$(MAKEFILE) run-exp-sp; \
32
- make --no-print-directory -f$(MAKEFILE) run-exp-init-data; \
33
- make --no-print-directory -f$(MAKEFILE) run-exp-grant; \
34
- echo ">>== EXTRACTED ==<<"; \
35
- )) || \
36
- ( \
37
- make --no-print-directory -f$(MAKEFILE) test-show-patch-error; \
38
- exit 1; \
39
- ) \
40
- fi;
41
-
42
- run-exp-table:
43
- @for schema in `make --no-print-directory -f$(MAKEFILE) schemas`; do \
44
- echo "EXTRACTING TABLE: $$schema"; \
45
- mysqldump -h"mysql" -u"root" \
46
- -n --comments --quote-names --no-tablespaces --no-data --compact --skip-set-charset \
47
- --databases $$schema | \
48
- sed 's/ AUTO_INCREMENT=[0-9]*//g' > /out/100_$$schema\_Tbl.sql; \
49
- done;
50
-
51
- run-exp-sp:
52
- @for schema in `make --no-print-directory -f$(MAKEFILE) schemas`; do \
53
- echo "EXTRACTING SP: $$schema"; \
54
- echo "USE $$schema;" > /out/500_$$schema\_SP.sql; \
55
- echo "" >> /out/500_$$schema\_SP.sql; \
56
- echo "" >> /out/500_$$schema\_SP.sql; \
57
- echo " \
58
- SET SESSION group_concat_max_len = 1000000; \
59
- SELECT CONCAT( \
60
- 'DELIMITER \$$\$$ \nDROP PROCEDURE IF EXISTS \`', db, '\`.\`', name, '\` \$$\$$ \nCREATE PROCEDURE \`', db, \
61
- '\`.\`', name, '\` (', IFNULL(param_list, ''), '\n) SQL SECURITY INVOKER \n', body, ' \$$\$$\nDELIMITER ;\n\n') \
62
- FROM ( \
63
- SELECT R.ROUTINE_SCHEMA db \
64
- , R.ROUTINE_NAME name \
65
- , (SELECT GROUP_CONCAT(CONCAT('\n ' \
66
- , P.PARAMETER_MODE, ' ' \
67
- , P.PARAMETER_NAME, ' ' \
68
- , CASE P.DATA_TYPE \
69
- WHEN 'int' THEN P.DATA_TYPE \
70
- WHEN 'tinyint' THEN P.DATA_TYPE \
71
- WHEN 'smallint' THEN P.DATA_TYPE \
72
- WHEN 'bigint' THEN P.DATA_TYPE \
73
- ELSE P.DTD_IDENTIFIER \
74
- END)) \
75
- FROM INFORMATION_SCHEMA.PARAMETERS P \
76
- WHERE P.SPECIFIC_SCHEMA = R.ROUTINE_SCHEMA \
77
- AND P.SPECIFIC_NAME = R.ROUTINE_NAME \
78
- AND P.ORDINAL_POSITION > 0 \
79
- ORDER BY P.ORDINAL_POSITION \
80
- ) param_list \
81
- , R.ROUTINE_DEFINITION body \
82
- FROM INFORMATION_SCHEMA.ROUTINES R \
83
- WHERE R.ROUTINE_SCHEMA = '$$schema' \
84
- AND R.ROUTINE_TYPE = 'PROCEDURE' \
85
- ORDER BY R.ROUTINE_NAME \
86
- ) R;" | \
87
- mysql -h"mysql" -u"root" --skip-column-names | \
88
- awk '{gsub(/\\n/,"\n")}1' | awk '{gsub(/\\t/,"\t")}2' >> /out/500_$$schema\_SP.sql; \
89
- echo " \
90
- SET SESSION group_concat_max_len = 1000000; \
91
- SELECT CONCAT( \
92
- 'DELIMITER \$$\$$ \nDROP FUNCTION IF EXISTS \`', db, '\`.\`', name, '\` \$$\$$ \nCREATE FUNCTION \`', db, \
93
- '\`.\`', name, '\` (', IFNULL(param_list, ''), '\n)\nRETURNS ', returns, '\nSQL SECURITY INVOKER \n', body, ' \$$\$$\nDELIMITER ;\n\n') \
94
- FROM ( \
95
- SELECT R.ROUTINE_SCHEMA db \
96
- , R.ROUTINE_NAME name \
97
- , (SELECT GROUP_CONCAT(CONCAT('\n ' \
98
- , P.PARAMETER_NAME, ' ' \
99
- , CASE P.DATA_TYPE \
100
- WHEN 'int' THEN P.DATA_TYPE \
101
- WHEN 'tinyint' THEN P.DATA_TYPE \
102
- WHEN 'smallint' THEN P.DATA_TYPE \
103
- WHEN 'bigint' THEN P.DATA_TYPE \
104
- ELSE P.DTD_IDENTIFIER \
105
- END)) \
106
- FROM INFORMATION_SCHEMA.PARAMETERS P \
107
- WHERE P.SPECIFIC_SCHEMA = R.ROUTINE_SCHEMA \
108
- AND P.SPECIFIC_NAME = R.ROUTINE_NAME \
109
- AND P.ORDINAL_POSITION > 0 \
110
- ORDER BY P.ORDINAL_POSITION \
111
- ) param_list \
112
- , R.ROUTINE_DEFINITION body \
113
- , CASE R.DATA_TYPE \
114
- WHEN 'int' THEN R.DATA_TYPE \
115
- WHEN 'tinyint' THEN R.DATA_TYPE \
116
- WHEN 'smallint' THEN R.DATA_TYPE \
117
- WHEN 'bigint' THEN R.DATA_TYPE \
118
- ELSE R.DTD_IDENTIFIER \
119
- END returns \
120
- FROM INFORMATION_SCHEMA.ROUTINES R \
121
- WHERE R.ROUTINE_SCHEMA = '$$schema' \
122
- AND R.ROUTINE_TYPE = 'FUNCTION' \
123
- ORDER BY R.ROUTINE_NAME \
124
- ) F;" | \
125
- mysql -h"mysql" -u"root" --skip-column-names | \
126
- awk '{gsub(/\\n/,"\n")}1' | awk '{gsub(/\\t/,"\t")}2' >> /out/500_$$schema\_SP.sql; \
127
- done;
128
-
129
- run-exp-init-data:
130
- @if ls $(REPO_PATH)/890_*.sql > /dev/null 2>&1; then \
131
- for file in $(REPO_PATH)/890_*.sql; do \
132
- echo "EXTRACTING INIT DATA FROM FILE: `basename $$file`"; \
133
- cp $$file `echo $$file | awk -F"/890_" '{ printf("/out/300_%s", $$2)}'`; \
134
- done; \
135
- fi;
136
- @if ls $(REPO_PATH)/990_*.sql > /dev/null 2>&1; then \
137
- for file in $(REPO_PATH)/990_*.sql; do \
138
- echo "EXTRACTING INIT DATA FROM TABLE: `basename $$file`"; \
139
- export OUTPUT=`echo $$file | awk -F"/990_" '{ printf("/out/300_%s", $$2)}'`; \
140
- cat $$file | (mysql -h"mysql" -u"root" --skip-column-names) | \
141
- awk '{gsub(/\\n/,"\n")}1' | awk '{gsub(/\\t/,"\t")}2' \
142
- > $$OUTPUT; \
143
- done; \
144
- fi;
145
-
146
- run-exp-grant:
147
- @export PASSWORD='MyAppP@ssw0rd!!'; \
148
- export SCHEMAS=`make --no-print-directory -f$(MAKEFILE) schemas | \
149
- awk -F"." 'BEGIN{first=1} \
150
- { \
151
- printf("%s", (1 != first) ? "," : ""); \
152
- first = 0; \
153
- printf("'\''%s'\''", $$1) \
154
- }'`; \
155
- \
156
- echo "-- GRANT FOR: $$SCHEMAS" > /out/910_DB_Grant_User.sql; \
157
- echo "" >> /out/910_DB_Grant_User.sql; \
158
- \
159
- for grantee in `make --no-print-directory -f$(MAKEFILE) run-exp-grantee`; do \
160
- echo "DROP USER IF EXISTS $$grantee;" >> /out/910_DB_Grant_User.sql; \
161
- done; \
162
- echo "" >> /out/910_DB_Grant_User.sql; \
163
- \
164
- for grantee in `make --no-print-directory -f$(MAKEFILE) run-exp-grantee`; do \
165
- echo "CREATE USER $$grantee IDENTIFIED BY '$$PASSWORD';" >> /out/910_DB_Grant_User.sql; \
166
- done; \
167
- echo "" >> /out/910_DB_Grant_User.sql; \
168
- \
169
- for grantee in `make --no-print-directory -f$(MAKEFILE) run-exp-grantee`; do \
170
- echo "EXTRACTING GRANT: $$grantee"; \
171
- \
172
- echo "$$grantee" | awk -F"@" '{printf("-- %s\n", toupper($$1))}' >> /out/910_DB_Grant_User.sql; \
173
- echo " \
174
- SHOW GRANTS FOR $$grantee;" | \
175
- mysql -h"mysql" -u"root" --skip-column-names | \
176
- awk '{gsub(/\\n/,"\n")}1' | awk '{gsub(/\\t/,"\t")}2' | awk '{printf("%s;\n", $$0)}' > grant_sort.sql; \
177
- \
178
- for item in `cat grant_sort.sql | awk -F"ON " '{printf("%dON %s\n",NR,$$0)}' | \
179
- awk -F"ON " '{printf("%s.%s\n", $$1, $$3)}' | \
180
- awk -F"." '{printf("%s:::::%s\n", $$2, $$1)}' | sort`; \
181
- do \
182
- export LINE=`echo $$item | awk -F":::::" '{printf("%s",$$2)}'`; \
183
- cat grant_sort.sql | awk '{if (NR == ENVIRON["LINE"]) print}' >> /out/910_DB_Grant_User.sql; \
184
- done; \
185
- echo "" >> /out/910_DB_Grant_User.sql; \
186
- done;
187
-
188
- run-exp-grantee:
189
- @export SCHEMAS=`make --no-print-directory -f$(MAKEFILE) schemas | \
190
- awk -F"." 'BEGIN{first=1} \
191
- { \
192
- printf("%s", (1 != first) ? "," : ""); \
193
- first = 0; \
194
- printf("'\''%s'\''", $$1) \
195
- }'`; \
196
- echo " \
197
- SET SESSION group_concat_max_len = 1000000; \
198
- SELECT DISTINCT GRANTEE FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES \
199
- WHERE TABLE_SCHEMA IN ($$SCHEMAS) \
200
- ORDER BY GRANTEE;" | \
201
- mysql -h"mysql" -u"root" --skip-column-names | \
202
- awk '{gsub(/\\n/,"\n")}1' | awk '{gsub(/\\t/,"\t")}2';
203
-
204
- schemas:
205
- @echo "" | \
206
- (cat - $(REPO_PATH)/0*.sql 2>/dev/null || cat -) | \
207
- grep "CREATE DATABASE IF NOT EXISTS " | \
208
- awk -F"CREATE DATABASE IF NOT EXISTS " '{ print $$2}' | \
209
- awk -F" " '{ gsub("\`", "", $$1); print $$1 }'
210
-
211
- cli:
212
- @docker run --rm -it -v $(REPO_PATH):/sql $$(docker build -q .)
213
-
214
- dup:
215
- @(make --no-print-directory -f$(MAKEFILE) dup-list) | sort | uniq -d;
216
-
217
- dup-count:
218
- @(make --no-print-directory -f$(MAKEFILE) dup-list) | wc -l | awk '{$$1=$$1};1';
219
-
220
- dup-list:
221
- @if [ -f $(REPO_PATH)/DEV_MODE.txt ]; then \
222
- cat $(REPO_PATH)/DEV_8*.sql 2>/dev/null | \
223
- awk -F"CREATE PROCEDURE " '{printf("%s\n",$$2)}' | \
224
- awk NF | \
225
- awk -F"(" '{print $$1;}' | \
226
- awk '{$$1=$$1};1' | \
227
- awk '{gsub("\\`","")}1' | \
228
- sort; \
229
- else \
230
- cat $(REPO_PATH)/8*.sql 2>/dev/null | \
231
- awk -F"CREATE PROCEDURE " '{printf("%s\n",$$2)}' | \
232
- awk NF | \
233
- awk -F"(" '{print $$1;}' | \
234
- awk '{$$1=$$1};1' | \
235
- awk '{gsub("\\`","")}1' | \
236
- sort; \
237
- fi;
238
-
239
- # Clone the database repo according to target version (GIt_TAG), and do a prerequisite check
240
- # Install database when it is not exists, otherwise patching process will be trigger
241
- install: prerequisite
242
- @echo "Target version: $(GIT_TAG)"
243
- @set -e -o pipefail; \
244
- make --no-print-directory -f$(MAKEFILE) version-get > $(REPO_PATH)/version.txt; \
245
- if [ -z "$$(cat $(REPO_PATH)/version.txt)" ]; then \
246
- make --no-print-directory -f$(MAKEFILE) run-init; \
247
- else \
248
- make --no-print-directory -f$(MAKEFILE) run-patch; \
249
- fi;
250
-
251
- # Initialize database, it will run all the script files (0XX, 1XX, 3XX, 5XX, 6XX, 9XX) except 7XX & 8XX
252
- # NOTE: MySQL doesn't support transactional DDL, any error on script will lead to database half-migrated
253
- run-init: version-set
254
- @set -e -o pipefail; \
255
- make --no-print-directory -f$(MAKEFILE) get-init > $(REPO_PATH)/all.sql;
256
- @echo "DATABASE installed version: N/A"
257
- @echo "DATABASE target version: $(GIT_TAG)"
258
- @echo "==> DATABASE installation in progress..."
259
- @set -e -o pipefail; \
260
- ((cat $(REPO_PATH)/all.sql | (mysql --abort-source-on-error=1 --comments -h"$(HOST_IP)" -u"$(USERNAME)" -p"$(PASSWORD)" 2> $(REPO_PATH)/error.txt)) && \
261
- ( \
262
- echo "==> DATABASE has been installed"; \
263
- )) || \
264
- ( \
265
- make --no-print-directory -f$(MAKEFILE) test-show-init-error; \
266
- exit 1; \
267
- );
268
-
269
- # Patch database, it will run all the 7XX, 8XX script files from the installed version to target version (including current repo if it is not versioned)
270
- # NOTE: MySQL doesn't support transactional DDL, any error on script will lead to database half-migrated
271
- run-patch: version-set
272
- @set -e -o pipefail; \
273
- make --no-print-directory -f$(MAKEFILE) get-patch FROM="$$(make --no-print-directory -f$(MAKEFILE) version-get)" TO="$(GIT_TAG)" > $(REPO_PATH)/patch.sql;
274
- @echo "DATABASE installed version: $$(cat $(REPO_PATH)/version.txt)"
275
- @echo "DATABASE target version: $(GIT_TAG)"
276
- @echo
277
- @set -e -o pipefail; \
278
- if [ "$(GIT_TAG)" == "$$(cat $(REPO_PATH)/version.txt)" ]; then \
279
- echo "==> DATABASE is latest version"; \
280
- else \
281
- echo "==> DATABASE patching in progress..."; \
282
- ((cat $(REPO_PATH)/patch.sql | (mysql --abort-source-on-error=1 --comments -h"$(HOST_IP)" -u"$(USERNAME)" -p"$(PASSWORD)" 2> $(REPO_PATH)/error.txt)) && \
283
- ( \
284
- cat $(REPO_PATH)/patch.sql | grep " PATCH - "; \
285
- echo "==> DATABASE has been patched"; \
286
- )) || \
287
- ( \
288
- make --no-print-directory -f$(MAKEFILE) test-show-patch-error; \
289
- exit 1; \
290
- ); \
291
- fi;
292
-
293
- run-test: version-sync
294
- @set -e -o pipefail; \
295
- if ! [ -z `make --no-print-directory -f$(MAKEFILE) dup` ]; then \
296
- echo ">>== DUPLICATED STORED PROCEDURE ==<<"; \
297
- make --no-print-directory -f$(MAKEFILE) dup; \
298
- echo ">>== \"-_- ==<<"; \
299
- echo ""; \
300
- exit 1; \
301
- else \
302
- echo ">>== CHECKED `make --no-print-directory -f$(MAKEFILE) dup-count` STORED PROCEDURE(S) ==<<"; \
303
- fi;
304
- @set -e -o pipefail; \
305
- if (ls $(REPO_PATH)/7*.sql > /dev/null 2>&1) || (ls $(REPO_PATH)/8*.sql > /dev/null 2>&1); then \
306
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql patch || \
307
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
308
- docker-compose down --remove-orphans -v --rmi local | true; \
309
- fi;
310
- @set -e -o pipefail; \
311
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql init || \
312
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
313
- docker-compose down --remove-orphans -v --rmi local | true; \
314
- echo ">>== DONE ==<<"
315
-
316
- test: version-sync
317
- @bash -e -o pipefail -c '\
318
- if ! [ -z `make --no-print-directory -f$(MAKEFILE) dup` ]; then \
319
- echo ">>== DUPLICATED STORED PROCEDURE ==<<"; \
320
- make --no-print-directory -f$(MAKEFILE) dup; \
321
- echo ">>== \"-_- ==<<"; \
322
- echo ""; \
323
- exit 1; \
324
- else \
325
- echo ">>== CHECKED `make --no-print-directory -f$(MAKEFILE) dup-count` STORED PROCEDURE(S) ==<<"; \
326
- fi';
327
- @bash -e -o pipefail -c '\
328
- if [ -f $(REPO_PATH)/DEV_MODE.txt ]; then \
329
- if (ls $(REPO_PATH)/DEV_7*.sql > /dev/null 2>&1) || (ls $(REPO_PATH)/DEV_8*.sql > /dev/null 2>&1); then \
330
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql patch || \
331
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
332
- docker-compose down --remove-orphans -v --rmi local | true; \
333
- fi; \
334
- else \
335
- if (ls $(REPO_PATH)/7*.sql > /dev/null 2>&1) || (ls $(REPO_PATH)/8*.sql > /dev/null 2>&1); then \
336
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql patch || \
337
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
338
- docker-compose down --remove-orphans -v --rmi local | true; \
339
- fi; \
340
- fi';
341
- @bash -e -o pipefail -c '\
342
- docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql init || \
343
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1); \
344
- docker-compose down --remove-orphans -v --rmi local | true; \
345
- echo ">>== DONE ==<<"'
346
-
347
- wait-for:
348
- @echo "Waiting for database ready..."
349
- @until nc -w 1 mysql 3306; do sleep 1; done
350
- @echo "Database is ready!"
351
-
352
- test-show-init-error:
353
- @echo ">>== INIT ==<<"
354
- @echo "..."
355
- @export ERROR_LINE=`cat $(REPO_PATH)/error.txt | grep "at line " | awk -F"at line " '{ split($$2,e,":"); printf("%s",e[1]); exit 0; }'`; \
356
- cat $(REPO_PATH)/all.sql | awk 'BEGIN { \
357
- line = 0; \
358
- start = 0; \
359
- limit = 50; \
360
- if ("" != ENVIRON["ERROR_LINE"]) { \
361
- start = ENVIRON["ERROR_LINE"]; \
362
- if (20 <= start) { \
363
- start = start - 20; \
364
- } \
365
- } \
366
- } \
367
- { \
368
- if (line++ > start) { \
369
- printf("%06d %s\n", line, $$0); \
370
- if (0 >= limit--) { \
371
- exit 0; \
372
- } \
373
- } \
374
- }'
375
- @echo "..."
376
- @cat $(REPO_PATH)/error.txt
377
- @echo ">>== INIT ==<<"
378
-
379
- test-show-patch-error:
380
- @echo ">>== PATCH ==<<"
381
- @echo "..."
382
- @export ERROR_LINE=`cat $(REPO_PATH)/error.txt | grep "at line " | awk -F"at line " '{ split($$2,e,":"); printf("%s",e[1]); exit 0; }'`; \
383
- cat $(REPO_PATH)/patch.sql | awk 'BEGIN { \
384
- line = 0; \
385
- start = 0; \
386
- limit = 50; \
387
- if ("" != ENVIRON["ERROR_LINE"]) { \
388
- start = ENVIRON["ERROR_LINE"]; \
389
- if (20 <= start) { \
390
- start = start - 20; \
391
- } \
392
- } \
393
- } \
394
- { \
395
- if (line++ > start) { \
396
- printf("%06d %s\n", line, $$0); \
397
- if (0 >= limit--) { \
398
- exit 0; \
399
- } \
400
- } \
401
- }'
402
- @echo "..."
403
- @cat $(REPO_PATH)/error.txt
404
- @echo ">>== PATCH ==<<"
405
-
406
- test-init: test-run-init test-check-sp-invoker
407
- @echo ">>== PASSED ==<<";
408
-
409
- test-run-init: prepare-init wait-for
410
- @(cat $(REPO_PATH)/all.sql | (mysql --abort-source-on-error=1 --comments -h"mysql" -u"root" 2> $(REPO_PATH)/error.txt)) || \
411
- ( \
412
- make --no-print-directory -f$(MAKEFILE) test-show-init-error; \
413
- exit 1; \
414
- )
415
-
416
- test-patch: test-run-patch test-check-sp-invoker
417
- @echo ">>== PASSED ==<<";
418
-
419
- test-run-patch: prepare-patch wait-for
420
- @set -e -o pipefail; \
421
- if [ -f $(REPO_PATH)/patch.sql ]; then \
422
- ((cat $(REPO_PATH)/patch.sql | (mysql --abort-source-on-error=1 --comments -h"mysql" -u"root" 2> $(REPO_PATH)/error.txt)) && \
423
- ( \
424
- cat $(REPO_PATH)/patch.sql | \
425
- grep " PATCH - " | \
426
- awk -F" PATCH - " '{ split($$2,v," "); print "* PATCH " v[1]}' | \
427
- uniq; \
428
- )) || \
429
- ( \
430
- make --no-print-directory -f$(MAKEFILE) test-show-patch-error; \
431
- exit 1; \
432
- ) \
433
- fi;
434
-
435
- test-check-sp-invoker:
436
- @set -e -o pipefail; \
437
- if [ ! -z "`make --no-print-directory -f$(MAKEFILE) test-run-check-sp-invoker`" ]; then \
438
- echo "ERROR: Enforced security type INVOKER for STORED PROCEDURES"; \
439
- echo `make --no-print-directory -f$(MAKEFILE) test-run-check-sp-invoker`; \
440
- exit 1; \
441
- fi; \
442
-
443
- test-run-check-sp-invoker:
444
- @set -e -o pipefail; \
445
- for schema in `make --no-print-directory -f$(MAKEFILE) schemas`; do \
446
- mysql -h"mysql" -u"root" \
447
- -D $$schema --skip-column-names \
448
- -e "SELECT CONCAT('\`', db, '\`.\`', name, '\`') sp FROM mysql.proc WHERE db = '$$schema' AND type = 'PROCEDURE' AND security_type != 'INVOKER' ORDER BY name"; \
449
- done;
450
-
451
- prepare-init:
452
- @(make --no-print-directory -f$(MAKEFILE) view-init) > $(REPO_PATH)/all.sql
453
-
454
- prepare-patch:
455
- @set -e -o pipefail; \
456
- if [ ! -z "`make --no-print-directory -f$(MAKEFILE) version-first`" ]; then \
457
- make --no-print-directory -f$(MAKEFILE) prepare-first-init > $(REPO_PATH)/patch.sql; \
458
- make --no-print-directory -f$(MAKEFILE) view-patch FROM=`make --no-print-directory -f$(MAKEFILE) version-first` >> $(REPO_PATH)/patch.sql; \
459
- else \
460
- make --no-print-directory -f$(MAKEFILE) view-init > $(REPO_PATH)/patch.sql; \
461
- fi; \
462
- make --no-print-directory -f$(MAKEFILE) tagged 2>/dev/null || \
463
- make --no-print-directory -f$(MAKEFILE) view-patch FROM="" >> $(REPO_PATH)/patch.sql; \
464
-
465
- prepare-first-init:
466
- @for version in `make --no-print-directory -f$(MAKEFILE) version-first`; do \
467
- for file in `make --no-print-directory -f$(MAKEFILE) version-files VERSION="$$version" | \
468
- make --no-print-directory -f$(MAKEFILE) version-init-file`; do \
469
- echo "-- INIT - $$version $$file --"; \
470
- git --git-dir=$(GIT_PATH) --no-pager show $$file; \
471
- echo "-- INIT END --"; \
472
- echo; \
473
- done; \
474
- echo; \
475
- done;
476
-
477
- view-init: get-init
478
-
479
- # Based on DEV_MODE.txt file to determine which group of file need to take for different environment needs
480
- # DEV_MODE.txt file should be remove when version release
481
- view-patch:
482
- @if [ -z "$(FROM)" ]; then \
483
- if [ -f $(REPO_PATH)/DEV_MODE.txt ]; then \
484
- if (ls $(REPO_PATH)/DEV_7*.sql > /dev/null 2>&1); then \
485
- (for file in $(REPO_PATH)/DEV_7*.sql; do \
486
- echo "-- PATCH - HEAD $$file --"; \
487
- cat $$file; \
488
- echo; \
489
- echo "-- PATCH END --"; \
490
- echo; \
491
- done) 2>/dev/null; \
492
- fi; \
493
- if (ls $(REPO_PATH)/DEV_8*.sql > /dev/null 2>&1); then \
494
- (for file in $(REPO_PATH)/DEV_8*.sql; do \
495
- echo "-- PATCH - HEAD $$file --"; \
496
- cat $$file; \
497
- echo; \
498
- echo "-- PATCH END --"; \
499
- echo; \
500
- done) 2>/dev/null; \
501
- fi; \
502
- else \
503
- if (ls $(REPO_PATH)/7*.sql > /dev/null 2>&1); then \
504
- (for file in $(REPO_PATH)/7*.sql; do \
505
- echo "-- PATCH - HEAD $$file --"; \
506
- cat $$file; \
507
- echo; \
508
- echo "-- PATCH END --"; \
509
- echo; \
510
- done) 2>/dev/null; \
511
- fi; \
512
- if (ls $(REPO_PATH)/8*.sql > /dev/null 2>&1); then \
513
- (for file in $(REPO_PATH)/8*.sql; do \
514
- echo "-- PATCH - HEAD $$file --"; \
515
- cat $$file; \
516
- echo; \
517
- echo "-- PATCH END --"; \
518
- echo; \
519
- done) 2>/dev/null; \
520
- fi; \
521
- fi; \
522
- else \
523
- make --no-print-directory -f$(MAKEFILE) get-patch; \
524
- fi;
525
-
526
- view-patch-file:
527
- @make --no-print-directory -f$(MAKEFILE) get-patch NO_OUT=1
528
-
529
- get-init:
530
- @(for file in $(REPO_PATH)/0*.sql; do cat $$file; echo; done) 2>/dev/null; \
531
- (for file in $(REPO_PATH)/1*.sql; do cat $$file; echo; done) 2>/dev/null; \
532
- (for file in $(REPO_PATH)/3*.sql; do cat $$file; echo; done) 2>/dev/null; \
533
- (for file in $(REPO_PATH)/5*.sql; do cat $$file; echo; done) 2>/dev/null; \
534
- (for file in $(REPO_PATH)/6*.sql; do cat $$file; echo; done) 2>/dev/null; \
535
- (for file in $(REPO_PATH)/910_*.sql; do cat $$file; echo; done) 2>/dev/null; \
536
- (cat $(REPO_PATH)/VERSION.sql 2>/dev/null); echo;
537
-
538
- # Combine all the 7XX script from installed version to target version (including current repo if it is not tagged)
539
- get-patch:
540
- @make --no-print-directory -f$(MAKEFILE) get-prepare-patch | \
541
- (cat - $(REPO_PATH)/VERSION.sql 2>/dev/null || cat -) | awk 'BEGIN { printf("\n") } { print }';
542
-
543
- get-prepare-patch:
544
- @for version in `make --no-print-directory -f$(MAKEFILE) version-range`; do \
545
- for file in `make --no-print-directory -f$(MAKEFILE) version-files VERSION="$$version" | \
546
- make --no-print-directory -f$(MAKEFILE) version-patch-file`; do \
547
- echo "-- PATCH - $$version $$file --"; \
548
- if [ -z "$(NO_OUT)" ]; then \
549
- git --git-dir=$(GIT_PATH) --no-pager show $$file; \
550
- echo; \
551
- echo "-- PATCH END --"; \
552
- echo; \
553
- fi; \
554
- done; \
555
- done
556
-
557
- # Retrieve all the version from the installed version to target version
558
- version-range:
559
- @set -e -o pipefail; \
560
- git --git-dir=$(GIT_PATH) tag --sort=creatordate | \
561
- awk 'BEGIN { \
562
- from = 0; \
563
- to = 0; \
564
- } \
565
- { \
566
- if (from == 0) { \
567
- if ($$1 != ENVIRON["FROM"]) { \
568
- next; \
569
- } \
570
- from = 1; \
571
- next; \
572
- } \
573
- if (to == 0) { \
574
- if ($$1 == ENVIRON["TO"]) { \
575
- to = 1; \
576
- } \
577
- if (ENVIRON["PRERELEASE_TAG"] == "true") { \
578
- if (0 < index($$1, "-rc")) { \
579
- print $$1; \
580
- } \
581
- } \
582
- else { \
583
- if (0 == index($$1, "-rc")) { \
584
- print $$1; \
585
- } \
586
- } \
587
- } \
588
- }'
589
-
590
- # Retrieve all the file according to environment variable VERSION
591
- version-files:
592
- @for file in `git --git-dir=$(GIT_PATH) ls-tree --name-only $(VERSION):`; \
593
- do \
594
- echo "$$file" | awk 'END { printf("%s==>", $$0) }'; \
595
- git --git-dir=$(GIT_PATH) log --pretty=short $(VERSION) -- $$file | grep commit | cut -b8- | head -n 1; \
596
- done;
597
-
598
- # Filter out 7XX script and 8XX script
599
- version-init-file:
600
- @awk -F"==>" '{ \
601
- file = $$1; \
602
- if (file ~ /^[0-6|9][0-9][0-9][_-].*[.]sql$$/) { \
603
- hash = $$2; \
604
- print hash ":" file; \
605
- } \
606
- }'
607
-
608
- # Filter for 7XX script and 8XX script
609
- version-patch-file:
610
- @awk -F"==>" '{ \
611
- file = $$1; \
612
- if (file ~ /^[7|8][0-9][0-9][_-].*[.]sql$$/) { \
613
- hash = $$2; \
614
- print hash ":" file; \
615
- } \
616
- }'
617
-
618
- # Check wheather the cloned repo has been tagged or not
619
- tagged:
620
- @if [ -z "$(FROM)" ]; then \
621
- export FROM=HEAD; \
622
- fi; \
623
- for tag in `git --git-dir=$(GIT_PATH) describe --tags $$(git --git-dir=$(GIT_PATH) rev-parse $(FROM))`; do \
624
- for version in `make --no-print-directory -f$(MAKEFILE) versions`; do \
625
- if [ $$tag == $$version ]; then \
626
- exit 0; \
627
- fi; \
628
- done; \
629
- done; \
630
- exit 1;
631
-
632
- # Retrieve all the tagged version
633
- versions:
634
- @(git tag --sort=-creatordate || echo) | \
635
- awk '{ \
636
- if (ENVIRON["PRERELEASE_TAG"] == "false") { \
637
- if (0 == index($$1, "-rc")) { \
638
- print $$1; \
639
- } \
640
- } \
641
- else { \
642
- print $$1; \
643
- } \
644
- }' | \
645
- awk NF
646
-
647
- # Get the installed version number from database
648
- version-get:
649
- @if [ ! -z "$$VERSION" ]; then \
650
- echo -n $$VERSION; \
651
- exit 0; \
652
- fi;
653
- @set -e; set -o pipefail; cat $(REPO_PATH)/GET_VERSION.sql | \
654
- awk '{ gsub(/\{\{VERSION\}\}/, ENVIRON["GIT_TAG"], $$0); print }' | \
655
- mysql -h"$(HOST_IP)" -u"$(USERNAME)" -p"$(PASSWORD)" | \
656
- awk 'NR==2 { printf("%s", $$0) }'
657
-
658
- # Set the target version number into database
659
- # {{VERSION}} keyword will be replace by GIT_TAG value
660
- # {{CI_PIPELINE_URL}} keyword will be replace by CI pipeline URL
661
- version-set: prerequisite
662
- @cat $(REPO_PATH)/SET_VERSION.sql | \
663
- awk '{ gsub(/\{\{VERSION\}\}/, ENVIRON["GIT_TAG"], $$0); print }' | \
664
- awk '{ gsub(/\{\{CI_PIPELINE_URL\}\}/, ENVIRON["CI_PIPELINE_URL"], $$0); print }' > $(REPO_PATH)/VERSION.sql
665
-
666
- # Prerequisite check wheather the get & set version methods are exists
667
- prerequisite:
668
- @if [ ! -f $(REPO_PATH)/GET_VERSION.sql ]; then \
669
- echo "MISSING GET_VERSION SCRIPT!!" && exit 1; \
670
- else \
671
- if [ ! -f $(REPO_PATH)/SET_VERSION.sql ]; then \
672
- echo "MISSING SET_VERSION SCRIPT!!" && exit 1; \
673
- fi; \
674
- fi;
675
-
676
- pre-build: version-prerelease
677
-
678
- build: version-patch
679
-
680
- name:
681
- @echo -n $(PROJECT_NAME)
682
-
683
- separator:
684
- @echo -n ":"
685
-
686
- image: name separator version
687
-
688
- version:
689
- @cat package.json | jq -r '.version'
690
-
691
- version-major: version-sync
692
- @npm -s version major --no-git-tag-version
693
-
694
- version-minor: version-sync
695
- @npm -s version minor --no-git-tag-version
696
-
697
- version-patch: version-sync
698
- @npm -s version patch --no-git-tag-version
699
-
700
- version-prerelease: version-sync
701
- @npm -s version prerelease --preid=rc --no-git-tag-version
702
-
703
- version-first:
704
- @(git tag --sort=-creatordate || echo) | tac | awk 'NR==1 { \
705
- split($$0, n, "-"); \
706
- if (n[1] != "") { \
707
- split(n[1], v, "."); \
708
- if (v[1] ~ /^[0-9]+$$/ && v[2] ~ /^[0-9]+$$/ && v[3] ~ /^[0-9]+$$/) { \
709
- if (ENVIRON["PRERELEASE_TAG"] == "true") { \
710
- printf("%s", $$0); \
711
- exit 0; \
712
- } \
713
- else { \
714
- if (0 == index($$0, "-rc")) { \
715
- printf("%s", $$0); \
716
- exit 0; \
717
- } \
718
- } \
719
- } \
720
- } \
721
- }'
722
-
723
- version-latest:
724
- @(git tag --sort=-creatordate || echo) | awk 'NR==1 { \
725
- split($$0, n, "-"); \
726
- if (n[1] != "") { \
727
- split(n[1], v, "."); \
728
- if (v[1] ~ /^[0-9]+$$/ && v[2] ~ /^[0-9]+$$/ && v[3] ~ /^[0-9]+$$/) { \
729
- if (ENVIRON["PRERELEASE_TAG"] == "true") { \
730
- printf("%s", $$0); \
731
- exit 0; \
732
- } \
733
- else { \
734
- if (0 == index($$0, "-rc")) { \
735
- printf("%s", $$0); \
736
- exit 0; \
737
- } \
738
- } \
739
- } \
740
- } \
741
- }'
742
-
743
- version-previous:
744
- @if [ -z "$(FROM)" ]; then \
745
- export FROM=HEAD; \
746
- fi; \
747
- git log --format="%D" `git rev-parse $(FROM)` | grep tag | awk NF | \
748
- awk '{ \
749
- split($$0, n, "tag: "); \
750
- if ("" != n[2]) { \
751
- split(n[2], v, ", "); \
752
- if (ENVIRON["PRERELEASE_TAG"] == "true" || 0 == index(v[1], "-rc")) { \
753
- printf("%s", v[1]); \
754
- exit 0; \
755
- } \
756
- } \
757
- }'
758
-
759
- version-sync:
760
- @if [ ! -z "$(CI_COMMIT_BRANCH)" ]; then \
761
- git checkout $(CI_COMMIT_BRANCH); \
762
- fi;
763
- @git pull 2>/dev/null || true
764
- @git pull --tags 2>/dev/null || true
765
- @git tag --sort=-creatordate | head -10
766
- @echo '{"version": ""}' | jq -r --arg PKG_VERSION `(make --no-print-directory -f$(MAKEFILE) version-latest PRERELEASE_TAG=true) | \
767
- awk 'END{ \
768
- if (0 == NR) { \
769
- printf("1.0.0-rc.0"); \
770
- } \
771
- else { \
772
- print; \
773
- } \
774
- }'` '.version=$$PKG_VERSION' > package.json;
775
- @echo -n "Current Git tag: "; cat package.json | jq -r '.version'
776
-
777
- sync: version-sync
778
- @docker-compose up --no-deps --build --force-recreate --abort-on-container-exit mysql run-sync || \
779
- ((docker-compose down --remove-orphans -v --rmi local | true); exit 1)
780
- @docker-compose down --remove-orphans -v --rmi local | true
781
- @echo ">>== DONE ==<<"
782
-
783
- run-sync: prepare-init wait-for
784
- @echo ">>== SYNC ==<<"
785
- @cat $(REPO_PATH)/all.sql | awk 'BEGIN { line = 0 } { printf("%06d %s\n", ++line, $$0) }'
786
- @echo ">>== SYNC ==<<"
787
- @set -e -o pipefail; \
788
- (cat $(REPO_PATH)/all.sql | mysql --abort-source-on-error=1 -h"mysql" -u"root")
789
-
790
- ## generata insert statement for nm_email_template,required ${TEMPLATE_CODE}-en_US-content.html file to generate new record,
791
- ## other locale only required ${LOCALE}-content.html & ${LOCALE}-subject.html
792
- gen-update-statement-email-template-file:
793
- @make --no-print-directory -f$(MAKEFILE) update-statement-email-template | \
794
- awk '{ lines = lines $$0 "\n"; } END{ printf("%s;", substr(lines,0,length(lines)-2))}' > push.sh;
795
-
796
- update-statement-email-template:
797
- @echo "INSERT INTO \`nm_email_template\` (\`id\`,\`name\`,\`code\`,\`desc\`,\`content\`,\`stored_procedure\`,\`provider_id\`,\`grp\`,\`type\`,\`flag\`,\`status\`,\`cby\`,\`cdate\`,\`mby\`,\`mdate\`,\`aby\`,\`adate\`,\`remarks\`) VALUES";
798
- @for file in `make --no-print-directory -f$(MAKEFILE) email-template-file`; do \
799
- echo "(" | tr -d \\n; \
800
- cat `echo $$file | awk '{ f=$$1; gsub("-content","-id",f); printf(f)}'` | tr -d \\n; \
801
- TEMPLATECODE=`echo "$$file" | awk -F":" '{ \
802
- m = split($$1, a, "/"); \
803
- fileName = a[m]; \
804
- n = split(fileName, a, "-"); \
805
- code = a[1]; \
806
- printf(code); \
807
- }'`; \
808
- echo ",'$$TEMPLATECODE','$$TEMPLATECODE',NULL," | tr -d \\n; \
809
- TOTALFILES=`find $(REPO_PATH)/Email-Templates/Individual -iname "$$TEMPLATECODE-*-content.html" | wc -l`; \
810
- f=0; \
811
- echo "'{" | tr -d \\n; \
812
- for localFile in `find $(REPO_PATH)/Email-Templates/Individual -iname "$$TEMPLATECODE-*-content.html" | sort -n`; do \
813
- f=$$((f + 1)); \
814
- LOCALE=`echo "$$localFile" | awk -F":" '{ \
815
- m = split($$1, a, "/"); \
816
- fileName = a[m]; \
817
- n = split(fileName, a, "-"); \
818
- locale = a[2]; \
819
- printf(locale); \
820
- }'`; \
821
- echo "\"$$LOCALE\":{\"subject\":\"" | tr -d \\n; \
822
- cat `echo $$localFile | awk '{ f=$$1; gsub("-content","-subject",f); printf(f)}'` | base64 | tr -d \\n; \
823
- echo "\",\"content\":\"" | tr -d \\n; \
824
- cat `echo $$localFile` | base64 | tr -d \\n; \
825
- if (( f == TOTALFILES ));then \
826
- echo "\"}" | tr -d \\n; \
827
- else \
828
- echo "\"}," | tr -d \\n; \
829
- fi \
830
- done; \
831
- echo "}','" | tr -d \\n; \
832
- cat `echo $$file | awk '{ f=$$1; gsub("-content","-sp",f); printf(f)}'` | tr -d \\n; \
833
- echo "',1,0,0,0,1,'SYS',UTC_TIMESTAMP(),'SYS',UTC_TIMESTAMP(),NULL,NULL,NULL),"; \
834
- done;
835
-
836
- email-template-file:
837
- @find $(REPO_PATH)/Email-Templates/Individual -iname "*-en_US-content.html"
838
-
839
-
840
- bus-gen-insert-statement-email-template-file:
841
- @make --no-print-directory -f$(MAKEFILE) bus-insert-statement-email-template | \
842
- awk '{ lines = lines $$0 "\n"; } END{ printf("%s;", substr(lines,0,length(lines)-2))}' > push.sh;
843
-
844
- bus-insert-statement-email-template:
845
- @echo "INSERT INTO \`nm_email_template\` (\`id\`,\`name\`,\`code\`,\`desc\`,\`content\`,\`stored_procedure\`,\`provider_id\`,\`grp\`,\`type\`,\`flag\`,\`status\`,\`cby\`,\`cdate\`,\`mby\`,\`mdate\`,\`aby\`,\`adate\`,\`remarks\`) VALUES";
846
- @for file in `make --no-print-directory -f$(MAKEFILE) bus-email-template-file`; do \
847
- echo "(" | tr -d \\n; \
848
- cat `echo $$file | awk '{ f=$$1; gsub("-content","-id",f); printf(f)}'` | tr -d \\n; \
849
- TEMPLATECODE=`echo "$$file" | awk -F":" '{ \
850
- m = split($$1, a, "/"); \
851
- fileName = a[m]; \
852
- n = split(fileName, a, "-"); \
853
- code = a[1]; \
854
- printf(code); \
855
- }'`; \
856
- echo ",'$$TEMPLATECODE','$$TEMPLATECODE',NULL," | tr -d \\n; \
857
- TOTALFILES=`find $(REPO_PATH)/Email-Templates/Enterprise -iname "$$TEMPLATECODE-*-content.html" | wc -l`; \
858
- f=0; \
859
- echo "'{" | tr -d \\n; \
860
- for localFile in `find $(REPO_PATH)/Email-Templates/Enterprise -iname "$$TEMPLATECODE-*-content.html" | sort -n`; do \
861
- f=$$((f + 1)); \
862
- LOCALE=`echo "$$localFile" | awk -F":" '{ \
863
- m = split($$1, a, "/"); \
864
- fileName = a[m]; \
865
- n = split(fileName, a, "-"); \
866
- locale = a[2]; \
867
- printf(locale); \
868
- }'`; \
869
- echo "\"$$LOCALE\":{\"subject\":\"" | tr -d \\n; \
870
- cat `echo $$localFile | awk '{ f=$$1; gsub("-content","-subject",f); printf(f)}'` | base64 | tr -d \\n; \
871
- echo "\",\"content\":\"" | tr -d \\n; \
872
- cat `echo $$localFile` | base64 | tr -d \\n; \
873
- if (( f == TOTALFILES ));then \
874
- echo "\"}" | tr -d \\n; \
875
- else \
876
- echo "\"}," | tr -d \\n; \
877
- fi \
878
- done; \
879
- echo "}','" | tr -d \\n; \
880
- cat `echo $$file | awk '{ f=$$1; gsub("-content","-sp",f); printf(f)}'` | tr -d \\n; \
881
- echo "',1,0,0,0,1,'SYS',UTC_TIMESTAMP(),'SYS',UTC_TIMESTAMP(),NULL,NULL,NULL),"; \
882
- done;
883
-
884
- bus-email-template-file:
885
- @find $(REPO_PATH)/Email-Templates/Enterprise -iname "*-en_US-content.html"