@koda-sl/baker-cli 0.393.0-dev.799d3f88c → 0.393.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 +230 -91
- package/dist/{chunk-AOVFDDVW.js → chunk-53ATKV76.js} +13 -2
- package/dist/{chunk-AOVFDDVW.js.map → chunk-53ATKV76.js.map} +1 -1
- package/dist/{chunk-OKE2QJSJ.js → chunk-CEVZG46B.js} +3 -3
- package/dist/{chunk-NEZ3NAJV.js → chunk-F56XWRCY.js} +4 -4
- package/dist/{chunk-QIQ57EIA.js → chunk-S35KWGIQ.js} +2 -2
- package/dist/{chunk-JLKUHDBB.js → chunk-VTLHR3BB.js} +3902 -2432
- package/dist/chunk-VTLHR3BB.js.map +1 -0
- package/dist/{chunk-T2UNK5BW.js → chunk-ZPQ7L33H.js} +3 -3
- package/dist/cli.js +10837 -9639
- package/dist/cli.js.map +1 -1
- package/dist/{client-EQOSDYJL.js → client-ST4W3WRE.js} +4 -4
- package/dist/engine/index.d.ts +178 -117
- package/dist/engine/index.js +3 -3
- package/dist/{env-ANKM47IJ.js → env-HQWFIYZF.js} +2 -2
- package/dist/{output-NR4EJQDV.js → output-BTGDLTVL.js} +5 -5
- package/dist/{shared-SLCDVV45.js → shared-KLQWQWPJ.js} +6 -6
- package/package.json +2 -1
- package/dist/chunk-JLKUHDBB.js.map +0 -1
- /package/dist/{chunk-OKE2QJSJ.js.map → chunk-CEVZG46B.js.map} +0 -0
- /package/dist/{chunk-NEZ3NAJV.js.map → chunk-F56XWRCY.js.map} +0 -0
- /package/dist/{chunk-QIQ57EIA.js.map → chunk-S35KWGIQ.js.map} +0 -0
- /package/dist/{chunk-T2UNK5BW.js.map → chunk-ZPQ7L33H.js.map} +0 -0
- /package/dist/{client-EQOSDYJL.js.map → client-ST4W3WRE.js.map} +0 -0
- /package/dist/{env-ANKM47IJ.js.map → env-HQWFIYZF.js.map} +0 -0
- /package/dist/{output-NR4EJQDV.js.map → output-BTGDLTVL.js.map} +0 -0
- /package/dist/{shared-SLCDVV45.js.map → shared-KLQWQWPJ.js.map} +0 -0
|
@@ -947,6 +947,12 @@ function round2(value) {
|
|
|
947
947
|
function asRecord(value) {
|
|
948
948
|
return value && typeof value === "object" ? value : {};
|
|
949
949
|
}
|
|
950
|
+
function bakerUses(value) {
|
|
951
|
+
const uses = asRecord(value);
|
|
952
|
+
const companies = typeof uses.companies === "number" ? uses.companies : 0;
|
|
953
|
+
if (companies === 0) return {};
|
|
954
|
+
return { baker_uses: companies, ...uses.ours === true ? { already_adapted: true } : {} };
|
|
955
|
+
}
|
|
950
956
|
function compactWinningAd(record) {
|
|
951
957
|
const dna = asRecord(record.dna);
|
|
952
958
|
return {
|
|
@@ -958,7 +964,11 @@ function compactWinningAd(record) {
|
|
|
958
964
|
summary: String(dna.creative_concept ?? ""),
|
|
959
965
|
advertiser_id: String(record.advertiser_id ?? ""),
|
|
960
966
|
ad_id: String(record.ad_id ?? ""),
|
|
961
|
-
media_url: String(record.media_url ?? "")
|
|
967
|
+
media_url: String(record.media_url ?? ""),
|
|
968
|
+
...typeof dna.visual === "string" && dna.visual ? { visual: dna.visual } : {},
|
|
969
|
+
...typeof dna.container === "string" && dna.container ? { container: dna.container } : {},
|
|
970
|
+
...bakerUses(record.baker_uses),
|
|
971
|
+
...record.source === "followed" || record.source === "library" ? { source: record.source } : {}
|
|
962
972
|
};
|
|
963
973
|
}
|
|
964
974
|
function fullWinningAd(record) {
|
|
@@ -975,6 +985,7 @@ function fullWinningAd(record) {
|
|
|
975
985
|
awareness_stage: dna.awareness_stage ?? null,
|
|
976
986
|
target_persona: dna.target_persona ?? null,
|
|
977
987
|
hook_archetype: dna.hook_archetype ?? null,
|
|
988
|
+
mechanism: dna.mechanism ?? null,
|
|
978
989
|
industry: dna.industry ?? null
|
|
979
990
|
};
|
|
980
991
|
}
|
|
@@ -1299,4 +1310,4 @@ export {
|
|
|
1299
1310
|
captureVimeoCookie,
|
|
1300
1311
|
childEnvWith
|
|
1301
1312
|
};
|
|
1302
|
-
//# sourceMappingURL=chunk-
|
|
1313
|
+
//# sourceMappingURL=chunk-53ATKV76.js.map
|