@modern-js/types 0.0.0-canary-20211113104942 → 0.0.0-runtime-2021112193858
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 +16 -6
- package/cli/index.d.ts +3 -16
- package/package.json +4 -4
- package/server/context.d.ts +2 -2
- package/server/index.d.ts +1 -0
- package/server/route.d.ts +19 -0
- package/server/util.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-runtime-2021112193858
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
7
|
+
- 8698465e: fix: dependence version
|
|
8
|
+
- e04914ce: add route types, fix metrics types
|
|
9
|
+
- e04914ce: add route types, fix metrics types
|
|
10
|
+
- Updated dependencies [8698465e]
|
|
11
|
+
- @modern-js/plugin@0.0.0-runtime-2021112193858
|
|
12
|
+
|
|
13
|
+
## 1.1.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- d73ff455: support multi process product
|
|
18
|
+
- d73ff455: support multi process product
|
|
19
|
+
- d73ff455: support multi process product
|
|
20
|
+
- d73ff455: support multi process product
|
|
21
|
+
- d73ff455: support multi process product
|
|
12
22
|
|
|
13
23
|
## 1.1.2
|
|
14
24
|
|
package/cli/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AsyncWaterfall, AsyncWorkflow } from '@modern-js/plugin';
|
|
2
2
|
import { Compiler, MultiCompiler, Configuration } from 'webpack';
|
|
3
|
+
import { ServerRoute } from '../server';
|
|
3
4
|
|
|
4
5
|
export type { Compiler, MultiCompiler, Configuration };
|
|
5
6
|
|
|
@@ -17,20 +18,6 @@ export interface Entrypoint {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
-
* server route
|
|
22
|
-
*/
|
|
23
|
-
export interface ServerRoute {
|
|
24
|
-
urlPath: string;
|
|
25
|
-
entryName?: string;
|
|
26
|
-
entryPath: string;
|
|
27
|
-
isSPA: boolean;
|
|
28
|
-
isSSR: boolean;
|
|
29
|
-
isApi?: boolean;
|
|
30
|
-
bundle?: string;
|
|
31
|
-
enableModernMode?: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
21
|
/**
|
|
35
22
|
* file system routes.
|
|
36
23
|
*/
|
|
@@ -104,8 +91,8 @@ export interface Hooks {
|
|
|
104
91
|
unknown
|
|
105
92
|
>;
|
|
106
93
|
afterBuild: AsyncWorkflow<void, unknown>;
|
|
107
|
-
beforeDeploy: AsyncWorkflow<
|
|
108
|
-
afterDeploy: AsyncWorkflow<
|
|
94
|
+
beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
95
|
+
afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
109
96
|
modifyEntryExport: AsyncWaterfall<{
|
|
110
97
|
entrypoint: Entrypoint;
|
|
111
98
|
exportStatement: string;
|
package/package.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-
|
|
14
|
+
"version": "0.0.0-runtime-2021112193858",
|
|
15
15
|
"main": "",
|
|
16
16
|
"types": "./index.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@modern-js/plugin": "^
|
|
18
|
+
"@modern-js/plugin": "^0.0.0-runtime-2021112193858",
|
|
19
19
|
"webpack": "^5.54.0"
|
|
20
20
|
},
|
|
21
21
|
"exports": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"@types/react": "^17",
|
|
29
29
|
"@types/react-dom": "^17",
|
|
30
|
-
"@modern-js/plugin-testing": "^
|
|
31
|
-
"@modern-js/module-tools": "^
|
|
30
|
+
"@modern-js/plugin-testing": "^0.0.0-runtime-2021112193858",
|
|
31
|
+
"@modern-js/module-tools": "^0.0.0-runtime-2021112193858"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"publishConfig": {
|
package/server/context.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse, IncomingHttpHeaders } from 'http';
|
|
2
2
|
import { URL } from 'url';
|
|
3
3
|
import qs from 'querystring';
|
|
4
|
-
import {
|
|
4
|
+
import { Metrics, Logger } from './util';
|
|
5
5
|
|
|
6
6
|
export interface ModernServerContext {
|
|
7
7
|
req: IncomingMessage;
|
|
@@ -12,7 +12,7 @@ export interface ModernServerContext {
|
|
|
12
12
|
|
|
13
13
|
logger: Logger;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
metrics?: Metrics;
|
|
16
16
|
|
|
17
17
|
setParams: (params: Record<string, string>) => void;
|
|
18
18
|
|
package/server/index.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ServerRoute {
|
|
2
|
+
// modern js web entry name
|
|
3
|
+
entryName?: string;
|
|
4
|
+
// the url path for request match
|
|
5
|
+
urlPath: string;
|
|
6
|
+
// the default resource file to response to route
|
|
7
|
+
entryPath: string;
|
|
8
|
+
// if route is spa page
|
|
9
|
+
isSPA?: boolean;
|
|
10
|
+
// if route is ssr page
|
|
11
|
+
isSSR?: boolean;
|
|
12
|
+
// if route is api service
|
|
13
|
+
isApi?: boolean;
|
|
14
|
+
// ssr js bundle for ssr page
|
|
15
|
+
bundle?: string;
|
|
16
|
+
// if route has modern product
|
|
17
|
+
enableModernMode?: boolean;
|
|
18
|
+
// specialHeader?: SpecialHeader[];
|
|
19
|
+
}
|
package/server/util.d.ts
CHANGED