@koda-sl/baker-cli 0.174.0 → 0.176.0-dev.46d2675ee

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.
Files changed (29) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-7I2POXSJ.js → chunk-K3PWXVF7.js} +2 -2
  3. package/dist/{chunk-7QMWNMRW.js → chunk-PXXJ3HJW.js} +4 -4
  4. package/dist/{chunk-CG6OTNUU.js → chunk-QPVJGKV7.js} +6 -6
  5. package/dist/chunk-QPVJGKV7.js.map +1 -0
  6. package/dist/{chunk-TFPZLUVM.js → chunk-X5C6HE24.js} +5 -5
  7. package/dist/chunk-X5C6HE24.js.map +1 -0
  8. package/dist/{chunk-RK67WL4O.js → chunk-YL3HDEIJ.js} +6 -2
  9. package/dist/{chunk-RK67WL4O.js.map → chunk-YL3HDEIJ.js.map} +1 -1
  10. package/dist/{chunk-ZH6ZNYPB.js → chunk-ZWYQIEBI.js} +3 -3
  11. package/dist/cli.js +690 -74
  12. package/dist/cli.js.map +1 -1
  13. package/dist/client-PJ7ID35L.js +15 -0
  14. package/dist/engine/index.js +3 -3
  15. package/dist/env-6QJCMTRK.js +13 -0
  16. package/dist/{output-FL7WRIJF.js → output-NWX3YW64.js} +5 -5
  17. package/dist/{shared-OIYLDW3G.js → shared-5ZEOG664.js} +6 -6
  18. package/package.json +1 -1
  19. package/dist/chunk-CG6OTNUU.js.map +0 -1
  20. package/dist/chunk-TFPZLUVM.js.map +0 -1
  21. package/dist/client-XRQWOADV.js +0 -15
  22. package/dist/env-3JMYIH25.js +0 -11
  23. /package/dist/{chunk-7I2POXSJ.js.map → chunk-K3PWXVF7.js.map} +0 -0
  24. /package/dist/{chunk-7QMWNMRW.js.map → chunk-PXXJ3HJW.js.map} +0 -0
  25. /package/dist/{chunk-ZH6ZNYPB.js.map → chunk-ZWYQIEBI.js.map} +0 -0
  26. /package/dist/{client-XRQWOADV.js.map → client-PJ7ID35L.js.map} +0 -0
  27. /package/dist/{env-3JMYIH25.js.map → env-6QJCMTRK.js.map} +0 -0
  28. /package/dist/{output-FL7WRIJF.js.map → output-NWX3YW64.js.map} +0 -0
  29. /package/dist/{shared-OIYLDW3G.js.map → shared-5ZEOG664.js.map} +0 -0
package/README.md CHANGED
@@ -577,6 +577,14 @@ baker ads google draft show g_temp_ab12 # full staged payload — the recei
577
577
  baker ads google draft amend g_temp_ab12 --patch '{"amountMicros": 60000000}' # update in place, never remove+recreate
578
578
  baker ads google draft remove g_temp_ab12 # cascades to dependents
579
579
  baker ads google draft clear
