@nocobase/plugin-workflow-request 2.2.0-alpha.3 → 2.2.0-alpha.5
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/client/{305.140661137327023c.js → 305.6d5dddb8384cfff9.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-v2/{305.4d97590a17776080.js → 305.c4ca9d4192f043c3.js} +1 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +7 -7
- package/dist/node_modules/joi/package.json +1 -1
- package/package.json +2 -2
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_workflow_request=self.webpackChunk_nocobase_plugin_workflow_request||[]).push([["305"],{160:function(e,t,n){n.d(t,{RequestFieldset:function(){return b}});var r=n(59),a=n(155),l=n.n(a),o=n(375),i=n(197),c=n(401),m=n(488),u=n(1);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){var t=e.name,n=e.label,a=e.addLabel,c=e.addButtonFullWidth,u=void 0!==c&&c,s=e.extra,d=e.valueName,f=void 0===d?"value":d,p=e.renderValueInput,y=(0,m.kj)();return l().createElement(r.Form.Item,{label:n,extra:s},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,c=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){var t;return l().createElement(r.Flex,{key:e.key,align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[e.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:y("Name")})),l().createElement(r.Form.Item,{name:[e.name,f],style:{flex:1,marginBottom:0}},null!=(t=null==p?void 0:p(e))?t:l().createElement(i.WorkflowVariableInput,{placeholder:y("Value")})),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":y("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return c(e.name)}})))}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n()},style:u?{width:"100%"}:{alignSelf:"flex-start"}},a))}))}function f(e){var t,n=e.field,u=e.listName,d=e.onRemove,f=(0,m.kj)(),p=r.Form.useFormInstance(),y=null!=(t=r.Form.useWatch(((function(e){if(Array.isArray(e))return s(e)})(u)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n.name,"valueType"]),p))?t:c.qg,b=(0,a.useMemo)(function(){return"file"===y?l().createElement(i.WorkflowVariableInput,{variableOptions:{types:[c.nd]}}):l().createElement(i.WorkflowVariableInput,{placeholder:f("Value")})},[f,y]),g="file"===y?"file":"text";return l().createElement(r.Flex,{align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[n.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:f("Name")})),l().createElement(r.Form.Item,{name:[n.name,"valueType"],initialValue:c.qg,style:{marginBottom:0}},l().createElement(r.Select,{allowClear:!1,options:c.LC.map(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={label:f(e.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})})),l().createElement(r.Form.Item,{key:"".concat(n.key,"-").concat(g),name:[n.name,g],style:{flex:1,marginBottom:0}},b),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":f("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return d(n.name)}})))}function p(e){var t=e.name,n=e.label,a=(0,m.kj)(),i=Array.isArray(t)?t:[t];return l().createElement(r.Form.Item,{label:n},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,m=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){return l().createElement(f,{key:e.key,field:e,listName:i,onRemove:m})}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n({valueType:c.qg})},style:{width:"100%"}},a("Add key-value pairs")))}))}function y(){var e,t,n=(0,m.kj)(),a=r.Form.useFormInstance(),o=r.Form.useWatch(["config","contentType"],a),s=null!=(e=null!=(t=a.getFieldValue(["config","contentType"]))?t:o)?e:c.xh,f=(0,u.xh)(s);return"json"===f?l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableJsonTextArea,{autoSize:{minRows:10},placeholder:n("Input request data")})):"pairs"===f?l().createElement(d,{name:["config","data"],label:n("Body"),addLabel:n("Add key-value pairs"),renderValueInput:function(){return l().createElement(i.WorkflowVariableInput,{placeholder:n("Value")})}}):"multipart"===f?l().createElement(p,{name:["config","data"],label:n("Body")}):l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"application/xml"===s?'<?xml version="1.0" encoding="UTF-8"?>':void 0}))}function b(){var e,t,n,o,s=(0,m.kj)();return e=r.Form.useFormInstance(),t=r.Form.useWatch(["config","contentType"],e),n=(0,a.useRef)(),o=(0,a.useRef)(!1),(0,a.useEffect)(function(){var r,a,l=null!=(r=null!=(a=e.getFieldValue(["config","contentType"]))?a:t)?r:c.xh,i=e.getFieldValue(["config","data"]);if(!o.current){o.current=!0,n.current=l,void 0===i&&e.setFieldValue(["config","data"],(0,u.WN)(l));return}n.current!==l&&e.setFieldValue(["config","data"],(0,u.WN)(l)),n.current=l},[t,e]),l().createElement(l().Fragment,null,l().createElement(r.Form.Item,{name:["config","method"],label:s("HTTP method"),rules:[{required:!0}],initialValue:c.OQ},l().createElement(r.Select,{showSearch:!1,allowClear:!1,options:c.Tm,className:"auto-width"})),l().createElement(r.Form.Item,{name:["config","url"],label:s("URL"),rules:[{required:!0}]},l().createElement(i.WorkflowVariableInput,{placeholder:"https://www.nocobase.com"})),l().createElement(r.Form.Item,{name:["config","contentType"],label:s("Content-Type"),initialValue:c.xh},l().createElement(r.Select,{allowClear:!1,options:c.cf})),l().createElement(d,{name:["config","headers"],label:s("Headers"),addLabel:s("Add request header"),addButtonFullWidth:!0,extra:s('"Content-Type" will be ignored from headers.')}),l().createElement(d,{name:["config","params"],label:s("Parameters"),addLabel:s("Add parameter"),addButtonFullWidth:!0}),l().createElement(y,null),l().createElement(r.Form.Item,{name:["config","timeout"],label:s("Timeout config"),initialValue:c.cS},l().createElement(r.InputNumber,{addonAfter:s("ms"),min:1,step:1e3
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_request=self.webpackChunk_nocobase_plugin_workflow_request||[]).push([["305"],{160:function(e,t,n){n.d(t,{RequestFieldset:function(){return b}});var r=n(59),a=n(155),l=n.n(a),o=n(375),i=n(197),c=n(401),m=n(488),u=n(1);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){var t=e.name,n=e.label,a=e.addLabel,c=e.addButtonFullWidth,u=void 0!==c&&c,s=e.extra,d=e.valueName,f=void 0===d?"value":d,p=e.renderValueInput,y=(0,m.kj)();return l().createElement(r.Form.Item,{label:n,extra:s},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,c=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){var t;return l().createElement(r.Flex,{key:e.key,align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[e.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:y("Name")})),l().createElement(r.Form.Item,{name:[e.name,f],style:{flex:1,marginBottom:0}},null!=(t=null==p?void 0:p(e))?t:l().createElement(i.WorkflowVariableInput,{placeholder:y("Value")})),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":y("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return c(e.name)}})))}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n()},style:u?{width:"100%"}:{alignSelf:"flex-start"}},a))}))}function f(e){var t,n=e.field,u=e.listName,d=e.onRemove,f=(0,m.kj)(),p=r.Form.useFormInstance(),y=null!=(t=r.Form.useWatch(((function(e){if(Array.isArray(e))return s(e)})(u)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n.name,"valueType"]),p))?t:c.qg,b=(0,a.useMemo)(function(){return"file"===y?l().createElement(i.WorkflowVariableInput,{variableOptions:{types:[c.nd]}}):l().createElement(i.WorkflowVariableInput,{placeholder:f("Value")})},[f,y]),g="file"===y?"file":"text";return l().createElement(r.Flex,{align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[n.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:f("Name")})),l().createElement(r.Form.Item,{name:[n.name,"valueType"],initialValue:c.qg,style:{marginBottom:0}},l().createElement(r.Select,{allowClear:!1,options:c.LC.map(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={label:f(e.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})})),l().createElement(r.Form.Item,{key:"".concat(n.key,"-").concat(g),name:[n.name,g],style:{flex:1,marginBottom:0}},b),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":f("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return d(n.name)}})))}function p(e){var t=e.name,n=e.label,a=(0,m.kj)(),i=Array.isArray(t)?t:[t];return l().createElement(r.Form.Item,{label:n},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,m=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){return l().createElement(f,{key:e.key,field:e,listName:i,onRemove:m})}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n({valueType:c.qg})},style:{width:"100%"}},a("Add key-value pairs")))}))}function y(){var e,t,n=(0,m.kj)(),a=r.Form.useFormInstance(),o=r.Form.useWatch(["config","contentType"],a),s=null!=(e=null!=(t=a.getFieldValue(["config","contentType"]))?t:o)?e:c.xh,f=(0,u.xh)(s);return"json"===f?l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableJsonTextArea,{autoSize:{minRows:10},placeholder:n("Input request data")})):"pairs"===f?l().createElement(d,{name:["config","data"],label:n("Body"),addLabel:n("Add key-value pairs"),renderValueInput:function(){return l().createElement(i.WorkflowVariableInput,{placeholder:n("Value")})}}):"multipart"===f?l().createElement(p,{name:["config","data"],label:n("Body")}):l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"application/xml"===s?'<?xml version="1.0" encoding="UTF-8"?>':void 0}))}function b(){var e,t,n,o,s=(0,m.kj)();return e=r.Form.useFormInstance(),t=r.Form.useWatch(["config","contentType"],e),n=(0,a.useRef)(),o=(0,a.useRef)(!1),(0,a.useEffect)(function(){var r,a,l=null!=(r=null!=(a=e.getFieldValue(["config","contentType"]))?a:t)?r:c.xh,i=e.getFieldValue(["config","data"]);if(!o.current){o.current=!0,n.current=l,void 0===i&&e.setFieldValue(["config","data"],(0,u.WN)(l));return}n.current!==l&&e.setFieldValue(["config","data"],(0,u.WN)(l)),n.current=l},[t,e]),l().createElement(l().Fragment,null,l().createElement(r.Form.Item,{name:["config","method"],label:s("HTTP method"),rules:[{required:!0}],initialValue:c.OQ},l().createElement(r.Select,{showSearch:!1,allowClear:!1,options:c.Tm,className:"auto-width"})),l().createElement(r.Form.Item,{name:["config","url"],label:s("URL"),rules:[{required:!0}]},l().createElement(i.WorkflowVariableInput,{placeholder:"https://www.nocobase.com"})),l().createElement(r.Form.Item,{name:["config","contentType"],label:s("Content-Type"),initialValue:c.xh},l().createElement(r.Select,{allowClear:!1,options:c.cf})),l().createElement(d,{name:["config","headers"],label:s("Headers"),addLabel:s("Add request header"),addButtonFullWidth:!0,extra:s('"Content-Type" will be ignored from headers.')}),l().createElement(d,{name:["config","params"],label:s("Parameters"),addLabel:s("Add parameter"),addButtonFullWidth:!0}),l().createElement(y,null),l().createElement(r.Form.Item,{name:["config","timeout"],label:s("Timeout config"),initialValue:c.cS},l().createElement(r.InputNumber,{addonAfter:s("ms"),min:1,step:1e3})),l().createElement(r.Form.Item,{name:["config","onlyData"],valuePropName:"checked",extra:s("If enabled, only the response data will be saved into result, and the status code and headers will be ignored."),initialValue:!0},l().createElement(r.Checkbox,null,s("Only return response data"))),l().createElement(r.Form.Item,{name:["config","ignoreFail"],valuePropName:"checked"},l().createElement(r.Checkbox,null,s("Ignore failed request and continue workflow"))))}}}]);
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-request",["react","antd","@nocobase/plugin-workflow/client-v2","@nocobase/client","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-request"]=t(require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-request"]=t(e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,u){return function(){"use strict";var i,c,a,l={401:function(e,t,n){n.d(t,{LC:function(){return l},OQ:function(){return u},Tm:function(){return r},Un:function(){return f},cS:function(){return a},cf:function(){return o},nd:function(){return s},qg:function(){return c},xh:function(){return i}});var r=["GET","POST","PUT","PATCH","DELETE"].map(function(e){return{label:e,value:e}}),o=["application/json","application/x-www-form-urlencoded","multipart/form-data","application/xml","text/plain"].map(function(e){return{label:e,value:e}}),u="POST",i="application/json",c="text",a=5e3,l=[{label:"Text",value:"text"},{label:"File",value:"file"}],f={"application/json":"json","application/x-www-form-urlencoded":"pairs","multipart/form-data":"multipart","application/xml":"text","text/plain":"text"};function s(e,t){var n,r=t.collectionManager;return!!(null==e?void 0:e.target)&&("attachments"===e.target||(null==r||null==(n=r.getCollection(e.target))?void 0:n.template)==="file")}},488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var u="workflow-request";function i(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[u,"client"],nsMode:"fallback"},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[u,"client"],nsMode:"fallback"},t))}},1:function(e,t,n){n.d(t,{WN:function(){return u},jg:function(){return i},xh:function(){return o}});var r=n(401);function o(e){return r.Un[null!=e?e:"application/json"]}function u(e){switch(null!=e?e:"application/json"){case"application/json":default:return{};case"application/x-www-form-urlencoded":case"multipart/form-data":return[];case"application/xml":case"text/plain":return""}}function i(e,t){return e?null:[{value:"status",label:t("Status code")},{value:"data",label:t("Data")},{value:"headers",label:t("Response headers")}]}},375:function(e){e.exports=o},342:function(e){e.exports=r},694:function(e){e.exports=u},197:function(e){e.exports=n},59:function(e){e.exports=t},155:function(t){t.exports=e}},f={};function s(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+".140661137327023c.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},s.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,u,i=document.getElementsByTagName("script"),c=0;c<i.length;c++){var a=i[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-request:"+n){o=a;break}}o||(u=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-request:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),u&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(b=s.g.location+"");var p,b,d=s.g.document;if(!b&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(b=d.currentScript.src),!b)){var y=d.getElementsByTagName("script");if(y.length)for(var v=y.length-1;v>-1&&(!b||!/^http(s?):/.test(b));)b=y[v--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");s.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i={889:0},s.f.j=function(e,t){var n=s.o(i,e)?i[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),u=Error();s.l(o,function(t){if(s.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],a=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)s.o(u,n)&&(s.m[n]=u[n]);c&&c(s)}for(e&&e(t);a<o.length;a++)r=o[a],s.o(i,r)&&i[r]&&i[r][0](),i[r]=0},(a=self.webpackChunk_nocobase_plugin_workflow_request=self.webpackChunk_nocobase_plugin_workflow_request||[]).forEach(c.bind(null,0)),a.push=c.bind(null,a.push.bind(a));var h={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-request/dist/client/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-request/dist/client/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",u="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var i=window.location.pathname||"/",c=i.indexOf(u);e=c>=0?i.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-request/dist/client/"}s.p=e}(),!function(){s.r(h),s.d(h,{default:function(){return k}});var e=s(342),t=s(155),n=s.n(t),r=s(375),o=s(197),u=s(488),i=s(1);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}var y=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return e=t,n=arguments,e=p(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,d()?Reflect.construct(e,n||[],p(this).constructor):e.apply(this,n))}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e),t}(function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t,i;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return t=o,i=arguments,t=a(t),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,i||[],a(this).constructor):t.apply(this,i)),"type","request"),c(e,"title",(0,u.MZ)("HTTP request")),c(e,"group","extended"),c(e,"description",(0,u.MZ)("Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.")),c(e,"icon",n().createElement(r.GlobalOutlined,null)),c(e,"testable",!0),c(e,"FieldsetLoader",function(){return s.e("305").then(s.bind(s,160)).then(function(e){return{default:e.RequestFieldset}})}),e}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&l(o,e),t=[{key:"useVariables",value:function(e){var t=e.key,n=e.title,r=e.config,o=(0,u.kj)();return{value:t,label:n,children:(0,i.jg)(null==r?void 0:r.onlyData,o)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(o.Instruction));function v(e,t,n,r,o,u,i){try{var c=e[u](i),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function i(e){v(u,r,o,i,c,"next",e)}function c(e){v(u,r,o,i,c,"throw",e)}i(void 0)})}}function g(e,t,n){return(g=j()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&O(o,n.prototype),o}).apply(null,arguments)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return g(e,arguments,m(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,e)})(e)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function x(e,t){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:a(0)}),c(i,"throw",{value:a(1)}),c(i,"return",{value:a(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return u.label++,{value:l[1],done:!1};case 5:u.label++,r=l[1],l=[0];continue;case 7:l=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){u=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){u.label=l[1];break}if(6===l[0]&&u.label<o[1]){u.label=o[1],o=l;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(l);break}o[2]&&u.ops.pop(),u.trys.pop();continue}l=t.call(e,u)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var k=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=m(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(e,t||[],m(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&O(n,e),t=[{key:"afterAdd",value:function(){return w(function(){return x(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return w(function(){return x(this,function(e){return[2]})})()}},{key:"load",value:function(){return w(function(){return x(this,function(e){return this.app.pm.get("workflow").registerInstruction("request",y),[2]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(_(e.Plugin))}(),h}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-request",["react","antd","@nocobase/plugin-workflow/client-v2","@nocobase/client","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-request"]=t(require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-request"]=t(e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,u){return function(){"use strict";var i,c,a,l={401:function(e,t,n){n.d(t,{LC:function(){return l},OQ:function(){return u},Tm:function(){return r},Un:function(){return f},cS:function(){return a},cf:function(){return o},nd:function(){return s},qg:function(){return c},xh:function(){return i}});var r=["GET","POST","PUT","PATCH","DELETE"].map(function(e){return{label:e,value:e}}),o=["application/json","application/x-www-form-urlencoded","multipart/form-data","application/xml","text/plain"].map(function(e){return{label:e,value:e}}),u="POST",i="application/json",c="text",a=5e3,l=[{label:"Text",value:"text"},{label:"File",value:"file"}],f={"application/json":"json","application/x-www-form-urlencoded":"pairs","multipart/form-data":"multipart","application/xml":"text","text/plain":"text"};function s(e,t){var n,r=t.collectionManager;return!!(null==e?void 0:e.target)&&("attachments"===e.target||(null==r||null==(n=r.getCollection(e.target))?void 0:n.template)==="file")}},488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var u="workflow-request";function i(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[u,"client"],nsMode:"fallback"},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[u,"client"],nsMode:"fallback"},t))}},1:function(e,t,n){n.d(t,{WN:function(){return u},jg:function(){return i},xh:function(){return o}});var r=n(401);function o(e){return r.Un[null!=e?e:"application/json"]}function u(e){switch(null!=e?e:"application/json"){case"application/json":default:return{};case"application/x-www-form-urlencoded":case"multipart/form-data":return[];case"application/xml":case"text/plain":return""}}function i(e,t){return e?null:[{value:"status",label:t("Status code")},{value:"data",label:t("Data")},{value:"headers",label:t("Response headers")}]}},375:function(e){e.exports=o},342:function(e){e.exports=r},694:function(e){e.exports=u},197:function(e){e.exports=n},59:function(e){e.exports=t},155:function(t){t.exports=e}},f={};function s(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+".6d5dddb8384cfff9.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},s.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,u,i=document.getElementsByTagName("script"),c=0;c<i.length;c++){var a=i[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-request:"+n){o=a;break}}o||(u=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-request:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),u&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(b=s.g.location+"");var p,b,d=s.g.document;if(!b&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(b=d.currentScript.src),!b)){var y=d.getElementsByTagName("script");if(y.length)for(var v=y.length-1;v>-1&&(!b||!/^http(s?):/.test(b));)b=y[v--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");s.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i={889:0},s.f.j=function(e,t){var n=s.o(i,e)?i[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),u=Error();s.l(o,function(t){if(s.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],a=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)s.o(u,n)&&(s.m[n]=u[n]);c&&c(s)}for(e&&e(t);a<o.length;a++)r=o[a],s.o(i,r)&&i[r]&&i[r][0](),i[r]=0},(a=self.webpackChunk_nocobase_plugin_workflow_request=self.webpackChunk_nocobase_plugin_workflow_request||[]).forEach(c.bind(null,0)),a.push=c.bind(null,a.push.bind(a));var h={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-request/dist/client/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-request/dist/client/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",u="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var i=window.location.pathname||"/",c=i.indexOf(u);e=c>=0?i.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-request/dist/client/"}s.p=e}(),!function(){s.r(h),s.d(h,{default:function(){return k}});var e=s(342),t=s(155),n=s.n(t),r=s(375),o=s(197),u=s(488),i=s(1);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}var y=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return e=t,n=arguments,e=p(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,d()?Reflect.construct(e,n||[],p(this).constructor):e.apply(this,n))}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e),t}(function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t,i;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return t=o,i=arguments,t=a(t),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,i||[],a(this).constructor):t.apply(this,i)),"type","request"),c(e,"title",(0,u.MZ)("HTTP request")),c(e,"group","extended"),c(e,"description",(0,u.MZ)("Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.")),c(e,"icon",n().createElement(r.GlobalOutlined,null)),c(e,"testable",!0),c(e,"FieldsetLoader",function(){return s.e("305").then(s.bind(s,160)).then(function(e){return{default:e.RequestFieldset}})}),e}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&l(o,e),t=[{key:"useVariables",value:function(e){var t=e.key,n=e.title,r=e.config,o=(0,u.kj)();return{value:t,label:n,children:(0,i.jg)(null==r?void 0:r.onlyData,o)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(o.Instruction));function v(e,t,n,r,o,u,i){try{var c=e[u](i),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function i(e){v(u,r,o,i,c,"next",e)}function c(e){v(u,r,o,i,c,"throw",e)}i(void 0)})}}function g(e,t,n){return(g=j()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&O(o,n.prototype),o}).apply(null,arguments)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return g(e,arguments,m(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,e)})(e)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function x(e,t){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:a(0)}),c(i,"throw",{value:a(1)}),c(i,"return",{value:a(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return u.label++,{value:l[1],done:!1};case 5:u.label++,r=l[1],l=[0];continue;case 7:l=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){u=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){u.label=l[1];break}if(6===l[0]&&u.label<o[1]){u.label=o[1],o=l;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(l);break}o[2]&&u.ops.pop(),u.trys.pop();continue}l=t.call(e,u)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var k=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=m(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(e,t||[],m(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&O(n,e),t=[{key:"afterAdd",value:function(){return w(function(){return x(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return w(function(){return x(this,function(e){return[2]})})()}},{key:"load",value:function(){return w(function(){return x(this,function(e){return this.app.pm.get("workflow").registerInstruction("request",y),[2]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(_(e.Plugin))}(),h}()});
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_workflow_request_client_v2=self.webpackChunk_nocobase_plugin_workflow_request_client_v2||[]).push([["305"],{160:function(e,t,n){n.d(t,{RequestFieldset:function(){return b}});var r=n(440),a=n(155),l=n.n(a),o=n(375),i=n(197),c=n(401),m=n(488),u=n(1);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){var t=e.name,n=e.label,a=e.addLabel,c=e.addButtonFullWidth,u=void 0!==c&&c,s=e.extra,d=e.valueName,f=void 0===d?"value":d,p=e.renderValueInput,y=(0,m.kj)();return l().createElement(r.Form.Item,{label:n,extra:s},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,c=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){var t;return l().createElement(r.Flex,{key:e.key,align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[e.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:y("Name")})),l().createElement(r.Form.Item,{name:[e.name,f],style:{flex:1,marginBottom:0}},null!=(t=null==p?void 0:p(e))?t:l().createElement(i.WorkflowVariableInput,{placeholder:y("Value")})),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":y("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return c(e.name)}})))}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n()},style:u?{width:"100%"}:{alignSelf:"flex-start"}},a))}))}function f(e){var t,n=e.field,u=e.listName,d=e.onRemove,f=(0,m.kj)(),p=r.Form.useFormInstance(),y=null!=(t=r.Form.useWatch(((function(e){if(Array.isArray(e))return s(e)})(u)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n.name,"valueType"]),p))?t:c.qg,b=(0,a.useMemo)(function(){return"file"===y?l().createElement(i.WorkflowVariableInput,{variableOptions:{types:[c.nd]}}):l().createElement(i.WorkflowVariableInput,{placeholder:f("Value")})},[f,y]),g="file"===y?"file":"text";return l().createElement(r.Flex,{align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[n.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:f("Name")})),l().createElement(r.Form.Item,{name:[n.name,"valueType"],initialValue:c.qg,style:{marginBottom:0}},l().createElement(r.Select,{allowClear:!1,options:c.LC.map(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={label:f(e.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})})),l().createElement(r.Form.Item,{key:"".concat(n.key,"-").concat(g),name:[n.name,g],style:{flex:1,marginBottom:0}},b),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":f("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return d(n.name)}})))}function p(e){var t=e.name,n=e.label,a=(0,m.kj)(),i=Array.isArray(t)?t:[t];return l().createElement(r.Form.Item,{label:n},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,m=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){return l().createElement(f,{key:e.key,field:e,listName:i,onRemove:m})}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n({valueType:c.qg})},style:{width:"100%"}},a("Add key-value pairs")))}))}function y(){var e,t,n=(0,m.kj)(),a=r.Form.useFormInstance(),o=r.Form.useWatch(["config","contentType"],a),s=null!=(e=null!=(t=a.getFieldValue(["config","contentType"]))?t:o)?e:c.xh,f=(0,u.xh)(s);return"json"===f?l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableJsonTextArea,{autoSize:{minRows:10},placeholder:n("Input request data")})):"pairs"===f?l().createElement(d,{name:["config","data"],label:n("Body"),addLabel:n("Add key-value pairs"),renderValueInput:function(){return l().createElement(i.WorkflowVariableInput,{placeholder:n("Value")})}}):"multipart"===f?l().createElement(p,{name:["config","data"],label:n("Body")}):l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"application/xml"===s?'<?xml version="1.0" encoding="UTF-8"?>':void 0}))}function b(){var e,t,n,o,s=(0,m.kj)();return e=r.Form.useFormInstance(),t=r.Form.useWatch(["config","contentType"],e),n=(0,a.useRef)(),o=(0,a.useRef)(!1),(0,a.useEffect)(function(){var r,a,l=null!=(r=null!=(a=e.getFieldValue(["config","contentType"]))?a:t)?r:c.xh,i=e.getFieldValue(["config","data"]);if(!o.current){o.current=!0,n.current=l,void 0===i&&e.setFieldValue(["config","data"],(0,u.WN)(l));return}n.current!==l&&e.setFieldValue(["config","data"],(0,u.WN)(l)),n.current=l},[t,e]),l().createElement(l().Fragment,null,l().createElement(r.Form.Item,{name:["config","method"],label:s("HTTP method"),rules:[{required:!0}],initialValue:c.OQ},l().createElement(r.Select,{showSearch:!1,allowClear:!1,options:c.Tm,className:"auto-width"})),l().createElement(r.Form.Item,{name:["config","url"],label:s("URL"),rules:[{required:!0}]},l().createElement(i.WorkflowVariableInput,{placeholder:"https://www.nocobase.com"})),l().createElement(r.Form.Item,{name:["config","contentType"],label:s("Content-Type"),initialValue:c.xh},l().createElement(r.Select,{allowClear:!1,options:c.cf})),l().createElement(d,{name:["config","headers"],label:s("Headers"),addLabel:s("Add request header"),addButtonFullWidth:!0,extra:s('"Content-Type" will be ignored from headers.')}),l().createElement(d,{name:["config","params"],label:s("Parameters"),addLabel:s("Add parameter"),addButtonFullWidth:!0}),l().createElement(y,null),l().createElement(r.Form.Item,{name:["config","timeout"],label:s("Timeout config"),initialValue:c.cS},l().createElement(r.InputNumber,{addonAfter:s("ms"),min:1,step:1e3
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_request_client_v2=self.webpackChunk_nocobase_plugin_workflow_request_client_v2||[]).push([["305"],{160:function(e,t,n){n.d(t,{RequestFieldset:function(){return b}});var r=n(440),a=n(155),l=n.n(a),o=n(375),i=n(197),c=n(401),m=n(488),u=n(1);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){var t=e.name,n=e.label,a=e.addLabel,c=e.addButtonFullWidth,u=void 0!==c&&c,s=e.extra,d=e.valueName,f=void 0===d?"value":d,p=e.renderValueInput,y=(0,m.kj)();return l().createElement(r.Form.Item,{label:n,extra:s},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,c=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){var t;return l().createElement(r.Flex,{key:e.key,align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[e.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:y("Name")})),l().createElement(r.Form.Item,{name:[e.name,f],style:{flex:1,marginBottom:0}},null!=(t=null==p?void 0:p(e))?t:l().createElement(i.WorkflowVariableInput,{placeholder:y("Value")})),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":y("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return c(e.name)}})))}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n()},style:u?{width:"100%"}:{alignSelf:"flex-start"}},a))}))}function f(e){var t,n=e.field,u=e.listName,d=e.onRemove,f=(0,m.kj)(),p=r.Form.useFormInstance(),y=null!=(t=r.Form.useWatch(((function(e){if(Array.isArray(e))return s(e)})(u)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n.name,"valueType"]),p))?t:c.qg,b=(0,a.useMemo)(function(){return"file"===y?l().createElement(i.WorkflowVariableInput,{variableOptions:{types:[c.nd]}}):l().createElement(i.WorkflowVariableInput,{placeholder:f("Value")})},[f,y]),g="file"===y?"file":"text";return l().createElement(r.Flex,{align:"flex-start",gap:"small",style:{width:"100%"}},l().createElement(r.Form.Item,{name:[n.name,"name"],style:{flex:1,marginBottom:0}},l().createElement(r.Input,{placeholder:f("Name")})),l().createElement(r.Form.Item,{name:[n.name,"valueType"],initialValue:c.qg,style:{marginBottom:0}},l().createElement(r.Select,{allowClear:!1,options:c.LC.map(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={label:f(e.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})})),l().createElement(r.Form.Item,{key:"".concat(n.key,"-").concat(g),name:[n.name,g],style:{flex:1,marginBottom:0}},b),l().createElement(r.Form.Item,{style:{marginBottom:0}},l().createElement(r.Button,{"aria-label":f("Delete"),icon:l().createElement(o.DeleteOutlined,null),onClick:function(){return d(n.name)}})))}function p(e){var t=e.name,n=e.label,a=(0,m.kj)(),i=Array.isArray(t)?t:[t];return l().createElement(r.Form.Item,{label:n},l().createElement(r.Form.List,{name:t},function(e,t){var n=t.add,m=t.remove;return l().createElement(r.Space,{direction:"vertical",style:{display:"flex"}},e.map(function(e){return l().createElement(f,{key:e.key,field:e,listName:i,onRemove:m})}),l().createElement(r.Button,{icon:l().createElement(o.PlusOutlined,null),onClick:function(){return n({valueType:c.qg})},style:{width:"100%"}},a("Add key-value pairs")))}))}function y(){var e,t,n=(0,m.kj)(),a=r.Form.useFormInstance(),o=r.Form.useWatch(["config","contentType"],a),s=null!=(e=null!=(t=a.getFieldValue(["config","contentType"]))?t:o)?e:c.xh,f=(0,u.xh)(s);return"json"===f?l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableJsonTextArea,{autoSize:{minRows:10},placeholder:n("Input request data")})):"pairs"===f?l().createElement(d,{name:["config","data"],label:n("Body"),addLabel:n("Add key-value pairs"),renderValueInput:function(){return l().createElement(i.WorkflowVariableInput,{placeholder:n("Value")})}}):"multipart"===f?l().createElement(p,{name:["config","data"],label:n("Body")}):l().createElement(r.Form.Item,{name:["config","data"],label:n("Body"),initialValue:(0,u.WN)(s)},l().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"application/xml"===s?'<?xml version="1.0" encoding="UTF-8"?>':void 0}))}function b(){var e,t,n,o,s=(0,m.kj)();return e=r.Form.useFormInstance(),t=r.Form.useWatch(["config","contentType"],e),n=(0,a.useRef)(),o=(0,a.useRef)(!1),(0,a.useEffect)(function(){var r,a,l=null!=(r=null!=(a=e.getFieldValue(["config","contentType"]))?a:t)?r:c.xh,i=e.getFieldValue(["config","data"]);if(!o.current){o.current=!0,n.current=l,void 0===i&&e.setFieldValue(["config","data"],(0,u.WN)(l));return}n.current!==l&&e.setFieldValue(["config","data"],(0,u.WN)(l)),n.current=l},[t,e]),l().createElement(l().Fragment,null,l().createElement(r.Form.Item,{name:["config","method"],label:s("HTTP method"),rules:[{required:!0}],initialValue:c.OQ},l().createElement(r.Select,{showSearch:!1,allowClear:!1,options:c.Tm,className:"auto-width"})),l().createElement(r.Form.Item,{name:["config","url"],label:s("URL"),rules:[{required:!0}]},l().createElement(i.WorkflowVariableInput,{placeholder:"https://www.nocobase.com"})),l().createElement(r.Form.Item,{name:["config","contentType"],label:s("Content-Type"),initialValue:c.xh},l().createElement(r.Select,{allowClear:!1,options:c.cf})),l().createElement(d,{name:["config","headers"],label:s("Headers"),addLabel:s("Add request header"),addButtonFullWidth:!0,extra:s('"Content-Type" will be ignored from headers.')}),l().createElement(d,{name:["config","params"],label:s("Parameters"),addLabel:s("Add parameter"),addButtonFullWidth:!0}),l().createElement(y,null),l().createElement(r.Form.Item,{name:["config","timeout"],label:s("Timeout config"),initialValue:c.cS},l().createElement(r.InputNumber,{addonAfter:s("ms"),min:1,step:1e3})),l().createElement(r.Form.Item,{name:["config","onlyData"],valuePropName:"checked",extra:s("If enabled, only the response data will be saved into result, and the status code and headers will be ignored."),initialValue:!0},l().createElement(r.Checkbox,null,s("Only return response data"))),l().createElement(r.Form.Item,{name:["config","ignoreFail"],valuePropName:"checked"},l().createElement(r.Checkbox,null,s("Ignore failed request and continue workflow"))))}}}]);
|
package/dist/client-v2/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-request/client-v2",["@nocobase/client-v2","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-request/client-v2"]=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-request/client-v2"]=t(e["@nocobase/client-v2"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var u,a,c,l={401:function(e,t,n){n.d(t,{LC:function(){return l},OQ:function(){return i},Tm:function(){return r},Un:function(){return f},cS:function(){return c},cf:function(){return o},nd:function(){return s},qg:function(){return a},xh:function(){return u}});var r=["GET","POST","PUT","PATCH","DELETE"].map(function(e){return{label:e,value:e}}),o=["application/json","application/x-www-form-urlencoded","multipart/form-data","application/xml","text/plain"].map(function(e){return{label:e,value:e}}),i="POST",u="application/json",a="text",c=5e3,l=[{label:"Text",value:"text"},{label:"File",value:"file"}],f={"application/json":"json","application/x-www-form-urlencoded":"pairs","multipart/form-data":"multipart","application/xml":"text","text/plain":"text"};function s(e,t){var n,r=t.collectionManager;return!!(null==e?void 0:e.target)&&("attachments"===e.target||(null==r||null==(n=r.getCollection(e.target))?void 0:n.template)==="file")}},488:function(e,t,n){n.d(t,{MZ:function(){return a},kj:function(){return u}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="workflow-request";function u(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"client"],nsMode:"fallback"},n))}}function a(e,t){return(0,r.tExpr)(e,o({ns:[i,"client"],nsMode:"fallback"},t))}},1:function(e,t,n){n.d(t,{WN:function(){return i},jg:function(){return u},xh:function(){return o}});var r=n(401);function o(e){return r.Un[null!=e?e:"application/json"]}function i(e){switch(null!=e?e:"application/json"){case"application/json":default:return{};case"application/x-www-form-urlencoded":case"multipart/form-data":return[];case"application/xml":case"text/plain":return""}}function u(e,t){return e?null:[{value:"status",label:t("Status code")},{value:"data",label:t("Data")},{value:"headers",label:t("Response headers")}]}},375:function(e){e.exports=o},485:function(t){t.exports=e},694:function(e){e.exports=i},197:function(e){e.exports=r},440:function(e){e.exports=n},155:function(e){e.exports=t}},f={};function s(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+".4d97590a17776080.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},s.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),a=0;a<u.length;a++){var c=u[a];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-workflow-request/client-v2:"+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-request/client-v2:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(b=s.g.location+"");var p,b,d=s.g.document;if(!b&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(b=d.currentScript.src),!b)){var v=d.getElementsByTagName("script");if(v.length)for(var y=v.length-1;y>-1&&(!b||!/^http(s?):/.test(b));)b=v[y--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");s.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},s.f.j=function(e,t){var n=s.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=u[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),i=Error();s.l(o,function(t){if(s.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},a=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],c=0;if(o.some(function(e){return 0!==u[e]})){for(n in i)s.o(i,n)&&(s.m[n]=i[n]);a&&a(s)}for(e&&e(t);c<o.length;c++)r=o[c],s.o(u,r)&&u[r]&&u[r][0](),u[r]=0},(c=self.webpackChunk_nocobase_plugin_workflow_request_client_v2=self.webpackChunk_nocobase_plugin_workflow_request_client_v2||[]).forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c));var h={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",a=u.indexOf(i);e=a>=0?u.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/"}s.p=e}(),!function(){s.r(h),s.d(h,{default:function(){return m}});var e=s(485),t=s(155),n=s.n(t),r=s(375),o=s(197),i=s(488),u=s(1);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t,u;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return t=o,u=arguments,t=c(t),a(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,u||[],c(this).constructor):t.apply(this,u)),"type","request"),a(e,"title",(0,i.MZ)("HTTP request")),a(e,"group","extended"),a(e,"description",(0,i.MZ)("Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.")),a(e,"icon",n().createElement(r.GlobalOutlined,null)),a(e,"testable",!0),a(e,"FieldsetLoader",function(){return s.e("305").then(s.bind(s,160)).then(function(e){return{default:e.RequestFieldset}})}),e}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&l(o,e),t=[{key:"useVariables",value:function(e){var t=e.key,n=e.title,r=e.config,o=(0,i.kj)();return{value:t,label:n,children:(0,u.jg)(null==r?void 0:r.onlyData,o)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(o.Instruction);function b(e,t,n,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function d(e,t,n){return(d=g()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&y(o,n.prototype),o}).apply(null,arguments)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t="function"==typeof Map?new Map:void 0;return(w=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)})(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var m=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=v(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,g()?Reflect.construct(e,t||[],v(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&y(n,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(u,"next",{value:c(0)}),a(u,"throw",{value:c(1)}),a(u,"return",{value:c(2)}),"function"==typeof Symbol&&a(u,Symbol.iterator,{value:function(){return this}}),u;function c(a){return function(c){var l=[a,c];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return null==(t=this.app.pm.get("workflow"))||null==(e=t.registerInstruction)||e.call(t,"request",p),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){b(i,r,o,u,a,"next",e)}function a(e){b(i,r,o,u,a,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(w(e.Plugin))}(),h}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-request/client-v2",["@nocobase/client-v2","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-request/client-v2"]=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-workflow-request/client-v2"]=t(e["@nocobase/client-v2"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var u,c,a,l={401:function(e,t,n){n.d(t,{LC:function(){return l},OQ:function(){return i},Tm:function(){return r},Un:function(){return f},cS:function(){return a},cf:function(){return o},nd:function(){return s},qg:function(){return c},xh:function(){return u}});var r=["GET","POST","PUT","PATCH","DELETE"].map(function(e){return{label:e,value:e}}),o=["application/json","application/x-www-form-urlencoded","multipart/form-data","application/xml","text/plain"].map(function(e){return{label:e,value:e}}),i="POST",u="application/json",c="text",a=5e3,l=[{label:"Text",value:"text"},{label:"File",value:"file"}],f={"application/json":"json","application/x-www-form-urlencoded":"pairs","multipart/form-data":"multipart","application/xml":"text","text/plain":"text"};function s(e,t){var n,r=t.collectionManager;return!!(null==e?void 0:e.target)&&("attachments"===e.target||(null==r||null==(n=r.getCollection(e.target))?void 0:n.template)==="file")}},488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return u}});var r=n(694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i="workflow-request";function u(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:[i,"client"],nsMode:"fallback"},n))}}function c(e,t){return(0,r.tExpr)(e,o({ns:[i,"client"],nsMode:"fallback"},t))}},1:function(e,t,n){n.d(t,{WN:function(){return i},jg:function(){return u},xh:function(){return o}});var r=n(401);function o(e){return r.Un[null!=e?e:"application/json"]}function i(e){switch(null!=e?e:"application/json"){case"application/json":default:return{};case"application/x-www-form-urlencoded":case"multipart/form-data":return[];case"application/xml":case"text/plain":return""}}function u(e,t){return e?null:[{value:"status",label:t("Status code")},{value:"data",label:t("Data")},{value:"headers",label:t("Response headers")}]}},375:function(e){e.exports=o},485:function(t){t.exports=e},694:function(e){e.exports=i},197:function(e){e.exports=r},440:function(e){e.exports=n},155:function(e){e.exports=t}},f={};function s(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+".c4ca9d4192f043c3.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},s.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-workflow-request/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-workflow-request/client-v2:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(b=s.g.location+"");var p,b,d=s.g.document;if(!b&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(b=d.currentScript.src),!b)){var v=d.getElementsByTagName("script");if(v.length)for(var y=v.length-1;y>-1&&(!b||!/^http(s?):/.test(b));)b=v[y--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");s.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},s.f.j=function(e,t){var n=s.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=u[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),i=Error();s.l(o,function(t){if(s.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},c=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],a=0;if(o.some(function(e){return 0!==u[e]})){for(n in i)s.o(i,n)&&(s.m[n]=i[n]);c&&c(s)}for(e&&e(t);a<o.length;a++)r=o[a],s.o(u,r)&&u[r]&&u[r][0](),u[r]=0},(a=self.webpackChunk_nocobase_plugin_workflow_request_client_v2=self.webpackChunk_nocobase_plugin_workflow_request_client_v2||[]).forEach(c.bind(null,0)),a.push=c.bind(null,a.push.bind(a));var h={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",c=u.indexOf(i);e=c>=0?u.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-request/dist/client-v2/"}s.p=e}(),!function(){s.r(h),s.d(h,{default:function(){return m}});var e=s(485),t=s(155),n=s.n(t),r=s(375),o=s(197),i=s(488),u=s(1);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t,u;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return t=o,u=arguments,t=a(t),c(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,u||[],a(this).constructor):t.apply(this,u)),"type","request"),c(e,"title",(0,i.MZ)("HTTP request")),c(e,"group","extended"),c(e,"description",(0,i.MZ)("Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.")),c(e,"icon",n().createElement(r.GlobalOutlined,null)),c(e,"testable",!0),c(e,"FieldsetLoader",function(){return s.e("305").then(s.bind(s,160)).then(function(e){return{default:e.RequestFieldset}})}),e}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&l(o,e),t=[{key:"useVariables",value:function(e){var t=e.key,n=e.title,r=e.config,o=(0,i.kj)();return{value:t,label:n,children:(0,u.jg)(null==r?void 0:r.onlyData,o)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(o.Instruction);function b(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function d(e,t,n){return(d=g()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&y(o,n.prototype),o}).apply(null,arguments)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t="function"==typeof Map?new Map:void 0;return(w=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)})(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var m=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=v(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,g()?Reflect.construct(e,t||[],v(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&y(n,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return null==(t=this.app.pm.get("workflow"))||null==(e=t.registerInstruction)||e.call(t,"request",p),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){b(i,r,o,u,c,"next",e)}function c(e){b(i,r,o,u,c,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(w(e.Plugin))}(),h}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.2.0-alpha.
|
|
12
|
-
"@nocobase/plugin-workflow": "2.2.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.2.0-alpha.5",
|
|
12
|
+
"@nocobase/plugin-workflow": "2.2.0-alpha.5",
|
|
13
13
|
"react": "18.2.0",
|
|
14
14
|
"@ant-design/icons": "5.6.1",
|
|
15
|
-
"@nocobase/flow-engine": "2.2.0-alpha.
|
|
16
|
-
"@nocobase/client-v2": "2.2.0-alpha.
|
|
15
|
+
"@nocobase/flow-engine": "2.2.0-alpha.5",
|
|
16
|
+
"@nocobase/client-v2": "2.2.0-alpha.5",
|
|
17
17
|
"react-i18next": "11.18.6",
|
|
18
|
-
"@nocobase/server": "2.2.0-alpha.
|
|
18
|
+
"@nocobase/server": "2.2.0-alpha.5",
|
|
19
19
|
"axios": "1.7.7",
|
|
20
20
|
"lodash": "4.18.1",
|
|
21
|
-
"@nocobase/plugin-file-manager": "2.2.0-alpha.
|
|
22
|
-
"@nocobase/utils": "2.2.0-alpha.
|
|
21
|
+
"@nocobase/plugin-file-manager": "2.2.0-alpha.5",
|
|
22
|
+
"@nocobase/utils": "2.2.0-alpha.5",
|
|
23
23
|
"antd": "5.24.2"
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-
|
|
1
|
+
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-04T02:11:24.475Z"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Send HTTP requests to any HTTP service for data interaction in workflow.",
|
|
7
7
|
"description.ru-RU": "Отправляет HTTP-запросы к любому HTTP-сервису для взаимодействия с данными в рабочем процессе.",
|
|
8
8
|
"description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。",
|
|
9
|
-
"version": "2.2.0-alpha.
|
|
9
|
+
"version": "2.2.0-alpha.5",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow-request",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@nocobase/server": "2.x",
|
|
29
29
|
"@nocobase/test": "2.x"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "814ff497dd1233ca7218c9f7f2a016c2ead6516d",
|
|
32
32
|
"keywords": [
|
|
33
33
|
"Workflow"
|
|
34
34
|
]
|