@bleedingdev/modern-js-server-core 3.8.3-ultramodern.6 → 3.9.0-ultramodern.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.
Files changed (58) hide show
  1. package/dist/esm/plugins/render/render.mjs +4 -5
  2. package/dist/esm-node/plugins/render/render.mjs +4 -3
  3. package/dist/types/adapters/node/helper/index.d.ts +6 -6
  4. package/dist/types/adapters/node/helper/loadCache.d.ts +1 -1
  5. package/dist/types/adapters/node/helper/loadConfig.d.ts +1 -1
  6. package/dist/types/adapters/node/helper/loadEnv.d.ts +1 -1
  7. package/dist/types/adapters/node/helper/loadPlugin.d.ts +1 -1
  8. package/dist/types/adapters/node/helper/utils.d.ts +1 -1
  9. package/dist/types/adapters/node/hono.d.ts +2 -2
  10. package/dist/types/adapters/node/index.d.ts +5 -5
  11. package/dist/types/adapters/node/node.d.ts +1 -1
  12. package/dist/types/adapters/node/plugins/index.d.ts +3 -3
  13. package/dist/types/adapters/node/plugins/nodeServer.d.ts +1 -1
  14. package/dist/types/adapters/node/plugins/resource.d.ts +1 -1
  15. package/dist/types/adapters/node/plugins/static.d.ts +1 -1
  16. package/dist/types/adapters/node/plugins/staticModuleFederation.d.ts +1 -1
  17. package/dist/types/adapters/node/plugins/staticPrecompressed.d.ts +1 -1
  18. package/dist/types/adapters/node/plugins/staticServing.d.ts +1 -1
  19. package/dist/types/helper.d.ts +1 -1
  20. package/dist/types/index.d.ts +14 -14
  21. package/dist/types/plugins/compat/hooks.d.ts +1 -1
  22. package/dist/types/plugins/compat/index.d.ts +2 -2
  23. package/dist/types/plugins/default.d.ts +2 -2
  24. package/dist/types/plugins/favicon.d.ts +1 -1
  25. package/dist/types/plugins/index.d.ts +8 -8
  26. package/dist/types/plugins/log.d.ts +1 -1
  27. package/dist/types/plugins/middlewares.d.ts +1 -1
  28. package/dist/types/plugins/monitors.d.ts +1 -1
  29. package/dist/types/plugins/processedBy.d.ts +1 -1
  30. package/dist/types/plugins/render/csrRscRender.d.ts +1 -1
  31. package/dist/types/plugins/render/dataHandler.d.ts +1 -1
  32. package/dist/types/plugins/render/index.d.ts +2 -2
  33. package/dist/types/plugins/render/inject.d.ts +1 -1
  34. package/dist/types/plugins/render/render.d.ts +2 -2
  35. package/dist/types/plugins/render/renderRscHandler.d.ts +1 -1
  36. package/dist/types/plugins/render/serverActionHandler.d.ts +1 -1
  37. package/dist/types/plugins/render/ssrCache.d.ts +1 -1
  38. package/dist/types/plugins/render/ssrRender.d.ts +2 -2
  39. package/dist/types/plugins/render/utils.d.ts +2 -2
  40. package/dist/types/plugins/route.d.ts +1 -1
  41. package/dist/types/serverBase.d.ts +2 -2
  42. package/dist/types/types/config/bff.d.ts +2 -2
  43. package/dist/types/types/config/index.d.ts +14 -14
  44. package/dist/types/types/config/server.d.ts +2 -2
  45. package/dist/types/types/config/source.d.ts +1 -1
  46. package/dist/types/types/index.d.ts +4 -4
  47. package/dist/types/types/plugins/base.d.ts +3 -3
  48. package/dist/types/types/plugins/index.d.ts +2 -2
  49. package/dist/types/types/plugins/plugin.d.ts +1 -1
  50. package/dist/types/types/render.d.ts +1 -1
  51. package/dist/types/types/requestHandler.d.ts +1 -1
  52. package/dist/types/types/server.d.ts +1 -1
  53. package/dist/types/utils/index.d.ts +9 -9
  54. package/dist/types/utils/publicDir.d.ts +1 -1
  55. package/dist/types/utils/serverConfig.d.ts +1 -1
  56. package/package.json +7 -7
  57. /package/dist/esm/{rslib-runtime.mjs → rslib-runtime~1.mjs} +0 -0
  58. /package/dist/esm-node/{rslib-runtime.mjs → rslib-runtime~0.mjs} +0 -0
@@ -7,11 +7,10 @@ import { dataHandler } from "./dataHandler.mjs";
7
7
  import { renderRscHandler } from "./renderRscHandler.mjs";
8
8
  import { serverActionHandler } from "./serverActionHandler.mjs";
9
9
  import { ssrRender } from "./ssrRender.mjs";
