@modern-js/types 1.3.1 → 1.3.4
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 +19 -0
- package/cli/index.d.ts +7 -2
- package/package.json +1 -1
- package/server/utils.d.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 1.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4499a674: feat: support to pass options to plugins
|
|
8
|
+
- e37ea5b2: feat: add afterMonorepoDeploy hook
|
|
9
|
+
|
|
10
|
+
## 1.3.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- deeaa602: support svg/proxy/multi-version in unbundled
|
|
15
|
+
|
|
16
|
+
## 1.3.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 6891e4c2: add addDefineTypes define
|
|
21
|
+
|
|
3
22
|
## 1.3.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/cli/index.d.ts
CHANGED
|
@@ -57,9 +57,9 @@ export interface IAppContext {
|
|
|
57
57
|
internalDirectory: string;
|
|
58
58
|
plugins: {
|
|
59
59
|
cli?: any;
|
|
60
|
-
|
|
60
|
+
cliPkg?: any;
|
|
61
61
|
server?: any;
|
|
62
|
-
|
|
62
|
+
serverPkg?: any;
|
|
63
63
|
}[];
|
|
64
64
|
entrypoints: Entrypoint[];
|
|
65
65
|
checkedEntries: string[];
|
|
@@ -96,6 +96,10 @@ export interface Hooks {
|
|
|
96
96
|
unknown
|
|
97
97
|
>;
|
|
98
98
|
afterBuild: AsyncWorkflow<void, unknown>;
|
|
99
|
+
afterMonorepoDeploy: AsyncWorkflow<
|
|
100
|
+
{ operator: any; deployProjectNames: string[] },
|
|
101
|
+
void
|
|
102
|
+
>;
|
|
99
103
|
beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
100
104
|
afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
101
105
|
modifyEntryExport: AsyncWaterfall<{
|
|
@@ -130,4 +134,5 @@ export interface Hooks {
|
|
|
130
134
|
entrypoint: Entrypoint;
|
|
131
135
|
code: string;
|
|
132
136
|
}>;
|
|
137
|
+
addDefineTypes: AsyncWaterfall<void>;
|
|
133
138
|
}
|
package/package.json
CHANGED
package/server/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
|
|
1
3
|
export type Metrics = {
|
|
2
4
|
counter: () => void;
|
|
3
5
|
timer: () => void;
|
|
@@ -17,3 +19,23 @@ export type Logger = {
|
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export type NextFunction = () => void;
|
|
22
|
+
|
|
23
|
+
export type ProxyDetail = {
|
|
24
|
+
target: string;
|
|
25
|
+
pathRewrite?: Record<string, string>;
|
|
26
|
+
secure?: boolean;
|
|
27
|
+
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
28
|
+
bypass?: (
|
|
29
|
+
req: IncomingMessage,
|
|
30
|
+
res: ServerResponse,
|
|
31
|
+
proxyOptions: ProxyOptions,
|
|
32
|
+
) => string | undefined | null | false;
|
|
33
|
+
context?: string | string[];
|
|
34
|
+
changeOrigin?: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ProxyOptions =
|
|
38
|
+
| Record<string, string>
|
|
39
|
+
| Record<string, ProxyDetail>
|
|
40
|
+
| ProxyDetail[]
|
|
41
|
+
| ProxyDetail;
|