@modern-js/server-core 2.43.0 → 2.45.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
CHANGED
|
@@ -56,6 +56,7 @@ const prefetch = (0, import_plugin.createParallelWorkflow)();
|
|
|
56
56
|
const renderToString = (0, import_plugin.createAsyncPipeline)();
|
|
57
57
|
const beforeRender = (0, import_plugin.createAsyncPipeline)();
|
|
58
58
|
const afterRender = (0, import_plugin.createAsyncPipeline)();
|
|
59
|
+
const afterStreamingRender = (0, import_plugin.createAsyncPipeline)();
|
|
59
60
|
const beforeSend = (0, import_plugin.createAsyncPipeline)();
|
|
60
61
|
const afterSend = (0, import_plugin.createParallelWorkflow)();
|
|
61
62
|
const reset = (0, import_plugin.createParallelWorkflow)();
|
|
@@ -99,6 +100,7 @@ const serverHooks = {
|
|
|
99
100
|
renderToString,
|
|
100
101
|
beforeRender,
|
|
101
102
|
afterRender,
|
|
103
|
+
afterStreamingRender,
|
|
102
104
|
beforeSend,
|
|
103
105
|
afterSend,
|
|
104
106
|
reset
|
package/dist/esm/plugin.js
CHANGED
|
@@ -26,6 +26,7 @@ const prefetch = createParallelWorkflow();
|
|
|
26
26
|
const renderToString = createAsyncPipeline();
|
|
27
27
|
const beforeRender = createAsyncPipeline();
|
|
28
28
|
const afterRender = createAsyncPipeline();
|
|
29
|
+
const afterStreamingRender = createAsyncPipeline();
|
|
29
30
|
const beforeSend = createAsyncPipeline();
|
|
30
31
|
const afterSend = createParallelWorkflow();
|
|
31
32
|
const reset = createParallelWorkflow();
|
|
@@ -69,6 +70,7 @@ const serverHooks = {
|
|
|
69
70
|
renderToString,
|
|
70
71
|
beforeRender,
|
|
71
72
|
afterRender,
|
|
73
|
+
afterStreamingRender,
|
|
72
74
|
beforeSend,
|
|
73
75
|
afterSend,
|
|
74
76
|
reset
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { IncomingMessage, ServerResponse } from 'http';
|
|
|
4
4
|
import { Readable } from 'stream';
|
|
5
5
|
import type { Component } from 'react';
|
|
6
6
|
import { CommonAPI, ToThreads, AsyncSetup, PluginOptions } from '@modern-js/plugin';
|
|
7
|
-
import type { ModernServerContext, BaseSSRServerContext, AfterMatchContext, AfterRenderContext, MiddlewareContext, ISAppContext, ServerRoute, HttpMethodDecider, ServerInitHookContext } from '@modern-js/types';
|
|
7
|
+
import type { ModernServerContext, BaseSSRServerContext, AfterMatchContext, AfterRenderContext, MiddlewareContext, ISAppContext, ServerRoute, HttpMethodDecider, ServerInitHookContext, AfterStreamingRenderContext } from '@modern-js/types';
|
|
8
8
|
import type { BffUserConfig, ServerOptions, UserConfig } from './types/config';
|
|
9
9
|
export type WebAdapter = (ctx: MiddlewareContext) => void | Promise<void>;
|
|
10
10
|
export type Adapter = (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;
|
|
@@ -96,6 +96,7 @@ declare const serverHooks: {
|
|
|
96
96
|
context: ModernServerContext;
|
|
97
97
|
}, any>;
|
|
98
98
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
99
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
99
100
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
100
101
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
101
102
|
context: ModernServerContext;
|
|
@@ -156,6 +157,7 @@ export declare const createServerManager: () => import("@modern-js/plugin").Asyn
|
|
|
156
157
|
context: ModernServerContext;
|
|
157
158
|
}, any>;
|
|
158
159
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
160
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
159
161
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
160
162
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
161
163
|
context: ModernServerContext;
|
|
@@ -214,6 +216,7 @@ export declare const serverManager: import("@modern-js/plugin").AsyncManager<{
|
|
|
214
216
|
context: ModernServerContext;
|
|
215
217
|
}, any>;
|
|
216
218
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
219
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
217
220
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
218
221
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
219
222
|
context: ModernServerContext;
|
|
@@ -278,6 +281,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
278
281
|
context: ModernServerContext;
|
|
279
282
|
}, any>;
|
|
280
283
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
284
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
281
285
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
282
286
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
283
287
|
context: ModernServerContext;
|
|
@@ -335,6 +339,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
335
339
|
context: ModernServerContext;
|
|
336
340
|
}, any>;
|
|
337
341
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
342
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
338
343
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
339
344
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
340
345
|
context: ModernServerContext;
|
|
@@ -388,6 +393,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
388
393
|
context: ModernServerContext;
|
|
389
394
|
}, any>;
|
|
390
395
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
396
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
391
397
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
392
398
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
393
399
|
context: ModernServerContext;
|
|
@@ -445,6 +451,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
445
451
|
context: ModernServerContext;
|
|
446
452
|
}, any>;
|
|
447
453
|
afterRender: import("@modern-js/plugin").AsyncPipeline<AfterRenderContext, any>;
|
|
454
|
+
afterStreamingRender: import("@modern-js/plugin").AsyncPipeline<AfterStreamingRenderContext, string>;
|
|
448
455
|
beforeSend: import("@modern-js/plugin").AsyncPipeline<ModernServerContext, RequestResult>;
|
|
449
456
|
afterSend: import("@modern-js/plugin").ParallelWorkflow<{
|
|
450
457
|
context: ModernServerContext;
|
|
@@ -35,6 +35,7 @@ export type SSR = boolean | {
|
|
|
35
35
|
inlineScript?: boolean;
|
|
36
36
|
disablePrerender?: boolean;
|
|
37
37
|
unsafeHeaders?: string[];
|
|
38
|
+
scriptLoading?: 'defer' | 'blocking' | 'module' | 'async';
|
|
38
39
|
};
|
|
39
40
|
export type SSRByEntries = Record<string, SSR>;
|
|
40
41
|
export interface ServerUserConfig {
|
|
@@ -44,8 +45,6 @@ export interface ServerUserConfig {
|
|
|
44
45
|
ssrByEntries?: SSRByEntries;
|
|
45
46
|
baseUrl?: string | string[];
|
|
46
47
|
port?: number;
|
|
47
|
-
logger?: boolean | Record<string, any>;
|
|
48
|
-
metrics?: boolean | Record<string, any>;
|
|
49
48
|
enableMicroFrontendDebug?: boolean;
|
|
50
49
|
watchOptions?: WatchOptions;
|
|
51
50
|
compiler?: 'babel' | 'typescript';
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.45.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.45.0",
|
|
37
|
+
"@modern-js/utils": "2.45.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
|
-
"@modern-js/types": "2.
|
|
47
|
-
"@scripts/
|
|
48
|
-
"@scripts/
|
|
46
|
+
"@modern-js/types": "2.45.0",
|
|
47
|
+
"@scripts/jest-config": "2.45.0",
|
|
48
|
+
"@scripts/build": "2.45.0"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
51
|
"publishConfig": {
|