valaxy 1.0.0-rc.9 → 1.0.1
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/client/.gitignore +7 -0
- package/client/components/ValaxyLocalSearch.vue +1 -1
- package/client/composables/app/useValaxyHead.ts +1 -1
- package/client/composables/features/collapse-code.ts +1 -1
- package/client/composables/features/copy-markdown.ts +20 -6
- package/client/composables/search/useLocalSearch.ts +5 -5
- package/client/index.d.ts +1 -0
- package/client/index.html +1 -0
- package/client/modules/devtools.ts +53 -58
- package/client/modules/unhead.ts +9 -1
- package/client/setup/main.ts +1 -1
- package/client/setups.ts +2 -5
- package/client/shims.d.ts +7 -0
- package/client/styles/css-vars/borders.css +1 -1
- package/client/styles/css-vars/function.css +0 -4
- package/client/styles/css-vars/palette.css +10 -19
- package/client/tsconfig.json +1 -3
- package/client/types/index.ts +0 -6
- package/client/utils/content.ts +5 -0
- package/dist/node/cli/index.d.mts +18 -3
- package/dist/node/cli/index.mjs +24 -13
- package/dist/node/index.d.mts +148 -32
- package/dist/node/index.mjs +28 -17
- package/dist/shared/{valaxy.CmvWuejN.d.mts → valaxy.CjaAzLmd.d.mts} +7 -3
- package/dist/shared/{valaxy.Cb_HdczD.mjs → valaxy.DstXQBtK.mjs} +8551 -5215
- package/dist/types/index.d.mts +2 -2
- package/package.json +65 -51
- package/shared/node/i18n.ts +1 -1
- package/types/config.ts +5 -3
- package/types/frontmatter/page.ts +2 -0
- package/vendor/README.md +29 -0
- package/vendor/components/LICENSE +21 -0
- package/vendor/components/index.d.mts +3 -0
- package/vendor/components/index.mjs +2 -0
- package/vendor/components/src-S1kwY0Q8.mjs +660 -0
- package/vendor/components/utils-BfjsfvcK.mjs +229 -0
- package/vendor/i18n/LICENSE +20 -0
- package/vendor/i18n/index.d.mts +7 -0
- package/vendor/i18n/index.mjs +1389 -0
- package/vendor/i18n/types.d.ts +48 -0
- package/{LICENSE → vendor/layouts/LICENSE} +1 -1
- package/vendor/layouts/client.d.ts +11 -0
- package/vendor/layouts/index.d.mts +86 -0
- package/vendor/layouts/index.mjs +235 -0
- package/vendor/layouts/layoutName-DVkP7Qpo.mjs +82 -0
- package/vendor/layouts/runtime.d.mts +72 -0
- package/vendor/layouts/runtime.mjs +284 -0
- package/vendor/sources.json +46 -0
- package/client/components/builtin/ValaxyMermaid.vue +0 -86
- package/client/modules/mermaid.ts +0 -26
- package/client/setup/mermaid.ts +0 -22
|
@@ -46,7 +46,7 @@ export function useCollapseCode() {
|
|
|
46
46
|
// determine whether to add folded class name
|
|
47
47
|
onMounted(() => {
|
|
48
48
|
const els = document.querySelectorAll('div[class*="language-"]')
|
|
49
|
-
for (const el of
|
|
49
|
+
for (const el of Array.from(els)) {
|
|
50
50
|
const elHeight = getHeightViaClone(el as HTMLElement)
|
|
51
51
|
if (elHeight > codeHeightLimit)
|
|
52
52
|
el.classList.add('folded')
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { isClient, useClipboard } from '@vueuse/core'
|
|
2
2
|
import { computed, ref, watchEffect } from 'vue'
|
|
3
3
|
import { useRoute } from 'vue-router'
|
|
4
|
+
import { useSiteConfig } from '../../config'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Composable for copying raw Markdown content of the current post.
|
|
7
|
-
* Requires `siteConfig.llms.files: true` to have .md files available at build output.
|
|
8
|
+
* Requires `siteConfig.llms.enable: true` and `siteConfig.llms.files: true` to have .md files available at build output.
|
|
8
9
|
*
|
|
9
10
|
* The `available` ref is initially `false` and becomes `true` after a HEAD request
|
|
10
11
|
* confirms the `.md` file exists. This allows themes to conditionally render
|
|
@@ -26,6 +27,7 @@ import { useRoute } from 'vue-router'
|
|
|
26
27
|
*/
|
|
27
28
|
export function useCopyMarkdown() {
|
|
28
29
|
const route = useRoute()
|
|
30
|
+
const siteConfig = useSiteConfig()
|
|
29
31
|
const copied = ref(false)
|
|
30
32
|
const loading = ref(false)
|
|
31
33
|
const available = ref(false)
|
|
@@ -39,14 +41,26 @@ export function useCopyMarkdown() {
|
|
|
39
41
|
return `${p}.md`
|
|
40
42
|
})
|
|
41
43
|
|
|
42
|
-
//
|
|
44
|
+
// Only probe when raw Markdown output is enabled.
|
|
43
45
|
if (isClient) {
|
|
44
|
-
watchEffect(() => {
|
|
46
|
+
watchEffect((onCleanup) => {
|
|
45
47
|
available.value = false
|
|
46
48
|
error.value = null
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
if (!siteConfig.value.llms.enable || !siteConfig.value.llms.files)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
const controller = new AbortController()
|
|
53
|
+
onCleanup(() => controller.abort())
|
|
54
|
+
|
|
55
|
+
fetch(mdUrl.value, { method: 'HEAD', signal: controller.signal })
|
|
56
|
+
.then((res) => {
|
|
57
|
+
if (!controller.signal.aborted)
|
|
58
|
+
available.value = res.ok
|
|
59
|
+
})
|
|
60
|
+
.catch(() => {
|
|
61
|
+
if (!controller.signal.aborted)
|
|
62
|
+
available.value = false
|
|
63
|
+
})
|
|
50
64
|
})
|
|
51
65
|
}
|
|
52
66
|
|
|
@@ -13,7 +13,7 @@ export interface LocalSearchResult {
|
|
|
13
13
|
export function useLocalSearch(query: Ref<string>) {
|
|
14
14
|
const results = shallowRef<LocalSearchResult[]>([])
|
|
15
15
|
const loading = ref(false)
|
|
16
|
-
|
|
16
|
+
const miniSearch = shallowRef<MiniSearch | null>(null)
|
|
17
17
|
|
|
18
18
|
async function load(locale = 'root') {
|
|
19
19
|
loading.value = true
|
|
@@ -25,9 +25,9 @@ export function useLocalSearch(query: Ref<string>) {
|
|
|
25
25
|
return
|
|
26
26
|
}
|
|
27
27
|
const mod = await loader()
|
|
28
|
-
const data: string =
|
|
28
|
+
const data: string = mod.default
|
|
29
29
|
const { default: MiniSearchCtor } = await import('minisearch')
|
|
30
|
-
miniSearch = MiniSearchCtor.loadJSON(data, {
|
|
30
|
+
miniSearch.value = MiniSearchCtor.loadJSON(data, {
|
|
31
31
|
fields: ['title', 'titles', 'text'],
|
|
32
32
|
storeFields: ['title', 'titles'],
|
|
33
33
|
})
|
|
@@ -38,11 +38,11 @@ export function useLocalSearch(query: Ref<string>) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
watchEffect(() => {
|
|
41
|
-
if (!miniSearch || !query.value.trim()) {
|
|
41
|
+
if (!miniSearch.value || !query.value.trim()) {
|
|
42
42
|
results.value = []
|
|
43
43
|
return
|
|
44
44
|
}
|
|
45
|
-
results.value = miniSearch.search(query.value, {
|
|
45
|
+
results.value = miniSearch.value.search(query.value, {
|
|
46
46
|
prefix: true,
|
|
47
47
|
fuzzy: 0.2,
|
|
48
48
|
boost: { title: 4, text: 2, titles: 1 },
|
package/client/index.d.ts
CHANGED
package/client/index.html
CHANGED
|
@@ -1,62 +1,57 @@
|
|
|
1
1
|
import type { UserModule } from '../types'
|
|
2
|
+
import { createValaxyPageBridge } from '@valaxyjs/devtools/page'
|
|
3
|
+
import { useWindowSize } from '@vueuse/core'
|
|
4
|
+
import { effectScope, onScopeDispose, watch } from 'vue'
|
|
5
|
+
import { useScreenSize } from '../composables/helper/useScreenSize'
|
|
6
|
+
import { useValaxyConfig } from '../config'
|
|
2
7
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
icon: 'i-ri-github-fill',
|
|
41
|
-
action: {
|
|
42
|
-
type: 'url',
|
|
43
|
-
src: normalizeRepositoryUrl(pkg.repository.url),
|
|
44
|
-
},
|
|
8
|
+
export const install: UserModule = ({ app, router }) => {
|
|
9
|
+
const scope = effectScope()
|
|
10
|
+
app.runWithContext(() => scope.run(() => {
|
|
11
|
+
const config = useValaxyConfig()
|
|
12
|
+
const { width, height } = useWindowSize()
|
|
13
|
+
const screen = useScreenSize()
|
|
14
|
+
const bridge = createValaxyPageBridge(router, {
|
|
15
|
+
getDebug() {
|
|
16
|
+
const route = router.currentRoute.value
|
|
17
|
+
const { siteConfig, themeConfig, theme } = config.value
|
|
18
|
+
return {
|
|
19
|
+
route: {
|
|
20
|
+
path: route.path,
|
|
21
|
+
fullPath: route.fullPath,
|
|
22
|
+
name: route.name == null ? undefined : String(route.name),
|
|
23
|
+
layout: String(route.meta.layout || 'default'),
|
|
24
|
+
query: route.query,
|
|
25
|
+
params: route.params,
|
|
26
|
+
},
|
|
27
|
+
viewport: {
|
|
28
|
+
width: width.value,
|
|
29
|
+
height: height.value,
|
|
30
|
+
breakpoints: [
|
|
31
|
+
{ label: 'xs', active: screen.isXs.value },
|
|
32
|
+
{ label: 'sm', active: screen.isSm.value },
|
|
33
|
+
{ label: 'md', active: screen.isMd.value },
|
|
34
|
+
{ label: 'lg', active: screen.isLg.value },
|
|
35
|
+
{ label: 'xl', active: screen.isXl.value },
|
|
36
|
+
{ label: '2xl', active: screen.is2xl.value },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
config: {
|
|
40
|
+
theme: theme || '',
|
|
41
|
+
site: { lang: siteConfig.lang, title: siteConfig.title, url: siteConfig.url },
|
|
42
|
+
themeConfig: { ...themeConfig },
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
45
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const install: UserModule = async () => {
|
|
61
|
-
await addValaxyTabAndCommand()
|
|
46
|
+
})
|
|
47
|
+
const sync = () => bridge.sync()
|
|
48
|
+
watch([width, height, config, ...Object.values(screen)], sync, { deep: true })
|
|
49
|
+
import.meta.hot?.on('valaxy:pageData', sync)
|
|
50
|
+
onScopeDispose(() => {
|
|
51
|
+
bridge.close()
|
|
52
|
+
import.meta.hot?.off('valaxy:pageData', sync)
|
|
53
|
+
})
|
|
54
|
+
}))
|
|
55
|
+
app.onUnmount(() => scope.stop())
|
|
56
|
+
import.meta.hot?.dispose(() => scope.stop())
|
|
62
57
|
}
|
package/client/modules/unhead.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import type { UserModule } from '../types'
|
|
2
|
-
import { InferSeoMetaPlugin } from '@unhead/
|
|
2
|
+
import { InferSeoMetaPlugin } from '@unhead/bundler'
|
|
3
3
|
|
|
4
4
|
export const install: UserModule = async ({ head, isClient }) => {
|
|
5
5
|
// Disables on client build, allows 0kb runtime
|
|
6
6
|
if (isClient && import.meta.env.PROD)
|
|
7
7
|
return
|
|
8
8
|
|
|
9
|
+
// Unhead's server entry adds this default, but its client entry does not.
|
|
10
|
+
// Keep mobile development previews at device width, just like SSG pages.
|
|
11
|
+
if (import.meta.env.DEV) {
|
|
12
|
+
head?.push({
|
|
13
|
+
meta: [{ name: 'viewport', content: 'width=device-width, initial-scale=1' }],
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* https://unhead.unjs.io/docs/head/guides/plugins/infer-seo-meta-tags
|
|
11
19
|
*/
|
package/client/setup/main.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default function setupMain(ctx: ValaxySSGContext, config: ComputedRef<Val
|
|
|
27
27
|
installNprogress(ctx)
|
|
28
28
|
installFloatingVue(ctx, config)
|
|
29
29
|
|
|
30
|
-
if (import.meta.env.DEV && ctx.isClient) {
|
|
30
|
+
if (import.meta.env.DEV && ctx.isClient && config.value.devtools) {
|
|
31
31
|
import('../modules/devtools').then(({ install: installDevtools }) => {
|
|
32
32
|
setTimeout(() => {
|
|
33
33
|
installDevtools(ctx)
|
package/client/setups.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Awaitable } from '@antfu/utils'
|
|
2
2
|
import type { App } from 'vue'
|
|
3
3
|
import type { Router, RouteRecordRaw } from 'vue-router'
|
|
4
|
-
import type { MermaidOptions } from './types'
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* @en
|
|
@@ -35,9 +34,6 @@ export type AppContext = ValaxySSGContext
|
|
|
35
34
|
|
|
36
35
|
export type AppSetup = (ctx: AppContext) => Awaitable<void>
|
|
37
36
|
|
|
38
|
-
// client
|
|
39
|
-
export type MermaidSetup = () => Partial<MermaidOptions> | void
|
|
40
|
-
|
|
41
37
|
/**
|
|
42
38
|
* @en
|
|
43
39
|
* Define the setup function for the client application.
|
|
@@ -49,6 +45,7 @@ export function defineAppSetup(fn: AppSetup) {
|
|
|
49
45
|
return fn
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
/** @deprecated Import defineMermaidSetup from valaxy-addon-mermaid instead. */
|
|
49
|
+
export function defineMermaidSetup<T extends object>(fn: () => T | void) {
|
|
53
50
|
return fn
|
|
54
51
|
}
|
package/client/shims.d.ts
CHANGED
|
@@ -49,3 +49,10 @@ declare module '#valaxy/blog/collections' {
|
|
|
49
49
|
const collections: CollectionConfig[]
|
|
50
50
|
export default collections
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
declare module '@intlify/unplugin-vue-i18n/messages' {
|
|
54
|
+
import type { I18nOptions } from 'vue-i18n'
|
|
55
|
+
|
|
56
|
+
const messages: I18nOptions['messages']
|
|
57
|
+
export default messages
|
|
58
|
+
}
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
--va-c-default-2: var(--va-c-gray-2);
|
|
26
26
|
--va-c-default-3: var(--va-c-gray-3);
|
|
27
27
|
--va-c-default-soft: var(--va-c-gray-soft);
|
|
28
|
-
|
|
29
28
|
--va-c-brand-1: var(--va-c-indigo-1);
|
|
30
29
|
--va-c-brand-2: var(--va-c-indigo-2);
|
|
31
30
|
--va-c-brand-3: var(--va-c-indigo-3);
|
|
@@ -33,17 +32,14 @@
|
|
|
33
32
|
|
|
34
33
|
/* DEPRECATED: Use `--va-c-brand-1` instead. */
|
|
35
34
|
--va-c-brand: var(--va-c-brand-1);
|
|
36
|
-
|
|
37
35
|
--va-c-tip-1: var(--va-c-brand-1);
|
|
38
36
|
--va-c-tip-2: var(--va-c-brand-2);
|
|
39
37
|
--va-c-tip-3: var(--va-c-brand-3);
|
|
40
38
|
--va-c-tip-soft: var(--va-c-brand-soft);
|
|
41
|
-
|
|
42
39
|
--va-c-warning-1: var(--va-c-yellow-1);
|
|
43
40
|
--va-c-warning-2: var(--va-c-yellow-2);
|
|
44
41
|
--va-c-warning-3: var(--va-c-yellow-3);
|
|
45
42
|
--va-c-warning-soft: var(--va-c-yellow-soft);
|
|
46
|
-
|
|
47
43
|
--va-c-danger-1: var(--va-c-red-1);
|
|
48
44
|
--va-c-danger-2: var(--va-c-red-2);
|
|
49
45
|
--va-c-danger-3: var(--va-c-red-3);
|
|
@@ -30,28 +30,23 @@
|
|
|
30
30
|
--va-c-gray-1: #dddde3;
|
|
31
31
|
--va-c-gray-2: #e4e4e9;
|
|
32
32
|
--va-c-gray-3: #ebebef;
|
|
33
|
-
--va-c-gray-soft:
|
|
34
|
-
|
|
33
|
+
--va-c-gray-soft: rgb(142 150 170 / 0.14);
|
|
35
34
|
--va-c-indigo-1: #3451b2;
|
|
36
35
|
--va-c-indigo-2: #3a5ccc;
|
|
37
36
|
--va-c-indigo-3: #5672cd;
|
|
38
|
-
--va-c-indigo-soft:
|
|
39
|
-
|
|
37
|
+
--va-c-indigo-soft: rgb(100 108 255 / 0.14);
|
|
40
38
|
--va-c-green-1: #18794e;
|
|
41
39
|
--va-c-green-2: #299764;
|
|
42
40
|
--va-c-green-3: #30a46c;
|
|
43
|
-
--va-c-green-soft:
|
|
44
|
-
|
|
41
|
+
--va-c-green-soft: rgb(16 185 129 / 0.14);
|
|
45
42
|
--va-c-yellow-1: #915930;
|
|
46
43
|
--va-c-yellow-2: #946300;
|
|
47
44
|
--va-c-yellow-3: #9f6a00;
|
|
48
|
-
--va-c-yellow-soft:
|
|
49
|
-
|
|
45
|
+
--va-c-yellow-soft: rgb(234 179 8 / 0.14);
|
|
50
46
|
--va-c-red-1: #b8272c;
|
|
51
47
|
--va-c-red-2: #d5393e;
|
|
52
48
|
--va-c-red-3: #e0575b;
|
|
53
|
-
--va-c-red-soft:
|
|
54
|
-
|
|
49
|
+
--va-c-red-soft: rgb(244 63 94 / 0.14);
|
|
55
50
|
--va-c-sponsor: #db2777;
|
|
56
51
|
}
|
|
57
52
|
|
|
@@ -59,25 +54,21 @@
|
|
|
59
54
|
--va-c-gray-1: #515c67;
|
|
60
55
|
--va-c-gray-2: #414853;
|
|
61
56
|
--va-c-gray-3: #32363f;
|
|
62
|
-
--va-c-gray-soft:
|
|
63
|
-
|
|
57
|
+
--va-c-gray-soft: rgb(101 117 133 / 0.16);
|
|
64
58
|
--va-c-indigo-1: #a8b1ff;
|
|
65
59
|
--va-c-indigo-2: #5c73e7;
|
|
66
60
|
--va-c-indigo-3: #3e63dd;
|
|
67
|
-
--va-c-indigo-soft:
|
|
68
|
-
|
|
61
|
+
--va-c-indigo-soft: rgb(100 108 255 / 0.16);
|
|
69
62
|
--va-c-green-1: #3dd68c;
|
|
70
63
|
--va-c-green-2: #30a46c;
|
|
71
64
|
--va-c-green-3: #298459;
|
|
72
|
-
--va-c-green-soft:
|
|
73
|
-
|
|
65
|
+
--va-c-green-soft: rgb(16 185 129 / 0.16);
|
|
74
66
|
--va-c-yellow-1: #f9b44e;
|
|
75
67
|
--va-c-yellow-2: #da8b17;
|
|
76
68
|
--va-c-yellow-3: #a46a0a;
|
|
77
|
-
--va-c-yellow-soft:
|
|
78
|
-
|
|
69
|
+
--va-c-yellow-soft: rgb(234 179 8 / 0.16);
|
|
79
70
|
--va-c-red-1: #f66f81;
|
|
80
71
|
--va-c-red-2: #f14158;
|
|
81
72
|
--va-c-red-3: #b62a3c;
|
|
82
|
-
--va-c-red-soft:
|
|
73
|
+
--va-c-red-soft: rgb(244 63 94 / 0.16);
|
|
83
74
|
}
|
package/client/tsconfig.json
CHANGED
package/client/types/index.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import type mermaid from 'mermaid'
|
|
2
1
|
import type { ValaxySSGContext } from '../setups'
|
|
3
2
|
|
|
4
3
|
export type UserModule = (ctx: ValaxySSGContext) => void
|
|
5
4
|
|
|
6
|
-
/**
|
|
7
|
-
* @see https://mermaid.js.org/config/schema-docs/config.html#mermaid-config-schema
|
|
8
|
-
*/
|
|
9
|
-
export type MermaidOptions = (typeof mermaid.initialize) extends (a: infer A) => any ? A : never
|
|
10
|
-
|
|
11
5
|
export * from './collection'
|
package/client/utils/content.ts
CHANGED
|
@@ -8,6 +8,11 @@ export let contentUpdatedCallbacks: (() => any)[] = []
|
|
|
8
8
|
* in the DOM.
|
|
9
9
|
*/
|
|
10
10
|
export function onContentUpdated(fn: () => any) {
|
|
11
|
+
// SSR never unmounts components, so this module-level array would retain
|
|
12
|
+
// every rendered page and its router. In the browser, register during setup
|
|
13
|
+
// so parent listeners exist when child content first mounts.
|
|
14
|
+
if (import.meta.env.SSR)
|
|
15
|
+
return
|
|
11
16
|
contentUpdatedCallbacks.push(fn)
|
|
12
17
|
onUnmounted(() => {
|
|
13
18
|
contentUpdatedCallbacks = contentUpdatedCallbacks.filter(f => f !== fn)
|
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
import { Argv } from 'yargs';
|
|
2
|
-
import { LogLevel, ViteDevServer } from 'vite';
|
|
2
|
+
import { LogLevel, InlineConfig, ViteDevServer } from 'vite';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* valaxy build
|
|
6
|
+
*/
|
|
7
|
+
declare function execBuild({ ssg, root, output, log, siteUrl }: {
|
|
8
|
+
ssg: boolean;
|
|
9
|
+
root: string;
|
|
10
|
+
output: string;
|
|
11
|
+
log: string;
|
|
12
|
+
siteUrl?: string;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
|
|
15
|
+
declare function startValaxyDev({ root, port, remote, log, open, vite, }: {
|
|
5
16
|
root?: string;
|
|
6
17
|
port?: number;
|
|
7
18
|
remote?: boolean;
|
|
8
19
|
log?: LogLevel;
|
|
9
20
|
open?: boolean;
|
|
21
|
+
/** Final host overrides for programmatic callers such as desktop hosts. */
|
|
22
|
+
vite?: InlineConfig;
|
|
10
23
|
}): Promise<ViteDevServer>;
|
|
11
24
|
declare function registerDevCommand(cli: Argv): void;
|
|
12
25
|
|
|
26
|
+
/** Programmatic lifecycle contract supported by desktop hosts. */
|
|
27
|
+
declare const desktopRuntimeVersion = 1;
|
|
13
28
|
interface CreateCliOptions {
|
|
14
29
|
userRoot?: string;
|
|
15
30
|
}
|
|
16
31
|
declare function createCli(argv?: string[], options?: CreateCliOptions): Promise<Argv<object>>;
|
|
17
32
|
declare function run(argv?: string[], options?: CreateCliOptions): Promise<void>;
|
|
18
33
|
|
|
19
|
-
export { createCli, registerDevCommand, run, startValaxyDev };
|
|
34
|
+
export { createCli, desktopRuntimeVersion, execBuild, registerDevCommand, run, startValaxyDev };
|
|
20
35
|
export type { CreateCliOptions };
|
package/dist/node/cli/index.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import 'node:path';
|
|
|
2
2
|
import 'node:process';
|
|
3
3
|
import 'yargs';
|
|
4
4
|
import 'yargs/helpers';
|
|
5
|
-
export { c as createCli,
|
|
5
|
+
export { c as createCli, s as desktopRuntimeVersion, u as execBuild, O as registerDevCommand, a1 as run, a3 as startValaxyDev } from '../../shared/valaxy.DstXQBtK.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'consola';
|
|
8
8
|
import 'consola/utils';
|
|
9
|
-
import 'fast-glob';
|
|
10
9
|
import 'fs-extra';
|
|
11
10
|
import 'gray-matter';
|
|
11
|
+
import 'tinyglobby';
|
|
12
12
|
import 'js-yaml';
|
|
13
13
|
import '@antfu/utils';
|
|
14
14
|
import 'debug';
|
|
@@ -23,22 +23,35 @@ import 'cross-spawn';
|
|
|
23
23
|
import 'mlly';
|
|
24
24
|
import 'resolve-global';
|
|
25
25
|
import '@valaxyjs/utils';
|
|
26
|
+
import 'node:fs';
|
|
26
27
|
import 'node:fs/promises';
|
|
27
28
|
import 'dayjs';
|
|
28
29
|
import 'feed';
|
|
29
|
-
import 'markdown-
|
|
30
|
+
import 'markdown-exit';
|
|
30
31
|
import 'table';
|
|
31
32
|
import 'hookable';
|
|
32
|
-
import '
|
|
33
|
-
import '@intlify/unplugin-vue-i18n/vite';
|
|
34
|
-
import '@unhead/addons/vite';
|
|
35
|
-
import 'unplugin-vue-components/vite';
|
|
36
|
-
import 'vite-plugin-vue-layouts-next';
|
|
33
|
+
import '@unhead/bundler/vite';
|
|
37
34
|
import 'vitepress-plugin-group-icons';
|
|
38
|
-
import '
|
|
35
|
+
import 'local-pkg';
|
|
36
|
+
import 'picomatch';
|
|
37
|
+
import 'chokidar';
|
|
38
|
+
import 'unplugin';
|
|
39
|
+
import 'unplugin-utils';
|
|
40
|
+
import 'obug';
|
|
41
|
+
import 'magic-string';
|
|
39
42
|
import 'node:buffer';
|
|
43
|
+
import 'p-map';
|
|
44
|
+
import '@intlify/shared';
|
|
45
|
+
import '@intlify/bundle-utils';
|
|
46
|
+
import '@rollup/pluginutils';
|
|
47
|
+
import 'vue/compiler-sfc';
|
|
48
|
+
import 'picocolors';
|
|
49
|
+
import '@eslint-community/eslint-utils';
|
|
50
|
+
import '@intlify/vue-i18n-extensions';
|
|
51
|
+
import '@typescript-eslint/scope-manager';
|
|
40
52
|
import 'minisearch';
|
|
41
53
|
import '@shikijs/transformers';
|
|
54
|
+
import 'lru-cache';
|
|
42
55
|
import 'shiki';
|
|
43
56
|
import 'css-i18n';
|
|
44
57
|
import 'markdown-it-anchor';
|
|
@@ -52,17 +65,15 @@ import 'markdown-it-container';
|
|
|
52
65
|
import 'katex';
|
|
53
66
|
import 'katex/contrib/mhchem';
|
|
54
67
|
import 'unplugin-vue-markdown/vite';
|
|
55
|
-
import 'js-base64';
|
|
56
|
-
import 'lru-cache';
|
|
57
68
|
import 'jiti';
|
|
58
69
|
import 'unocss';
|
|
59
70
|
import 'pascalcase';
|
|
60
71
|
import 'html-to-text';
|
|
61
72
|
import 'vue-router/vite';
|
|
62
|
-
import 'node:child_process';
|
|
63
|
-
import 'node:v8';
|
|
64
73
|
import 'vite-ssg-sitemap';
|
|
65
74
|
import '@unhead/vue/server';
|
|
75
|
+
import 'vue-router/unplugin';
|
|
76
|
+
import 'node:child_process';
|
|
66
77
|
import '@clack/prompts';
|
|
67
78
|
import 'node:net';
|
|
68
79
|
import 'node:readline';
|