@nocobase/plugin-workflow-mailer 2.1.0-beta.2 → 2.1.0-beta.21
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/LICENSE +201 -661
- package/README.md +79 -10
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/joi/dist/joi-browser.min.js +1 -0
- package/dist/node_modules/joi/lib/annotate.js +175 -0
- package/dist/node_modules/joi/lib/base.js +1069 -0
- package/dist/node_modules/joi/lib/cache.js +143 -0
- package/dist/node_modules/joi/lib/common.js +216 -0
- package/dist/node_modules/joi/lib/compile.js +283 -0
- package/dist/node_modules/joi/lib/errors.js +271 -0
- package/dist/node_modules/joi/lib/extend.js +312 -0
- package/dist/node_modules/joi/lib/index.d.ts +2365 -0
- package/dist/node_modules/joi/lib/index.js +1 -0
- package/dist/node_modules/joi/lib/manifest.js +476 -0
- package/dist/node_modules/joi/lib/messages.js +178 -0
- package/dist/node_modules/joi/lib/modify.js +267 -0
- package/dist/node_modules/joi/lib/ref.js +414 -0
- package/dist/node_modules/joi/lib/schemas.js +302 -0
- package/dist/node_modules/joi/lib/state.js +166 -0
- package/dist/node_modules/joi/lib/template.js +463 -0
- package/dist/node_modules/joi/lib/trace.js +346 -0
- package/dist/node_modules/joi/lib/types/alternatives.js +364 -0
- package/dist/node_modules/joi/lib/types/any.js +174 -0
- package/dist/node_modules/joi/lib/types/array.js +809 -0
- package/dist/node_modules/joi/lib/types/binary.js +100 -0
- package/dist/node_modules/joi/lib/types/boolean.js +150 -0
- package/dist/node_modules/joi/lib/types/date.js +233 -0
- package/dist/node_modules/joi/lib/types/function.js +93 -0
- package/dist/node_modules/joi/lib/types/keys.js +1067 -0
- package/dist/node_modules/joi/lib/types/link.js +168 -0
- package/dist/node_modules/joi/lib/types/number.js +363 -0
- package/dist/node_modules/joi/lib/types/object.js +22 -0
- package/dist/node_modules/joi/lib/types/string.js +850 -0
- package/dist/node_modules/joi/lib/types/symbol.js +102 -0
- package/dist/node_modules/joi/lib/validator.js +750 -0
- package/dist/node_modules/joi/lib/values.js +263 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.d.ts +60 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.js +225 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/package.json +30 -0
- package/dist/node_modules/joi/package.json +1 -0
- package/dist/node_modules/nodemailer/lib/nodemailer.js +1 -1
- package/dist/node_modules/nodemailer/package.json +1 -1
- package/dist/server/MailerInstruction.d.ts +2 -0
- package/dist/server/MailerInstruction.js +21 -0
- package/package.json +4 -3
|
@@ -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-27T17:02:46.208Z"}
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import Joi from 'joi';
|
|
9
10
|
import { FlowNodeModel, Instruction, Processor } from '@nocobase/plugin-workflow';
|
|
10
11
|
export default class MailerInstruction extends Instruction {
|
|
12
|
+
configSchema: Joi.ObjectSchema<any>;
|
|
11
13
|
private static transporterMap;
|
|
12
14
|
private static configMap;
|
|
13
15
|
private getTransporterKey;
|
|
@@ -39,11 +39,32 @@ __export(MailerInstruction_exports, {
|
|
|
39
39
|
default: () => MailerInstruction
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(MailerInstruction_exports);
|
|
42
|
+
var import_joi = __toESM(require("joi"));
|
|
42
43
|
var import_util = require("util");
|
|
43
44
|
var import_nodemailer = __toESM(require("nodemailer"));
|
|
44
45
|
var import_plugin_workflow = require("@nocobase/plugin-workflow");
|
|
45
46
|
var import_get = __toESM(require("lodash/get"));
|
|
46
47
|
class MailerInstruction extends import_plugin_workflow.Instruction {
|
|
48
|
+
configSchema = import_joi.default.object({
|
|
49
|
+
provider: import_joi.default.object({
|
|
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
|
+
auth: import_joi.default.object({
|
|
54
|
+
user: import_joi.default.string(),
|
|
55
|
+
pass: import_joi.default.string()
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
from: import_joi.default.string(),
|
|
59
|
+
to: import_joi.default.array().items(import_joi.default.string()),
|
|
60
|
+
cc: import_joi.default.array().items(import_joi.default.string()),
|
|
61
|
+
bcc: import_joi.default.array().items(import_joi.default.string()),
|
|
62
|
+
subject: import_joi.default.string(),
|
|
63
|
+
contentType: import_joi.default.string().valid("html", "text").default("html"),
|
|
64
|
+
html: import_joi.default.string(),
|
|
65
|
+
text: import_joi.default.string(),
|
|
66
|
+
ignoreFail: import_joi.default.boolean().default(false)
|
|
67
|
+
});
|
|
47
68
|
static transporterMap = /* @__PURE__ */ new Map();
|
|
48
69
|
static configMap = /* @__PURE__ */ new Map();
|
|
49
70
|
getTransporterKey(provider) {
|
package/package.json
CHANGED
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
"description": "Send email in workflow.",
|
|
7
7
|
"description.ru-RU": "Отправляет электронное письмо в рамках рабочего процесса.",
|
|
8
8
|
"description.zh-CN": "可用于在工作流中发送电子邮件。",
|
|
9
|
-
"version": "2.1.0-beta.
|
|
10
|
-
"license": "
|
|
9
|
+
"version": "2.1.0-beta.21",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
|
|
13
13
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow-smtp-mailer",
|
|
14
14
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/workflow-smtp-mailer",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"antd": "5.x",
|
|
17
|
+
"joi": "^17.13.3",
|
|
17
18
|
"nodemailer": "6.9.13",
|
|
18
19
|
"react": "18.x"
|
|
19
20
|
},
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"@nocobase/server": "2.x",
|
|
25
26
|
"@nocobase/test": "2.x"
|
|
26
27
|
},
|
|
27
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "324bd82f33fca58e98711688a17ceb65c186b65e",
|
|
28
29
|
"keywords": [
|
|
29
30
|
"NocoBase",
|
|
30
31
|
"Workflow",
|