@blueking/bkflow-canvas-editor 1.1.0-beta.24 → 1.1.0-beta.26
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/advanced.d.ts +25 -1
- package/dist/{index-tXlwyegs.cjs → index-3EhFYqPl.cjs} +1 -1
- package/dist/{index-D-qVv0ss.cjs → index-COolLM_E.cjs} +22 -22
- package/dist/{index-B5J9lmBg.js → index-COuP8C6j.js} +8898 -8867
- package/dist/{index-DbS-RWUq.js → index-Co0dagB-.js} +1 -1
- package/dist/{index-y1XNn6V7.js → index-Ctav2u7Z.js} +2 -2
- package/dist/{index-DOgpkKHi.cjs → index-D63TsQgD.cjs} +1 -1
- package/dist/{index-CqHm4Opp.js → index-DFrYIFvG.js} +1 -1
- package/dist/{index-B4oeYvKg.cjs → index-wCGsKTXS.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.esm.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/advanced.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ interface NodeExecutionState {
|
|
|
44
44
|
actions?: ExecutionNodeAction[];
|
|
45
45
|
/** 兼容旧版后端直接透出的动作数组字段 */
|
|
46
46
|
action_list?: ExecutionNodeAction[];
|
|
47
|
+
/**
|
|
48
|
+
* 条件网关命中的出边 flow_id。
|
|
49
|
+
* 有值时执行态连线优先按它着色,不要求目标节点已经执行(网关单步不会跑下游)。
|
|
50
|
+
*/
|
|
51
|
+
selectedFlowIds?: string[];
|
|
47
52
|
}
|
|
48
53
|
type TaskExecutionStates = Record<string, NodeExecutionState>;
|
|
49
54
|
|
|
@@ -623,6 +628,15 @@ interface DebugErrorDetail {
|
|
|
623
628
|
failures?: DebugErrorFailure[];
|
|
624
629
|
[key: string]: unknown;
|
|
625
630
|
}
|
|
631
|
+
/** 条件网关分支求值结果(`debug_context.nodes[].condition_results`)。 */
|
|
632
|
+
interface DebugConditionResult {
|
|
633
|
+
flow_id: string;
|
|
634
|
+
name?: string;
|
|
635
|
+
expression?: string;
|
|
636
|
+
resolved_expression?: string;
|
|
637
|
+
matched?: boolean;
|
|
638
|
+
[key: string]: unknown;
|
|
639
|
+
}
|
|
626
640
|
interface DebugContextNode {
|
|
627
641
|
node_id: string;
|
|
628
642
|
node_type: string;
|
|
@@ -631,6 +645,10 @@ interface DebugContextNode {
|
|
|
631
645
|
can_step: boolean;
|
|
632
646
|
missing_vars: DebugMissingVar[];
|
|
633
647
|
waiting_reason?: string | null;
|
|
648
|
+
/** 是否支持单步调试;并行/汇聚网关为 false,仅用于展示全局调试状态。 */
|
|
649
|
+
supports_step?: boolean;
|
|
650
|
+
/** 是否支持 Mock;全部网关为 false。 */
|
|
651
|
+
supports_mock?: boolean;
|
|
634
652
|
mock_result?: 'success' | 'fail' | null;
|
|
635
653
|
error_detail?: DebugErrorDetail | string | null;
|
|
636
654
|
duration_ms?: number | null;
|
|
@@ -642,6 +660,10 @@ interface DebugContextNode {
|
|
|
642
660
|
mock_outputs?: Record<string, unknown> | null;
|
|
643
661
|
mock_error?: string | null;
|
|
644
662
|
outputs?: Record<string, unknown> | null;
|
|
663
|
+
/** 条件网关命中的出边 flow_id;画布用它把命中连线标绿。 */
|
|
664
|
+
selected_flow_ids?: string[];
|
|
665
|
+
/** 条件网关每个分支的表达式与命中结果。 */
|
|
666
|
+
condition_results?: DebugConditionResult[];
|
|
645
667
|
}
|
|
646
668
|
/**
|
|
647
669
|
* /debug_context/ 顶层结构。
|
|
@@ -697,6 +719,8 @@ interface RunNodeDebugStepResult {
|
|
|
697
719
|
error_detail?: unknown;
|
|
698
720
|
updated_global_vars?: Record<string, unknown>;
|
|
699
721
|
log_ref?: DebugContextNode['log_ref'];
|
|
722
|
+
selected_flow_ids?: string[];
|
|
723
|
+
condition_results?: DebugConditionResult[];
|
|
700
724
|
[key: string]: unknown;
|
|
701
725
|
}
|
|
702
726
|
interface RunGlobalDebugResult {
|
|
@@ -1043,4 +1067,4 @@ declare const provideVariableInputCreateVariable: (handler: VariableInputCreateV
|
|
|
1043
1067
|
declare const useVariableInputCreateVariable: () => VariableInputCreateVariableHandler | null;
|
|
1044
1068
|
|
|
1045
1069
|
export { PLUGIN_GROUP_ICON_MAP, provideVariableInputCreateVariable, useFlowApi, useVariableInputCreateVariable };
|
|
1046
|
-
export type { CreateVariablePayload, CreateVariableRequest, CustomVariableType, DebugApiServices, DebugContext, DebugContextNode, DebugContextStatus, DebugErrorDetail, DebugExecutionMode, DebugInputSchema, DebugMissingVar, DebugNodeStatus, DebugRunStatus, DebugRunType, EndEvent, Flow, FlowDetailApiConfig, FlowEditApiConfig, FlowListItem, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableInputCreateVariableHandler, VariableOption, VariableRefRequestParams };
|
|
1070
|
+
export type { CreateVariablePayload, CreateVariableRequest, CustomVariableType, DebugApiServices, DebugConditionResult, DebugContext, DebugContextNode, DebugContextStatus, DebugErrorDetail, DebugExecutionMode, DebugInputSchema, DebugMissingVar, DebugNodeStatus, DebugRunStatus, DebugRunType, EndEvent, Flow, FlowDetailApiConfig, FlowEditApiConfig, FlowListItem, FlowViewApiConfig, GatewayType, Line, Location, NodeConfigData, NodeType, NotifyConfig, PluginGroupConfig, PluginOutputItem, PortOrientation, StartEvent, TemplateConfigs, UniformApiPluginConfig, UniformApiPluginInputsItem, VariableInputCreateVariableHandler, VariableOption, VariableRefRequestParams };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("lodash"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("lodash"),r=require("./index-COolLM_E.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const F={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"},g=l=>l.replace(/^\$\{(.+)\}$/,"$1"),V=l=>`\${${g(l)}}`;function D(l,c){const a=V(l.key),n=c?p.cloneDeep(c):{},d=l.custom_type??n.custom_type??F[l.type]??"input";return{...n,key:a,name:l.name??n.name??g(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 j(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 s=V(d.key);return n[s]=D(d,c[s]),n},{}):{}}const q={class:"global-debug-input"},R={key:0,class:"global-debug-input__params","data-test":"input-params"},L={key:0},O=["title"],T={class:"col-value"},I={key:1,class:"global-debug-input__value"},P={key:1,class:"form-params-wrapper"},$={class:"sideslider-footer-buttons"},S=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=r.useFlowApiConfig(),s=e.ref({}),f=e.shallowRef([]),m=e.shallowRef([]),y=e.shallowRef(!1),v=e.ref(),k=e.ref(),b=e.computed(()=>f.value.filter(t=>r.isBuiltinUsageVariable(t))),w=e.computed(()=>b.value.length>0||m.value.length>0),_=e.computed(()=>[...f.value].sort((t,o)=>(t.index??0)-(o.index??0)).map(t=>{const o=Object.prototype.hasOwnProperty.call(s.value,t.key)?s.value[t.key]:t.value;return{key:t.key,name:t.name||t.key,value:o,display:r.formatDebugValue(o),isComplex:r.isComplexDebugValue(o)}}));e.watch(()=>a.show,t=>{t&&(s.value=p.cloneDeep(a.initialValues??{}),B())});const B=async()=>{const t=j(a.schema,a.pipelineConstants),o=Object.values(t).filter(i=>typeof i=="object"&&i!==null&&i.show_type==="show");if(f.value=o,a.readonly||Object.keys(t).length<1){m.value=[];return}y.value=!0;try{m.value=await r.getInputFormsFromConstants(d,t)}catch(i){console.error("Failed to build debug input forms from schema:",i),m.value=[]}finally{y.value=!1}},C=t=>{s.value={...s.value,...p.cloneDeep(t)}},x=async()=>{const[t,o]=await Promise.all([Promise.resolve(typeof k.value?.validate=="function"?k.value.validate():!0),Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0)]);!t||!o||n("confirm",p.cloneDeep(s.value))},h=()=>{n("close"),n("update:show",!1)};return(t,o)=>{const i=e.resolveComponent("bk-button"),E=e.resolveComponent("bk-sideslider"),N=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(E,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:h},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",q,[a.readonly?(e.openBlock(),e.createElementBlock("table",R,[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,[_.value.length===0?(e.openBlock(),e.createElementBlock("tr",L,[...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(_.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,O),e.createElementVNode("td",T,[u.isComplex?(e.openBlock(),e.createBlock(r.DebugJsonViewer,{key:0,value:u.value,"data-test":"json-viewer"},null,8,["value"])):(e.openBlock(),e.createElementBlock("pre",I,e.toDisplayString(u.display),1))])]))),128))])])):(e.openBlock(),e.createElementBlock("div",P,[b.value.length>0?(e.openBlock(),e.createBlock(e.unref(r.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:k,modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=u=>s.value=u),variables:b.value},null,8,["modelValue","variables"])):e.createCommentVNode("",!0),m.value.length>0?(e.openBlock(),e.createBlock(r.RenderForm,{key:1,ref_key:"renderFormRef",ref:v,scheme:m.value,editable:"","form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!0},"form-data":s.value,onChange:C},null,8,["scheme","form-data"])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(r.EmptyException,{key:2,title:"暂无参数"}))]))])),[[N,{loading:y.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",$,[e.createVNode(i,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:x},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(i,{disabled:a.pending,onClick:h},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),A=r._export_sfc(S,[["__scopeId","data-v-95858958"]]);exports.default=A;
|