@strapi/provider-email-nodemailer 4.15.0-alpha.0 → 4.15.1

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/index.d.ts CHANGED
@@ -22,4 +22,5 @@ declare const _default: {
22
22
  send(options: SendOptions): Promise<unknown>;
23
23
  };
24
24
  };
25
- export = _default;
25
+ export default _default;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,UAA+B,MAAM,YAAY,CAAC;AAEzD,UAAU,QAAQ;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;;;;0BAkBhD,eAAe,YAAY,QAAQ;sBAIvC,WAAW;;;AAR/B,wBAsBE"}
package/dist/index.js CHANGED
@@ -1,38 +1,38 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const lodash_1 = __importDefault(require("lodash"));
6
- const nodemailer_1 = __importDefault(require("nodemailer"));
2
+ const _ = require("lodash");
3
+ const nodemailer = require("nodemailer");
4
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
+ const ___default = /* @__PURE__ */ _interopDefault(_);
6
+ const nodemailer__default = /* @__PURE__ */ _interopDefault(nodemailer);
7
7
  const emailFields = [
8
- 'from',
9
- 'replyTo',
10
- 'to',
11
- 'cc',
12
- 'bcc',
13
- 'subject',
14
- 'text',
15
- 'html',
16
- 'attachments',
8
+ "from",
9
+ "replyTo",
10
+ "to",
11
+ "cc",
12
+ "bcc",
13
+ "subject",
14
+ "text",
15
+ "html",
16
+ "attachments"
17
17
  ];
