@nathapp/na-cli 1.0.1-rc.6 → 1.0.2
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.
- package/README.md +88 -20
- package/dist/index.js +36 -2
- package/dist/index.js.map +1 -1
- package/dist/templates/k8s-cert-manager/README.md +60 -0
- package/dist/templates/k8s-cert-manager/cloudflare-cert-manager-issuer.yaml +26 -0
- package/dist/templates/k8s-deployment/templates/_deployment.tpl +1 -1
- package/dist/templates/k8s-deployment/templates/_endpointslice.tpl +42 -0
- package/dist/templates/k8s-deployment/templates/_gateway.tpl +94 -0
- package/dist/templates/k8s-deployment/templates/_grpcroute.tpl +186 -0
- package/dist/templates/k8s-deployment/templates/_httproute.tpl +209 -0
- package/dist/templates/k8s-deployment/templates/_ingressroute.tpl +178 -0
- package/dist/templates/k8s-deployment/templates/_middleware.tpl +553 -0
- package/dist/templates/k8s-deployment/templates/_serverstransport.tpl +73 -0
- package/dist/templates/k8s-deployment/templates/_service.tpl +4 -1
- package/dist/templates/k8s-helm-chart/templates/endpointslice.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/gateway.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/grpcroute.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/httproute.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/ingressroute.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/middleware.yaml +1 -0
- package/dist/templates/k8s-helm-chart/templates/serverstransport.yaml +1 -0
- package/dist/templates/k8s-helm-chart/values.yaml +3 -5
- package/dist/templates/nestjs-api/{.env → .env.local} +5 -0
- package/dist/templates/nestjs-api/.gitignore-rename +2 -1
- package/dist/templates/nestjs-api/Dockerfile +33 -13
- package/dist/templates/nestjs-api/package.json +49 -39
- package/dist/templates/nestjs-api/src/i18n/en_US/date.json +7 -0
- package/dist/templates/nestjs-api/src/i18n/en_US/validation.json +16 -0
- package/dist/templates/nestjs-api/src/i18n/zh_CN/date.json +7 -0
- package/dist/templates/nestjs-api/src/i18n/zh_CN/validation.json +16 -0
- package/dist/templates/nestjs-api/src/i18n/zh_TW/date.json +7 -0
- package/dist/templates/nestjs-api/src/i18n/zh_TW/validation.json +16 -0
- package/dist/templates/nestjs-api/test/jest-test.json +26 -0
- package/dist/templates/nestjs-library/.npmignore-rename +4 -0
- package/dist/templates/nestjs-library/package.json +8 -8
- package/dist/templates/ts-library/.npmignore-rename +4 -0
- package/dist/templates/turbo-nestjs-vuexy/README.md +3 -0
- package/dist/templates/turbo-nestjs-vuexy/package.json +49 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/README.md +3 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/library.js +43 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/package.json +18 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/eslint-config/vue.js +236 -0
- package/dist/templates/{ts-library/tsconfig.json → turbo-nestjs-vuexy/packages/typescript-config/base.json} +4 -6
- package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/nestjs.json +12 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/package.json +9 -0
- package/dist/templates/turbo-nestjs-vuexy/packages/typescript-config/vue.json +82 -0
- package/dist/templates/turbo-nestjs-vuexy/turbo.json +24 -0
- package/dist/templates/vuexy-portal/.editorconfig +1 -0
- package/dist/templates/vuexy-portal/.eslintrc.cjs +237 -0
- package/dist/templates/vuexy-portal/.gitignore-rename +42 -0
- package/dist/templates/vuexy-portal/.stylelintrc.json +46 -0
- package/dist/templates/vuexy-portal/Dockerfile +43 -0
- package/dist/templates/vuexy-portal/README.md +35 -0
- package/dist/templates/vuexy-portal/auto-imports.d.ts +1131 -0
- package/dist/templates/vuexy-portal/components.d.ts +68 -0
- package/dist/templates/vuexy-portal/dev.Dockerfile +25 -0
- package/dist/templates/vuexy-portal/docker-compose.dev.yml +14 -0
- package/dist/templates/vuexy-portal/docker-compose.prod.yml +13 -0
- package/dist/templates/vuexy-portal/entrypoint.sh +6 -0
- package/dist/templates/vuexy-portal/env.d.ts +12 -0
- package/dist/templates/vuexy-portal/index.html +57 -0
- package/dist/templates/vuexy-portal/nginx.conf +14 -0
- package/dist/templates/vuexy-portal/package.json +140 -0
- package/dist/templates/vuexy-portal/pnpm-lock.yaml +7963 -0
- package/dist/templates/vuexy-portal/prod.Dockerfile +41 -0
- package/dist/templates/vuexy-portal/public/favicon.ico +0 -0
- package/dist/templates/vuexy-portal/public/images/avatars/avatar-1.png +0 -0
- package/dist/templates/vuexy-portal/public/images/avatars/avatar-2.png +0 -0
- package/dist/templates/vuexy-portal/public/images/svg/discord.svg +10 -0
- package/dist/templates/vuexy-portal/public/images/svg/gift.svg +8 -0
- package/dist/templates/vuexy-portal/public/images/svg/keyboard.svg +8 -0
- package/dist/templates/vuexy-portal/public/images/svg/laptop.svg +8 -0
- package/dist/templates/vuexy-portal/public/images/svg/lightbulb.svg +8 -0
- package/dist/templates/vuexy-portal/public/images/svg/rocket.svg +8 -0
- package/dist/templates/vuexy-portal/public/loader.css +79 -0
- package/dist/templates/vuexy-portal/public/mockServiceWorker.js +287 -0
- package/dist/templates/vuexy-portal/shims.d.ts +15 -0
- package/dist/templates/vuexy-portal/src/@core/components/AppBarSearch.vue +278 -0
- package/dist/templates/vuexy-portal/src/@core/components/AppDrawerHeaderSection.vue +30 -0
- package/dist/templates/vuexy-portal/src/@core/components/AppStepper.vue +371 -0
- package/dist/templates/vuexy-portal/src/@core/components/BuyNow.vue +92 -0
- package/dist/templates/vuexy-portal/src/@core/components/CardStatisticsVerticalSimple.vue +35 -0
- package/dist/templates/vuexy-portal/src/@core/components/CustomizerSection.vue +27 -0
- package/dist/templates/vuexy-portal/src/@core/components/DialogCloseBtn.vue +25 -0
- package/dist/templates/vuexy-portal/src/@core/components/DropZone.vue +135 -0
- package/dist/templates/vuexy-portal/src/@core/components/I18n.vue +48 -0
- package/dist/templates/vuexy-portal/src/@core/components/MoreBtn.vue +24 -0
- package/dist/templates/vuexy-portal/src/@core/components/Notifications.vue +245 -0
- package/dist/templates/vuexy-portal/src/@core/components/ProductDescriptionEditor.vue +198 -0
- package/dist/templates/vuexy-portal/src/@core/components/ScrollToTop.vue +41 -0
- package/dist/templates/vuexy-portal/src/@core/components/Shortcuts.vue +99 -0
- package/dist/templates/vuexy-portal/src/@core/components/TablePagination.vue +39 -0
- package/dist/templates/vuexy-portal/src/@core/components/TheCustomizer.vue +618 -0
- package/dist/templates/vuexy-portal/src/@core/components/ThemeSwitcher.vue +61 -0
- package/dist/templates/vuexy-portal/src/@core/components/TiptapEditor.vue +166 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppAutocomplete.vue +57 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppCombobox.vue +57 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppDateTimePicker.vue +543 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppSelect.vue +50 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppTextField.vue +78 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/AppTextarea.vue +50 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxes.vue +81 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxesWithIcon.vue +95 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomCheckboxesWithImage.vue +93 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadios.vue +81 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadiosWithIcon.vue +88 -0
- package/dist/templates/vuexy-portal/src/@core/components/app-form-elements/CustomRadiosWithImage.vue +99 -0
- package/dist/templates/vuexy-portal/src/@core/components/cards/AppCardActions.vue +167 -0
- package/dist/templates/vuexy-portal/src/@core/components/cards/AppCardCode.vue +152 -0
- package/dist/templates/vuexy-portal/src/@core/components/cards/CardStatisticsHorizontal.vue +41 -0
- package/dist/templates/vuexy-portal/src/@core/components/cards/CardStatisticsVertical.vue +48 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_components.scss +185 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_dark.scss +16 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout-w-horizontal-nav.scss +45 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout-w-vertical-nav.scss +103 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_default-layout.scss +16 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_horizontal-nav.scss +194 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_index.scss +48 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_layouts.scss +63 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_misc.scss +20 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_mixins.scss +63 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_route-transitions.scss +70 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_utilities.scss +181 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_utils.scss +90 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_variables.scss +198 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/_vertical-nav.scss +255 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_index.scss +1 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_overrides.scss +264 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/libs/vuetify/_variables.scss +62 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout-horizontal-nav.scss +27 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +45 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_default-layout.scss +3 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_horizontal-nav.scss +98 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_index.scss +7 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_misc.scss +7 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_nav.scss +33 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/placeholders/_vertical-nav.scss +80 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/skins/_bordered.scss +72 -0
- package/dist/templates/vuexy-portal/src/@core/scss/base/skins/_index.scss +1 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_default-layout-w-horizontal-nav.scss +9 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_horizontal-nav.scss +40 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_mixins.scss +6 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_utilities.scss +49 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_variables.scss +102 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/_vertical-nav.scss +47 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/index.scss +17 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/apex-chart.scss +108 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/full-calendar.scss +351 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/shepherd.scss +94 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/swiper.scss +5 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/_variables.scss +351 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_alert.scss +114 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_avatar.scss +27 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_badge.scss +25 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_button.scss +280 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_cards.scss +3 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_checkbox.scss +57 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_chip.scss +102 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_dialog.scss +27 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_expansion-panels.scss +106 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_field.scss +308 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_list.scss +30 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_menu.scss +35 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_otp-input.scss +17 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_pagination.scss +140 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_progress.scss +13 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_radio.scss +46 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_rating.scss +20 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_slider.scss +27 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_snackbar.scss +10 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_switch.scss +58 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_table.scss +48 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_tabs.scss +91 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_textarea.scss +9 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_timeline.scss +99 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/_tooltip.scss +6 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/components/index.scss +25 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/index.scss +3 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/libs/vuetify/overrides.scss +18 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/pages/misc.scss +20 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/pages/page-auth.scss +63 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_default-layout-horizontal-nav.scss +7 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +8 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_horizontal-nav.scss +47 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_index.scss +6 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_misc.scss +3 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_nav.scss +27 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/placeholders/_vertical-nav.scss +35 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/skins/_bordered.scss +82 -0
- package/dist/templates/vuexy-portal/src/@core/scss/template/skins/_index.scss +1 -0
- package/dist/templates/vuexy-portal/src/@custom/assets/images/user-profile-header.png +0 -0
- package/dist/templates/vuexy-portal/src/@custom/components/ConfirmationDialog.vue +155 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNav.vue +35 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavGroup.vue +110 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavLayout.vue +150 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavLink.vue +56 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/HorizontalNavPopper.vue +175 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/TransitionExpand.vue +92 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VNodeRenderer.tsx +17 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNav.vue +236 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavGroup.vue +267 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavLayout.vue +232 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavLink.vue +68 -0
- package/dist/templates/vuexy-portal/src/@layouts/components/VerticalNavSectionTitle.vue +37 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_classes.scss +3 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_default-layout.scss +35 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_global.scss +10 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_mixins.scss +30 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_placeholders.scss +53 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_rtl.scss +7 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/_variables.scss +29 -0
- package/dist/templates/vuexy-portal/src/@layouts/styles/index.scss +3 -0
- package/dist/templates/vuexy-portal/src/App.vue +26 -0
- package/dist/templates/vuexy-portal/src/assets/images/avatars/avatar-1.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/border-light.svg +16 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/collapsed-light.svg +17 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/compact-light.svg +11 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/default-light.svg +17 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/horizontal-light.svg +12 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/ltr-light.svg +15 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/rtl-light.svg +15 -0
- package/dist/templates/vuexy-portal/src/assets/images/customizer-icons/wide-light.svg +11 -0
- package/dist/templates/vuexy-portal/src/assets/images/logo.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/images/misc/3d-safe-box-with-golden-dollar-coins.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/misc/3d-space-rocket-with-smoke.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/misc/dollar-coins-flying-pink-piggy-bank.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/misc/fleet-car.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/pages/misc-mask-dark.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/pages/misc-mask-light.png +0 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/Card.svg +8 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/Check.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/Diamond.svg +12 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/Suitcase.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/Wallet.svg +10 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/address.svg +25 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/auth-v1-bottom-shape.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/auth-v1-top-shape.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/cart.svg +5 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-checked.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-indeterminate.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/checkbox-unchecked.svg +10 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/discord.svg +10 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/gift.svg +8 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/home.svg +5 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/keyboard.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/laptop.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/lightbulb.svg +8 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/office.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/paper-send.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/payment.svg +21 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/radio-checked.svg +3 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/radio-unchecked.svg +3 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/rocket.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/trending.svg +14 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/user-info.svg +4 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/user.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-account.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-address.svg +18 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-personal.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-social-link.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/images/svg/wizard-submit.svg +6 -0
- package/dist/templates/vuexy-portal/src/assets/styles/styles.scss +1 -0
- package/dist/templates/vuexy-portal/src/assets/styles/variables/_template.scss +6 -0
- package/dist/templates/vuexy-portal/src/assets/styles/variables/_vuetify.scss +7 -0
- package/dist/templates/vuexy-portal/src/components/AppLoadingIndicator.vue +63 -0
- package/dist/templates/vuexy-portal/src/components/AppPricing.vue +247 -0
- package/dist/templates/vuexy-portal/src/components/AppSearchHeader.vue +77 -0
- package/dist/templates/vuexy-portal/src/components/ErrorHeader.vue +40 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/AddAuthenticatorAppDialog.vue +101 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/AddEditAddressDialog.vue +238 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/AddEditPermissionDialog.vue +93 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/AddEditRoleDialog.vue +302 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/AddPaymentMethodDialog.vue +120 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/CardAddEditDialog.vue +153 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/ConfirmDialog.vue +151 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/CreateAppDialog.vue +459 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/EnableOneTimePasswordDialog.vue +85 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/PaymentProvidersDialog.vue +123 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/PricingPlanDialog.vue +34 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/ReferAndEarnDialog.vue +181 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/ShareProjectDialog.vue +198 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/TwoFactorAuthDialog.vue +120 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/UserInfoEditDialog.vue +246 -0
- package/dist/templates/vuexy-portal/src/components/dialogs/UserUpgradePlanDialog.vue +101 -0
- package/dist/templates/vuexy-portal/src/layouts/blank.vue +42 -0
- package/dist/templates/vuexy-portal/src/layouts/components/DefaultLayoutWithHorizontalNav.vue +75 -0
- package/dist/templates/vuexy-portal/src/layouts/components/DefaultLayoutWithVerticalNav.vue +79 -0
- package/dist/templates/vuexy-portal/src/layouts/components/Footer.vue +17 -0
- package/dist/templates/vuexy-portal/src/layouts/components/NavSearchBar.vue +266 -0
- package/dist/templates/vuexy-portal/src/layouts/components/NavbarShortcuts.vue +45 -0
- package/dist/templates/vuexy-portal/src/layouts/components/NavbarThemeSwitcher.vue +22 -0
- package/dist/templates/vuexy-portal/src/layouts/components/UserProfile.vue +114 -0
- package/dist/templates/vuexy-portal/src/layouts/default.vue +30 -0
- package/dist/templates/vuexy-portal/src/pages/[...error].vue +46 -0
- package/dist/templates/vuexy-portal/src/pages/account-settings/[tab].vue +57 -0
- package/dist/templates/vuexy-portal/src/pages/index.vue +32 -0
- package/dist/templates/vuexy-portal/src/pages/login.vue +178 -0
- package/dist/templates/vuexy-portal/src/pages/not-authorized.vue +47 -0
- package/dist/templates/vuexy-portal/src/pages/second-page.vue +13 -0
- package/dist/templates/vuexy-portal/src/plugins/casl/shims-ability.d.ts +8 -0
- package/dist/templates/vuexy-portal/src/plugins/i18n/locales/en_US.json +88 -0
- package/dist/templates/vuexy-portal/src/plugins/i18n/locales/zh_CN.json +88 -0
- package/dist/templates/vuexy-portal/src/plugins/i18n/vue-i18n.d.ts +17 -0
- package/dist/templates/vuexy-portal/src/plugins/iconify/icons.css +21039 -0
- package/dist/templates/vuexy-portal/src/plugins/iconify/package.json +3 -0
- package/dist/templates/vuexy-portal/src/views/account-settings/AccountSettingsSecurity.vue +179 -0
- package/dist/templates/vuexy-portal/typed-router.d.ts +146 -0
- package/dist/utils/template.js +122 -47
- package/dist/utils/template.js.map +1 -1
- package/package.json +1 -1
- package/.gitlab-ci.yml +0 -143
- package/Makefile +0 -62
- package/dist/templates/db-schema/.gitlab-ci.yml +0 -139
- package/dist/templates/db-schema/Makefile +0 -885
- package/dist/templates/k8s-deployment/.gitlab-ci.yml +0 -128
- package/dist/templates/k8s-deployment/Makefile +0 -196
- package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/script/Makefile +0 -12
- package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/script/Makefile +0 -8
- package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/Makefile +0 -49
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Makefile +0 -9
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/script/Makefile +0 -14
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/_t-0100-readiness-liveness.ts +0 -84
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/hub.ts +0 -372
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contact.ts +0 -158
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contract.ts +0 -328
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-kyc.ts +0 -304
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-app.ts +0 -823
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-web.ts +0 -493
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-profile.ts +0 -277
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-whitelist.ts +0 -133
- package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/t-0200-start.ts +0 -172
- package/dist/templates/mxw-base-api-express/.dockerignore +0 -2
- package/dist/templates/mxw-base-api-express/.env +0 -10
- package/dist/templates/mxw-base-api-express/.gitignore-rename +0 -3
- package/dist/templates/mxw-base-api-express/.gitlab-ci.yml +0 -174
- package/dist/templates/mxw-base-api-express/.nvmrc +0 -1
- package/dist/templates/mxw-base-api-express/Dockerfile +0 -14
- package/dist/templates/mxw-base-api-express/Makefile +0 -84
- package/dist/templates/mxw-base-api-express/README.md +0 -71
- package/dist/templates/mxw-base-api-express/package.json +0 -55
- package/dist/templates/mxw-base-api-express/src/app-service.test.ts +0 -94
- package/dist/templates/mxw-base-api-express/src/app-service.ts +0 -498
- package/dist/templates/mxw-base-api-express/src/auth/auth-user.test.ts +0 -215
- package/dist/templates/mxw-base-api-express/src/auth/auth-user.ts +0 -86
- package/dist/templates/mxw-base-api-express/src/auth/auth.ts +0 -81
- package/dist/templates/mxw-base-api-express/src/core-service.ts +0 -72
- package/dist/templates/mxw-base-api-express/src/crud.ts +0 -84
- package/dist/templates/mxw-base-api-express/src/http-handler.ts +0 -71
- package/dist/templates/mxw-base-api-express/src/server.ts +0 -54
- package/dist/templates/mxw-base-api-express/src/test.ts +0 -38
- package/dist/templates/mxw-base-api-express/src/utils/api-utilities.ts +0 -52
- package/dist/templates/mxw-base-api-express/src/utils/file-utilities.ts +0 -55
- package/dist/templates/mxw-base-api-express/tsconfig.json +0 -32
- package/dist/templates/nestjs-api/.dockerignore +0 -6
- package/dist/templates/nestjs-api/.gitlab-ci.yml +0 -174
- package/dist/templates/nestjs-api/.nvmrc +0 -1
- package/dist/templates/nestjs-api/.prettierrc +0 -4
- package/dist/templates/nestjs-api/Makefile +0 -95
- package/dist/templates/nestjs-api/nest-cli.json +0 -11
- package/dist/templates/nestjs-api/src/app.controller.spec.ts +0 -24
- package/dist/templates/nestjs-api/src/app.controller.ts +0 -27
- package/dist/templates/nestjs-api/src/app.module.ts +0 -49
- package/dist/templates/nestjs-api/src/app.service.ts +0 -27
- package/dist/templates/nestjs-api/src/main.ts +0 -26
- package/dist/templates/nestjs-api/test/app.e2e-spec.ts +0 -47
- package/dist/templates/nestjs-api/tsconfig.build.json +0 -4
- package/dist/templates/nestjs-api/tsconfig.json +0 -24
- package/dist/templates/nestjs-library/.eslintrc.js +0 -24
- package/dist/templates/nestjs-library/.gitlab-ci.yml +0 -138
- package/dist/templates/nestjs-library/.prettierrc +0 -6
- package/dist/templates/nestjs-library/Makefile +0 -60
- package/dist/templates/nestjs-library/index.ts +0 -1
- package/dist/templates/nestjs-library/lib/index.ts +0 -2
- package/dist/templates/nestjs-library/test/app/controller/hello.controller.ts +0 -7
- package/dist/templates/nestjs-library/tsconfig.build.json +0 -7
- package/dist/templates/nestjs-library/tsconfig.json +0 -18
- package/dist/templates/ts-library/.dockerignore +0 -2
- package/dist/templates/ts-library/.eslintrc.js +0 -24
- package/dist/templates/ts-library/.gitlab-ci.yml +0 -136
- package/dist/templates/ts-library/.prettierrc +0 -6
- package/dist/templates/ts-library/Makefile +0 -58
- package/dist/templates/ts-library/index.ts +0 -1
- package/dist/templates/ts-library/lib/index.ts +0 -1
- package/dist/templates/ts-library/lib/samples/index.ts +0 -5
- package/dist/templates/ts-library/lib/samples/samples-function.ts +0 -3
- package/dist/templates/ts-library/test/sample.e2e-spec.ts +0 -10
- package/dist/templates/ts-library/tsconfig.build.json +0 -4
- package/dist/utils/help.js +0 -8
- package/dist/utils/help.js.map +0 -1
- package/tsconfig.json +0 -24
- /package/dist/templates/{nestjs-api/.eslintrc.js → turbo-nestjs-vuexy/packages/eslint-config/nest.js} +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { md5 } from 'js-md5'
|
|
3
|
+
import { useAppToasts } from '@/@custom/composables/toasts'
|
|
4
|
+
import { useValidators } from '@/@custom/composables/validator'
|
|
5
|
+
|
|
6
|
+
const { t } = useI18n()
|
|
7
|
+
const { requiredValidator, passwordValidator, confirmedPasswordValidator } = useValidators()
|
|
8
|
+
const { toastLocalizeSuccess } = useAppToasts()
|
|
9
|
+
const isCurrentPasswordVisible = ref(false)
|
|
10
|
+
const isNewPasswordVisible = ref(false)
|
|
11
|
+
const isConfirmPasswordVisible = ref(false)
|
|
12
|
+
const currentPassword = ref('')
|
|
13
|
+
const newPassword = ref('')
|
|
14
|
+
const confirmPassword = ref('')
|
|
15
|
+
const refForm = ref()
|
|
16
|
+
const actionLoading = ref(false)
|
|
17
|
+
|
|
18
|
+
const passwordRequirements = computed(() => (
|
|
19
|
+
[
|
|
20
|
+
t('changePassword.passwordRequirement1'),
|
|
21
|
+
t('changePassword.passwordRequirement2'),
|
|
22
|
+
t('changePassword.passwordRequirement3'),
|
|
23
|
+
t('changePassword.passwordRequirement4'),
|
|
24
|
+
t('changePassword.passwordRequirement5'),
|
|
25
|
+
]
|
|
26
|
+
))
|
|
27
|
+
|
|
28
|
+
const onChangePassword = async () => {
|
|
29
|
+
const validateResult = await refForm.value?.validate()
|
|
30
|
+
|
|
31
|
+
if (validateResult?.valid) {
|
|
32
|
+
try {
|
|
33
|
+
actionLoading.value = true
|
|
34
|
+
|
|
35
|
+
const result = await userApi.changePassword({
|
|
36
|
+
existingPassword: md5(currentPassword.value),
|
|
37
|
+
password: md5(newPassword.value),
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
if (result.ret === 0) {
|
|
41
|
+
toastLocalizeSuccess('changePassword.passwordChangeSuccess')
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
refForm.value?.reset()
|
|
44
|
+
refForm.value?.resetValidation()
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
console.log('change password error', e)
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
actionLoading.value = false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<VRow>
|
|
60
|
+
<!-- SECTION: Change Password -->
|
|
61
|
+
<VCol cols="12">
|
|
62
|
+
<VCard :title="$t('changePassword.changePassword')">
|
|
63
|
+
<VForm ref="refForm">
|
|
64
|
+
<VCardText class="pt-0">
|
|
65
|
+
<!-- 👉 Current Password -->
|
|
66
|
+
<VRow>
|
|
67
|
+
<VCol
|
|
68
|
+
cols="12"
|
|
69
|
+
md="6"
|
|
70
|
+
>
|
|
71
|
+
<!-- 👉 current password -->
|
|
72
|
+
<AppTextField
|
|
73
|
+
v-model="currentPassword"
|
|
74
|
+
:rules="[requiredValidator]"
|
|
75
|
+
:type="isCurrentPasswordVisible ? 'text' : 'password'"
|
|
76
|
+
:append-inner-icon="isCurrentPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
|
|
77
|
+
:label="$t('changePassword.currentPassword')"
|
|
78
|
+
autocomplete="on"
|
|
79
|
+
placeholder="············"
|
|
80
|
+
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
|
|
81
|
+
/>
|
|
82
|
+
</VCol>
|
|
83
|
+
</VRow>
|
|
84
|
+
|
|
85
|
+
<!-- 👉 New Password -->
|
|
86
|
+
<VRow>
|
|
87
|
+
<VCol
|
|
88
|
+
cols="12"
|
|
89
|
+
md="6"
|
|
90
|
+
>
|
|
91
|
+
<!-- 👉 new password -->
|
|
92
|
+
<AppTextField
|
|
93
|
+
v-model="newPassword"
|
|
94
|
+
:rules="[requiredValidator, passwordValidator]"
|
|
95
|
+
:type="isNewPasswordVisible ? 'text' : 'password'"
|
|
96
|
+
:append-inner-icon="isNewPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
|
|
97
|
+
:label="$t('changePassword.newPassword')"
|
|
98
|
+
autocomplete="on"
|
|
99
|
+
placeholder="············"
|
|
100
|
+
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
|
|
101
|
+
/>
|
|
102
|
+
</VCol>
|
|
103
|
+
|
|
104
|
+
<VCol
|
|
105
|
+
cols="12"
|
|
106
|
+
md="6"
|
|
107
|
+
>
|
|
108
|
+
<!-- 👉 confirm password -->
|
|
109
|
+
<AppTextField
|
|
110
|
+
v-model="confirmPassword"
|
|
111
|
+
:rules="[requiredValidator, confirmedPasswordValidator(confirmPassword, newPassword)]"
|
|
112
|
+
:type="isConfirmPasswordVisible ? 'text' : 'password'"
|
|
113
|
+
:append-inner-icon="isConfirmPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
|
|
114
|
+
:label="$t('changePassword.confirmPassword')"
|
|
115
|
+
autocomplete="on"
|
|
116
|
+
placeholder="············"
|
|
117
|
+
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
|
|
118
|
+
/>
|
|
119
|
+
</VCol>
|
|
120
|
+
</VRow>
|
|
121
|
+
</VCardText>
|
|
122
|
+
|
|
123
|
+
<!-- 👉 Password Requirements -->
|
|
124
|
+
<VCardText>
|
|
125
|
+
<h6 class="text-h6 text-medium-emphasis mb-4">
|
|
126
|
+
{{ $t('changePassword.passwordRequirements') }}
|
|
127
|
+
</h6>
|
|
128
|
+
|
|
129
|
+
<VList class="card-list">
|
|
130
|
+
<VListItem
|
|
131
|
+
v-for="item in passwordRequirements"
|
|
132
|
+
:key="item"
|
|
133
|
+
:title="item"
|
|
134
|
+
class="text-medium-emphasis"
|
|
135
|
+
>
|
|
136
|
+
<template #prepend>
|
|
137
|
+
<VIcon
|
|
138
|
+
size="10"
|
|
139
|
+
icon="tabler-circle-filled"
|
|
140
|
+
/>
|
|
141
|
+
</template>
|
|
142
|
+
</VListItem>
|
|
143
|
+
</VList>
|
|
144
|
+
</VCardText>
|
|
145
|
+
|
|
146
|
+
<!-- 👉 Action Buttons -->
|
|
147
|
+
<VCardText class="d-flex flex-wrap gap-4">
|
|
148
|
+
<VBtn
|
|
149
|
+
type="submit"
|
|
150
|
+
:loading="actionLoading"
|
|
151
|
+
@click.prevent="onChangePassword"
|
|
152
|
+
>
|
|
153
|
+
{{ $t('common.saveChanges') }}
|
|
154
|
+
</VBtn>
|
|
155
|
+
|
|
156
|
+
<VBtn
|
|
157
|
+
type="reset"
|
|
158
|
+
color="secondary"
|
|
159
|
+
variant="tonal"
|
|
160
|
+
>
|
|
161
|
+
{{ $t('common.reset') }}
|
|
162
|
+
</VBtn>
|
|
163
|
+
</VCardText>
|
|
164
|
+
</VForm>
|
|
165
|
+
</VCard>
|
|
166
|
+
</VCol>
|
|
167
|
+
<!-- !SECTION -->
|
|
168
|
+
</VRow>
|
|
169
|
+
</template>
|
|
170
|
+
|
|
171
|
+
<style lang="scss" scoped>
|
|
172
|
+
.card-list {
|
|
173
|
+
--v-card-list-gap: 16px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.server-close-btn {
|
|
177
|
+
inset-inline-end: 0.5rem;
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
|
5
|
+
// It's recommended to commit this file.
|
|
6
|
+
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
|
7
|
+
|
|
8
|
+
/// <reference types="unplugin-vue-router/client" />
|
|
9
|
+
|
|
10
|
+
import type {
|
|
11
|
+
// type safe route locations
|
|
12
|
+
RouteLocationTypedList,
|
|
13
|
+
RouteLocationResolvedTypedList,
|
|
14
|
+
RouteLocationNormalizedTypedList,
|
|
15
|
+
RouteLocationNormalizedLoadedTypedList,
|
|
16
|
+
RouteLocationAsString,
|
|
17
|
+
RouteLocationAsRelativeTypedList,
|
|
18
|
+
RouteLocationAsPathTypedList,
|
|
19
|
+
|
|
20
|
+
// helper types
|
|
21
|
+
// route definitions
|
|
22
|
+
RouteRecordInfo,
|
|
23
|
+
ParamValue,
|
|
24
|
+
ParamValueOneOrMore,
|
|
25
|
+
ParamValueZeroOrMore,
|
|
26
|
+
ParamValueZeroOrOne,
|
|
27
|
+
|
|
28
|
+
// vue-router extensions
|
|
29
|
+
_RouterTyped,
|
|
30
|
+
RouterLinkTyped,
|
|
31
|
+
RouterLinkPropsTyped,
|
|
32
|
+
NavigationGuard,
|
|
33
|
+
UseLinkFnTyped,
|
|
34
|
+
|
|
35
|
+
// data fetching
|
|
36
|
+
_DataLoader,
|
|
37
|
+
_DefineLoaderOptions,
|
|
38
|
+
} from 'unplugin-vue-router/types'
|
|
39
|
+
|
|
40
|
+
declare module 'vue-router/auto/routes' {
|
|
41
|
+
export interface RouteNamedMap {
|
|
42
|
+
'root': RouteRecordInfo<'root', '/', Record<never, never>, Record<never, never>>,
|
|
43
|
+
'$error': RouteRecordInfo<'$error', '/:error(.*)', { error: ParamValue<true> }, { error: ParamValue<false> }>,
|
|
44
|
+
'account-settings-tab': RouteRecordInfo<'account-settings-tab', '/account-settings/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
|
|
45
|
+
'login': RouteRecordInfo<'login', '/login', Record<never, never>, Record<never, never>>,
|
|
46
|
+
'not-authorized': RouteRecordInfo<'not-authorized', '/not-authorized', Record<never, never>, Record<never, never>>,
|
|
47
|
+
'second-page': RouteRecordInfo<'second-page', '/second-page', Record<never, never>, Record<never, never>>,
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare module 'vue-router/auto' {
|
|
52
|
+
import type { RouteNamedMap } from 'vue-router/auto/routes'
|
|
53
|
+
|
|
54
|
+
export type RouterTyped = _RouterTyped<RouteNamedMap>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards).
|
|
58
|
+
* Allows passing the name of the route to be passed as a generic.
|
|
59
|
+
*/
|
|
60
|
+
export type RouteLocationNormalized<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationNormalizedTypedList<RouteNamedMap>[Name]
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`).
|
|
64
|
+
* Allows passing the name of the route to be passed as a generic.
|
|
65
|
+
*/
|
|
66
|
+
export type RouteLocationNormalizedLoaded<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[Name]
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`).
|
|
70
|
+
* Allows passing the name of the route to be passed as a generic.
|
|
71
|
+
*/
|
|
72
|
+
export type RouteLocationResolved<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationResolvedTypedList<RouteNamedMap>[Name]
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic.
|
|
76
|
+
*/
|
|
77
|
+
export type RouteLocation<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationTypedList<RouteNamedMap>[Name]
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Type safe version of `RouteLocationRaw` . Allows passing the name of the route to be passed as a generic.
|
|
81
|
+
*/
|
|
82
|
+
export type RouteLocationRaw<Name extends keyof RouteNamedMap = keyof RouteNamedMap> =
|
|
83
|
+
| RouteLocationAsString<RouteNamedMap>
|
|
84
|
+
| RouteLocationAsRelativeTypedList<RouteNamedMap>[Name]
|
|
85
|
+
| RouteLocationAsPathTypedList<RouteNamedMap>[Name]
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Generate a type safe params for a route location. Requires the name of the route to be passed as a generic.
|
|
89
|
+
*/
|
|
90
|
+
export type RouteParams<Name extends keyof RouteNamedMap> = RouteNamedMap[Name]['params']
|
|
91
|
+
/**
|
|
92
|
+
* Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic.
|
|
93
|
+
*/
|
|
94
|
+
export type RouteParamsRaw<Name extends keyof RouteNamedMap> = RouteNamedMap[Name]['paramsRaw']
|
|
95
|
+
|
|
96
|
+
export function useRouter(): RouterTyped
|
|
97
|
+
export function useRoute<Name extends keyof RouteNamedMap = keyof RouteNamedMap>(name?: Name): RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[Name]
|
|
98
|
+
|
|
99
|
+
export const useLink: UseLinkFnTyped<RouteNamedMap>
|
|
100
|
+
|
|
101
|
+
export function onBeforeRouteLeave(guard: NavigationGuard<RouteNamedMap>): void
|
|
102
|
+
export function onBeforeRouteUpdate(guard: NavigationGuard<RouteNamedMap>): void
|
|
103
|
+
|
|
104
|
+
export const RouterLink: RouterLinkTyped<RouteNamedMap>
|
|
105
|
+
export const RouterLinkProps: RouterLinkPropsTyped<RouteNamedMap>
|
|
106
|
+
|
|
107
|
+
// Experimental Data Fetching
|
|
108
|
+
|
|
109
|
+
export function defineLoader<
|
|
110
|
+
P extends Promise<any>,
|
|
111
|
+
Name extends keyof RouteNamedMap = keyof RouteNamedMap,
|
|
112
|
+
isLazy extends boolean = false,
|
|
113
|
+
>(
|
|
114
|
+
name: Name,
|
|
115
|
+
loader: (route: RouteLocationNormalizedLoaded<Name>) => P,
|
|
116
|
+
options?: _DefineLoaderOptions<isLazy>,
|
|
117
|
+
): _DataLoader<Awaited<P>, isLazy>
|
|
118
|
+
export function defineLoader<
|
|
119
|
+
P extends Promise<any>,
|
|
120
|
+
isLazy extends boolean = false,
|
|
121
|
+
>(
|
|
122
|
+
loader: (route: RouteLocationNormalizedLoaded) => P,
|
|
123
|
+
options?: _DefineLoaderOptions<isLazy>,
|
|
124
|
+
): _DataLoader<Awaited<P>, isLazy>
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
_definePage as definePage,
|
|
128
|
+
_HasDataLoaderMeta as HasDataLoaderMeta,
|
|
129
|
+
_setupDataFetchingGuard as setupDataFetchingGuard,
|
|
130
|
+
_stopDataFetchingScope as stopDataFetchingScope,
|
|
131
|
+
} from 'unplugin-vue-router/runtime'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare module 'vue-router' {
|
|
135
|
+
import type { RouteNamedMap } from 'vue-router/auto/routes'
|
|
136
|
+
|
|
137
|
+
export interface TypesConfig {
|
|
138
|
+
beforeRouteUpdate: NavigationGuard<RouteNamedMap>
|
|
139
|
+
beforeRouteLeave: NavigationGuard<RouteNamedMap>
|
|
140
|
+
|
|
141
|
+
$route: RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[keyof RouteNamedMap]
|
|
142
|
+
$router: _RouterTyped<RouteNamedMap>
|
|
143
|
+
|
|
144
|
+
RouterLink: RouterLinkTyped<RouteNamedMap>
|
|
145
|
+
}
|
|
146
|
+
}
|
package/dist/utils/template.js
CHANGED
|
@@ -65,6 +65,7 @@ var TEMPLATE_NAME;
|
|
|
65
65
|
TEMPLATE_NAME["MXW_BASE_API"] = "mxw-base-api-express";
|
|
66
66
|
TEMPLATE_NAME["TS_LIBRARY"] = "ts-library";
|
|
67
67
|
TEMPLATE_NAME["NESTJS_API"] = "nestjs-api";
|
|
68
|
+
TEMPLATE_NAME["VUEXY_PORTAL"] = "vuexy-portal";
|
|
68
69
|
})(TEMPLATE_NAME = exports.TEMPLATE_NAME || (exports.TEMPLATE_NAME = {}));
|
|
69
70
|
var NESTJS_API_PLATFORM;
|
|
70
71
|
(function (NESTJS_API_PLATFORM) {
|
|
@@ -100,7 +101,7 @@ function render(content, data) {
|
|
|
100
101
|
exports.render = render;
|
|
101
102
|
function generateTemplate(templateDir, targetDirectory) {
|
|
102
103
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
var templateChoices, template_specific, should_ask_install, should_ask_author, QUESTIONS;
|
|
104
|
+
var templateChoices, template_specific, should_ask_install, should_ask_author, QUESTIONS, inputAnswers;
|
|
104
105
|
return __generator(this, function (_a) {
|
|
105
106
|
templateChoices = fs.readdirSync(templateDir);
|
|
106
107
|
template_specific = function (answer, templateName) {
|
|
@@ -113,9 +114,13 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
113
114
|
projectChoice !== TEMPLATE_NAME.K8S_DEPLOYMENT &&
|
|
114
115
|
projectChoice !== TEMPLATE_NAME.K8S_DEPLOY_CHART;
|
|
115
116
|
};
|
|
116
|
-
should_ask_author = function (
|
|
117
|
-
var
|
|
118
|
-
|
|
117
|
+
should_ask_author = function (answers) {
|
|
118
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
119
|
+
if (isNonInteractive)
|
|
120
|
+
return false;
|
|
121
|
+
var projectChoice = answers["template"] || yargs.argv['template'];
|
|
122
|
+
var authorArg = yargs.argv['author'];
|
|
123
|
+
return !authorArg && projectChoice !== TEMPLATE_NAME.DB_SCHEMA
|
|
119
124
|
&& projectChoice !== TEMPLATE_NAME.K8S_DEPLOYMENT &&
|
|
120
125
|
projectChoice !== TEMPLATE_NAME.K8S_DEPLOY_CHART;
|
|
121
126
|
};
|
|
@@ -125,13 +130,13 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
125
130
|
type: 'list',
|
|
126
131
|
message: 'What project template would you like to generate?',
|
|
127
132
|
choices: templateChoices,
|
|
128
|
-
when: function () { return !yargs.argv['template']; }
|
|
133
|
+
when: function (answers) { return !answers['template'] && !yargs.argv['template']; }
|
|
129
134
|
},
|
|
130
135
|
{
|
|
131
136
|
name: 'name',
|
|
132
137
|
type: 'input',
|
|
133
138
|
message: 'Project name:',
|
|
134
|
-
when: function () { return !yargs.argv['name']; },
|
|
139
|
+
when: function (answers) { return !answers['name'] && !yargs.argv['name']; },
|
|
135
140
|
validate: function (input) {
|
|
136
141
|
if (/^([A-Za-z\-\_\d])+$/.test(input))
|
|
137
142
|
return true;
|
|
@@ -143,26 +148,41 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
143
148
|
name: 'author',
|
|
144
149
|
type: 'input',
|
|
145
150
|
message: 'Author:',
|
|
146
|
-
when: function (
|
|
151
|
+
when: function (answers) { return !answers['author'] && should_ask_author(answers); }
|
|
147
152
|
},
|
|
148
153
|
{
|
|
149
154
|
name: "nestjs_api_platform",
|
|
150
155
|
type: "list",
|
|
151
156
|
message: "what is the nestjs-api platform?",
|
|
152
157
|
choices: [NESTJS_API_PLATFORM.FASTIFY, NESTJS_API_PLATFORM.EXPRESS],
|
|
153
|
-
when: function (
|
|
158
|
+
when: function (answers) {
|
|
159
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
160
|
+
if (isNonInteractive)
|
|
161
|
+
return false;
|
|
162
|
+
return !answers['nestjs_api_platform'] && template_specific(answers, TEMPLATE_NAME.NESTJS_API);
|
|
163
|
+
}
|
|
154
164
|
},
|
|
155
165
|
{
|
|
156
166
|
name: "run_install",
|
|
157
167
|
type: "confirm",
|
|
158
168
|
message: "Do you want to run npm install after template created?",
|
|
159
|
-
when: function (
|
|
169
|
+
when: function (answers) {
|
|
170
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
171
|
+
if (isNonInteractive)
|
|
172
|
+
return false;
|
|
173
|
+
return !answers['run_install'] && yargs.argv['install'] === undefined && should_ask_install(answers);
|
|
174
|
+
}
|
|
160
175
|
},
|
|
161
176
|
{
|
|
162
177
|
name: "db_master",
|
|
163
178
|
type: "input",
|
|
164
179
|
message: "what is the master database name?",
|
|
165
|
-
when: function (
|
|
180
|
+
when: function (answers) {
|
|
181
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
182
|
+
if (isNonInteractive)
|
|
183
|
+
return false;
|
|
184
|
+
return !answers['db_master'] && template_specific(answers, TEMPLATE_NAME.DB_SCHEMA);
|
|
185
|
+
}
|
|
166
186
|
},
|
|
167
187
|
/** TEMPLATE_NAME.K8S_DEPLOY_CHART */
|
|
168
188
|
{
|
|
@@ -170,56 +190,77 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
170
190
|
type: "list",
|
|
171
191
|
message: "what is the registry host?",
|
|
172
192
|
choices: [K8S_REGISTRY_HOST.ALIYUN, K8S_REGISTRY_HOST.AWS, K8S_REGISTRY_HOST.DOCKER_HUB, K8S_REGISTRY_HOST.CUSTOM],
|
|
173
|
-
when: function (
|
|
193
|
+
when: function (answers) { return !answers['k8s_chart_registry_host'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART); }
|
|
174
194
|
},
|
|
175
195
|
{
|
|
176
196
|
name: "k8s_chart_aws_account_id",
|
|
177
197
|
type: "input",
|
|
178
198
|
message: "please enter AWS Account ID?",
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
199
|
+
default: "123456789",
|
|
200
|
+
when: function (answers) {
|
|
201
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
202
|
+
if (isNonInteractive)
|
|
203
|
+
return false;
|
|
204
|
+
var registryHost = (answers === null || answers === void 0 ? void 0 : answers.k8s_chart_registry_host) || yargs.argv['k8s_chart_registry_host'];
|
|
205
|
+
return !answers['k8s_chart_aws_account_id'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART) && registryHost == K8S_REGISTRY_HOST.AWS;
|
|
182
206
|
}
|
|
183
207
|
},
|
|
184
208
|
{
|
|
185
209
|
name: "k8s_chart_custom_registry_host",
|
|
186
210
|
type: "input",
|
|
187
211
|
message: "please enter custom registry host",
|
|
188
|
-
when: function (
|
|
189
|
-
var
|
|
190
|
-
|
|
212
|
+
when: function (answers) {
|
|
213
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
214
|
+
if (isNonInteractive)
|
|
215
|
+
return false;
|
|
216
|
+
var registryHost = (answers === null || answers === void 0 ? void 0 : answers.k8s_chart_registry_host) || yargs.argv['k8s_chart_registry_host'];
|
|
217
|
+
return !answers['k8s_chart_custom_registry_host'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART) && registryHost == K8S_REGISTRY_HOST.CUSTOM;
|
|
191
218
|
}
|
|
192
219
|
},
|
|
193
220
|
{
|
|
194
221
|
name: "k8s_chart_registry_region",
|
|
195
222
|
type: "list",
|
|
196
223
|
message: "what is the registry region?",
|
|
197
|
-
|
|
198
|
-
|
|
224
|
+
default: "ap-southeast-3",
|
|
225
|
+
choices: function (answers) {
|
|
226
|
+
var registryHost = (answers === null || answers === void 0 ? void 0 : answers.k8s_chart_registry_host) || yargs.argv['k8s_chart_registry_host'];
|
|
199
227
|
if (registryHost == K8S_REGISTRY_HOST.ALIYUN)
|
|
200
228
|
return ALIYUN_REGION;
|
|
201
229
|
else if (registryHost == K8S_REGISTRY_HOST.AWS)
|
|
202
230
|
return AWS_REGION;
|
|
203
231
|
return ["none"];
|
|
204
232
|
},
|
|
205
|
-
when: function (
|
|
206
|
-
var
|
|
207
|
-
|
|
233
|
+
when: function (answers) {
|
|
234
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
235
|
+
if (isNonInteractive)
|
|
236
|
+
return false;
|
|
237
|
+
var registryHost = (answers === null || answers === void 0 ? void 0 : answers.k8s_chart_registry_host) || yargs.argv['k8s_chart_registry_host'];
|
|
238
|
+
return !answers['k8s_chart_registry_region'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART) && (registryHost == K8S_REGISTRY_HOST.ALIYUN || registryHost == K8S_REGISTRY_HOST.AWS);
|
|
208
239
|
}
|
|
209
240
|
},
|
|
210
241
|
{
|
|
211
242
|
name: "k8s_image_name",
|
|
212
243
|
type: "input",
|
|
213
244
|
message: "what is the image name include namespace (eg: bitnami/kafka)?",
|
|
214
|
-
|
|
215
|
-
|
|
245
|
+
default: "bitnami/kafka",
|
|
246
|
+
when: function (answers) {
|
|
247
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
248
|
+
if (isNonInteractive)
|
|
249
|
+
return false;
|
|
250
|
+
return !answers['k8s_image_name'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART);
|
|
216
251
|
}
|
|
217
252
|
},
|
|
218
253
|
{
|
|
219
254
|
name: "k8s_image_version",
|
|
220
255
|
type: "input",
|
|
221
256
|
message: "what is the image version?",
|
|
222
|
-
|
|
257
|
+
default: "1.0.0",
|
|
258
|
+
when: function (answers) {
|
|
259
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
260
|
+
if (isNonInteractive)
|
|
261
|
+
return false;
|
|
262
|
+
return !answers['k8s_image_version'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART);
|
|
263
|
+
}
|
|
223
264
|
},
|
|
224
265
|
{
|
|
225
266
|
name: "k8s_chart_kind",
|
|
@@ -227,12 +268,18 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
227
268
|
message: "what is the chart kind?",
|
|
228
269
|
choices: ["Deployment", "StatefulSet", "CronJob"],
|
|
229
270
|
default: "Deployment",
|
|
230
|
-
when: function (
|
|
271
|
+
when: function (answers) {
|
|
272
|
+
var isNonInteractive = !!(yargs.argv['template'] && yargs.argv['name']);
|
|
273
|
+
if (isNonInteractive)
|
|
274
|
+
return false;
|
|
275
|
+
return !answers['k8s_chart_kind'] && template_specific(answers, TEMPLATE_NAME.K8S_DEPLOY_CHART);
|
|
276
|
+
}
|
|
231
277
|
},
|
|
232
278
|
/** END TEMPLATE_NAME.K8S_DEPLOY_CHART */
|
|
233
279
|
];
|
|
234
280
|
console.log("Welcome to ".concat(name, " version ").concat(version));
|
|
235
|
-
|
|
281
|
+
inputAnswers = Object.assign({}, yargs.argv);
|
|
282
|
+
return [2 /*return*/, inquirer.prompt(QUESTIONS, inputAnswers)
|
|
236
283
|
.then(function (answers) {
|
|
237
284
|
answers = Object.assign({}, answers, yargs.argv);
|
|
238
285
|
// @ts-ignore
|
|
@@ -240,16 +287,35 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
240
287
|
// @ts-ignore
|
|
241
288
|
var projectName = answers['name'];
|
|
242
289
|
// @ts-ignore
|
|
243
|
-
var author = answers['author'];
|
|
290
|
+
var author = answers['author'] || yargs.argv['author'] || "na-cli";
|
|
244
291
|
// @ts-ignore
|
|
245
|
-
var runInstall = answers['run_install'] || false;
|
|
246
|
-
var masterDbName = answers['db_master'] || "master";
|
|
292
|
+
var runInstall = answers['run_install'] || yargs.argv['install'] || false;
|
|
293
|
+
var masterDbName = answers['db_master'] || yargs.argv['db_master'] || "master";
|
|
247
294
|
var templatePath = path.join(templateDir, projectChoice);
|
|
248
|
-
var
|
|
295
|
+
var finalTargetDirectory = targetDirectory;
|
|
296
|
+
if (projectChoice === TEMPLATE_NAME.K8S_DEPLOY_CHART) {
|
|
297
|
+
var servicesChartsPath = path.join(targetDirectory, 'services', 'charts');
|
|
298
|
+
var resourcesChartsPath = path.join(targetDirectory, 'resources', 'charts');
|
|
299
|
+
var servicesPath = path.join(targetDirectory, 'services');
|
|
300
|
+
var resourcesPath = path.join(targetDirectory, 'resources');
|
|
301
|
+
if (fs.existsSync(servicesChartsPath)) {
|
|
302
|
+
finalTargetDirectory = servicesChartsPath;
|
|
303
|
+
}
|
|
304
|
+
else if (fs.existsSync(resourcesChartsPath)) {
|
|
305
|
+
finalTargetDirectory = resourcesChartsPath;
|
|
306
|
+
}
|
|
307
|
+
else if (fs.existsSync(servicesPath)) {
|
|
308
|
+
finalTargetDirectory = servicesPath;
|
|
309
|
+
}
|
|
310
|
+
else if (fs.existsSync(resourcesPath)) {
|
|
311
|
+
finalTargetDirectory = resourcesPath;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
var targetPath = path.join(finalTargetDirectory, projectName);
|
|
249
315
|
var templateConfig = getTemplateConfig(templatePath);
|
|
250
316
|
var k8sChartParams = getK8sDeployChartParams(answers);
|
|
251
317
|
var nestjsApiParams = getNestJsApiParams(answers);
|
|
252
|
-
var params = __assign(__assign({ masterDbName: masterDbName }, k8sChartParams), nestjsApiParams);
|
|
318
|
+
var params = __assign(__assign(__assign({ masterDbName: masterDbName }, k8sChartParams), nestjsApiParams), { k8s_image_name: answers['k8s_image_name'] || yargs.argv['k8s_image_name'] || "bitnami/kafka", k8s_image_version: answers['k8s_image_version'] || yargs.argv['k8s_image_version'] || "1.0.0", k8s_chart_kind: answers['k8s_chart_kind'] || yargs.argv['k8s_chart_kind'] || "Deployment", k8s_chart_registry_region: answers['k8s_chart_registry_region'] || yargs.argv['k8s_chart_registry_region'] || "ap-southeast-3", k8s_chart_aws_account_id: answers['k8s_chart_aws_account_id'] || yargs.argv['k8s_chart_aws_account_id'] || "123456789" });
|
|
253
319
|
var options = {
|
|
254
320
|
projectName: projectName,
|
|
255
321
|
templateName: projectChoice,
|
|
@@ -260,7 +326,7 @@ function generateTemplate(templateDir, targetDirectory) {
|
|
|
260
326
|
if (!createProject(targetPath)) {
|
|
261
327
|
return;
|
|
262
328
|
}
|
|
263
|
-
createDirectoryContents(
|
|
329
|
+
createDirectoryContents(finalTargetDirectory, templatePath, projectName, templateConfig, author, params);
|
|
264
330
|
if (runInstall && !postProcess(options)) {
|
|
265
331
|
return;
|
|
266
332
|
}
|
|
@@ -363,32 +429,41 @@ function createDirectoryContents(targetDirectory, projectTemplatePath, projectNa
|
|
|
363
429
|
function getK8sDeployChartParams(answer) {
|
|
364
430
|
var params = {};
|
|
365
431
|
// @ts-ignore
|
|
366
|
-
var projectChoice = answer['template'];
|
|
367
|
-
if (projectChoice != TEMPLATE_NAME.K8S_DEPLOY_CHART
|
|
432
|
+
var projectChoice = answer['template'] || yargs.argv['template'];
|
|
433
|
+
if (projectChoice != TEMPLATE_NAME.K8S_DEPLOY_CHART) {
|
|
368
434
|
return params;
|
|
369
435
|
}
|
|
370
|
-
|
|
371
|
-
|
|
436
|
+
var registryHost = answer['k8s_chart_registry_host'] || yargs.argv['k8s_chart_registry_host'];
|
|
437
|
+
var region = answer['k8s_chart_registry_region'] || yargs.argv['k8s_chart_registry_region'] || "ap-southeast-3";
|
|
438
|
+
var imageName = answer['k8s_image_name'] || yargs.argv['k8s_image_name'] || "bitnami/kafka";
|
|
439
|
+
var awsId = answer['k8s_chart_aws_account_id'] || yargs.argv['k8s_chart_aws_account_id'] || "123456789";
|
|
440
|
+
var customHost = answer['k8s_chart_custom_registry_host'] || yargs.argv['k8s_chart_custom_registry_host'];
|
|
441
|
+
if (registryHost == K8S_REGISTRY_HOST.ALIYUN) {
|
|
442
|
+
params.containerRegistry = "registry-intl.".concat(region, ".aliyuncs.com/").concat(imageName);
|
|
372
443
|
}
|
|
373
|
-
else if (
|
|
374
|
-
params.containerRegistry = "".concat(
|
|
444
|
+
else if (registryHost == K8S_REGISTRY_HOST.AWS) {
|
|
445
|
+
params.containerRegistry = "".concat(awsId.replace("-", ""), ".dkr.ecr.").concat(region, ".amazonaws.com/").concat(imageName);
|
|
375
446
|
}
|
|
376
|
-
else if (
|
|
377
|
-
params.containerRegistry = "".concat(
|
|
447
|
+
else if (registryHost == K8S_REGISTRY_HOST.CUSTOM) {
|
|
448
|
+
params.containerRegistry = "".concat(customHost, "/").concat(imageName);
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
// Fallback for Dockerhub or unspecified
|
|
452
|
+
params.containerRegistry = imageName;
|
|
378
453
|
}
|
|
379
|
-
params.chartName = answer.name;
|
|
380
|
-
params.containerVersion = answer.k8s_image_version;
|
|
381
|
-
params.chartKind = answer.k8s_chart_kind;
|
|
454
|
+
params.chartName = answer.name || yargs.argv['name'];
|
|
455
|
+
params.containerVersion = answer.k8s_image_version || yargs.argv['k8s_image_version'] || "1.0.0";
|
|
456
|
+
params.chartKind = answer.k8s_chart_kind || yargs.argv['k8s_chart_kind'] || "Deployment";
|
|
382
457
|
return params;
|
|
383
458
|
}
|
|
384
459
|
function getNestJsApiParams(answer) {
|
|
385
460
|
var params = {};
|
|
386
461
|
// @ts-ignore
|
|
387
|
-
var projectChoice = answer['template'];
|
|
388
|
-
if (projectChoice != TEMPLATE_NAME.NESTJS_API
|
|
462
|
+
var projectChoice = answer['template'] || yargs.argv['template'];
|
|
463
|
+
if (projectChoice != TEMPLATE_NAME.NESTJS_API) {
|
|
389
464
|
return params;
|
|
390
465
|
}
|
|
391
|
-
params.nestjsPlatform = answer.nestjs_api_platform;
|
|
466
|
+
params.nestjsPlatform = answer.nestjs_api_platform || yargs.argv['nestjs_api_platform'] || NESTJS_API_PLATFORM.FASTIFY;
|
|
392
467
|
var isFastify = params.nestjsPlatform == NESTJS_API_PLATFORM.FASTIFY;
|
|
393
468
|
params.isFastify = isFastify;
|
|
394
469
|
return params;
|