@koda-sl/baker-cli 0.411.0 → 0.412.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/README.md +2 -0
- package/dist/{chunk-KTMFHBN6.js → chunk-4Q7EDLEC.js} +3 -3
- package/dist/{chunk-ISCXDKWB.js → chunk-ASON7WRD.js} +9 -1
- package/dist/{chunk-ISCXDKWB.js.map → chunk-ASON7WRD.js.map} +1 -1
- package/dist/{chunk-ISJOVAJP.js → chunk-EXFQDO6T.js} +2 -2
- package/dist/{chunk-S5BY45H7.js → chunk-FLERTMEW.js} +3 -3
- package/dist/{chunk-VKWHVMMD.js → chunk-G7YB37RQ.js} +3 -3
- package/dist/{chunk-ZIOW64BL.js → chunk-PLH5K6RI.js} +4 -4
- package/dist/cli.js +38 -18
- package/dist/cli.js.map +1 -1
- package/dist/{client-AY6TPFQ4.js → client-22ED7NUR.js} +4 -4
- package/dist/engine/index.js +3 -3
- package/dist/{env-CWEGTJF3.js → env-E565GJBV.js} +2 -2
- package/dist/{output-EPF3HHJ4.js → output-F6NKGZ6E.js} +5 -5
- package/dist/{shared-53G34I3U.js → shared-YSUGIUS4.js} +6 -6
- package/package.json +1 -1
- /package/dist/{chunk-KTMFHBN6.js.map → chunk-4Q7EDLEC.js.map} +0 -0
- /package/dist/{chunk-ISJOVAJP.js.map → chunk-EXFQDO6T.js.map} +0 -0
- /package/dist/{chunk-S5BY45H7.js.map → chunk-FLERTMEW.js.map} +0 -0
- /package/dist/{chunk-VKWHVMMD.js.map → chunk-G7YB37RQ.js.map} +0 -0
- /package/dist/{chunk-ZIOW64BL.js.map → chunk-PLH5K6RI.js.map} +0 -0
- /package/dist/{client-AY6TPFQ4.js.map → client-22ED7NUR.js.map} +0 -0
- /package/dist/{env-CWEGTJF3.js.map → env-E565GJBV.js.map} +0 -0
- /package/dist/{output-EPF3HHJ4.js.map → output-F6NKGZ6E.js.map} +0 -0
- /package/dist/{shared-53G34I3U.js.map → shared-YSUGIUS4.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
debugLogSetting
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ASON7WRD.js";
|
|
4
4
|
|
|
5
5
|
// src/debugLog.ts
|
|
6
6
|
import { appendFileSync, mkdirSync, renameSync, statSync } from "fs";
|
|
@@ -173,4 +173,4 @@ export {
|
|
|
173
173
|
readBodyForLog,
|
|
174
174
|
installStreamTaps
|
|
175
175
|
};
|
|
176
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-EXFQDO6T.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
debugLogHttp,
|
|
3
3
|
readBodyForLog
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EXFQDO6T.js";
|
|
5
5
|
import {
|
|
6
6
|
getEnv
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ASON7WRD.js";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var MAX_RATE_LIMIT_RETRIES = 3;
|
|
@@ -208,4 +208,4 @@ export {
|
|
|
208
208
|
apiGet,
|
|
209
209
|
apiPost
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
211
|
+
//# sourceMappingURL=chunk-FLERTMEW.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
3
|
apiGet
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FLERTMEW.js";
|
|
5
5
|
import {
|
|
6
6
|
getEnv
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ASON7WRD.js";
|
|
8
8
|
|
|
9
9
|
// src/error-handler.ts
|
|
10
10
|
var REQUEST_CONNECTION_PLATFORM = {
|
|
@@ -298,4 +298,4 @@ export {
|
|
|
298
298
|
writeAdsOutput,
|
|
299
299
|
resolveCustomerId
|
|
300
300
|
};
|
|
301
|
-
//# sourceMappingURL=chunk-
|
|
301
|
+
//# sourceMappingURL=chunk-G7YB37RQ.js.map
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
handleConnectionError,
|
|
3
3
|
needsConnectionFix,
|
|
4
4
|
writeAdsJson
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G7YB37RQ.js";
|
|
6
6
|
import {
|
|
7
7
|
ApiError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FLERTMEW.js";
|
|
9
9
|
import {
|
|
10
10
|
getEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ASON7WRD.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/ads/meta/shared.ts
|
|
14
14
|
var DAY_MS = 864e5;
|
|
@@ -133,4 +133,4 @@ export {
|
|
|
133
133
|
resolveEffectiveStatus,
|
|
134
134
|
statusFilterHints
|
|
135
135
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
136
|
+
//# sourceMappingURL=chunk-PLH5K6RI.js.map
|
package/dist/cli.js
CHANGED
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
withoutCastName,
|
|
98
98
|
wordCount,
|
|
99
99
|
ytDlpBlockSignal
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-4Q7EDLEC.js";
|
|
101
101
|
import {
|
|
102
102
|
NAME_CONTAINS_ARG,
|
|
103
103
|
csvOrJson,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
resolveEffectiveStatus,
|
|
109
109
|
statusFilterHints,
|
|
110
110
|
todayIso
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-PLH5K6RI.js";
|
|
112
112
|
import {
|
|
113
113
|
buildQueryCacheKey,
|
|
114
114
|
cacheGet,
|
|
@@ -124,19 +124,19 @@ import {
|
|
|
124
124
|
writeAdsJson,
|
|
125
125
|
writeAdsOutput,
|
|
126
126
|
writeJsonEnvelope
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-G7YB37RQ.js";
|
|
128
128
|
import {
|
|
129
129
|
ApiError,
|
|
130
130
|
apiGet,
|
|
131
131
|
apiGetWithHeaders,
|
|
132
132
|
apiPost,
|
|
133
133
|
validateConvexId
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-FLERTMEW.js";
|
|
135
135
|
import {
|
|
136
136
|
installExitRecord,
|
|
137
137
|
installStreamTaps,
|
|
138
138
|
logInvocation
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-EXFQDO6T.js";
|
|
140
140
|
import {
|
|
141
141
|
__commonJS,
|
|
142
142
|
__esm,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
winningAdNormalizer,
|
|
172
172
|
writeJson,
|
|
173
173
|
writeOutput
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-ASON7WRD.js";
|
|
175
175
|
|
|
176
176
|
// ../../node_modules/.pnpm/i18n-iso-countries@7.14.0/node_modules/i18n-iso-countries/langs/af.json
|
|
177
177
|
var require_af = __commonJS({
|
|
@@ -30389,7 +30389,11 @@ var videoAnalysisSchema = z35.object({
|
|
|
30389
30389
|
shotStyle: z35.string(),
|
|
30390
30390
|
audioStyle: z35.string(),
|
|
30391
30391
|
hook: z35.string(),
|
|
30392
|
-
usageNotes: z35.string()
|
|
30392
|
+
usageNotes: z35.string(),
|
|
30393
|
+
// Optional because rows analysed before analysis version 2 do not carry them.
|
|
30394
|
+
format: z35.string().optional(),
|
|
30395
|
+
tone: z35.string().optional(),
|
|
30396
|
+
productClaims: z35.array(z35.string()).optional()
|
|
30393
30397
|
});
|
|
30394
30398
|
var videoDocSchema = z35.object({
|
|
30395
30399
|
_id: z35.string(),
|
|
@@ -53578,10 +53582,10 @@ Example: baker ads meta ads retag 120252158038400247 --url-tags "utm_source={{si
|
|
|
53578
53582
|
}
|
|
53579
53583
|
},
|
|
53580
53584
|
run: async ({ args: args8 }) => {
|
|
53581
|
-
const { apiPost: apiPost2 } = await import("./client-
|
|
53582
|
-
const { requireChatId: requireChatId2 } = await import("./env-
|
|
53583
|
-
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-
|
|
53584
|
-
const { handleMetaError: handleMetaError2 } = await import("./shared-
|
|
53585
|
+
const { apiPost: apiPost2 } = await import("./client-22ED7NUR.js");
|
|
53586
|
+
const { requireChatId: requireChatId2 } = await import("./env-E565GJBV.js");
|
|
53587
|
+
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-F6NKGZ6E.js");
|
|
53588
|
+
const { handleMetaError: handleMetaError2 } = await import("./shared-YSUGIUS4.js");
|
|
53585
53589
|
try {
|
|
53586
53590
|
const accountId = bareAccountId2(args8);
|
|
53587
53591
|
const urlTags = typeof args8["url-tags"] === "string" ? args8["url-tags"] : void 0;
|
|
@@ -53732,10 +53736,10 @@ function duplicateCommand2(entity, label) {
|
|
|
53732
53736
|
replace: { type: "boolean", description: "Pause the original once the copy publishes" }
|
|
53733
53737
|
},
|
|
53734
53738
|
run: async ({ args: args8 }) => {
|
|
53735
|
-
const { apiPost: apiPost2 } = await import("./client-
|
|
53736
|
-
const { requireChatId: requireChatId2 } = await import("./env-
|
|
53737
|
-
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-
|
|
53738
|
-
const { handleMetaError: handleMetaError2 } = await import("./shared-
|
|
53739
|
+
const { apiPost: apiPost2 } = await import("./client-22ED7NUR.js");
|
|
53740
|
+
const { requireChatId: requireChatId2 } = await import("./env-E565GJBV.js");
|
|
53741
|
+
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-F6NKGZ6E.js");
|
|
53742
|
+
const { handleMetaError: handleMetaError2 } = await import("./shared-YSUGIUS4.js");
|
|
53739
53743
|
try {
|
|
53740
53744
|
const accountId = bareAccountId2(args8);
|
|
53741
53745
|
const chatId = requireChatId2();
|
|
@@ -98527,6 +98531,22 @@ registerSchema({
|
|
|
98527
98531
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
98528
98532
|
}
|
|
98529
98533
|
});
|
|
98534
|
+
function searchHints(results) {
|
|
98535
|
+
const hints2 = [];
|
|
98536
|
+
const parody = results.filter((r) => r.analysis?.tone === "parody").map((r) => r._id);
|
|
98537
|
+
if (parody.length > 0) {
|
|
98538
|
+
hints2.push(
|
|
98539
|
+
`tone: parody \u2014 ${parody.join(", ")}. These play the offer for laughs: fine for a social post, wrong as proof or on a landing page.`
|
|
98540
|
+
);
|
|
98541
|
+
}
|
|
98542
|
+
const unchecked = results.filter((r) => r.analysis?.tone === void 0).map((r) => r._id);
|
|
98543
|
+
if (unchecked.length > 0) {
|
|
98544
|
+
hints2.push(
|
|
98545
|
+
`No format/tone/productClaims yet \u2014 ${unchecked.join(", ")}. Before putting one on a page, read its transcript, scenes and people (\`baker videos get <id> --full\`) and judge it yourself: is it about the offer, is it sincere, and who is speaking?`
|
|
98546
|
+
);
|
|
98547
|
+
}
|
|
98548
|
+
return hints2.length > 0 ? hints2 : void 0;
|
|
98549
|
+
}
|
|
98530
98550
|
var searchCommand5 = defineCommand265({
|
|
98531
98551
|
meta: {
|
|
98532
98552
|
name: "search",
|
|
@@ -98556,7 +98576,7 @@ var searchCommand5 = defineCommand265({
|
|
|
98556
98576
|
}
|
|
98557
98577
|
const data = await apiPost("/api/videos/search", body);
|
|
98558
98578
|
writeOutput(
|
|
98559
|
-
{ ok: true, data },
|
|
98579
|
+
{ ok: true, data, hints: searchHints(data) },
|
|
98560
98580
|
args8.output || "json",
|
|
98561
98581
|
args8.fields ? args8.fields.split(",") : void 0,
|
|
98562
98582
|
args8.full,
|
|
@@ -99420,7 +99440,7 @@ function buildSearchBody2(args8) {
|
|
|
99420
99440
|
}
|
|
99421
99441
|
return body;
|
|
99422
99442
|
}
|
|
99423
|
-
function
|
|
99443
|
+
function searchHints2(data) {
|
|
99424
99444
|
const hints2 = [];
|
|
99425
99445
|
if ((data.following_count ?? 0) === 0) {
|
|
99426
99446
|
hints2.push(
|
|
@@ -99535,7 +99555,7 @@ function searchRejection(args8, body) {
|
|
|
99535
99555
|
}
|
|
99536
99556
|
function writeSearchResult(data, opts) {
|
|
99537
99557
|
const rawResults = Array.isArray(data?.results) ? data.results : [];
|
|
99538
|
-
const hints2 =
|
|
99558
|
+
const hints2 = searchHints2(data ?? {});
|
|
99539
99559
|
const withHints2 = hints2.length > 0 ? { hints: hints2 } : {};
|
|
99540
99560
|
if (opts.output === "json") {
|
|
99541
99561
|
const results = rawResults.map((r) => winningAdNormalizer(r, opts.full));
|