create-pubinfo 2.0.0-rc.3 → 2.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/index.js +201 -157
  2. package/package.json +5 -1
  3. package/templates/{pubinfo-template → pubinfo-app}/.env +0 -3
  4. package/templates/{pubinfo-template → pubinfo-app}/_gitignore +1 -0
  5. package/templates/{pubinfo-template/openapi.config.ts → pubinfo-app/openapi.config.ts.hbs} +1 -1
  6. package/templates/{pubinfo-template/package.json → pubinfo-app/package.json.hbs} +12 -7
  7. package/templates/pubinfo-app/src/settings.ts.hbs +8 -0
  8. package/templates/pubinfo-module/.editorconfig +10 -0
  9. package/templates/pubinfo-module/README.md.hbs +27 -0
  10. package/templates/pubinfo-module/_gitignore +38 -0
  11. package/templates/pubinfo-module/_npmrc +5 -0
  12. package/templates/pubinfo-module/eslint.config.ts +3 -0
  13. package/templates/pubinfo-module/package.json.hbs +67 -0
  14. package/templates/pubinfo-module/playground/.env +2 -0
  15. package/templates/pubinfo-module/playground/.env.development +6 -0
  16. package/templates/pubinfo-module/playground/.env.production +10 -0
  17. package/templates/pubinfo-module/playground/index.html +47 -0
  18. package/templates/pubinfo-module/playground/openapi.config.ts.hbs +33 -0
  19. package/templates/pubinfo-module/playground/package.json.hbs +22 -0
  20. package/templates/pubinfo-module/playground/pubinfo.config.ts +9 -0
  21. package/templates/pubinfo-module/playground/public/browser_upgrade/chrome.png +0 -0
  22. package/templates/pubinfo-module/playground/public/browser_upgrade/edge.png +0 -0
  23. package/templates/pubinfo-module/playground/public/browser_upgrade/index.css +49 -0
  24. package/templates/pubinfo-module/playground/public/loading.css +92 -0
  25. package/templates/pubinfo-module/playground/src/App.vue +7 -0
  26. package/templates/pubinfo-module/playground/src/api/modules/auth/index.ts +3 -0
  27. package/templates/pubinfo-module/playground/src/api/modules/auth/renzhengfuwu.ts +145 -0
  28. package/templates/pubinfo-module/playground/src/api/modules/auth/typings.d.ts +97 -0
  29. package/templates/pubinfo-module/playground/src/api/request.ts +125 -0
  30. package/templates/pubinfo-module/playground/src/assets/icons/logo.svg +1 -0
  31. package/templates/pubinfo-module/playground/src/assets/icons/process-management.svg +1 -0
  32. package/templates/pubinfo-module/playground/src/assets/icons/workbench.svg +1 -0
  33. package/templates/pubinfo-module/playground/src/assets/images/login-bg.webp +0 -0
  34. package/templates/pubinfo-module/playground/src/assets/images/login-bg_dark.webp +0 -0
  35. package/templates/pubinfo-module/playground/src/assets/images/login-small.png +0 -0
  36. package/templates/pubinfo-module/playground/src/assets/images/login-small_dark.webp +0 -0
  37. package/templates/pubinfo-module/playground/src/components/UIProvider/index.vue +51 -0
  38. package/templates/pubinfo-module/playground/src/layouts/index.vue +44 -0
  39. package/templates/pubinfo-module/playground/src/main.ts.hbs +24 -0
  40. package/templates/pubinfo-module/playground/src/modules/auth.ts +20 -0
  41. package/templates/pubinfo-module/playground/src/modules/rbac.ts +10 -0
  42. package/templates/pubinfo-module/playground/src/routes/index.ts +71 -0
  43. package/templates/pubinfo-module/playground/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  44. package/templates/pubinfo-module/playground/src/routes/modules/demo/link.ts +15 -0
  45. package/templates/pubinfo-module/playground/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  46. package/templates/pubinfo-module/playground/src/routes/modules/demo/other.page.ts +37 -0
  47. package/templates/pubinfo-module/playground/src/routes/modules/demo/single.ts +14 -0
  48. package/templates/{pubinfo-template → pubinfo-module/playground}/src/settings.ts +1 -1
  49. package/templates/pubinfo-module/playground/src/stores/index.ts +2 -0
  50. package/templates/pubinfo-module/playground/src/stores/modules/conter.ts +16 -0
  51. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  52. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  53. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list1.vue +11 -0
  54. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list2.vue +11 -0
  55. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  56. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  57. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  58. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/page.vue +11 -0
  59. package/templates/pubinfo-module/playground/src/views/demo/other_page/des.vue +13 -0
  60. package/templates/pubinfo-module/playground/src/views/demo/other_page/index.vue +25 -0
  61. package/templates/pubinfo-module/playground/src/views/demo/preview-empty/index.vue +17 -0
  62. package/templates/pubinfo-module/playground/src/views/demo/single/index.vue +13 -0
  63. package/templates/pubinfo-module/playground/src/views/system/index.vue +5 -0
  64. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginForm.vue +29 -0
  65. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginWithPhone.vue +213 -0
  66. package/templates/pubinfo-module/playground/src/views/system/login/components/PasswordLogin.vue +194 -0
  67. package/templates/pubinfo-module/playground/src/views/system/login/components/Savephone.vue +17 -0
  68. package/templates/pubinfo-module/playground/src/views/system/login/components/Useragreement.vue +26 -0
  69. package/templates/pubinfo-module/playground/src/views/system/login/composables.ts +84 -0
  70. package/templates/pubinfo-module/playground/src/views/system/login/index.vue +142 -0
  71. package/templates/pubinfo-module/playground/tsconfig.json +3 -0
  72. package/templates/pubinfo-module/playground/uno.config.ts +17 -0
  73. package/templates/pubinfo-module/pnpm-workspace.yaml +2 -0
  74. package/templates/pubinfo-module/pubinfo.config.ts.hbs +36 -0
  75. package/templates/pubinfo-module/src/index.ts.hbs +9 -0
  76. package/templates/pubinfo-module/src/pages/demo.vue +11 -0
  77. package/templates/pubinfo-module/stylelint.config.js +3 -0
  78. package/templates/pubinfo-module/tsconfig.json +16 -0
  79. package/templates/pubinfo-module/uno.config.ts +8 -0
  80. package/templates/{pubinfo-template → pubinfo-app}/.browserslistrc +0 -0
  81. package/templates/{pubinfo-template → pubinfo-app}/.editorconfig +0 -0
  82. package/templates/{pubinfo-template → pubinfo-app}/.env.development +0 -0
  83. package/templates/{pubinfo-template → pubinfo-app}/.env.production +0 -0
  84. package/templates/{pubinfo-template → pubinfo-app}/_npmrc +0 -0
  85. package/templates/{pubinfo-template → pubinfo-app}/eslint.config.ts +0 -0
  86. package/templates/{pubinfo-template → pubinfo-app}/index.html +0 -0
  87. package/templates/{pubinfo-template → pubinfo-app}/pubinfo.config.ts +0 -0
  88. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/chrome.png +0 -0
  89. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/edge.png +0 -0
  90. package/templates/{pubinfo-template → pubinfo-app}/public/browser_upgrade/index.css +0 -0
  91. package/templates/{pubinfo-template → pubinfo-app}/public/loading.css +0 -0
  92. package/templates/{pubinfo-template → pubinfo-app}/src/App.vue +0 -0
  93. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/index.ts +0 -0
  94. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/renzhengfuwu.ts +0 -0
  95. package/templates/{pubinfo-template → pubinfo-app}/src/api/modules/auth/typings.d.ts +0 -0
  96. package/templates/{pubinfo-template → pubinfo-app}/src/api/request.ts +0 -0
  97. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/logo.svg +0 -0
  98. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/process-management.svg +0 -0
  99. package/templates/{pubinfo-template → pubinfo-app}/src/assets/icons/workbench.svg +0 -0
  100. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-bg.webp +0 -0
  101. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-bg_dark.webp +0 -0
  102. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-small.png +0 -0
  103. package/templates/{pubinfo-template → pubinfo-app}/src/assets/images/login-small_dark.webp +0 -0
  104. package/templates/{pubinfo-template → pubinfo-app}/src/components/UIProvider/index.vue +0 -0
  105. package/templates/{pubinfo-template → pubinfo-app}/src/layouts/index.vue +0 -0
  106. package/templates/{pubinfo-template → pubinfo-app}/src/main.ts +0 -0
  107. package/templates/{pubinfo-template → pubinfo-app}/src/modules/auth.ts +0 -0
  108. package/templates/{pubinfo-template → pubinfo-app}/src/modules/rbac.ts +0 -0
  109. package/templates/{pubinfo-template → pubinfo-app}/src/routes/index.ts +0 -0
  110. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/breadcrumb.example.ts +0 -0
  111. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/link.ts +0 -0
  112. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/multilevel.menu.example.ts +0 -0
  113. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/other.page.ts +0 -0
  114. package/templates/{pubinfo-template → pubinfo-app}/src/routes/modules/demo/single.ts +0 -0
  115. package/templates/{pubinfo-template → pubinfo-app}/src/stores/index.ts +0 -0
  116. package/templates/{pubinfo-template → pubinfo-app}/src/stores/modules/conter.ts +0 -0
  117. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/detail1.vue +0 -0
  118. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/detail2.vue +0 -0
  119. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/list1.vue +0 -0
  120. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/breadcrumb_example/list2.vue +0 -0
  121. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +0 -0
  122. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +0 -0
  123. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/level2/page.vue +0 -0
  124. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/multilevel_menu_example/page.vue +0 -0
  125. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/other_page/des.vue +0 -0
  126. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/other_page/index.vue +0 -0
  127. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/preview-empty/index.vue +0 -0
  128. package/templates/{pubinfo-template → pubinfo-app}/src/views/demo/single/index.vue +0 -0
  129. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/index.vue +0 -0
  130. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/LoginForm.vue +0 -0
  131. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/LoginWithPhone.vue +0 -0
  132. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/PasswordLogin.vue +0 -0
  133. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/Savephone.vue +0 -0
  134. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/components/Useragreement.vue +0 -0
  135. package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/composables.ts +1 -1
  136. /package/templates/{pubinfo-template → pubinfo-app}/src/views/system/login/index.vue +0 -0
  137. /package/templates/{pubinfo-template → pubinfo-app}/stylelint.config.js +0 -0
  138. /package/templates/{pubinfo-template → pubinfo-app}/tsconfig.json +0 -0
  139. /package/templates/{pubinfo-template → pubinfo-app}/uno.config.ts +0 -0
