@robbeverhelst/do 1.387.0 → 1.388.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 (2) hide show
  1. package/dist/do.js +19 -5
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -14420,7 +14420,7 @@ var configError = (message) => new CliError("config", message, EXIT.CONFIG);
14420
14420
 
14421
14421
  // src/meta.ts
14422
14422
  var CLI_NAME = "do";
14423
- var VERSION = "1.387.0";
14423
+ var VERSION = "1.388.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -22494,6 +22494,7 @@ var habitTodayItemSchema = object({
22494
22494
  measurementType: habitMeasurementTypeSchema,
22495
22495
  unit: string2().nullable(),
22496
22496
  target: number2().nullable(),
22497
+ checklist: boolean2().optional(),
22497
22498
  timeOfDay: string2().nullable().default(null),
22498
22499
  value: number2(),
22499
22500
  state: habitTodayStateSchema,
@@ -22545,6 +22546,7 @@ var habitSectionRowSchema = object({
22545
22546
  sourceWords: string2().nullable(),
22546
22547
  done: boolean2(),
22547
22548
  amount: object({ value: number2(), target: number2().nullable(), unit: string2().nullable() }).nullable(),
22549
+ checklist: boolean2().optional(),
22548
22550
  strip: array(habitStripDaySchema).length(HABIT_STRIP_DAYS),
22549
22551
  streak: habitSectionStreakSchema,
22550
22552
  routineStep: object({
@@ -23689,6 +23691,7 @@ var routineTodayStepSchema = object({
23689
23691
  routineId: string2().nullable().default(null),
23690
23692
  habitToday: _enum2(["due", "not_due", "paused"]).nullable().default(null),
23691
23693
  amount: object({ value: number2(), target: number2().nullable(), unit: string2().nullable() }).nullable().default(null),
23694
+ checklist: boolean2().optional(),
23692
23695
  ref: string2().nullish()
23693
23696
  });
23694
23697
  var routineTodayStateSchema = _enum2(["done", "running", "upcoming", "resting"]);
@@ -29750,6 +29753,7 @@ var correctMealLogInputSchema = object({
29750
29753
  place: string2().trim().max(100).nullish(),
29751
29754
  confidence: foodConfidenceSchema.optional(),
29752
29755
  flags: flags.optional(),
29756
+ photoFileId: ulidSchema.nullish(),
29753
29757
  replace: array(object({ itemId: ulidSchema, item: mealLogItemInputSchema })).max(40).optional(),
29754
29758
  remove: array(ulidSchema).max(40).optional(),
29755
29759
  add: array(mealLogItemInputSchema).max(40).optional()
@@ -49752,7 +49756,12 @@ var commands18 = [
49752
49756
  {
49753
49757
  name: "data",
49754
49758
  type: "string",
49755
- description: 'The CorrectMealLogInput as JSON: {"replace":[{"itemId":"\u2026","item":{"label":"martino","foodId":"\u2026","grams":20}}],"remove":["\u2026"],"add":[\u2026],"flags":["spice:very_hot"]}.'
49759
+ description: 'The CorrectMealLogInput as JSON: {"replace":[{"itemId":"\u2026","item":{"label":"martino","foodId":"\u2026","grams":20}}],"remove":["\u2026"],"add":[\u2026],"flags":["spice:very_hot"],"photoFileId":"\u2026"}.'
49760
+ },
49761
+ {
49762
+ name: "photo",
49763
+ type: "string",
49764
+ description: "Set the meal's photo to a file already in the Space (its ULID); `none` takes it off. Joins --data, or stands alone."
49756
49765
  }
49757
49766
  ],
49758
49767
  scopes: [...foodLogOperations.correct.scopes],
@@ -49761,9 +49770,14 @@ var commands18 = [
49761
49770
  },
49762
49771
  run: async ({ args, flags, requireClient }) => {
49763
49772
  const id = requireArg(args, 0, "meal id");
49764
- if (flagString(flags, "data") === undefined)
49765
- throw usageError("food correct needs --data");
49766
- const body = parseInput(correctMealLogInputSchema, readDataFlag(flags));
49773
+ const photo = flagString(flags, "photo");
49774
+ if (flagString(flags, "data") === undefined && photo === undefined)
49775
+ throw usageError("food correct needs --data or --photo");
49776
+ const data = flagString(flags, "data") === undefined ? {} : readDataFlag(flags);
49777
+ const body = parseInput(correctMealLogInputSchema, {
49778
+ ...data,
49779
+ ...photo === undefined ? {} : { photoFileId: photo === "none" ? null : photo }
49780
+ });
49767
49781
  return {
49768
49782
  data: await requireClient().patch(pathOf(foodLogOperations.correct, { id }), body),
49769
49783
  render: renderRecord
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.387.0",
3
+ "version": "1.388.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",