feat: consola when jiti load valaxy config error, close #415

This commit is contained in:
YunYouJun 2024-07-21 19:40:12 +08:00
parent 4de908aa33
commit 7a311ff9c3
12 changed files with 1761 additions and 1598 deletions

View File

@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged npx lint-staged

View File

@ -10,8 +10,8 @@
}, },
"devDependencies": { "devDependencies": {
"typedoc": "^0.26.4", "typedoc": "^0.26.4",
"typedoc-plugin-markdown": "^4.2.0", "typedoc-plugin-markdown": "^4.2.1",
"typedoc-vitepress-theme": "^1.0.1", "typedoc-vitepress-theme": "^1.0.1",
"vitepress": "^1.3.0" "vitepress": "^1.3.1"
} }
} }

View File

@ -42,7 +42,6 @@ declare module 'vue-router/auto-routes' {
'/links/': RouteRecordInfo<'/links/', '/links', Record<never, never>, Record<never, never>>, '/links/': RouteRecordInfo<'/links/', '/links', Record<never, never>, Record<never, never>>,
'/notes/': RouteRecordInfo<'/notes/', '/notes', Record<never, never>, Record<never, never>>, '/notes/': RouteRecordInfo<'/notes/', '/notes', Record<never, never>, Record<never, never>>,
'/page/[page]': RouteRecordInfo<'/page/[page]', '/page/:page', { page: ParamValue<true> }, { page: ParamValue<false> }>, '/page/[page]': RouteRecordInfo<'/page/[page]', '/page/:page', { page: ParamValue<true> }, { page: ParamValue<false> }>,
'/posts/中文Post测试': RouteRecordInfo<'/posts/中文Post测试', '/posts/中文Post测试', Record<never, never>, Record<never, never>>,
'/posts/about': RouteRecordInfo<'/posts/about', '/posts/about', Record<never, never>, Record<never, never>>, '/posts/about': RouteRecordInfo<'/posts/about', '/posts/about', Record<never, never>, Record<never, never>>,
'/posts/categories-a-b': RouteRecordInfo<'/posts/categories-a-b', '/posts/categories-a-b', Record<never, never>, Record<never, never>>, '/posts/categories-a-b': RouteRecordInfo<'/posts/categories-a-b', '/posts/categories-a-b', Record<never, never>, Record<never, never>>,
'/posts/categories-a-b-c': RouteRecordInfo<'/posts/categories-a-b-c', '/posts/categories-a-b-c', Record<never, never>, Record<never, never>>, '/posts/categories-a-b-c': RouteRecordInfo<'/posts/categories-a-b-c', '/posts/categories-a-b-c', Record<never, never>, Record<never, never>>,
@ -73,6 +72,7 @@ declare module 'vue-router/auto-routes' {
'/posts/test': RouteRecordInfo<'/posts/test', '/posts/test', Record<never, never>, Record<never, never>>, '/posts/test': RouteRecordInfo<'/posts/test', '/posts/test', Record<never, never>, Record<never, never>>,
'/posts/test-images': RouteRecordInfo<'/posts/test-images', '/posts/test-images', Record<never, never>, Record<never, never>>, '/posts/test-images': RouteRecordInfo<'/posts/test-images', '/posts/test-images', Record<never, never>, Record<never, never>>,
'/posts/test-tags': RouteRecordInfo<'/posts/test-tags', '/posts/test-tags', Record<never, never>, Record<never, never>>, '/posts/test-tags': RouteRecordInfo<'/posts/test-tags', '/posts/test-tags', Record<never, never>, Record<never, never>>,
'/posts/中文Post测试': RouteRecordInfo<'/posts/中文Post测试', '/posts/中文Post测试', Record<never, never>, Record<never, never>>,
'/tags/': RouteRecordInfo<'/tags/', '/tags', Record<never, never>, Record<never, never>>, '/tags/': RouteRecordInfo<'/tags/', '/tags', Record<never, never>, Record<never, never>>,
'/test/deadlinks': RouteRecordInfo<'/test/deadlinks', '/test/deadlinks', Record<never, never>, Record<never, never>>, '/test/deadlinks': RouteRecordInfo<'/test/deadlinks', '/test/deadlinks', Record<never, never>, Record<never, never>>,
'/test/markdown-file-inclusion': RouteRecordInfo<'/test/markdown-file-inclusion', '/test/markdown-file-inclusion', Record<never, never>, Record<never, never>>, '/test/markdown-file-inclusion': RouteRecordInfo<'/test/markdown-file-inclusion', '/test/markdown-file-inclusion', Record<never, never>, Record<never, never>>,

View File

@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"@iconify-json/simple-icons": "^1.1.109", "@iconify-json/simple-icons": "^1.1.109",
"nodemon": "^3.1.4", "nodemon": "^3.1.4",
"vite": "^5.3.3", "vite": "^5.3.4",
"vitepress": "1.1.4" "vitepress": "1.1.4"
} }
} }

