@strapi/provider-email-amazon-ses
Advanced tools
Comparing version 0.0.0-experimental.41844c2867621a1f47dd6ae6ac83283aa54b22f8 to 0.0.0-experimental.4184db001fb3249acae738f57aab40d83602c0e9
@@ -26,2 +26,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 nodeSES = require("node-ses"); | ||
const _interopDefault = (e) => e && e.__esModule ? e : { default: e }; | ||
const nodeSES__default = /* @__PURE__ */ _interopDefault(nodeSES); | ||
const index = { | ||
init(providerOptions, settings) { | ||
const client = nodeSES__default.default.createClient(providerOptions); | ||
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, | ||
subject, | ||
message: html, | ||
to, | ||
cc, | ||
bcc, | ||
replyTo: replyTo || settings.defaultReplyTo, | ||
altText: text, | ||
...rest | ||
}; | ||
client.sendEmail(msg, (err) => { | ||
if (err) { | ||
if (err.Message) { | ||
reject(`${err.Message} ${err.Detail ? err.Detail : ""}`); | ||
} | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
} | ||
}; | ||
} | ||
}; | ||
const node_ses_1 = __importDefault(require("node-ses")); | ||
module.exports = { | ||
init(providerOptions, settings) { | ||
const client = node_ses_1.default.createClient(providerOptions); | ||
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, | ||
subject, | ||
message: html, | ||
to, | ||
cc, | ||
bcc, | ||
replyTo: replyTo || settings.defaultReplyTo, | ||
altText: text, | ||
...rest, | ||
}; | ||
client.sendEmail(msg, (err) => { | ||
if (err) { | ||
if (err.Message) { | ||
// eslint-disable-next-line prefer-promise-reject-errors | ||
reject(`${err.Message} ${err.Detail ? err.Detail : ''}`); | ||
} | ||
reject(err); | ||
} | ||
else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
}, | ||
}; | ||
}, | ||
}; | ||
//# sourceMappingURL=index.js.map | ||
module.exports = index; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@strapi/provider-email-amazon-ses", | ||
"version": "0.0.0-experimental.41844c2867621a1f47dd6ae6ac83283aa54b22f8", | ||
"version": "0.0.0-experimental.4184db001fb3249acae738f57aab40d83602c0e9", | ||
"description": "Amazon SES 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": { | ||
"@strapi/utils": "0.0.0-experimental.41844c2867621a1f47dd6ae6ac83283aa54b22f8", | ||
"@strapi/utils": "0.0.0-experimental.4184db001fb3249acae738f57aab40d83602c0e9", | ||
"node-ses": "^3.0.3" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-custom": "0.0.0-experimental.41844c2867621a1f47dd6ae6ac83283aa54b22f8", | ||
"tsconfig": "0.0.0-experimental.41844c2867621a1f47dd6ae6ac83283aa54b22f8" | ||
"@strapi/pack-up": "4.23.0", | ||
"eslint-config-custom": "0.0.0-experimental.4184db001fb3249acae738f57aab40d83602c0e9", | ||
"tsconfig": "0.0.0-experimental.4184db001fb3249acae738f57aab40d83602c0e9" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0 <=20.x.x", | ||
"node": ">=18.0.0 <=20.x.x", | ||
"npm": ">=6.0.0" | ||
}, | ||
"gitHead": "41844c2867621a1f47dd6ae6ac83283aa54b22f8" | ||
"gitHead": "4184db001fb3249acae738f57aab40d83602c0e9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
14825
9
103
3
1
80