@koda-sl/baker-cli 0.145.0 → 0.146.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/README.md +1 -1
- package/dist/cli.js +20 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -486,7 +486,7 @@ baker ads google draft remove g_temp_ab12 # cascades to dependents
|
|
|
486
486
|
baker ads google draft clear
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets` (create/update/attach/detach), `asset-groups` (create/update — Performance Max), `audiences`, `conversions`, `bidding-strategies`, `labels`, `campaign-criteria`, and `draft`. Amounts are in major currency units (converted to micros). Money/bids: `--amount`, `--cpc-bid`, `--target-cpa` take major units; `--target-roas` a ratio. Less-common ops accept a `--file <payload.json>` (flags override file keys). Updates target a resource name or bare id as the positional argument; a target that names an op staged earlier **amends it in place**.
|
|
489
|
+
Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets` (create/update/attach/detach), `asset-groups` (create/update — Performance Max), `audiences`, `conversions`, `bidding-strategies`, `labels`, `campaign-criteria`, and `draft`. Amounts are in major currency units (converted to micros). Money/bids: `--amount`, `--cpc-bid`, `--target-cpa`, `--max-cpc` take major units; `--target-roas` a ratio. `--max-cpc` sets the max CPC bid ceiling for `TARGET_IMPRESSION_SHARE` / `TARGET_SPEND` / `PERCENT_CPC` and must be paired with `--bidding-strategy`. Less-common ops accept a `--file <payload.json>` (flags override file keys). Updates target a resource name or bare id as the positional argument; a target that names an op staged earlier **amends it in place**.
|
|
490
490
|
|
|
491
491
|
**Reviewing the draft** — `baker ads google draft list` renders everything you've staged as a grouped campaign ▸ ad group ▸ ad tree (with the simulated/live mode banner and non-blocking completeness advisories), the CLI counterpart to the dashboard's Google Ads tab. Pass `--json` for the raw envelope. Aim for a fully built campaign — 2–4 ad groups, ≥5 keywords each, 2–4 RSAs with 8–12 headlines, ≥4 sitelinks / ≥3 callouts / ≥1 structured snippet, and ≥1 shared negative list; the advisories flag what's still thin.
|
|
492
492
|
|
package/dist/cli.js
CHANGED
|
@@ -7099,17 +7099,34 @@ var budgetsCommand = defineCommand29({
|
|
|
7099
7099
|
})
|
|
7100
7100
|
}
|
|
7101
7101
|
});
|
|
7102
|
+
var MAX_CPC_STRATEGIES = ["TARGET_IMPRESSION_SHARE", "TARGET_SPEND", "PERCENT_CPC"];
|
|
7102
7103
|
function biddingFromFlags(args) {
|
|
7103
7104
|
const type = args["bidding-strategy"];
|
|
7105
|
+
const maxCpcMicros = microsFlag(args["max-cpc"], "--max-cpc");
|
|
7104
7106
|
if (!type) {
|
|
7107
|
+
if (maxCpcMicros !== void 0) {
|
|
7108
|
+
failWriteValidation(
|
|
7109
|
+
"--max-cpc needs --bidding-strategy too (the ceiling belongs to a strategy) \u2014 e.g. --bidding-strategy TARGET_IMPRESSION_SHARE --max-cpc 12"
|
|
7110
|
+
);
|
|
7111
|
+
}
|
|
7105
7112
|
return void 0;
|
|
7106
7113
|
}
|
|
7114
|
+
if (maxCpcMicros !== void 0 && !MAX_CPC_STRATEGIES.includes(type.toUpperCase())) {
|
|
7115
|
+
failWriteValidation(`${type} does not take --max-cpc \u2014 only ${MAX_CPC_STRATEGIES.join(", ")} carry a bid ceiling`);
|
|
7116
|
+
}
|
|
7107
7117
|
return {
|
|
7108
7118
|
type,
|
|
7109
7119
|
targetCpaMicros: microsFlag(args["target-cpa"], "--target-cpa"),
|
|
7110
|
-
targetRoas: args["target-roas"] !== void 0 ? Number(args["target-roas"]) : void 0
|
|
7120
|
+
targetRoas: args["target-roas"] !== void 0 ? Number(args["target-roas"]) : void 0,
|
|
7121
|
+
cpcBidCeilingMicros: maxCpcMicros
|
|
7111
7122
|
};
|
|
7112
7123
|
}
|
|
7124
|
+
var maxCpcArg = {
|
|
7125
|
+
"max-cpc": {
|
|
7126
|
+
type: "string",
|
|
7127
|
+
description: "Max CPC bid ceiling (major units) for TARGET_IMPRESSION_SHARE, TARGET_SPEND or PERCENT_CPC"
|
|
7128
|
+
}
|
|
7129
|
+
};
|
|
7113
7130
|
var campaignsCommand = defineCommand29({
|
|
7114
7131
|
meta: { name: "campaigns", description: "Stage campaign create/update/pause/resume/remove" },
|
|
7115
7132
|
subCommands: {
|
|
@@ -7131,6 +7148,7 @@ var campaignsCommand = defineCommand29({
|
|
|
7131
7148
|
},
|
|
7132
7149
|
"target-cpa": { type: "string", description: "Target CPA (major units) for TARGET_CPA" },
|
|
7133
7150
|
"target-roas": { type: "string", description: "Target ROAS (e.g. 4.0) for TARGET_ROAS" },
|
|
7151
|
+
...maxCpcArg,
|
|
7134
7152
|
objective: { type: "string", description: "Advisory UI objective (SALES, LEADS, \u2026)" },
|
|
7135
7153
|
"start-date": { type: "string", description: "YYYY-MM-DD" },
|
|
7136
7154
|
"end-date": { type: "string", description: "YYYY-MM-DD" },
|
|
@@ -7162,6 +7180,7 @@ var campaignsCommand = defineCommand29({
|
|
|
7162
7180
|
"bidding-strategy": { type: "string" },
|
|
7163
7181
|
"target-cpa": { type: "string" },
|
|
7164
7182
|
"target-roas": { type: "string" },
|
|
7183
|
+
...maxCpcArg,
|
|
7165
7184
|
status: { type: "string" }
|
|
7166
7185
|
},
|
|
7167
7186
|
run: async ({ args }) => {
|