@nocobase/plugin-workflow-mailer 2.1.0-alpha.12 → 2.1.0-alpha.14
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/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("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@nocobase/plugin-workflow/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["react","react-i18next","@nocobase/client","@ant-design/icons","@formily/antd-v5","@nocobase/plugin-workflow/client"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("react"),require("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@nocobase/plugin-workflow/client")):e["@nocobase/plugin-workflow-mailer"]=t(e.react,e["react-i18next"],e["@nocobase/client"],e["@ant-design/icons"],e["@formily/antd-v5"],e["@nocobase/plugin-workflow/client"])}(self,function(e,t,o,r,n,i){return function(){"use strict";var a={375:function(e){e.exports=r},418:function(e){e.exports=n},342:function(e){e.exports=o},990:function(e){e.exports=i},155:function(t){t.exports=e},953:function(e){e.exports=t}},c={};function p(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return a[e](o,o.exports,p),o.exports}p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var o in t)p.o(t,o)&&!p.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(s=p.g.location+"");var s,l=p.g.document;if(!s&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(s=l.currentScript.src),!s)){var u=l.getElementsByTagName("script");if(u.length)for(var f=u.length-1;f>-1&&(!s||!/^http(s?):/.test(s));)s=u[f--].src}if(!s)throw Error("Automatic publicPath is not supported in this browser");p.p=s.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var m={},d=window.__nocobase_public_path__||"";if(!d&&window.location&&window.location.pathname){var y=window.location.pathname||"/",x=y.indexOf("/v2/");d=x>=0?y.slice(0,x+1):"/"}return d&&(d=d.replace(/\/v2\/?$/,"/")),d||(d="/"),"/"!==d.charAt(d.length-1)&&(d+="/"),p.p=d+"static/plugins/@nocobase/plugin-workflow-mailer/dist/client/",!function(){p.r(m),p.d(m,{default:function(){return O}});var e=p(342),t=p(375),o=p(418),r=p(155),n=p.n(r),i=p(990);p(953);var a="workflow-mailer";function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function s(e){return(s=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 u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function f(){var e,t,o=(e=["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return f=function(){return o},o}var d=(0,e.css)(f()),y=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function p(){var r,l,f;if(!(this instanceof p))throw TypeError("Cannot call a class as a function");return l=p,f=arguments,l=s(l),c(r=function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(l,f||[],s(this).constructor):l.apply(this,f)),"title",'{{t("Mailer", { ns: "'.concat(a,'" })}}')),c(r,"type","mailer"),c(r,"group","extended"),c(r,"description",'{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "'.concat(a,'" })}}')),c(r,"icon",n().createElement(t.MailOutlined,{style:{}})),c(r,"fieldset",{provider:{type:"object",properties:{server:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{host:{type:"void","x-component":"Grid.Col","x-component-props":{width:50},properties:{host:{type:"string",required:!0,title:'{{t("SMTP host", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"smtp.example.com"}]]}}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{port:{type:"number",required:!0,title:'{{t("Port", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["number",{min:1,max:65535,step:1}]]},default:465}}},secure:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{secure:{type:"boolean",title:'{{t("Secure", { ns: "'.concat(a,'" })}}'),description:'{{t("In most cases, if using port 465, set it to true; otherwise, set it to false.", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["boolean",{style:{width:"100%"}}]]},default:!0}}}}}}},auth:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{user:{type:"void","x-component":"Grid.Col",properties:{"auth.user":{type:"string",title:'{{t("User", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"example@domain.com"}]]}}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",title:'{{t("Password", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{type:"password"}]]}}}}}}}}}},from:{type:"string",required:!0,title:'{{t("From", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"noreply <example@domain.com>"}]]}},to:{type:"array",required:!0,title:'{{t("To", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:d},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:d},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:d},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(a,'" })}}'),"x-component":"ArrayItems.Addition"}}},subject:{type:"string",title:'{{t("Subject", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:'{{t("Content type", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text", { ns: "'.concat(a,'" })}}'),value:"text"}],default:"html"},html:{type:"string",title:'{{t("Content", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",title:'{{t("Content", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]},ignoreFail:{type:"boolean","x-content":'{{t("Ignore failed sending and continue workflow", { ns: "'.concat(a,'" })}}'),"x-decorator":"FormItem","x-component":"Checkbox"}}),c(r,"components",{ArrayItems:o.ArrayItems,SchemaComponentContext:e.SchemaComponentContext,WorkflowVariableInput:i.WorkflowVariableInput,WorkflowVariableTextArea:i.WorkflowVariableTextArea,WorkflowVariableRawTextArea:i.WorkflowVariableRawTextArea}),r}return p.prototype=Object.create(r&&r.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),r&&l(p,r),p}(i.Instruction);function x(e,t,o,r,n,i,a){try{var c=e[i](a),p=c.value}catch(e){o(e);return}c.done?t(p):Promise.resolve(p).then(r,n)}function b(e){return function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function a(e){x(i,r,n,a,c,"next",e)}function c(e){x(i,r,n,a,c,"throw",e)}a(void 0)})}}function v(e,t,o){return(v=I()?Reflect.construct:function(e,t,o){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return o&&w(n,o.prototype),n}).apply(null,arguments)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t="function"==typeof Map?new Map:void 0;return(g=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,o)}function o(){return v(e,arguments,h(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),w(o,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function k(e,t){var o,r,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:p(0)}),c(a,"throw",{value:p(1)}),c(a,"return",{value:p(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function p(c){return function(p){var s=[c,p];if(o)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(6===s[0]&&i.label<n[1]){i.label=n[1],n=s;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(s);break}n[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{o=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}var O=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;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=h(e),function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,I()?Reflect.construct(e,t||[],h(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&w(o,e),t=[{key:"afterAdd",value:function(){return b(function(){return k(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return b(function(){return k(this,function(e){return[2]})})()}},{key:"load",value:function(){return b(function(){return k(this,function(e){return this.app.pm.get("workflow").registerInstruction("mailer",y),[2]})}).call(this)}}],function(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(g(e.Plugin))}(),m}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-mailer",["react","react-i18next","@nocobase/client","@ant-design/icons","@nocobase/plugin-workflow/client","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-mailer"]=t(require("react"),require("react-i18next"),require("@nocobase/client"),require("@ant-design/icons"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5")):e["@nocobase/plugin-workflow-mailer"]=t(e.react,e["react-i18next"],e["@nocobase/client"],e["@ant-design/icons"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"])}(self,function(e,t,o,r,n,i){return function(){"use strict";var c={375:function(e){e.exports=r},418:function(e){e.exports=i},342:function(e){e.exports=o},990:function(e){e.exports=n},155:function(t){t.exports=e},953:function(e){e.exports=t}},a={};function p(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return c[e](o,o.exports,p),o.exports}p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var o in t)p.o(t,o)&&!p.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(l=p.g.location+"");var l,s=p.g.document;if(!l&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(l=s.currentScript.src),!l)){var u=s.getElementsByTagName("script");if(u.length)for(var f=u.length-1;f>-1&&(!l||!/^http(s?):/.test(l));)l=u[f--].src}if(!l)throw Error("Automatic publicPath is not supported in this browser");p.p=l.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var d={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var o=window.__webpack_public_path__||"";o&&("/"!==o.charAt(o.length-1)&&(o+="/"),e=o+"static/plugins/@nocobase/plugin-workflow-mailer/dist/client/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",n=r.indexOf("/v2/");e=n>=0?r.slice(0,n+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-workflow-mailer/dist/client/"}p.p=e}(),!function(){p.r(d),p.d(d,{default:function(){return O}});var e=p(342),t=p(375),o=p(418),r=p(155),n=p.n(r),i=p(990);p(953);var c="workflow-mailer";function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function f(){var e,t,o=(e=["\n width: 100%;\n\n .ant-space-item:nth-child(2) {\n flex-grow: 1;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return f=function(){return o},o}var m=(0,e.css)(f()),y=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function p(){var r,s,f;if(!(this instanceof p))throw TypeError("Cannot call a class as a function");return s=p,f=arguments,s=l(s),a(r=function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(s,f||[],l(this).constructor):s.apply(this,f)),"title",'{{t("Mailer", { ns: "'.concat(c,'" })}}')),a(r,"type","mailer"),a(r,"group","extended"),a(r,"description",'{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "'.concat(c,'" })}}')),a(r,"icon",n().createElement(t.MailOutlined,{style:{}})),a(r,"fieldset",{provider:{type:"object",properties:{server:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{host:{type:"void","x-component":"Grid.Col","x-component-props":{width:50},properties:{host:{type:"string",required:!0,title:'{{t("SMTP host", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"smtp.example.com"}]]}}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{port:{type:"number",required:!0,title:'{{t("Port", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["number",{min:1,max:65535,step:1}]]},default:465}}},secure:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{secure:{type:"boolean",title:'{{t("Secure", { ns: "'.concat(c,'" })}}'),description:'{{t("In most cases, if using port 465, set it to true; otherwise, set it to false.", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["boolean",{style:{width:"100%"}}]]},default:!0}}}}}}},auth:{type:"void","x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{user:{type:"void","x-component":"Grid.Col",properties:{"auth.user":{type:"string",title:'{{t("User", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"example@domain.com"}]]}}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",title:'{{t("Password", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{type:"password"}]]}}}}}}}}}},from:{type:"string",required:!0,title:'{{t("From", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{placeholder:"noreply <example@domain.com>"}]]}},to:{type:"array",required:!0,title:'{{t("To", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:m},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(c,'" })}}'),"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:m},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(c,'" })}}'),"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:m},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"],placeholder:'{{t("Email address")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add email address", { ns: "'.concat(c,'" })}}'),"x-component":"ArrayItems.Addition"}}},subject:{type:"string",title:'{{t("Subject", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:'{{t("Content type", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text", { ns: "'.concat(c,'" })}}'),value:"text"}],default:"html"},html:{type:"string",title:'{{t("Content", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",title:'{{t("Content", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-decorator-props":{},"x-component":"WorkflowVariableRawTextArea","x-component-props":{placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]},ignoreFail:{type:"boolean","x-content":'{{t("Ignore failed sending and continue workflow", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"Checkbox"}}),a(r,"components",{ArrayItems:o.ArrayItems,SchemaComponentContext:e.SchemaComponentContext,WorkflowVariableInput:i.WorkflowVariableInput,WorkflowVariableTextArea:i.WorkflowVariableTextArea,WorkflowVariableRawTextArea:i.WorkflowVariableRawTextArea}),r}return p.prototype=Object.create(r&&r.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),r&&s(p,r),p}(i.Instruction);function b(e,t,o,r,n,i,c){try{var a=e[i](c),p=a.value}catch(e){o(e);return}a.done?t(p):Promise.resolve(p).then(r,n)}function x(e){return function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function c(e){b(i,r,n,c,a,"next",e)}function a(e){b(i,r,n,c,a,"throw",e)}c(void 0)})}}function v(e,t,o){return(v=I()?Reflect.construct:function(e,t,o){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return o&&w(n,o.prototype),n}).apply(null,arguments)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t="function"==typeof Map?new Map:void 0;return(g=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,o)}function o(){return v(e,arguments,h(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),w(o,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function k(e,t){var o,r,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:p(0)}),a(c,"throw",{value:p(1)}),a(c,"return",{value:p(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function p(a){return function(p){var l=[a,p];if(o)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&l[0]?r.return:l[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,l[1])).done)return n;switch(r=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=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(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){i.label=l[1];break}if(6===l[0]&&i.label<n[1]){i.label=n[1],n=l;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(l);break}n[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{o=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var O=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;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=h(e),function(e,t){var o;if(t&&("object"==((o=t)&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,I()?Reflect.construct(e,t||[],h(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&w(o,e),t=[{key:"afterAdd",value:function(){return x(function(){return k(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return x(function(){return k(this,function(e){return[2]})})()}},{key:"load",value:function(){return x(function(){return k(this,function(e){return this.app.pm.get("workflow").registerInstruction("mailer",y),[2]})}).call(this)}}],function(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,t),o}(g(e.Plugin))}(),d}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -11,9 +11,9 @@ module.exports = {
|
|
|
11
11
|
"@ant-design/icons": "5.6.1",
|
|
12
12
|
"@formily/antd-v5": "1.2.3",
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
15
|
-
"@nocobase/plugin-workflow": "2.1.0-alpha.
|
|
14
|
+
"@nocobase/client": "2.1.0-alpha.14",
|
|
15
|
+
"@nocobase/plugin-workflow": "2.1.0-alpha.14",
|
|
16
16
|
"react-i18next": "11.18.6",
|
|
17
17
|
"lodash": "4.17.21",
|
|
18
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
18
|
+
"@nocobase/server": "2.1.0-alpha.14"
|
|
19
19
|
};
|
|
@@ -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-04-07T15:55:35.066Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nodemailer","version":"6.9.13","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","lint":"eslint .","update":"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"https://github.com/nodemailer/nodemailer.git"},"keywords":["Nodemailer"],"author":"Andris Reinman","license":"MIT-0","bugs":{"url":"https://github.com/nodemailer/nodemailer/issues"},"homepage":"https://nodemailer.com/","devDependencies":{"@aws-sdk/client-ses":"3.529.1","bunyan":"1.8.15","c8":"9.1.0","eslint":"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0","libbase64":"1.3.0","libmime":"5.3.4","libqp":"2.1.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.3"},"engines":{"node":">=6.0.0"},"_lastModified":"2026-
|
|
1
|
+
{"name":"nodemailer","version":"6.9.13","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","lint":"eslint .","update":"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"https://github.com/nodemailer/nodemailer.git"},"keywords":["Nodemailer"],"author":"Andris Reinman","license":"MIT-0","bugs":{"url":"https://github.com/nodemailer/nodemailer/issues"},"homepage":"https://nodemailer.com/","devDependencies":{"@aws-sdk/client-ses":"3.529.1","bunyan":"1.8.15","c8":"9.1.0","eslint":"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0","libbase64":"1.3.0","libmime":"5.3.4","libqp":"2.1.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.3"},"engines":{"node":">=6.0.0"},"_lastModified":"2026-04-07T15:55:35.752Z"}
|
|
@@ -47,17 +47,17 @@ var import_get = __toESM(require("lodash/get"));
|
|
|
47
47
|
class MailerInstruction extends import_plugin_workflow.Instruction {
|
|
48
48
|
configSchema = import_joi.default.object({
|
|
49
49
|
provider: import_joi.default.object({
|
|
50
|
-
host: import_joi.default.string()
|
|
51
|
-
port: import_joi.default.number().port().default(465),
|
|
52
|
-
secure: import_joi.default.boolean().default(true),
|
|
50
|
+
host: import_joi.default.string(),
|
|
51
|
+
port: import_joi.default.alternatives().try(import_joi.default.number().port(), import_joi.default.string()).default(465),
|
|
52
|
+
secure: import_joi.default.alternatives().try(import_joi.default.boolean(), import_joi.default.string()).default(true),
|
|
53
53
|
auth: import_joi.default.object({
|
|
54
54
|
user: import_joi.default.string(),
|
|
55
55
|
pass: import_joi.default.string()
|
|
56
56
|
}),
|
|
57
|
-
from: import_joi.default.string()
|
|
58
|
-
to: import_joi.default.array().items(import_joi.default.string()
|
|
59
|
-
cc: import_joi.default.array().items(import_joi.default.string()
|
|
60
|
-
bcc: import_joi.default.array().items(import_joi.default.string()
|
|
57
|
+
from: import_joi.default.string(),
|
|
58
|
+
to: import_joi.default.array().items(import_joi.default.string()),
|
|
59
|
+
cc: import_joi.default.array().items(import_joi.default.string()),
|
|
60
|
+
bcc: import_joi.default.array().items(import_joi.default.string()),
|
|
61
61
|
subject: import_joi.default.string(),
|
|
62
62
|
contentType: import_joi.default.string().valid("html", "text").default("html"),
|
|
63
63
|
html: import_joi.default.string(),
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Send email in workflow.",
|
|
7
7
|
"description.ru-RU": "Отправляет электронное письмо в рамках рабочего процесса.",
|
|
8
8
|
"description.zh-CN": "可用于在工作流中发送电子邮件。",
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.14",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@nocobase/server": "2.x",
|
|
26
26
|
"@nocobase/test": "2.x"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "d8735b541de0ff9557bba704de49c799b4962672",
|
|
29
29
|
"keywords": [
|
|
30
30
|
"NocoBase",
|
|
31
31
|
"Workflow",
|