@koda-sl/baker-cli 0.120.0-dev.3b02f951b → 0.120.0-dev.3bcc79f9c

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.
@@ -97,7 +97,6 @@ declare const CanvasSchema: z.ZodObject<{
97
97
  voice_convert_node: z.ZodString;
98
98
  scene_s: z.ZodOptional<z.ZodNumber>;
99
99
  est_speech_s: z.ZodOptional<z.ZodNumber>;
100
- speech_words: z.ZodOptional<z.ZodNumber>;
101
100
  }, z.core.$strip>, z.ZodObject<{
102
101
  scene: z.ZodNumber;
103
102
  lipsync_node: z.ZodString;
@@ -8,8 +8,7 @@ import {
8
8
  defaultRegistry,
9
9
  generateCatalog,
10
10
  validateCanvasDeep
11
- } from "../chunk-AWSEBYP4.js";
12
- import "../chunk-5WRI5ZAA.js";
11
+ } from "../chunk-OCMOQOIJ.js";
13
12
  export {
14
13
  BackendClient,
15
14
  Engine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koda-sl/baker-cli",
3
- "version": "0.120.0-dev.3b02f951b",
3
+ "version": "0.120.0-dev.3bcc79f9c",
4
4
  "description": "AI-agent-first CLI for interacting with Baker, including the Baker creative canvas.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,31 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- export {
28
- __commonJS,
29
- __toESM
30
- };
31
- //# sourceMappingURL=chunk-5WRI5ZAA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,97 +0,0 @@
1
- import {
2
- handleConnectionError,
3
- writeAdsJson
4
- } from "./chunk-ISFSUDEQ.js";
5
- import {
6
- ApiError
7
- } from "./chunk-K47Q73CK.js";
8
- import {
9
- getEnv
10
- } from "./chunk-YTEAWSEM.js";
11
-
12
- // src/commands/ads/meta/shared.ts
13
- var DAY_MS = 864e5;
14
- function handleMetaError(err) {
15
- if (err instanceof ApiError) {
16
- if (err.code === "UNAUTHORIZED" || err.code === "NOT_FOUND") {
17
- handleConnectionError("meta_ads", err.message);
18
- }
19
- const envelope = {
20
- ok: false,
21
- error: {
22
- code: err.code,
23
- message: err.message,
24
- fix: { action: "reject", explanation: err.message },
25
- retryable: err.code === "RATE_LIMITED" || err.code === "INTERNAL_ERROR"
26
- }
27
- };
28
- writeAdsJson(envelope);
29
- process.exit(1);
30
- }
31
- const message = err instanceof Error ? err.message : "Unexpected error";
32
- writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message } });
33
- process.exit(1);
34
- }
35
- var ACCOUNT_ID_RE = /^(act_)?[0-9]+$/;
36
- function resolveAccountIdArg(args) {
37
- const fromArgs = args["account-id"];
38
- const id = fromArgs || getEnv().BAKER_META_AD_ACCOUNT_ID;
39
- if (!id) {
40
- writeAdsJson({
41
- ok: false,
42
- error: {
43
- code: "MISSING_ACCOUNT_ID",
44
- message: "Pass --account-id or set BAKER_META_AD_ACCOUNT_ID. Run `baker ads meta accounts` to find IDs."
45
- }
46
- });
47
- process.exit(1);
48
- }
49
- if (!ACCOUNT_ID_RE.test(id)) {
50
- writeAdsJson({
51
- ok: false,
52
- error: {
53
- code: "INVALID_ACCOUNT_ID",
54
- message: `Invalid account ID "${id}". Expected numeric ID, optionally prefixed with "act_".`
55
- }
56
- });
57
- process.exit(1);
58
- }
59
- return id.startsWith("act_") ? id : `act_${id}`;
60
- }
61
- function getDateRange(args) {
62
- const datePreset = args["date-preset"];
63
- const since = args.since;
64
- const until = args.until;
65
- if (since && until) return { since, until };
66
- return { datePreset: datePreset ?? "last_7d" };
67
- }
68
- function todayIso() {
69
- return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
70
- }
71
- function daysAgoIso(days) {
72
- return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);
73
- }
74
- function csvOrJson(args) {
75
- return args.output ?? "json";
76
- }
77
- function resolveEffectiveStatus(args) {
78
- if (args["all-statuses"]) {
79
- return void 0;
80
- }
81
- const explicit = args["effective-status"];
82
- if (explicit) {
83
- return explicit;
84
- }
85
- return "ACTIVE";
86
- }
87
-
88
- export {
89
- handleMetaError,
90
- resolveAccountIdArg,
91
- getDateRange,
92
- todayIso,
93
- daysAgoIso,
94
- csvOrJson,
95
- resolveEffectiveStatus
96
- };
97
- //# sourceMappingURL=chunk-AVJ3B6LC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/commands/ads/meta/shared.ts"],"sourcesContent":["import { ApiError } from \"../../../client.ts\";\nimport { getEnv } from \"../../../env.ts\";\nimport { handleConnectionError } from \"../../../error-handler.ts\";\nimport { writeAdsJson } from \"../output.ts\";\nimport type { AdsErrorEnvelope } from \"../types.ts\";\n\nconst DAY_MS = 86_400_000;\n\nexport function handleMetaError(err: unknown): never {\n if (err instanceof ApiError) {\n if (err.code === \"UNAUTHORIZED\" || err.code === \"NOT_FOUND\") {\n handleConnectionError(\"meta_ads\", err.message);\n }\n const envelope: AdsErrorEnvelope = {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n fix: { action: \"reject\", explanation: err.message },\n retryable: err.code === \"RATE_LIMITED\" || err.code === \"INTERNAL_ERROR\",\n },\n };\n writeAdsJson(envelope);\n process.exit(1);\n }\n const message = err instanceof Error ? err.message : \"Unexpected error\";\n writeAdsJson({ ok: false, error: { code: \"NETWORK_ERROR\", message } });\n process.exit(1);\n}\n\nconst ACCOUNT_ID_RE = /^(act_)?[0-9]+$/;\n\n/** Pull the default Meta ad account ID from `--account-id` arg or `BAKER_META_AD_ACCOUNT_ID` env. */\nexport function resolveAccountIdArg(args: Record<string, unknown>): string {\n const fromArgs = args[\"account-id\"] as string | undefined;\n const id = fromArgs || getEnv().BAKER_META_AD_ACCOUNT_ID;\n if (!id) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"MISSING_ACCOUNT_ID\",\n message: \"Pass --account-id or set BAKER_META_AD_ACCOUNT_ID. Run `baker ads meta accounts` to find IDs.\",\n },\n });\n process.exit(1);\n }\n if (!ACCOUNT_ID_RE.test(id)) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"INVALID_ACCOUNT_ID\",\n message: `Invalid account ID \"${id}\". Expected numeric ID, optionally prefixed with \"act_\".`,\n },\n });\n process.exit(1);\n }\n return id.startsWith(\"act_\") ? id : `act_${id}`;\n}\n\nexport function getDateRange(args: Record<string, unknown>): { datePreset?: string; since?: string; until?: string } {\n const datePreset = args[\"date-preset\"] as string | undefined;\n const since = args.since as string | undefined;\n const until = args.until as string | undefined;\n if (since && until) return { since, until };\n return { datePreset: datePreset ?? \"last_7d\" };\n}\n\nexport function todayIso(): string {\n return new Date().toISOString().slice(0, 10);\n}\n\nexport function daysAgoIso(days: number): string {\n return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);\n}\n\nexport function csvOrJson(args: Record<string, unknown>): string {\n return (args.output as string | undefined) ?? \"json\";\n}\n\n/**\n * Default to ACTIVE-only on listings — that's almost always what an AI agent or\n * a human glance wants. Pass `--effective-status ACTIVE,PAUSED` to override, or\n * `--all-statuses` to drop the filter entirely.\n */\nexport function resolveEffectiveStatus(args: Record<string, unknown>): string | undefined {\n if (args[\"all-statuses\"]) {\n return undefined;\n }\n const explicit = args[\"effective-status\"] as string | undefined;\n if (explicit) {\n return explicit;\n }\n return \"ACTIVE\";\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAM,SAAS;AAER,SAAS,gBAAgB,KAAqB;AACnD,MAAI,eAAe,UAAU;AAC3B,QAAI,IAAI,SAAS,kBAAkB,IAAI,SAAS,aAAa;AAC3D,4BAAsB,YAAY,IAAI,OAAO;AAAA,IAC/C;AACA,UAAM,WAA6B;AAAA,MACjC,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM,IAAI;AAAA,QACV,SAAS,IAAI;AAAA,QACb,KAAK,EAAE,QAAQ,UAAU,aAAa,IAAI,QAAQ;AAAA,QAClD,WAAW,IAAI,SAAS,kBAAkB,IAAI,SAAS;AAAA,MACzD;AAAA,IACF;AACA,iBAAa,QAAQ;AACrB,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU;AACrD,eAAa,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,iBAAiB,QAAQ,EAAE,CAAC;AACrE,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAM,gBAAgB;AAGf,SAAS,oBAAoB,MAAuC;AACzE,QAAM,WAAW,KAAK,YAAY;AAClC,QAAM,KAAK,YAAY,OAAO,EAAE;AAChC,MAAI,CAAC,IAAI;AACP,iBAAa;AAAA,MACX,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF,CAAC;AACD,YAAQ,KAAK,CAAC;AAAA,EA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