@modern-js/prod-server 2.65.4 → 2.66.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.
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
- import { type NodeServer, type ServerBase } from '@modern-js/server-core';
2
+ import type { Server as NodeServer } from 'node:http';
3
+ import { type ServerBase } from '@modern-js/server-core';
3
4
  import type { ProdServerOptions } from './types';
4
5
  export type ApplyPlugins = typeof applyPlugins;
5
6
  export declare function applyPlugins(serverBase: ServerBase, options: ProdServerOptions, nodeServer?: NodeServer): Promise<void>;
@@ -3,7 +3,7 @@
3
3
  import type { ProdServerOptions } from './types';
4
4
  export { applyPlugins, type ApplyPlugins } from './apply';
5
5
  export { loadServerPlugins, loadServerRuntimeConfig, } from '@modern-js/server-core/node';
6
- export type { ServerPlugin } from '@modern-js/server-core';
6
+ export type { ServerPluginLegacy, ServerPlugin } from '@modern-js/server-core';
7
7
  export type { ProdServerOptions, BaseEnv } from './types';
8
8
  export declare const createProdServer: (options: ProdServerOptions) => Promise<(import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>) & {
9
9
  getRequestListener: () => (req: import("http").IncomingMessage, res: import("@modern-js/server-core/dist/types/types").NodeResponse) => Promise<void>;
@@ -1,11 +1,11 @@
1
- import type { CreateDefaultPluginsOptions, ServerBaseOptions, ServerPlugin } from '@modern-js/server-core';
1
+ import type { CreateDefaultPluginsOptions, ServerBaseOptions, ServerPlugin, ServerPluginLegacy } from '@modern-js/server-core';
2
2
  import type { Reporter } from '@modern-js/types';
3
3
  import type { Logger } from '@modern-js/utils';
4
4
  interface ProdServerExtraOptions {
5
5
  /** compat modern.server-runtime.config.ts */
6
6
  serverConfigFile?: string;
7
7
  serverConfigPath?: string;
8
- plugins?: ServerPlugin[];
8
+ plugins?: (ServerPlugin | ServerPluginLegacy)[];
9
9
  }
10
10
  export type ProdServerOptions = Exclude<ServerBaseOptions, 'serverConfig'> & ProdServerExtraOptions & CreateDefaultPluginsOptions;
11
11
  export type BaseEnv = {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.65.4",
18
+ "version": "2.66.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -42,9 +42,9 @@
42
42
  "dependencies": {
43
43
  "@swc/helpers": "0.5.13",
44
44
  "source-map-support": "0.5.21",
45
- "@modern-js/server-core": "2.65.4",
46
- "@modern-js/runtime-utils": "2.65.4",
47
- "@modern-js/utils": "2.65.4"
45
+ "@modern-js/runtime-utils": "2.66.0",
46
+ "@modern-js/utils": "2.66.0",
47
+ "@modern-js/server-core": "2.66.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^29",
@@ -55,9 +55,9 @@
55
55
  "lint-staged": "~13.3.0",
56
56
  "tsx": "^3.12.7",
57
57
  "typescript": "~5.0.4",
58
- "@modern-js/types": "2.65.4",
59
- "@scripts/build": "2.65.4",
60
- "@scripts/jest-config": "2.65.4"
58
+ "@modern-js/types": "2.66.0",
59
+ "@scripts/build": "2.66.0",
60
+ "@scripts/jest-config": "2.66.0"
61
61
  },
62
62
  "sideEffects": [],
63
63
  "engines": {