@koda-sl/baker-cli 0.307.0 → 0.307.1
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/dist/cli.js +29 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22672,7 +22672,6 @@ var FACEBOOK_POSITIONS = [
|
|
|
22672
22672
|
"feed",
|
|
22673
22673
|
"right_hand_column",
|
|
22674
22674
|
"marketplace",
|
|
22675
|
-
"video_feeds",
|
|
22676
22675
|
"story",
|
|
22677
22676
|
"search",
|
|
22678
22677
|
"instream_video",
|
|
@@ -22713,12 +22712,21 @@ var SAME_SURFACE_ON_THIS_PLATFORM = {
|
|
|
22713
22712
|
search: "ig_search"
|
|
22714
22713
|
}
|
|
22715
22714
|
};
|
|
22715
|
+
var RETIRED_PLACEMENTS = {
|
|
22716
|
+
facebook_positions: {
|
|
22717
|
+
video_feeds: 'Meta retired Facebook video feeds \u2014 use "instream_video" for in-stream video, or "facebook_reels", and drop "video_feeds"'
|
|
22718
|
+
}
|
|
22719
|
+
};
|
|
22716
22720
|
function placementFieldsAccepting(value, except) {
|
|
22717
22721
|
return Object.keys(PLACEMENT_VOCABULARIES).filter(
|
|
22718
22722
|
(field) => field !== except && PLACEMENT_VOCABULARIES[field].includes(value)
|
|
22719
22723
|
);
|
|
22720
22724
|
}
|
|
22721
22725
|
function placementValueIssue(field, value) {
|
|
22726
|
+
const retired = RETIRED_PLACEMENTS[field]?.[value];
|
|
22727
|
+
if (retired) {
|
|
22728
|
+
return { field, value, kind: "retired", fix: retired };
|
|
22729
|
+
}
|
|
22722
22730
|
const renamed = SAME_SURFACE_ON_THIS_PLATFORM[field]?.[value];
|
|
22723
22731
|
if (renamed) {
|
|
22724
22732
|
return {
|
|
@@ -22775,6 +22783,11 @@ function placementCoRequirementIssues(targeting) {
|
|
|
22775
22783
|
);
|
|
22776
22784
|
}
|
|
22777
22785
|
}
|
|
22786
|
+
if (instagram.includes("explore_home") && !instagram.includes("explore")) {
|
|
22787
|
+
issues.push(
|
|
22788
|
+
'Meta refuses Instagram "explore_home" without "explore" \u2014 add "explore" to instagram_positions or drop explore_home'
|
|
22789
|
+
);
|
|
22790
|
+
}
|
|
22778
22791
|
if (threads.includes("threads_stream") && !instagram.includes("stream")) {
|
|
22779
22792
|
issues.push('Threads "threads_stream" cannot be selected alone \u2014 add "stream" to instagram_positions');
|
|
22780
22793
|
}
|
|
@@ -22817,6 +22830,10 @@ var FACEBOOK_PREVIEW_FORMATS = {
|
|
|
22817
22830
|
facebook_reels: "FACEBOOK_REELS_MOBILE",
|
|
22818
22831
|
facebook_reels_overlay: "FACEBOOK_REELS_BANNER",
|
|
22819
22832
|
instream_video: "INSTREAM_VIDEO_MOBILE",
|
|
22833
|
+
// Retired for targeting (RETIRED_PLACEMENTS) and still reported by a breakdown
|
|
22834
|
+
// over any window that predates the retirement — an ad set created before it
|
|
22835
|
+
// keeps delivering there. Previewing what a historic row measured has to keep
|
|
22836
|
+
// working, so this stays.
|
|
22820
22837
|
video_feeds: "INSTREAM_VIDEO_MOBILE"
|
|
22821
22838
|
};
|
|
22822
22839
|
var INSTAGRAM_PREVIEW_FORMATS = {
|
|
@@ -23134,6 +23151,15 @@ function validateAdvantageAudience(p, ctx) {
|
|
|
23134
23151
|
}
|
|
23135
23152
|
function validateAdSetPlacements(p, ctx) {
|
|
23136
23153
|
if (p.clonedFrom) {
|
|
23154
|
+
for (const issue of invalidPlacementValues(p.targeting)) {
|
|
23155
|
+
if (issue.kind === "retired") {
|
|
23156
|
+
ctx.addIssue({
|
|
23157
|
+
code: "custom",
|
|
23158
|
+
path: ["targeting", issue.field],
|
|
23159
|
+
message: `${issue.field} no longer accepts "${issue.value}". ${issue.fix} (${PLACEMENT_TARGETING_DOC})`
|
|
23160
|
+
});
|
|
23161
|
+
}
|
|
23162
|
+
}
|
|
23137
23163
|
return;
|
|
23138
23164
|
}
|
|
23139
23165
|
const missingFeed = positionsMissingRequiredFeed(p.targeting);
|
|
@@ -23145,13 +23171,13 @@ function validateAdSetPlacements(p, ctx) {
|
|
|
23145
23171
|
});
|
|
23146
23172
|
}
|
|
23147
23173
|
for (const issue of invalidPlacementValues(p.targeting)) {
|
|
23148
|
-
if (issue.kind
|
|
23174
|
+
if (issue.kind === "unknown") {
|
|
23149
23175
|
continue;
|
|
23150
23176
|
}
|
|
23151
23177
|
ctx.addIssue({
|
|
23152
23178
|
code: "custom",
|
|
23153
23179
|
path: ["targeting", issue.field],
|
|
23154
|
-
message: `${issue.field} does not accept "${issue.value}". ${issue.fix} (${PLACEMENT_TARGETING_DOC})`
|
|
23180
|
+
message: issue.kind === "retired" ? `${issue.field} no longer accepts "${issue.value}". ${issue.fix} (${PLACEMENT_TARGETING_DOC})` : `${issue.field} does not accept "${issue.value}". ${issue.fix} (${PLACEMENT_TARGETING_DOC})`
|
|
23155
23181
|
});
|
|
23156
23182
|
}
|
|
23157
23183
|
for (const message of placementCoRequirementIssues(p.targeting)) {
|