channel-worker 2.5.8 → 2.5.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.
- package/package.json +1 -1
- package/scripts/upload_facebook.js +11 -0
package/package.json
CHANGED
|
@@ -1299,6 +1299,17 @@ async function run({ page, payload, log }) {
|
|
|
1299
1299
|
throw new Error(`FB publish: thumbnail_url provided but the "Chỉnh sửa hình thu nhỏ" overlay was never detected before publish (step ${step + 1}). Refusing to ship without custom thumb. Inspect dump screenshots in Temp\\cm-worker-pw\\.`);
|
|
1300
1300
|
}
|
|
1301
1301
|
log('info', `[fb-pw] click publish "${pub.verb}" via "${pub.sel}" (step ${step + 1})`);
|
|
1302
|
+
// DRY-RUN MODE (temporary, for QA): skip the actual publish click so
|
|
1303
|
+
// we can verify the upstream flow (modal scoping, video upload, thumb
|
|
1304
|
+
// step, metadata fill) without spawning real Reels every iteration.
|
|
1305
|
+
// Throws a recognisable error so the daemon marks the cmd failed
|
|
1306
|
+
// without retrying. REMOVE this block once the page-wall composer
|
|
1307
|
+
// fix is verified end-to-end.
|
|
1308
|
+
if (process.env.FB_PW_DRY_RUN === '1' || payload._dry_run === true) {
|
|
1309
|
+
await dumpInventory(page, log, `dry-run-at-publish-${step + 1}`);
|
|
1310
|
+
await dumpFailure(page, `dry-run-at-publish-${step + 1}`, log);
|
|
1311
|
+
throw new Error(`[fb-pw] DRY-RUN: reached publish step ${step + 1} successfully. Pub button found via "${pub.sel}" verb="${pub.verb}". Thumb=${customThumbDone ? 'uploaded' : 'NOT uploaded'}. NOT clicking. Inspect dump screenshots in Temp\\cm-worker-pw\\.`);
|
|
1312
|
+
}
|
|
1302
1313
|
// Snapshot the captured-IDs list RIGHT BEFORE the publish click. The
|
|
1303
1314
|
// network listener captures from EVERY graph response, including the
|
|
1304
1315
|
// pre-publish page wall feed (~100+ IDs). Only IDs captured AFTER
|