fix
This commit is contained in:
parent
d6644860ee
commit
c33e081841
|
|
@ -1,6 +1,6 @@
|
|||
import { $ } from "bun";
|
||||
import Database from "bun:sqlite";
|
||||
import { copyAsync, removeAsync } from "fs-jetpack";
|
||||
import { copyAsync } from "fs-jetpack";
|
||||
import mime from "mime";
|
||||
import { deploy } from "utils/deploy";
|
||||
import { dir } from "utils/dir";
|
||||
|
|
@ -50,6 +50,7 @@ export const _ = {
|
|||
content: g.deploy.content?.site?.config?.api_url || "",
|
||||
});
|
||||
const gz = g.deploy.content;
|
||||
|
||||
if (gz) {
|
||||
let layout = null as null | SinglePage;
|
||||
for (const l of gz.layouts) {
|
||||
|
|
@ -80,7 +81,7 @@ export const _ = {
|
|||
add({
|
||||
path: "load-js",
|
||||
type: "",
|
||||
content: await getContent("load.js.prod", api_url),
|
||||
content: await getContent("load.js.prod", `"${api_url}"`),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ export const createResponse = (
|
|||
|
||||
if (opt?.cache_accept) {
|
||||
let cached = false;
|
||||
|
||||
if (
|
||||
opt?.high_compression &&
|
||||
opt.cache_accept.toLowerCase().includes("br")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const serveWeb = async (arg: {
|
|||
|
||||
return createResponse(arg.content, {
|
||||
cache_accept: arg.cache_accept,
|
||||
high_compression: false,
|
||||
high_compression: true,
|
||||
headers: !type ? undefined : { "content-type": type },
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export const deploy = {
|
|||
}
|
||||
|
||||
console.log(
|
||||
`Downloading site deploy: ${this.config.site_id} [ts: ${this.config.deploy.ts}]`
|
||||
`Downloading site deploy: ${this.config.site_id} [ts: ${this.config.deploy.ts}] ${base_url}`
|
||||
);
|
||||
const res = await fetch(
|
||||
`${base_url}/prod-zip/${this.config.site_id}?ts=${Date.now()}&msgpack=1`
|
||||
|
|
|
|||
Loading…
Reference in New Issue