@robbeverhelst/do 1.78.0 → 1.79.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 +6 -5
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -4590,7 +4590,7 @@ var collectionEntries = pgTable("collection_entries", {
4590
4590
  tenantId: text("tenant_id").notNull().references(() => tenants.id),
4591
4591
  itemId: text("item_id").notNull().references(() => collectionItems.id),
4592
4592
  occurredOn: date("occurred_on").notNull(),
4593
- rating: integer("rating"),
4593
+ rating: numeric("rating", { precision: 2, scale: 1, mode: "number" }),
4594
4594
  note: text("note"),
4595
4595
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
4596
4596
  }, (t) => [
@@ -20665,6 +20665,7 @@ var collectionTypeValues = ["book", "film", "game", "music", "place", "wine"];
20665
20665
  var collectionTypeSchema = exports_external.enum(collectionTypeValues);
20666
20666
  var collectionViewValues = ["grid", "shelf", "map"];
20667
20667
  var collectionViewSchema = exports_external.enum(collectionViewValues);
20668
+ var collectionRatingSchema = exports_external.number().min(0.5).max(5).step(0.5, "must be a whole or half star (0.5 steps)");
20668
20669
  var collectionFacetSchema = exports_external.record(exports_external.string(), exports_external.unknown());
20669
20670
  var collectionItemSchema = createSelectSchema(collectionItems, {
20670
20671
  facet: collectionFacetSchema.nullable(),
@@ -20700,12 +20701,12 @@ var collectionEntrySchema = createSelectSchema(collectionEntries, {
20700
20701
  var createCollectionEntryInputSchema = createInsertSchema(collectionEntries, {
20701
20702
  id: ulidSchema,
20702
20703
  occurredOn: exports_external.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO date (YYYY-MM-DD)"),
20703
- rating: exports_external.number().int().min(1).max(5).nullish(),
20704
+ rating: collectionRatingSchema.nullish(),
20704
20705
  note: exports_external.string().max(2000).nullish()
20705
20706
  }).omit({ tenantId: true, itemId: true, createdAt: true });
20706
20707
  var updateCollectionEntryInputSchema = exports_external.object({
20707
20708
  occurredOn: exports_external.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO date (YYYY-MM-DD)").optional(),
20708
- rating: exports_external.number().int().min(1).max(5).nullish(),
20709
+ rating: collectionRatingSchema.nullish(),
20709
20710
  note: exports_external.string().max(2000).nullish()
20710
20711
  }).strict();
20711
20712
  var collectionItemViewSchema = collectionItemSchema.extend({
@@ -20713,7 +20714,7 @@ var collectionItemViewSchema = collectionItemSchema.extend({
20713
20714
  parentId: ulidSchema.nullable(),
20714
20715
  type: exports_external.string(),
20715
20716
  status: exports_external.string(),
20716
- rating: exports_external.number().int().min(1).max(5).nullable(),
20717
+ rating: collectionRatingSchema.nullable(),
20717
20718
  lastLoggedOn: exports_external.string().nullish(),
20718
20719
  deletedAt: exports_external.coerce.date().nullable()
20719
20720
  });
@@ -24405,7 +24406,7 @@ function parseCapture2(input, now) {
24405
24406
 
24406
24407
  // src/meta.ts
24407
24408
  var CLI_NAME = "do";
24408
- var VERSION = "1.78.0";
24409
+ var VERSION = "1.79.0";
24409
24410
  var API_PREFIX = "/api/v1";
24410
24411
  var DEFAULT_API_URL = "http://localhost:3001";
24411
24412
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.78.0",
3
+ "version": "1.79.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "type": "module",