1'use strict';23// Product videos: the plan, the per-product outcomes, and the cutover items they4// produce, in one place.5//6// plan execution/product-videos.json, written by rp-source-wordpress7// scripts/product-videos.js plan from the product extract. `attach[]` are video files8// the importer attaches (rp-target-wix attachStoresProductVideos); `manual[]` are links9// Wix product media cannot hold (YouTube, Vimeo, other).10// outcome state/product-videos/outcomes.ndjson, one line per attach call11// (recordProductVideoOutcome). Append-only; the latest line per product decides.12// report reportRows(projectDir), joined by completion-report.js:13// product-video-manual Cutover Operator adds each linked video by hand.
102 action: `Cutover Operator: ${plan.manual.length} product video link(s) on ${products.length} product(s) (YouTube, Vimeo or other) cannot be product media in Wix. In Business Manager > Store Products, open each product (source ids in affectedIds; product name and link in ${PLAN_PATH} manual[]) and add the video by hand.`,
103 deadlineReason: 'before switching traffic; these product pages show no video until it is added', affectedCount: products.length, affectedIds: products,
104 artifactRefs: [PLAN_PATH], prerequisites: ['The products are imported.'],
105 resolutionEvidence: 'Each listed product shows its video on the Wix product page.',
106 });
107 }
108 const latest = latestOutcomes(projectDir);
109 const open = plan.attach.filter((row) => !DONE.has(latest.get(String(row.productSourceId))?.status));
115 action: `Requires Import Operator: ${open.length} product(s) have a video file that is not on the Wix product yet${neverRan ? ` (${neverRan} never attempted)` : ''} (source ids in affectedIds).`,
116 importOperatorPrompt: `Resolve ${NOT_ATTACHED_CODE}: for each product in ${PLAN_PATH} attach[] whose latest line in ${OUTCOMES_PATH} is not attached, run the product video step again (rp-target-wix attachStoresProductVideos under the product's grant) and record the outcome.`,
117 deadlineReason: 'before switching traffic; these product pages are missing their video', affectedCount: open.length, affectedIds: ids,
118 artifactRefs: [PLAN_PATH, OUTCOMES_PATH], resolutionEvidence: `The latest outcome for each product is attached or already-attached.`,