18
- module.exports = {
19
- provider: 'nodemailer',
20
- name: 'Nodemailer',
21
- init(providerOptions, settings) {
22
- const transporter = nodemailer_1.default.createTransport(providerOptions);
23
- return {
24
- send(options) {
25
- // Default values.
26
- const emailOptions = {
27
- ...lodash_1.default.pick(options, emailFields),
28
- from: options.from || settings.defaultFrom,
29
- replyTo: options.replyTo || settings.defaultReplyTo,
30
- text: options.text || options.html,
31
- html: options.html || options.text,
32
- };
33
- return transporter.sendMail(emailOptions);
34
- },
18
+ const index = {
19
+ provider: "nodemailer",
20
+ name: "Nodemailer",
21
+ init(providerOptions, settings) {
22
+ const transporter = nodemailer__default.default.createTransport(providerOptions);
23
+ return {
24
+ send(options) {
25
+ const emailOptions = {
26
+ ...___default.default.pick(options, emailFields),
27
+ from: options.from || settings.defaultFrom,
28
+ replyTo: options.replyTo || settings.defaultReplyTo,
29
+ text: options.text || options.html,
30
+ html: options.html || options.text
35
31
  };
36
- },
32
+ return transporter.sendMail(emailOptions);
33
+ }
34
+ };
35
+ }
37
36
  };
38
- //# sourceMappingURL=index.js.map
37
+ module.exports = index;
38
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAAuB;AACvB,4DAAyD;AAqBzD,MAAM,WAAW,GAAG;IAClB,MAAM;IACN,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,SAAS;IACT,MAAM;IACN,MAAM;IACN,aAAa;CACd,CAAC;AAEF,iBAAS;IACP,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,YAAY;IAElB,IAAI,CAAC,eAAgC,EAAE,QAAkB;QACvD,MAAM,WAAW,GAAG,oBAAU,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;QAEhE,OAAO;YACL,IAAI,CAAC,OAAoB;gBACvB,kBAAkB;gBAClB,MAAM,YAAY,GAAoB;oBACpC,GAAG,gBAAC,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC;oBAC/B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,WAAW;oBAC1C,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,cAAc;oBACnD,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI;oBAClC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI;iBACnC,CAAC;gBAEF,OAAO,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import _ from 'lodash';\nimport nodemailer, { SendMailOptions } from 'nodemailer';\n\ninterface Settings {\n defaultFrom: string;\n defaultReplyTo: string;\n}\n\ninterface SendOptions {\n from?: string;\n to: string;\n cc: string;\n bcc: string;\n replyTo?: string;\n subject: string;\n text: string;\n html: string;\n [key: string]: unknown;\n}\n\ntype ProviderOptions = Parameters<typeof nodemailer.createTransport>[0];\n\nconst emailFields = [\n 'from',\n 'replyTo',\n 'to',\n 'cc',\n 'bcc',\n 'subject',\n 'text',\n 'html',\n 'attachments',\n];\n\nexport default {\n provider: 'nodemailer',\n name: 'Nodemailer',\n\n init(providerOptions: ProviderOptions, settings: Settings) {\n const transporter = nodemailer.createTransport(providerOptions);\n\n return {\n send(options: SendOptions) {\n // Default values.\n const emailOptions: SendMailOptions = {\n ..._.pick(options, emailFields),\n from: options.from || settings.defaultFrom,\n replyTo: options.replyTo || settings.defaultReplyTo,\n text: options.text || options.html,\n html: options.html || options.text,\n };\n\n return transporter.sendMail(emailOptions);\n },\n };\n },\n};\n"],"names":["nodemailer","_"],"mappings":";;;;;;AAsBA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAe,QAAA;AAAA,EACb,UAAU;AAAA,EACV,MAAM;AAAA,EAEN,KAAK,iBAAkC,UAAoB;AACnD,UAAA,cAAcA,oBAAAA,QAAW,gBAAgB,eAAe;AAEvD,WAAA;AAAA,MACL,KAAK,SAAsB;AAEzB,cAAM,eAAgC;AAAA,UACpC,GAAGC,mBAAE,KAAK,SAAS,WAAW;AAAA,UAC9B,MAAM,QAAQ,QAAQ,SAAS;AAAA,UAC/B,SAAS,QAAQ,WAAW,SAAS;AAAA,UACrC,MAAM,QAAQ,QAAQ,QAAQ;AAAA,UAC9B,MAAM,QAAQ,QAAQ,QAAQ;AAAA,QAAA;AAGzB,eAAA,YAAY,SAAS,YAAY;AAAA,MAC1C;AAAA,IAAA;AAAA,EAEJ;AACF;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,36 @@
1
+ import _ from "lodash";
2
+ import nodemailer from "nodemailer";
3
+ const emailFields = [
4
+ "from",
5
+ "replyTo",
6
+ "to",
7
+ "cc",
8
+ "bcc",
9
+ "subject",
10
+ "text",
11
+ "html",
12
+ "attachments"
13
+ ];
14
+ const index = {
15
+ provider: "nodemailer",
16
+ name: "Nodemailer",
17
+ init(providerOptions, settings) {
18
+ const transporter = nodemailer.createTransport(providerOptions);
19
+ return {
20
+ send(options) {
21
+ const emailOptions = {
22
+ ..._.pick(options, emailFields),
23
+ from: options.from || settings.defaultFrom,
24
+ replyTo: options.replyTo || settings.defaultReplyTo,
25
+ text: options.text || options.html,
26
+ html: options.html || options.text
27
+ };
28
+ return transporter.sendMail(emailOptions);
29
+ }
30
+ };
31
+ }
32
+ };
33
+ export {
34
+ index as default
35
+ };
36
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import _ from 'lodash';\nimport nodemailer, { SendMailOptions } from 'nodemailer';\n\ninterface Settings {\n defaultFrom: string;\n defaultReplyTo: string;\n}\n\ninterface SendOptions {\n from?: string;\n to: string;\n cc: string;\n bcc: string;\n replyTo?: string;\n subject: string;\n text: string;\n html: string;\n [key: string]: unknown;\n}\n\ntype ProviderOptions = Parameters<typeof nodemailer.createTransport>[0];\n\nconst emailFields = [\n 'from',\n 'replyTo',\n 'to',\n 'cc',\n 'bcc',\n 'subject',\n 'text',\n 'html',\n 'attachments',\n];\n\nexport default {\n provider: 'nodemailer',\n name: 'Nodemailer',\n\n init(providerOptions: ProviderOptions, settings: Settings) {\n const transporter = nodemailer.createTransport(providerOptions);\n\n return {\n send(options: SendOptions) {\n // Default values.\n const emailOptions: SendMailOptions = {\n ..._.pick(options, emailFields),\n from: options.from || settings.defaultFrom,\n replyTo: options.replyTo || settings.defaultReplyTo,\n text: options.text || options.html,\n html: options.html || options.text,\n };\n\n return transporter.sendMail(emailOptions);\n },\n };\n },\n};\n"],"names":[],"mappings":";;AAsBA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAe,QAAA;AAAA,EACb,UAAU;AAAA,EACV,MAAM;AAAA,EAEN,KAAK,iBAAkC,UAAoB;AACnD,UAAA,cAAc,WAAW,gBAAgB,eAAe;AAEvD,WAAA;AAAA,MACL,KAAK,SAAsB;AAEzB,cAAM,eAAgC;AAAA,UACpC,GAAG,EAAE,KAAK,SAAS,WAAW;AAAA,UAC9B,MAAM,QAAQ,QAAQ,SAAS;AAAA,UAC/B,SAAS,QAAQ,WAAW,SAAS;AAAA,UACrC,MAAM,QAAQ,QAAQ,QAAQ;AAAA,UAC9B,MAAM,QAAQ,QAAQ,QAAQ;AAAA,QAAA;AAGzB,eAAA,YAAY,SAAS,YAAY;AAAA,MAC1C;AAAA,IAAA;AAAA,EAEJ;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-email-nodemailer",
3
- "version": "4.15.0-alpha.0",
3
+ "version": "4.15.1",
4
4
  "description": "Nodemailer provider for Strapi 3",
5
5
  "keywords": [
6
6
  "strapi",
@@ -42,30 +42,32 @@
42
42
  }
43
43
  ],
44
44
  "main": "./dist/index.js",
45
+ "module": "./dist/index.mjs",
46
+ "source": "./src/index.ts",
45
47
  "types": "./dist/index.d.ts",
46
48
  "files": [
47
49
  "./dist"
48
50
  ],
49
51
  "scripts": {
50
- "build": "run -T tsc",
51
- "build:ts": "run -T tsc",
52
- "watch": "run -T tsc -w --preserveWatchOutput",
52
+ "build": "pack-up build",
53
53
  "clean": "run -T rimraf ./dist",
54
+ "lint": "run -T eslint .",
54
55
  "prepublishOnly": "yarn clean && yarn build",
55
- "lint": "run -T eslint ."
56
+ "watch": "pack-up watch"
56
57
  },
57
58
  "dependencies": {
58
59
  "lodash": "4.17.21",
59
60
  "nodemailer": "6.9.1"
60
61
  },
61
62
  "devDependencies": {
63
+ "@strapi/pack-up": "4.15.1",
62
64
  "@types/nodemailer": "6.4.7",
63
- "eslint-config-custom": "4.15.0-alpha.0",
64
- "tsconfig": "4.15.0-alpha.0"
65
+ "eslint-config-custom": "4.15.1",
66
+ "tsconfig": "4.15.1"
65
67
  },
66
68
  "engines": {
67
- "node": ">=16.0.0 <=20.x.x",
69
+ "node": ">=18.0.0 <=20.x.x",
68
70
  "npm": ">=6.0.0"
69
71
  },
70
- "gitHead": "682a070df9ef90f2aa6966666488e066d61831e2"
72
+ "gitHead": "b6c085052f108fcfe47d22972a664dfa85aa0358"
71
73
  }