@robbeverhelst/do 1.76.0 → 1.78.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.
- package/dist/do.js +30 -4
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -4597,6 +4597,18 @@ var collectionEntries = pgTable("collection_entries", {
|
|
|
4597
4597
|
index("collection_entries_item_occurred_idx").on(t.itemId, t.occurredOn),
|
|
4598
4598
|
index("collection_entries_tenant_idx").on(t.tenantId)
|
|
4599
4599
|
]);
|
|
4600
|
+
var collectionSavedViews = pgTable("collection_saved_views", {
|
|
4601
|
+
id: text("id").primaryKey(),
|
|
4602
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4603
|
+
name: text("name").notNull(),
|
|
4604
|
+
type: text("type").$type(),
|
|
4605
|
+
status: text("status").$type(),
|
|
4606
|
+
tags: text("tags").array().notNull().default([]),
|
|
4607
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
4608
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
4609
|
+
}, (t) => [
|
|
4610
|
+
index("collection_saved_views_tenant_idx").on(t.tenantId)
|
|
4611
|
+
]);
|
|
4600
4612
|
// ../../packages/schema/src/db/recipes.ts
|
|
4601
4613
|
var mealType = pgEnum("meal_type", ["breakfast", "lunch", "dinner", "snack"]);
|
|
4602
4614
|
var recipes = pgTable("recipes", {
|
|
@@ -20154,8 +20166,11 @@ var areaViewSchema = areaSchema.extend({
|
|
|
20154
20166
|
habitCount: exports_external.number().int().min(0),
|
|
20155
20167
|
routineCount: exports_external.number().int().min(0)
|
|
20156
20168
|
});
|
|
20169
|
+
var areaProjectSchema = projectViewSchema.extend({
|
|
20170
|
+
tasks: exports_external.array(taskViewSchema)
|
|
20171
|
+
});
|
|
20157
20172
|
var areaDetailSchema = areaViewSchema.extend({
|
|
20158
|
-
projects: exports_external.array(
|
|
20173
|
+
projects: exports_external.array(areaProjectSchema),
|
|
20159
20174
|
habits: exports_external.array(habitSummarySchema),
|
|
20160
20175
|
routines: exports_external.array(routineViewSchema),
|
|
20161
20176
|
tasks: exports_external.array(taskViewSchema),
|
|
@@ -20699,6 +20714,7 @@ var collectionItemViewSchema = collectionItemSchema.extend({
|
|
|
20699
20714
|
type: exports_external.string(),
|
|
20700
20715
|
status: exports_external.string(),
|
|
20701
20716
|
rating: exports_external.number().int().min(1).max(5).nullable(),
|
|
20717
|
+
lastLoggedOn: exports_external.string().nullish(),
|
|
20702
20718
|
deletedAt: exports_external.coerce.date().nullable()
|
|
20703
20719
|
});
|
|
20704
20720
|
var collectionItemDetailSchema = collectionItemViewSchema.extend({
|
|
@@ -20711,6 +20727,13 @@ var collectionSavedViewSchema = exports_external.object({
|
|
|
20711
20727
|
status: exports_external.string().min(1).nullable(),
|
|
20712
20728
|
tags: exports_external.array(exports_external.string().min(1))
|
|
20713
20729
|
});
|
|
20730
|
+
var createCollectionSavedViewInputSchema = createInsertSchema(collectionSavedViews, {
|
|
20731
|
+
id: ulidSchema,
|
|
20732
|
+
name: exports_external.string().min(1).max(80),
|
|
20733
|
+
type: exports_external.string().min(1).nullish(),
|
|
20734
|
+
status: exports_external.string().min(1).nullish(),
|
|
20735
|
+
tags: exports_external.array(exports_external.string().min(1)).optional()
|
|
20736
|
+
}).omit({ tenantId: true, createdAt: true, updatedAt: true });
|
|
20714
20737
|
var collectionLookupResultSchema = exports_external.object({
|
|
20715
20738
|
key: exports_external.string(),
|
|
20716
20739
|
title: exports_external.string(),
|
|
@@ -22275,7 +22298,8 @@ var COLLECTION_TYPES = {
|
|
|
22275
22298
|
statusLabels: { want: "Want", have: "Have" },
|
|
22276
22299
|
facetSchema: wineFacetSchema,
|
|
22277
22300
|
view: "grid",
|
|
22278
|
-
subtitleKey: "region"
|
|
22301
|
+
subtitleKey: "region",
|
|
22302
|
+
depletesOnLog: true
|
|
22279
22303
|
}
|
|
22280
22304
|
};
|
|
22281
22305
|
var COLLECTION_TYPE_LIST = collectionTypeValues.map((k) => COLLECTION_TYPES[k]);
|
|
@@ -24381,7 +24405,7 @@ function parseCapture2(input, now) {
|
|
|
24381
24405
|
|
|
24382
24406
|
// src/meta.ts
|
|
24383
24407
|
var CLI_NAME = "do";
|
|
24384
|
-
var VERSION = "1.
|
|
24408
|
+
var VERSION = "1.78.0";
|
|
24385
24409
|
var API_PREFIX = "/api/v1";
|
|
24386
24410
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
24387
24411
|
|
|
@@ -25544,8 +25568,10 @@ function renderHabit(data, mode) {
|
|
|
25544
25568
|
const h = data;
|
|
25545
25569
|
const streak = h.streak;
|
|
25546
25570
|
const flame = streak?.satisfiedToday ? paint(mode, "green", "\u2713 today") : "not yet today";
|
|
25571
|
+
const pct = typeof streak?.completionRate === "number" ? ` \xB7 ${Math.round(streak.completionRate * 100)}% lately` : "";
|
|
25572
|
+
const recovering = streak?.state === "recovering" ? paint(mode, "yellow", " \xB7 recovering") : "";
|
|
25547
25573
|
const counts = streak ? ` \xB7 streak ${streak.current ?? 0} (best ${streak.longest ?? 0})` : "";
|
|
25548
|
-
return `${h.title ?? "(habit)"} \u2014 ${flame}${counts}
|
|
25574
|
+
return `${h.title ?? "(habit)"} \u2014 ${flame}${pct}${counts}${recovering}
|
|
25549
25575
|
${paint(mode, "dim", h.id)}`;
|
|
25550
25576
|
}
|
|
25551
25577
|
function renderWhoami(data, mode) {
|