10
- import { __webpack_require__ } from "../../rslib-runtime.mjs";
11
- import * as __rspack_external__modern_js_runtime_utils_router_4aa9f9b0 from "@modern-js/runtime-utils/router";
10
+ import { __webpack_require__ } from "../../rslib-runtime~1.mjs";
12
11
  __webpack_require__.add({
13
- 5327 (module) {
14
- module.exports = __rspack_external__modern_js_runtime_utils_router_4aa9f9b0;
12
+ 718 (module) {
13
+ module.exports = require("@modern-js/runtime-utils/router");
15
14
  }
16
15
  });
17
16
  const DYNAMIC_ROUTE_REG = /\/:./;
@@ -164,7 +163,7 @@ async function renderHandler(request, options, mode, fallbackWrapper, framework)
164
163
  const { nestedRoutesJson } = serverManifest;
165
164
  const routes = nestedRoutesJson?.[options.routeInfo.entryName];
166
165
  if (routes) {
167
- const { matchRoutes } = __webpack_require__(5327);
166
+ const { matchRoutes } = __webpack_require__(718);
168
167
  const url = new URL(request.url);
169
168
  const matchedRoutes = matchRoutes(routes, url.pathname, options.routeInfo.urlPath);
170
169
  if (matchedRoutes) {
@@ -8,11 +8,12 @@ import { dataHandler } from "./dataHandler.mjs";
8
8
  import { renderRscHandler } from "./renderRscHandler.mjs";
9
9
  import { serverActionHandler } from "./serverActionHandler.mjs";
10
10
  import { ssrRender } from "./ssrRender.mjs";
11
- import { __webpack_require__ } from "../../rslib-runtime.mjs";
12
- import * as __rspack_external__modern_js_runtime_utils_router_4aa9f9b0 from "@modern-js/runtime-utils/router";
11
+ import { __webpack_require__ } from "../../rslib-runtime~0.mjs";
12
+ import { createRequire as __rspack_createRequire } from "node:module";
13
+ const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
13
14
  __webpack_require__.add({
14
15
  "@modern-js/runtime-utils/router" (module) {
15
- module.exports = __rspack_external__modern_js_runtime_utils_router_4aa9f9b0;
16
+ module.exports = __rspack_createRequire_require("@modern-js/runtime-utils/router");
16
17
  }
17
18
  });
18
19
  const DYNAMIC_ROUTE_REG = /\/:./;
@@ -1,6 +1,6 @@
1
- export { loadCacheConfig } from './loadCache';
2
- export { loadServerCliConfig, loadServerRuntimeConfig } from './loadConfig';
3
- export { loadServerEnv } from './loadEnv';
4
- export { loadServerPlugins } from './loadPlugin';
5
- export type { NodeBindings } from './utils';
6
- export { isResFinalized } from './utils';
1
+ export { loadCacheConfig } from './loadCache.js';
2
+ export { loadServerCliConfig, loadServerRuntimeConfig } from './loadConfig.js';
3
+ export { loadServerEnv } from './loadEnv.js';
4
+ export { loadServerPlugins } from './loadPlugin.js';
5
+ export type { NodeBindings } from './utils.js';
6
+ export { isResFinalized } from './utils.js';
@@ -1,2 +1,2 @@
1
- import type { CacheConfig } from '../../../types';
1
+ import type { CacheConfig } from '../../../types/index.js';
2
2
  export declare function loadCacheConfig(pwd: string): Promise<CacheConfig | undefined>;
@@ -1,3 +1,3 @@
1
- import type { CliConfig, ServerConfig, UserConfig } from '../../../types';
1
+ import type { CliConfig, ServerConfig, UserConfig } from '../../../types/index.js';
2
2
  export declare function loadServerRuntimeConfig(serverConfigPath: string): Promise<ServerConfig | undefined>;
3
3
  export declare function loadServerCliConfig(pwd: string, defaultConfig?: UserConfig): CliConfig;
@@ -1,3 +1,3 @@
1
- import type { ServerBaseOptions } from '../../../serverBase';
1
+ import type { ServerBaseOptions } from '../../../serverBase.js';
2
2
  /** 读取 .env.{process.env.MODERN_ENV} 文件,加载环境变量 */
3
3
  export declare function loadServerEnv(options: ServerBaseOptions): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  import type { ServerPlugin } from '@modern-js/types';
2
- import type { ServerPlugin as ServerPluginInstance } from '../../../types';
2
+ import type { ServerPlugin as ServerPluginInstance } from '../../../types/index.js';
3
3
  export declare function loadServerPlugins(serverPlugins: ServerPlugin[], appDirectory: string): Promise<ServerPluginInstance[]>;
@@ -1,5 +1,5 @@
1
1
  import type { ClientManifest, NodeRequest, NodeResponse, SSRManifest } from '@modern-js/types/server';
2
- import type { HonoRequest, ServerManifest } from '../../../types';
2
+ import type { HonoRequest, ServerManifest } from '../../../types/index.js';
3
3
  type ExtendedNodeRequest = NodeRequest & {
4
4
  __honoRequest?: HonoRequest;
5
5
  __templates?: Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  import type { NodeRequest, NodeResponse } from '@modern-js/types/server';
2
- import type { Context, Middleware, Next, ServerEnv } from '../../types';
3
- import { type NodeBindings } from './helper';
2
+ import type { Context, Middleware, Next, ServerEnv } from '../../types/index.js';
3
+ import { type NodeBindings } from './helper/index.js';
4
4
  export type ServerNodeEnv = {
5
5
  Bindings: NodeBindings;
6
6
  };
@@ -1,5 +1,5 @@
1
- export { loadCacheConfig, loadServerCliConfig, loadServerEnv, loadServerPlugins, loadServerRuntimeConfig, } from './helper';
2
- export type { ServerNodeContext, ServerNodeMiddleware } from './hono';
3
- export { connectMid2HonoMid, connectMockMid2HonoMid, httpCallBack2HonoMid, } from './hono';
4
- export { createNodeServer, createWebRequest, sendResponse, } from './node';
5
- export { getHtmlTemplates, getServerManifest, injectNodeSeverPlugin, injectResourcePlugin, injectRscManifestPlugin, serverStaticPlugin, } from './plugins';
1
+ export { loadCacheConfig, loadServerCliConfig, loadServerEnv, loadServerPlugins, loadServerRuntimeConfig, } from './helper/index.js';
2
+ export type { ServerNodeContext, ServerNodeMiddleware } from './hono.js';
3
+ export { connectMid2HonoMid, connectMockMid2HonoMid, httpCallBack2HonoMid, } from './hono.js';
4
+ export { createNodeServer, createWebRequest, sendResponse, } from './node.js';
5
+ export { getHtmlTemplates, getServerManifest, injectNodeSeverPlugin, injectResourcePlugin, injectRscManifestPlugin, serverStaticPlugin, } from './plugins/index.js';
@@ -2,7 +2,7 @@ import { type Server as NodeServer } from 'node:http';
2
2
  import type { Http2SecureServer } from 'node:http2';
3
3
  import type { Server as NodeHttpsServer } from 'node:https';
4
4
  import type { NodeRequest, NodeResponse } from '@modern-js/types/server';
5
- import type { RequestHandler } from '../../types';
5
+ import type { RequestHandler } from '../../types/index.js';
6
6
  export declare const createWebRequest: (req: NodeRequest, res: NodeResponse, body?: BodyInit) => Request;
7
7
  export declare const sendResponse: (response: Response, res: NodeResponse) => Promise<void>;
8
8
  declare const getRequestListener: (handler: RequestHandler) => (req: NodeRequest, res: NodeResponse) => Promise<void>;
@@ -1,3 +1,3 @@
1
- export * from './nodeServer';
2
- export * from './resource';
3
- export * from './static';
1
+ export * from './nodeServer.js';
2
+ export * from './resource.js';
3
+ export * from './static.js';
@@ -1,6 +1,6 @@
1
1
  import type { Server as NodeServer } from 'node:http';
2
2
  import type { Http2SecureServer } from 'node:http2';
3
- import type { ServerPlugin } from '../../../types';
3
+ import type { ServerPlugin } from '../../../types/index.js';
4
4
  export declare const injectNodeSeverPlugin: ({ nodeServer, }: {
5
5
  nodeServer: NodeServer | Http2SecureServer;
6
6
  }) => ServerPlugin;
@@ -1,5 +1,5 @@
1
1
  import type { Monitors, ServerRoute } from '@modern-js/types';
2
- import type { Middleware, ServerEnv, ServerManifest, ServerPlugin } from '../../../types';
2
+ import type { Middleware, ServerEnv, ServerManifest, ServerPlugin } from '../../../types/index.js';
3
3
  export declare function getHtmlTemplates(pwd: string, routes: ServerRoute[]): Promise<Record<string, string>>;
4
4
  export declare function injectTemplates(pwd: string, routes?: ServerRoute[], htmlTemplatePromise?: ReturnType<typeof getHtmlTemplates>): Middleware<ServerEnv>;
5
5
  export declare function getServerManifest(pwd: string, routes: ServerRoute[], monitors?: Monitors): Promise<ServerManifest>;
@@ -1,5 +1,5 @@
1
1
  import type { ServerRoute } from '@modern-js/types';
2
- import type { HtmlNormalizedConfig, Middleware, OutputNormalizedConfig, ServerNormalizedConfig, ServerPlugin } from '../../../types';
2
+ import type { HtmlNormalizedConfig, Middleware, OutputNormalizedConfig, ServerNormalizedConfig, ServerPlugin } from '../../../types/index.js';
3
3
  export declare const serverStaticPlugin: () => ServerPlugin;
4
4
  export type PublicMiddlwareOptions = {
5
5
  pwd: string;
@@ -1,4 +1,4 @@
1
- import type { Middleware } from '../../../types';
1
+ import type { Middleware } from '../../../types/index.js';
2
2
  export declare const MODULE_FEDERATION_MANIFEST_FILE = "mf-manifest.json";
3
3
  export type ModuleFederationServeAssets = {
4
4
  assets: Set<string>;
@@ -1,4 +1,4 @@
1
- import type { Middleware } from '../../../types';
1
+ import type { Middleware } from '../../../types/index.js';
2
2
  type SupportedEncoding = 'br' | 'gzip';
3
3
  type ResolvePreCompressedAssetResult = {
4
4
  selected: {
@@ -1,5 +1,5 @@
1
1
  import type { ServerRoute } from '@modern-js/types';
2
- import type { Middleware } from '../../../types';
2
+ import type { Middleware } from '../../../types/index.js';
3
3
  type MiddlewareContext = Parameters<Middleware>[0];
4
4
  type StaticServingRequest = {
5
5
  requestPath: string;
@@ -1,4 +1,4 @@
1
- import type { Context } from './types';
1
+ import type { Context } from './types/index.js';
2
2
  type LoaderContext = Map<string, unknown>;
3
3
  type Var = {
4
4
  loaderContext: LoaderContext;
@@ -1,15 +1,15 @@
1
1
  export { Hono } from 'hono';
2
- export { AGGRED_DIR } from './constants';
3
- export { run, useHonoContext } from './context';
4
- export { getLoaderCtx } from './helper';
5
- export * from './plugins';
6
- export type { ServerBase, ServerBaseOptions } from './serverBase';
7
- export { createServerBase } from './serverBase';
8
- export type { Context, HonoRequest as InternalRequest, Middleware, MiddlewareHandler, Next, ServerEnv, ServerLoaderBundle, ServerManifest, } from './types';
9
- export * from './types/config';
10
- export * from './types/plugins';
11
- export * from './types/render';
12
- export * from './types/requestHandler';
13
- export type { SafeFailureEnvelope, SafeFailureHttpResult } from './utils';
14
- export { createErrorHtml, createSafeFailureHttpResult, createSafeJsonFailureResponse, ErrorDigest, getSafeFailureStatus, onError, } from './utils';
15
- export { getPublicDirConfig, getPublicDirPatterns, getPublicDirRoutePrefixes, normalizePublicDir, normalizePublicDirPath, resolvePublicDirPaths, } from './utils/publicDir';
2
+ export { AGGRED_DIR } from './constants.js';
3
+ export { run, useHonoContext } from './context.js';
4
+ export { getLoaderCtx } from './helper.js';
5
+ export * from './plugins/index.js';
6
+ export type { ServerBase, ServerBaseOptions } from './serverBase.js';
7
+ export { createServerBase } from './serverBase.js';
8
+ export type { Context, HonoRequest as InternalRequest, Middleware, MiddlewareHandler, Next, ServerEnv, ServerLoaderBundle, ServerManifest, } from './types/index.js';
9
+ export * from './types/config/index.js';
10
+ export * from './types/plugins/index.js';
11
+ export * from './types/render.js';
12
+ export * from './types/requestHandler.js';
13
+ export type { SafeFailureEnvelope, SafeFailureHttpResult } from './utils/index.js';
14
+ export { createErrorHtml, createSafeFailureHttpResult, createSafeJsonFailureResponse, ErrorDigest, getSafeFailureStatus, onError, } from './utils/index.js';
15
+ export { getPublicDirConfig, getPublicDirPatterns, getPublicDirRoutePrefixes, normalizePublicDir, normalizePublicDirPath, resolvePublicDirPaths, } from './utils/publicDir.js';
@@ -1,5 +1,5 @@
1
1
  import type { InternalServerContext } from '@modern-js/plugin';
2
- import type { ServerPluginExtends } from '../../types';
2
+ import type { ServerPluginExtends } from '../../types/index.js';
3
3
  /**
4
4
  * old plugin useHookRunners function result
5
5
  */
@@ -1,3 +1,3 @@
1
- import type { ServerPlugin } from '../../types';
2
- export { handleSetupResult } from './hooks';
1
+ import type { ServerPlugin } from '../../types/index.js';
2
+ export { handleSetupResult } from './hooks.js';
3
3
  export declare const compatPlugin: () => ServerPlugin;
@@ -1,6 +1,6 @@
1
1
  import type { Logger } from '@modern-js/types';
2
- import type { ServerPlugin } from '../types';
3
- import { type InjectRenderHandlerOptions } from './render';
2
+ import type { ServerPlugin } from '../types/index.js';
3
+ import { type InjectRenderHandlerOptions } from './render/index.js';
4
4
  export type CreateDefaultPluginsOptions = InjectRenderHandlerOptions & {
5
5
  logger?: Logger | false;
6
6
  };
@@ -1,2 +1,2 @@
1
- import type { ServerPlugin } from '../types';
1
+ import type { ServerPlugin } from '../types/index.js';
2
2
  export declare const faviconPlugin: () => ServerPlugin;
@@ -1,8 +1,8 @@
1
- export { compatPlugin, handleSetupResult } from './compat';
2
- export { type CreateDefaultPluginsOptions, createDefaultPlugins, } from './default';
3
- export { faviconPlugin } from './favicon';
4
- export { logPlugin } from './log';
5
- export { injectConfigMiddlewarePlugin } from './middlewares';
6
- export { injectloggerPlugin, injectServerTiming } from './monitors';
7
- export { processedByPlugin } from './processedBy';
8
- export { getRenderHandler, type InjectRenderHandlerOptions, injectRenderHandlerPlugin, renderPlugin, } from './render';
1
+ export { compatPlugin, handleSetupResult } from './compat/index.js';
2
+ export { type CreateDefaultPluginsOptions, createDefaultPlugins, } from './default.js';
3
+ export { faviconPlugin } from './favicon.js';
4
+ export { logPlugin } from './log.js';
5
+ export { injectConfigMiddlewarePlugin } from './middlewares.js';
6
+ export { injectloggerPlugin, injectServerTiming } from './monitors.js';
7
+ export { processedByPlugin } from './processedBy.js';
8
+ export { getRenderHandler, type InjectRenderHandlerOptions, injectRenderHandlerPlugin, renderPlugin, } from './render/index.js';
@@ -1,2 +1,2 @@
1
- import type { ServerPlugin } from '../types';
1
+ import type { ServerPlugin } from '../types/index.js';
2
2
  export declare const logPlugin: () => ServerPlugin;
@@ -1,2 +1,2 @@
1
- import type { MiddlewareObj, ServerPlugin } from '../types';
1
+ import type { MiddlewareObj, ServerPlugin } from '../types/index.js';
2
2
  export declare const injectConfigMiddlewarePlugin: (configMiddlewares?: MiddlewareObj[], configRenderMiddlewares?: MiddlewareObj[]) => ServerPlugin;
@@ -1,5 +1,5 @@
1
1
  import type { Logger } from '@modern-js/types';
2
- import type { Context, Next, ServerEnv, ServerPlugin } from '../types';
2
+ import type { Context, Next, ServerEnv, ServerPlugin } from '../types/index.js';
3
3
  export declare const initMonitorsPlugin: () => ServerPlugin;
4
4
  export declare const injectloggerPlugin: (inputLogger: Logger) => ServerPlugin;
5
5
  export declare const injectServerTiming: () => ServerPlugin;
@@ -1,2 +1,2 @@
1
- import type { ServerPlugin } from '../types';
1
+ import type { ServerPlugin } from '../types/index.js';
2
2
  export declare const processedByPlugin: () => ServerPlugin;
@@ -1,2 +1,2 @@
1
- import type { SSRRenderOptions } from './ssrRender';
1
+ import type { SSRRenderOptions } from './ssrRender.js';
2
2
  export declare const csrRscRender: (req: Request, options: SSRRenderOptions) => Promise<Response>;
@@ -1,5 +1,5 @@
1
1
  import type { ServerRoute } from '@modern-js/types';
2
- import type { SSRRenderOptions } from './ssrRender';
2
+ import type { SSRRenderOptions } from './ssrRender.js';
3
3
  export declare const dataHandler: (request: Request, { routeInfo, serverRoutes, monitors, onError, onTiming, serverManifest, loaderContext, serverContext, reporter, }: SSRRenderOptions & {
4
4
  serverRoutes: ServerRoute[];
5
5
  }) => Promise<Response | void>;
@@ -1,3 +1,3 @@
1
- import type { ServerPlugin } from '../../types';
2
- export * from './inject';
1
+ import type { ServerPlugin } from '../../types/index.js';
2
+ export * from './inject.js';
3
3
  export declare const renderPlugin: () => ServerPlugin;
@@ -1,4 +1,4 @@
1
- import type { CacheConfig, GetRenderHandlerOptions, Render, ServerPlugin } from '../../types';
1
+ import type { CacheConfig, GetRenderHandlerOptions, Render, ServerPlugin } from '../../types/index.js';
2
2
  export interface InjectRenderHandlerOptions {
3
3
  staticGenerate?: boolean;
4
4
  cacheConfig?: CacheConfig;
@@ -1,7 +1,7 @@
1
1
  import type { ServerRoute } from '@modern-js/types';
2
2
  import type { Router } from 'hono/router';
3
- import type { CacheConfig, Render, UserConfig } from '../../types';
4
- import type { Params } from '../../types/requestHandler';
3
+ import type { CacheConfig, Render, UserConfig } from '../../types/index.js';
4
+ import type { Params } from '../../types/requestHandler.js';
5
5
  interface CreateRenderOptions {
6
6
  pwd: string;
7
7
  routes: ServerRoute[];
@@ -1,2 +1,2 @@
1
- import type { SSRRenderOptions } from './ssrRender';
1
+ import type { SSRRenderOptions } from './ssrRender.js';
2
2
  export declare const renderRscHandler: (req: Request, options: SSRRenderOptions) => Promise<Response>;
@@ -1,2 +1,2 @@
1
- import type { SSRRenderOptions } from './ssrRender';
1
+ import type { SSRRenderOptions } from './ssrRender.js';
2
2
  export declare const serverActionHandler: (req: Request, { serverManifest, routeInfo, rscClientManifest }: SSRRenderOptions) => Promise<Response>;
@@ -1,6 +1,6 @@
1
1
  import type { CacheControl, CacheOption, Container } from '@modern-js/types';
2
2
  import type { NodeRequest } from '@modern-js/types/server';
3
- import type { RequestHandler, RequestHandlerOptions } from '../../types/requestHandler';
3
+ import type { RequestHandler, RequestHandlerOptions } from '../../types/requestHandler.js';
4
4
  export type CacheStatus = 'hit' | 'stale' | 'expired' | 'miss';
5
5
  type MaybeAsync<T> = Promise<T> | T;
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import type { Reporter, ServerRoute } from '@modern-js/types';
2
2
  import type { Monitors, NodeRequest, ClientManifest as RscClientManifest, ServerManifest as RscServerManifest, SSRManifest as RscSSRManifest } from '@modern-js/types/server';
3
- import type { CacheConfig, Context, ServerManifest, UserConfig } from '../../types';
4
- import type { OnError, OnTiming, Params } from '../../types/requestHandler';
3
+ import type { CacheConfig, Context, ServerManifest, UserConfig } from '../../types/index.js';
4
+ import type { OnError, OnTiming, Params } from '../../types/requestHandler.js';
5
5
  export interface SSRRenderOptions {
6
6
  pwd: string;
7
7
  html: string;
@@ -1,3 +1,3 @@
1
- import type { UserConfig } from '../../types';
2
- import type { RequestHandlerConfig } from '../../types/requestHandler';
1
+ import type { UserConfig } from '../../types/index.js';
2
+ import type { RequestHandlerConfig } from '../../types/requestHandler.js';
3
3
  export declare function createRequestHandlerConfig(userConfig: UserConfig): RequestHandlerConfig;
@@ -1,2 +1,2 @@
1
- import type { ServerPlugin } from '../types';
1
+ import type { ServerPlugin } from '../types/index.js';
2
2
  export declare const injectRoutePlugin: () => ServerPlugin;
@@ -1,6 +1,6 @@
1
1
  import { type ServerCreateOptions } from '@modern-js/plugin/server';
2
- import type { Env, ServerConfig, ServerPlugin, ServerPluginHooks } from './types';
3
- import type { CliConfig } from './types/config';
2
+ import type { Env, ServerConfig, ServerPlugin, ServerPluginHooks } from './types/index.js';
3
+ import type { CliConfig } from './types/config/index.js';
4
4
  export interface ServerBaseOptions extends ServerCreateOptions {
5
5
  /** server working directory, and then also dist directory */
6
6
  config: CliConfig;
@@ -1,6 +1,6 @@
1
1
  import type { HttpMethodDecider } from '@modern-js/types';
2
- import type { BffCrossProjectPolicyUserConfig, BffEffectUserConfig, BffRuntimeFramework } from './bffRuntime';
3
- export type { BffCrossProjectPolicyUserConfig, BffEffectDataPlatformBatchUserConfig, BffEffectDataPlatformSelectionUserConfig, BffEffectDataPlatformUserConfig, BffEffectOpenApiUserConfig, BffEffectUserConfig, BffRuntimeFramework, } from './bffRuntime';
2
+ import type { BffCrossProjectPolicyUserConfig, BffEffectUserConfig, BffRuntimeFramework } from './bffRuntime.js';
3
+ export type { BffCrossProjectPolicyUserConfig, BffEffectDataPlatformBatchUserConfig, BffEffectDataPlatformSelectionUserConfig, BffEffectDataPlatformUserConfig, BffEffectOpenApiUserConfig, BffEffectUserConfig, BffRuntimeFramework, } from './bffRuntime.js';
4
4
  export interface BffUserConfig {
5
5
  prefix?: string | string[];
6
6
  httpMethodDecider?: HttpMethodDecider;
@@ -1,17 +1,17 @@
1
- import type { BffNormalizedConfig, BffUserConfig } from './bff';
2
- import type { DevNormalizedConfig, DevUserConfig } from './dev';
3
- import type { HtmlNormalizedConfig, HtmlUserConfig } from './html';
4
- import type { OutputNormalizedConfig, OutputUserConfig } from './output';
5
- import type { SecurityNormalizedConfig, SecurityUserConfig } from './security';
6
- import type { ServerNormalizedConfig, ServerUserConfig } from './server';
7
- import type { SourceNormalizedConfig, SourceUserConfig } from './source';
8
- import type { ToolsNormalizedConfig, ToolsUserConfig } from './tools';
9
- export * from './bff';
10
- export * from './html';
11
- export * from './output';
12
- export * from './server';
13
- export * from './source';
14
- export * from './tools';
1
+ import type { BffNormalizedConfig, BffUserConfig } from './bff.js';
2
+ import type { DevNormalizedConfig, DevUserConfig } from './dev.js';
3
+ import type { HtmlNormalizedConfig, HtmlUserConfig } from './html.js';
4
+ import type { OutputNormalizedConfig, OutputUserConfig } from './output.js';
5
+ import type { SecurityNormalizedConfig, SecurityUserConfig } from './security.js';
6
+ import type { ServerNormalizedConfig, ServerUserConfig } from './server.js';
7
+ import type { SourceNormalizedConfig, SourceUserConfig } from './source.js';
8
+ import type { ToolsNormalizedConfig, ToolsUserConfig } from './tools.js';
9
+ export * from './bff.js';
10
+ export * from './html.js';
11
+ export * from './output.js';
12
+ export * from './server.js';
13
+ export * from './source.js';
14
+ export * from './tools.js';
15
15
  export interface UserConfig {
16
16
  output?: OutputUserConfig;
17
17
  source?: SourceUserConfig;
@@ -1,7 +1,7 @@
1
1
  import type { SSRMode } from '@modern-js/types';
2
2
  import type { WatchOptions } from '@modern-js/utils';
3
- import type { ServerTelemetryUserConfig } from './serverTelemetry';
4
- export type { ServerTelemetryCanaryAutopilotStateStoreUserConfig, ServerTelemetryCanaryAutopilotUserConfig, ServerTelemetryCanaryContractGateUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalAuthUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalTrustPolicyUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalUserConfig, ServerTelemetryCanaryUserConfig, ServerTelemetryExporterOptions, ServerTelemetrySloUserConfig, ServerTelemetryUserConfig, ServerTelemetryVictoriaMetricsOptions, } from './serverTelemetry';
3
+ import type { ServerTelemetryUserConfig } from './serverTelemetry.js';
4
+ export type { ServerTelemetryCanaryAutopilotStateStoreUserConfig, ServerTelemetryCanaryAutopilotUserConfig, ServerTelemetryCanaryContractGateUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalAuthUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalTrustPolicyUserConfig, ServerTelemetryCanaryRuntimeFallbackSignalUserConfig, ServerTelemetryCanaryUserConfig, ServerTelemetryExporterOptions, ServerTelemetrySloUserConfig, ServerTelemetryUserConfig, ServerTelemetryVictoriaMetricsOptions, } from './serverTelemetry.js';
5
5
  type Route = string | string[] | {
6
6
  route?: string | string[];
7
7
  disableSpa?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { Alias } from '@modern-js/utils';
2
- import type { ConfigChain } from './share';
2
+ import type { ConfigChain } from './share.js';
3
3
  export interface SourceUserConfig {
4
4
  alias?: ConfigChain<Alias>;
5
5
  enableAsyncEntry?: boolean;
@@ -1,4 +1,4 @@
1
- export * from './config';
2
- export * from './plugins';
3
- export * from './render';
4
- export * from './server';
1
+ export * from './config/index.js';
2
+ export * from './plugins/index.js';
3
+ export * from './render.js';
4
+ export * from './server.js';
@@ -1,8 +1,8 @@
1
1
  import type { CacheOption, Container, HttpMethodDecider, MiddlewareContext, ServerRoute } from '@modern-js/types';
2
2
  import type { Context, MiddlewareHandler } from 'hono';
3
- import type { UserConfig } from '../config';
4
- import type { Render } from '../render';
5
- import type { ServerPlugin } from './plugin';
3
+ import type { UserConfig } from '../config/index.js';
4
+ import type { Render } from '../render.js';
5
+ import type { ServerPlugin } from './plugin.js';
6
6
  export type { FileChangeEvent, ResetEvent } from '@modern-js/plugin';
7
7
  export type APIServerStartInput = {
8
8
  pwd: string;
@@ -1,2 +1,2 @@
1
- export type { APIServerStartInput, CacheConfig, FileChangeEvent, GetRenderHandlerOptions, MiddlewareObj, ServerConfig, ServerMiddleware, WebServerStartInput, } from './base';
2
- export * from './plugin';
1
+ export type { APIServerStartInput, CacheConfig, FileChangeEvent, GetRenderHandlerOptions, MiddlewareObj, ServerConfig, ServerMiddleware, WebServerStartInput, } from './base.js';
2
+ export * from './plugin.js';
@@ -2,7 +2,7 @@ import type { AsyncPipelineHook, ServerContext as BaseServerContext, ServerPlugi
2
2
  import type { Hooks } from '@modern-js/plugin/server';
3
3
  import type { AfterMatchContext, AfterRenderContext, AfterStreamingRenderContext } from '@modern-js/types';
4
4
  import type { MiddlewareHandler } from 'hono';
5
- import type { APIServerStartInput, MiddlewareObj, ServerConfig, WebAdapter, WebServerStartInput } from './base';
5
+ import type { APIServerStartInput, MiddlewareObj, ServerConfig, WebAdapter, WebServerStartInput } from './base.js';
6
6
  export type PrepareWebServerFn = (input: WebServerStartInput) => Promise<WebAdapter | null>;
7
7
  export type PrepareApiServerFn = (input: APIServerStartInput) => Promise<MiddlewareHandler>;
8
8
  export type AfterMatchFn = (ctx: AfterMatchContext) => Promise<any>;
@@ -1,6 +1,6 @@
1
1
  import type { Monitors, Reporter, ClientManifest as RscClientManifest, ServerManifest as RscServerManifest, SSRManifest as RscSSRManifest } from '@modern-js/types';
2
2
  import type { NodeRequest } from '@modern-js/types/server';
3
- import type { Context, ServerManifest } from './server';
3
+ import type { Context, ServerManifest } from './server.js';
4
4
  export interface RenderOptions {
5
5
  monitors: Monitors;
6
6
  loaderContext?: Map<string, unknown>;
@@ -1,6 +1,6 @@
1
1
  import type { Reporter, ServerRoute } from '@modern-js/types';
2
2
  import type { Monitors, ClientManifest as RscClientManifest, ServerManifest as RscServerManifest, SSRManifest as RscSSRManifest } from '@modern-js/types/server';
3
- import type { ServerUserConfig, SourceUserConfig } from './config';
3
+ import type { ServerUserConfig, SourceUserConfig } from './config/index.js';
4
4
  export type Resource = {
5
5
  loadableStats: Record<string, any>;
6
6
  routeManifest: Record<string, any>;
@@ -1,6 +1,6 @@
1
1
  import type { Logger, Metrics, Monitors, NestedRoute, Reporter, ServerRoute } from '@modern-js/types';
2
2
  import type { ClientManifest as RscClientManifest, ServerManifest as RscServerManifest, SSRManifest as RscSSRManifest } from '@modern-js/types/server';
3
- import type { RequestHandler as BundleRequestHandler, OnError, OnTiming, RequestHandlerOptions, Resource } from './requestHandler';
3
+ import type { RequestHandler as BundleRequestHandler, OnError, OnTiming, RequestHandlerOptions, Resource } from './requestHandler.js';
4
4
  export type RequestHandler = (request: Request, ...args: any[]) => Response | Promise<Response>;
5
5
  export type ServerLoaderBundle = {
6
6
  routes: NestedRoute[];
@@ -1,9 +1,9 @@
1
- export * from './entry';
2
- export * from './env';
3
- export * from './error';
4
- export * from './middlewareCollector';
5
- export * from './publicDir';
6
- export * from './request';
7
- export * from './serverConfig';
8
- export * from './transformStream';
9
- export * from './warmup';
1
+ export * from './entry.js';
2
+ export * from './env.js';
3
+ export * from './error.js';
4
+ export * from './middlewareCollector.js';
5
+ export * from './publicDir.js';
6
+ export * from './request.js';
7
+ export * from './serverConfig.js';
8
+ export * from './transformStream.js';
9
+ export * from './warmup.js';
@@ -1,4 +1,4 @@
1
- import type { ServerNormalizedConfig } from '../types';
1
+ import type { ServerNormalizedConfig } from '../types/index.js';
2
2
  /**
3
3
  * Normalize publicDir configuration to an array of strings
4
4
  * @param publicDir - publicDir configuration (string | string[] | undefined)
@@ -1,4 +1,4 @@
1
- import type { CliConfig, ServerConfig } from '../types';
1
+ import type { CliConfig, ServerConfig } from '../types/index.js';
2
2
  /**
3
3
  * 对配置进行合并,cliConfig 与 serverConfig 进行深合并
4
4
  */
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.8.3-ultramodern.6",
20
+ "version": "3.9.0-ultramodern.1",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "exports": {
@@ -66,10 +66,10 @@
66
66
  "node": ">=20"
67
67
  },
68
68
  "dependencies": {
69
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.8.3-ultramodern.6",
70
- "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.8.3-ultramodern.6",
71
- "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.8.3-ultramodern.6",
72
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.8.3-ultramodern.6",
69
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.1",
70
+ "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.0-ultramodern.1",
71
+ "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.0-ultramodern.1",
72
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.1",
73
73
  "@swc/helpers": "^0.5.23",
74
74
  "@web-std/fetch": "^4.2.1",
75
75
  "@web-std/file": "^3.0.3",
@@ -80,8 +80,8 @@
80
80
  "ts-deepmerge": "8.0.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.8.3-ultramodern.6",
84
- "@rslib/core": "0.23.2",
83
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.1",
84
+ "@rslib/core": "1.0.0",
85
85
  "@scripts/rstest-config": "2.66.0",
86
86
  "@types/cloneable-readable": "^2.0.3",
87
87
  "@types/merge-deep": "^3.0.3",