@modern-js/server-core 2.0.0-beta.2 → 2.0.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @modern-js/server-plugin
2
2
 
3
+ ## 2.0.0-beta.3
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Minor Changes
10
+
11
+ - 543be9558e: feat: compile server loader and support handle loader request
12
+ feat: 编译 server loader 并支持处理 loader 的请求
13
+
14
+ ### Patch Changes
15
+
16
+ - 15bf09d9c8: feat: support completely custom server, export render() api for render single page
17
+ feat: 支持完全自定义 Server,导出 render() 方法用来渲染单个页面
18
+ - cc971eabfc: refactor: move server plugin load logic in `@modern-js/core`
19
+ refactor:移除在 `@modern-js/core` 中的 server 插件加载逻辑
20
+ - Updated dependencies [6aca875]
21
+ - Updated dependencies [2e60319]
22
+ - Updated dependencies [92f0eade39]
23
+ - Updated dependencies [edd1cfb1af]
24
+ - Updated dependencies [cc971eabfc]
25
+ - Updated dependencies [5b9049f2e9]
26
+ - Updated dependencies [92004d1906]
27
+ - Updated dependencies [b8bbe036c7]
28
+ - Updated dependencies [d5a31df781]
29
+ - Updated dependencies [dda38c9c3e]
30
+ - Updated dependencies [3bbea92b2a]
31
+ - Updated dependencies [b710adb]
32
+ - Updated dependencies [f179749375]
33
+ - Updated dependencies [ea7cf06]
34
+ - Updated dependencies [bbe4c4a]
35
+ - Updated dependencies [e4558a0]
36
+ - Updated dependencies [abf3421a75]
37
+ - Updated dependencies [543be9558e]
38
+ - Updated dependencies [14b712da84]
39
+ - @modern-js/utils@2.0.0-beta.3
40
+ - @modern-js/plugin@2.0.0-beta.3
41
+
3
42
  ## 2.0.0-beta.2
4
43
 
5
44
  ### Major Changes
@@ -1,64 +1,5 @@
1
1
  import { InternalPlugins } from '@modern-js/types';
