@modern-js/server-core 2.46.1 → 2.47.0
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/plugin.js +2 -0
- package/dist/esm/plugin.js +2 -0
- package/dist/types/plugin.d.ts +28 -0
- package/package.json +6 -6
package/dist/cjs/plugin.js
CHANGED
|
@@ -50,6 +50,7 @@ const afterServerReset = (0, import_plugin.createParallelWorkflow)();
|
|
|
50
50
|
const extendSSRContext = (0, import_plugin.createAsyncWaterfall)();
|
|
51
51
|
const extendContext = (0, import_plugin.createAsyncPipeline)();
|
|
52
52
|
const handleError = (0, import_plugin.createParallelWorkflow)();
|
|
53
|
+
const handleSSRFallback = (0, import_plugin.createParallelWorkflow)();
|
|
53
54
|
const beforeMatch = (0, import_plugin.createAsyncPipeline)();
|
|
54
55
|
const afterMatch = (0, import_plugin.createAsyncPipeline)();
|
|
55
56
|
const prefetch = (0, import_plugin.createParallelWorkflow)();
|
|
@@ -94,6 +95,7 @@ const serverHooks = {
|
|
|
94
95
|
extendSSRContext,
|
|
95
96
|
extendContext,
|
|
96
97
|
handleError,
|
|
98
|
+
handleSSRFallback,
|
|
97
99
|
beforeMatch,
|
|
98
100
|
afterMatch,
|
|
99
101
|
prefetch,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -20,6 +20,7 @@ const afterServerReset = createParallelWorkflow();
|
|
|
20
20
|
const extendSSRContext = createAsyncWaterfall();
|
|
21
21
|
const extendContext = createAsyncPipeline();
|
|
22
22
|
const handleError = createParallelWorkflow();
|
|
23
|
+
const handleSSRFallback = createParallelWorkflow();
|
|
23
24
|
const beforeMatch = createAsyncPipeline();
|
|
24
25
|
const afterMatch = createAsyncPipeline();
|
|
25
26
|
const prefetch = createParallelWorkflow();
|
|
@@ -64,6 +65,7 @@ const serverHooks = {
|
|
|
64
65
|
extendSSRContext,
|
|
65
66
|
extendContext,
|
|
66
67
|
handleError,
|
|
68
|
+
handleSSRFallback,
|
|
67
69
|
beforeMatch,
|
|
68
70
|
afterMatch,
|
|
69
71
|
prefetch,
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -81,6 +81,10 @@ declare const serverHooks: {
|
|
|
81
81
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
82
82
|
error: Error;
|
|
83
83
|
}, unknown>;
|
|
84
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
85
|
+
ctx: ModernServerContext;
|
|
86
|
+
type: 'query' | 'error' | 'header';
|
|
87
|
+
}, unknown>;
|
|
84
88
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
85
89
|
context: ModernServerContext;
|
|
86
90
|
}, any>;
|
|
@@ -142,6 +146,10 @@ export declare const createServerManager: () => import("@modern-js/plugin").Asyn
|
|
|
142
146
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
143
147
|
error: Error;
|
|
144
148
|
}, unknown>;
|
|
149
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
150
|
+
ctx: ModernServerContext;
|
|
151
|
+
type: 'query' | 'error' | 'header';
|
|
152
|
+
}, unknown>;
|
|
145
153
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
146
154
|
context: ModernServerContext;
|
|
147
155
|
}, any>;
|
|
@@ -201,6 +209,10 @@ export declare const serverManager: import("@modern-js/plugin").AsyncManager<{
|
|
|
201
209
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
202
210
|
error: Error;
|
|
203
211
|
}, unknown>;
|
|
212
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
213
|
+
ctx: ModernServerContext;
|
|
214
|
+
type: 'query' | 'error' | 'header';
|
|
215
|
+
}, unknown>;
|
|
204
216
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
205
217
|
context: ModernServerContext;
|
|
206
218
|
}, any>;
|
|
@@ -266,6 +278,10 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
266
278
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
267
279
|
error: Error;
|
|
268
280
|
}, unknown>;
|
|
281
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
282
|
+
ctx: ModernServerContext;
|
|
283
|
+
type: 'query' | 'error' | 'header';
|
|
284
|
+
}, unknown>;
|
|
269
285
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
270
286
|
context: ModernServerContext;
|
|
271
287
|
}, any>;
|
|
@@ -324,6 +340,10 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
324
340
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
325
341
|
error: Error;
|
|
326
342
|
}, unknown>;
|
|
343
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
344
|
+
ctx: ModernServerContext;
|
|
345
|
+
type: 'query' | 'error' | 'header';
|
|
346
|
+
}, unknown>;
|
|
327
347
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
328
348
|
context: ModernServerContext;
|
|
329
349
|
}, any>;
|
|
@@ -378,6 +398,10 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
378
398
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
379
399
|
error: Error;
|
|
380
400
|
}, unknown>;
|
|
401
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
402
|
+
ctx: ModernServerContext;
|
|
403
|
+
type: 'query' | 'error' | 'header';
|
|
404
|
+
}, unknown>;
|
|
381
405
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
382
406
|
context: ModernServerContext;
|
|
383
407
|
}, any>;
|
|
@@ -436,6 +460,10 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
436
460
|
handleError: import("@modern-js/plugin").ParallelWorkflow<{
|
|
437
461
|
error: Error;
|
|
438
462
|
}, unknown>;
|
|
463
|
+
handleSSRFallback: import("@modern-js/plugin").ParallelWorkflow<{
|
|
464
|
+
ctx: ModernServerContext;
|
|
465
|
+
type: 'query' | 'error' | 'header';
|
|
466
|
+
}, unknown>;
|
|
439
467
|
beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
|
|
440
468
|
context: ModernServerContext;
|
|
441
469
|
}, any>;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.47.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@swc/helpers": "0.5.3",
|
|
36
|
-
"@modern-js/plugin": "2.
|
|
37
|
-
"@modern-js/utils": "2.
|
|
36
|
+
"@modern-js/plugin": "2.47.0",
|
|
37
|
+
"@modern-js/utils": "2.47.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/jest": "^29",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"jest": "^29",
|
|
44
44
|
"ts-jest": "^29.1.0",
|
|
45
45
|
"typescript": "^5",
|
|
46
|
-
"@
|
|
47
|
-
"@scripts/
|
|
48
|
-
"@
|
|
46
|
+
"@modern-js/types": "2.47.0",
|
|
47
|
+
"@scripts/build": "2.47.0",
|
|
48
|
+
"@scripts/jest-config": "2.47.0"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
51
|
"publishConfig": {
|