@robbeverhelst/do 1.80.0 → 1.81.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 +40 -11
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -4477,7 +4477,8 @@ var notificationType = pgEnum("notification_type", [
|
|
|
4477
4477
|
"task_due",
|
|
4478
4478
|
"occurrence_due",
|
|
4479
4479
|
"contact_date_due",
|
|
4480
|
-
"automation"
|
|
4480
|
+
"automation",
|
|
4481
|
+
"streak_at_risk"
|
|
4481
4482
|
]);
|
|
4482
4483
|
var notifications = pgTable("notifications", {
|
|
4483
4484
|
id: text("id").primaryKey(),
|
|
@@ -20176,6 +20177,23 @@ var areaDetailSchema = areaViewSchema.extend({
|
|
|
20176
20177
|
tasks: exports_external.array(taskViewSchema),
|
|
20177
20178
|
notes: exports_external.array(noteViewSchema)
|
|
20178
20179
|
});
|
|
20180
|
+
// ../../packages/schema/src/contracts/tags.ts
|
|
20181
|
+
var areaIconSchema2 = exports_external.string().trim().min(1).max(64);
|
|
20182
|
+
var tagPromotionCandidateSchema = exports_external.object({
|
|
20183
|
+
tag: exports_external.string().min(1),
|
|
20184
|
+
count: exports_external.number().int().min(1)
|
|
20185
|
+
});
|
|
20186
|
+
var promoteTagInputSchema = exports_external.object({
|
|
20187
|
+
id: ulidSchema,
|
|
20188
|
+
tag: exports_external.string().trim().min(1),
|
|
20189
|
+
title: exports_external.string().trim().min(1).optional(),
|
|
20190
|
+
color: areaColorSchema,
|
|
20191
|
+
icon: areaIconSchema2.nullish()
|
|
20192
|
+
});
|
|
20193
|
+
var promoteTagResultSchema = exports_external.object({
|
|
20194
|
+
area: areaViewSchema,
|
|
20195
|
+
refiled: exports_external.number().int().min(0)
|
|
20196
|
+
});
|
|
20179
20197
|
// ../../packages/schema/src/contracts/modules.ts
|
|
20180
20198
|
var MODULE_KEYS = [
|
|
20181
20199
|
"tasks",
|
|
@@ -20804,6 +20822,17 @@ var recipePantrySchema = exports_external.object({
|
|
|
20804
20822
|
totalCount: exports_external.number().int().min(0),
|
|
20805
20823
|
ingredients: exports_external.array(recipePantryIngredientSchema)
|
|
20806
20824
|
});
|
|
20825
|
+
var recipeImportInputSchema = exports_external.object({ url: exports_external.string().url() }).strict();
|
|
20826
|
+
var recipeImportResultSchema = exports_external.object({
|
|
20827
|
+
title: exports_external.string().nullable(),
|
|
20828
|
+
description: exports_external.string().nullable(),
|
|
20829
|
+
servings: exports_external.number().int().positive().nullable(),
|
|
20830
|
+
prepMinutes: exports_external.number().int().min(0).nullable(),
|
|
20831
|
+
cookMinutes: exports_external.number().int().min(0).nullable(),
|
|
20832
|
+
source: exports_external.string(),
|
|
20833
|
+
ingredients: exports_external.array(exports_external.string()),
|
|
20834
|
+
instructions: exports_external.array(exports_external.string())
|
|
20835
|
+
});
|
|
20807
20836
|
// ../../packages/schema/src/contracts/meal-plans.ts
|
|
20808
20837
|
var mealPlanSchema = createSelectSchema(mealPlans, {
|
|
20809
20838
|
plannedFor: exports_external.coerce.date()
|
|
@@ -22125,11 +22154,11 @@ var TAG_RE = /(?:^|\s)#([\p{L}\p{N}][\p{L}\p{N}_-]*)/gu;
|
|
|
22125
22154
|
var STAR_RE = /(?:^|\s)!(star|flag|s|f)?(?=\s|$)/giu;
|
|
22126
22155
|
var AREA_RE = /(?:^|\s)~([\p{L}\p{N}][\p{L}\p{N}_-]*)/gu;
|
|
22127
22156
|
function parseCapture(input, now) {
|
|
22128
|
-
const
|
|
22157
|
+
const tags2 = [];
|
|
22129
22158
|
for (const match of input.matchAll(TAG_RE)) {
|
|
22130
22159
|
const tag = match[1]?.toLowerCase();
|
|
22131
|
-
if (tag && !
|
|
22132
|
-
|
|
22160
|
+
if (tag && !tags2.includes(tag))
|
|
22161
|
+
tags2.push(tag);
|
|
22133
22162
|
}
|
|
22134
22163
|
let starred;
|
|
22135
22164
|
for (const _ of input.matchAll(STAR_RE)) {
|
|
@@ -22154,7 +22183,7 @@ function parseCapture(input, now) {
|
|
|
22154
22183
|
const title = stripped.replace(/\s+/g, " ").trim();
|
|
22155
22184
|
return {
|
|
22156
22185
|
title,
|
|
22157
|
-
tags,
|
|
22186
|
+
tags: tags2,
|
|
22158
22187
|
...starred ? { starred } : {},
|
|
22159
22188
|
...area ? { area } : {},
|
|
22160
22189
|
...when?.scheduledAt ? { scheduledAt: when.scheduledAt, allDay: when.allDay } : {},
|
|
@@ -24406,7 +24435,7 @@ function parseCapture2(input, now) {
|
|
|
24406
24435
|
|
|
24407
24436
|
// src/meta.ts
|
|
24408
24437
|
var CLI_NAME = "do";
|
|
24409
|
-
var VERSION = "1.
|
|
24438
|
+
var VERSION = "1.81.0";
|
|
24410
24439
|
var API_PREFIX = "/api/v1";
|
|
24411
24440
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
24412
24441
|
|
|
@@ -25956,7 +25985,7 @@ var HANDLERS = {
|
|
|
25956
25985
|
return { data: await requireClient().get("/collection", { query }), render: renderList };
|
|
25957
25986
|
},
|
|
25958
25987
|
"collection add": async ({ args, flags, requireClient }) => {
|
|
25959
|
-
const { title, tags } = parseTitleTags(args);
|
|
25988
|
+
const { title, tags: tags2 } = parseTitleTags(args);
|
|
25960
25989
|
if (title.length === 0)
|
|
25961
25990
|
throw usageError('collection add needs a title, e.g. `do collection add "Dune" --type book`');
|
|
25962
25991
|
const type = requireFlag(flags, "type", "collection add needs --type <book|film|game|music|place|wine>");
|
|
@@ -25964,7 +25993,7 @@ var HANDLERS = {
|
|
|
25964
25993
|
id: ulid3(),
|
|
25965
25994
|
type,
|
|
25966
25995
|
title,
|
|
25967
|
-
...
|
|
25996
|
+
...tags2.length > 0 ? { tags: tags2 } : {},
|
|
25968
25997
|
...flagString(flags, "status") ? { status: flagString(flags, "status") } : {}
|
|
25969
25998
|
});
|
|
25970
25999
|
return { data: await requireClient().post("/collection", body), render: renderRecord };
|
|
@@ -26180,14 +26209,14 @@ async function setModuleVisibility(args, requireClient, on) {
|
|
|
26180
26209
|
}
|
|
26181
26210
|
function parseTitleTags(args) {
|
|
26182
26211
|
const titleWords = [];
|
|
26183
|
-
const
|
|
26212
|
+
const tags2 = [];
|
|
26184
26213
|
for (const token of args.join(" ").split(/\s+/).filter(Boolean)) {
|
|
26185
26214
|
if (token.length > 1 && token.startsWith("#"))
|
|
26186
|
-
|
|
26215
|
+
tags2.push(token.slice(1));
|
|
26187
26216
|
else
|
|
26188
26217
|
titleWords.push(token);
|
|
26189
26218
|
}
|
|
26190
|
-
return { title: titleWords.join(" ").trim(), tags };
|
|
26219
|
+
return { title: titleWords.join(" ").trim(), tags: tags2 };
|
|
26191
26220
|
}
|
|
26192
26221
|
function isoDay(date6) {
|
|
26193
26222
|
const month = String(date6.getMonth() + 1).padStart(2, "0");
|