This commit is contained in:
Rizky
2024-02-10 15:58:04 +07:00
parent 18d389b73e
commit aa6cdbf539
9 changed files with 127 additions and 251 deletions
+8 -54
View File
@@ -20,65 +20,19 @@ export const g = global as unknown as {
mode: "dev" | "prod";
server: Server;
log: Logger;
firebaseInit: boolean,
firebaseInit: boolean;
firebase: admin.app.App;
notif: {
db: Database;
};
api: Record<string, SingleRoute>;
domains: null | Record<string, string>;
web: Record<
string,
{
site_id: string;
current: number;
deploying: null | { status: string; received: number; total: number };
deploys: number[];
domains: string[];
router: null | RadixRouter<{ id: string }>;
cacheKey: number;
cache: null | {
site: {
id: string;
name: string;
favicon: string;
domain: string;
id_user: string;
created_at: Date | null;
id_org: string | null;
updated_at: Date | null;
responsive: string;
} | null;
pages: {
id: string;
name: string;
url: string;
content_tree: any;
id_site: string;
created_at: Date | null;
js_compiled: string | null;
js: string | null;
updated_at: Date | null;
id_folder: string | null;
is_deleted: boolean;
}[];
npm: {
site: Record<string, string>;
pages: Record<string, Record<string, string>>;
};
comps: {
id: string;
name: string;
content_tree: any;
created_at: Date | null;
updated_at: Date | null;
type: string;
id_component_group: string | null;
props: any;
}[];
};
}
>;
web: {
site_id: string;
current: number;
deploying: null | { status: string; received: number; total: number };
deploys: number[];
router: RadixRouter<SingleRoute>;
};
router: RadixRouter<SingleRoute>;
port: number;
frm: {
+1 -1
View File
@@ -1,6 +1,6 @@
import { gzip, gunzip } from "zlib";
export const gzipAsync = (bin: Uint8Array) => {
export const gzipAsync = (bin: Uint8Array | string) => {
return new Promise<Buffer>((resolve, reject) => {
gzip(bin, (err, res) => {
if (err) {