580
+
581
+ # Read an earlier chat's changes (read-only; staging stays on the current chat)
582
+ baker ads google draft list --chat <chat-id>
583
+ baker ads google draft show --chat <chat-id> g_temp_ab12
584
+ baker ads meta draft show --chat <chat-id> meta_temp_ab12
585
+ baker ads linkedin draft show --chat <chat-id> li_temp_ab12
586
+ baker tag-manager draft show --chat <chat-id> gtm_temp_ab12
587
+ baker actions draft --chat <chat-id>
580
588
  ```
581
589
 
582
590
  Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets` (create/update/attach/detach), `asset-groups` (create/update/attach/detach — Performance Max), `audiences`, `conversions` (create/update/goal), `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**.
@@ -591,6 +599,8 @@ Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remo
591
599
 
592
600
  **Amending a staged op** — `draft amend <ref> (--file patch.json | --patch '<json>')` merges a JSON patch into an already-staged op's payload (objects deep-merge, `null` deletes a key, arrays/scalars replace) and re-validates it in full. Always prefer this over removing and re-staging — it preserves the op's ref (so dependents don't break) and its position in the draft. `draft show <ref>` prints the full staged payload (including warnings/annotations) so you can verify a change looks right before publish.
593
601
 
602
+ **Reading an earlier chat's changes** — `draft list` and `draft show` take `--chat <chat-id>` to read another chat in the same company instead of the current one. Every staged-draft family accepts it: `ads google|meta|linkedin draft list|show`, `tag-manager draft list|show`, `actions draft`, `tags draft`, and `scheduled-actions list|get`. A published draft is kept in full, so this returns what that chat actually wrote — every headline, bid and target — plus each op's outcome and error. Use it when asked to redo or reapply earlier work rather than reconstructing copy from a summary. Read-only: staging, `amend`, `remove` and `clear` stay bound to `BAKER_CHAT_ID`, so one chat can never edit another's draft. To re-run only the changes a publish failed to land, use the chat's **Retry** control in the dashboard — it re-sends exactly those and leaves the ones that applied untouched.
603
+
594
604
  **Already-satisfied writes aren't staged** — an update or pause/resume whose every field already holds the requested value on the live account is dropped instead of staged: the envelope returns `"staged": false, "noop": true` with a `reason` ("this ad is already Paused on Google Ads"), plus a hint. This is a success, not an error — there is nothing to publish. Only a positively-read live snapshot can trigger it; a failed or empty read always stages. Batch responses list the dropped ops under `skipped`, and `count` reflects what actually entered the draft.
595
605
 
596
606
  **Batch keyword adds** — `keywords add`, `negative-keywords add`, and `keyword-lists add` take a whole batch in one command: comma-separate `--text` entries and/or pass `--file <list.txt>` (one keyword per line). A `:EXACT`/`:PHRASE`/`:BROAD` suffix per entry overrides the `--match-type` default. Batches stage all-or-nothing as one request (limit 500); each keyword still lands as its own draft op, so it stays individually removable/amendable.
@@ -786,6 +796,7 @@ baker ads meta ads create --account-id act_123 --name "Ad 1" --adset met
786
796
 
787
797
  # review + edit before publish
788
798
  baker ads meta draft
799
+ baker ads meta draft show meta_temp_cr # full staged payload — the receipt before publish
789
800
  baker ads meta draft remove meta_temp_cr # removing a create cascades to dependents
790
801
  baker ads meta draft clear
791
802
  ```
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  debugLogSetting
3
- } from "./chunk-RK67WL4O.js";
3
+ } from "./chunk-YL3HDEIJ.js";
4
4
 
5
5
  // src/debugLog.ts
6
6
  import { appendFileSync, mkdirSync, renameSync, statSync } from "fs";
@@ -150,4 +150,4 @@ export {
150
150
  readBodyForLog,
151
151
  installStreamTaps
152
152
  };
153
- //# sourceMappingURL=chunk-7I2POXSJ.js.map
153
+ //# sourceMappingURL=chunk-K3PWXVF7.js.map
@@ -2,13 +2,13 @@ import {
2
2
  handleConnectionError,
3
3
  needsConnectionFix,
4
4
  writeAdsJson
5
- } from "./chunk-TFPZLUVM.js";
5
+ } from "./chunk-X5C6HE24.js";
6
6
  import {
7
7
  ApiError
8
- } from "./chunk-ZH6ZNYPB.js";
8
+ } from "./chunk-ZWYQIEBI.js";
9
9
  import {
10
10
  getEnv
11
- } from "./chunk-RK67WL4O.js";
11
+ } from "./chunk-YL3HDEIJ.js";
12
12
 
13
13
  // src/commands/ads/meta/shared.ts
14
14
  var DAY_MS = 864e5;
@@ -108,4 +108,4 @@ export {
108
108
  csvOrJson,
109
109
  resolveEffectiveStatus
110
110
  };
111
- //# sourceMappingURL=chunk-7QMWNMRW.js.map
111
+ //# sourceMappingURL=chunk-PXXJ3HJW.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  debugLogHttp,
3
3
  readBodyForLog
4
- } from "./chunk-7I2POXSJ.js";
4
+ } from "./chunk-K3PWXVF7.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __toESM
8
- } from "./chunk-RK67WL4O.js";
8
+ } from "./chunk-YL3HDEIJ.js";
9
9
 
10
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
10
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
11
11
  var require_safe_stable_stringify = __commonJS({
12
- "../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports, module) {
12
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
13
13
  "use strict";
14
14
  var { hasOwnProperty } = Object.prototype;
15
15
  var stringify = configure2();
@@ -1075,7 +1075,7 @@ function resolveAdaptFormats(params) {
1075
1075
  return params.formats ?? [];
1076
1076
  }
1077
1077
 
1078
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
1078
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
1079
1079
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1080
1080
  var configure = import__.default.configure;
1081
1081
  var wrapper_default = import__.default;
@@ -8028,4 +8028,4 @@ export {
8028
8028
  defaultRegistry,
8029
8029
  createEngineFromEnv
8030
8030
  };
8031
- //# sourceMappingURL=chunk-CG6OTNUU.js.map
8031
+ //# sourceMappingURL=chunk-QPVJGKV7.js.map