@modern-js/types 0.0.0-canary-20211223152722 → 0.0.0-routes-202201121632

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,6 +1,12 @@
1
1
  # @modern-js/types
2
2
 
3
- ## 0.0.0-canary-20211223152722
3
+ ## 1.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - e51b1db3: feat: support custom sdk, interceptor, headers for bff request
8
+
9
+ ## 1.1.4
4
10
 
5
11
  ### Patch Changes
6
12
 
package/cli/index.d.ts CHANGED
@@ -121,4 +121,8 @@ export interface Hooks {
121
121
  partials: HtmlPartials;
122
122
  }>;
123
123
  addRuntimeExports: AsyncWaterfall<void>;
124
+ beforeGenerateRoutes: AsyncWaterfall<{
125
+ entrypoint: Entrypoint;
126
+ code: string;
127
+ }>;
124
128
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-canary-20211223152722",
14
+ "version": "0.0.0-routes-202201121632",
15
15
  "main": "",
16
16
  "types": "./index.d.ts",
17
17
  "dependencies": {
@@ -20,20 +20,22 @@
20
20
  },
21
21
  "exports": {
22
22
  ".": "./index.d.ts",
23
- "./server": "./server/index.d.ts"
23
+ "./server": {
24
+ "jsnext:source": "./server/index.d.ts",
25
+ "default": "./server/index.d.ts"
26
+ }
24
27
  },
25
28
  "devDependencies": {
26
29
  "@types/jest": "^26",
27
30
  "@types/node": "^14",
28
31
  "@types/react": "^17",
29
32
  "@types/react-dom": "^17",
30
- "@modern-js/plugin-testing": "^1.1.1",
31
- "@modern-js/module-tools": "^0.0.0-canary-20211223152722"
33
+ "@modern-js/plugin-testing": "^1.2.0",
34
+ "@modern-js/module-tools": "^1.1.5"
32
35
  },
33
36
  "sideEffects": false,
34
37
  "publishConfig": {
35
38
  "registry": "https://registry.npmjs.org/",
36
39
  "access": "public"
37
- },
38
- "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
39
- }
40
+ }
41
+ }
@@ -44,3 +44,20 @@ export interface ModernServerContext {
44
44
 
45
45
  resHasHandled: () => boolean;
46
46
  }
47
+
48
+ export type BaseSSRServerContext = {
49
+ request: {
50
+ params: Record<string, string>;
51
+ pathname: string;
52
+ query: Record<string, string>;
53
+ headers: IncomingHttpHeaders;
54
+ cookie?: string;
55
+ };
56
+ redirection: { url?: string; status?: number };
57
+ distDir: string;
58
+ template: string;
59
+ entryName: string;
60
+ logger: Logger;
61
+ metrics?: Metrics;
62
+ loadableManifest?: string;
63
+ };