@@ -0,0 +1,142 @@
1
+ <script setup lang="ts">
2
+ import LoginFrom from './components/LoginForm.vue';
3
+
4
+ defineOptions({
5
+ name: 'Login',
6
+ });
7
+
8
+ const title = ref(import.meta.env.VITE_APP_TITLE);
9
+
10
+ const designDescription = [
11
+ {
12
+ title: '快速',
13
+ description: '快速搭建技术中台系统',
14
+ },
15
+ {
16
+ title: '灵活',
17
+ description: '灵活配置系统功能',
18
+ },
19
+ {
20
+ title: '便捷',
21
+ description: '高效提升系统开发效率',
22
+ },
23
+ ];
24
+ </script>
25
+
26
+ <template>
27
+ <div class="warp">
28
+ <div class="warp-blank">
29
+ <div
30
+ hidden
31
+ smd:block
32
+ class="w-full pl-[5vw] pt-[7vh]"
33
+ >
34
+ <div class="logo-group">
35
+ <PubinfoIcon
36
+ name="logo"
37
+ color="transparent"
38
+ mr="10px"
39
+ :size="32"
40
+ />
41
+ <span text="black dark:[#C9D6EF]">{{ title }}</span>
42
+ </div>
43
+ <div class="title-group">
44
+ <span text="black dark:[#C9D6EF]">一体化技术架构 一站式技术支撑</span>
45
+ <div flex="~ row" mt="30px">
46
+ <div
47
+ v-for="(item, index) in designDescription"
48
+ :key="index"
49
+ w-84px
50
+ h-36px
51
+ bg="#2F6BFF"
52
+ rounded-20px
53
+ text="20px #F7F7F7 dark:[#fff]"
54
+ font-normal
55
+ flex="~ center"
56
+ mr="15px"
57
+ >
58
+ {{ item.title }}
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <div
65
+ h-full
66
+ bg="[rgba(255,255,255,0.1)] smd:[rgba(255,255,255,1)] dark:[#0F1E3B]"
67
+ backdrop-blur-sm
68
+ w="full smd:1/2 xl:800px 2xl:900px"
69
+ transition-all
70
+ flex="~ col"
71
+ justify-between
72
+ pb="40px"
73
+ relative
74
+ >
75
+ <div
76
+ smd:hidden
77
+ flex="~ row center"
78
+ w-full
79
+ h-200px
80
+ absolute
81
+ disable="none"
82
+ >
83
+ <PubinfoIcon
84
+ name="logo"
85
+ color="transparent"
86
+ :size="42"
87
+ mr-15px
88
+ />
89
+ <span text="33px" font="bold">{{ title }}</span>
90
+ </div>
91
+ <div
92
+ w-full
93
+ flex="~"
94
+ justify-center
95
+ pt="20vh"
96
+ >
97
+ <LoginFrom />
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </template>
102
+
103
+ <style scoped>
104
+ .warp {
105
+ --at-apply: relative flex flex-row w-full h-full overflow-hidden;
106
+ background: url("@/assets/images/login-bg.webp") no-repeat;
107
+ background-size: cover;
108
+ }
109
+
110
+ .warp .warp-blank {
111
+ --at-apply: flex-auto basis-0 overflow-hidden;
112
+ }
113
+
114
+ .warp .logo-group {
115
+ --at-apply: flex flex-row items-center h-33px mb-35px text-6 font-400 text-[#151e26];
116
+ }
117
+
118
+ .warp .title-group {
119
+ --at-apply: h-52px text-38px font-800 text-[#072347] tracking-[1.5px];
120
+ }
121
+
122
+ @media (width < 1024px) {
123
+ .warp {
124
+ background: url("@/assets/images/login-small.png") no-repeat left;
125
+ background-size: cover;
126
+ }
127
+ }
128
+
129
+ [data-theme="dark"] {
130
+ .warp {
131
+ background: url("@/assets/images/login-bg_dark.webp") no-repeat;
132
+ background-size: cover;
133
+ }
134
+
135
+ @media (width < 1024px) {
136
+ .warp {
137
+ background: url("@/assets/images/login-small_dark.webp") no-repeat left;
138
+ background-size: cover;
139
+ }
140
+ }
141
+ }
142
+ </style>
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.pubinfo/tsconfig.app.json"
3
+ }
@@ -0,0 +1,17 @@
1
+ import { presetUnocss } from 'pubinfo/node';
2
+ import { defineConfig } from 'unocss';
3
+
4
+ export default defineConfig({
5
+ presets: [
6
+ presetUnocss(),
7
+ ],
8
+
9
+ content: {
10
+ pipeline: {
11
+ include: [
12
+ /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
13
+ 'src/routes/**/*.ts',
14
+ ],
15
+ },
16
+ },
17
+ });
@@ -0,0 +1,2 @@
1
+ packages:
2
+ - playground
@@ -0,0 +1,36 @@
1
+ import { defineModuleConfig } from 'pubinfo/node';
2
+ import pkg from './package.json' with { type: 'json' };
3
+
4
+ const external = Object
5
+ .keys({ ...pkg.peerDependencies })
6
+ .map(packageName => new RegExp(`^${packageName}(\/.*)?`));
7
+
8
+ export default defineModuleConfig({
9
+ moduleId: '{{dir}}',
10
+
11
+ vite: {
12
+ build: {
13
+ sourcemap: false,
14
+ lib: {
15
+ entry: 'src/index.ts',
16
+ },
17
+ rolldownOptions: {
18
+ external,
19
+ output: [
20
+ {
21
+ format: 'es',
22
+ entryFileNames: '[name].js',
23
+ exports: 'named',
24
+ dir: 'dist',
25
+ },
26
+ ],
27
+ },
28
+ },
29
+ },
30
+
31
+ resolver: {
32
+ entries: {
33
+ pages: 'src/pages/**/*.vue',
34
+ },
35
+ },
36
+ });
@@ -0,0 +1,9 @@
1
+ import type { ModuleOptions } from 'pubinfo';
2
+ import 'uno.css';
3
+
4
+ export function {{camelCase dir}}(): ModuleOptions {
5
+ return {
6
+ name: 'pubinfo:{{kebabCase dir}}',
7
+ setup() {},
8
+ };
9
+ }
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ defineOptions({
3
+ name: 'Demo',
4
+ });
5
+ </script>
6
+
7
+ <template>
8
+ <div class="text-red">
9
+ demo
10
+ </div>
11
+ </template>
@@ -0,0 +1,3 @@
1
+ export default {
2
+ extends: ['pubinfo/stylelint'],
3
+ };
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "./.pubinfo/tsconfig.app.json",
3
+ "compilerOptions": {
4
+ "target": "ESNext",
5
+ "baseUrl": ".",
6
+ "moduleResolution": "bundler",
7
+ "paths": {
8
+ "@/*": ["src/*"],
9
+ "#/*": ["types/*"]
10
+ }
11
+ },
12
+ "include": [
13
+ "src",
14
+ "types"
15
+ ]
16
+ }
@@ -0,0 +1,8 @@
1
+ import { presetUnocss } from 'pubinfo/node';
2
+ import { defineConfig } from 'unocss';
3
+
4
+ export default defineConfig({
5
+ presets: [
6
+ presetUnocss(),
7
+ ],
8
+ });
@@ -1,7 +1,7 @@
1
1
  import type { Component, MaybeRef } from 'vue';
2
- import { getAuthLoginValidCode } from '@/api/modules/auth';
3
2
  import { useActiveElement } from '@vueuse/core';
4
3
  import { useRequest } from 'alova/client';
4
+ import { getAuthLoginValidCode } from '@/api/modules/auth';
5
5
 
6
6
  interface LoginTabs {
7
7
  title: string