@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
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import { describe, it } from 'mocha';
|
|
4
|
-
import chai, { expect } from 'chai';
|
|
5
|
-
import chaihttp from 'chai-http';
|
|
6
|
-
|
|
7
|
-
import HubService, { User, goodRet, mxwServiceUrl, serviceUrl, challengeIt, badRet } from "./hub";
|
|
8
|
-
import { toUtf8Bytes, sortObject, hexlify } from 'mxw-libs-utils';
|
|
9
|
-
import { utils, Wallet, auth } from 'mxw-sdk-js';
|
|
10
|
-
import { JsonRpcProvider } from 'mxw-sdk-js/dist/providers';
|
|
11
|
-
import moment from "moment";
|
|
12
|
-
import { throwError, errors } from 'mxw-libs-errors';
|
|
13
|
-
|
|
14
|
-
chai.use(chaihttp);
|
|
15
|
-
|
|
16
|
-
let indent = " ";
|
|
17
|
-
let silent = false;
|
|
18
|
-
|
|
19
|
-
export function createContract(user: User, wallet: Wallet, others: User[], challenge: boolean) {
|
|
20
|
-
describe('Suite: Contract: ' + user.code, function () {
|
|
21
|
-
let contract: {
|
|
22
|
-
objId?: number,
|
|
23
|
-
parentId?: number,
|
|
24
|
-
category: string,
|
|
25
|
-
name: string,
|
|
26
|
-
refNo: string,
|
|
27
|
-
validFrom: string,
|
|
28
|
-
validTo: string,
|
|
29
|
-
reminder: string
|
|
30
|
-
} = {
|
|
31
|
-
parentId: 0,
|
|
32
|
-
category: "1",
|
|
33
|
-
name: "CTR" + hexlify(utils.randomBytes(4)).substr(2),
|
|
34
|
-
refNo: "BOT/" + hexlify(utils.randomBytes(2)).substr(2) + "/" +
|
|
35
|
-
hexlify(utils.randomBytes(2)).substr(2) + "/" +
|
|
36
|
-
hexlify(utils.randomBytes(2)).substr(2) + "/" +
|
|
37
|
-
hexlify(utils.randomBytes(2)).substr(2),
|
|
38
|
-
validFrom: moment().utc().format("YYYY-MM-DD HH:mm:ss"),
|
|
39
|
-
validTo: moment().utc().add(3, "days").format("YYYY-MM-DD HH:mm:ss"),
|
|
40
|
-
reminder: moment().utc().add(2, "days").format("YYYY-MM-DD HH:mm:ss")
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// challenge = true; // TODO
|
|
44
|
-
|
|
45
|
-
it("Query contract template", function () {
|
|
46
|
-
return chai.request(serviceUrl("/contract/api")).get("/getContract")
|
|
47
|
-
.type("application/json")
|
|
48
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
49
|
-
.query({
|
|
50
|
-
listType: 4
|
|
51
|
-
})
|
|
52
|
-
.then((res) => {
|
|
53
|
-
console.log(res.body)
|
|
54
|
-
goodRet(res);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
challengeIt("Create contract", function (params) {
|
|
59
|
-
return chai.request(serviceUrl("/contract/api")).post("/initContract")
|
|
60
|
-
.type("application/json")
|
|
61
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
62
|
-
.send(params)
|
|
63
|
-
.then((res) => {
|
|
64
|
-
badRet(res);
|
|
65
|
-
});
|
|
66
|
-
}, {
|
|
67
|
-
orgId: null,
|
|
68
|
-
category: null,
|
|
69
|
-
name: null,
|
|
70
|
-
parentId: null
|
|
71
|
-
}, challenge);
|
|
72
|
-
|
|
73
|
-
if (challenge) {
|
|
74
|
-
it("Create contract - challenge without JWT", function () {
|
|
75
|
-
return chai.request(serviceUrl("/contract/api")).post("/initContract")
|
|
76
|
-
.type("application/json")
|
|
77
|
-
.send({
|
|
78
|
-
orgId: 0,
|
|
79
|
-
category: contract.category,
|
|
80
|
-
name: contract.name,
|
|
81
|
-
parentId: contract.parentId
|
|
82
|
-
})
|
|
83
|
-
.then((res) => {
|
|
84
|
-
badRet(res, "Unauthorised");
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
it("Create contract", function () {
|
|
90
|
-
return chai.request(serviceUrl("/contract/api")).post("/initContract")
|
|
91
|
-
.type("application/json")
|
|
92
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
93
|
-
.send({
|
|
94
|
-
orgId: 0,
|
|
95
|
-
category: contract.category,
|
|
96
|
-
name: contract.name,
|
|
97
|
-
parentId: contract.parentId
|
|
98
|
-
})
|
|
99
|
-
.then((res) => {
|
|
100
|
-
console.log(res.body)
|
|
101
|
-
goodRet(res);
|
|
102
|
-
expect(res.body).have.property("data").property("objId").is.a("number").greaterThan(0);
|
|
103
|
-
|
|
104
|
-
contract.objId = res.body.data.objId;
|
|
105
|
-
if (!HubService.Instance.silent || !silent) { console.log(indent, "Created contract", contract.objId + ":", contract.name) }
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
if (challenge) {
|
|
110
|
-
it("Update contract - challenge without JWT", function () {
|
|
111
|
-
return chai.request(serviceUrl("/contract/api")).post("/setContract")
|
|
112
|
-
.type("application/json")
|
|
113
|
-
.send({
|
|
114
|
-
objId: contract.objId,
|
|
115
|
-
orgId: 0,
|
|
116
|
-
category: contract.category,
|
|
117
|
-
name: contract.name,
|
|
118
|
-
parentId: contract.parentId,
|
|
119
|
-
refNo: contract.refNo,
|
|
120
|
-
header: null,
|
|
121
|
-
title: null,
|
|
122
|
-
content: null,
|
|
123
|
-
footer: null,
|
|
124
|
-
validFrom: contract.validFrom,
|
|
125
|
-
validTo: contract.validTo,
|
|
126
|
-
mint: "1",
|
|
127
|
-
amendable: "1000000",
|
|
128
|
-
view: "0",
|
|
129
|
-
notes: "Believe me I am very honest " + user.username,
|
|
130
|
-
renewal: 1,
|
|
131
|
-
reminder: contract.reminder,
|
|
132
|
-
submitFlag: "1"
|
|
133
|
-
})
|
|
134
|
-
.then((res) => {
|
|
135
|
-
badRet(res, "Unauthorised");
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it("Update contract - challenge contract not belong to me", function () {
|
|
140
|
-
return chai.request(serviceUrl("/contract/api")).post("/setContract")
|
|
141
|
-
.type("application/json")
|
|
142
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
143
|
-
.send({
|
|
144
|
-
objId: 0,
|
|
145
|
-
orgId: 0,
|
|
146
|
-
category: contract.category,
|
|
147
|
-
name: contract.name,
|
|
148
|
-
parentId: contract.parentId,
|
|
149
|
-
refNo: contract.refNo,
|
|
150
|
-
header: null,
|
|
151
|
-
title: null,
|
|
152
|
-
content: null,
|
|
153
|
-
footer: null,
|
|
154
|
-
validFrom: contract.validFrom,
|
|
155
|
-
validTo: contract.validTo,
|
|
156
|
-
mint: "1",
|
|
157
|
-
amendable: "1000000",
|
|
158
|
-
view: "0",
|
|
159
|
-
notes: "Believe me I am very honest " + user.username,
|
|
160
|
-
renewal: 1,
|
|
161
|
-
reminder: contract.reminder,
|
|
162
|
-
submitFlag: "1"
|
|
163
|
-
})
|
|
164
|
-
.then((res) => {
|
|
165
|
-
badRet(res, "1002");
|
|
166
|
-
|
|
167
|
-
if ("1002" == res.body.ret) {
|
|
168
|
-
console.log("\x1b[33m%s", indent, "WARNING: This error handler is required to patch.", "\x1b[0m");
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
console.log("\x1b[33m%s", indent, "WARNING: Special error handler is required to remove.", "\x1b[0m");
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
it("Update draft contract", function () {
|
|
178
|
-
return chai.request(serviceUrl("/contract/api")).post("/setContract")
|
|
179
|
-
.type("application/json")
|
|
180
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
181
|
-
.send({
|
|
182
|
-
objId: contract.objId,
|
|
183
|
-
orgId: 0,
|
|
184
|
-
category: contract.category,
|
|
185
|
-
name: contract.name,
|
|
186
|
-
parentId: contract.parentId,
|
|
187
|
-
refNo: contract.refNo,
|
|
188
|
-
header: null,
|
|
189
|
-
title: null,
|
|
190
|
-
content: null,
|
|
191
|
-
footer: null,
|
|
192
|
-
validFrom: contract.validFrom,
|
|
193
|
-
validTo: contract.validTo,
|
|
194
|
-
mint: "1",
|
|
195
|
-
amendable: "1000000",
|
|
196
|
-
view: "0",
|
|
197
|
-
notes: "Hello, I am testBot " + user.username,
|
|
198
|
-
renewal: 1,
|
|
199
|
-
reminder: contract.reminder,
|
|
200
|
-
tags: [],
|
|
201
|
-
submitFlag: "0"
|
|
202
|
-
})
|
|
203
|
-
.then((res) => {
|
|
204
|
-
goodRet(res);
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
it("Verify draft contract info", function () {
|
|
209
|
-
return chai.request(serviceUrl("/contract/api")).get("/getContract")
|
|
210
|
-
.type("application/json")
|
|
211
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
212
|
-
.query({
|
|
213
|
-
objId: contract.objId,
|
|
214
|
-
})
|
|
215
|
-
.then((res) => {
|
|
216
|
-
console.log(res.body)
|
|
217
|
-
goodRet(res);
|
|
218
|
-
expect(res.body).have.property("data").property("objId").is.a("number").eq(contract.objId);
|
|
219
|
-
expect(res.body).have.property("data").property("name").is.a("string").eq(contract.name);
|
|
220
|
-
expect(res.body).have.property("data").property("refNo").is.a("string").eq(contract.refNo);
|
|
221
|
-
expect(res.body).have.property("data").property("validFrom").is.a("string").lengthOf.greaterThan(0);
|
|
222
|
-
expect(res.body).have.property("data").property("validTo").is.a("string").lengthOf.greaterThan(0);
|
|
223
|
-
expect(res.body).have.property("data").property("reminder").is.a("string").satisfy(function (value) {
|
|
224
|
-
let dt = moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
225
|
-
if (dt == contract.reminder) {
|
|
226
|
-
return true;
|
|
227
|
-
}
|
|
228
|
-
throwError(errors.MISMATCHED, "Mismatched reminder date " + dt, { expected: contract.reminder, value: dt });
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
it("Set contract user role", function () {
|
|
234
|
-
let parties = [];
|
|
235
|
-
|
|
236
|
-
for (let party of others) {
|
|
237
|
-
parties.push({
|
|
238
|
-
access: 255,
|
|
239
|
-
flag: 1,
|
|
240
|
-
orgId: 0,
|
|
241
|
-
role: 12, // 12: signer
|
|
242
|
-
email: party.email
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
parties.push({
|
|
247
|
-
access: 255,
|
|
248
|
-
flag: 1,
|
|
249
|
-
orgId: 0,
|
|
250
|
-
role: 12, // 12: signer
|
|
251
|
-
email: user.email
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
return chai.request(serviceUrl("/contract/api")).post("/setUserRole")
|
|
255
|
-
.type("application/json")
|
|
256
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
257
|
-
.send({
|
|
258
|
-
objId: contract.objId,
|
|
259
|
-
orgId: 0,
|
|
260
|
-
order: 1, // 1 = sequence or 2 = parallel
|
|
261
|
-
signerData: parties
|
|
262
|
-
})
|
|
263
|
-
.then((res) => {
|
|
264
|
-
console.log(res.body)
|
|
265
|
-
goodRet(res);
|
|
266
|
-
|
|
267
|
-
if (!HubService.Instance.silent || !silent) { console.log(indent, "Contract user role", contract.objId + ":", JSON.stringify(parties)) }
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
it("Verify contract user role", function () {
|
|
272
|
-
return chai.request(serviceUrl("/contract/api")).get("/getContract")
|
|
273
|
-
.type("application/json")
|
|
274
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
275
|
-
.query({
|
|
276
|
-
objId: contract.objId,
|
|
277
|
-
})
|
|
278
|
-
.then((res) => {
|
|
279
|
-
console.log(res.body)
|
|
280
|
-
goodRet(res);
|
|
281
|
-
expect(res.body).have.property("data").property("objId").is.a("number").eq(contract.objId);
|
|
282
|
-
expect(res.body).have.property("data").property("name").is.a("string").eq(contract.name);
|
|
283
|
-
expect(res.body).have.property("data").property("refNo").is.a("string").eq(contract.refNo);
|
|
284
|
-
expect(res.body).have.property("data").property("validFrom").is.a("string").lengthOf.greaterThan(0);
|
|
285
|
-
expect(res.body).have.property("data").property("validTo").is.a("string").lengthOf.greaterThan(0);
|
|
286
|
-
expect(res.body).have.property("data").property("reminder").is.a("string").satisfy(function (value) {
|
|
287
|
-
let dt = moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
288
|
-
if (dt == contract.reminder) {
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
throwError(errors.MISMATCHED, "Mismatched reminder date " + dt, { expected: contract.reminder, value: dt });
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it("Submit contract", function () {
|
|
297
|
-
return chai.request(serviceUrl("/contract/api")).post("/setContract")
|
|
298
|
-
.type("application/json")
|
|
299
|
-
.set("Authorization", "Bearer " + user.jwt)
|
|
300
|
-
.send({
|
|
301
|
-
objId: contract.objId,
|
|
302
|
-
orgId: 0,
|
|
303
|
-
category: contract.category,
|
|
304
|
-
name: contract.name,
|
|
305
|
-
parentId: contract.parentId,
|
|
306
|
-
refNo: contract.refNo,
|
|
307
|
-
header: null,
|
|
308
|
-
title: null,
|
|
309
|
-
content: null,
|
|
310
|
-
footer: null,
|
|
311
|
-
validFrom: contract.validFrom,
|
|
312
|
-
validTo: contract.validTo,
|
|
313
|
-
mint: "1",
|
|
314
|
-
amendable: "1000000",
|
|
315
|
-
view: "0",
|
|
316
|
-
notes: "Hello, I am testBot " + user.username,
|
|
317
|
-
renewal: 1,
|
|
318
|
-
reminder: contract.reminder,
|
|
319
|
-
tags: [],
|
|
320
|
-
submitFlag: "1"
|
|
321
|
-
})
|
|
322
|
-
.then((res) => {
|
|
323
|
-
console.log(res.body)
|
|
324
|
-
goodRet(res);
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
}
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import { describe, it } from 'mocha';
|
|
4
|
-
import chai, { expect } from 'chai';
|
|
5
|
-
import chaihttp from 'chai-http';
|
|
6
|
-
import request from "request";
|
|
7
|
-
|
|
8
|
-
import HubService, { User, challengeIt, goodRet, badRet, getActivationToken, goodRes, mxwServiceUrl, uploadOSS, mxwV1ServiceUrl } from "./hub";
|
|
9
|
-
import { hexlify, isUndefinedOrNullOrEmpty } from 'mxw-libs-utils';
|
|
10
|
-
import { utils } from 'mxw-sdk-js';
|
|
11
|
-
|
|
12
|
-
chai.use(chaihttp);
|
|
13
|
-
|
|
14
|
-
let indent = " ";
|
|
15
|
-
|
|
16
|
-
export enum KYC_PROVIDER_ID {
|
|
17
|
-
MANUAL = 0,
|
|
18
|
-
E_KYC = 1
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export enum KYC_FLOW_ID {
|
|
22
|
-
MANUAL = "Manual",
|
|
23
|
-
AUTO = "Auto"
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export enum KYC_STATUS {
|
|
27
|
-
PENDING = 0,
|
|
28
|
-
APPROVED = 1,
|
|
29
|
-
SUSPENDED = 2,
|
|
30
|
-
TERMINATED = 3,
|
|
31
|
-
REJECTED = 4,
|
|
32
|
-
BLACKLISTED = 7,
|
|
33
|
-
EXPIRED = 9,
|
|
34
|
-
SUBMITTED = 10,
|
|
35
|
-
VERIFIED = 11,
|
|
36
|
-
PENDING_PAYMENT = 13,
|
|
37
|
-
IN_REVIEW = 18,
|
|
38
|
-
ALERT = 19,
|
|
39
|
-
REVOKED = 21,
|
|
40
|
-
REVOKE_APPROVED = 23,
|
|
41
|
-
RELEASED = 31,
|
|
42
|
-
RELEASE_VERIFIED = 32,
|
|
43
|
-
RELEASE_APPROVED = 33,
|
|
44
|
-
ERROR = 99
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export enum KYC_TYPE_ID {
|
|
48
|
-
NATIONAL_ID = 1,
|
|
49
|
-
MILITARY_OFFICER_CARD = 2,
|
|
50
|
-
PASSPORT = 3,
|
|
51
|
-
RESIDENT_PASS = 4,
|
|
52
|
-
DRIVING_LICENCE = 9,
|
|
53
|
-
COMPANY_REGISTRATION = 11,
|
|
54
|
-
OTHERS = 99
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
let kycType: {
|
|
58
|
-
[id: string]: {
|
|
59
|
-
typeId: KYC_TYPE_ID,
|
|
60
|
-
typeName: string
|
|
61
|
-
}
|
|
62
|
-
} = {
|
|
63
|
-
"1": { typeId: KYC_TYPE_ID.NATIONAL_ID, typeName: "National ID" },
|
|
64
|
-
"2": { typeId: KYC_TYPE_ID.MILITARY_OFFICER_CARD, typeName: "Military Officer Card" },
|
|
65
|
-
"3": { typeId: KYC_TYPE_ID.PASSPORT, typeName: "Passport" },
|
|
66
|
-
"4": { typeId: KYC_TYPE_ID.RESIDENT_PASS, typeName: "Resident Pass" },
|
|
67
|
-
"9": { typeId: KYC_TYPE_ID.DRIVING_LICENCE, typeName: "Driving Licence" },
|
|
68
|
-
"11": { typeId: KYC_TYPE_ID.COMPANY_REGISTRATION, typeName: "Company Registration" },
|
|
69
|
-
"99": { typeId: KYC_TYPE_ID.OTHERS, typeName: "Others" }
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function kycByType(user: User, idType: KYC_TYPE_ID, flow: KYC_FLOW_ID, challenge: boolean) {
|
|
73
|
-
describe('Suite: Individual ' + flow + " KYC: " + user.code + " (" + user.email + ")", function () {
|
|
74
|
-
let kycProviderUrl: string;
|
|
75
|
-
let kycProviderId: number;
|
|
76
|
-
let idImgFrontUrl: string;
|
|
77
|
-
let imgLiveUrl: string;
|
|
78
|
-
let alertFlag: number;
|
|
79
|
-
|
|
80
|
-
it("Get KYC provider id", function () {
|
|
81
|
-
let url = mxwServiceUrl("/provider/kyc/v2");
|
|
82
|
-
|
|
83
|
-
return chai.request(url).get("/getProviderId")
|
|
84
|
-
.type("application/json")
|
|
85
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
86
|
-
.query({
|
|
87
|
-
country: user.profile.country,
|
|
88
|
-
identityType: idType
|
|
89
|
-
})
|
|
90
|
-
.then((res) => {
|
|
91
|
-
goodRet(res);
|
|
92
|
-
expect(res.body).have.property("data").property("providerId").is.a("number").to.be.oneOf([
|
|
93
|
-
KYC_PROVIDER_ID.MANUAL,
|
|
94
|
-
KYC_PROVIDER_ID.E_KYC
|
|
95
|
-
]);
|
|
96
|
-
kycProviderId = res.body.data.providerId as number;
|
|
97
|
-
|
|
98
|
-
expect(res.body).have.property("data").property("config").property("url").is.a("string").lengthOf.greaterThan(0);
|
|
99
|
-
kycProviderUrl = res.body.data.config.url;
|
|
100
|
-
|
|
101
|
-
if (KYC_PROVIDER_ID.E_KYC == kycProviderId) {
|
|
102
|
-
expect(res.body).have.property("data").property("idAuto").is.a("number").is.gte(0).and.is.lte(1);
|
|
103
|
-
expect(res.body).have.property("data").property("idReject").is.a("number").is.gte(0).and.is.lte(1);
|
|
104
|
-
expect(res.body).have.property("data").property("idLiveness").is.a("number").is.gte(0).and.is.lte(1);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (!HubService.Instance.silent) { console.log(indent, "KYC provider id:", kycProviderId, "@", kycProviderUrl) }
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it("Get supported document id type", function () {
|
|
112
|
-
return chai.request(kycProviderUrl).get("/getIdType")
|
|
113
|
-
.type("application/json")
|
|
114
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
115
|
-
.then((res) => {
|
|
116
|
-
goodRet(res);
|
|
117
|
-
expect(res.body).have.property("data").is.an("array").lengthOf.greaterThan(0);
|
|
118
|
-
expect(res.body).have.property("data").to.include.deep.members([
|
|
119
|
-
kycType[idType]
|
|
120
|
-
]);
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it("Get KYC info", function () {
|
|
125
|
-
return chai.request(kycProviderUrl).get("/getKycInfo")
|
|
126
|
-
.type("application/json")
|
|
127
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
128
|
-
.query({
|
|
129
|
-
kycId: user.kyc.kycId
|
|
130
|
-
})
|
|
131
|
-
.then((res) => {
|
|
132
|
-
goodRet(res);
|
|
133
|
-
expect(res.body).have.property("data").property("kycId").is.a("number").is.eq(user.kyc.kycId);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
it("Pre-check", function () {
|
|
138
|
-
let url = mxwV1ServiceUrl("/provider/kyc-proxy/v1");
|
|
139
|
-
|
|
140
|
-
return chai.request(url).post("/precheckEx")
|
|
141
|
-
.type("application/json")
|
|
142
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
143
|
-
.set("app-id", String(HubService.Instance.appId))
|
|
144
|
-
.send({
|
|
145
|
-
kycId: user.kyc.kycId,
|
|
146
|
-
idType,
|
|
147
|
-
country: user.profile.country,
|
|
148
|
-
idNo: user.username
|
|
149
|
-
})
|
|
150
|
-
.then((res) => {
|
|
151
|
-
goodRet(res);
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it("Upload document front image", function () {
|
|
156
|
-
let params = {
|
|
157
|
-
actionType: "FRONT",
|
|
158
|
-
kycId: user.kyc.kycId
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
return uploadOSS(user, kycProviderUrl, "/preupload", params, __dirname + "/resources/mykad_front.jpg", "image/png").then((readUrl) => {
|
|
162
|
-
idImgFrontUrl = readUrl;
|
|
163
|
-
if (!HubService.Instance.silent) { console.log(indent, "KYC uploaded document front image:", idImgFrontUrl) }
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it("Process OCR document front image", function () {
|
|
168
|
-
this.timeout(60000);
|
|
169
|
-
|
|
170
|
-
let params = {
|
|
171
|
-
providerId: kycProviderId,
|
|
172
|
-
kycId: user.kyc.kycId,
|
|
173
|
-
country: user.profile.country,
|
|
174
|
-
idType,
|
|
175
|
-
userData: {
|
|
176
|
-
dob: user.profile.dob,
|
|
177
|
-
gender: user.profile.gender,
|
|
178
|
-
idName: user.username,
|
|
179
|
-
idNo: user.username,
|
|
180
|
-
religion: user.profile.religion,
|
|
181
|
-
address: user.profile.address.value,
|
|
182
|
-
street: user.profile.address.street,
|
|
183
|
-
postcode: user.profile.address.postcode,
|
|
184
|
-
city: user.profile.address.city,
|
|
185
|
-
state: user.profile.address.state,
|
|
186
|
-
province: user.profile.address.province,
|
|
187
|
-
country: user.profile.address.country
|
|
188
|
-
},
|
|
189
|
-
ocrData: null
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (KYC_FLOW_ID.AUTO == flow) {
|
|
193
|
-
params.ocrData = {
|
|
194
|
-
dob: user.profile.dob,
|
|
195
|
-
gender: user.profile.gender,
|
|
196
|
-
idName: user.username + (user.kyc.ocrAlter ? "X" : ""),
|
|
197
|
-
idNo: user.username,
|
|
198
|
-
religion: user.profile.religion,
|
|
199
|
-
address: user.profile.address.value,
|
|
200
|
-
street: user.profile.address.street,
|
|
201
|
-
postcode: user.profile.address.postcode,
|
|
202
|
-
city: user.profile.address.city,
|
|
203
|
-
state: user.profile.address.state,
|
|
204
|
-
province: user.profile.address.province,
|
|
205
|
-
country: user.profile.address.country
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return chai.request(kycProviderUrl).post("/iDVerifyOcr")
|
|
210
|
-
.type("application/json")
|
|
211
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
212
|
-
.set("app-id", String(HubService.Instance.appId))
|
|
213
|
-
.send(params)
|
|
214
|
-
.then((res) => {
|
|
215
|
-
goodRet(res);
|
|
216
|
-
expect(res.body).have.property("data").property("userData");
|
|
217
|
-
expect(res.body).have.property("data").property("ocrFlag").is.a("number");
|
|
218
|
-
expect(res.body).have.property("data").property("alertFlag").is.a("number");
|
|
219
|
-
|
|
220
|
-
alertFlag = res.body.data.alertFlag;
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
it("Upload live image", function () {
|
|
225
|
-
let params = {
|
|
226
|
-
actionType: "LIVE",
|
|
227
|
-
kycId: user.kyc.kycId
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
return uploadOSS(user, kycProviderUrl, "/preupload", params, __dirname + "/resources/live.jpg", "image/png").then((readUrl) => {
|
|
231
|
-
imgLiveUrl = readUrl;
|
|
232
|
-
if (!HubService.Instance.silent) { console.log(indent, "KYC uploaded live image:", imgLiveUrl) }
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
it("Submission", function () {
|
|
237
|
-
this.timeout(60000);
|
|
238
|
-
|
|
239
|
-
return chai.request(kycProviderUrl).post("/kycSubmit")
|
|
240
|
-
.type("application/json")
|
|
241
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
242
|
-
.set("app-id", String(HubService.Instance.appId))
|
|
243
|
-
.send({
|
|
244
|
-
providerId: kycProviderId,
|
|
245
|
-
kycId: user.kyc.kycId,
|
|
246
|
-
alertFlag
|
|
247
|
-
})
|
|
248
|
-
.then((res) => {
|
|
249
|
-
goodRet(res);
|
|
250
|
-
expect(res.body).have.property("data").property("kycStatus").is.a("number");
|
|
251
|
-
|
|
252
|
-
user.kyc.status = res.body.data.kycStatus;
|
|
253
|
-
if (!HubService.Instance.silent) { console.log(indent, "KYC status:", user.kyc.status) }
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
it("Verify KYC info", function () {
|
|
258
|
-
return chai.request(kycProviderUrl).get("/getKycInfo")
|
|
259
|
-
.type("application/json")
|
|
260
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
261
|
-
.query({
|
|
262
|
-
kycId: user.kyc.kycId
|
|
263
|
-
})
|
|
264
|
-
.then((res) => {
|
|
265
|
-
goodRet(res);
|
|
266
|
-
expect(res.body).have.property("data").property("kycId").is.a("number").is.eq(user.kyc.kycId);
|
|
267
|
-
expect(res.body).have.property("data").property("country").is.a("string").is.eq(user.profile.country);
|
|
268
|
-
expect(res.body).have.property("data").property("gender").is.a("string").is.eq(user.profile.gender);
|
|
269
|
-
expect(res.body).have.property("data").property("idType").is.a("number").is.eq(user.kyc.idType);
|
|
270
|
-
expect(res.body).have.property("data").property("fullName").is.a("string").is.eq(user.username);
|
|
271
|
-
expect(res.body).have.property("data").property("idNo").is.a("string").is.eq(user.username);
|
|
272
|
-
expect(res.body).have.property("data").property("dob").is.a("number").is.eq(user.profile.dob);
|
|
273
|
-
expect(res.body).have.property("data").property("providerId").is.a("number").is.eq(kycProviderId);
|
|
274
|
-
expect(res.body).have.property("data").property("kycStatus").is.a("number").is.eq(user.kyc.status);
|
|
275
|
-
expect(res.body).have.property("data").property("frontId").is.a("string").is.not.empty;
|
|
276
|
-
expect(res.body).have.property("data").property("liveness").is.a("string").is.not.empty;
|
|
277
|
-
expect(res.body).have.property("data").property("address").is.a("string").is.eq(user.profile.address.value);
|
|
278
|
-
expect(res.body).have.property("data").property("postcode").is.a("string").is.eq(user.profile.address.postcode);
|
|
279
|
-
expect(res.body).have.property("data").property("province").is.a("string").is.eq(user.profile.address.province);
|
|
280
|
-
expect(res.body).have.property("data").property("city").is.a("string").is.eq(user.profile.address.city);
|
|
281
|
-
expect(res.body).have.property("data").property("frontIdImg").is.a("string").is.not.empty;
|
|
282
|
-
expect(res.body).have.property("data").property("liveImg").is.a("string").is.not.empty;
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
it("re-submission", function () {
|
|
287
|
-
this.timeout(60000);
|
|
288
|
-
|
|
289
|
-
return chai.request(kycProviderUrl).post("/kycSubmit")
|
|
290
|
-
.type("application/json")
|
|
291
|
-
.set("Authorization", "Bearer " + user.mxwJwt)
|
|
292
|
-
.set("app-id", String(HubService.Instance.appId))
|
|
293
|
-
.send({
|
|
294
|
-
providerId: kycProviderId,
|
|
295
|
-
kycId: user.kyc.kycId,
|
|
296
|
-
alertFlag
|
|
297
|
-
})
|
|
298
|
-
.then((res) => {
|
|
299
|
-
badRet(res);
|
|
300
|
-
});
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
});
|
|
304
|
-
}
|