@modern-js/server-core 1.4.0 → 1.4.1-beta.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/js/modern/plugin.js +2 -0
- package/dist/js/node/plugin.js +2 -0
- package/dist/types/plugin.d.ts +11 -0
- package/package.json +7 -6
package/dist/js/modern/plugin.js
CHANGED
|
@@ -7,6 +7,7 @@ const prepare = createWaterfall();
|
|
|
7
7
|
const create = createAsyncPipeline();
|
|
8
8
|
const prepareWebServer = createAsyncPipeline();
|
|
9
9
|
const prepareApiServer = createAsyncPipeline();
|
|
10
|
+
const onApiChange = createAsyncPipeline();
|
|
10
11
|
const beforeDevServer = createParallelWorkflow();
|
|
11
12
|
const setupCompiler = createParallelWorkflow();
|
|
12
13
|
const afterDevServer = createParallelWorkflow(); // TODO FIXME
|
|
@@ -58,6 +59,7 @@ const serverHooks = {
|
|
|
58
59
|
create,
|
|
59
60
|
prepareWebServer,
|
|
60
61
|
prepareApiServer,
|
|
62
|
+
onApiChange,
|
|
61
63
|
beforeDevServer,
|
|
62
64
|
setupCompiler,
|
|
63
65
|
afterDevServer,
|
package/dist/js/node/plugin.js
CHANGED
|
@@ -15,6 +15,7 @@ const prepare = (0, _plugin.createWaterfall)();
|
|
|
15
15
|
const create = (0, _plugin.createAsyncPipeline)();
|
|
16
16
|
const prepareWebServer = (0, _plugin.createAsyncPipeline)();
|
|
17
17
|
const prepareApiServer = (0, _plugin.createAsyncPipeline)();
|
|
18
|
+
const onApiChange = (0, _plugin.createAsyncPipeline)();
|
|
18
19
|
const beforeDevServer = (0, _plugin.createParallelWorkflow)();
|
|
19
20
|
const setupCompiler = (0, _plugin.createParallelWorkflow)();
|
|
20
21
|
const afterDevServer = (0, _plugin.createParallelWorkflow)(); // TODO FIXME
|
|
@@ -77,6 +78,7 @@ const serverHooks = {
|
|
|
77
78
|
create,
|
|
78
79
|
prepareWebServer,
|
|
79
80
|
prepareApiServer,
|
|
81
|
+
onApiChange,
|
|
80
82
|
beforeDevServer,
|
|
81
83
|
setupCompiler,
|
|
82
84
|
afterDevServer,
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export declare type APIServerStartInput = {
|
|
|
27
27
|
middleware?: Array<any>;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
+
declare type Change = {
|
|
31
|
+
filename: string;
|
|
32
|
+
event: 'add' | 'change' | 'unlink';
|
|
33
|
+
};
|
|
30
34
|
export declare type Route = Record<string, unknown>;
|
|
31
35
|
export declare type RequestResult = {
|
|
32
36
|
isfinish: boolean;
|
|
@@ -61,6 +65,7 @@ declare const serverHooks: {
|
|
|
61
65
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
62
66
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
63
67
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
68
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
64
69
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
65
70
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
66
71
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -125,6 +130,7 @@ export declare const createServerManager: () => import("@modern-js/plugin").Asyn
|
|
|
125
130
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
126
131
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
127
132
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
133
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
128
134
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
129
135
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
130
136
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -184,6 +190,7 @@ export declare const serverManager: import("@modern-js/plugin").AsyncManager<{
|
|
|
184
190
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
185
191
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
186
192
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
193
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
187
194
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
188
195
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
189
196
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -252,6 +259,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
252
259
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
253
260
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
254
261
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
262
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
255
263
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
256
264
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
257
265
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -310,6 +318,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
310
318
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
311
319
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
312
320
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
321
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
313
322
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
314
323
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
315
324
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -364,6 +373,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
364
373
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
365
374
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
366
375
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
376
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
367
377
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
368
378
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
369
379
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
@@ -422,6 +432,7 @@ export declare const createPlugin: (setup?: AsyncSetup<{
|
|
|
422
432
|
create: import("@modern-js/plugin").AsyncPipeline<ServerInitInput, InitExtension>;
|
|
423
433
|
prepareWebServer: import("@modern-js/plugin").AsyncPipeline<WebServerStartInput, Adapter>;
|
|
424
434
|
prepareApiServer: import("@modern-js/plugin").AsyncPipeline<APIServerStartInput, Adapter>;
|
|
435
|
+
onApiChange: import("@modern-js/plugin").AsyncPipeline<Change[], boolean>;
|
|
425
436
|
beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
|
426
437
|
setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
|
|
427
438
|
afterDevServer: import("@modern-js/plugin").ParallelWorkflow<NormalizedConfig, any>;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.0",
|
|
14
|
+
"version": "1.4.1-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@modern-js/plugin": "^1.4.
|
|
32
|
-
"@modern-js/utils": "^1.7.
|
|
31
|
+
"@modern-js/plugin": "^1.4.2",
|
|
32
|
+
"@modern-js/utils": "^1.7.12"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@modern-js/core": "1.12.
|
|
36
|
-
"@modern-js/types": "1.5.
|
|
35
|
+
"@modern-js/core": "1.12.4",
|
|
36
|
+
"@modern-js/types": "1.5.6",
|
|
37
37
|
"@scripts/build": "0.0.0",
|
|
38
38
|
"@scripts/jest-config": "0.0.0",
|
|
39
39
|
"@types/jest": "^27",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"registry": "https://registry.npmjs.org/",
|
|
56
|
-
"access": "public"
|
|
56
|
+
"access": "public",
|
|
57
|
+
"types": "./dist/types/index.d.ts"
|
|
57
58
|
},
|
|
58
59
|
"wireit": {
|
|
59
60
|
"build": {
|