@modern-js/types 3.11.3 → 3.12.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/cli/index.d.ts CHANGED
@@ -64,6 +64,8 @@ export interface NestedRoute<T = string | (() => JSX.Element)> extends Route {
64
64
  routeType?: 'page' | 'layout';
65
65
  parentId?: string;
66
66
  data?: string;
67
+ /** Data module exporting the build-time SSG parameter generator. */
68
+ ssgParams?: string;
67
69
  clientData?: string;
68
70
  children?: NestedRoute<T>[];
69
71
  filename?: string;
@@ -108,6 +110,11 @@ export type SSGRouteOptions =
108
110
  headers?: Record<string, any>;
109
111
  };
110
112
 
113
+ /** Generate complete parameter combinations for one page during SSG. */
114
+ export type SSGParams = () =>
115
+ | Record<string, string | undefined>[]
116
+ | Promise<Record<string, string | undefined>[]>;
117
+
111
118
  export type SSGSingleEntryOptions =
112
119
  | boolean
113
120
  | {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.11.3",
18
+ "version": "3.12.0",
19
19
  "types": "./index.d.ts",
20
20
  "exports": {
21
21
  ".": {
@@ -1,5 +1,5 @@
1
1
  import type { NodeRequest, NodeResponse } from '@modern-js/server-core/node';
2
- import type { DevProxyOptions, NextFunction } from './utils';
2
+ import type { NextFunction } from './utils';
3
3
 
4
4
  export type DevServerHttpsOptions = boolean | { key: string; cert: string };
5
5
 
package/server/hook.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import type {
2
- IncomingHttpHeaders,
3
- IncomingMessage,
4
- ServerResponse,
5
- } from 'http';
1
+ import type { IncomingHttpHeaders } from 'http';
6
2
  import type { ServerRoute } from './route';
7
3
  import type { NodeRequest, NodeResponse } from './server';
8
4
  import type { Logger, Metrics, Reporter } from './utils';
package/server/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'http';
2
- import type { Http2ServerRequest } from 'node:http2';
2
+
3
3
  import type {
4
4
  Filter as ProxyFilter,
5
5
  Options as ProxyOptions,