@modern-js/types 1.2.1 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @modern-js/types
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ec4dbffb: feat: support as a pure api service
8
+
9
+ ### Patch Changes
10
+
11
+ - 816fd721: support more server context
12
+ - bfbea9a7: support multi base url and dynamic base url
13
+ - 24f616ca: feat: support custom meta info
14
+ - 272cab15: refactor server plugin manager
15
+
3
16
  ## 1.2.1
4
17
 
5
18
  ### Patch Changes
package/cli/index.d.ts CHANGED
@@ -44,6 +44,7 @@ export interface HtmlTemplates {
44
44
  }
45
45
 
46
46
  export interface IAppContext {
47
+ metaName: string; // name for generating conventional constants, such as .modern-js
47
48
  appDirectory: string;
48
49
  configFile: string | false;
49
50
  ip?: string;
@@ -63,6 +64,9 @@ export interface IAppContext {
63
64
  entrypoints: Entrypoint[];
64
65
  serverRoutes: ServerRoute[];
65
66
  htmlTemplates: HtmlTemplates;
67
+ existSrc: boolean;
68
+ internalDirAlias: string;
69
+ internalSrcAlias: string;
66
70
  }
67
71
 
68
72
  export interface Hooks {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.1",
14
+ "version": "1.3.0",
15
15
  "types": "./index.d.ts",
16
16
  "dependencies": {
17
17
  "@modern-js/plugin": "^1.2.1",
@@ -51,7 +51,9 @@ export type BaseSSRServerContext = {
51
51
  pathname: string;
52
52
  query: Record<string, string>;
53
53
  headers: IncomingHttpHeaders;
54
+ host: string;
54
55
  cookie?: string;
56
+ [propsName: string]: any;
55
57
  };
56
58
  redirection: { url?: string; status?: number };
57
59
  distDir: string;
@@ -60,4 +62,5 @@ export type BaseSSRServerContext = {
60
62
  logger: Logger;
61
63
  metrics?: Metrics;
62
64
  loadableManifest?: string;
65
+ cacheConfig?: any;
63
66
  };