create-voltapp 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/create-voltapp.js
CHANGED
|
@@ -77,7 +77,7 @@ const walk = (d) => readdirSync(d).flatMap((f) => (statSync(join(d, f)).isDirect
|
|
|
77
77
|
for (const file of walk(target)) {
|
|
78
78
|
if (!/\.(json|ts|tsx|html|md|css)$/.test(file)) continue;
|
|
79
79
|
const text = readFileSync(file, "utf8");
|
|
80
|
-
const next = text.replaceAll("{{name}}", name).replaceAll("{{version}}", pkg.version);
|
|
80
|
+
const next = text.replaceAll("{{name}}", name).replaceAll("{{version}}", pkg.frameworkVersion ?? pkg.version);
|
|
81
81
|
if (next !== text) writeFileSync(file, next);
|
|
82
82
|
}
|
|
83
83
|
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { createServer } from "node:http";
|
|
10
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
11
|
-
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
12
12
|
import { dirname, extname, join } from "node:path";
|
|
13
13
|
import { createApp, logger } from "@prouzbek/server";
|
|
14
14
|
import { serverFunctions } from "@prouzbek/server/fn";
|
|
@@ -31,7 +31,7 @@ if (!isProd) {
|
|
|
31
31
|
template = readFileSync(join(here, "index.html"), "utf8");
|
|
32
32
|
} else {
|
|
33
33
|
template = readFileSync(join(here, "dist/client/index.html"), "utf8");
|
|
34
|
-
renderPage = (await import(join(here, "dist/server/entry-server.js").
|
|
34
|
+
renderPage = (await import(pathToFileURL(join(here, "dist/server/entry-server.js")).href)).render;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
app.get("*", async (c) => {
|