@nocobase/plugin-notification-email 1.4.0-alpha.20241027230531 → 1.4.0-alpha.20241031134640
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
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
.ant-space-item:nth-child(2) {
|
|
14
14
|
flex-grow: 1;
|
|
15
15
|
}
|
|
16
|
-
`,y=({variableOptions:t})=>{const{t:s}=r();return p.jsx(o.SchemaComponent,{scope:{t:s},schema:{type:"void",properties:{to:{type:"array",required:!0,title:'{{t("To")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},subject:{type:"string",required:!0,title:'{{t("Subject")}}',"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:t}},contentType:{type:"string",title:'{{t("Content type")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text")}}',value:"text"}],default:"html"},html:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]}}}})},f=({variableOptions:t})=>{const{t:s}=r();return p.jsx(o.SchemaComponent,{scope:{t:s},schema:{type:"void",properties:{subject:{type:"string",required:!0,title:'{{t("Subject")}}',"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:t}},contentType:{type:"string",title:'{{t("Content type")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text")}}',value:"text"}],default:"html"},html:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]}}}})};class u extends o.Plugin{afterAdd(){return a(this,null,function*(){})}beforeLoad(){return a(this,null,function*(){})}load(){return a(this,null,function*(){this.pm.get(n).registerChannelType({title:m.tval("Email",{ns:i}),type:l,components:{ChannelConfigForm:c,MessageConfigForm:y,ContentConfigForm:f}})})}}e.PluginNotificationMailClient=u,e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
16
|
+
`,y=({variableOptions:t})=>{const{t:s}=r();return p.jsx(o.SchemaComponent,{scope:{t:s},schema:{type:"void",properties:{to:{type:"array",required:!0,title:'{{t("To")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},cc:{type:"array",title:'{{t("CC")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},bcc:{type:"array",title:'{{t("BCC")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space","x-component-props":{className:x},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Variable.Input","x-component-props":{scope:t,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")}}',"x-component":"ArrayItems.Addition"}}},subject:{type:"string",required:!0,title:'{{t("Subject")}}',"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:t}},contentType:{type:"string",title:'{{t("Content type")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text")}}',value:"text"}],default:"html"},html:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:["contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]}}}})},f=({variableOptions:t})=>{const{t:s}=r();return p.jsx(o.SchemaComponent,{scope:{t:s},schema:{type:"void",properties:{subject:{type:"string",required:!0,title:'{{t("Subject")}}',"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:t}},contentType:{type:"string",title:'{{t("Content type")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:"HTML",value:"html"},{label:'{{t("Plain text")}}',value:"text"}],default:"html"},html:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:[".contentType"],fulfill:{state:{visible:'{{$deps[0] === "html"}}'}}}]},text:{type:"string",required:!0,title:'{{t("Content")}}',"x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:t,placeholder:"Hi,",autoSize:{minRows:10}},"x-reactions":[{dependencies:[".contentType"],fulfill:{state:{visible:'{{$deps[0] === "text"}}'}}}]}}}})};class u extends o.Plugin{afterAdd(){return a(this,null,function*(){})}beforeLoad(){return a(this,null,function*(){})}load(){return a(this,null,function*(){this.pm.get(n).registerChannelType({title:m.tval("Email",{ns:i}),type:l,components:{ChannelConfigForm:c,MessageConfigForm:y,ContentConfigForm:f}})})}}e.PluginNotificationMailClient=u,e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.4.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.4.0-alpha.20241031134640",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/plugin-notification-manager": "1.4.0-alpha.
|
|
14
|
-
"@nocobase/utils": "1.4.0-alpha.
|
|
15
|
-
"@nocobase/server": "1.4.0-alpha.
|
|
13
|
+
"@nocobase/plugin-notification-manager": "1.4.0-alpha.20241031134640",
|
|
14
|
+
"@nocobase/utils": "1.4.0-alpha.20241031134640",
|
|
15
|
+
"@nocobase/server": "1.4.0-alpha.20241031134640",
|
|
16
16
|
"react-i18next": "11.18.6"
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nodemailer","version":"6.9.7","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"grunt --trace-warnings","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.433.0","aws-sdk":"2.1478.0","bunyan":"1.8.15","chai":"4.3.10","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.0.0","grunt":"1.6.1","grunt-cli":"1.4.3","grunt-eslint":"24.3.0","grunt-mocha-test":"0.13.3","libbase64":"1.2.1","libmime":"5.2.1","libqp":"2.0.1","mocha":"10.2.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","sinon":"17.0.0","smtp-server":"3.13.0"},"engines":{"node":">=6.0.0"},"_lastModified":"2024-10-
|
|
1
|
+
{"name":"nodemailer","version":"6.9.7","description":"Easy as cake e-mail sending from your Node.js applications","main":"lib/nodemailer.js","scripts":{"test":"grunt --trace-warnings","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.433.0","aws-sdk":"2.1478.0","bunyan":"1.8.15","chai":"4.3.10","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.0.0","grunt":"1.6.1","grunt-cli":"1.4.3","grunt-eslint":"24.3.0","grunt-mocha-test":"0.13.3","libbase64":"1.2.1","libmime":"5.2.1","libqp":"2.0.1","mocha":"10.2.0","nodemailer-ntlm-auth":"1.0.4","proxy":"1.0.2","proxy-test-server":"1.0.0","sinon":"17.0.0","smtp-server":"3.13.0"},"engines":{"node":">=6.0.0"},"_lastModified":"2024-10-31T14:02:22.566Z"}
|
|
@@ -61,13 +61,14 @@ class MailNotificationChannel extends import_plugin_notification_manager.BaseNot
|
|
|
61
61
|
if ((receivers == null ? void 0 : receivers.type) === "userId") {
|
|
62
62
|
const users = await userRepo.find({
|
|
63
63
|
filter: {
|
|
64
|
-
|
|
64
|
+
id: receivers.value
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
const usersEmail = users.map((user) => user.email).filter(Boolean);
|
|
68
68
|
const payload = {
|
|
69
69
|
to: usersEmail,
|
|
70
70
|
from,
|
|
71
|
+
subject,
|
|
71
72
|
...contentType === "html" ? { html: message.html } : { text: message.text }
|
|
72
73
|
};
|
|
73
74
|
const result = await transpoter.sendMail(payload);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-notification-email",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.20241031134640",
|
|
4
4
|
"displayName": "Notification: Email",
|
|
5
5
|
"displayName.zh-CN": "通知:电子邮件",
|
|
6
6
|
"description": "Used for sending email notifications with built-in SMTP transport.",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"keywords": [
|
|
20
20
|
"Notification"
|
|
21
21
|
],
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "78cd6d9010f81b1c4d13d7673f6adf2eb0e598be"
|
|
23
23
|
}
|