@modern-js/server 3.8.3 → 3.9.1

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,4 +1,4 @@
1
- import type { ApplyPlugins, ModernDevServerOptions } from './types';
1
+ import type { ApplyPlugins, ModernDevServerOptions } from './types.js';
2
2
  export declare function createDevServer(options: ModernDevServerOptions, applyPlugins: ApplyPlugins): Promise<{
3
3
  server: (import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("http2").Http2SecureServer<typeof import("http").IncomingMessage, typeof import("http").ServerResponse, typeof import("http2").Http2ServerRequest, typeof import("http2").Http2ServerResponse>) & {
4
4
  getRequestListener: () => ReturnType<(handler: import("@modern-js/server-core/dist/types/types").RequestHandler) => (req: import("@modern-js/types/server").NodeRequest, res: import("@modern-js/types/server").NodeResponse) => Promise<void>>;
@@ -1,5 +1,5 @@
1
1
  import type Buffer from 'buffer';
2
- import type { DevServerHttpsOptions } from '../../types';
2
+ import type { DevServerHttpsOptions } from '../../types.js';
3
3
  export declare const genHttpsOptions: (userOptions: DevServerHttpsOptions, pwd: string) => Promise<{
4
4
  key?: Buffer | string;
5
5
  cert?: Buffer | string;
@@ -3,8 +3,8 @@ import type { Http2SecureServer } from 'node:http2';
3
3
  import type { Server as NodeHttpsServer } from 'node:https';
4
4
  import type { BuilderInstance, Rspack } from '@modern-js/builder';
5
5
  import type { ServerBase, ServerBaseOptions, ServerPlugin } from '@modern-js/server-core';
6
- import type { WatchEvent } from './dev-tools/watcher';
7
- import type { ModernDevServerOptions } from './types';
6
+ import type { WatchEvent } from './dev-tools/watcher/index.js';
7
+ import type { ModernDevServerOptions } from './types.js';
8
8
  type BuilderDevServer = Awaited<ReturnType<BuilderInstance['createDevServer']>>;
9
9
  export type DevPluginOptions = ModernDevServerOptions<ServerBaseOptions> & {
10
10
  builderDevServer?: BuilderDevServer;
@@ -1,11 +1,11 @@
1
1
  import type { BuilderInstance } from '@modern-js/builder';
2
- import type { DevServerOptions } from '../types';
2
+ import type { DevServerOptions } from '../types.js';
3
3
  export declare const getDevOptions: (devOptions: DevServerOptions) => {
4
4
  setupMiddlewares?: Array<(middlewares: {
5
5
  unshift: (...handlers: import("@modern-js/types/server").RequestHandler[]) => void;
6
6
  push: (...handlers: import("@modern-js/types/server").RequestHandler[]) => void;
7
7
  }, server: import("@modern-js/types/server").ExposeServerApis) => void>;
8
8
  https?: import("@modern-js/types/server/devServer").DevServerHttpsOptions;
9
- server?: import("../types").DevServerConfig;
9
+ server?: import("../types.js").DevServerConfig;
10
10
  };
11
11
  export declare const getDevAssetPrefix: (builder?: BuilderInstance) => Promise<string>;
@@ -1,9 +1,9 @@
1
1
  import { type WatchOptions } from '@modern-js/utils';
2
- import Watcher, { type WatchEvent } from '../dev-tools/watcher';
3
- export * from './repack';
4
- export * from './devOptions';
5
- export * from './fileReader';
6
- export * from './mock';
2
+ import Watcher, { type WatchEvent } from '../dev-tools/watcher/index.js';
3
+ export * from './repack.js';
4
+ export * from './devOptions.js';
5
+ export * from './fileReader.js';
6
+ export * from './mock.js';
7
7
  export declare function startWatcher({ pwd, distDir, apiDir, sharedDir, mockDir, watchOptions, onChange, }: {
8
8
  pwd: string;
9
9
  distDir: string;
@@ -1,4 +1,4 @@
1
- import type { DevServerOptions } from './types';
2
- export { createDevServer } from './createDevServer';
3
- export type { ModernDevServerOptions, ApplyPlugins, CorsOptions, } from './types';
1
+ import type { DevServerOptions } from './types.js';
2
+ export { createDevServer } from './createDevServer.js';
3
+ export type { ModernDevServerOptions, ApplyPlugins, CorsOptions, } from './types.js';
4
4
  export type SetupMiddlewares = DevServerOptions['setupMiddlewares'];
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.8.3",
18
+ "version": "3.9.1",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/cjs/index.js",
21
21
  "exports": {
@@ -44,14 +44,14 @@
44
44
  "minimatch": "^3.1.2",
45
45
  "path-to-regexp": "^6.3.0",
46
46
  "ws": "^8.21.3",
47
- "@modern-js/runtime-utils": "3.8.3",
48
- "@modern-js/server-core": "3.8.3",
49
- "@modern-js/server-utils": "3.8.3",
50
- "@modern-js/types": "3.8.3",
51
- "@modern-js/utils": "3.8.3"
47
+ "@modern-js/runtime-utils": "3.9.1",
48
+ "@modern-js/server-core": "3.9.1",
49
+ "@modern-js/server-utils": "3.9.1",
50
+ "@modern-js/types": "3.9.1",
51
+ "@modern-js/utils": "3.9.1"
52
52
  },
53
53
  "devDependencies": {
54
- "@rslib/core": "0.23.2",
54
+ "@rslib/core": "1.0.0",
55
55
  "@types/connect-history-api-fallback": "^1.5.4",
56
56
  "@types/minimatch": "^3.0.5",
57
57
  "@types/node": "^20",
@@ -61,7 +61,7 @@
61
61
  "tsconfig-paths": "4.2.0",
62
62
  "typescript": "^5",
63
63
  "websocket": "^1.0.35",
64
- "@modern-js/builder": "3.8.3",
64
+ "@modern-js/builder": "3.9.1",
65
65
  "@modern-js/rslib": "2.68.10",
66
66
  "@scripts/rstest-config": "2.66.0"
67
67
  },