@zenith-open/zenithcms-plugin-email-resend 1.0.0-beta.8 → 1.0.0-beta.9

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.
@@ -0,0 +1,2 @@
1
+ import { ZenithPlugin } from '@zenith-open/zenithcms-types';
2
+ export declare const emailResendPlugin: () => ZenithPlugin;
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emailResendPlugin = void 0;
4
+ const emailResendPlugin = () => {
5
+ return {
6
+ id: 'email-resend',
7
+ name: 'Resend / SMTP Email',
8
+ description: 'Sends emails using Resend or SMTP based on configuration',
9
+ onReady: async (ctx) => {
10
+ ctx.logger.info('[Email Plugin] Listening for email:send events...');
11
+ const core = require('@zenith-open/zenithcms-core');
12
+ if (core && core.eventHub) {
13
+ core.eventHub.on('email:send', async (payload) => {
14
+ ctx.logger.info({ to: payload.to }, 'Email Plugin intercepted send request');
15
+ // Implementation of resend.emails.send() or nodemailer transporter.sendMail()
16
+ });
17
+ }
18
+ }
19
+ };
20
+ };
21
+ exports.emailResendPlugin = emailResendPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenith-open/zenithcms-plugin-email-resend",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0-beta.9",
4
4
  "description": "Resend and Nodemailer Email Integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,8 +12,8 @@
12
12
  "typescript": "^5.4.5"
13
13
  },
14
14
  "peerDependencies": {
15
- "@zenith-open/zenithcms-core": "1.0.0-beta.8",
16
- "@zenith-open/zenithcms-types": "1.0.0-beta.8"
15
+ "@zenith-open/zenithcms-core": "1.0.0-beta.9",
16
+ "@zenith-open/zenithcms-types": "1.0.0-beta.9"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"