@esmx/core 3.0.0-rc.60 → 3.0.0-rc.63

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img src="https://www.esmnext.com/logo.svg?t=2025" width="120" alt="Esmx Logo" />
2
+ <img src="https://esmx.dev/logo.svg?t=2025" width="120" alt="Esmx Logo" />
3
3
  <h1>@esmx/core</h1>
4
4
 
5
5
  <div>
@@ -9,7 +9,7 @@
9
9
  <a href="https://github.com/esmnext/esmx/actions/workflows/build.yml">
10
10
  <img src="https://github.com/esmnext/esmx/actions/workflows/build.yml/badge.svg" alt="Build" />
11
11
  </a>
12
- <a href="https://www.esmnext.com/coverage/">
12
+ <a href="https://esmx.dev/coverage/">
13
13
  <img src="https://img.shields.io/badge/coverage-live%20report-brightgreen" alt="Coverage Report" />
14
14
  </a>
15
15
  <a href="https://nodejs.org/">
@@ -47,11 +47,11 @@ npm install @esmx/core
47
47
  npm install @esmx/core
48
48
  ```
49
49
 
50
- For detailed usage examples and configuration options, please visit the [official documentation](https://www.esmnext.com).
50
+ For detailed usage examples and configuration options, please visit the [official documentation](https://esmx.dev).
51
51
 
52
52
  ## 📚 Documentation
53
53
 
54
- Visit the [official documentation](https://www.esmnext.com) for detailed usage guides and API reference.
54
+ Visit the [official documentation](https://esmx.dev) for detailed usage guides and API reference.
55
55
 
56
56
  ## 📄 License
57
57
 
package/README.zh-CN.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img src="https://www.esmnext.com/logo.svg?t=2025" width="120" alt="Esmx Logo" />
2
+ <img src="https://esmx.dev/logo.svg?t=2025" width="120" alt="Esmx Logo" />
3
3
  <h1>@esmx/core</h1>
4
4
 
5
5
  <div>
@@ -9,7 +9,7 @@
9
9
  <a href="https://github.com/esmnext/esmx/actions/workflows/build.yml">
10
10
  <img src="https://github.com/esmnext/esmx/actions/workflows/build.yml/badge.svg" alt="Build" />
11
11
  </a>
12
- <a href="https://www.esmnext.com/coverage/">
12
+ <a href="https://esmx.dev/coverage/">
13
13
  <img src="https://img.shields.io/badge/coverage-live%20report-brightgreen" alt="Coverage Report" />
14
14
  </a>
15
15
  <a href="https://nodejs.org/">
@@ -47,11 +47,11 @@ npm install @esmx/core
47
47
  npm install @esmx/core
48
48
  ```
49
49
 
50
- 详细的使用示例和配置选项,请访问[官方文档](https://www.esmnext.com)。
50
+ 详细的使用示例和配置选项,请访问[官方文档](https://esmx.dev)。
51
51
 
52
52
  ## 📚 文档
53
53
 
54
- 访问[官方文档](https://www.esmnext.com)获取详细的使用指南和 API 参考。
54
+ 访问[官方文档](https://esmx.dev)获取详细的使用指南和 API 参考。
55
55
 
56
56
  ## 📄 许可证
57
57
 
package/dist/app.d.ts CHANGED
@@ -2,21 +2,21 @@ import type { COMMAND, Esmx } from './core';
2
2
  import { RenderContext, type RenderContextOptions } from './render-context';
3
3
  import { type Middleware } from './utils/middleware';
4
4
  /**
5
- * 应用程序实例接口。
5
+ * Application instance interface.
6
6
  *
7
- * App Esmx 框架的应用抽象,提供了统一的接口来管理应用的生命周期、
8
- * 静态资源和服务端渲染。
7
+ * App is the application abstraction of the Esmx framework, providing a unified interface
8
+ * to manage application lifecycle, static assets, and server-side rendering.
9
9
  *
10
10
  * @example
11
11
  * ```ts
12
12
  * // entry.node.ts
13
13
  * export default {
14
- * // 开发环境配置
14
+ * // Development environment configuration
15
15
  * async devApp(esmx) {
16
16
  * return import('@esmx/rspack').then((m) =>
17
17
  * m.createRspackHtmlApp(esmx, {
18
18
  * config(rc) {
19
- * // 自定义 Rspack 配置
19
+ * // Custom Rspack configuration
20
20
  * }
21
21
  * })
22
22
  * );
@@ -26,17 +26,17 @@ import { type Middleware } from './utils/middleware';
26
26
  */
27
27
  export interface App {
28
28
  /**
29
- * 静态资源处理中间件。
29
+ * Static asset processing middleware.
30
30
  *
31
- * 开发环境:
32
- * - 处理源码的静态资源请求
33
- * - 支持实时编译和热更新
34
- * - 使用 no-cache 缓存策略
31
+ * Development environment:
32
+ * - Handles static asset requests from source code
33
+ * - Supports real-time compilation and hot reloading
34
+ * - Uses no-cache strategy
35
35
  *
36
- * 生产环境:
37
- * - 处理构建后的静态资源
38
- * - 支持不可变文件的长期缓存(.final.xxx
39
- * - 优化的资源加载策略
36
+ * Production environment:
37
+ * - Handles built static assets
38
+ * - Supports long-term caching for immutable files (.final.xxx)
39
+ * - Optimized asset loading strategy
40
40
  *
41
41
  * @example
42
42
  * ```ts
@@ -45,14 +45,14 @@ export interface App {
45
45
  */
46
46
  middleware: Middleware;
47
47
  /**
48
- * 服务端渲染函数。
48
+ * Server-side rendering function.
49
49
  *
50
- * 根据运行环境提供不同实现:
51
- * - 生产环境(start):加载构建后的服务端入口文件(entry.server)执行渲染
52
- * - 开发环境(dev):加载源码中的服务端入口文件执行渲染
50
+ * Provides different implementations based on the runtime environment:
51
+ * - Production environment (start): Loads the built server entry file (entry.server) to execute rendering
52
+ * - Development environment (dev): Loads the server entry file from source code to execute rendering
53
53
  *
54
- * @param options - 渲染选项
55
- * @returns 返回渲染上下文,包含渲染结果
54
+ * @param options - Rendering options
55
+ * @returns Returns the rendering context containing the rendering result
56
56
  *
57
57
  * @example
58
58
  * ```ts
@@ -64,21 +64,21 @@ export interface App {
64
64
  */
65
65
  render: (options?: RenderContextOptions) => Promise<RenderContext>;
66
66
  /**
67
- * 生产环境构建函数。
68
- * 用于资源打包和优化。
67
+ * Production environment build function.
68
+ * Used for asset packaging and optimization.
69
69
  *
70
- * @returns 构建成功返回 true,失败返回 false
70
+ * @returns Returns true for successful build, false for failed build
71
71
  */
72
72
  build?: () => Promise<boolean>;
73
73
  /**
74
- * 资源清理函数。
75
- * 用于关闭服务器、断开连接等。
74
+ * Resource cleanup function.
75
+ * Used for shutting down servers, disconnecting connections, etc.
76
76
  *
77
- * @returns 清理成功返回 true,失败返回 false
77
+ * @returns Returns true for successful cleanup, false for failed cleanup
78
78
  */
79
79
  destroy?: () => Promise<boolean>;
80
80
  }
81
81
  /**
82
- * 创建生产环境的应用程序实例,开发环境不可用。
82
+ * Create an application instance for production environment, not available in development environment.
83
83
  */
84
84
  export declare function createApp(esmx: Esmx, command: COMMAND): Promise<App>;