@cedarjs/router 2.8.1-next.0 → 2.8.1-next.109
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/cjs/rsc/RscCache.d.ts +2 -2
- package/dist/cjs/rsc/RscCache.d.ts.map +1 -1
- package/dist/cjs/rsc/RscRoutes.js +4 -4
- package/dist/cjs/rsc/clientSsr.js +1 -1
- package/dist/cjs/rsc/utils.d.ts +4 -2
- package/dist/cjs/rsc/utils.d.ts.map +1 -1
- package/dist/cjs/rsc/utils.js +2 -2
- package/dist/rsc/RscCache.d.ts +2 -2
- package/dist/rsc/RscCache.d.ts.map +1 -1
- package/dist/rsc/RscRoutes.js +4 -4
- package/dist/rsc/clientSsr.js +1 -1
- package/dist/rsc/utils.d.ts +4 -2
- package/dist/rsc/utils.d.ts.map +1 -1
- package/dist/rsc/utils.js +2 -2
- package/package.json +5 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RscCache.d.ts","sourceRoot":"","sources":["../../../src/rsc/RscCache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,
|
|
1
|
+
{"version":3,"file":"RscCache.d.ts","sourceRoot":"","sources":["../../../src/rsc/RscCache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED;;;;;;GAMG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAwC;IACrD,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,WAAW,CAAI;IAEvB,OAAO,CAAC,SAAS,CAAQ;;IAgDzB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,SAAS;IAMhD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC;IA2B1C,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,qBAAqB;CAW9B"}
|
|
@@ -51,7 +51,7 @@ async function rsaFetch(serializedLocation, rsaId, rsaArgs) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
function rscFetch(serializedLocation) {
|
|
54
|
-
const rscId = "
|
|
54
|
+
const rscId = "__cedarjs__Routes";
|
|
55
55
|
return fetch(BASE_PATH + rscId + "?" + serializedLocation, {
|
|
56
56
|
headers: { "rw-rsc": "1" }
|
|
57
57
|
});
|
|
@@ -85,7 +85,7 @@ function rscFetchRoutes(serializedLocation) {
|
|
|
85
85
|
const modelPromise2 = (0, import_client.createFromFetch)(responsePromise, options);
|
|
86
86
|
rscCache.set(rscCacheKey2, modelPromise2);
|
|
87
87
|
const model = await modelPromise2;
|
|
88
|
-
return model.
|
|
88
|
+
return model.__cedarjs__rsa_data;
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
const modelPromise = (0, import_client.createFromFetch)(rscFetch(serializedLocation), options);
|
|
@@ -93,7 +93,7 @@ function rscFetchRoutes(serializedLocation) {
|
|
|
93
93
|
return modelPromise;
|
|
94
94
|
}
|
|
95
95
|
const RscRoutes = ({ pathname, search }) => {
|
|
96
|
-
const serializedLocation = `
|
|
96
|
+
const serializedLocation = `__cedarjs__pathname=${pathname}&__cedarjs__search=${search}`;
|
|
97
97
|
const [currentRscCacheKey, setCurrentRscCacheKey] = (0, import_react.useState)(() => {
|
|
98
98
|
console.log("RscRoutes :: useState initial value");
|
|
99
99
|
rscFetchRoutes(serializedLocation);
|
|
@@ -116,7 +116,7 @@ const RscRoutes = ({ pathname, search }) => {
|
|
|
116
116
|
if (!rscModelPromise) {
|
|
117
117
|
throw new Error("Missing RSC cache entry for " + currentRscCacheKey);
|
|
118
118
|
}
|
|
119
|
-
return (0, import_react.use)(rscModelPromise).
|
|
119
|
+
return (0, import_react.use)(rscModelPromise).__cedarjs__Routes[0];
|
|
120
120
|
};
|
|
121
121
|
// Annotate the CommonJS export names for ESM import in node:
|
|
122
122
|
0 && (module.exports = {
|
|
@@ -45,7 +45,7 @@ async function getRoutesComponent() {
|
|
|
45
45
|
const { serverEntries } = await getEntries();
|
|
46
46
|
const entryPath = import_node_path.default.join(
|
|
47
47
|
(0, import_project_config.getPaths)().web.distRsc,
|
|
48
|
-
serverEntries["
|
|
48
|
+
serverEntries["__cedarjs__Routes"]
|
|
49
49
|
);
|
|
50
50
|
console.log("getRoutesComponent entryPath", entryPath);
|
|
51
51
|
const routesModule = await import((0, import_utils2.makeFilePath)(entryPath));
|
package/dist/cjs/rsc/utils.d.ts
CHANGED
|
@@ -6,13 +6,15 @@ export declare function makeFilePath(path: string): string;
|
|
|
6
6
|
/**
|
|
7
7
|
* See vite/streamHelpers.ts.
|
|
8
8
|
*
|
|
9
|
-
* This function ensures we load the same version of rsdw_client to prevent
|
|
9
|
+
* This function ensures we load the same version of rsdw_client to prevent
|
|
10
|
+
* multiple instances of React
|
|
10
11
|
*/
|
|
11
12
|
export declare function importReact(): Promise<any>;
|
|
12
13
|
/**
|
|
13
14
|
* See vite/streamHelpers.ts.
|
|
14
15
|
*
|
|
15
|
-
* This function ensures we load the same version of rsdw_client to prevent
|
|
16
|
+
* This function ensures we load the same version of rsdw_client to prevent
|
|
17
|
+
* multiple instances of React
|
|
16
18
|
*/
|
|
17
19
|
export declare function importRsdwClient(): Promise<RSDWClientType>;
|
|
18
20
|
export declare function importRsdwServer(): Promise<RSDWServerType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/rsc/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAIvF,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAC7C,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/rsc/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAIvF,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAC7C,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,iBAKhC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,cAAc,CAAC,CAOhE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,cAAc,CAAC,CAWhE"}
|
package/dist/cjs/rsc/utils.js
CHANGED
|
@@ -42,13 +42,13 @@ function makeFilePath(path2) {
|
|
|
42
42
|
}
|
|
43
43
|
async function importReact() {
|
|
44
44
|
const distSsr = (0, import_project_config.getPaths)().web.distSsr;
|
|
45
|
-
const reactPath = makeFilePath(import_node_path.default.join(distSsr, "
|
|
45
|
+
const reactPath = makeFilePath(import_node_path.default.join(distSsr, "__cedarjs__react.mjs"));
|
|
46
46
|
return (await import(reactPath)).default;
|
|
47
47
|
}
|
|
48
48
|
async function importRsdwClient() {
|
|
49
49
|
const distSsr = (0, import_project_config.getPaths)().web.distSsr;
|
|
50
50
|
const rsdwClientPath = makeFilePath(
|
|
51
|
-
import_node_path.default.join(distSsr, "
|
|
51
|
+
import_node_path.default.join(distSsr, "__cedarjs__rsdw-client.mjs")
|
|
52
52
|
);
|
|
53
53
|
return (await import(rsdwClientPath)).default;
|
|
54
54
|
}
|
package/dist/rsc/RscCache.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RscCache.d.ts","sourceRoot":"","sources":["../../src/rsc/RscCache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,
|
|
1
|
+
{"version":3,"file":"RscCache.d.ts","sourceRoot":"","sources":["../../src/rsc/RscCache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED;;;;;;GAMG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAwC;IACrD,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,WAAW,CAAI;IAEvB,OAAO,CAAC,SAAS,CAAQ;;IAgDzB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,SAAS;IAMhD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC;IA2B1C,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,qBAAqB;CAW9B"}
|
package/dist/rsc/RscRoutes.js
CHANGED
|
@@ -28,7 +28,7 @@ async function rsaFetch(serializedLocation, rsaId, rsaArgs) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function rscFetch(serializedLocation) {
|
|
31
|
-
const rscId = "
|
|
31
|
+
const rscId = "__cedarjs__Routes";
|
|
32
32
|
return fetch(BASE_PATH + rscId + "?" + serializedLocation, {
|
|
33
33
|
headers: { "rw-rsc": "1" }
|
|
34
34
|
});
|
|
@@ -62,7 +62,7 @@ function rscFetchRoutes(serializedLocation) {
|
|
|
62
62
|
const modelPromise2 = createFromFetch(responsePromise, options);
|
|
63
63
|
rscCache.set(rscCacheKey2, modelPromise2);
|
|
64
64
|
const model = await modelPromise2;
|
|
65
|
-
return model.
|
|
65
|
+
return model.__cedarjs__rsa_data;
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
const modelPromise = createFromFetch(rscFetch(serializedLocation), options);
|
|
@@ -70,7 +70,7 @@ function rscFetchRoutes(serializedLocation) {
|
|
|
70
70
|
return modelPromise;
|
|
71
71
|
}
|
|
72
72
|
const RscRoutes = ({ pathname, search }) => {
|
|
73
|
-
const serializedLocation = `
|
|
73
|
+
const serializedLocation = `__cedarjs__pathname=${pathname}&__cedarjs__search=${search}`;
|
|
74
74
|
const [currentRscCacheKey, setCurrentRscCacheKey] = useState(() => {
|
|
75
75
|
console.log("RscRoutes :: useState initial value");
|
|
76
76
|
rscFetchRoutes(serializedLocation);
|
|
@@ -93,7 +93,7 @@ const RscRoutes = ({ pathname, search }) => {
|
|
|
93
93
|
if (!rscModelPromise) {
|
|
94
94
|
throw new Error("Missing RSC cache entry for " + currentRscCacheKey);
|
|
95
95
|
}
|
|
96
|
-
return use(rscModelPromise).
|
|
96
|
+
return use(rscModelPromise).__cedarjs__Routes[0];
|
|
97
97
|
};
|
|
98
98
|
export {
|
|
99
99
|
RscRoutes
|
package/dist/rsc/clientSsr.js
CHANGED
|
@@ -12,7 +12,7 @@ async function getRoutesComponent() {
|
|
|
12
12
|
const { serverEntries } = await getEntries();
|
|
13
13
|
const entryPath = path.join(
|
|
14
14
|
getPaths().web.distRsc,
|
|
15
|
-
serverEntries["
|
|
15
|
+
serverEntries["__cedarjs__Routes"]
|
|
16
16
|
);
|
|
17
17
|
console.log("getRoutesComponent entryPath", entryPath);
|
|
18
18
|
const routesModule = await import(makeFilePath(entryPath));
|
package/dist/rsc/utils.d.ts
CHANGED
|
@@ -6,13 +6,15 @@ export declare function makeFilePath(path: string): string;
|
|
|
6
6
|
/**
|
|
7
7
|
* See vite/streamHelpers.ts.
|
|
8
8
|
*
|
|
9
|
-
* This function ensures we load the same version of rsdw_client to prevent
|
|
9
|
+
* This function ensures we load the same version of rsdw_client to prevent
|
|
10
|
+
* multiple instances of React
|
|
10
11
|
*/
|
|
11
12
|
export declare function importReact(): Promise<any>;
|
|
12
13
|
/**
|
|
13
14
|
* See vite/streamHelpers.ts.
|
|
14
15
|
*
|
|
15
|
-
* This function ensures we load the same version of rsdw_client to prevent
|
|
16
|
+
* This function ensures we load the same version of rsdw_client to prevent
|
|
17
|
+
* multiple instances of React
|
|
16
18
|
*/
|
|
17
19
|
export declare function importRsdwClient(): Promise<RSDWClientType>;
|
|
18
20
|
export declare function importRsdwServer(): Promise<RSDWServerType>;
|
package/dist/rsc/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/rsc/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAIvF,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAC7C,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/rsc/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAIvF,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAC7C,KAAK,cAAc,GAAG,OAAO,gBAAgB,CAAA;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,iBAKhC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,cAAc,CAAC,CAOhE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,cAAc,CAAC,CAWhE"}
|
package/dist/rsc/utils.js
CHANGED
|
@@ -6,13 +6,13 @@ function makeFilePath(path2) {
|
|
|
6
6
|
}
|
|
7
7
|
async function importReact() {
|
|
8
8
|
const distSsr = getPaths().web.distSsr;
|
|
9
|
-
const reactPath = makeFilePath(path.join(distSsr, "
|
|
9
|
+
const reactPath = makeFilePath(path.join(distSsr, "__cedarjs__react.mjs"));
|
|
10
10
|
return (await import(reactPath)).default;
|
|
11
11
|
}
|
|
12
12
|
async function importRsdwClient() {
|
|
13
13
|
const distSsr = getPaths().web.distSsr;
|
|
14
14
|
const rsdwClientPath = makeFilePath(
|
|
15
|
-
path.join(distSsr, "
|
|
15
|
+
path.join(distSsr, "__cedarjs__rsdw-client.mjs")
|
|
16
16
|
);
|
|
17
17
|
return (await import(rsdwClientPath)).default;
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/router",
|
|
3
|
-
"version": "2.8.1-next.
|
|
3
|
+
"version": "2.8.1-next.109+be993981d",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -94,10 +94,8 @@
|
|
|
94
94
|
"test:watch": "vitest watch"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@
|
|
98
|
-
"@cedarjs/
|
|
99
|
-
"@cedarjs/server-store": "2.8.1-next.0+f9966f3d1",
|
|
100
|
-
"core-js": "3.48.0",
|
|
97
|
+
"@cedarjs/auth": "2.8.1-next.109+be993981d",
|
|
98
|
+
"@cedarjs/server-store": "2.8.1-next.109+be993981d",
|
|
101
99
|
"react": "18.3.1",
|
|
102
100
|
"react-dom": "18.3.1"
|
|
103
101
|
},
|
|
@@ -105,7 +103,7 @@
|
|
|
105
103
|
"@arethetypeswrong/cli": "0.18.2",
|
|
106
104
|
"@babel/cli": "7.28.6",
|
|
107
105
|
"@babel/core": "^7.26.10",
|
|
108
|
-
"@cedarjs/framework-tools": "2.8.1-next.
|
|
106
|
+
"@cedarjs/framework-tools": "2.8.1-next.109",
|
|
109
107
|
"@testing-library/jest-dom": "6.9.1",
|
|
110
108
|
"@types/react": "^18.2.55",
|
|
111
109
|
"@types/react-dom": "^18.2.19",
|
|
@@ -123,5 +121,5 @@
|
|
|
123
121
|
"publishConfig": {
|
|
124
122
|
"access": "public"
|
|
125
123
|
},
|
|
126
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "be993981d7e162a83244009c3f7ab9270c6773f3"
|
|
127
125
|
}
|