@opentiny/tiny-engine-plugin-bridge 2.9.0-rc.0 → 2.9.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/dist/index.js +117 -115
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { callEntry as b, getMetaApi as p, META_SERVICE as
|
|
2
|
+
import { callEntry as b, getMetaApi as p, META_SERVICE as m, useNotify as A, useResource as V, getMergeMeta as we, useModal as Ue, useLayout as he, useCompile as be, defineService as on } from "@opentiny/tiny-engine-meta-register";
|
|
3
3
|
import { reactive as dt, ref as Ce, watch as ht, resolveComponent as se, createElementBlock as mt, openBlock as _e, createElementVNode as xe, createVNode as N, withCtx as L, Fragment as cn, renderList as dn, withModifiers as Pt, normalizeClass as ln, toDisplayString as at, nextTick as un, computed as Te, watchEffect as fn, onMounted as mn, createBlock as Oe, createCommentVNode as ze, createTextVNode as ft, provide as hn, onActivated as pn } from "vue";
|
|
4
4
|
import { SvgButton as ne, SearchEmpty as Me, ButtonGroup as Ne, PluginSetting as Ae, VueMonaco as Ie, PluginPanel as Ge } from "@opentiny/tiny-engine-common";
|
|
5
5
|
import { isVsCodeEnv as ce } from "@opentiny/tiny-engine-common/js/environments";
|
|
@@ -12,13 +12,13 @@ const Ut = {
|
|
|
12
12
|
title: "资源管理",
|
|
13
13
|
type: "plugins",
|
|
14
14
|
icon: "plugin-icon-sresources"
|
|
15
|
-
}, B = b((s, e) => p(
|
|
15
|
+
}, B = b((s, e) => p(m.Http).get(`/app-center/api/apps/extension/list?app=${s}&category=${e}`), {
|
|
16
16
|
metaData: {
|
|
17
17
|
id: "engine.plugins.bridge.http.fetchResourceList"
|
|
18
18
|
},
|
|
19
19
|
ctx: () => ({
|
|
20
20
|
getMetaApi: p,
|
|
21
|
-
META_SERVICE:
|
|
21
|
+
META_SERVICE: m,
|
|
22
22
|
generateBridge: $e,
|
|
23
23
|
generateUtil: Ye,
|
|
24
24
|
fetchResourceList: B,
|
|
@@ -28,13 +28,13 @@ const Ut = {
|
|
|
28
28
|
requestDeleteReSource: W,
|
|
29
29
|
requestGenerateBridgeUtil: X
|
|
30
30
|
})
|
|
31
|
-
}), st = b(() => p(
|
|
31
|
+
}), st = b(() => p(m.Http).get("/app-center/api/apps/extension"), {
|
|
32
32
|
metaData: {
|
|
33
33
|
id: "engine.plugins.bridge.http.fetchResourceDetail"
|
|
34
34
|
},
|
|
35
35
|
ctx: () => ({
|
|
36
36
|
getMetaApi: p,
|
|
37
|
-
META_SERVICE:
|
|
37
|
+
META_SERVICE: m,
|
|
38
38
|
generateBridge: $e,
|
|
39
39
|
generateUtil: Ye,
|
|
40
40
|
fetchResourceList: B,
|
|
@@ -44,13 +44,13 @@ const Ut = {
|
|
|
44
44
|
requestDeleteReSource: W,
|
|
45
45
|
requestGenerateBridgeUtil: X
|
|
46
46
|
})
|
|
47
|
-
}), G = b((s) => p(
|
|
47
|
+
}), G = b((s) => p(m.Http).post("/app-center/api/apps/extension/create", s), {
|
|
48
48
|
metaData: {
|
|
49
49
|
id: "engine.plugins.bridge.http.requestAddReSource"
|
|
50
50
|
},
|
|
51
51
|
ctx: () => ({
|
|
52
52
|
getMetaApi: p,
|
|
53
|
-
META_SERVICE:
|
|
53
|
+
META_SERVICE: m,
|
|
54
54
|
generateBridge: $e,
|
|
55
55
|
generateUtil: Ye,
|
|
56
56
|
fetchResourceList: B,
|
|
@@ -60,13 +60,13 @@ const Ut = {
|
|
|
60
60
|
requestDeleteReSource: W,
|
|
61
61
|
requestGenerateBridgeUtil: X
|
|
62
62
|
})
|
|
63
|
-
}), q = b((s) => p(
|
|
63
|
+
}), q = b((s) => p(m.Http).post("/app-center/api/apps/extension/update", s), {
|
|
64
64
|
metaData: {
|
|
65
65
|
id: "engine.plugins.bridge.http.requestUpdateReSource"
|
|
66
66
|
},
|
|
67
67
|
ctx: () => ({
|
|
68
68
|
getMetaApi: p,
|
|
69
|
-
META_SERVICE:
|
|
69
|
+
META_SERVICE: m,
|
|
70
70
|
generateBridge: $e,
|
|
71
71
|
generateUtil: Ye,
|
|
72
72
|
fetchResourceList: B,
|
|
@@ -76,13 +76,13 @@ const Ut = {
|
|
|
76
76
|
requestDeleteReSource: W,
|
|
77
77
|
requestGenerateBridgeUtil: X
|
|
78
78
|
})
|
|
79
|
-
}), W = b((s) => p(
|
|
79
|
+
}), W = b((s) => p(m.Http).get(`/app-center/api/apps/extension/delete?${s}`), {
|
|
80
80
|
metaData: {
|
|
81
81
|
id: "engine.plugins.bridge.http.requestDeleteReSource"
|
|
82
82
|
},
|
|
83
83
|
ctx: () => ({
|
|
84
84
|
getMetaApi: p,
|
|
85
|
-
META_SERVICE:
|
|
85
|
+
META_SERVICE: m,
|
|
86
86
|
generateBridge: $e,
|
|
87
87
|
generateUtil: Ye,
|
|
88
88
|
fetchResourceList: B,
|
|
@@ -93,7 +93,7 @@ const Ut = {
|
|
|
93
93
|
requestGenerateBridgeUtil: X
|
|
94
94
|
})
|
|
95
95
|
}), X = b((s) => {
|
|
96
|
-
p(
|
|
96
|
+
p(m.Http).get(`/app-center/api/apps/schema/${s}`).then((e) => {
|
|
97
97
|
$e(e.bridge), Ye(e.utils);
|
|
98
98
|
});
|
|
99
99
|
}, {
|
|
@@ -102,7 +102,7 @@ const Ut = {
|
|
|
102
102
|
},
|
|
103
103
|
ctx: () => ({
|
|
104
104
|
getMetaApi: p,
|
|
105
|
-
META_SERVICE:
|
|
105
|
+
META_SERVICE: m,
|
|
106
106
|
generateBridge: $e,
|
|
107
107
|
generateUtil: Ye,
|
|
108
108
|
fetchResourceList: B,
|
|
@@ -187,7 +187,7 @@ const Ut = {
|
|
|
187
187
|
}, C = {
|
|
188
188
|
Read: "read",
|
|
189
189
|
Edit: "edit"
|
|
190
|
-
}, ee = b(() => p(
|
|
190
|
+
}, ee = b(() => p(m.GlobalService).getBaseInfo().id, {
|
|
191
191
|
metaData: {
|
|
192
192
|
id: "engine.plugins.bridge.js-resource.getAppId"
|
|
193
193
|
},
|
|
@@ -195,7 +195,7 @@ const Ut = {
|
|
|
195
195
|
useResource: V,
|
|
196
196
|
useNotify: A,
|
|
197
197
|
getMetaApi: p,
|
|
198
|
-
META_SERVICE:
|
|
198
|
+
META_SERVICE: m,
|
|
199
199
|
isVsCodeEnv: ce,
|
|
200
200
|
fetchResourceList: B,
|
|
201
201
|
requestDeleteReSource: W,
|
|
@@ -241,7 +241,7 @@ const Ut = {
|
|
|
241
241
|
useResource: V,
|
|
242
242
|
useNotify: A,
|
|
243
243
|
getMetaApi: p,
|
|
244
|
-
META_SERVICE:
|
|
244
|
+
META_SERVICE: m,
|
|
245
245
|
isVsCodeEnv: ce,
|
|
246
246
|
fetchResourceList: B,
|
|
247
247
|
requestDeleteReSource: W,
|
|
@@ -282,7 +282,7 @@ const Ut = {
|
|
|
282
282
|
useResource: V,
|
|
283
283
|
useNotify: A,
|
|
284
284
|
getMetaApi: p,
|
|
285
|
-
META_SERVICE:
|
|
285
|
+
META_SERVICE: m,
|
|
286
286
|
isVsCodeEnv: ce,
|
|
287
287
|
fetchResourceList: B,
|
|
288
288
|
requestDeleteReSource: W,
|
|
@@ -325,7 +325,7 @@ const Ut = {
|
|
|
325
325
|
useResource: V,
|
|
326
326
|
useNotify: A,
|
|
327
327
|
getMetaApi: p,
|
|
328
|
-
META_SERVICE:
|
|
328
|
+
META_SERVICE: m,
|
|
329
329
|
isVsCodeEnv: ce,
|
|
330
330
|
fetchResourceList: B,
|
|
331
331
|
requestDeleteReSource: W,
|
|
@@ -369,7 +369,7 @@ const Ut = {
|
|
|
369
369
|
useResource: V,
|
|
370
370
|
useNotify: A,
|
|
371
371
|
getMetaApi: p,
|
|
372
|
-
META_SERVICE:
|
|
372
|
+
META_SERVICE: m,
|
|
373
373
|
isVsCodeEnv: ce,
|
|
374
374
|
fetchResourceList: B,
|
|
375
375
|
requestDeleteReSource: W,
|
|
@@ -410,7 +410,7 @@ const Ut = {
|
|
|
410
410
|
useResource: V,
|
|
411
411
|
useNotify: A,
|
|
412
412
|
getMetaApi: p,
|
|
413
|
-
META_SERVICE:
|
|
413
|
+
META_SERVICE: m,
|
|
414
414
|
isVsCodeEnv: ce,
|
|
415
415
|
fetchResourceList: B,
|
|
416
416
|
requestDeleteReSource: W,
|
|
@@ -453,7 +453,7 @@ const Ut = {
|
|
|
453
453
|
useResource: V,
|
|
454
454
|
useNotify: A,
|
|
455
455
|
getMetaApi: p,
|
|
456
|
-
META_SERVICE:
|
|
456
|
+
META_SERVICE: m,
|
|
457
457
|
isVsCodeEnv: ce,
|
|
458
458
|
fetchResourceList: B,
|
|
459
459
|
requestDeleteReSource: W,
|
|
@@ -494,7 +494,7 @@ const Ut = {
|
|
|
494
494
|
useResource: V,
|
|
495
495
|
useNotify: A,
|
|
496
496
|
getMetaApi: p,
|
|
497
|
-
META_SERVICE:
|
|
497
|
+
META_SERVICE: m,
|
|
498
498
|
isVsCodeEnv: ce,
|
|
499
499
|
fetchResourceList: B,
|
|
500
500
|
requestDeleteReSource: W,
|
|
@@ -537,7 +537,7 @@ const Ut = {
|
|
|
537
537
|
useResource: V,
|
|
538
538
|
useNotify: A,
|
|
539
539
|
getMetaApi: p,
|
|
540
|
-
META_SERVICE:
|
|
540
|
+
META_SERVICE: m,
|
|
541
541
|
isVsCodeEnv: ce,
|
|
542
542
|
fetchResourceList: B,
|
|
543
543
|
requestDeleteReSource: W,
|
|
@@ -578,7 +578,7 @@ const Ut = {
|
|
|
578
578
|
useResource: V,
|
|
579
579
|
useNotify: A,
|
|
580
580
|
getMetaApi: p,
|
|
581
|
-
META_SERVICE:
|
|
581
|
+
META_SERVICE: m,
|
|
582
582
|
isVsCodeEnv: ce,
|
|
583
583
|
fetchResourceList: B,
|
|
584
584
|
requestDeleteReSource: W,
|
|
@@ -621,7 +621,7 @@ const Ut = {
|
|
|
621
621
|
useResource: V,
|
|
622
622
|
useNotify: A,
|
|
623
623
|
getMetaApi: p,
|
|
624
|
-
META_SERVICE:
|
|
624
|
+
META_SERVICE: m,
|
|
625
625
|
isVsCodeEnv: ce,
|
|
626
626
|
fetchResourceList: B,
|
|
627
627
|
requestDeleteReSource: W,
|
|
@@ -664,7 +664,7 @@ const Ut = {
|
|
|
664
664
|
useResource: V,
|
|
665
665
|
useNotify: A,
|
|
666
666
|
getMetaApi: p,
|
|
667
|
-
META_SERVICE:
|
|
667
|
+
META_SERVICE: m,
|
|
668
668
|
isVsCodeEnv: ce,
|
|
669
669
|
fetchResourceList: B,
|
|
670
670
|
requestDeleteReSource: W,
|
|
@@ -707,7 +707,7 @@ const Ut = {
|
|
|
707
707
|
useResource: V,
|
|
708
708
|
useNotify: A,
|
|
709
709
|
getMetaApi: p,
|
|
710
|
-
META_SERVICE:
|
|
710
|
+
META_SERVICE: m,
|
|
711
711
|
isVsCodeEnv: ce,
|
|
712
712
|
fetchResourceList: B,
|
|
713
713
|
requestDeleteReSource: W,
|
|
@@ -748,7 +748,7 @@ const Ut = {
|
|
|
748
748
|
useResource: V,
|
|
749
749
|
useNotify: A,
|
|
750
750
|
getMetaApi: p,
|
|
751
|
-
META_SERVICE:
|
|
751
|
+
META_SERVICE: m,
|
|
752
752
|
isVsCodeEnv: ce,
|
|
753
753
|
fetchResourceList: B,
|
|
754
754
|
requestDeleteReSource: W,
|
|
@@ -791,7 +791,7 @@ const Ut = {
|
|
|
791
791
|
useResource: V,
|
|
792
792
|
useNotify: A,
|
|
793
793
|
getMetaApi: p,
|
|
794
|
-
META_SERVICE:
|
|
794
|
+
META_SERVICE: m,
|
|
795
795
|
isVsCodeEnv: ce,
|
|
796
796
|
fetchResourceList: B,
|
|
797
797
|
requestDeleteReSource: W,
|
|
@@ -845,7 +845,7 @@ const Ut = {
|
|
|
845
845
|
const a = await G(s);
|
|
846
846
|
a && V().appSchemaState[s.category].push(a);
|
|
847
847
|
}
|
|
848
|
-
p(
|
|
848
|
+
p(m.UseUtils).refreshUtils(), oe(ee()), A({
|
|
849
849
|
type: "success",
|
|
850
850
|
message: `${n ? "修改" : "创建"}成功`
|
|
851
851
|
}), t("refresh", k.type), k.refresh = !0, e();
|
|
@@ -863,7 +863,7 @@ const Ut = {
|
|
|
863
863
|
useResource: V,
|
|
864
864
|
useNotify: A,
|
|
865
865
|
getMetaApi: p,
|
|
866
|
-
META_SERVICE:
|
|
866
|
+
META_SERVICE: m,
|
|
867
867
|
isVsCodeEnv: ce,
|
|
868
868
|
fetchResourceList: B,
|
|
869
869
|
requestDeleteReSource: W,
|
|
@@ -909,7 +909,7 @@ const Ut = {
|
|
|
909
909
|
});
|
|
910
910
|
return;
|
|
911
911
|
}
|
|
912
|
-
p(
|
|
912
|
+
p(m.UseUtils).refreshUtils(), V().appSchemaState[k.type].splice(i, 1), oe(ee()), A({
|
|
913
913
|
type: "success",
|
|
914
914
|
message: "删除成功"
|
|
915
915
|
}), t("refresh", k.type), k.refresh = !0, e();
|
|
@@ -923,7 +923,7 @@ const Ut = {
|
|
|
923
923
|
useResource: V,
|
|
924
924
|
useNotify: A,
|
|
925
925
|
getMetaApi: p,
|
|
926
|
-
META_SERVICE:
|
|
926
|
+
META_SERVICE: m,
|
|
927
927
|
isVsCodeEnv: ce,
|
|
928
928
|
fetchResourceList: B,
|
|
929
929
|
requestDeleteReSource: W,
|
|
@@ -1008,7 +1008,7 @@ const Ut = {
|
|
|
1008
1008
|
setResourceNamesByType: H,
|
|
1009
1009
|
getResource: O,
|
|
1010
1010
|
getMetaApi: p,
|
|
1011
|
-
META_SERVICE:
|
|
1011
|
+
META_SERVICE: m
|
|
1012
1012
|
})
|
|
1013
1013
|
}), r = b(async (x) => {
|
|
1014
1014
|
n.resourceList = await Q(x), H(x, Array.isArray(n.resourceList) ? n.resourceList.map((te) => te.name) : []), t.value = a(n.resourceList);
|
|
@@ -1043,7 +1043,7 @@ const Ut = {
|
|
|
1043
1043
|
setResourceNamesByType: H,
|
|
1044
1044
|
getResource: O,
|
|
1045
1045
|
getMetaApi: p,
|
|
1046
|
-
META_SERVICE:
|
|
1046
|
+
META_SERVICE: m
|
|
1047
1047
|
})
|
|
1048
1048
|
});
|
|
1049
1049
|
ht(() => s.name, () => {
|
|
@@ -1054,7 +1054,7 @@ const Ut = {
|
|
|
1054
1054
|
const {
|
|
1055
1055
|
getUpdateCount: i,
|
|
1056
1056
|
getLastOperation: o
|
|
1057
|
-
} = p(
|
|
1057
|
+
} = p(m.UseUtils) || {
|
|
1058
1058
|
getUpdateCount: Ce(0)
|
|
1059
1059
|
};
|
|
1060
1060
|
ht(i, async () => {
|
|
@@ -1102,7 +1102,7 @@ const Ut = {
|
|
|
1102
1102
|
setResourceNamesByType: H,
|
|
1103
1103
|
getResource: O,
|
|
1104
1104
|
getMetaApi: p,
|
|
1105
|
-
META_SERVICE:
|
|
1105
|
+
META_SERVICE: m
|
|
1106
1106
|
})
|
|
1107
1107
|
}), c = b((x, te) => {
|
|
1108
1108
|
n.activeIndex = te, D(x), M(C.Edit), e("open");
|
|
@@ -1137,7 +1137,7 @@ const Ut = {
|
|
|
1137
1137
|
setResourceNamesByType: H,
|
|
1138
1138
|
getResource: O,
|
|
1139
1139
|
getMetaApi: p,
|
|
1140
|
-
META_SERVICE:
|
|
1140
|
+
META_SERVICE: m
|
|
1141
1141
|
})
|
|
1142
1142
|
}), f = b((x, te) => {
|
|
1143
1143
|
n.activeIndex = te, D(x), M(C.Edit), Y(s.name), T(x.type), e("open");
|
|
@@ -1172,7 +1172,7 @@ const Ut = {
|
|
|
1172
1172
|
setResourceNamesByType: H,
|
|
1173
1173
|
getResource: O,
|
|
1174
1174
|
getMetaApi: p,
|
|
1175
|
-
META_SERVICE:
|
|
1175
|
+
META_SERVICE: m
|
|
1176
1176
|
})
|
|
1177
1177
|
}), y = b((x) => {
|
|
1178
1178
|
t.value = a(n.resourceList, x);
|
|
@@ -1207,7 +1207,7 @@ const Ut = {
|
|
|
1207
1207
|
setResourceNamesByType: H,
|
|
1208
1208
|
getResource: O,
|
|
1209
1209
|
getMetaApi: p,
|
|
1210
|
-
META_SERVICE:
|
|
1210
|
+
META_SERVICE: m
|
|
1211
1211
|
})
|
|
1212
1212
|
});
|
|
1213
1213
|
return {
|
|
@@ -1297,7 +1297,7 @@ const qe = /* @__PURE__ */ Nt(Rn, [["render", Un], ["__scopeId", "data-v-feace01
|
|
|
1297
1297
|
useModal: Ue,
|
|
1298
1298
|
useNotify: A,
|
|
1299
1299
|
getMetaApi: p,
|
|
1300
|
-
META_SERVICE:
|
|
1300
|
+
META_SERVICE: m,
|
|
1301
1301
|
getMergeMeta: we,
|
|
1302
1302
|
isOpen: Ee,
|
|
1303
1303
|
openPanel: ge,
|
|
@@ -1329,7 +1329,7 @@ const qe = /* @__PURE__ */ Nt(Rn, [["render", Un], ["__scopeId", "data-v-feace01
|
|
|
1329
1329
|
useModal: Ue,
|
|
1330
1330
|
useNotify: A,
|
|
1331
1331
|
getMetaApi: p,
|
|
1332
|
-
META_SERVICE:
|
|
1332
|
+
META_SERVICE: m,
|
|
1333
1333
|
getMergeMeta: we,
|
|
1334
1334
|
isOpen: Ee,
|
|
1335
1335
|
openPanel: ge,
|
|
@@ -1437,7 +1437,7 @@ export { ${Z} }`;
|
|
|
1437
1437
|
useModal: Ue,
|
|
1438
1438
|
useNotify: A,
|
|
1439
1439
|
getMetaApi: p,
|
|
1440
|
-
META_SERVICE:
|
|
1440
|
+
META_SERVICE: m,
|
|
1441
1441
|
getMergeMeta: we,
|
|
1442
1442
|
isOpen: Ee,
|
|
1443
1443
|
openPanel: ge,
|
|
@@ -1485,7 +1485,7 @@ export { ${Z} }`;
|
|
|
1485
1485
|
useModal: Ue,
|
|
1486
1486
|
useNotify: A,
|
|
1487
1487
|
getMetaApi: p,
|
|
1488
|
-
META_SERVICE:
|
|
1488
|
+
META_SERVICE: m,
|
|
1489
1489
|
getMergeMeta: we,
|
|
1490
1490
|
isOpen: Ee,
|
|
1491
1491
|
openPanel: ge,
|
|
@@ -1497,7 +1497,7 @@ export { ${Z} }`;
|
|
|
1497
1497
|
category: S(),
|
|
1498
1498
|
type: P(),
|
|
1499
1499
|
name: o.name,
|
|
1500
|
-
app: p(
|
|
1500
|
+
app: p(m.GlobalService).getBaseInfo().id,
|
|
1501
1501
|
content: o.category ? o.content : {
|
|
1502
1502
|
type: "JSFunction",
|
|
1503
1503
|
value: c.value.getEditor().getValue()
|
|
@@ -1554,7 +1554,7 @@ export { ${Z} }`;
|
|
|
1554
1554
|
useModal: Ue,
|
|
1555
1555
|
useNotify: A,
|
|
1556
1556
|
getMetaApi: p,
|
|
1557
|
-
META_SERVICE:
|
|
1557
|
+
META_SERVICE: m,
|
|
1558
1558
|
getMergeMeta: we,
|
|
1559
1559
|
isOpen: Ee,
|
|
1560
1560
|
openPanel: ge,
|
|
@@ -1607,7 +1607,7 @@ export { ${Z} }`;
|
|
|
1607
1607
|
useModal: Ue,
|
|
1608
1608
|
useNotify: A,
|
|
1609
1609
|
getMetaApi: p,
|
|
1610
|
-
META_SERVICE:
|
|
1610
|
+
META_SERVICE: m,
|
|
1611
1611
|
getMergeMeta: we,
|
|
1612
1612
|
isOpen: Ee,
|
|
1613
1613
|
openPanel: ge,
|
|
@@ -1681,14 +1681,14 @@ export { ${Z} }`;
|
|
|
1681
1681
|
useModal: Ue,
|
|
1682
1682
|
useNotify: A,
|
|
1683
1683
|
getMetaApi: p,
|
|
1684
|
-
META_SERVICE:
|
|
1684
|
+
META_SERVICE: m,
|
|
1685
1685
|
getMergeMeta: we,
|
|
1686
1686
|
isOpen: Ee,
|
|
1687
1687
|
openPanel: ge,
|
|
1688
1688
|
closePanel: ue
|
|
1689
1689
|
})
|
|
1690
1690
|
});
|
|
1691
|
-
return ht(p(
|
|
1691
|
+
return ht(p(m.UseUtils).getLastOperation, (Z) => {
|
|
1692
1692
|
var re;
|
|
1693
1693
|
Z.type === "delete" && Z.id === ((re = O()) == null ? void 0 : re.id) && ue();
|
|
1694
1694
|
}), {
|
|
@@ -2019,7 +2019,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2019
2019
|
SvgButton: ne,
|
|
2020
2020
|
useLayout: he,
|
|
2021
2021
|
getMetaApi: p,
|
|
2022
|
-
META_SERVICE:
|
|
2022
|
+
META_SERVICE: m,
|
|
2023
2023
|
RESOURCE_TYPE: E,
|
|
2024
2024
|
BridgeManage: qe,
|
|
2025
2025
|
BridgeSetting: We,
|
|
@@ -2050,7 +2050,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2050
2050
|
SvgButton: ne,
|
|
2051
2051
|
useLayout: he,
|
|
2052
2052
|
getMetaApi: p,
|
|
2053
|
-
META_SERVICE:
|
|
2053
|
+
META_SERVICE: m,
|
|
2054
2054
|
RESOURCE_TYPE: E,
|
|
2055
2055
|
BridgeManage: qe,
|
|
2056
2056
|
BridgeSetting: We,
|
|
@@ -2081,7 +2081,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2081
2081
|
SvgButton: ne,
|
|
2082
2082
|
useLayout: he,
|
|
2083
2083
|
getMetaApi: p,
|
|
2084
|
-
META_SERVICE:
|
|
2084
|
+
META_SERVICE: m,
|
|
2085
2085
|
RESOURCE_TYPE: E,
|
|
2086
2086
|
BridgeManage: qe,
|
|
2087
2087
|
BridgeSetting: We,
|
|
@@ -2092,7 +2092,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2092
2092
|
});
|
|
2093
2093
|
return pn(b(b(() => {
|
|
2094
2094
|
var y;
|
|
2095
|
-
(y = n.value) == null || y.refresh(t.value), p(
|
|
2095
|
+
(y = n.value) == null || y.refresh(t.value), p(m.UseUtils).refreshUtils();
|
|
2096
2096
|
}, {
|
|
2097
2097
|
metaData: {
|
|
2098
2098
|
id: "engine.plugins.bridge.Main.onActivated[0]"
|
|
@@ -2113,7 +2113,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2113
2113
|
SvgButton: ne,
|
|
2114
2114
|
useLayout: he,
|
|
2115
2115
|
getMetaApi: p,
|
|
2116
|
-
META_SERVICE:
|
|
2116
|
+
META_SERVICE: m,
|
|
2117
2117
|
RESOURCE_TYPE: E,
|
|
2118
2118
|
BridgeManage: qe,
|
|
2119
2119
|
BridgeSetting: We,
|
|
@@ -2144,7 +2144,7 @@ const We = /* @__PURE__ */ Nt(Nn, [["render", jn], ["__scopeId", "data-v-51f0f8e
|
|
|
2144
2144
|
SvgButton: ne,
|
|
2145
2145
|
useLayout: he,
|
|
2146
2146
|
getMetaApi: p,
|
|
2147
|
-
META_SERVICE:
|
|
2147
|
+
META_SERVICE: m,
|
|
2148
2148
|
RESOURCE_TYPE: E,
|
|
2149
2149
|
BridgeManage: qe,
|
|
2150
2150
|
BridgeSetting: We,
|
|
@@ -2242,7 +2242,7 @@ var jt;
|
|
|
2242
2242
|
// second overwrites first
|
|
2243
2243
|
});
|
|
2244
2244
|
})(jt || (jt = {}));
|
|
2245
|
-
const
|
|
2245
|
+
const h = U.arrayToEnum([
|
|
2246
2246
|
"string",
|
|
2247
2247
|
"nan",
|
|
2248
2248
|
"number",
|
|
@@ -2266,23 +2266,23 @@ const m = U.arrayToEnum([
|
|
|
2266
2266
|
]), De = (s) => {
|
|
2267
2267
|
switch (typeof s) {
|
|
2268
2268
|
case "undefined":
|
|
2269
|
-
return
|
|
2269
|
+
return h.undefined;
|
|
2270
2270
|
case "string":
|
|
2271
|
-
return
|
|
2271
|
+
return h.string;
|
|
2272
2272
|
case "number":
|
|
2273
|
-
return Number.isNaN(s) ?
|
|
2273
|
+
return Number.isNaN(s) ? h.nan : h.number;
|
|
2274
2274
|
case "boolean":
|
|
2275
|
-
return
|
|
2275
|
+
return h.boolean;
|
|
2276
2276
|
case "function":
|
|
2277
|
-
return
|
|
2277
|
+
return h.function;
|
|
2278
2278
|
case "bigint":
|
|
2279
|
-
return
|
|
2279
|
+
return h.bigint;
|
|
2280
2280
|
case "symbol":
|
|
2281
|
-
return
|
|
2281
|
+
return h.symbol;
|
|
2282
2282
|
case "object":
|
|
2283
|
-
return Array.isArray(s) ?
|
|
2283
|
+
return Array.isArray(s) ? h.array : s === null ? h.null : s.then && typeof s.then == "function" && s.catch && typeof s.catch == "function" ? h.promise : typeof Map < "u" && s instanceof Map ? h.map : typeof Set < "u" && s instanceof Set ? h.set : typeof Date < "u" && s instanceof Date ? h.date : h.object;
|
|
2284
2284
|
default:
|
|
2285
|
-
return
|
|
2285
|
+
return h.unknown;
|
|
2286
2286
|
}
|
|
2287
2287
|
}, d = U.arrayToEnum([
|
|
2288
2288
|
"invalid_type",
|
|
@@ -2370,7 +2370,7 @@ const kt = (s, e) => {
|
|
|
2370
2370
|
let t;
|
|
2371
2371
|
switch (s.code) {
|
|
2372
2372
|
case d.invalid_type:
|
|
2373
|
-
s.received ===
|
|
2373
|
+
s.received === h.undefined ? t = "Required" : t = `Expected ${s.expected}, received ${s.received}`;
|
|
2374
2374
|
break;
|
|
2375
2375
|
case d.invalid_literal:
|
|
2376
2376
|
t = `Invalid literal value, expected ${JSON.stringify(s.expected, U.jsonStringifyReplacer)}`;
|
|
@@ -2804,11 +2804,11 @@ function ds(s, e) {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
class Pe extends w {
|
|
2806
2806
|
_parse(e) {
|
|
2807
|
-
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !==
|
|
2807
|
+
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
|
|
2808
2808
|
const r = this._getOrReturnCtx(e);
|
|
2809
2809
|
return u(r, {
|
|
2810
2810
|
code: d.invalid_type,
|
|
2811
|
-
expected:
|
|
2811
|
+
expected: h.string,
|
|
2812
2812
|
received: r.parsedType
|
|
2813
2813
|
}), _;
|
|
2814
2814
|
}
|
|
@@ -3194,11 +3194,11 @@ class Xe extends w {
|
|
|
3194
3194
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
3195
3195
|
}
|
|
3196
3196
|
_parse(e) {
|
|
3197
|
-
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !==
|
|
3197
|
+
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== h.number) {
|
|
3198
3198
|
const r = this._getOrReturnCtx(e);
|
|
3199
3199
|
return u(r, {
|
|
3200
3200
|
code: d.invalid_type,
|
|
3201
|
-
expected:
|
|
3201
|
+
expected: h.number,
|
|
3202
3202
|
received: r.parsedType
|
|
3203
3203
|
}), _;
|
|
3204
3204
|
}
|
|
@@ -3372,7 +3372,7 @@ class it extends w {
|
|
|
3372
3372
|
} catch {
|
|
3373
3373
|
return this._getInvalidInput(e);
|
|
3374
3374
|
}
|
|
3375
|
-
if (this._getType(e) !==
|
|
3375
|
+
if (this._getType(e) !== h.bigint)
|
|
3376
3376
|
return this._getInvalidInput(e);
|
|
3377
3377
|
let n;
|
|
3378
3378
|
const a = new ye();
|
|
@@ -3400,7 +3400,7 @@ class it extends w {
|
|
|
3400
3400
|
const t = this._getOrReturnCtx(e);
|
|
3401
3401
|
return u(t, {
|
|
3402
3402
|
code: d.invalid_type,
|
|
3403
|
-
expected:
|
|
3403
|
+
expected: h.bigint,
|
|
3404
3404
|
received: t.parsedType
|
|
3405
3405
|
}), _;
|
|
3406
3406
|
}
|
|
@@ -3496,11 +3496,11 @@ it.create = (s) => new it({
|
|
|
3496
3496
|
});
|
|
3497
3497
|
class Rt extends w {
|
|
3498
3498
|
_parse(e) {
|
|
3499
|
-
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !==
|
|
3499
|
+
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== h.boolean) {
|
|
3500
3500
|
const n = this._getOrReturnCtx(e);
|
|
3501
3501
|
return u(n, {
|
|
3502
3502
|
code: d.invalid_type,
|
|
3503
|
-
expected:
|
|
3503
|
+
expected: h.boolean,
|
|
3504
3504
|
received: n.parsedType
|
|
3505
3505
|
}), _;
|
|
3506
3506
|
}
|
|
@@ -3514,11 +3514,11 @@ Rt.create = (s) => new Rt({
|
|
|
3514
3514
|
});
|
|
3515
3515
|
class gt extends w {
|
|
3516
3516
|
_parse(e) {
|
|
3517
|
-
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !==
|
|
3517
|
+
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) {
|
|
3518
3518
|
const r = this._getOrReturnCtx(e);
|
|
3519
3519
|
return u(r, {
|
|
3520
3520
|
code: d.invalid_type,
|
|
3521
|
-
expected:
|
|
3521
|
+
expected: h.date,
|
|
3522
3522
|
received: r.parsedType
|
|
3523
3523
|
}), _;
|
|
3524
3524
|
}
|
|
@@ -3592,11 +3592,11 @@ gt.create = (s) => new gt({
|
|
|
3592
3592
|
});
|
|
3593
3593
|
class Bt extends w {
|
|
3594
3594
|
_parse(e) {
|
|
3595
|
-
if (this._getType(e) !==
|
|
3595
|
+
if (this._getType(e) !== h.symbol) {
|
|
3596
3596
|
const n = this._getOrReturnCtx(e);
|
|
3597
3597
|
return u(n, {
|
|
3598
3598
|
code: d.invalid_type,
|
|
3599
|
-
expected:
|
|
3599
|
+
expected: h.symbol,
|
|
3600
3600
|
received: n.parsedType
|
|
3601
3601
|
}), _;
|
|
3602
3602
|
}
|
|
@@ -3609,11 +3609,11 @@ Bt.create = (s) => new Bt({
|
|
|
3609
3609
|
});
|
|
3610
3610
|
class Lt extends w {
|
|
3611
3611
|
_parse(e) {
|
|
3612
|
-
if (this._getType(e) !==
|
|
3612
|
+
if (this._getType(e) !== h.undefined) {
|
|
3613
3613
|
const n = this._getOrReturnCtx(e);
|
|
3614
3614
|
return u(n, {
|
|
3615
3615
|
code: d.invalid_type,
|
|
3616
|
-
expected:
|
|
3616
|
+
expected: h.undefined,
|
|
3617
3617
|
received: n.parsedType
|
|
3618
3618
|
}), _;
|
|
3619
3619
|
}
|
|
@@ -3626,11 +3626,11 @@ Lt.create = (s) => new Lt({
|
|
|
3626
3626
|
});
|
|
3627
3627
|
class Yt extends w {
|
|
3628
3628
|
_parse(e) {
|
|
3629
|
-
if (this._getType(e) !==
|
|
3629
|
+
if (this._getType(e) !== h.null) {
|
|
3630
3630
|
const n = this._getOrReturnCtx(e);
|
|
3631
3631
|
return u(n, {
|
|
3632
3632
|
code: d.invalid_type,
|
|
3633
|
-
expected:
|
|
3633
|
+
expected: h.null,
|
|
3634
3634
|
received: n.parsedType
|
|
3635
3635
|
}), _;
|
|
3636
3636
|
}
|
|
@@ -3670,7 +3670,7 @@ class Ze extends w {
|
|
|
3670
3670
|
const t = this._getOrReturnCtx(e);
|
|
3671
3671
|
return u(t, {
|
|
3672
3672
|
code: d.invalid_type,
|
|
3673
|
-
expected:
|
|
3673
|
+
expected: h.never,
|
|
3674
3674
|
received: t.parsedType
|
|
3675
3675
|
}), _;
|
|
3676
3676
|
}
|
|
@@ -3681,11 +3681,11 @@ Ze.create = (s) => new Ze({
|
|
|
3681
3681
|
});
|
|
3682
3682
|
class zt extends w {
|
|
3683
3683
|
_parse(e) {
|
|
3684
|
-
if (this._getType(e) !==
|
|
3684
|
+
if (this._getType(e) !== h.undefined) {
|
|
3685
3685
|
const n = this._getOrReturnCtx(e);
|
|
3686
3686
|
return u(n, {
|
|
3687
3687
|
code: d.invalid_type,
|
|
3688
|
-
expected:
|
|
3688
|
+
expected: h.void,
|
|
3689
3689
|
received: n.parsedType
|
|
3690
3690
|
}), _;
|
|
3691
3691
|
}
|
|
@@ -3699,10 +3699,10 @@ zt.create = (s) => new zt({
|
|
|
3699
3699
|
class Re extends w {
|
|
3700
3700
|
_parse(e) {
|
|
3701
3701
|
const { ctx: t, status: n } = this._processInputParams(e), a = this._def;
|
|
3702
|
-
if (t.parsedType !==
|
|
3702
|
+
if (t.parsedType !== h.array)
|
|
3703
3703
|
return u(t, {
|
|
3704
3704
|
code: d.invalid_type,
|
|
3705
|
-
expected:
|
|
3705
|
+
expected: h.array,
|
|
3706
3706
|
received: t.parsedType
|
|
3707
3707
|
}), _;
|
|
3708
3708
|
if (a.exactLength !== null) {
|
|
@@ -3796,11 +3796,11 @@ class ae extends w {
|
|
|
3796
3796
|
return this._cached = { shape: e, keys: t }, this._cached;
|
|
3797
3797
|
}
|
|
3798
3798
|
_parse(e) {
|
|
3799
|
-
if (this._getType(e) !==
|
|
3799
|
+
if (this._getType(e) !== h.object) {
|
|
3800
3800
|
const c = this._getOrReturnCtx(e);
|
|
3801
3801
|
return u(c, {
|
|
3802
3802
|
code: d.invalid_type,
|
|
3803
|
-
expected:
|
|
3803
|
+
expected: h.object,
|
|
3804
3804
|
received: c.parsedType
|
|
3805
3805
|
}), _;
|
|
3806
3806
|
}
|
|
@@ -4150,7 +4150,7 @@ function Ct(s, e) {
|
|
|
4150
4150
|
const t = De(s), n = De(e);
|
|
4151
4151
|
if (s === e)
|
|
4152
4152
|
return { valid: !0, data: s };
|
|
4153
|
-
if (t ===
|
|
4153
|
+
if (t === h.object && n === h.object) {
|
|
4154
4154
|
const a = U.objectKeys(e), r = U.objectKeys(s).filter((o) => a.indexOf(o) !== -1), i = { ...s, ...e };
|
|
4155
4155
|
for (const o of r) {
|
|
4156
4156
|
const l = Ct(s[o], e[o]);
|
|
@@ -4159,7 +4159,7 @@ function Ct(s, e) {
|
|
|
4159
4159
|
i[o] = l.data;
|
|
4160
4160
|
}
|
|
4161
4161
|
return { valid: !0, data: i };
|
|
4162
|
-
} else if (t ===
|
|
4162
|
+
} else if (t === h.array && n === h.array) {
|
|
4163
4163
|
if (s.length !== e.length)
|
|
4164
4164
|
return { valid: !1 };
|
|
4165
4165
|
const a = [];
|
|
@@ -4170,7 +4170,7 @@ function Ct(s, e) {
|
|
|
4170
4170
|
a.push(l.data);
|
|
4171
4171
|
}
|
|
4172
4172
|
return { valid: !0, data: a };
|
|
4173
|
-
} else return t ===
|
|
4173
|
+
} else return t === h.date && n === h.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
|
|
4174
4174
|
}
|
|
4175
4175
|
class _t extends w {
|
|
4176
4176
|
_parse(e) {
|
|
@@ -4213,10 +4213,10 @@ _t.create = (s, e, t) => new _t({
|
|
|
4213
4213
|
class Fe extends w {
|
|
4214
4214
|
_parse(e) {
|
|
4215
4215
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
4216
|
-
if (n.parsedType !==
|
|
4216
|
+
if (n.parsedType !== h.array)
|
|
4217
4217
|
return u(n, {
|
|
4218
4218
|
code: d.invalid_type,
|
|
4219
|
-
expected:
|
|
4219
|
+
expected: h.array,
|
|
4220
4220
|
received: n.parsedType
|
|
4221
4221
|
}), _;
|
|
4222
4222
|
if (n.data.length < this._def.items.length)
|
|
@@ -4269,10 +4269,10 @@ class Gt extends w {
|
|
|
4269
4269
|
}
|
|
4270
4270
|
_parse(e) {
|
|
4271
4271
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
4272
|
-
if (n.parsedType !==
|
|
4272
|
+
if (n.parsedType !== h.map)
|
|
4273
4273
|
return u(n, {
|
|
4274
4274
|
code: d.invalid_type,
|
|
4275
|
-
expected:
|
|
4275
|
+
expected: h.map,
|
|
4276
4276
|
received: n.parsedType
|
|
4277
4277
|
}), _;
|
|
4278
4278
|
const a = this._def.keyType, r = this._def.valueType, i = [...n.data.entries()].map(([o, l], c) => ({
|
|
@@ -4311,10 +4311,10 @@ Gt.create = (s, e, t) => new Gt({
|
|
|
4311
4311
|
class ot extends w {
|
|
4312
4312
|
_parse(e) {
|
|
4313
4313
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
4314
|
-
if (n.parsedType !==
|
|
4314
|
+
if (n.parsedType !== h.set)
|
|
4315
4315
|
return u(n, {
|
|
4316
4316
|
code: d.invalid_type,
|
|
4317
|
-
expected:
|
|
4317
|
+
expected: h.set,
|
|
4318
4318
|
received: n.parsedType
|
|
4319
4319
|
}), _;
|
|
4320
4320
|
const a = this._def;
|
|
@@ -4472,7 +4472,7 @@ Ke.create = tn;
|
|
|
4472
4472
|
class Wt extends w {
|
|
4473
4473
|
_parse(e) {
|
|
4474
4474
|
const t = U.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
4475
|
-
if (n.parsedType !==
|
|
4475
|
+
if (n.parsedType !== h.string && n.parsedType !== h.number) {
|
|
4476
4476
|
const a = U.objectValues(t);
|
|
4477
4477
|
return u(n, {
|
|
4478
4478
|
expected: U.joinValues(a),
|
|
@@ -4505,13 +4505,13 @@ class vt extends w {
|
|
|
4505
4505
|
}
|
|
4506
4506
|
_parse(e) {
|
|
4507
4507
|
const { ctx: t } = this._processInputParams(e);
|
|
4508
|
-
if (t.parsedType !==
|
|
4508
|
+
if (t.parsedType !== h.promise && t.common.async === !1)
|
|
4509
4509
|
return u(t, {
|
|
4510
4510
|
code: d.invalid_type,
|
|
4511
|
-
expected:
|
|
4511
|
+
expected: h.promise,
|
|
4512
4512
|
received: t.parsedType
|
|
4513
4513
|
}), _;
|
|
4514
|
-
const n = t.parsedType ===
|
|
4514
|
+
const n = t.parsedType === h.promise ? t.data : Promise.resolve(t.data);
|
|
4515
4515
|
return ve(n.then((a) => this._def.type.parseAsync(a, {
|
|
4516
4516
|
path: t.path,
|
|
4517
4517
|
errorMap: t.common.contextualErrorMap
|
|
@@ -4617,7 +4617,7 @@ et.createWithPreprocess = (s, e, t) => new et({
|
|
|
4617
4617
|
});
|
|
4618
4618
|
class je extends w {
|
|
4619
4619
|
_parse(e) {
|
|
4620
|
-
return this._getType(e) ===
|
|
4620
|
+
return this._getType(e) === h.undefined ? ve(void 0) : this._def.innerType._parse(e);
|
|
4621
4621
|
}
|
|
4622
4622
|
unwrap() {
|
|
4623
4623
|
return this._def.innerType;
|
|
@@ -4630,7 +4630,7 @@ je.create = (s, e) => new je({
|
|
|
4630
4630
|
});
|
|
4631
4631
|
class tt extends w {
|
|
4632
4632
|
_parse(e) {
|
|
4633
|
-
return this._getType(e) ===
|
|
4633
|
+
return this._getType(e) === h.null ? ve(null) : this._def.innerType._parse(e);
|
|
4634
4634
|
}
|
|
4635
4635
|
unwrap() {
|
|
4636
4636
|
return this._def.innerType;
|
|
@@ -4645,7 +4645,7 @@ class Tt extends w {
|
|
|
4645
4645
|
_parse(e) {
|
|
4646
4646
|
const { ctx: t } = this._processInputParams(e);
|
|
4647
4647
|
let n = t.data;
|
|
4648
|
-
return t.parsedType ===
|
|
4648
|
+
return t.parsedType === h.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
4649
4649
|
data: n,
|
|
4650
4650
|
path: t.path,
|
|
4651
4651
|
parent: t
|
|
@@ -4706,11 +4706,11 @@ Ot.create = (s, e) => new Ot({
|
|
|
4706
4706
|
});
|
|
4707
4707
|
class Jt extends w {
|
|
4708
4708
|
_parse(e) {
|
|
4709
|
-
if (this._getType(e) !==
|
|
4709
|
+
if (this._getType(e) !== h.nan) {
|
|
4710
4710
|
const n = this._getOrReturnCtx(e);
|
|
4711
4711
|
return u(n, {
|
|
4712
4712
|
code: d.invalid_type,
|
|
4713
|
-
expected:
|
|
4713
|
+
expected: h.nan,
|
|
4714
4714
|
received: n.parsedType
|
|
4715
4715
|
}), _;
|
|
4716
4716
|
}
|
|
@@ -4817,7 +4817,7 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
4817
4817
|
`),
|
|
4818
4818
|
inputSchema: hs.shape,
|
|
4819
4819
|
callback: async (s) => {
|
|
4820
|
-
const { id: e, name: t } = s, { getUtilById: n, getUtils: a, getUtilByName: r } = p(
|
|
4820
|
+
const { id: e, name: t } = s, { getUtilById: n, getUtils: a, getUtilByName: r } = p(m.UseUtils);
|
|
4821
4821
|
if (!e && !t)
|
|
4822
4822
|
return {
|
|
4823
4823
|
content: [
|
|
@@ -4940,7 +4940,7 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
4940
4940
|
}
|
|
4941
4941
|
};
|
|
4942
4942
|
if (s === Le.EDIT) {
|
|
4943
|
-
const { getUtilById: a } = p(
|
|
4943
|
+
const { getUtilById: a } = p(m.UseUtils);
|
|
4944
4944
|
if (!a(e))
|
|
4945
4945
|
return {
|
|
4946
4946
|
isValid: !1,
|
|
@@ -4981,8 +4981,8 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
4981
4981
|
name: a,
|
|
4982
4982
|
category: "utils",
|
|
4983
4983
|
type: n,
|
|
4984
|
-
app: p(
|
|
4985
|
-
}, { updateUtils: o, addUtils: l } = p(
|
|
4984
|
+
app: p(m.GlobalService).getBaseInfo().id
|
|
4985
|
+
}, { updateUtils: o, addUtils: l } = p(m.UseUtils) || {}, c = vs(e, t, n, r);
|
|
4986
4986
|
if (!c.isValid)
|
|
4987
4987
|
return {
|
|
4988
4988
|
content: [
|
|
@@ -5035,7 +5035,7 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
5035
5035
|
description: "删除工具类",
|
|
5036
5036
|
inputSchema: Es.shape,
|
|
5037
5037
|
callback: async (s) => {
|
|
5038
|
-
const { id: e } = s, { deleteUtils: t, getUtilById: n } = p(
|
|
5038
|
+
const { id: e } = s, { deleteUtils: t, getUtilById: n } = p(m.UseUtils);
|
|
5039
5039
|
if (!n(e))
|
|
5040
5040
|
return bs("cannot find the item by id. please check the id.");
|
|
5041
5041
|
try {
|
|
@@ -5080,8 +5080,10 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
5080
5080
|
}
|
|
5081
5081
|
V().appSchemaState[He.Util][e] = { content: t, name: n, type: a };
|
|
5082
5082
|
}, ct = async () => {
|
|
5083
|
+
if (!p(m.GlobalService).getBaseInfo().id)
|
|
5084
|
+
return;
|
|
5083
5085
|
const s = await B(
|
|
5084
|
-
p(
|
|
5086
|
+
p(m.GlobalService).getBaseInfo().id,
|
|
5085
5087
|
He.Util
|
|
5086
5088
|
);
|
|
5087
5089
|
ut.utils = s.map(({ category: e, content: t, id: n, name: a, type: r, app: i }) => ({
|
|
@@ -5101,7 +5103,7 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
5101
5103
|
if (e)
|
|
5102
5104
|
return bt.value = { id: e.id, type: "update" }, xt.value++, an(e), await ct(), e;
|
|
5103
5105
|
}, Os = async (s) => {
|
|
5104
|
-
const e = `app=${p(
|
|
5106
|
+
const e = `app=${p(m.GlobalService).getBaseInfo().id}&id=${s}`, t = await W(e);
|
|
5105
5107
|
if (!t)
|
|
5106
5108
|
return;
|
|
5107
5109
|
bt.value = { id: s, type: "delete" }, xt.value++;
|
|
@@ -5110,7 +5112,7 @@ const { createErrorResponse: Qt } = Xt, hs = lt({
|
|
|
5110
5112
|
}, ws = () => ut.utils, Us = (s) => {
|
|
5111
5113
|
ut.utils = s;
|
|
5112
5114
|
}, Ns = on({
|
|
5113
|
-
id:
|
|
5115
|
+
id: m.UseUtils,
|
|
5114
5116
|
type: "MetaService",
|
|
5115
5117
|
initialState: {
|
|
5116
5118
|
utils: []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-plugin-bridge",
|
|
3
|
-
"version": "2.9.0
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.9.0
|
|
29
|
-
"@opentiny/tiny-engine-meta-register": "2.9.0
|
|
30
|
-
"@opentiny/tiny-engine-utils": "2.9.0
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.9.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.9.0",
|
|
30
|
+
"@opentiny/tiny-engine-utils": "2.9.0",
|
|
31
31
|
"zod": "^3.25.76"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.9.0
|
|
34
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.9.0",
|
|
35
35
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
36
36
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
37
37
|
"vite": "^5.4.2"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@opentiny/vue-icon": "^3.20.0",
|
|
42
42
|
"vue": "^3.4.15"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "ddab413cb9d35609c4bbbe79966b0631bc02b817"
|
|
45
45
|
}
|