@koda-sl/baker-cli 0.383.0-dev.2caa8a15e → 0.383.0
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
CHANGED
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
validateCanvasDeep,
|
|
71
71
|
withoutCastName,
|
|
72
72
|
ytDlpBlockSignal
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-FGHMWBUD.js";
|
|
74
74
|
import {
|
|
75
75
|
NAME_CONTAINS_ARG,
|
|
76
76
|
csvOrJson,
|
|
@@ -28398,10 +28398,19 @@ var metaMediaCommand = defineCommand68({
|
|
|
28398
28398
|
|
|
28399
28399
|
// src/commands/ads/meta/pages.ts
|
|
28400
28400
|
import { defineCommand as defineCommand69 } from "citty";
|
|
28401
|
+
function advertisablePages(data) {
|
|
28402
|
+
return data.filter((p) => Array.isArray(p.tasks) && p.tasks.includes("ADVERTISE"));
|
|
28403
|
+
}
|
|
28401
28404
|
function pageSelectionHints(data) {
|
|
28402
|
-
|
|
28405
|
+
const advertisable = advertisablePages(data);
|
|
28406
|
+
if (advertisable.length > 1) {
|
|
28407
|
+
return [
|
|
28408
|
+
"MULTIPLE Pages can run ads \u2014 do NOT guess. Confirm with the user which Page an ad should run from before passing --page to `creatives create`; a wrong Page publishes the ad under the wrong brand identity and staging will not catch it."
|
|
28409
|
+
];
|
|
28410
|
+
}
|
|
28411
|
+
if (data.length > 0 && advertisable.length === 0) {
|
|
28403
28412
|
return [
|
|
28404
|
-
"
|
|
28413
|
+
"NO Page can run ads \u2014 none of the connected user's Pages carry the ADVERTISE task. Ask the user to grant Advertise access to the right Page before creating an ad; a readable-but-non-advertising Page still passes staging and would fail or run under the wrong identity."
|
|
28405
28414
|
];
|
|
28406
28415
|
}
|
|
28407
28416
|
return [];
|
|
@@ -28409,7 +28418,7 @@ function pageSelectionHints(data) {
|
|
|
28409
28418
|
var pagesCommand = defineCommand69({
|
|
28410
28419
|
meta: {
|
|
28411
28420
|
name: "pages",
|
|
28412
|
-
description: `List the Facebook Pages
|
|
28421
|
+
description: `List the Facebook Pages the connected user manages. Every Meta ad publishes from a Page, so use this to identify the Page an ad should run from. The 'tasks' field shows what the user can do on each Page (ADVERTISE means it can back ads). If exactly one Page can ADVERTISE, use it; if more than one can, confirm with the user which Page to use; if none can, ask the user to grant Advertise access \u2014 a wrong or non-advertising Page publishes under the wrong brand identity.
|
|
28413
28422
|
|
|
28414
28423
|
Examples:
|
|
28415
28424
|
baker ads meta pages`
|
|
@@ -28670,7 +28679,7 @@ Discovery:
|
|
|
28670
28679
|
baker ads meta accounts \u2014 accounts in this company's connected scope
|
|
28671
28680
|
baker ads meta accounts --include-all \u2014 every account the token can see
|
|
28672
28681
|
baker ads meta businesses \u2014 Business Manager IDs
|
|
28673
|
-
baker ads meta pages \u2014 Facebook Pages the
|
|
28682
|
+
baker ads meta pages \u2014 Facebook Pages the user manages (an ad's identity)
|
|
28674
28683
|
baker ads meta lead-forms --page-id 100635183117758 \u2014 instant (lead) forms on a Page, with lead counts
|
|
28675
28684
|
baker ads meta leads --form-id 987654321 \u2014 the leads one form collected (contact details masked)
|
|
28676
28685
|
|