@koda-sl/baker-cli 0.297.0-dev.306c0952c → 0.299.0-dev.932cec6ab

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
@@ -30131,6 +30131,12 @@ registerSchema({
30131
30131
  type: "string",
30132
30132
  description: "Who picks the face, for an invented avatar: 'ask' (default) blocks on the user through `request_avatar_casting`, 'auto' keeps the one this build casts and asks nobody. Use 'auto' only when there is no one to answer \u2014 a Schedule, a batch, an explicit \"do it yourself\" \u2014 because a person who is there almost always wants this choice.",
30133
30133
  required: false
30134
+ },
30135
+ output: {
30136
+ type: "string",
30137
+ description: "Output format. Only `json`, which is what this returns anyway \u2014 accepted because `avatars list` and `avatars get` take it, so reaching for it here is the obvious guess.",
30138
+ required: false,
30139
+ default: "json"
30134
30140
  }
30135
30141
  }
30136
30142
  });
@@ -30171,6 +30177,12 @@ var createCommand2 = defineCommand96({
30171
30177
  type: "string",
30172
30178
  description: "Who picks the face of an invented avatar: 'ask' (default, blocks on the user) or 'auto' (asks nobody)",
30173
30179
  required: false
30180
+ },
30181
+ output: {
30182
+ type: "string",
30183
+ description: "Output format \u2014 `json` only, which is what this returns anyway",
30184
+ required: false,
30185
+ default: "json"
30174
30186
  }
30175
30187
  },
30176
30188
  run: async ({ args }) => {
@@ -30195,6 +30207,12 @@ var createCommand2 = defineCommand96({
30195
30207
  `--handle "${handle}" is not usable. Use lowercase letters, numbers and dashes, starting with a letter \u2014 "maria-founder", not "Maria Founder". Leave it off to have one derived from the name.`
30196
30208
  );
30197
30209
  }
30210
+ const output = args.output?.trim().toLowerCase();
30211
+ if (output && output !== "json") {
30212
+ failValidation2(
30213
+ `\`--output ${output}\` is not a format \`baker avatars create\` produces \u2014 it returns JSON and nothing else. Drop the flag, or pass \`--output json\`. \`baker avatars list\` and \`baker avatars get\` are the ones that also render \`files\` and \`md\`.`
30214
+ );
30215
+ }
30198
30216
  const faceChoice = parseFaceChoice(args.face);
30199
30217
  if (faceChoice === null) {
30200
30218
  failValidation2(
@@ -38984,6 +39002,12 @@ registerSchema({
38984
39002
  required: false,
38985
39003
  description: "Cast this avatar as the ad's recurring person \u2014 the same flag, the same word and the same meaning as on `baker studio generate` and `baker studio animate`. Every beat they appear in is grounded on their identity sheet and their subject description is copied verbatim, so it is one face throughout and the same face as the rest of the company's work. Overrides `cast.avatar` in the spec. `baker avatars list` shows who there is."
38986
39004
  },
39005
+ "no-brand": {
39006
+ type: "boolean",
39007
+ description: "Build the ad with no logo and no closing card. For a company that has no mark yet, or an ad they asked to keep plain. Never a way past a missing file: if they HAVE a logo, put it in src/brand/logos/ instead \u2014 an ad wearing a drawn or stand-in mark is a different company's ad.",
39008
+ required: false,
39009
+ default: false
39010
+ },
38987
39011
  "video-model": {
38988
39012
  type: "string",
38989
39013
  required: false,
@@ -39015,6 +39039,12 @@ var scaffoldAdCommand = defineCommand111({
39015
39039
  required: false,
39016
39040
  description: "Which curated video model renders the shots. Defaults to the one the lane picks; pass this only to compare models on the same brief, because mixing models across a campaign changes how the same face reads. `baker canvas catalog` lists what each one takes."
39017
39041
  },
39042
+ "no-brand": {
39043
+ type: "boolean",
39044
+ required: false,
39045
+ default: false,
39046
+ description: "Build the ad with no logo and no closing card. For a company with no mark yet, or an ad they asked to keep plain \u2014 never a way past a missing file."
39047
+ },
39018
39048
  slug: {
39019
39049
  type: "string",
39020
39050
  required: false,
@@ -39153,19 +39183,20 @@ var scaffoldAdCommand = defineCommand111({
39153
39183
  }
39154
39184
  const resolvedLogo = spec.data.brand?.logo?.trim();
39155
39185
  const logoExists = resolvedLogo ? await stat4(resolvedLogo).then(() => true, () => false) : false;
39156
- if (!logoExists) {
39186
+ const noBrand = Boolean(args["no-brand"]);
39187
+ if (!logoExists && !noBrand) {
39157
39188
  writeJson({
39158
39189
  ok: false,
39159
39190
  error: {
39160
39191
  code: "VALIDATION_ERROR",
39161
39192
  message: resolvedLogo ? `The brand mark at \`${resolvedLogo}\` does not exist, so this ad has no logo to put on screen.` : `This company has no brand mark in \`${BRAND_DIR}/logos/\`, so an ad cannot carry its logo.`,
39162
- fix: `Put the client's real mark in \`${BRAND_DIR}/logos/\` \u2014 an SVG is best, a PNG is fine \u2014 and run this again. Ask them for it if you have to; do NOT draw one, and do not pass a placeholder. The mark is drawn on every frame and on the closing card, so a stand-in ships an ad wearing the wrong brand.`
39193
+ fix: `Put the client's real mark in \`${BRAND_DIR}/logos/\` \u2014 an SVG is best, a PNG is fine \u2014 and run this again. Ask them for it if you have to; do NOT draw one, and do not pass a placeholder. The mark is drawn on every frame and on the closing card, so a stand-in ships an ad wearing the wrong brand. If this ad genuinely carries no brand \u2014 they have no logo yet, or they asked for it plain \u2014 pass \`--no-brand\` and say in your reply that it went out unbranded.`
39163
39194
  }
39164
39195
  });
39165
39196
  process.exit(1);
39166
39197
  return;
39167
39198
  }
39168
- if (resolvedLogo?.toLowerCase().endsWith(".svg")) {
39199
+ if (!noBrand && resolvedLogo?.toLowerCase().endsWith(".svg")) {
39169
39200
  const svg = await readFile16(resolvedLogo, "utf-8").catch(() => null);
39170
39201
  if (svg === null) {
39171
39202
  writeJson({
@@ -39289,6 +39320,9 @@ var scaffoldAdCommand = defineCommand111({
39289
39320
  ok: true,
39290
39321
  data: { canvas: outPath, beats: spec.data.beats.length, slug },
39291
39322
  hints: [
39323
+ ...noBrand ? [
39324
+ "Built with NO brand mark and no closing card, because you passed --no-brand. Say that in your reply: the user is getting an unbranded ad and should know it, not discover it. When they do have a logo, put it in `src/brand/logos/` and re-run without the flag."
39325
+ ] : [],
39292
39326
  // Same reasoning as `studio animate`: a cast avatar that speaks routes to the
39293
39327
  // default model on purpose, and pinning one discards that silently. An ad's
39294
39328
  // beats always speak, so there is no silent case to exclude here.