@byteluck-fe/model-driven-driven 7.0.0-props.99 → 8.0.0-beta.0
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 +9 -0
- package/dist/esm/Builder.js +2 -6
- package/dist/esm/Designer.js +31 -42
- package/dist/esm/Driven.js +20 -29
- package/dist/esm/Plugin.js +1 -3
- package/dist/esm/Store.js +7 -9
- package/dist/esm/headless/build-info.js +58 -0
- package/dist/esm/headless/control-node.factory.js +669 -0
- package/dist/esm/headless/control-tree.js +106 -0
- package/dist/esm/headless/index.js +11 -0
- package/dist/esm/headless/locale.js +159 -0
- package/dist/esm/headless/model-bindings.js +265 -0
- package/dist/esm/headless/page-compiler.js +47 -0
- package/dist/esm/headless/page-template.factory.js +134 -0
- package/dist/esm/headless/permissions.js +334 -0
- package/dist/esm/headless/saved-model.encoder.js +135 -0
- package/dist/esm/headless/session.js +71 -0
- package/dist/esm/headless/types.js +149 -0
- package/dist/esm/headless/validator.js +140 -0
- package/dist/esm/utils.js +15 -16
- package/dist/headless/index.js +1 -0
- package/dist/headless/index.mjs +1 -0
- package/dist/index.umd.js +11 -3
- package/dist/types/headless/build-info.d.ts +5 -0
- package/dist/types/headless/control-node.factory.d.ts +3 -0
- package/dist/types/headless/control-tree.d.ts +9 -0
- package/dist/types/headless/index.d.ts +11 -0
- package/dist/types/headless/locale.d.ts +26 -0
- package/dist/types/headless/model-bindings.d.ts +3 -0
- package/dist/types/headless/page-compiler.d.ts +5 -0
- package/dist/types/headless/page-template.factory.d.ts +2 -0
- package/dist/types/headless/permissions.d.ts +5 -0
- package/dist/types/headless/saved-model.encoder.d.ts +5 -0
- package/dist/types/headless/session.d.ts +11 -0
- package/dist/types/headless/types.d.ts +36 -0
- package/dist/types/headless/validator.d.ts +9 -0
- package/package.json +29 -7
package/README.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Driven
|
|
2
|
+
|
|
2
3
|
设计态引擎
|
|
3
4
|
|
|
5
|
+
## 纯 Node headless 子入口
|
|
6
|
+
|
|
7
|
+
`@byteluck-fe/model-driven-driven/headless` 接收控件类型、页面模板或纯 JSON 控件树,输出确定的控件节点、保存模型、绑定、权限、诊断或编译结果。它不加载旧 Driven、Vue、DOM 或接口;FDE/批量构建应创建独立 `createHeadlessSession({ locale })`,在 session 内复用 ID 序列与权限 locale,再用 `compilePageModel` 校验编译。单次 `createControlNode` 仅适合构造一个独立节点。
|
|
8
|
+
|
|
9
|
+
locale 不维护语言枚举,`fr_FR` 等输入只做通用规范化。新增语言可向 session 传当前语言的 `{ localeMessages: { 'CMD.xxx': '...' } }`,或传同步 `resolveLocaleMessage`;control、page 与 permissions 共用“调用方事实 → 生成 catalog 事实 → message fallback”的解析顺序,headless 自身零网络。
|
|
10
|
+
|
|
11
|
+
增量 patch 必须向 session 注入能避开页面已有/保留 ID 的平台 `idFactory`;公共层不会维护跨页面的全局 ID 集合。
|
|
12
|
+
|
|
4
13
|
Builder.ts // 兼容旧版Designer,提供页面初始化
|
|
5
14
|
constants.ts // 常量
|
|
6
15
|
Designer.ts // 旧版designer的实现
|
package/dist/esm/Builder.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
function _class_call_check(instance, Constructor) {
|
|
2
|
-
if (!(instance instanceof Constructor))
|
|
3
|
-
throw new TypeError("Cannot call a class as a function");
|
|
4
|
-
}
|
|
2
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
5
3
|
}
|
|
6
4
|
function _defineProperties(target, props) {
|
|
7
5
|
for(var i = 0; i < props.length; i++){
|
|
@@ -25,9 +23,7 @@ function _define_property(obj, key, value) {
|
|
|
25
23
|
configurable: true,
|
|
26
24
|
writable: true
|
|
27
25
|
});
|
|
28
|
-
} else
|
|
29
|
-
obj[key] = value;
|
|
30
|
-
}
|
|
26
|
+
} else obj[key] = value;
|
|
31
27
|
return obj;
|
|
32
28
|
}
|
|
33
29
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
package/dist/esm/Designer.js
CHANGED
|
@@ -7,9 +7,7 @@ function _array_without_holes(arr) {
|
|
|
7
7
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
8
|
}
|
|
9
9
|
function _assert_this_initialized(self) {
|
|
10
|
-
if (self === void 0)
|
|
11
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
12
|
-
}
|
|
10
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
13
11
|
return self;
|
|
14
12
|
}
|
|
15
13
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -20,11 +18,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
20
18
|
reject(error);
|
|
21
19
|
return;
|
|
22
20
|
}
|
|
23
|
-
if (info.done)
|
|
24
|
-
|
|
25
|
-
} else {
|
|
26
|
-
Promise.resolve(value).then(_next, _throw);
|
|
27
|
-
}
|
|
21
|
+
if (info.done) resolve(value);
|
|
22
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
28
23
|
}
|
|
29
24
|
function _async_to_generator(fn) {
|
|
30
25
|
return function() {
|
|
@@ -46,9 +41,7 @@ function _call_super(_this, derived, args) {
|
|
|
46
41
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
47
42
|
}
|
|
48
43
|
function _class_call_check(instance, Constructor) {
|
|
49
|
-
if (!(instance instanceof Constructor))
|
|
50
|
-
throw new TypeError("Cannot call a class as a function");
|
|
51
|
-
}
|
|
44
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
52
45
|
}
|
|
53
46
|
function _defineProperties(target, props) {
|
|
54
47
|
for(var i = 0; i < props.length; i++){
|
|
@@ -72,9 +65,7 @@ function _define_property(obj, key, value) {
|
|
|
72
65
|
configurable: true,
|
|
73
66
|
writable: true
|
|
74
67
|
});
|
|
75
|
-
} else
|
|
76
|
-
obj[key] = value;
|
|
77
|
-
}
|
|
68
|
+
} else obj[key] = value;
|
|
78
69
|
return obj;
|
|
79
70
|
}
|
|
80
71
|
function _get_prototype_of(o) {
|
|
@@ -100,20 +91,26 @@ function _instanceof(left, right) {
|
|
|
100
91
|
"@swc/helpers - instanceof";
|
|
101
92
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
102
93
|
return !!right[Symbol.hasInstance](left);
|
|
103
|
-
} else
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
} else return left instanceof right;
|
|
95
|
+
}
|
|
96
|
+
function _is_native_reflect_construct() {
|
|
97
|
+
try {
|
|
98
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
99
|
+
} catch (_) {}
|
|
100
|
+
return (_is_native_reflect_construct = function() {
|
|
101
|
+
return !!result;
|
|
102
|
+
})();
|
|
106
103
|
}
|
|
107
104
|
function _iterable_to_array(iter) {
|
|
108
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
105
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
106
|
+
return Array.from(iter);
|
|
107
|
+
}
|
|
109
108
|
}
|
|
110
109
|
function _non_iterable_spread() {
|
|
111
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
110
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
112
111
|
}
|
|
113
112
|
function _possible_constructor_return(self, call) {
|
|
114
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
115
|
-
return call;
|
|
116
|
-
}
|
|
113
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
117
114
|
return _assert_this_initialized(self);
|
|
118
115
|
}
|
|
119
116
|
function _set_prototype_of(o, p) {
|
|
@@ -126,26 +123,6 @@ function _set_prototype_of(o, p) {
|
|
|
126
123
|
function _to_consumable_array(arr) {
|
|
127
124
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
128
125
|
}
|
|
129
|
-
function _type_of(obj) {
|
|
130
|
-
"@swc/helpers - typeof";
|
|
131
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
132
|
-
}
|
|
133
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
134
|
-
if (!o) return;
|
|
135
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
136
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
137
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
138
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
139
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
140
|
-
}
|
|
141
|
-
function _is_native_reflect_construct() {
|
|
142
|
-
try {
|
|
143
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
144
|
-
} catch (_) {}
|
|
145
|
-
return (_is_native_reflect_construct = function() {
|
|
146
|
-
return !!result;
|
|
147
|
-
})();
|
|
148
|
-
}
|
|
149
126
|
function _ts_generator(thisArg, body) {
|
|
150
127
|
var f, y, t, _ = {
|
|
151
128
|
label: 0,
|
|
@@ -245,6 +222,18 @@ function _ts_generator(thisArg, body) {
|
|
|
245
222
|
};
|
|
246
223
|
}
|
|
247
224
|
}
|
|
225
|
+
function _type_of(obj) {
|
|
226
|
+
"@swc/helpers - typeof";
|
|
227
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
228
|
+
}
|
|
229
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
230
|
+
if (!o) return;
|
|
231
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
232
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
233
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
234
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
235
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
236
|
+
}
|
|
248
237
|
import { RegisterControls, controlHooksEmitter } from '@byteluck-fe/model-driven-core';
|
|
249
238
|
import EventLogic from './EventLogic';
|
|
250
239
|
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
package/dist/esm/Driven.js
CHANGED
|
@@ -10,9 +10,7 @@ function _array_without_holes(arr) {
|
|
|
10
10
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
11
11
|
}
|
|
12
12
|
function _assert_this_initialized(self) {
|
|
13
|
-
if (self === void 0)
|
|
14
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
-
}
|
|
13
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
14
|
return self;
|
|
17
15
|
}
|
|
18
16
|
function _call_super(_this, derived, args) {
|
|
@@ -20,9 +18,7 @@ function _call_super(_this, derived, args) {
|
|
|
20
18
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
19
|
}
|
|
22
20
|
function _class_call_check(instance, Constructor) {
|
|
23
|
-
if (!(instance instanceof Constructor))
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
21
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
26
22
|
}
|
|
27
23
|
function _defineProperties(target, props) {
|
|
28
24
|
for(var i = 0; i < props.length; i++){
|
|
@@ -46,22 +42,17 @@ function _define_property(obj, key, value) {
|
|
|
46
42
|
configurable: true,
|
|
47
43
|
writable: true
|
|
48
44
|
});
|
|
49
|
-
} else
|
|
50
|
-
obj[key] = value;
|
|
51
|
-
}
|
|
45
|
+
} else obj[key] = value;
|
|
52
46
|
return obj;
|
|
53
47
|
}
|
|
54
48
|
function _get(target, property, receiver) {
|
|
55
|
-
if (typeof Reflect !== "undefined" && Reflect.get)
|
|
56
|
-
|
|
57
|
-
} else {
|
|
49
|
+
if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
|
|
50
|
+
else {
|
|
58
51
|
_get = function get(target, property, receiver) {
|
|
59
52
|
var base = _super_prop_base(target, property);
|
|
60
53
|
if (!base) return;
|
|
61
54
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
62
|
-
if (desc.get)
|
|
63
|
-
return desc.get.call(receiver || target);
|
|
64
|
-
}
|
|
55
|
+
if (desc.get) return desc.get.call(receiver || target);
|
|
65
56
|
return desc.value;
|
|
66
57
|
};
|
|
67
58
|
}
|
|
@@ -86,8 +77,18 @@ function _inherits(subClass, superClass) {
|
|
|
86
77
|
});
|
|
87
78
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
88
79
|
}
|
|
80
|
+
function _is_native_reflect_construct() {
|
|
81
|
+
try {
|
|
82
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
83
|
+
} catch (_) {}
|
|
84
|
+
return (_is_native_reflect_construct = function() {
|
|
85
|
+
return !!result;
|
|
86
|
+
})();
|
|
87
|
+
}
|
|
89
88
|
function _iterable_to_array(iter) {
|
|
90
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
89
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
90
|
+
return Array.from(iter);
|
|
91
|
+
}
|
|
91
92
|
}
|
|
92
93
|
function _iterable_to_array_limit(arr, i) {
|
|
93
94
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -114,10 +115,10 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
114
115
|
return _arr;
|
|
115
116
|
}
|
|
116
117
|
function _non_iterable_rest() {
|
|
117
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
118
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
118
119
|
}
|
|
119
120
|
function _non_iterable_spread() {
|
|
120
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
121
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
121
122
|
}
|
|
122
123
|
function _object_spread(target) {
|
|
123
124
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -135,9 +136,7 @@ function _object_spread(target) {
|
|
|
135
136
|
return target;
|
|
136
137
|
}
|
|
137
138
|
function _possible_constructor_return(self, call) {
|
|
138
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
139
|
-
return call;
|
|
140
|
-
}
|
|
139
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
141
140
|
return _assert_this_initialized(self);
|
|
142
141
|
}
|
|
143
142
|
function _set_prototype_of(o, p) {
|
|
@@ -172,14 +171,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
172
171
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
173
172
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
174
173
|
}
|
|
175
|
-
function _is_native_reflect_construct() {
|
|
176
|
-
try {
|
|
177
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
178
|
-
} catch (_) {}
|
|
179
|
-
return (_is_native_reflect_construct = function() {
|
|
180
|
-
return !!result;
|
|
181
|
-
})();
|
|
182
|
-
}
|
|
183
174
|
import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from '@byteluck-fe/model-driven-shared';
|
|
184
175
|
import { findInstanceDataScopeParent, Store } from './Store';
|
|
185
176
|
import { Designer } from './Designer';
|
package/dist/esm/Plugin.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
function _class_call_check(instance, Constructor) {
|
|
2
|
-
if (!(instance instanceof Constructor))
|
|
3
|
-
throw new TypeError("Cannot call a class as a function");
|
|
4
|
-
}
|
|
2
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
5
3
|
}
|
|
6
4
|
var Plugin = function Plugin() {
|
|
7
5
|
"use strict";
|
package/dist/esm/Store.js
CHANGED
|
@@ -10,9 +10,7 @@ function _array_without_holes(arr) {
|
|
|
10
10
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
11
11
|
}
|
|
12
12
|
function _class_call_check(instance, Constructor) {
|
|
13
|
-
if (!(instance instanceof Constructor))
|
|
14
|
-
throw new TypeError("Cannot call a class as a function");
|
|
15
|
-
}
|
|
13
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
16
14
|
}
|
|
17
15
|
function _defineProperties(target, props) {
|
|
18
16
|
for(var i = 0; i < props.length; i++){
|
|
@@ -36,13 +34,13 @@ function _define_property(obj, key, value) {
|
|
|
36
34
|
configurable: true,
|
|
37
35
|
writable: true
|
|
38
36
|
});
|
|
39
|
-
} else
|
|
40
|
-
obj[key] = value;
|
|
41
|
-
}
|
|
37
|
+
} else obj[key] = value;
|
|
42
38
|
return obj;
|
|
43
39
|
}
|
|
44
40
|
function _iterable_to_array(iter) {
|
|
45
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
41
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
42
|
+
return Array.from(iter);
|
|
43
|
+
}
|
|
46
44
|
}
|
|
47
45
|
function _iterable_to_array_limit(arr, i) {
|
|
48
46
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -69,10 +67,10 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
69
67
|
return _arr;
|
|
70
68
|
}
|
|
71
69
|
function _non_iterable_rest() {
|
|
72
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
70
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
73
71
|
}
|
|
74
72
|
function _non_iterable_spread() {
|
|
75
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
73
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
76
74
|
}
|
|
77
75
|
function _sliced_to_array(arr, i) {
|
|
78
76
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else obj[key] = value;
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
12
|
+
function _object_spread(target) {
|
|
13
|
+
for(var i = 1; i < arguments.length; i++){
|
|
14
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
15
|
+
var ownKeys = Object.keys(source);
|
|
16
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
17
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
ownKeys.forEach(function(key) {
|
|
22
|
+
_define_property(target, key, source[key]);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
}
|
|
27
|
+
function ownKeys(object, enumerableOnly) {
|
|
28
|
+
var keys = Object.keys(object);
|
|
29
|
+
if (Object.getOwnPropertySymbols) {
|
|
30
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
31
|
+
if (enumerableOnly) {
|
|
32
|
+
symbols = symbols.filter(function(sym) {
|
|
33
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
keys.push.apply(keys, symbols);
|
|
37
|
+
}
|
|
38
|
+
return keys;
|
|
39
|
+
}
|
|
40
|
+
function _object_spread_props(target, source) {
|
|
41
|
+
source = source != null ? source : {};
|
|
42
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
43
|
+
else {
|
|
44
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
45
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return target;
|
|
49
|
+
}
|
|
50
|
+
import { getModelDrivenBuildInfo } from '@byteluck-fe/model-driven-core/contracts';
|
|
51
|
+
import { CONTROL_CATALOG_REVISION } from '@byteluck-fe/model-driven-controls/catalog';
|
|
52
|
+
/**
|
|
53
|
+
* 版本事实只从 core/contracts 与生成 catalog 组合,不从 package.json 或运行顺序推断。
|
|
54
|
+
*/ export function getHeadlessBuildInfo() {
|
|
55
|
+
return _object_spread_props(_object_spread({}, getModelDrivenBuildInfo()), {
|
|
56
|
+
catalogRevision: CONTROL_CATALOG_REVISION
|
|
57
|
+
});
|
|
58
|
+
}
|