@cedarjs/router 1.0.0-canary.12857 → 1.0.0-canary.12860

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.
@@ -1 +1 @@
1
- {"version":3,"file":"clientSsr.d.ts","sourceRoot":"","sources":["../../../src/rsc/clientSsr.ts"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,gBAsFrD"}
1
+ {"version":3,"file":"clientSsr.d.ts","sourceRoot":"","sources":["../../../src/rsc/clientSsr.ts"],"names":[],"mappings":"AA2FA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,gBA0GrD"}
@@ -32,6 +32,7 @@ __export(clientSsr_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(clientSsr_exports);
34
34
  var import_node_path = __toESM(require("node:path"), 1);
35
+ var import_node_url = require("node:url");
35
36
  var import_project_config = require("@cedarjs/project-config");
36
37
  var import_ssrModuleMap = require("./ssrModuleMap.js");
37
38
  var import_utils = require("./utils.js");
@@ -111,6 +112,18 @@ async function renderRoutesSsr(pathname) {
111
112
  }
112
113
  }
113
114
  );
115
+ const serverModuleMap = new Proxy(
116
+ {},
117
+ {
118
+ get(_target, encodedId) {
119
+ console.log("serverModuleMap Proxy get encodedId", encodedId);
120
+ const [filePath, name] = encodedId.split("#");
121
+ const id = (0, import_node_url.pathToFileURL)(filePath).href;
122
+ console.log("serverModuleMap::Proxy id", id);
123
+ return { id, chunks: [id], name, async: true };
124
+ }
125
+ }
126
+ );
114
127
  const { createElement } = await (0, import_utils.importReact)();
115
128
  const { renderToReadableStream } = await (0, import_utils.importRsdwServer)();
116
129
  console.log("clientSsr.ts right before renderToReadableStream");
@@ -134,7 +147,11 @@ async function renderRoutesSsr(pathname) {
134
147
  })();
135
148
  const { createFromReadableStream } = await (0, import_utils.importRsdwClient)();
136
149
  const data = createFromReadableStream(streamForRendering, {
137
- ssrManifest: { moduleMap: import_ssrModuleMap.moduleMap, moduleLoading: null }
150
+ serverConsumerManifest: {
151
+ moduleMap: import_ssrModuleMap.moduleMap,
152
+ serverModuleMap,
153
+ moduleLoading: null
154
+ }
138
155
  });
139
156
  rscCache.set(pathname, data);
140
157
  return data;
@@ -1 +1 @@
1
- {"version":3,"file":"clientSsr.d.ts","sourceRoot":"","sources":["../../src/rsc/clientSsr.ts"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,gBAsFrD"}
1
+ {"version":3,"file":"clientSsr.d.ts","sourceRoot":"","sources":["../../src/rsc/clientSsr.ts"],"names":[],"mappings":"AA2FA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,gBA0GrD"}
@@ -1,4 +1,5 @@
1
1
  import path from "node:path";
2
+ import { pathToFileURL } from "node:url";
2
3
  import { getPaths } from "@cedarjs/project-config";
3
4
  import { moduleMap } from "./ssrModuleMap.js";
4
5
  import { importRsdwClient, importReact, importRsdwServer } from "./utils.js";
@@ -78,6 +79,18 @@ async function renderRoutesSsr(pathname) {
78
79
  }
79
80
  }
80
81
  );
82
+ const serverModuleMap = new Proxy(
83
+ {},
84
+ {
85
+ get(_target, encodedId) {
86
+ console.log("serverModuleMap Proxy get encodedId", encodedId);
87
+ const [filePath, name] = encodedId.split("#");
88
+ const id = pathToFileURL(filePath).href;
89
+ console.log("serverModuleMap::Proxy id", id);
90
+ return { id, chunks: [id], name, async: true };
91
+ }
92
+ }
93
+ );
81
94
  const { createElement } = await importReact();
82
95
  const { renderToReadableStream } = await importRsdwServer();
83
96
  console.log("clientSsr.ts right before renderToReadableStream");
@@ -101,7 +114,11 @@ async function renderRoutesSsr(pathname) {
101
114
  })();
102
115
  const { createFromReadableStream } = await importRsdwClient();
103
116
  const data = createFromReadableStream(streamForRendering, {
104
- ssrManifest: { moduleMap, moduleLoading: null }
117
+ serverConsumerManifest: {
118
+ moduleMap,
119
+ serverModuleMap,
120
+ moduleLoading: null
121
+ }
105
122
  });
106
123
  rscCache.set(pathname, data);
107
124
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/router",
3
- "version": "1.0.0-canary.12857+151cf09e5",
3
+ "version": "1.0.0-canary.12860+9ec038887",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -95,18 +95,18 @@
95
95
  },
96
96
  "dependencies": {
97
97
  "@babel/runtime-corejs3": "7.27.6",
98
- "@cedarjs/auth": "1.0.0-canary.12857",
99
- "@cedarjs/server-store": "1.0.0-canary.12857",
98
+ "@cedarjs/auth": "1.0.0-canary.12860",
99
+ "@cedarjs/server-store": "1.0.0-canary.12860",
100
100
  "core-js": "3.42.0",
101
- "react": "19.0.0-rc-f2df5694-20240916",
102
- "react-dom": "19.0.0-rc-f2df5694-20240916",
103
- "react-server-dom-webpack": "19.0.0-rc-f2df5694-20240916"
101
+ "react": "19.0.1",
102
+ "react-dom": "19.0.1",
103
+ "react-server-dom-webpack": "19.0.1"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@arethetypeswrong/cli": "0.18.2",
107
107
  "@babel/cli": "7.27.2",
108
108
  "@babel/core": "^7.26.10",
109
- "@cedarjs/framework-tools": "1.0.0-canary.12857",
109
+ "@cedarjs/framework-tools": "1.0.0-canary.12860",
110
110
  "@testing-library/jest-dom": "6.5.0",
111
111
  "@types/react": "^18.2.55",
112
112
  "@types/react-dom": "^18.2.19",
@@ -118,11 +118,11 @@
118
118
  "vitest": "3.2.4"
119
119
  },
120
120
  "peerDependencies": {
121
- "react": "19.0.0-rc-f2df5694-20240916",
122
- "react-dom": "19.0.0-rc-f2df5694-20240916"
121
+ "react": "19.0.1",
122
+ "react-dom": "19.0.1"
123
123
  },
124
124
  "publishConfig": {
125
125
  "access": "public"
126
126
  },
127
- "gitHead": "151cf09e56a331455f4c7f0334915c84bed58cc0"
127
+ "gitHead": "9ec03888701f57d65dff447701a69e05987d4788"
128
128
  }