dblx 0.1.63 → 0.1.64
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/README.md +9 -0
- package/dist/index.js +45 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ Examples:
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
dblx get threads
|
|
17
|
+
dblx get threads <thread-id>
|
|
17
18
|
dblx get threads --q "planning"
|
|
18
19
|
dblx get today
|
|
19
20
|
dblx create thread --title "New thread"
|
|
@@ -61,6 +62,7 @@ You can also set `DBLEBOX_API_KEY` and `DBLEBOX_API_URL` environment variables i
|
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
64
|
dblx get threads
|
|
65
|
+
dblx get threads <thread-id>
|
|
64
66
|
dblx get threads --archived
|
|
65
67
|
dblx get threads --snoozed
|
|
66
68
|
dblx get threads --archived --snoozed
|
|
@@ -68,6 +70,12 @@ dblx get threads --q "plan"
|
|
|
68
70
|
dblx get threads --q "#dblebox" --archived --snoozed
|
|
69
71
|
```
|
|
70
72
|
|
|
73
|
+
### Get All Thread Content, Including Comments and Notes
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
dblx get threads <thread-id>
|
|
77
|
+
```
|
|
78
|
+
|
|
71
79
|
### Today
|
|
72
80
|
|
|
73
81
|
```bash
|
|
@@ -149,6 +157,7 @@ All read commands support `--json` for machine-readable output:
|
|
|
149
157
|
|
|
150
158
|
```bash
|
|
151
159
|
dblx get threads --json
|
|
160
|
+
dblx get threads <thread-id> --json
|
|
152
161
|
dblx get threads --q "plan" --json
|
|
153
162
|
dblx get today --json
|
|
154
163
|
dblx get thread-note <thread-id> --json
|
package/dist/index.js
CHANGED
|
@@ -2605,8 +2605,51 @@ function parseBooleanish(value) {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
|
|
2607
2607
|
// src/commands/get.ts
|
|
2608
|
-
|
|
2608
|
+
function relatedThreadLabel(thread) {
|
|
2609
|
+
return `${thread.thread.id.slice(0, 8)} ${thread.thread.body}`;
|
|
2610
|
+
}
|
|
2611
|
+
var getCommand = new Command("get").description("Read data from dblebox").addCommand(new Command("threads").description("List or search your threads").argument("[thread-id]", "Thread ID").option("--q <query>", "Filter by partial title/body text").option("--json", "Output as JSON").option("--archived", "Include archived threads").option("--snoozed", "Include snoozed threads").action(async (threadId, opts) => {
|
|
2609
2612
|
const api = getApi();
|
|
2613
|
+
if (threadId) {
|
|
2614
|
+
if (opts.q || opts.archived || opts.snoozed) {
|
|
2615
|
+
throw new Error("Thread lookup does not support --q, --archived, or --snoozed.");
|
|
2616
|
+
}
|
|
2617
|
+
const { data: data2, error: error2 } = await api.api.cli.v1.threads({ id: threadId }).get();
|
|
2618
|
+
if (error2)
|
|
2619
|
+
throw error2;
|
|
2620
|
+
if (opts.json) {
|
|
2621
|
+
output(data2, { json: true });
|
|
2622
|
+
return;
|
|
2623
|
+
}
|
|
2624
|
+
console.log(`Thread: ${data2.thread.body}`);
|
|
2625
|
+
console.log(`ID: ${data2.thread.id}`);
|
|
2626
|
+
console.log(`Created: ${data2.thread.created_at}`);
|
|
2627
|
+
console.log(`
|
|
2628
|
+
Note:`);
|
|
2629
|
+
console.log(data2.note ? data2.note.content || "(empty)" : "(none)");
|
|
2630
|
+
console.log(`
|
|
2631
|
+
Comments:`);
|
|
2632
|
+
if (data2.comments.length === 0) {
|
|
2633
|
+
console.log("(none)");
|
|
2634
|
+
} else {
|
|
2635
|
+
for (const comment of data2.comments) {
|
|
2636
|
+
console.log(`- [${comment.created_at}] @${comment.creator_username}: ${comment.body}`);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
console.log(`
|
|
2640
|
+
Parent:`);
|
|
2641
|
+
console.log(data2.parent_thread ? relatedThreadLabel(data2.parent_thread) : "(none)");
|
|
2642
|
+
console.log(`
|
|
2643
|
+
Children:`);
|
|
2644
|
+
if (data2.child_threads.length === 0) {
|
|
2645
|
+
console.log("(none)");
|
|
2646
|
+
} else {
|
|
2647
|
+
for (const child of data2.child_threads) {
|
|
2648
|
+
console.log(`- ${relatedThreadLabel(child)}`);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
return;
|
|
2652
|
+
}
|
|
2610
2653
|
const { data, error } = await api.api.cli.v1.threads.get({
|
|
2611
2654
|
query: {
|
|
2612
2655
|
q: opts.q,
|
|
@@ -2876,7 +2919,7 @@ var inviteCommand = new Command("invite").description("Invite collaborators").ad
|
|
|
2876
2919
|
// package.json
|
|
2877
2920
|
var package_default = {
|
|
2878
2921
|
name: "dblx",
|
|
2879
|
-
version: "0.1.
|
|
2922
|
+
version: "0.1.64",
|
|
2880
2923
|
description: "CLI for dblebox — thread-first communication",
|
|
2881
2924
|
type: "module",
|
|
2882
2925
|
bin: {
|