payload-plugin-newsletter 0.25.6 → 0.25.7
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/CHANGELOG.md +7 -0
- package/dist/{broadcast-7DI2WOB3.js → broadcast-KSKQRQB6.js} +1 -1
- package/dist/{chunk-LLPN5SQN.js → chunk-KZDNTLVF.js} +1 -1
- package/dist/collections.cjs +2 -4
- package/dist/collections.cjs.map +1 -1
- package/dist/collections.js +2 -4
- package/dist/collections.js.map +1 -1
- package/dist/server.js +8 -10
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
BroadcastApiProvider,
|
|
4
4
|
BroadcastProviderError,
|
|
5
5
|
NewsletterProviderError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KZDNTLVF.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/access.ts
|
|
9
9
|
var isAdmin = (user, config) => {
|
|
@@ -4102,7 +4102,7 @@ var createSendBroadcastEndpoint = (config, collectionSlug) => {
|
|
|
4102
4102
|
error: "Broadcast provider not configured in Newsletter Settings or environment variables"
|
|
4103
4103
|
}, { status: 500 });
|
|
4104
4104
|
}
|
|
4105
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
4105
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
4106
4106
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
4107
4107
|
const broadcast = await provider.send(broadcastDoc.providerId, data);
|
|
4108
4108
|
await req.payload.update({
|
|
@@ -4205,7 +4205,7 @@ var createScheduleBroadcastEndpoint = (config, collectionSlug) => {
|
|
|
4205
4205
|
error: "Broadcast provider not configured"
|
|
4206
4206
|
}, { status: 500 });
|
|
4207
4207
|
}
|
|
4208
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
4208
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
4209
4209
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
4210
4210
|
const broadcast = await provider.schedule(broadcastDoc.providerId, scheduledDate);
|
|
4211
4211
|
await req.payload.update({
|
|
@@ -4849,7 +4849,7 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
4849
4849
|
req.payload.logger.error("Broadcast provider not configured in Newsletter Settings or environment variables");
|
|
4850
4850
|
return doc;
|
|
4851
4851
|
}
|
|
4852
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
4852
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
4853
4853
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
4854
4854
|
const subject = doc.subject || `Draft Broadcast ${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
4855
4855
|
const htmlContent = doc.contentSection?.content ? await convertToEmailSafeHtml(
|
|
@@ -4899,9 +4899,7 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
4899
4899
|
req.payload.logger.error("Error details:", {
|
|
4900
4900
|
message: error.message,
|
|
4901
4901
|
stack: error.stack,
|
|
4902
|
-
name: error.name
|
|
4903
|
-
// Check for any additional properties
|
|
4904
|
-
...error
|
|
4902
|
+
name: error.name
|
|
4905
4903
|
});
|
|
4906
4904
|
} else {
|
|
4907
4905
|
req.payload.logger.error("Raw error:", error);
|
|
@@ -4922,7 +4920,7 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
4922
4920
|
req.payload.logger.error("Broadcast provider not configured in Newsletter Settings or environment variables");
|
|
4923
4921
|
return doc;
|
|
4924
4922
|
}
|
|
4925
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
4923
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
4926
4924
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
4927
4925
|
if (!doc.providerId) {
|
|
4928
4926
|
req.payload.logger.warn(`Broadcast ${doc.id} has no providerId - provider sync skipped. This shouldn't happen with immediate creation.`);
|
|
@@ -5028,7 +5026,7 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
5028
5026
|
return doc;
|
|
5029
5027
|
}
|
|
5030
5028
|
if (broadcastConfig && broadcastConfig.token) {
|
|
5031
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
5029
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
5032
5030
|
const provider = new BroadcastApiProvider2(broadcastConfig);
|
|
5033
5031
|
await provider.send(doc.providerId);
|
|
5034
5032
|
}
|
|
@@ -5079,7 +5077,7 @@ var createBroadcastsCollection = (pluginConfig) => {
|
|
|
5079
5077
|
req.payload.logger.error("Broadcast provider not configured in Newsletter Settings or environment variables");
|
|
5080
5078
|
return doc;
|
|
5081
5079
|
}
|
|
5082
|
-
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-
|
|
5080
|
+
const { BroadcastApiProvider: BroadcastApiProvider2 } = await import("./broadcast-KSKQRQB6.js");
|
|
5083
5081
|
const provider = new BroadcastApiProvider2(providerConfig);
|
|
5084
5082
|
const capabilities = provider.getCapabilities();
|
|
5085
5083
|
if (capabilities.editableStatuses.includes(doc.sendStatus)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-plugin-newsletter",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.7",
|
|
4
4
|
"description": "Complete newsletter management plugin for Payload CMS with subscriber management, magic link authentication, and email service integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|