@koda-sl/baker-cli 0.397.0-dev.afb6a264b → 0.397.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.
Files changed (27) hide show
  1. package/README.md +173 -80
  2. package/dist/{chunk-7OVZ6SOA.js → chunk-BRIJ4OWT.js} +12 -1
  3. package/dist/{chunk-7OVZ6SOA.js.map → chunk-BRIJ4OWT.js.map} +1 -1
  4. package/dist/{chunk-EYN7G4KF.js → chunk-EEHNRAFA.js} +4 -4
  5. package/dist/{chunk-MNSF5SQ3.js → chunk-LHJ5IXBN.js} +3902 -2432
  6. package/dist/chunk-LHJ5IXBN.js.map +1 -0
  7. package/dist/{chunk-Z7WHG6TA.js → chunk-Q7RQ3H6Y.js} +3 -3
  8. package/dist/{chunk-J76AGFBH.js → chunk-QP7637HG.js} +3 -3
  9. package/dist/{chunk-TWSWUIDI.js → chunk-ZWMATKNS.js} +2 -2
  10. package/dist/cli.js +10639 -9525
  11. package/dist/cli.js.map +1 -1
  12. package/dist/{client-YUWLIYLF.js → client-4P6U75EX.js} +4 -4
  13. package/dist/engine/index.d.ts +178 -117
  14. package/dist/engine/index.js +3 -3
  15. package/dist/{env-RQGMYIQN.js → env-LJHSZSNA.js} +2 -2
  16. package/dist/{output-POG3LVBW.js → output-HVBFJX4I.js} +5 -5
  17. package/dist/{shared-ZAEUTUNU.js → shared-7ZEF4DIX.js} +6 -6
  18. package/package.json +1 -1
  19. package/dist/chunk-MNSF5SQ3.js.map +0 -1
  20. /package/dist/{chunk-EYN7G4KF.js.map → chunk-EEHNRAFA.js.map} +0 -0
  21. /package/dist/{chunk-Z7WHG6TA.js.map → chunk-Q7RQ3H6Y.js.map} +0 -0
  22. /package/dist/{chunk-J76AGFBH.js.map → chunk-QP7637HG.js.map} +0 -0
  23. /package/dist/{chunk-TWSWUIDI.js.map → chunk-ZWMATKNS.js.map} +0 -0
  24. /package/dist/{client-YUWLIYLF.js.map → client-4P6U75EX.js.map} +0 -0
  25. /package/dist/{env-RQGMYIQN.js.map → env-LJHSZSNA.js.map} +0 -0
  26. /package/dist/{output-POG3LVBW.js.map → output-HVBFJX4I.js.map} +0 -0
  27. /package/dist/{shared-ZAEUTUNU.js.map → shared-7ZEF4DIX.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 {
@@ -959,6 +965,10 @@ function compactWinningAd(record) {
959
965
  advertiser_id: String(record.advertiser_id ?? ""),
960
966
  ad_id: String(record.ad_id ?? ""),
961
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
+ ...typeof dna.mechanism === "string" && dna.mechanism ? { mechanism: dna.mechanism } : {},
971
+ ...bakerUses(record.baker_uses),
962
972
  ...record.source === "followed" || record.source === "library" ? { source: record.source } : {}
963
973
  };
964
974
  }
@@ -976,6 +986,7 @@ function fullWinningAd(record) {
976
986
  awareness_stage: dna.awareness_stage ?? null,
977
987
  target_persona: dna.target_persona ?? null,
978
988
  hook_archetype: dna.hook_archetype ?? null,
989
+ mechanism: dna.mechanism ?? null,
979
990
  industry: dna.industry ?? null
980
991
  };
981
992
  }
@@ -1300,4 +1311,4 @@ export {
1300
1311
  captureVimeoCookie,
1301
1312
  childEnvWith
1302
1313
  };
1303
- //# sourceMappingURL=chunk-7OVZ6SOA.js.map
1314
+ //# sourceMappingURL=chunk-BRIJ4OWT.js.map