vue-ssr-lite 0.2.4 → 0.2.5
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/dist/SsrConfigCompileRuntime.d.ts +4 -0
- package/dist/SsrConfigCompileRuntime.d.ts.map +1 -1
- package/dist/chunks/{SsrHtmlRuntime-BiQCklqA.mjs → SsrHtmlRuntime-DlQTSRzv.mjs} +9 -4
- package/dist/chunks/{SsrServerRuntime-CkEnx8IY.mjs → SsrServerRuntime-Cwm6YaxC.mjs} +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/server.mjs +3 -3
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
|
@@ -64,6 +64,10 @@ export declare const extractSsrViteEntries: (config: SsrConfig) => SsrViteEntrie
|
|
|
64
64
|
* Load `ssr.config` for Vite entry discovery without going through the
|
|
65
65
|
* consumer's Vite plugin graph. Relative local imports are bundled; packages
|
|
66
66
|
* stay external.
|
|
67
|
+
*
|
|
68
|
+
* The bundled file is written under the project `node_modules` tree so Node can
|
|
69
|
+
* resolve bare imports like `vue-ssr-lite` from the consumer's dependencies.
|
|
70
|
+
* Writing under the OS temp directory breaks package resolution.
|
|
67
71
|
*/
|
|
68
72
|
export declare const loadSsrConfigFile: (root: string, configPath?: string) => Promise<SsrConfig>;
|
|
69
73
|
export declare const resolveSsrViteEntries: (root: string, configPath?: string) => Promise<SsrViteEntries>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SsrConfigCompileRuntime.d.ts","sourceRoot":"","sources":["../src/SsrConfigCompileRuntime.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,0BAA0B,EAE1B,uBAAuB,EAEvB,SAAS,EAET,aAAa,EACd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,wBA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B,CAkI3B,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { access as D,
|
|
2
|
-
import { tmpdir as L } from "node:os";
|
|
1
|
+
import { access as D, mkdir as I, writeFile as k, rm as q } from "node:fs/promises";
|
|
3
2
|
import { resolve as A, join as H } from "node:path";
|
|
4
3
|
import { pathToFileURL as z } from "node:url";
|
|
4
|
+
import { randomBytes as L } from "node:crypto";
|
|
5
5
|
import { e as m, g as j, a as B, r as W } from "./SsrSerialization-k-3aCFYt.mjs";
|
|
6
6
|
const b = (t) => String(Array.isArray(t) ? t[0] : t || "").split(",", 1)[0].trim(), F = 1e6;
|
|
7
7
|
class p extends Error {
|
|
@@ -257,7 +257,12 @@ const w = (t) => {
|
|
|
257
257
|
})).outputFiles?.[0]?.text;
|
|
258
258
|
if (!a)
|
|
259
259
|
throw new Error(`Failed to bundle SSR config: ${o}`);
|
|
260
|
-
const c =
|
|
260
|
+
const c = H(t, "node_modules", ".cache", "vue-ssr-lite");
|
|
261
|
+
await I(c, { recursive: !0 });
|
|
262
|
+
const l = H(
|
|
263
|
+
c,
|
|
264
|
+
`ssr.config.${L(6).toString("hex")}.mjs`
|
|
265
|
+
);
|
|
261
266
|
try {
|
|
262
267
|
await k(l, a, "utf8");
|
|
263
268
|
const i = await import(z(l).href), r = i.default ?? i, d = typeof r == "function" ? await r() : r;
|
|
@@ -267,7 +272,7 @@ const w = (t) => {
|
|
|
267
272
|
);
|
|
268
273
|
return d;
|
|
269
274
|
} finally {
|
|
270
|
-
await q(
|
|
275
|
+
await q(l, { force: !0 });
|
|
271
276
|
}
|
|
272
277
|
}, ut = async (t, e) => {
|
|
273
278
|
const o = await tt(t, e);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServer as ae } from "node:http";
|
|
2
2
|
import { stat as J, readFile as q } from "node:fs/promises";
|
|
3
3
|
import { resolve as z, sep as K, extname as ee } from "node:path";
|
|
4
|
-
import { o as ie, k as W, s as ce, q as le, g as de, p as ue, i as he, e as me } from "./SsrHtmlRuntime-
|
|
4
|
+
import { o as ie, k as W, s as ce, q as le, g as de, p as ue, i as he, e as me } from "./SsrHtmlRuntime-DlQTSRzv.mjs";
|
|
5
5
|
import { c as fe, h as pe, r as ge } from "./SsrApplicationRuntime-D4arUtsy.mjs";
|
|
6
6
|
import { renderToString as ye } from "@vue/server-renderer";
|
|
7
7
|
import { c as we } from "./SsrDiagnosticsRuntime-B5VbSgsA.mjs";
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { resolve as c, relative as f } from "node:path";
|
|
3
3
|
import { pathToFileURL as w } from "node:url";
|
|
4
|
-
import { r as S } from "./chunks/SsrHtmlRuntime-
|
|
5
|
-
import { c as b } from "./chunks/SsrServerRuntime-
|
|
4
|
+
import { r as S } from "./chunks/SsrHtmlRuntime-DlQTSRzv.mjs";
|
|
5
|
+
import { c as b } from "./chunks/SsrServerRuntime-Cwm6YaxC.mjs";
|
|
6
6
|
import { createServer as g } from "node:net";
|
|
7
7
|
const i = 1, a = 65535, h = (r) => {
|
|
8
8
|
const e = r?.trim();
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as v, a as C, i as T, r as _, b as A, d as M } from "./chunks/SsrServerRuntime-
|
|
2
|
-
import { n as m } from "./chunks/SsrHtmlRuntime-
|
|
3
|
-
import { S as F, a as P, b as D, c as I, d as K, e as L, f as N, g as U, i as X, h as j, l as k, m as z, j as B, p as O, k as V, r as Y, o as G, q as J, s as Q, t as W, u as Z, v as q, w as rr, x as tr } from "./chunks/SsrHtmlRuntime-
|
|
1
|
+
import { c as v, a as C, i as T, r as _, b as A, d as M } from "./chunks/SsrServerRuntime-Cwm6YaxC.mjs";
|
|
2
|
+
import { n as m } from "./chunks/SsrHtmlRuntime-DlQTSRzv.mjs";
|
|
3
|
+
import { S as F, a as P, b as D, c as I, d as K, e as L, f as N, g as U, i as X, h as j, l as k, m as z, j as B, p as O, k as V, r as Y, o as G, q as J, s as Q, t as W, u as Z, v as q, w as rr, x as tr } from "./chunks/SsrHtmlRuntime-DlQTSRzv.mjs";
|
|
4
4
|
import { S as er, b as or, i as ar, r as nr, u as ir } from "./chunks/SsrApplicationRuntime-D4arUtsy.mjs";
|
|
5
5
|
import { d as dr } from "./chunks/SsrConfigRuntime-D0DkOrVQ.mjs";
|
|
6
6
|
const u = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]), f = (r) => u.has(String(r ?? "").trim().toLowerCase()), w = (r, e) => {
|
package/dist/vite.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve as a } from "node:path";
|
|
2
2
|
import { normalizePath as m } from "vite";
|
|
3
|
-
import { p as S, w as h, t as g } from "./chunks/SsrHtmlRuntime-
|
|
3
|
+
import { p as S, w as h, t as g } from "./chunks/SsrHtmlRuntime-DlQTSRzv.mjs";
|
|
4
4
|
const y = [
|
|
5
5
|
"@vue/server-renderer",
|
|
6
6
|
"vue",
|