@robbeverhelst/do 1.49.0 → 1.51.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 +93 -34
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -21567,32 +21567,38 @@ function parseCapture(input) {
|
|
|
21567
21567
|
return { title, tags, ...priority ? { priority } : {}, ...area ? { area } : {} };
|
|
21568
21568
|
}
|
|
21569
21569
|
// ../../packages/schema/src/presets/collection-types.ts
|
|
21570
|
+
var coverUrl = exports_external.string().url().max(2048).nullish();
|
|
21570
21571
|
var bookFacetSchema = exports_external.object({
|
|
21571
21572
|
author: exports_external.string().min(1).max(200).nullish(),
|
|
21572
|
-
coverUrl
|
|
21573
|
-
pageCount: exports_external.number().int().min(1).max(1e5).nullish()
|
|
21573
|
+
coverUrl,
|
|
21574
|
+
pageCount: exports_external.number().int().min(1).max(1e5).nullish(),
|
|
21575
|
+
currentPage: exports_external.number().int().min(0).max(1e5).nullish()
|
|
21576
|
+
}).strict();
|
|
21577
|
+
var filmFacetSchema = exports_external.object({
|
|
21578
|
+
kind: exports_external.enum(["movie", "show"]).nullish(),
|
|
21579
|
+
year: exports_external.number().int().min(1888).max(2100).nullish(),
|
|
21580
|
+
director: exports_external.string().min(1).max(200).nullish(),
|
|
21581
|
+
coverUrl
|
|
21582
|
+
}).strict();
|
|
21583
|
+
var gameFacetSchema2 = exports_external.object({
|
|
21584
|
+
platform: exports_external.string().min(1).max(120).nullish(),
|
|
21585
|
+
coverUrl
|
|
21586
|
+
}).strict();
|
|
21587
|
+
var musicFacetSchema = exports_external.object({
|
|
21588
|
+
artist: exports_external.string().min(1).max(200).nullish(),
|
|
21589
|
+
year: exports_external.number().int().min(1860).max(2100).nullish(),
|
|
21590
|
+
coverUrl
|
|
21591
|
+
}).strict();
|
|
21592
|
+
var placeFacetSchema2 = exports_external.object({
|
|
21593
|
+
address: exports_external.string().min(1).max(400).nullish(),
|
|
21594
|
+
lat: exports_external.number().min(-90).max(90).nullish(),
|
|
21595
|
+
lng: exports_external.number().min(-180).max(180).nullish()
|
|
21596
|
+
}).strict();
|
|
21597
|
+
var wineFacetSchema = exports_external.object({
|
|
21598
|
+
type: exports_external.enum(["wine", "whisky"]).nullish(),
|
|
21599
|
+
region: exports_external.string().min(1).max(200).nullish(),
|
|
21600
|
+
vintage: exports_external.number().int().min(1800).max(2100).nullish()
|
|
21574
21601
|
}).strict();
|
|
21575
|
-
var stubFacetSchema = exports_external.object({}).strict();
|
|
21576
|
-
var ALL_STATUSES = collectionStatusValues;
|
|
21577
|
-
var DEFAULT_STATUS_LABELS = {
|
|
21578
|
-
want: "Want",
|
|
21579
|
-
have: "Have",
|
|
21580
|
-
doing: "Doing",
|
|
21581
|
-
done: "Done",
|
|
21582
|
-
dropped: "Dropped"
|
|
21583
|
-
};
|
|
21584
|
-
function stubType(key, label, itemNoun) {
|
|
21585
|
-
return {
|
|
21586
|
-
key,
|
|
21587
|
-
label,
|
|
21588
|
-
itemNoun,
|
|
21589
|
-
statuses: ALL_STATUSES,
|
|
21590
|
-
statusLabels: DEFAULT_STATUS_LABELS,
|
|
21591
|
-
facetSchema: stubFacetSchema,
|
|
21592
|
-
view: "grid",
|
|
21593
|
-
stub: true
|
|
21594
|
-
};
|
|
21595
|
-
}
|
|
21596
21602
|
var COLLECTION_TYPES = {
|
|
21597
21603
|
book: {
|
|
21598
21604
|
key: "book",
|
|
@@ -21608,13 +21614,68 @@ var COLLECTION_TYPES = {
|
|
|
21608
21614
|
},
|
|
21609
21615
|
facetSchema: bookFacetSchema,
|
|
21610
21616
|
view: "shelf",
|
|
21611
|
-
|
|
21617
|
+
subtitleKey: "author",
|
|
21618
|
+
lookupId: "open-library",
|
|
21619
|
+
progress: { kind: "count", currentField: "currentPage", totalField: "pageCount", unit: "page" }
|
|
21620
|
+
},
|
|
21621
|
+
film: {
|
|
21622
|
+
key: "film",
|
|
21623
|
+
label: "Films & TV",
|
|
21624
|
+
itemNoun: "title",
|
|
21625
|
+
statuses: ["want", "doing", "done", "dropped"],
|
|
21626
|
+
statusLabels: { want: "Want", doing: "Watching", done: "Watched", dropped: "Dropped" },
|
|
21627
|
+
facetSchema: filmFacetSchema,
|
|
21628
|
+
view: "grid",
|
|
21629
|
+
subtitleKey: "director",
|
|
21630
|
+
lookupId: "tmdb"
|
|
21631
|
+
},
|
|
21632
|
+
game: {
|
|
21633
|
+
key: "game",
|
|
21634
|
+
label: "Games",
|
|
21635
|
+
itemNoun: "game",
|
|
21636
|
+
statuses: ["want", "have", "doing", "done", "dropped"],
|
|
21637
|
+
statusLabels: {
|
|
21638
|
+
want: "Want",
|
|
21639
|
+
have: "Have",
|
|
21640
|
+
doing: "Playing",
|
|
21641
|
+
done: "Beaten",
|
|
21642
|
+
dropped: "Dropped"
|
|
21643
|
+
},
|
|
21644
|
+
facetSchema: gameFacetSchema2,
|
|
21645
|
+
view: "grid",
|
|
21646
|
+
subtitleKey: "platform",
|
|
21647
|
+
lookupId: "igdb"
|
|
21648
|
+
},
|
|
21649
|
+
music: {
|
|
21650
|
+
key: "music",
|
|
21651
|
+
label: "Music",
|
|
21652
|
+
itemNoun: "album",
|
|
21653
|
+
statuses: ["want", "done"],
|
|
21654
|
+
statusLabels: { want: "Want", done: "Listened" },
|
|
21655
|
+
facetSchema: musicFacetSchema,
|
|
21656
|
+
view: "shelf",
|
|
21657
|
+
subtitleKey: "artist"
|
|
21612
21658
|
},
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21659
|
+
place: {
|
|
21660
|
+
key: "place",
|
|
21661
|
+
label: "Places",
|
|
21662
|
+
itemNoun: "place",
|
|
21663
|
+
statuses: ["want", "done"],
|
|
21664
|
+
statusLabels: { want: "Want", done: "Been" },
|
|
21665
|
+
facetSchema: placeFacetSchema2,
|
|
21666
|
+
view: "map",
|
|
21667
|
+
subtitleKey: "address"
|
|
21668
|
+
},
|
|
21669
|
+
wine: {
|
|
21670
|
+
key: "wine",
|
|
21671
|
+
label: "Wines",
|
|
21672
|
+
itemNoun: "bottle",
|
|
21673
|
+
statuses: ["want", "have"],
|
|
21674
|
+
statusLabels: { want: "Want", have: "Have" },
|
|
21675
|
+
facetSchema: wineFacetSchema,
|
|
21676
|
+
view: "grid",
|
|
21677
|
+
subtitleKey: "region"
|
|
21678
|
+
}
|
|
21618
21679
|
};
|
|
21619
21680
|
var COLLECTION_TYPE_LIST = collectionTypeValues.map((k) => COLLECTION_TYPES[k]);
|
|
21620
21681
|
var collectionTypeSummarySchema = exports_external.object({
|
|
@@ -21624,8 +21685,7 @@ var collectionTypeSummarySchema = exports_external.object({
|
|
|
21624
21685
|
statuses: exports_external.array(collectionStatusSchema),
|
|
21625
21686
|
statusLabels: exports_external.record(exports_external.string(), exports_external.string()),
|
|
21626
21687
|
view: collectionViewSchema,
|
|
21627
|
-
lookupId: exports_external.string().nullable()
|
|
21628
|
-
stub: exports_external.boolean()
|
|
21688
|
+
lookupId: exports_external.string().nullable()
|
|
21629
21689
|
});
|
|
21630
21690
|
function toCollectionTypeSummary(config2) {
|
|
21631
21691
|
return {
|
|
@@ -21635,8 +21695,7 @@ function toCollectionTypeSummary(config2) {
|
|
|
21635
21695
|
statuses: [...config2.statuses],
|
|
21636
21696
|
statusLabels: { ...config2.statusLabels },
|
|
21637
21697
|
view: config2.view,
|
|
21638
|
-
lookupId: config2.lookupId ?? null
|
|
21639
|
-
stub: config2.stub ?? false
|
|
21698
|
+
lookupId: config2.lookupId ?? null
|
|
21640
21699
|
};
|
|
21641
21700
|
}
|
|
21642
21701
|
var COLLECTION_TYPE_SUMMARIES = COLLECTION_TYPE_LIST.map(toCollectionTypeSummary);
|
|
@@ -23658,7 +23717,7 @@ function parseCapture2(input) {
|
|
|
23658
23717
|
|
|
23659
23718
|
// src/meta.ts
|
|
23660
23719
|
var CLI_NAME = "do";
|
|
23661
|
-
var VERSION = "1.
|
|
23720
|
+
var VERSION = "1.51.0";
|
|
23662
23721
|
var API_PREFIX = "/api/v1";
|
|
23663
23722
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
23664
23723
|
|