2
- import { ServerPlugin } from './plugin';
2
+ import { createPlugin, ServerPlugin } from './plugin';
3
3
  export declare const loadPlugins: (appDirectory: string, configPlugins: ServerPlugin[], options: {
4
4
  internalPlugins?: InternalPlugins;
5
- }) => import("@modern-js/plugin").AsyncPlugin<{
6
- gather: import("@modern-js/plugin").ParallelWorkflow<{
7
- addWebMiddleware: (_input: any) => void;
8
- addAPIMiddleware: (_input: any) => void;
9
- }, unknown>;
10
- config: import("@modern-js/plugin").Waterfall<import("./plugin").ServerConfig>;
11
- prepare: import("@modern-js/plugin").Waterfall<void>;
12
- preparebeforeRouteHandler: import("@modern-js/plugin").AsyncPipeline<{
13
- serverRoutes: import("@modern-js/types").ServerRoute[];
14
- distDir: string;
15
- }, import("./plugin").BeforeRouteHandler>;
16
- prepareWebServer: import("@modern-js/plugin").AsyncPipeline<import("./plugin").WebServerStartInput, import("./plugin").WebAdapter>;
17
- prepareApiServer: import("@modern-js/plugin").AsyncPipeline<import("./plugin").APIServerStartInput, import("./plugin").Adapter>;
18
- onApiChange: import("@modern-js/plugin").Waterfall<{
19
- filename: string;
20
- event: "add" | "unlink" | "change";
21
- }[]>;
22
- beforeDevServer: import("@modern-js/plugin").ParallelWorkflow<import(".").ServerOptions, any>;
23
- setupCompiler: import("@modern-js/plugin").ParallelWorkflow<Record<string, unknown>, any[]>;
24
- afterDevServer: import("@modern-js/plugin").ParallelWorkflow<import(".").ServerOptions, any>;
25
- beforeRouteSet: import("@modern-js/plugin").AsyncPipeline<import("./plugin").Route[], import("./plugin").Route[]>;
26
- afterRouteSet: import("@modern-js/plugin").AsyncPipeline<unknown, unknown>;
27
- beforeProdServer: import("@modern-js/plugin").ParallelWorkflow<import(".").ServerOptions, any>;
28
- afterProdServer: import("@modern-js/plugin").ParallelWorkflow<import(".").ServerOptions, any>;
29
- listen: import("@modern-js/plugin").ParallelWorkflow<{
30
- ip: string;
31
- port: number;
32
- }, any[]>;
33
- beforeServerReset: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
34
- afterServerReset: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
35
- extendSSRContext: import("@modern-js/plugin").AsyncWaterfall<import("@modern-js/types").BaseSSRServerContext>;
36
- extendContext: import("@modern-js/plugin").AsyncPipeline<import("@modern-js/types").ModernServerContext, import("@modern-js/types").ModernServerContext>;
37
- handleError: import("@modern-js/plugin").ParallelWorkflow<{
38
- error: Error;
39
- }, unknown>;
40
- beforeMatch: import("@modern-js/plugin").AsyncPipeline<{
41
- context: import("@modern-js/types").ModernServerContext;
42
- }, any>;
43
- afterMatch: import("@modern-js/plugin").AsyncPipeline<import("@modern-js/types").AfterMatchContext, any>;
44
- prefetch: import("@modern-js/plugin").ParallelWorkflow<{
45
- context: import("./plugin").SSRServerContext;
46
- }, unknown>;
47
- renderToString: import("@modern-js/plugin").AsyncPipeline<{
48
- App: import("react").Component<{}, {}, any>;
49
- context: import("./plugin").RenderContext;
50
- }, string>;
51
- beforeRender: import("@modern-js/plugin").AsyncPipeline<{
52
- context: import("@modern-js/types").ModernServerContext;
53
- }, any>;
54
- afterRender: import("@modern-js/plugin").AsyncPipeline<import("@modern-js/types").AfterRenderContext, any>;
55
- beforeSend: import("@modern-js/plugin").AsyncPipeline<import("@modern-js/types").ModernServerContext, import("./plugin").RequestResult>;
56
- afterSend: import("@modern-js/plugin").ParallelWorkflow<{
57
- context: import("@modern-js/types").ModernServerContext;
58
- }, unknown>;
59
- reset: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
60
- }, {
61
- useAppContext: () => import("@modern-js/types").ISAppContext;
62
- useConfigContext: () => import(".").UserConfig;
63
- setAppContext: (value: import("@modern-js/types").ISAppContext) => void;
64
- }>[];
5
+ }) => ReturnType<typeof createPlugin>[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.2",
14
+ "version": "2.0.0-beta.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -29,8 +29,8 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@modern-js/plugin": "2.0.0-beta.2",
33
- "@modern-js/utils": "2.0.0-beta.2"
32
+ "@modern-js/plugin": "2.0.0-beta.3",
33
+ "@modern-js/utils": "2.0.0-beta.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jest": "^27",
@@ -39,10 +39,10 @@
39
39
  "jest": "^27",
40
40
  "ts-jest": "^27.0.4",
41
41
  "typescript": "^4",
42
- "@modern-js/types": "2.0.0-beta.2",
43
- "@modern-js/babel-preset-app": "2.0.0-beta.2",
44
- "@scripts/build": "2.0.0-beta.2",
45
- "@scripts/jest-config": "2.0.0-beta.2"
42
+ "@modern-js/types": "2.0.0-beta.3",
43
+ "@modern-js/babel-preset-app": "2.0.0-beta.3",
44
+ "@scripts/build": "2.0.0-beta.3",
45
+ "@scripts/jest-config": "2.0.0-beta.3"
46
46
  },
47
47
  "sideEffects": false,
48
48
  "modernConfig": {