@nocobase/plugin-workflow-mailer 1.3.0-alpha.20240819011229 → 1.4.0-alpha.20240825165425

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.
@@ -44,6 +44,9 @@ export default class extends Instruction {
44
44
  title: string;
45
45
  'x-decorator': string;
46
46
  'x-component': string;
47
+ 'x-component-props': {
48
+ useTypedConstant: string[];
49
+ };
47
50
  };
48
51
  };
49
52
  };
@@ -61,9 +64,11 @@ export default class extends Instruction {
61
64
  'x-decorator': string;
62
65
  'x-component': string;
63
66
  'x-component-props': {
64
- min: number;
65
- max: number;
66
- step: number;
67
+ useTypedConstant: (string | {
68
+ min: number;
69
+ max: number;
70
+ step: number;
71
+ })[][];
67
72
  };
68
73
  default: number;
69
74
  };
@@ -81,6 +86,13 @@ export default class extends Instruction {
81
86
  title: string;
82
87
  'x-decorator': string;
83
88
  'x-component': string;
89
+ 'x-component-props': {
90
+ useTypedConstant: (string | {
91
+ style: {
92
+ width: string;
93
+ };
94
+ })[][];
95
+ };
84
96
  default: boolean;
85
97
  };
86
98
  };
@@ -113,6 +125,9 @@ export default class extends Instruction {
113
125
  title: string;
114
126
  'x-decorator': string;
115
127
  'x-component': string;
128
+ 'x-component-props': {
129
+ useTypedConstant: string[];
130
+ };
116
131
  };
117
132
  };
118
133
  };
@@ -126,6 +141,11 @@ export default class extends Instruction {
126
141
  title: string;
127
142
  'x-decorator': string;
128
143
  'x-component': string;
144
+ 'x-component-props': {
145
+ useTypedConstant: (string | {
146
+ type: string;
147
+ })[][];
148
+ };
129
149
  };
130
150
  };
131
151
  };
