@byteluck-fe/runtime-engine 7.0.1-beta.8 → 7.0.1-beta.9

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,2 +1,3 @@
1
1
  export * from './runtimeEngine';
2
+ export * from './runtimeEngineError';
2
3
  export * from './miniEngine';
@@ -1,4 +1,6 @@
1
1
  import { Engine } from '@byteluck-fe/model-driven-engine';
2
+ import { CustomComponentBox } from '@byteluck-fe/model-driven-core-all';
3
+ import { createRuntimePageVersionBuilder } from './runtimePageVersionBuilder';
2
4
  import { ActionUtilsPlugin, ApprovalPlugin, CustomVueControlPlugin, StatisticsPlugin, DataFilterPlugin, DatasourceSearchPlugin, DataViewPlugin, DisplayPlugin, FormRelationFieldPlugin, JurisdictionPlugin, MultistageFillingPlugin, ReferenceAndCalcFieldPlugin, TitlePlugin, SubtableChangePlugin, DataSourceManagePlugin, ExpressionPlugin, TitleSettingPlugin, EventListenerPlugin, FormStateChangePlugin, WorkerDataStorePlugin, CalcPlugin, ListCheckStatePlugin, GlobalLockPlugin, PageRulePlugin } from '../../../src/plugins/engine';
3
5
  import { default as setTenant } from '../../../src/plugins/setTenant';
4
6
  import { Store } from 'vuex';
@@ -52,5 +54,5 @@ declare const useRenderEngine: ({ props, emit, route, router, store, }: {
52
54
  GlobalLockPlugin: typeof GlobalLockPlugin;
53
55
  PageRulePlugin: typeof PageRulePlugin;
54
56
  };
55
- declare function initContext(props: PropsInstanceType<'render-engine'>, printUrlList?: any, inject?: any, customParams?: any): Engine;
57
+ declare function initContext(props: PropsInstanceType<'render-engine'>, registered: Map<string, CustomComponentBox>, printUrlList?: any, inject?: any, customParams?: any, versionBuilder?: ReturnType<typeof createRuntimePageVersionBuilder>): Engine;
56
58
  export { initContext, corssDomainMessageProcessor, onEngineListInit, setFormDataNew, setVueApp, globalModules, setTenant, useRenderEngine, desktopUseCancel, mobileUseCancel, };
@@ -0,0 +1,14 @@
1
+ export declare const RUNTIME_ENGINE_ERROR_CODE: {
2
+ readonly SCHEMA_VERSION_INVALID: "RUNTIME_SCHEMA_VERSION_INVALID";
3
+ readonly INITIALIZATION_FAILED: "RUNTIME_ENGINE_INIT_FAILED";
4
+ };
5
+ export type RuntimeEngineErrorCode = (typeof RUNTIME_ENGINE_ERROR_CODE)[keyof typeof RUNTIME_ENGINE_ERROR_CODE];
6
+ export interface RuntimeEngineErrorPayload {
7
+ code: RuntimeEngineErrorCode;
8
+ schemaVersion: string | null;
9
+ message: string;
10
+ }
11
+ /**
12
+ * 统一生成可观测错误载荷,只保留稳定且有界的字段,避免把底层异常、接口地址或页面模型透传给上层。
13
+ */
14
+ export declare function createRuntimeEngineErrorPayload(code: RuntimeEngineErrorCode, schemaVersion: unknown): RuntimeEngineErrorPayload;
@@ -0,0 +1,9 @@
1
+ import { VersionBuilder } from '@byteluck-fe/model-driven-core-all';
2
+
3
+ /**
4
+ * 根据页面持久化的 schema 版本创建迁移器。
5
+ *
6
+ * Runtime 只负责校验接口字段类型并清理首尾空白;版本是否受支持必须继续由
7
+ * model-driven 的 VersionBuilder 注册表判断,避免两边维护重复且可能漂移的白名单。
8
+ */
9
+ export declare function createRuntimePageVersionBuilder(schemaVersion: unknown): VersionBuilder;