@blueking/bkflow-canvas-editor 1.1.0-beta.43 → 1.1.0-beta.44
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 +18 -1
- package/dist/advanced.cjs.js +1 -1
- package/dist/advanced.d.ts +48 -3
- package/dist/advanced.esm.js +1 -1
- package/dist/{context-iqnF_HqS.cjs → context-CGIQsuRc.cjs} +1 -1
- package/dist/{context-Bg6nsbrK.js → context-Ce_Xpx5d.js} +220 -184
- package/dist/index-B1K53ttM.cjs +1 -0
- package/dist/index-B5-BwbW-.js +607 -0
- package/dist/index-B7cHQkaD.cjs +2 -0
- package/dist/index-BhOE6_v7.cjs +1 -0
- package/dist/index-BiOM182-.js +135 -0
- package/dist/index-Bit4HgBF.cjs +82 -0
- package/dist/index-CLiOiJR2.js +125 -0
- package/dist/index-CbEGVZdT.cjs +1 -0
- package/dist/{index-Bqm08e7H.js → index-DEh6TdMZ.js} +20798 -20312
- package/dist/index-DVeWB2dR.js +73 -0
- package/dist/{index-BBNwbryo.cjs → index-DjIpWxVu.cjs} +1 -1
- package/dist/{index-Ckij2Mxn.cjs → index-Dmx7sjvz.cjs} +1 -1
- package/dist/{index-D7t1wcMU.js → index-DubPNExB.js} +1 -1
- package/dist/{index-DgQ-ScE5.js → index-sEixnRd3.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +57 -2
- package/dist/index.esm.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-B0DQFaEe.cjs +0 -82
- package/dist/index-BSJC2Tb-.js +0 -512
- package/dist/index-BycpBKMO.cjs +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent as b, resolveComponent as d, openBlock as k, createBlock as u, withCtx as t, createElementVNode as s, createVNode as l, unref as _, createTextVNode as n, toDisplayString as g } from "vue";
|
|
2
|
+
import { ExclamationCircleShape as w } from "bkui-vue/lib/icon";
|
|
3
|
+
import { _ as v } from "./index-DEh6TdMZ.js";
|
|
4
|
+
const C = { class: "rollback-dialog-body" }, x = { class: "rollback-icon-wrap" }, h = { class: "rollback-desc" }, y = { class: "rollback-version" }, B = { class: "rollback-footer" }, N = /* @__PURE__ */ b({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean },
|
|
8
|
+
version: { default: "" },
|
|
9
|
+
pending: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:show", "confirm"],
|
|
12
|
+
setup(c, { emit: p }) {
|
|
13
|
+
const e = c, i = p, f = () => {
|
|
14
|
+
e.pending || !e.version || i("confirm", e.version);
|
|
15
|
+
}, r = () => {
|
|
16
|
+
e.pending || i("update:show", !1);
|
|
17
|
+
};
|
|
18
|
+
return (V, o) => {
|
|
19
|
+
const a = d("bk-button"), m = d("bk-dialog");
|
|
20
|
+
return k(), u(m, {
|
|
21
|
+
"is-show": e.show,
|
|
22
|
+
"dialog-type": "show",
|
|
23
|
+
width: 440,
|
|
24
|
+
"esc-close": !1,
|
|
25
|
+
"quick-close": !1,
|
|
26
|
+
class: "flow-rollback-confirm-dialog",
|
|
27
|
+
onClosed: r
|
|
28
|
+
}, {
|
|
29
|
+
default: t(() => [
|
|
30
|
+
s("div", C, [
|
|
31
|
+
s("div", x, [
|
|
32
|
+
l(_(w), { class: "rollback-icon" })
|
|
33
|
+
]),
|
|
34
|
+
o[6] || (o[6] = s("h3", { class: "rollback-title" }, "确认加载至草稿?", -1)),
|
|
35
|
+
s("p", h, [
|
|
36
|
+
o[0] || (o[0] = n(" 将版本 ", -1)),
|
|
37
|
+
s("span", y, g(e.version || "--"), 1),
|
|
38
|
+
o[1] || (o[1] = n(" 的内容加载至草稿,", -1)),
|
|
39
|
+
o[2] || (o[2] = s("strong", null, "当前草稿中未发布的改动将被覆盖", -1)),
|
|
40
|
+
o[3] || (o[3] = n(",该操作不可撤销。 ", -1))
|
|
41
|
+
]),
|
|
42
|
+
s("div", B, [
|
|
43
|
+
l(a, {
|
|
44
|
+
theme: "primary",
|
|
45
|
+
"data-test": "rollback-confirm",
|
|
46
|
+
loading: e.pending,
|
|
47
|
+
onClick: f
|
|
48
|
+
}, {
|
|
49
|
+
default: t(() => [...o[4] || (o[4] = [
|
|
50
|
+
n(" 确认恢复 ", -1)
|
|
51
|
+
])]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 8, ["loading"]),
|
|
54
|
+
l(a, {
|
|
55
|
+
disabled: e.pending,
|
|
56
|
+
onClick: r
|
|
57
|
+
}, {
|
|
58
|
+
default: t(() => [...o[5] || (o[5] = [
|
|
59
|
+
n("取消", -1)
|
|
60
|
+
])]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["disabled"])
|
|
63
|
+
])
|
|
64
|
+
])
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}, 8, ["is-show"]);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}), D = /* @__PURE__ */ v(N, [["__scopeId", "data-v-98919657"]]);
|
|
71
|
+
export {
|
|
72
|
+
D as default
|
|
73
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-Bit4HgBF.cjs"),O={key:0,class:"mock-data-sideslider__title-sep"},F=["title"],S={class:"mock-data-sideslider"},D={class:"mock-data-sideslider__footer"},j="当前节点的输出不支持mock,是否需要在调试时跳过当前节点?",q="跳过调试",Y=e.defineComponent({__name:"index",props:{show:{type:Boolean},node:{default:null},outputs:{default:()=>({})},pending:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(f,{emit:y}){const o=f,p=y,h=s.useFlowApiConfig(),k=e.ref(!1),u=e.shallowRef([]),d=e.ref({}),_=e.ref({}),m=e.ref(!1),b=e.computed(()=>m.value?j:"暂无输出结果"),C=e.computed(()=>m.value?q:"确定"),w=async()=>{if(o.node){k.value=!0,_.value={},m.value=!1;try{const t=await s.pluginDetailRequest(h,o.node.component);u.value=s.mergeOutputs(t.outputs??[]),m.value=s.hasOnlySystemOutputs(t.outputs);const n=o.outputs??{},a={};u.value.forEach(l=>{const c=Object.prototype.hasOwnProperty.call(n,l.key)?n[l.key]:l.type==="object"?{}:void 0,r=s.resolveMockFormControl(l);a[l.key]=r==="json-editor"||r==="data-table"?s.formatJsonFieldValue(c):c}),d.value=a}catch(t){console.error(t),u.value=[],d.value={},m.value=!1,N({theme:"error",message:"加载输出结果失败"})}finally{k.value=!1}}},g=()=>{const t={},n={};return u.value.forEach(a=>{const l=d.value[a.key],c=s.resolveMockFormControl(a);if(c==="json-editor"||c==="data-table"){const r=s.parseJsonFieldValue(l);if(!r.valid){t[a.key]=r.message;return}r.value!==void 0&&(n[a.key]=r.value);return}l!==void 0&&l!==""&&(n[a.key]=l)}),{errors:t,outputs:n}},x=t=>{M.InfoBox({title:"确认 Mock 输出?",content:"Mock 输出将覆盖当前输出结果,执行时跳过该节点并以 Mock 值替代实际输出",confirmText:"确定",cancelText:"取消",width:400,onConfirm:()=>{t()}})},V=()=>{if(m.value){p("confirm",{outputs:{}});return}const{errors:t,outputs:n}=g();_.value=t,!(Object.keys(t).length>0)&&x(()=>p("confirm",{outputs:n}))},v=()=>{p("close"),p("update:show",!1)};return e.watch(()=>[o.show,o.node?.id],([t])=>{t&&o.node&&(d.value=s.cloneDeep(o.outputs??{}),w())},{immediate:!0}),(t,n)=>{const a=e.resolveComponent("bk-form-item"),l=e.resolveComponent("bk-form"),c=e.resolveComponent("bk-exception"),r=e.resolveComponent("bk-button"),B=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(B,{"is-show":o.show,width:960,"quick-close":"","esc-close":!1,onClosed:v},{header:e.withCtx(()=>[n[0]||(n[0]=e.createElementVNode("span",{class:"mock-data-sideslider__title"},"Mock输出",-1)),o.node?.name?(e.openBlock(),e.createElementBlock("span",O,"-")):e.createCommentVNode("",!0),o.node?.name?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mock-data-sideslider__title-node",title:o.node.name},e.toDisplayString(o.node.name),9,F)):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(r,{theme:"primary","data-test":"mock-confirm",loading:o.pending,onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.value),1)]),_:1},8,["loading"]),e.createVNode(r,{disabled:o.pending,onClick:v},{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[u.value.length>0?(e.openBlock(),e.createBlock(l,{key:0,"form-type":"vertical","label-width":120,"data-test":"mock-outputs-form"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,i=>(e.openBlock(),e.createBlock(a,{key:i.key,label:i.name||i.key},{default:e.withCtx(()=>[e.createVNode(s.MockFieldRenderer,{modelValue:d.value[i.key],"onUpdate:modelValue":T=>d.value[i.key]=T,field:i,error:_.value[i.key]},null,8,["modelValue","onUpdate:modelValue","field","error"])]),_:2},1032,["label"]))),128))]),_:1})):k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:1,class:"mock-data-sideslider__exception",scene:"part",type:"empty",title:b.value},null,8,["title"]))])),[[E,{loading:k.value}]])]),_:1},8,["is-show"])}}}),I=s._export_sfc(Y,[["__scopeId","data-v-c4e2476a"]]);exports.default=I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bit4HgBF.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const N={string:"input",text:"input",textarea:"textarea",int:"input",integer:"input",number:"input",float:"input",json:"json",object:"json",array:"array",list:"array",select:"select",time:"timepicker",datetime:"timepicker"},h=l=>l.replace(/^\$\{(.+)\}$/,"$1"),g=l=>`\${${h(l)}}`;function F(l,c){const a=g(l.key),n=c?s.cloneDeep(c):{},d=l.custom_type??n.custom_type??N[l.type]??"input";return{...n,key:a,name:l.name??n.name??h(l.key),custom_type:d,desc:n.desc??"",index:n.index??0,show_type:"show",source_info:n.source_info??{},source_tag:n.source_tag??"",source_type:n.source_type??"custom",validation:n.validation??"",value:l.default??n.value,meta:{...n.meta??{},required:l.required??n.meta?.required??!1}}}function D(l,c={}){if(!l)return{};const a=l.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(l.fields)&&l.fields.length>0?l.fields.reduce((n,d)=>{const r=g(d.key);return n[r]=F(d,c[r]),n},{}):{}}const j={class:"global-debug-input"},q={key:0,class:"global-debug-input__params","data-test":"input-params"},R={key:0},L=["title"],O={class:"col-value"},T={key:1,class:"global-debug-input__value"},I={key:1,class:"form-params-wrapper"},P={class:"sideslider-footer-buttons"},$=e.defineComponent({__name:"index",props:{show:{type:Boolean},schema:{},pipelineConstants:{default:()=>({})},initialValues:{default:()=>({})},pending:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(l,{emit:c}){const a=l,n=c,d=s.useFlowApiConfig(),r=e.ref({}),p=e.shallowRef([]),m=e.shallowRef([]),f=e.shallowRef(!1),y=e.ref(),v=e.ref(),k=e.computed(()=>p.value.filter(t=>s.isBuiltinUsageVariable(t))),V=e.computed(()=>k.value.length>0||m.value.length>0),b=e.computed(()=>[...p.value].sort((t,o)=>(t.index??0)-(o.index??0)).map(t=>{const o=Object.prototype.hasOwnProperty.call(r.value,t.key)?r.value[t.key]:t.value;return{key:t.key,name:t.name||t.key,value:o,display:s.formatDebugValue(o),isComplex:s.isComplexDebugValue(o)}}));e.watch(()=>a.show,t=>{t&&(r.value=s.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const t=D(a.schema,a.pipelineConstants),o=Object.values(t).filter(i=>typeof i=="object"&&i!==null&&i.show_type==="show");if(p.value=o,a.readonly||Object.keys(t).length<1){m.value=[];return}f.value=!0;try{m.value=await s.getInputFormsFromConstants(d,t)}catch(i){console.error("Failed to build debug input forms from schema:",i),m.value=[]}finally{f.value=!1}},B=t=>{r.value={...r.value,...s.cloneDeep(t)}},C=async()=>{const[t,o]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof y.value?.validate=="function"?y.value.validate():!0)]);!t||!o||n("confirm",s.cloneDeep(r.value))},_=()=>{n("close"),n("update:show",!1)};return(t,o)=>{const i=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:_},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[a.readonly?(e.openBlock(),e.createElementBlock("table",q,[o[2]||(o[2]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"col-name"},"参数名"),e.createElementVNode("th",{class:"col-value"},"参数值")])],-1)),e.createElementVNode("tbody",null,[b.value.length===0?(e.openBlock(),e.createElementBlock("tr",R,[...o[1]||(o[1]=[e.createElementVNode("td",{class:"global-debug-input__empty",colspan:"2"},"暂无参数",-1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,u=>(e.openBlock(),e.createElementBlock("tr",{key:u.key,"data-test":"input-row"},[e.createElementVNode("td",{class:"col-name",title:u.key},e.toDisplayString(u.name),9,L),e.createElementVNode("td",O,[u.isComplex?(e.openBlock(),e.createBlock(s.DebugJsonViewer,{key:0,value:u.value,"data-test":"json-viewer"},null,8,["value"])):(e.openBlock(),e.createElementBlock("pre",T,e.toDisplayString(u.display),1))])]))),128))])])):(e.openBlock(),e.createElementBlock("div",I,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(s.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),variables:k.value},null,8,["modelValue","variables"])):e.createCommentVNode("",!0),m.value.length>0?(e.openBlock(),e.createBlock(s.RenderForm,{key:1,ref_key:"renderFormRef",ref:y,scheme:m.value,editable:"","form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!0},"form-data":r.value,onChange:B},null,8,["scheme","form-data"])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.EmptyException,{key:2,title:"暂无参数"}))]))])),[[E,{loading:f.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(i,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(i,{disabled:a.pending,onClick:_},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),S=s._export_sfc($,[["__scopeId","data-v-01a33593"]]);exports.default=S;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as A, ref as V, shallowRef as x, computed as C, watch as U, resolveComponent as j, resolveDirective as K, openBlock as l, createBlock as f, createSlots as S, withCtx as y, withDirectives as G, createElementBlock as d, createElementVNode as i, createCommentVNode as v, Fragment as H, renderList as J, toDisplayString as B, unref as Y, createVNode as R, createTextVNode as E } from "vue";
|
|
2
|
-
import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-
|
|
2
|
+
import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-DEh6TdMZ.js";
|
|
3
3
|
import "bkui-vue/lib/message";
|
|
4
4
|
import "bkui-vue/lib/icon";
|
|
5
5
|
import "monaco-editor";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as q, ref as f, shallowRef as J, computed as x, watch as P, resolveComponent as p, resolveDirective as U, openBlock as l, createBlock as v, withCtx as i, withDirectives as z, createElementBlock as y, Fragment as A, renderList as W, createVNode as b, createCommentVNode as g, createElementVNode as V, createTextVNode as C, toDisplayString as M } from "vue";
|
|
2
2
|
import { InfoBox as X } from "bkui-vue/lib";
|
|
3
3
|
import G from "bkui-vue/lib/message";
|
|
4
|
-
import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-
|
|
4
|
+
import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-DEh6TdMZ.js";
|
|
5
5
|
const ae = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mock-data-sideslider__title-sep"
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-Bit4HgBF.cjs"),o=require("./context-CGIQsuRc.cjs");exports.BkFlowCanvas=e.BkFlowCanvas;exports.BkFlowModelAccessor=e.BkFlowModelAccessor;exports.BkFlowNodeAccessor=e.BkFlowNodeAccessor;exports.FlowCreateTask=e.FlowCreateTask;exports.FlowDebug=e.FlowDebug;exports.FlowDetail=e.index;exports.FlowEdit=e.edit;exports.FlowExecute=e.execute;exports.FlowMockDebug=e.mock;exports.FlowView=e.view;exports.bkflowConnectionValidator=e.bkflowConnectionValidator;exports.createBkflowPlugin=e.createBkflowPlugin;exports.createBkflowSchema=e.createBkflowSchema;exports.createExecutionStatusPlugin=e.createExecutionStatusPlugin;exports.default=e.index$1;exports.exportToPipelineTree=e.exportToPipelineTree;exports.getUniformApiPluginFormValue=e.getUniformApiPluginFormValue;exports.getVariableDefaultConfig=e.getVariableDefaultConfig;exports.importFromPipelineTree=e.importFromPipelineTree;exports.isMockableNode=e.isMockableNode;exports.mergeOutputs=e.mergeOutputs;exports.normalizePluginOutputItems=e.normalizePluginOutputItems;exports.provideFilterVariableConfig=e.provideFilterVariableConfig;exports.provideFlowApiConfig=e.provideFlowApiConfig;exports.provideMemberSelectorConfig=e.provideMemberSelectorConfig;exports.provideSelectPanelConfig=e.provideSelectPanelConfig;exports.provideSelectRelatedOptionConfig=e.provideSelectRelatedOptionConfig;exports.resolveExecutionActions=e.resolveExecutionActions;exports.resolveMockFormControl=e.resolveMockFormControl;exports.useFlowApiConfig=e.useFlowApiConfig;exports.useFlowEditApiConfig=e.useFlowEditApiConfig;exports.useFlowViewApiConfig=e.useFlowViewApiConfig;exports.useMemberSelectorConfig=e.useMemberSelectorConfig;exports.useSelectPanelConfig=e.useSelectPanelConfig;exports.validatePipelineTree=e.validatePipelineTree;exports.generateId=o.generateId;exports.random4=o.random4;
|
package/dist/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ declare namespace __mock_vue {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED' | 'SKIP';
|
|
71
|
+
type NodeExecutionStatus = 'CREATED' | 'RUNNING' | 'FINISHED' | 'FAILED' | 'SUSPENDED' | 'REVOKED' | 'INVALID' | 'SKIP';
|
|
72
72
|
type ExecutionNodeAction = 'retry' | 'skip' | 'resume' | 'approve' | 'forceFail' | 'gatewaySkip';
|
|
73
73
|
interface NodeExecutionState {
|
|
74
74
|
status: NodeExecutionStatus;
|
|
@@ -1106,9 +1106,13 @@ interface DebugConditionResult {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
interface DebugContextNode {
|
|
1108
1108
|
node_id: string;
|
|
1109
|
+
/** 节点显示名称;后端逐步补齐,旧版本可能缺失。 */
|
|
1110
|
+
node_name?: string;
|
|
1109
1111
|
node_type: string;
|
|
1110
1112
|
execution_mode: DebugExecutionMode;
|
|
1111
1113
|
status: DebugNodeStatus;
|
|
1114
|
+
/** 节点配置变更后,已有调试结果是否失效。 */
|
|
1115
|
+
config_changed?: boolean;
|
|
1112
1116
|
can_step: boolean;
|
|
1113
1117
|
missing_vars: DebugMissingVar[];
|
|
1114
1118
|
waiting_reason?: string | null;
|
|
@@ -1251,6 +1255,45 @@ interface DebugApiServices {
|
|
|
1251
1255
|
resetDebugResult(params: ResetDebugResultParams): Promise<DebugResetResult>;
|
|
1252
1256
|
}
|
|
1253
1257
|
|
|
1258
|
+
/** 版本列表条目。列表接口不返回 pipeline_tree,取流程内容要走 preview_task_tree。 */
|
|
1259
|
+
interface FlowVersionSnapshot {
|
|
1260
|
+
id: number;
|
|
1261
|
+
template_id: number;
|
|
1262
|
+
/** 草稿行为 null;已发布行为 semver 字符串 */
|
|
1263
|
+
version: string | null;
|
|
1264
|
+
desc: string | null;
|
|
1265
|
+
draft: boolean;
|
|
1266
|
+
creator: string;
|
|
1267
|
+
operator: string;
|
|
1268
|
+
/** pipeline 内容指纹 */
|
|
1269
|
+
md5sum: string;
|
|
1270
|
+
create_time: string;
|
|
1271
|
+
update_time: string;
|
|
1272
|
+
}
|
|
1273
|
+
interface FlowVersionListResult {
|
|
1274
|
+
count: number;
|
|
1275
|
+
results: FlowVersionSnapshot[];
|
|
1276
|
+
}
|
|
1277
|
+
interface ReleaseFlowVersionParams {
|
|
1278
|
+
version: string;
|
|
1279
|
+
desc?: string;
|
|
1280
|
+
}
|
|
1281
|
+
interface RollbackFlowVersionParams {
|
|
1282
|
+
version: string;
|
|
1283
|
+
}
|
|
1284
|
+
interface FlowVersionApiServices {
|
|
1285
|
+
/** 版本列表。固定以 limit=-1 请求全量,不做分页 UI */
|
|
1286
|
+
fetchFlowVersionList: (templateId: string) => Promise<FlowVersionListResult>;
|
|
1287
|
+
/** 计算下一个建议版本号。基于当前线上版本 bump,无历史版本时返回 1.0.0 */
|
|
1288
|
+
calculateNextFlowVersion: (templateId: string) => Promise<{
|
|
1289
|
+
version: string;
|
|
1290
|
+
}>;
|
|
1291
|
+
/** 发布上线。作用于 DB 里的草稿行,调用前必须确保草稿已落库 */
|
|
1292
|
+
releaseFlowVersion: (templateId: string, params: ReleaseFlowVersionParams) => Promise<FlowTemplate>;
|
|
1293
|
+
/** 把历史版本加载至草稿,会覆盖当前草稿内容 */
|
|
1294
|
+
rollbackFlowVersion: (templateId: string, params: RollbackFlowVersionParams) => Promise<unknown>;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1254
1297
|
interface DrawPipelineParams {
|
|
1255
1298
|
pipeline_tree: PipelineTree;
|
|
1256
1299
|
canvas_width: number;
|
|
@@ -1331,6 +1374,8 @@ interface FlowTaskDetail {
|
|
|
1331
1374
|
id: number | string;
|
|
1332
1375
|
template_id: number;
|
|
1333
1376
|
pipeline_tree: PipelineTree;
|
|
1377
|
+
/** 调试任务执行人。 */
|
|
1378
|
+
executor?: string;
|
|
1334
1379
|
/** 任务已耗时(秒),调试摘要弹层刷新恢复用。 */
|
|
1335
1380
|
elapsed_time?: number;
|
|
1336
1381
|
[key: string]: unknown;
|
|
@@ -1508,7 +1553,7 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
|
|
|
1508
1553
|
fetchTaskNodeLog?: (params: FetchTaskNodeLogParams) => Promise<unknown>;
|
|
1509
1554
|
getFlowTaskDetail?: (params: GetFlowTaskDetailParams) => Promise<FlowTaskDetail>;
|
|
1510
1555
|
}
|
|
1511
|
-
interface FlowDetailApiConfig extends FlowEditApiConfig, Partial<DebugApiServices> {
|
|
1556
|
+
interface FlowDetailApiConfig extends FlowEditApiConfig, Partial<DebugApiServices>, Partial<FlowVersionApiServices> {
|
|
1512
1557
|
}
|
|
1513
1558
|
|
|
1514
1559
|
/**
|
|
@@ -2104,6 +2149,13 @@ type __VLS_Props$1 = {
|
|
|
2104
2149
|
permissions?: Partial<FlowDetailPermissions>;
|
|
2105
2150
|
enableVersion?: boolean;
|
|
2106
2151
|
flowVersion?: string;
|
|
2152
|
+
/**
|
|
2153
|
+
* 是否启用版本管理 UI(头部版本选择器 + 版本历史 + 发布 + 回滚),默认 false。
|
|
2154
|
+
*
|
|
2155
|
+
* 开启即隐含 `enableVersion` 的数据加载语义(草稿/指定版本读取),消费方只需传这一个。
|
|
2156
|
+
* 组件无法自检空间的 flow_versioning 开关,由消费方保证只在开启版本管理的空间传 true。
|
|
2157
|
+
*/
|
|
2158
|
+
enableVersionManagement?: boolean;
|
|
2107
2159
|
defaultZoom?: number;
|
|
2108
2160
|
bkflowSaasUrl?: string;
|
|
2109
2161
|
enableThirdPlugin?: boolean;
|
|
@@ -2136,18 +2188,21 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {
|
|
|
2136
2188
|
saveSuccess: () => any;
|
|
2137
2189
|
createVariable: (payload: CreateVariablePayload) => any;
|
|
2138
2190
|
executeSuccess: (result: FlowTaskExecuteSuccessResult) => any;
|
|
2191
|
+
"update:flowVersion": (version: string | undefined) => any;
|
|
2139
2192
|
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
|
|
2140
2193
|
onBack?: (() => any) | undefined;
|
|
2141
2194
|
onSave?: ((flowData: FlowTemplate) => any) | undefined;
|
|
2142
2195
|
onSaveSuccess?: (() => any) | undefined;
|
|
2143
2196
|
onCreateVariable?: ((payload: CreateVariablePayload) => any) | undefined;
|
|
2144
2197
|
onExecuteSuccess?: ((result: FlowTaskExecuteSuccessResult) => any) | undefined;
|
|
2198
|
+
"onUpdate:flowVersion"?: ((version: string | undefined) => any) | undefined;
|
|
2145
2199
|
}>, {
|
|
2146
2200
|
quickAdd: QuickAddConfig;
|
|
2147
2201
|
enableThirdPlugin: boolean;
|
|
2148
2202
|
hideTrigger: boolean;
|
|
2149
2203
|
defaultZoom: number;
|
|
2150
2204
|
enableVersion: boolean;
|
|
2205
|
+
enableVersionManagement: boolean;
|
|
2151
2206
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2152
2207
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
2153
2208
|
declare const _default$2: typeof __VLS_export$1;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as y, e as G } from "./context-
|
|
1
|
+
import { y as o, z as s, A as i, F as l, G as r, H as t, I as n, J as u, K as g, N as c, O as p, P as f, Q as w, S as F, T as d, U as m, V as C, W as k, X as P, Y as v, m as A, Z as b, $ as S, a0 as V, a1 as x, a2 as M, a3 as T, a4 as B, r as E, u as D, a5 as O, a6 as I, a7 as N, a8 as z, a9 as U } from "./index-DEh6TdMZ.js";
|
|
2
|
+
import { g as y, e as G } from "./context-Ce_Xpx5d.js";
|
|
3
3
|
export {
|
|
4
4
|
o as BkFlowCanvas,
|
|
5
5
|
s as BkFlowModelAccessor,
|
|
@@ -12,21 +12,21 @@ export {
|
|
|
12
12
|
g as FlowMockDebug,
|
|
13
13
|
c as FlowView,
|
|
14
14
|
p as bkflowConnectionValidator,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
f as createBkflowPlugin,
|
|
16
|
+
w as createBkflowSchema,
|
|
17
17
|
F as createExecutionStatusPlugin,
|
|
18
18
|
d as default,
|
|
19
19
|
m as exportToPipelineTree,
|
|
20
20
|
y as generateId,
|
|
21
21
|
C as getUniformApiPluginFormValue,
|
|
22
22
|
k as getVariableDefaultConfig,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
P as importFromPipelineTree,
|
|
24
|
+
v as isMockableNode,
|
|
25
25
|
A as mergeOutputs,
|
|
26
26
|
b as normalizePluginOutputItems,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
S as provideFilterVariableConfig,
|
|
28
|
+
V as provideFlowApiConfig,
|
|
29
|
+
x as provideMemberSelectorConfig,
|
|
30
30
|
M as provideSelectPanelConfig,
|
|
31
31
|
T as provideSelectRelatedOptionConfig,
|
|
32
32
|
G as random4,
|