@vertz/ui-server 0.2.32 → 0.2.34
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/README.md +54 -50
- package/dist/bun-dev-server.d.ts +14 -1
- package/dist/bun-dev-server.js +11 -4
- package/dist/index.js +7 -7
- package/dist/node-handler.js +2 -2
- package/dist/shared/{chunk-gbcsa7h1.js → chunk-2kx402c1.js} +3 -204
- package/dist/shared/{chunk-34fexgex.js → chunk-hx7drzm3.js} +599 -409
- package/dist/shared/{chunk-es0406qq.js → chunk-xdb8qn68.js} +17 -5
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +2 -2
- package/package.json +18 -16
|
@@ -5,10 +5,12 @@ import {
|
|
|
5
5
|
resolveRouteModulepreload,
|
|
6
6
|
resolveSession,
|
|
7
7
|
safeSerialize,
|
|
8
|
+
ssrRenderAot,
|
|
8
9
|
ssrRenderProgressive,
|
|
9
10
|
ssrRenderSinglePass,
|
|
10
|
-
ssrStreamNavQueries
|
|
11
|
-
|
|
11
|
+
ssrStreamNavQueries,
|
|
12
|
+
toPrefetchSession
|
|
13
|
+
} from "./chunk-hx7drzm3.js";
|
|
12
14
|
|
|
13
15
|
// src/node-handler.ts
|
|
14
16
|
function createNodeHandler(options) {
|
|
@@ -21,7 +23,8 @@ function createNodeHandler(options) {
|
|
|
21
23
|
cacheControl,
|
|
22
24
|
sessionResolver,
|
|
23
25
|
manifest,
|
|
24
|
-
progressiveHTML
|
|
26
|
+
progressiveHTML,
|
|
27
|
+
aotManifest
|
|
25
28
|
} = options;
|
|
26
29
|
const { template, linkHeader, modulepreloadTags, splitResult } = precomputeHandlerState(options);
|
|
27
30
|
const useProgressive = progressiveHTML && splitResult && !(manifest?.routeEntries && Object.keys(manifest.routeEntries).length > 0);
|
|
@@ -50,11 +53,20 @@ function createNodeHandler(options) {
|
|
|
50
53
|
await handleProgressiveRequest(req, res, module, splitResult, url, ssrTimeout, nonce, fallbackMetrics, linkHeader, modulepreloadTags, routeChunkManifest, cacheControl, sessionScript, ssrAuth, manifest);
|
|
51
54
|
return;
|
|
52
55
|
}
|
|
53
|
-
const
|
|
56
|
+
const prefetchSession = ssrAuth ? toPrefetchSession(ssrAuth) : undefined;
|
|
57
|
+
const result = aotManifest ? await ssrRenderAot(module, url, {
|
|
58
|
+
aotManifest,
|
|
59
|
+
manifest,
|
|
54
60
|
ssrTimeout,
|
|
55
61
|
fallbackMetrics,
|
|
56
62
|
ssrAuth,
|
|
57
|
-
|
|
63
|
+
prefetchSession
|
|
64
|
+
}) : await ssrRenderSinglePass(module, url, {
|
|
65
|
+
ssrTimeout,
|
|
66
|
+
fallbackMetrics,
|
|
67
|
+
ssrAuth,
|
|
68
|
+
manifest,
|
|
69
|
+
prefetchSession
|
|
58
70
|
});
|
|
59
71
|
if (result.redirect) {
|
|
60
72
|
res.writeHead(302, { Location: result.redirect.to });
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -357,4 +357,4 @@ interface InjectIntoTemplateOptions {
|
|
|
357
357
|
* injects CSS before </head>, and ssrData before </body>.
|
|
358
358
|
*/
|
|
359
359
|
declare function injectIntoTemplate(options: InjectIntoTemplateOptions): string;
|
|
360
|
-
export { stripScriptsFromStaticHTML, ssrRenderToString, ssrDiscoverQueries, prerenderRoutes, loadAotManifest, injectIntoTemplate, filterPrerenderableRoutes, discoverRoutes, createSSRHandler, collectPrerenderPaths, SSRRenderResult, SSRModule, SSRHandlerOptions, SSRDiscoverResult, PrerenderResult, PrerenderOptions };
|
|
360
|
+
export { stripScriptsFromStaticHTML, ssrRenderToString, ssrDiscoverQueries, prerenderRoutes, loadAotManifest, injectIntoTemplate, filterPrerenderableRoutes, discoverRoutes, createSSRHandler, collectPrerenderPaths, SSRRenderResult, SSRModule, SSRHandlerOptions, SSRDiscoverResult, PrerenderResult, PrerenderOptions, AotManifest };
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSSRHandler,
|
|
3
3
|
loadAotManifest
|
|
4
|
-
} from "../shared/chunk-
|
|
4
|
+
} from "../shared/chunk-2kx402c1.js";
|
|
5
5
|
import {
|
|
6
6
|
injectIntoTemplate,
|
|
7
7
|
ssrDiscoverQueries,
|
|
8
8
|
ssrRenderToString
|
|
9
|
-
} from "../shared/chunk-
|
|
9
|
+
} from "../shared/chunk-hx7drzm3.js";
|
|
10
10
|
import"../shared/chunk-ybftdw1r.js";
|
|
11
11
|
// src/prerender.ts
|
|
12
12
|
async function discoverRoutes(module) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertz/ui-server",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.2.34",
|
|
6
4
|
"description": "Vertz UI server-side rendering runtime",
|
|
5
|
+
"license": "MIT",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
8
|
"url": "https://github.com/vertz-dev/vertz.git",
|
|
10
9
|
"directory": "packages/ui-server"
|
|
11
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"type": "module",
|
|
12
15
|
"main": "dist/index.js",
|
|
13
16
|
"types": "dist/index.d.ts",
|
|
14
17
|
"exports": {
|
|
@@ -49,40 +52,39 @@
|
|
|
49
52
|
"types": "./dist/node-handler.d.ts"
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"provenance": true
|
|
58
|
+
},
|
|
55
59
|
"scripts": {
|
|
56
60
|
"build": "bunup",
|
|
57
|
-
"test": "bun test",
|
|
61
|
+
"test": "bun test src/",
|
|
58
62
|
"test:integration": "bun test src/__tests__/bun-dev-server.integration.local.ts",
|
|
63
|
+
"test:e2e": "bunx playwright test",
|
|
59
64
|
"typecheck": "tsc --noEmit"
|
|
60
65
|
},
|
|
61
66
|
"dependencies": {
|
|
62
67
|
"@ampproject/remapping": "^2.3.0",
|
|
63
68
|
"@capsizecss/unpack": "^4.0.0",
|
|
64
69
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
65
|
-
"@vertz/core": "^0.2.
|
|
66
|
-
"@vertz/ui": "^0.2.
|
|
67
|
-
"@vertz/ui-compiler": "^0.2.
|
|
70
|
+
"@vertz/core": "^0.2.31",
|
|
71
|
+
"@vertz/ui": "^0.2.31",
|
|
72
|
+
"@vertz/ui-compiler": "^0.2.31",
|
|
68
73
|
"magic-string": "^0.30.0",
|
|
69
74
|
"sharp": "^0.34.5",
|
|
70
75
|
"ts-morph": "^27.0.2"
|
|
71
76
|
},
|
|
72
77
|
"devDependencies": {
|
|
73
|
-
"@
|
|
78
|
+
"@happy-dom/global-registrator": "^20.8.3",
|
|
79
|
+
"@playwright/test": "^1.58.2",
|
|
80
|
+
"@vertz/codegen": "^0.2.31",
|
|
74
81
|
"@vertz/ui-auth": "^0.2.19",
|
|
75
82
|
"bun-types": "^1.3.10",
|
|
76
83
|
"bunup": "^0.16.31",
|
|
77
|
-
"@happy-dom/global-registrator": "^20.8.3",
|
|
78
84
|
"happy-dom": "^20.8.3",
|
|
79
85
|
"typescript": "^5.7.0"
|
|
80
86
|
},
|
|
81
87
|
"engines": {
|
|
82
88
|
"node": ">=22"
|
|
83
|
-
},
|
|
84
|
-
"publishConfig": {
|
|
85
|
-
"access": "public",
|
|
86
|
-
"provenance": true
|
|
87
89
|
}
|
|
88
90
|
}
|