@strapi/provider-email-sendgrid 5.48.0 → 5.49.0

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.js CHANGED
@@ -2,9 +2,13 @@
2
2
 
3
3
  var sendgrid = require('@sendgrid/mail');
4
4
 
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var sendgrid__default = /*#__PURE__*/_interopDefault(sendgrid);
8
+
5
9
  var index = {
6
10
  init (providerOptions, settings) {
7
- sendgrid.setApiKey(providerOptions.apiKey);
11
+ sendgrid__default.default.setApiKey(providerOptions.apiKey);
8
12
  return {
9
13
  send (options) {
10
14
  return new Promise((resolve, reject)=>{
@@ -20,7 +24,7 @@ var index = {
20
24
  html,
21
25
  ...rest
22
26
  };
23
- sendgrid.send(msg, false, (err)=>{
27
+ sendgrid__default.default.send(msg, false, (err)=>{
24
28
  if (err) {
25
29
  reject(err);
26
30
  } else {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import sendgrid, { MailDataRequired } from '@sendgrid/mail';\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\ninterface ProviderOptions {\n apiKey: string;\n}\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n sendgrid.setApiKey(providerOptions.apiKey);\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailDataRequired = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendgrid.send(msg, false, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":["init","providerOptions","settings","sendgrid","setApiKey","apiKey","send","options","Promise","resolve","reject","from","to","cc","bcc","replyTo","subject","text","html","rest","msg","defaultFrom","defaultReplyTo","err"],"mappings":";;;;AAuBA,YAAe;IACbA,IAAAA,CAAAA,CAAKC,eAAgC,EAAEC,QAAkB,EAAA;QACvDC,QAAAA,CAASC,SAAS,CAACH,eAAAA,CAAgBI,MAAM,CAAA;QAEzC,OAAO;AACLC,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;gBACvB,OAAO,IAAIC,OAAAA,CAAQ,CAACC,OAAAA,EAASC,MAAAA,GAAAA;AAC3B,oBAAA,MAAM,EAAEC,IAAI,EAAEC,EAAE,EAAEC,EAAE,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,MAAM,GAAGZ,OAAAA;AAErE,oBAAA,MAAMa,GAAAA,GAAwB;wBAC5BT,IAAAA,EAAMA,IAAAA,IAAQT,SAASmB,WAAW;AAClCT,wBAAAA,EAAAA;AACAC,wBAAAA,EAAAA;AACAC,wBAAAA,GAAAA;wBACAC,OAAAA,EAASA,OAAAA,IAAWb,SAASoB,cAAc;AAC3CN,wBAAAA,OAAAA;AACAC,wBAAAA,IAAAA;AACAC,wBAAAA,IAAAA;AACA,wBAAA,GAAGC;AACL,qBAAA;AAEAhB,oBAAAA,QAAAA,CAASG,IAAI,CAACc,GAAAA,EAAK,KAAA,EAAO,CAACG,GAAAA,GAAAA;AACzB,wBAAA,IAAIA,GAAAA,EAAK;4BACPb,MAAAA,CAAOa,GAAAA,CAAAA;wBACT,CAAA,MAAO;AACLd,4BAAAA,OAAAA,EAAAA;AACF,wBAAA;AACF,oBAAA,CAAA,CAAA;AACF,gBAAA,CAAA,CAAA;AACF,YAAA;AACF,SAAA;AACF,IAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import sendgrid, { MailDataRequired } from '@sendgrid/mail';\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\ninterface ProviderOptions {\n apiKey: string;\n}\n\nexport default {\n init(providerOptions: ProviderOptions, settings: Settings) {\n sendgrid.setApiKey(providerOptions.apiKey);\n\n return {\n send(options: SendOptions): Promise<void> {\n return new Promise((resolve, reject) => {\n const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;\n\n const msg: MailDataRequired = {\n from: from || settings.defaultFrom,\n to,\n cc,\n bcc,\n replyTo: replyTo || settings.defaultReplyTo,\n subject,\n text,\n html,\n ...rest,\n };\n\n sendgrid.send(msg, false, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n },\n };\n },\n};\n"],"names":["init","providerOptions","settings","sendgrid","setApiKey","apiKey","send","options","Promise","resolve","reject","from","to","cc","bcc","replyTo","subject","text","html","rest","msg","defaultFrom","defaultReplyTo","err"],"mappings":";;;;;;;;AAuBA,YAAe;IACbA,IAAAA,CAAAA,CAAKC,eAAgC,EAAEC,QAAkB,EAAA;QACvDC,yBAAAA,CAASC,SAAS,CAACH,eAAAA,CAAgBI,MAAM,CAAA;QAEzC,OAAO;AACLC,YAAAA,IAAAA,CAAAA,CAAKC,OAAoB,EAAA;gBACvB,OAAO,IAAIC,OAAAA,CAAQ,CAACC,OAAAA,EAASC,MAAAA,GAAAA;AAC3B,oBAAA,MAAM,EAAEC,IAAI,EAAEC,EAAE,EAAEC,EAAE,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAE,GAAGC,MAAM,GAAGZ,OAAAA;AAErE,oBAAA,MAAMa,GAAAA,GAAwB;wBAC5BT,IAAAA,EAAMA,IAAAA,IAAQT,SAASmB,WAAW;AAClCT,wBAAAA,EAAAA;AACAC,wBAAAA,EAAAA;AACAC,wBAAAA,GAAAA;wBACAC,OAAAA,EAASA,OAAAA,IAAWb,SAASoB,cAAc;AAC3CN,wBAAAA,OAAAA;AACAC,wBAAAA,IAAAA;AACAC,wBAAAA,IAAAA;AACA,wBAAA,GAAGC;AACL,qBAAA;AAEAhB,oBAAAA,yBAAAA,CAASG,IAAI,CAACc,GAAAA,EAAK,KAAA,EAAO,CAACG,GAAAA,GAAAA;AACzB,wBAAA,IAAIA,GAAAA,EAAK;4BACPb,MAAAA,CAAOa,GAAAA,CAAAA;wBACT,CAAA,MAAO;AACLd,4BAAAA,OAAAA,EAAAA;AACF,wBAAA;AACF,oBAAA,CAAA,CAAA;AACF,gBAAA,CAAA,CAAA;AACF,YAAA;AACF,SAAA;AACF,IAAA;AACF,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-email-sendgrid",
3
- "version": "5.48.0",
3
+ "version": "5.49.0",
4
4
  "description": "Sendgrid provider for strapi email",
5
5
  "keywords": [
6
6
  "email",
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@sendgrid/mail": "8.1.3",
49
- "@strapi/utils": "5.48.0"
49
+ "@strapi/utils": "5.49.0"
50
50
  },
51
51
  "devDependencies": {
52
- "eslint-config-custom": "5.48.0",
53
- "tsconfig": "5.48.0"
52
+ "eslint-config-custom": "5.49.0",
53
+ "tsconfig": "5.49.0"
54
54
  },
55
55
  "engines": {
56
- "node": ">=20.0.0 <=24.x.x",
56
+ "node": ">=20.0.0 <=26.x.x",
57
57
  "npm": ">=6.0.0"
58
58
  }
59
59
  }