@koda-sl/baker-cli 0.177.0-dev.0cbdaa224 → 0.178.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
@@ -36,7 +36,7 @@ import {
36
36
  toModelSafeImage,
37
37
  ulid,
38
38
  validateCanvasDeep
39
- } from "./chunk-QPVJGKV7.js";
39
+ } from "./chunk-P2T3IZRE.js";
40
40
  import {
41
41
  csvOrJson,
42
42
  daysAgoIso,
@@ -2892,6 +2892,7 @@ var historyCategorySchema = z9.enum([
2892
2892
  "creative",
2893
2893
  "report",
2894
2894
  "domain",
2895
+ "hosting",
2895
2896
  "integration",
2896
2897
  "tag_manager"
2897
2898
  ]);
@@ -9962,6 +9963,16 @@ function keywordKillHints(status) {
9962
9963
  const kills = typeof status === "string" && ["PAUSED", "REMOVED"].includes(status.toUpperCase());
9963
9964
  return kills ? KEYWORD_KILL_HINTS : [];
9964
9965
  }
9966
+ function keywordFinalUrlHints(finalUrl, count) {
9967
+ if (typeof finalUrl !== "string" || finalUrl.length === 0) {
9968
+ return [];
9969
+ }
9970
+ return count > 1 ? [
9971
+ `--final-url applied the same landing page to all ${count} keywords. A keyword-level URL only earns its place when that keyword must land somewhere the ad doesn't \u2014 one URL shared by every keyword belongs on the ad instead. Re-stage without --final-url unless the destinations genuinely differ per keyword, and set the ad's final URL to this page.`
9972
+ ] : [
9973
+ "Keep --final-url only if this keyword's destination differs from the ad's final URL \u2014 otherwise drop it and let the keyword inherit the ad's landing page."
9974
+ ];
9975
+ }
9965
9976
  var keywordWriteSubcommands = {
9966
9977
  add: defineCommand30({
9967
9978
  meta: { name: "add", description: "Add keyword(s) to an ad group \u2014 one --text or a whole batch" },
@@ -9975,19 +9986,24 @@ var keywordWriteSubcommands = {
9975
9986
  file: { type: "string", description: "Text file with one keyword[:MATCH_TYPE] per line" },
9976
9987
  "match-type": { type: "string", description: "Default match type: EXACT | PHRASE | BROAD" },
9977
9988
  "cpc-bid": { type: "string", description: "Keyword CPC bid in major units (applies to all)" },
9978
- "final-url": { type: "string", description: "Keyword-level final URL (applies to all)" }
9989
+ "final-url": {
9990
+ type: "string",
9991
+ description: "Rarely needed: send THIS keyword to a page the ad doesn't go to. Applies to every keyword in the call, so leave it unset unless the destination is keyword-specific \u2014 otherwise set the ad's final URL"
9992
+ }
9979
9993
  },
9980
9994
  run: async ({ args }) => {
9981
9995
  const customerId = requireCustomerId(args);
9982
9996
  const adGroup = requireStringFlag(args["ad-group-ref"], "--ad-group-ref");
9983
9997
  const cpcBidMicros = microsFlag(args["cpc-bid"], "--cpc-bid");
9984
9998
  const finalUrls = args["final-url"] ? [args["final-url"]] : void 0;
9999
+ const entries = keywordEntries(args);
9985
10000
  await stageGoogleOps(
9986
- keywordEntries(args).map((entry) => ({
10001
+ entries.map((entry) => ({
9987
10002
  kind: "google.keyword.add",
9988
10003
  customerId,
9989
10004
  payload: { adGroup, text: entry.text, matchType: entry.matchType, cpcBidMicros, finalUrls }
9990
- }))
10005
+ })),
10006
+ keywordFinalUrlHints(args["final-url"], entries.length)
9991
10007
  );
9992
10008
  }
9993
10009
  }),