build: add precompiled CLI distribution

This commit is contained in:
2026-08-29 19:00:14 +08:00
parent d074681928
commit 4d1dc76e31
77 changed files with 3461 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
const deckBase = (import.meta as ImportMeta & { env: { BASE_URL: string } }).env.BASE_URL
export function resolveImageSource(source: string | undefined, base = deckBase) {
if (!source || isAbsoluteSource(source))
return source
const normalizedBase = base.endsWith('/') ? base : `${base}/`
return `${normalizedBase}${source.replace(/^\.\//, '')}`
}
function isAbsoluteSource(source: string) {
return source.startsWith('/')
|| source.startsWith('#')
|| /^[a-z][a-z\d+.-]*:/i.test(source)
}