@cedarjs/vite 7.1.0 → 7.1.1-next.469
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/buildApp.d.ts.map +1 -1
- package/dist/buildApp.js +32 -11
- package/dist/buildRouteHooks.d.ts +7 -13
- package/dist/buildRouteHooks.d.ts.map +1 -1
- package/dist/buildRouteHooks.js +5 -10
- package/dist/bundled/react-server-dom-webpack.server.js +2263 -29124
- package/dist/devFeServer.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/jobsDevMiddleware.d.ts.map +1 -1
- package/dist/jobsDevMiddleware.js +29 -2
- package/dist/lib/sandboxChildren.d.ts +58 -0
- package/dist/lib/sandboxChildren.d.ts.map +1 -0
- package/dist/lib/sandboxChildren.js +157 -0
- package/dist/plugins/vite-plugin-cedar-cell.d.ts +2 -1
- package/dist/plugins/vite-plugin-cedar-cell.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedar-cell.js +30 -11
- package/dist/plugins/vite-plugin-cedar-parsed-scalars.d.ts +20 -0
- package/dist/plugins/vite-plugin-cedar-parsed-scalars.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-parsed-scalars.js +60 -0
- package/dist/plugins/vite-plugin-cedar-sandbox-children.d.ts +20 -0
- package/dist/plugins/vite-plugin-cedar-sandbox-children.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-sandbox-children.js +58 -0
- package/dist/plugins/vite-plugin-handler-als-wrapping.d.ts +2 -6
- package/dist/plugins/vite-plugin-handler-als-wrapping.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-handler-als-wrapping.js +4 -7
- package/dist/rsc/rscBuildClient.d.ts +1 -1
- package/dist/rsc/rscBuildForServer.d.ts +1 -1
- package/dist/rsc/rscBuildForSsr.d.ts +1 -1
- package/dist/runFeServer.js +3 -3
- package/dist/streaming/streamHelpers.d.ts +6 -1
- package/dist/streaming/streamHelpers.d.ts.map +1 -1
- package/dist/streaming/streamHelpers.js +1 -1
- package/package.json +46 -44
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { normalizePath } from "vite";
|
|
3
3
|
import { getPaths } from "@cedarjs/project-config";
|
|
4
|
-
function handlerAlsWrappingPlugin({
|
|
5
|
-
projectIsEsm = false
|
|
6
|
-
} = {}) {
|
|
4
|
+
function handlerAlsWrappingPlugin() {
|
|
7
5
|
return {
|
|
8
6
|
name: "handler-als-wrapping",
|
|
9
7
|
transform(code, id) {
|
|
@@ -17,12 +15,12 @@ function handlerAlsWrappingPlugin({
|
|
|
17
15
|
if (!normalizePath(id).startsWith(functionsDir + "/")) {
|
|
18
16
|
return null;
|
|
19
17
|
}
|
|
20
|
-
const wrapped = applyHandlerAlsWrapping(code
|
|
18
|
+
const wrapped = applyHandlerAlsWrapping(code);
|
|
21
19
|
return wrapped ? { code: wrapped, map: null } : null;
|
|
22
20
|
}
|
|
23
21
|
};
|
|
24
22
|
}
|
|
25
|
-
function applyHandlerAlsWrapping(code
|
|
23
|
+
function applyHandlerAlsWrapping(code) {
|
|
26
24
|
const handlerRe = /^export\s+(?:const|let|var)\s+handler(?:[^=]|=>)*?=(?![>=])/m;
|
|
27
25
|
const handlerMatch = handlerRe.exec(code);
|
|
28
26
|
if (!handlerMatch) {
|
|
@@ -30,8 +28,7 @@ function applyHandlerAlsWrapping(code, { projectIsEsm = false } = {}) {
|
|
|
30
28
|
}
|
|
31
29
|
const afterEquals = code.slice(handlerMatch.index + handlerMatch[0].length).trimStart();
|
|
32
30
|
const isAsync = /^async(?:\s*[\(\*]|\s+function)/.test(afterEquals);
|
|
33
|
-
const
|
|
34
|
-
const importStatement = `import { getAsyncStoreInstance as __cedar_getAsyncStoreInstance } from '${storePath}'
|
|
31
|
+
const importStatement = `import { getAsyncStoreInstance as __cedar_getAsyncStoreInstance } from '@cedarjs/context/dist/store.js'
|
|
35
32
|
`;
|
|
36
33
|
const handlerStart = handlerMatch.index;
|
|
37
34
|
const before = code.slice(0, handlerStart);
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* buildFeServer -> buildRscFeServer -> rscBuildClient
|
|
4
4
|
* Generate the client bundle
|
|
5
5
|
*/
|
|
6
|
-
export declare function rscBuildClient(clientEntryFiles: Record<string, string>): Promise<[import("rollup").OutputChunk, ...(import("rollup").
|
|
6
|
+
export declare function rscBuildClient(clientEntryFiles: Record<string, string>): Promise<[import("rollup").OutputChunk, ...(import("rollup").OutputAsset | import("rollup").OutputChunk)[]]>;
|
|
7
7
|
//# sourceMappingURL=rscBuildClient.d.ts.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* buildFeServer -> buildRscFeServer -> rscBuildForServer
|
|
4
4
|
* Generate the output to be used by the rsc worker (not the actual server!)
|
|
5
5
|
*/
|
|
6
|
-
export declare function rscBuildForServer(clientEntryFiles: Record<string, string>, serverEntryFiles: Record<string, string>, customModules: Record<string, string>): Promise<[import("rollup").OutputChunk, ...(import("rollup").
|
|
6
|
+
export declare function rscBuildForServer(clientEntryFiles: Record<string, string>, serverEntryFiles: Record<string, string>, customModules: Record<string, string>): Promise<[import("rollup").OutputChunk, ...(import("rollup").OutputAsset | import("rollup").OutputChunk)[]]>;
|
|
7
7
|
//# sourceMappingURL=rscBuildForServer.d.ts.map
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
export declare function rscBuildForSsr({ clientEntryFiles, verbose, }: {
|
|
6
6
|
clientEntryFiles: Record<string, string>;
|
|
7
7
|
verbose?: boolean;
|
|
8
|
-
}): Promise<[import("rollup").OutputChunk, ...(import("rollup").
|
|
8
|
+
}): Promise<[import("rollup").OutputChunk, ...(import("rollup").OutputAsset | import("rollup").OutputChunk)[]]>;
|
|
9
9
|
//# sourceMappingURL=rscBuildForSsr.d.ts.map
|
package/dist/runFeServer.js
CHANGED
|
@@ -67,7 +67,7 @@ async function runFeServer() {
|
|
|
67
67
|
"/assets",
|
|
68
68
|
express.static(rwPaths.web.distBrowser + "/assets", { index: false })
|
|
69
69
|
);
|
|
70
|
-
app.use(
|
|
70
|
+
app.use((req, _res, next) => {
|
|
71
71
|
const fullUrl = getFullUrl(req, rscEnabled);
|
|
72
72
|
const headers = convertExpressHeaders(req.headersDistinct);
|
|
73
73
|
const perReqStore = createPerRequestMap({ headers, fullUrl });
|
|
@@ -99,8 +99,8 @@ async function runFeServer() {
|
|
|
99
99
|
getStylesheetLinks,
|
|
100
100
|
getMiddlewareRouter: async () => middlewareRouter
|
|
101
101
|
});
|
|
102
|
-
app.get("*", createServerAdapter(routeHandler));
|
|
103
|
-
app.post("*", handleWithMiddleware());
|
|
102
|
+
app.get("/{*splat}", createServerAdapter(routeHandler));
|
|
103
|
+
app.post("/{*splat}", handleWithMiddleware());
|
|
104
104
|
app.listen(rwConfig.web.port);
|
|
105
105
|
console.log(
|
|
106
106
|
`Started production FE server on http://localhost:${rwConfig.web.port}`
|
|
@@ -3,9 +3,14 @@ import type { ServerAuthState } from '@cedarjs/auth/dist/AuthProvider/ServerAuth
|
|
|
3
3
|
import type { TagDescriptor } from '@cedarjs/web';
|
|
4
4
|
import type { MiddlewareResponse } from '@cedarjs/web/middleware';
|
|
5
5
|
import type { ServerEntryType } from '../types.js';
|
|
6
|
+
interface FallbackDocumentProps {
|
|
7
|
+
css: string[];
|
|
8
|
+
meta: TagDescriptor[];
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
6
11
|
interface RenderToStreamArgs {
|
|
7
12
|
ServerEntry: ServerEntryType;
|
|
8
|
-
FallbackDocument: React.FunctionComponent
|
|
13
|
+
FallbackDocument: React.FunctionComponent<FallbackDocumentProps>;
|
|
9
14
|
currentUrl: URL;
|
|
10
15
|
metaTags: TagDescriptor[];
|
|
11
16
|
cssLinks: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamHelpers.d.ts","sourceRoot":"","sources":["../../src/streaming/streamHelpers.ts"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ED,UAAU,aAAa;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAA;CAC/B;AA2BD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,kBAAkB,EACzB,aAAa,EAAE,kBAAkB,EACjC,aAAa,EAAE,aAAa,qBAgM7B;AA2BD,wBAAsB,YAAY,CAChC,GAAG,EACC,WAAW,GACX,kBAAkB,GAClB,qBAAqB,GACrB,iCAAiC,GACjC,0BAA0B,gBA6B/B"}
|
|
@@ -137,7 +137,7 @@ async function reactRenderToStreamResponse(mwRes, renderOptions, streamOptions)
|
|
|
137
137
|
console.error("\u{1F53B} Failed to render shell");
|
|
138
138
|
streamOptions.onError?.(e);
|
|
139
139
|
const fallbackShell = await renderToReadableStream(
|
|
140
|
-
FallbackDocument
|
|
140
|
+
createElement(FallbackDocument, {
|
|
141
141
|
children: null,
|
|
142
142
|
css: cssLinks,
|
|
143
143
|
meta: metaTags
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1-next.469",
|
|
4
4
|
"description": "Vite configuration package for CedarJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,80 +48,82 @@
|
|
|
48
48
|
"test:watch": "vitest watch"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
+
"@babel/core": "^7.26.10",
|
|
51
52
|
"@babel/generator": "7.29.8",
|
|
52
53
|
"@babel/parser": "7.29.9",
|
|
53
|
-
"@babel/
|
|
54
|
+
"@babel/preset-typescript": "7.29.7",
|
|
55
|
+
"@babel/traverse": "7.29.10",
|
|
54
56
|
"@babel/types": "7.29.8",
|
|
55
|
-
"@cedarjs/api": "7.1.
|
|
56
|
-
"@cedarjs/api-server": "7.1.
|
|
57
|
-
"@cedarjs/babel-config": "7.1.
|
|
58
|
-
"@cedarjs/context": "7.1.
|
|
59
|
-
"@cedarjs/graphql-server": "7.1.
|
|
60
|
-
"@cedarjs/internal": "7.1.
|
|
61
|
-
"@cedarjs/jobs": "7.1.
|
|
62
|
-
"@cedarjs/project-config": "7.1.
|
|
63
|
-
"@cedarjs/server-store": "7.1.
|
|
64
|
-
"@cedarjs/structure": "7.1.
|
|
65
|
-
"@cedarjs/testing": "7.1.
|
|
66
|
-
"@swc/core": "1.16.
|
|
67
|
-
"@universal-deploy/store": "^0.
|
|
68
|
-
"@universal-deploy/vite": "^0.
|
|
57
|
+
"@cedarjs/api": "7.1.1-next.469",
|
|
58
|
+
"@cedarjs/api-server": "7.1.1-next.469",
|
|
59
|
+
"@cedarjs/babel-config": "7.1.1-next.469",
|
|
60
|
+
"@cedarjs/context": "7.1.1-next.469",
|
|
61
|
+
"@cedarjs/graphql-server": "7.1.1-next.469",
|
|
62
|
+
"@cedarjs/internal": "7.1.1-next.469",
|
|
63
|
+
"@cedarjs/jobs": "7.1.1-next.469",
|
|
64
|
+
"@cedarjs/project-config": "7.1.1-next.469",
|
|
65
|
+
"@cedarjs/server-store": "7.1.1-next.469",
|
|
66
|
+
"@cedarjs/structure": "7.1.1-next.469",
|
|
67
|
+
"@cedarjs/testing": "7.1.1-next.469",
|
|
68
|
+
"@swc/core": "1.16.18",
|
|
69
|
+
"@universal-deploy/store": "^0.3.0",
|
|
70
|
+
"@universal-deploy/vite": "^0.2.0",
|
|
69
71
|
"@vitejs/plugin-react": "4.7.0",
|
|
70
|
-
"@whatwg-node/fetch": "0.
|
|
71
|
-
"@whatwg-node/server": "0.
|
|
72
|
-
"acorn": "8.
|
|
72
|
+
"@whatwg-node/fetch": "0.12.1",
|
|
73
|
+
"@whatwg-node/server": "0.13.0",
|
|
74
|
+
"acorn": "8.19.0",
|
|
73
75
|
"acorn-loose": "8.5.2",
|
|
74
76
|
"ansis": "4.4.0",
|
|
75
77
|
"busboy": "^1.6.0",
|
|
76
78
|
"dotenv-defaults": "5.0.2",
|
|
77
|
-
"express": "
|
|
79
|
+
"express": "5.3.0",
|
|
78
80
|
"fast-glob": "3.3.3",
|
|
79
|
-
"find-my-way": "9.
|
|
81
|
+
"find-my-way": "9.10.0",
|
|
80
82
|
"http-proxy-middleware": "3.0.7",
|
|
81
83
|
"isbot": "5.2.2",
|
|
82
84
|
"magic-string": "0.30.21",
|
|
83
|
-
"oxc-parser": "0.
|
|
84
|
-
"react-server-dom-webpack": "19.
|
|
85
|
+
"oxc-parser": "0.153.0",
|
|
86
|
+
"react-server-dom-webpack": "19.3.0",
|
|
85
87
|
"unimport": "5.7.0",
|
|
86
88
|
"unplugin-auto-import": "19.3.0",
|
|
87
|
-
"vite": "7.3.
|
|
89
|
+
"vite": "7.3.7",
|
|
88
90
|
"vite-plugin-cjs-interop": "2.4.4",
|
|
89
91
|
"vite-plugin-graphql-tag": "0.1.1",
|
|
90
92
|
"vite-tsconfig-paths": "^6.1.1",
|
|
91
|
-
"ws": "8.
|
|
93
|
+
"ws": "8.22.0",
|
|
92
94
|
"yargs-parser": "21.1.1"
|
|
93
95
|
},
|
|
94
96
|
"devDependencies": {
|
|
95
|
-
"@cedarjs/auth": "7.1.
|
|
96
|
-
"@cedarjs/framework-tools": "7.1.
|
|
97
|
-
"@cedarjs/router": "7.1.
|
|
98
|
-
"@cedarjs/web": "7.1.
|
|
97
|
+
"@cedarjs/auth": "7.1.1-next.469",
|
|
98
|
+
"@cedarjs/framework-tools": "7.1.1-next.469",
|
|
99
|
+
"@cedarjs/router": "7.1.1-next.469",
|
|
100
|
+
"@cedarjs/web": "7.1.1-next.469",
|
|
99
101
|
"@dr.pogodin/react-helmet": "2.0.4",
|
|
100
102
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|
|
101
103
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
102
|
-
"@oxc-project/types": "^0.
|
|
103
|
-
"@types/aws-lambda": "8.10.
|
|
104
|
+
"@oxc-project/types": "^0.153.0",
|
|
105
|
+
"@types/aws-lambda": "8.10.164",
|
|
104
106
|
"@types/busboy": "^1",
|
|
105
|
-
"@types/express": "
|
|
106
|
-
"@types/react": "^
|
|
107
|
+
"@types/express": "5.0.6",
|
|
108
|
+
"@types/react": "^19.2.0",
|
|
107
109
|
"@types/ws": "^8",
|
|
108
110
|
"@types/yargs-parser": "21.0.3",
|
|
109
|
-
"concurrently": "9.2.
|
|
110
|
-
"memfs": "4.
|
|
111
|
-
"publint": "0.3.
|
|
112
|
-
"react": "
|
|
113
|
-
"react-dom": "
|
|
114
|
-
"rollup": "4.
|
|
111
|
+
"concurrently": "9.2.5",
|
|
112
|
+
"memfs": "4.80.0",
|
|
113
|
+
"publint": "0.3.25",
|
|
114
|
+
"react": "19.3.0",
|
|
115
|
+
"react-dom": "19.3.0",
|
|
116
|
+
"rollup": "4.64.5",
|
|
115
117
|
"ts-dedent": "2.3.0",
|
|
116
118
|
"typescript": "5.9.3",
|
|
117
119
|
"vitest": "4.1.11"
|
|
118
120
|
},
|
|
119
121
|
"peerDependencies": {
|
|
120
|
-
"@cedarjs/auth": "7.1.
|
|
121
|
-
"@cedarjs/router": "7.1.
|
|
122
|
-
"@cedarjs/web": "7.1.
|
|
123
|
-
"react": "
|
|
124
|
-
"react-dom": "
|
|
122
|
+
"@cedarjs/auth": "7.1.1-next.469",
|
|
123
|
+
"@cedarjs/router": "7.1.1-next.469",
|
|
124
|
+
"@cedarjs/web": "7.1.1-next.469",
|
|
125
|
+
"react": "19.3.0",
|
|
126
|
+
"react-dom": "19.3.0"
|
|
125
127
|
},
|
|
126
128
|
"engines": {
|
|
127
129
|
"node": ">=24"
|