@@ -7,10 +7,10 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- (function(t,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@nocobase/client"),require("@formily/antd-v5"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","@formily/antd-v5","@nocobase/plugin-workflow/client","react-i18next"],o):(t=typeof globalThis!="undefined"?globalThis:t||self,o(t["@nocobase/plugin-workflow-mailer"]={},t["@nocobase/client"],t["@formily/antd-v5"],t["@nocobase/plugin-workflow"]))})(this,function(t,o,r,i){"use strict";var l=Object.defineProperty;var x=(t,o,r)=>o in t?l(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;var p=(t,o,r)=>(x(t,typeof o!="symbol"?o+"":o,r),r);var d=(t,o,r)=>new Promise((i,e)=>{var s=n=>{try{a(r.next(n))}catch(m){e(m)}},c=n=>{try{a(r.throw(n))}catch(m){e(m)}},a=n=>n.done?i(n.value):Promise.resolve(n.value).then(s,c);a((r=r.apply(t,o)).next())});const e="workflow-mailer",s=o.css`
10
+ (function(o,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@nocobase/client"),require("@formily/antd-v5"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","@formily/antd-v5","@nocobase/plugin-workflow/client","react-i18next"],t):(o=typeof globalThis!="undefined"?globalThis:o||self,t(o["@nocobase/plugin-workflow-mailer"]={},o["@nocobase/client"],o["@formily/antd-v5"],o["@nocobase/plugin-workflow"]))})(this,function(o,t,r,s){"use strict";var l=Object.defineProperty;var x=(o,t,r)=>t in o?l(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r;var p=(o,t,r)=>(x(o,typeof t!="symbol"?t+"":t,r),r);var m=(o,t,r)=>new Promise((s,e)=>{var a=n=>{try{i(r.next(n))}catch(d){e(d)}},c=n=>{try{i(r.throw(n))}catch(d){e(d)}},i=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,c);i((r=r.apply(o,t)).next())});const e="workflow-mailer",a=t.css`
11
11
  width: 100%;
12
12
 
13
13
  .ant-space-item:nth-child(2) {
14
14
  flex-grow: 1;
15
15
  }
16
- `;class c extends i.Instruction{constructor(){super(...arguments);p(this,"title",`{{t("Mailer", { ns: "${e}" })}}`);p(this,"type","mailer");p(this,"group","extended");p(this,"description",`{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "${e}" })}}`);p(this,"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:64},properties:{host:{type:"string",required:!0,title:`{{t("SMTP host", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Input"}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:16},properties:{port:{type:"number",required:!0,title:`{{t("Port", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:65535,step:1},default:465}}},secure:{type:"void","x-component":"Grid.Col","x-component-props":{width:16},properties:{secure:{type:"boolean",title:`{{t("Secure", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox",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",required:!0,title:`{{t("User", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Input"}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",required:!0,title:`{{t("Password", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Password"}}}}}}}}},from:{type:"string",required:!0,title:`{{t("From", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"]}},to:{type:"array",required:!0,title:`{{t("To", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:`{{t("CC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:`{{t("BCC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:s},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},subject:{type:"string",required:!0,title:`{{t("Subject", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:`{{t("Content type", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:`{{t("Plain text", { ns: "${e}" })}}`,value:"text"}],default:"html"},html:{type:"string",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox"}});p(this,"components",{ArrayItems:r.ArrayItems,SchemaComponentContext:o.SchemaComponentContext,WorkflowVariableInput:i.WorkflowVariableInput,WorkflowVariableTextArea:i.WorkflowVariableTextArea,WorkflowVariableRawTextArea:i.WorkflowVariableRawTextArea})}}class a extends o.Plugin{afterAdd(){return d(this,null,function*(){})}beforeLoad(){return d(this,null,function*(){})}load(){return d(this,null,function*(){this.app.pm.get("workflow").registerInstruction("mailer",c)})}}t.default=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ `;class c extends s.Instruction{constructor(){super(...arguments);p(this,"title",`{{t("Mailer", { ns: "${e}" })}}`);p(this,"type","mailer");p(this,"group","extended");p(this,"description",`{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "${e}" })}}`);p(this,"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: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"]}}}},port:{type:"void","x-component":"Grid.Col","x-component-props":{width:25},properties:{port:{type:"number",required:!0,title:`{{t("Port", { ns: "${e}" })}}`,"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: "${e}" })}}`,"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",required:!0,title:`{{t("User", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"]}}}},pass:{type:"void","x-component":"Grid.Col",properties:{"auth.pass":{type:"string",required:!0,title:`{{t("Password", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:[["string",{type:"password"}]]}}}}}}}}}},from:{type:"string",required:!0,title:`{{t("From", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["string"]}},to:{type:"array",required:!0,title:`{{t("To", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:a},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:`{{t("CC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:a},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:`{{t("BCC", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:a},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: "${e}" })}}`,"x-component":"ArrayItems.Addition"}}},subject:{type:"string",required:!0,title:`{{t("Subject", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"WorkflowVariableTextArea"},contentType:{type:"string",title:`{{t("Content type", { ns: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:`{{t("Plain text", { ns: "${e}" })}}`,value:"text"}],default:"html"},html:{type:"string",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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",required:!0,title:`{{t("Content", { ns: "${e}" })}}`,"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: "${e}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox"}});p(this,"components",{ArrayItems:r.ArrayItems,SchemaComponentContext:t.SchemaComponentContext,WorkflowVariableInput:s.WorkflowVariableInput,WorkflowVariableTextArea:s.WorkflowVariableTextArea,WorkflowVariableRawTextArea:s.WorkflowVariableRawTextArea})}}class i extends t.Plugin{afterAdd(){return m(this,null,function*(){})}beforeLoad(){return m(this,null,function*(){})}load(){return m(this,null,function*(){this.app.pm.get("workflow").registerInstruction("mailer",c)})}}o.default=i,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -9,8 +9,8 @@
9
9
 
10
10
  module.exports = {
11
11
  "@formily/antd-v5": "1.1.9",
12
- "@nocobase/client": "1.3.0-alpha.20240819011229",
13
- "@nocobase/plugin-workflow": "1.3.0-alpha.20240819011229",
12
+ "@nocobase/client": "1.4.0-alpha.20240825165425",
13
+ "@nocobase/plugin-workflow": "1.4.0-alpha.20240825165425",
14
14
  "react-i18next": "11.18.6",
15
- "@nocobase/server": "1.3.0-alpha.20240819011229"
15
+ "@nocobase/server": "1.4.0-alpha.20240825165425"
16
16
  };
@@ -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":"2024-08-19T01:26:45.243Z"}
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":"2024-08-25T17:09:25.759Z"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:邮件发送节点",
5
5
  "description": "Send email in workflow.",
6
6
  "description.zh-CN": "可用于在工作流中发送电子邮件。",
7
- "version": "1.3.0-alpha.20240819011229",
7
+ "version": "1.4.0-alpha.20240825165425",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
@@ -21,7 +21,7 @@
21
21
  "@nocobase/server": "1.x",
22
22
  "@nocobase/test": "1.x"
23
23
  },
24
- "gitHead": "76365630f8f7129a9308da4aaa1661c08603d04b",
24
+ "gitHead": "dc1bd67309135a872818a919855b45ef7544f689",
25
25
  "keywords": [
26
26
  "NocoBase",
27
27
  "Workflow",