@robbeverhelst/do 1.384.0 → 1.385.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 +17 -6
  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.384.0";
14423
+ var VERSION = "1.385.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -19020,7 +19020,9 @@ var recipes = pgTable("recipes", {
19020
19020
  favorite: boolean4("favorite").notNull().default(false),
19021
19021
  kind: recipeKind("kind").notNull().default("recipe"),
19022
19022
  cookedWeightG: doublePrecision("cooked_weight_g"),
19023
- nutritionCache: jsonb("nutrition_cache").$type()
19023
+ nutritionCache: jsonb("nutrition_cache").$type(),
19024
+ photoUrl: text("photo_url"),
19025
+ photoCredit: text("photo_credit")
19024
19026
  }, (t) => [
19025
19027
  index("recipes_tenant_idx").on(t.tenantId)
19026
19028
  ]);
@@ -35370,7 +35372,8 @@ var mealWeekSchema = object({
35370
35372
  out: number2().int().min(0)
35371
35373
  }),
35372
35374
  leftovers: array(mealWeekLeftoverSchema),
35373
- draft: array(mealWeekDraftDaySchema).length(7)
35375
+ draft: array(mealWeekDraftDaySchema).length(7),
35376
+ openDrafts: array(mealWeekDraftDaySchema).default([])
35374
35377
  });
35375
35378
 
35376
35379
  // ../../packages/schema/src/operations/meal-plans.ts
@@ -38979,8 +38982,12 @@ var readOperations = defineOperations({
38979
38982
  var recipeSchema = createSelectSchema(recipes, {
38980
38983
  kind: (s) => s.default("recipe"),
38981
38984
  cookedWeightG: number2().positive().nullable().default(null),
38982
- nutritionCache: recipeNutritionCacheSchema.nullable().default(null)
38985
+ nutritionCache: recipeNutritionCacheSchema.nullable().default(null),
38986
+ photoUrl: string2().nullable().default(null),
38987
+ photoCredit: string2().nullable().default(null)
38983
38988
  });
38989
+ var photoUrlSchema = string2().trim().url().max(2048).refine((u) => /^https?:\/\//i.test(u), "an http(s) URL");
38990
+ var photoCreditSchema = string2().trim().max(200);
38984
38991
  var recipeIngredientSchema = createSelectSchema(recipeIngredients, {
38985
38992
  createdAt: exports_coerce.date()
38986
38993
  });
@@ -38998,7 +39005,9 @@ var createRecipeInputSchema = createInsertSchema(recipes, {
38998
39005
  prepMinutes: number2().int().min(0).nullish(),
38999
39006
  cookMinutes: number2().int().min(0).nullish(),
39000
39007
  tags: array(string2()).optional(),
39001
- cookedWeightG: number2().positive().nullish()
39008
+ cookedWeightG: number2().positive().nullish(),
39009
+ photoUrl: photoUrlSchema.nullish(),
39010
+ photoCredit: photoCreditSchema.nullish()
39002
39011
  }).omit({ tenantId: true, nutritionCache: true }).extend({
39003
39012
  title: string2().min(1),
39004
39013
  parentId: ulidSchema.nullish(),
@@ -39010,7 +39019,9 @@ var updateRecipeInputSchema = createUpdateSchema(recipes, {
39010
39019
  prepMinutes: number2().int().min(0).nullish(),
39011
39020
  cookMinutes: number2().int().min(0).nullish(),
39012
39021
  tags: array(string2()).optional(),
39013
- cookedWeightG: number2().positive().nullish()
39022
+ cookedWeightG: number2().positive().nullish(),
39023
+ photoUrl: photoUrlSchema.nullish(),
39024
+ photoCredit: photoCreditSchema.nullish()
39014
39025
  }).omit({ id: true, tenantId: true, nutritionCache: true }).extend({
39015
39026
  title: string2().min(1).optional(),
39016
39027
  parentId: ulidSchema.nullish(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.384.0",
3
+ "version": "1.385.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",