Update package-lock.

This commit is contained in:
Dillon Kearns 2022-02-01 10:55:46 -08:00
parent db4e2f289e
commit 0418d98de3
2 changed files with 19 additions and 2 deletions

View File

@ -26,9 +26,12 @@
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"busboy": "^1.0.0",
"chokidar": "3.5.2",
"commander": "8.3.0",
"connect": "^3.7.0",
"cookie": "^0.4.1",
"cookie-signature": "^1.1.0",
"cross-spawn": "7.0.3",
"devcert": "^1.2.0",
"elm-doc-preview": "^5.0.5",
@ -57,7 +60,7 @@
"@types/serve-static": "1.13.10",
"cypress": "^8.3.0",
"elm-optimize-level-2": "^0.1.5",
"elm-review": "^2.5.3",
"elm-review": "^2.7.0",
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.2.0",
@ -1441,16 +1444,19 @@
"@types/micromatch": "^4.0.2",
"@types/node": "12.20.12",
"@types/serve-static": "1.13.10",
"busboy": "^1.0.0",
"chokidar": "3.5.2",
"commander": "8.3.0",
"connect": "^3.7.0",
"cookie": "^0.4.1",
"cookie-signature": "^1.1.0",
"cross-spawn": "7.0.3",
"cypress": "^8.3.0",
"devcert": "^1.2.0",
"elm-doc-preview": "^5.0.5",
"elm-hot": "^1.1.6",
"elm-optimize-level-2": "^0.1.5",
"elm-review": "^2.5.3",
"elm-review": "^2.7.0",
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.2.0",

View File

@ -27,6 +27,7 @@ async function run({ mode, pathname, serverRequest }) {
if (mode === "dev-server") {
parentPort.postMessage({ tag: "done", data: renderResult });
} else if (mode === "build") {
console.log("@@@renderResult", renderResult);
outputString(renderResult, pathname);
} else {
throw `Unknown mode ${mode}`;
@ -61,6 +62,7 @@ async function outputString(
/** @type { { kind: 'page'; data: PageProgress } | { kind: 'api'; data: Object } } */ fromElm,
/** @type string */ pathname
) {
console.log("@@@build fromElm", Object.keys(fromElm));
switch (fromElm.kind) {
case "html": {
const args = fromElm;
@ -76,6 +78,15 @@ async function outputString(
`dist/${normalizedRoute}/content.json`,
contentJsonString
);
console.log(
"Buffer thing",
args.contentBytes && Buffer.from(args.contentBytes.buffer)
);
args.contentBytes &&
fs.writeFileSync(
`dist/${normalizedRoute}/content.dat`,
Buffer.from(args.contentBytes.buffer)
);
parentPort.postMessage({ tag: "done" });
break;
}