@strapi/provider-email-sendgrid
Advanced tools
Comparing version 0.0.0-next.d62456ea471e44d21b938f21f0e91a567cdc6483 to 0.0.0-next.d773bfffcd285e7a1e7bf331b6f1224b969dd46b
@@ -24,2 +24,3 @@ interface Settings { | ||
}; | ||
export = _default; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const sendgrid = require("@sendgrid/mail"); | ||
const _interopDefault = (e) => e && e.__esModule ? e : { default: e }; | ||
const sendgrid__default = /* @__PURE__ */ _interopDefault(sendgrid); | ||
const index = { | ||
init(providerOptions, settings) { | ||
sendgrid__default.default.setApiKey(providerOptions.apiKey); | ||
return { | ||
send(options) { | ||
return new Promise((resolve, reject) => { | ||
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options; | ||
const msg = { | ||
from: from || settings.defaultFrom, | ||
to, | ||
cc, | ||
bcc, | ||
replyTo: replyTo || settings.defaultReplyTo, | ||
subject, | ||
text, | ||
html, | ||
...rest | ||
}; | ||
sendgrid__default.default.send(msg, false, (err) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
} | ||
}; | ||
} | ||
}; | ||
const mail_1 = __importDefault(require("@sendgrid/mail")); | ||
module.exports = { | ||
init(providerOptions, settings) { | ||
mail_1.default.setApiKey(providerOptions.apiKey); | ||
return { | ||
send(options) { | ||
return new Promise((resolve, reject) => { | ||
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options; | ||
const msg = { | ||
from: from || settings.defaultFrom, | ||
to, | ||
cc, | ||
bcc, | ||
replyTo: replyTo || settings.defaultReplyTo, | ||
subject, | ||
text, | ||
html, | ||
...rest, | ||
}; | ||
mail_1.default.send(msg, false, (err) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
}, | ||
}; | ||
}, | ||
}; | ||
//# sourceMappingURL=index.js.map | ||
module.exports = index; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@strapi/provider-email-sendgrid", | ||
"version": "0.0.0-next.d62456ea471e44d21b938f21f0e91a567cdc6483", | ||
"version": "0.0.0-next.d773bfffcd285e7a1e7bf331b6f1224b969dd46b", | ||
"description": "Sendgrid provider for strapi email", | ||
@@ -32,2 +32,4 @@ "keywords": [ | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"source": "./src/index.ts", | ||
"types": "./dist/index.d.ts", | ||
@@ -38,22 +40,21 @@ "files": [ | ||
"scripts": { | ||
"build": "run -T tsc", | ||
"build:ts": "run -T tsc", | ||
"watch": "run -T tsc -w --preserveWatchOutput", | ||
"build": "pack-up build", | ||
"clean": "run -T rimraf ./dist", | ||
"prepublishOnly": "yarn clean && yarn build", | ||
"lint": "run -T eslint ." | ||
"lint": "run -T eslint .", | ||
"watch": "pack-up watch" | ||
}, | ||
"dependencies": { | ||
"@sendgrid/mail": "7.7.0", | ||
"@strapi/utils": "0.0.0-next.d62456ea471e44d21b938f21f0e91a567cdc6483" | ||
"@strapi/utils": "0.0.0-next.d773bfffcd285e7a1e7bf331b6f1224b969dd46b" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-custom": "0.0.0-next.d62456ea471e44d21b938f21f0e91a567cdc6483", | ||
"tsconfig": "0.0.0-next.d62456ea471e44d21b938f21f0e91a567cdc6483" | ||
"@strapi/pack-up": "4.23.0", | ||
"eslint-config-custom": "0.0.0-next.d773bfffcd285e7a1e7bf331b6f1224b969dd46b", | ||
"tsconfig": "0.0.0-next.d773bfffcd285e7a1e7bf331b6f1224b969dd46b" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0 <=20.x.x", | ||
"node": ">=18.0.0 <=20.x.x", | ||
"npm": ">=6.0.0" | ||
}, | ||
"gitHead": "d62456ea471e44d21b938f21f0e91a567cdc6483" | ||
"gitHead": "d773bfffcd285e7a1e7bf331b6f1224b969dd46b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13869
9
95
3
1
80