init cli center

This commit is contained in:
2025-12-18 01:51:51 +08:00
parent b9624e4f6f
commit 5b610fd600
45 changed files with 14946 additions and 21 deletions

View File

@@ -0,0 +1,13 @@
// @ts-ignore
export const basename = BASE_NAME;
console.log(basename);
export const wrapBasename = (path: string) => {
const hasEnd = path.endsWith('/')
if (basename) {
return `${basename}${path}` + (hasEnd ? '' : '/');
} else {
return path;
}
}

View File

@@ -0,0 +1,15 @@
import { Query } from '@kevisual/query'
const getUrl = () => {
const host = window.location.host
const isKevisual = host.includes('kevisual');
if (isKevisual) {
return '/api/router'
}
return '/client/router'
}
export const query = new Query({
url: getUrl()
});