View File

@ -78,34 +78,34 @@
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "2.17.0", "@antfu/eslint-config": "2.17.0",
"@iconify-json/logos": "^1.1.43", "@iconify-json/logos": "^1.1.43",
"@iconify-json/vscode-icons": "^1.1.35", "@iconify-json/vscode-icons": "^1.1.36",
"@microsoft/api-extractor": "^7.47.0", "@microsoft/api-extractor": "^7.47.2",
"@playwright/test": "^1.45.1", "@playwright/test": "^1.45.2",
"@types/debug": "^4.1.12", "@types/debug": "^4.1.12",
"@types/markdown-it-attrs": "^4.1.3", "@types/markdown-it-attrs": "^4.1.3",
"@types/markdown-it-container": "^2.0.10", "@types/markdown-it-container": "^2.0.10",
"@types/markdown-it-emoji": "^3.0.1", "@types/markdown-it-emoji": "^3.0.1",
"@types/node": "^20.14.10", "@types/node": "^20.14.11",
"@types/prompts": "^2.4.9", "@types/prompts": "^2.4.9",
"@types/resolve": "^1.20.6", "@types/resolve": "^1.20.6",
"bumpp": "^9.4.1", "bumpp": "^9.4.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"decap-cms-app": "^3.1.11", "decap-cms-app": "^3.1.11",
"eslint": "^9.6.0", "eslint": "^9.7.0",
"https-localhost": "^4.7.1", "https-localhost": "^4.7.1",
"husky": "^9.0.11", "husky": "^9.1.1",
"lint-staged": "^15.2.7", "lint-staged": "^15.2.7",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prompts": "^2.4.2", "prompts": "^2.4.2",
"rimraf": "^6.0.1", "rimraf": "^6.0.1",
"stylelint": "^16.6.1", "stylelint": "^16.7.0",
"stylelint-config-recommended-vue": "^1.5.0", "stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard-scss": "^13.1.0", "stylelint-config-standard-scss": "^13.1.0",
"tsup": "^8.1.0", "tsup": "^8.2.1",
"tsx": "^4.16.2", "tsx": "^4.16.2",
"typescript": "^5.5.3", "typescript": "^5.5.3",
"unbuild": "^2.0.0", "unbuild": "^2.0.0",
"vitest": "^2.0.2", "vitest": "^2.0.3",
"vue-tsc": "2.0.17", "vue-tsc": "2.0.17",
"zx": "^8.1.4" "zx": "^8.1.4"
}, },

View File

@ -45,6 +45,6 @@
"typescript": "^5.5.3", "typescript": "^5.5.3",
"unbuild": "^2.0.0", "unbuild": "^2.0.0",
"unplugin-vue-router": "^0.10.0", "unplugin-vue-router": "^0.10.0",
"vite": "^5.3.3" "vite": "^5.3.4"
} }
} }

View File

@ -16,7 +16,7 @@
"valaxy": "latest" "valaxy": "latest"
}, },
"dependencies": { "dependencies": {
"@docsearch/css": "^3.6.0", "@docsearch/css": "^3.6.1",
"@docsearch/js": "^3.6.0" "@docsearch/js": "^3.6.1"
} }
} }

View File

