@@ -6,6 +6,14 @@ import { gray, link, yellow } from 'kolorist'
6
6
import { ora } from '../../utils'
7
7
import { question } from './question'
8
8
9
+ const uniDependenciesMap = {
10
+ '@uni-helper/uni-use' : [ '@vueuse/core' ] ,
11
+ '@uni-helper/axios-adapter' : [ 'axios' ] ,
12
+ '@uni-helper/uni-preset-uni' : [ 'unocss' ] ,
13
+ '@uni-helper/eslint-config' : [ 'eslint' ] ,
14
+ '@uni-helper/vite-plugin-uni-tailwind' : [ 'tailwindcss' ] ,
15
+ } as Record < string , string [ ] >
16
+
9
17
async function getuniHelperDependencies ( ) {
10
18
const isUniPkg = isPackageExists ( '@dcloudio/uni-app' )
11
19
if ( ! isUniPkg ) {
@@ -34,7 +42,7 @@ async function getBaseDependencies() {
34
42
if ( packageInfo ?. version ) {
35
43
baseDependencies . push ( {
36
44
name,
37
- version : packageInfo ,
45
+ version : packageInfo . version ,
38
46
} )
39
47
}
40
48
}
@@ -57,6 +65,7 @@ async function getErrorDependencies() {
57
65
}
58
66
return errorDependencies
59
67
}
68
+
60
69
async function getVSCodeInfo ( ) {
61
70
const vscode = await envinfo . helpers . getVSCodeInfo ( )
62
71
if ( vscode . length !== 3 )
@@ -143,6 +152,7 @@ export async function getUniAppInfo() {
143
152
const { errorExtensions, volarExtensions } = await getErrorExtensions ( )
144
153
const baseEnvInfo = await getBaseEnvInfo ( )
145
154
const baseDependencies = await getBaseDependencies ( )
155
+ console . log ( baseDependencies )
146
156
const splitter = '----------------------------------------------'
147
157
148
158
let baseEnvInfoStr = ''
@@ -156,8 +166,15 @@ export async function getUniAppInfo() {
156
166
baseDependenciesStr += `- ${ name } : \`${ version } \`\n`
157
167
158
168
let errorDependenciesStr = ''
159
- for ( const { name, version, bugs } of errorDependencies )
169
+ for ( const { name, version, bugs } of errorDependencies ) {
160
170
errorDependenciesStr += `- ${ link ( name , bugs ! ) } : \`${ version } \`\n`
171
+ if ( uniDependenciesMap [ name ] ) {
172
+ for ( const uniDependency of uniDependenciesMap [ name ] ) {
173
+ const { version } = await getDependenciesVersionAndBugs ( uniDependency )
174
+ errorDependenciesStr += ` - ${ uniDependency } : \`${ version } \`\n`
175
+ }
176
+ }
177
+ }
161
178
162
179
let errorExtensionsStr = ''
163
180
for ( const { name, version, bugs } of errorExtensions )
0 commit comments