@huanban/rulego-editor-core 1.3.10 → 1.3.11

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.
@@ -554,22 +554,22 @@ export declare class HuanbanRulegoEditor {
554
554
  */
555
555
  private _autoLoadComponents;
556
556
  /**
557
- * 通用数据请求方法 — 优先从 API 加载, 失败自动回退到 mock 文件
557
+ * 通用数据请求方法 — 只从真实 API 加载,失败直接 reject。
558
558
  *
559
559
  * @param apiBase - API 基础地址 (如 'http://127.0.0.1:9090/api/v1')
560
560
  * @param path - 请求路径 (如 '/components')
561
- * @param mockFile - 本地 mock 文件路径 (如 'mock/components.json')
561
+ * @param legacyFallbackFile - 旧版本兼容参数,当前不再读取本地替代数据
562
562
  * @param timeout - 超时毫秒数, 默认 5000
563
563
  * @param headers - 可选的自定义请求头 (如认证 Token)
564
564
  * @returns Promise<any> 解析后的 JSON 数据
565
565
  *
566
566
  * @example
567
567
  * ```js
568
- * HuanbanRulegoEditor.fetchData('http://api.example.com', '/components', 'mock/components.json')
568
+ * HuanbanRulegoEditor.fetchData('http://api.example.com/api/v1', '/components')
569
569
  * .then(data => console.log(data))
570
570
  * ```
571
571
  */
572
- static fetchData(apiBase: string, path: string, mockFile: string, timeout?: number, headers?: Record<string, string>): Promise<unknown>;
572
+ static fetchData(apiBase: string, path: string, legacyFallbackFile?: string, timeout?: number, headers?: Record<string, string>): Promise<unknown>;
573
573
  /**
574
574
  * 开启/关闭编辑器内部调试日志
575
575
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huanban/rulego-editor-core",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "RuleGo 规则链编辑器核心库 - 框架无关的 Headless 编辑器引擎 + API 抽象层 (WorkflowFetcher)",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",