@ -19,8 +19,8 @@
"main": "node/index.ts", "main": "node/index.ts",
"types": "types/index.d.ts", "types": "types/index.d.ts",
"dependencies": { "dependencies": {
"@docsearch/css": "^3.6.0", "@docsearch/css": "^3.6.1",
"@docsearch/js": "^3.6.0" "@docsearch/js": "^3.6.1"
}, },
"devDependencies": { "devDependencies": {
"valaxy": "workspace:*" "valaxy": "workspace:*"

View File

@ -42,7 +42,7 @@ export function loadConfig<T extends UserInputConfig = UserInputConfig>(options:
})(filePath) })(filePath)
} }
catch (e) { catch (e) {
consola.debug(`Failed to load config file: ${filePath}`) consola.error(`Failed to load config file: ${filePath}`)
} }
return { return {

View File

@ -102,7 +102,7 @@ export async function resolveValaxyConfig(options: ValaxyEntryOptions) {
const { config: userValaxyConfig, configFile } = await resolveValaxyConfigFromRoot(configRoot) const { config: userValaxyConfig, configFile } = await resolveValaxyConfigFromRoot(configRoot)
const duration = endCount() const duration = endCount()
if (userValaxyConfig && configFile) if (configFile && userValaxyConfig && Object.keys(userValaxyConfig).length !== 0)
consola.success(`Resolve ${cyan('userValaxyConfig')} from ${dim(configFile)} ${yellow(duration)}`) consola.success(`Resolve ${cyan('userValaxyConfig')} from ${dim(configFile)} ${yellow(duration)}`)
const theme = options.theme || userValaxyConfig?.theme || 'yun' const theme = options.theme || userValaxyConfig?.theme || 'yun'

View File

@ -70,12 +70,12 @@
"@intlify/unplugin-vue-i18n": "^4.0.0", "@intlify/unplugin-vue-i18n": "^4.0.0",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/katex": "^0.16.7", "@types/katex": "^0.16.7",
"@unhead/addons": "^1.9.15", "@unhead/addons": "^1.9.16",
"@unhead/schema-org": "^1.9.15", "@unhead/schema-org": "^1.9.16",
"@unhead/vue": "^1.9.15", "@unhead/vue": "^1.9.16",
"@valaxyjs/devtools": "workspace:*", "@valaxyjs/devtools": "workspace:*",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.0.5",
"@vue/devtools-api": "^7.3.5", "@vue/devtools-api": "^7.3.6",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
"@vueuse/integrations": "^10.11.0", "@vueuse/integrations": "^10.11.0",
"consola": "^3.2.3", "consola": "^3.2.3",
@ -117,20 +117,20 @@
"pathe": "^1.1.2", "pathe": "^1.1.2",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"sass": "^1.77.7", "sass": "^1.77.8",
"shiki": "^1.10.3", "shiki": "^1.10.3",
"star-markdown-css": "^0.5.1", "star-markdown-css": "^0.5.1",
"unocss": "^0.61.3", "unocss": "^0.61.5",
"unplugin-vue-components": "^0.27.2", "unplugin-vue-components": "^0.27.3",
"unplugin-vue-markdown": "^0.26.2", "unplugin-vue-markdown": "^0.26.2",
"unplugin-vue-router": "^0.10.0", "unplugin-vue-router": "^0.10.0",
"vanilla-lazyload": "^19.1.3", "vanilla-lazyload": "^19.1.3",
"vite": "^5.3.3", "vite": "^5.3.4",
"vite-plugin-vue-devtools": "^7.3.5", "vite-plugin-vue-devtools": "^7.3.6",
"vite-plugin-vue-layouts": "0.11.0", "vite-plugin-vue-layouts": "0.11.0",
"vite-ssg": "0.23.7", "vite-ssg": "0.23.7",
"vite-ssg-sitemap": "0.6.1", "vite-ssg-sitemap": "0.6.1",
"vue": "^3.4.31", "vue": "^3.4.33",
"vue-i18n": "^9.13.1", "vue-i18n": "^9.13.1",
"vue-router": "^4.4.0", "vue-router": "^4.4.0",
"yargs": "^17.7.2" "yargs": "^17.7.2"

File diff suppressed because it is too large Load Diff