@modern-js/types 0.0.0-next-1104a9f18 → 0.0.0-next-9330022f4

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,11 @@
1
1
  # @modern-js/types
2
2
 
3
- ## 0.0.0-next-1104a9f18
3
+ ## 0.0.0-next-9330022f4
4
+
5
+ ### Patch Changes
6
+
7
+ - 1f6ca2c7f: fix: nested routes in ssg
8
+ fix: 修复嵌套路由在 SSG 中的问题
4
9
 
5
10
  ## 2.7.0
6
11
 
package/cli/index.d.ts CHANGED
@@ -88,4 +88,32 @@ export interface HtmlTemplates {
88
88
  [name: string]: string;
89
89
  }
90
90
 
91
+ export type SSGRouteOptions =
92
+ | string
93
+ | {
94
+ url: string;
95
+ output?: string;
96
+ params?: Record<string, any>[];
97
+ headers?: Record<string, any>;
98
+ };
99
+
100
+ export type SSGSingleEntryOptions =
101
+ | boolean
102
+ | {
103
+ preventDefault?: string[];
104
+ headers?: Record<string, any>;
105
+ routes?: SSGRouteOptions[];
106
+ };
107
+
108
+ export type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
109
+
110
+ export type SSGConfig =
111
+ | boolean
112
+ | SSGSingleEntryOptions
113
+ | SSGMultiEntryOptions
114
+ | ((
115
+ entryName: string,
116
+ payload: { baseUrl?: string },
117
+ ) => SSGSingleEntryOptions);
118
+
91
119
  export type { Merge } from 'type-fest';
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-1104a9f18",
14
+ "version": "0.0.0-next-9330022f4",
15
15
  "types": "./index.d.ts",
16
16
  "exports": {
17
17
  ".": "./index.d.ts",
@@ -38,8 +38,8 @@
38
38
  "http-proxy-middleware": "^2.0.4",
39
39
  "jest": "^27",
40
40
  "type-fest": "2.15.0",
41
- "@scripts/build": "0.0.0-next-1104a9f18",
42
- "@scripts/jest-config": "0.0.0-next-1104a9f18"
41
+ "@scripts/build": "0.0.0-next-9330022f4",
42
+ "@scripts/jest-config": "0.0.0-next-9330022f4"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {