checkpoint
This commit is contained in:
parent
2e1618721f
commit
29f91a7b5b
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,2 @@
|
|||
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
/*# sourceMappingURL=font-LBWDSK65.css.map */
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import{d as o,e as f,g as s}from"./chunk-MAXH2HJU.js";o();s();f();
|
||||
//# sourceMappingURL=font-WINJX3PY.js.map
|
||||
|
|
@ -1 +1,2 @@
|
|||
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
/*# sourceMappingURL=main.css.map */
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -39,62 +39,68 @@ export const syncHandler: WebSocketHandler<WSData> = {
|
|||
}
|
||||
},
|
||||
async message(ws, raw) {
|
||||
const conn_id = wconns.get(ws);
|
||||
if (conn_id) {
|
||||
const conn = conns.get(conn_id);
|
||||
if (conn) {
|
||||
const msg = packr.unpack(Buffer.from(raw));
|
||||
if (msg.type === "preview") {
|
||||
previewLiveReload(ws, msg);
|
||||
}
|
||||
if (msg.type === SyncType.UserID) {
|
||||
const { user_id, page_id, site_id } = msg;
|
||||
conn.user_id = user_id;
|
||||
|
||||
conn.user = await _db.user.findFirst({ where: { id: user_id } });
|
||||
let conf = await user.conf.getOrCreate(user_id);
|
||||
if (site_id) {
|
||||
const newconf = await loadSitePage(user_id, site_id, page_id);
|
||||
if (newconf) conf = newconf;
|
||||
} else if (!conf.site_id) {
|
||||
await loadDefaultSite(user_id);
|
||||
try {
|
||||
const conn_id = wconns.get(ws);
|
||||
if (conn_id) {
|
||||
const conn = conns.get(conn_id);
|
||||
if (conn) {
|
||||
const msg = packr.unpack(Buffer.from(raw));
|
||||
if (msg.type === "preview") {
|
||||
previewLiveReload(ws, msg);
|
||||
}
|
||||
conn.conf = new Proxy(conf, {
|
||||
get(_, p) {
|
||||
const conf = user.conf.get(user_id);
|
||||
if (p === "toJSON") return () => conf;
|
||||
if (conf) return conf[p as keyof typeof conf];
|
||||
},
|
||||
set(_, p, newValue) {
|
||||
user.conf.set(user_id, p as keyof UserConf, newValue);
|
||||
return true;
|
||||
},
|
||||
}) as UserConf & { toJSON: () => UserConf };
|
||||
sendWS(ws, {
|
||||
type: SyncType.Event,
|
||||
event: "editor_start" as ClientEvent,
|
||||
data: conn.conf.toJSON(),
|
||||
});
|
||||
}
|
||||
if (msg.type === SyncType.Action) {
|
||||
const code = msg.code as keyof typeof SyncActionPaths;
|
||||
const actionName = SyncActionPaths[code].replace(/\./gi, "_");
|
||||
if (actionName) {
|
||||
const baseAction = (actions as any)[actionName];
|
||||
if (!baseAction) {
|
||||
console.log(`app/srv/ws/sync/actions/${actionName}.ts not found`);
|
||||
if (msg.type === SyncType.UserID) {
|
||||
const { user_id, page_id, site_id } = msg;
|
||||
conn.user_id = user_id;
|
||||
|
||||
conn.user = await _db.user.findFirst({ where: { id: user_id } });
|
||||
let conf = await user.conf.getOrCreate(user_id);
|
||||
if (site_id) {
|
||||
const newconf = await loadSitePage(user_id, site_id, page_id);
|
||||
if (newconf) conf = newconf;
|
||||
} else if (!conf.site_id) {
|
||||
await loadDefaultSite(user_id);
|
||||
}
|
||||
if (baseAction) {
|
||||
const action = baseAction.bind(conn);
|
||||
sendWS(ws, {
|
||||
type: SyncType.ActionResult,
|
||||
argid: msg.argid,
|
||||
val: await action(...msg.args),
|
||||
});
|
||||
conn.conf = new Proxy(conf, {
|
||||
get(_, p) {
|
||||
const conf = user.conf.get(user_id);
|
||||
if (p === "toJSON") return () => conf;
|
||||
if (conf) return conf[p as keyof typeof conf];
|
||||
},
|
||||
set(_, p, newValue) {
|
||||
user.conf.set(user_id, p as keyof UserConf, newValue);
|
||||
return true;
|
||||
},
|
||||
}) as UserConf & { toJSON: () => UserConf };
|
||||
sendWS(ws, {
|
||||
type: SyncType.Event,
|
||||
event: "editor_start" as ClientEvent,
|
||||
data: conn.conf.toJSON(),
|
||||
});
|
||||
}
|
||||
if (msg.type === SyncType.Action) {
|
||||
const code = msg.code as keyof typeof SyncActionPaths;
|
||||
const actionName = SyncActionPaths[code].replace(/\./gi, "_");
|
||||
if (actionName) {
|
||||
const baseAction = (actions as any)[actionName];
|
||||
if (!baseAction) {
|
||||
console.log(
|
||||
`app/srv/ws/sync/actions/${actionName}.ts not found`
|
||||
);
|
||||
}
|
||||
if (baseAction) {
|
||||
const action = baseAction.bind(conn);
|
||||
sendWS(ws, {
|
||||
type: SyncType.ActionResult,
|
||||
argid: msg.argid,
|
||||
val: await action(...msg.args),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "web",
|
||||
"@parcel/bundler-default": {
|
||||
"minBundles": 1e7,
|
||||
"minBundles": 10000000,
|
||||
"minBundleSize": 3000,
|
||||
"maxParallelRequests": 20
|
||||
},
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,2 @@
|
|||
n ŚÔbÍît-—˙~^”ŠłśŮłb˛Ł2aąóbŃńá/G~@vďĆśíI? 4°8<EFBFBD>‰a<EFBFBD>7č.đš‘x'Ř_?nÖŘţsDôŢ~ҤΚˇ´8Ý=Čç\cŘgR´Đ˙ĺ®nÔk<EFBFBD>ŚT¨UK˘ęb«ŃnE<EFBFBD>ühvÚJbŘnDşŰŮ+ů%#„·f×çO{b@ĐĹőĄÄ†ŻâPcç
|
||||
k 2«Ŕ95ř‡S"šRyĄ#čîĂ»ˇ¬ůŘ<EFBFBD>7qśgŽPÁS•Wz‡˘Čś0Ä-ÄówĆň_ţ}(„
D|/ř3Ú8G:z <EFBFBD>'—Ë!SÖfaŮXŽ;đîkë˘UžČVŁžy¨ž[´ĺa®*ËĂř<EFBFBD> U‘€<EFBFBD>pŹĆ÷…(ao–X:IŽCU‘Ö<EFBFBD>LŮŔg¶+U>eAhXasÓáéc8¸®4±q’Ž|2<EFBFBD>aV˘Ö yň…ękz,G6ž«H‰Ľ¦†8^?k!‡Śą…ł°†˙ş<EFBFBD>+¶»¨öř÷*ŁH6v<EFBFBD>áŰöčůáj$ Ď“›â(ÇŇ<EFBFBD>›âÄ9–
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue