This commit is contained in:
Rizky 2024-07-08 16:02:03 +07:00
parent 23573005eb
commit dfd99373da
4 changed files with 18 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
{
"files.exclude": {
"node_modules": true,
".vscode": true,
".gitignore": true,
".gitmodules": true,
"package-lock.json": true
},
"typescript.preferences.autoImportFileExcludePatterns": [
"./index.tsx",
"./server.ts"
]
}

View File

@ -26,7 +26,7 @@ export const ensureFiles = async (path: string, id_site: string) => {
const from = dir.path(`${tdir}/${t}`);
await dirAsync(dirname(to));
await copyAsync(from, to);
} else if (f === "typings/global.d.ts") {
} else if (["typings/global.d.ts", ".vscode/settings.json"].includes(f)) {
const from = dir.path(`${tdir}/${t}`);
await Bun.write(to, await Bun.file(from).arrayBuffer());
}
@ -92,8 +92,8 @@ export const ensureFiles = async (path: string, id_site: string) => {
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7",
uuid: "^9.0.1",
"xlsx": "npm:@e965/xlsx@^0.20.2-released.0",
"zod": "^3.22.4"
xlsx: "npm:@e965/xlsx@^0.20.2-released.0",
zod: "^3.22.4",
},
}),
{ mode: 777 }

View File

@ -78,16 +78,6 @@ const injectSiteScript = () => {
if (base_url === "*") {
base_url = `${location.protocol}//${location.host}`;
base.site.api_url = base_url;
} else {
try {
new URL(base_url);
} catch (e) {
if (location.hostname === "localhost") {
base_url = `http://localhost:4550`;
} else {
base_url = `https://prasi.avolut.com`;
}
}
}
if (!localStorage.getItem("api-ts-" + base_url)) {