@rmdes/indiekit-endpoint-syndicate 1.0.0-beta.35 → 1.0.0-beta.37
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/lib/controllers/syndicate.js +4 -2
- package/lib/utils.js +1 -1
- package/package.json +2 -2
|
@@ -34,8 +34,10 @@ const syndicatePost = async ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
// Readiness gate: verify post and OG image are live before syndicating.
|
|
36
36
|
// Skip check in force mode (manual re-syndication from UI/backlog script).
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const meUrl = typeof publication.me === "string" ? publication.me : publication.me?.href || publication.me?.toString?.() || "";
|
|
38
|
+
if (!force && meUrl && postData.properties?.url) {
|
|
39
|
+
console.log(`[syndication] Readiness gate: checking ${postData.properties.url} (me=${meUrl})`);
|
|
40
|
+
const readiness = await isPostReady(postData.properties.url, meUrl);
|
|
39
41
|
if (!readiness.ready) {
|
|
40
42
|
console.log(
|
|
41
43
|
`[syndication] Skipping ${postData.properties.url} — not yet built ` +
|
package/lib/utils.js
CHANGED
|
@@ -267,7 +267,7 @@ export async function isPostReady(postUrl, me) {
|
|
|
267
267
|
const timeoutId = setTimeout(() => controller.abort(), 5000);
|
|
268
268
|
const response = await fetch(url, {
|
|
269
269
|
method: "HEAD",
|
|
270
|
-
redirect: "
|
|
270
|
+
redirect: "follow",
|
|
271
271
|
signal: controller.signal,
|
|
272
272
|
});
|
|
273
273
|
clearTimeout(timeoutId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-syndicate",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.37",
|
|
4
4
|
"description": "Syndication endpoint for Indiekit. Fork of @indiekit/endpoint-syndicate with batch syndication support and bug fixes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"url": "https://github.com/rmdes/indiekit-endpoint-syndicate.git"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@indiekit/error": "^1.0.0-beta.
|
|
31
|
+
"@indiekit/error": "^1.0.0-beta.27",
|
|
32
32
|
"express": "^5.0.0",
|
|
33
33
|
"jsonwebtoken": "^9.0.0"
|
|
34
34
|
},
|