vertex-notes 0.1.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 (60) hide show
  1. package/bin/run.js +4 -0
  2. package/dist/chunk-4QLCD6TZ.js +479 -0
  3. package/dist/chunk-4QLCD6TZ.js.map +1 -0
  4. package/dist/chunk-DDFOKGIX.js +50 -0
  5. package/dist/chunk-DDFOKGIX.js.map +1 -0
  6. package/dist/chunk-FWK2J3FR.js +163 -0
  7. package/dist/chunk-FWK2J3FR.js.map +1 -0
  8. package/dist/chunk-PBF5EE4Y.js +42 -0
  9. package/dist/chunk-PBF5EE4Y.js.map +1 -0
  10. package/dist/commands/capture.js +44 -0
  11. package/dist/commands/capture.js.map +1 -0
  12. package/dist/commands/daily.js +53 -0
  13. package/dist/commands/daily.js.map +1 -0
  14. package/dist/commands/delete.js +38 -0
  15. package/dist/commands/delete.js.map +1 -0
  16. package/dist/commands/edit.js +88 -0
  17. package/dist/commands/edit.js.map +1 -0
  18. package/dist/commands/export.js +46 -0
  19. package/dist/commands/export.js.map +1 -0
  20. package/dist/commands/hello.js +16 -0
  21. package/dist/commands/hello.js.map +1 -0
  22. package/dist/commands/help.js +108 -0
  23. package/dist/commands/help.js.map +1 -0
  24. package/dist/commands/interactive.js +211 -0
  25. package/dist/commands/interactive.js.map +1 -0
  26. package/dist/commands/login.js +162 -0
  27. package/dist/commands/login.js.map +1 -0
  28. package/dist/commands/logout.js +17 -0
  29. package/dist/commands/logout.js.map +1 -0
  30. package/dist/commands/new.js +28 -0
  31. package/dist/commands/new.js.map +1 -0
  32. package/dist/commands/notes.js +45 -0
  33. package/dist/commands/notes.js.map +1 -0
  34. package/dist/commands/restore.js +35 -0
  35. package/dist/commands/restore.js.map +1 -0
  36. package/dist/commands/search.js +38 -0
  37. package/dist/commands/search.js.map +1 -0
  38. package/dist/commands/status.js +39 -0
  39. package/dist/commands/status.js.map +1 -0
  40. package/dist/commands/tags.js +32 -0
  41. package/dist/commands/tags.js.map +1 -0
  42. package/dist/commands/today.js +33 -0
  43. package/dist/commands/today.js.map +1 -0
  44. package/dist/commands/trash/empty.js +24 -0
  45. package/dist/commands/trash/empty.js.map +1 -0
  46. package/dist/commands/trash/index.js +37 -0
  47. package/dist/commands/trash/index.js.map +1 -0
  48. package/dist/commands/view.js +35 -0
  49. package/dist/commands/view.js.map +1 -0
  50. package/dist/commands/whoami.js +22 -0
  51. package/dist/commands/whoami.js.map +1 -0
  52. package/dist/index.js +6 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/lib/client.js +11 -0
  55. package/dist/lib/client.js.map +1 -0
  56. package/dist/lib/config.js +13 -0
  57. package/dist/lib/config.js.map +1 -0
  58. package/dist/lib/md-to-tiptap.js +7 -0
  59. package/dist/lib/md-to-tiptap.js.map +1 -0
  60. package/package.json +42 -0
@@ -0,0 +1,45 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ listNotes
8
+ } from "../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/notes.ts
11
+ import { Command } from "@oclif/core";
12
+ function formatDate(dateStr) {
13
+ const d = new Date(dateStr);
14
+ return d.toLocaleDateString("en-US", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
15
+ }
16
+ function pad(str, len) {
17
+ return str.length > len ? str.slice(0, len - 1) + "\u2026" : str.padEnd(len);
18
+ }
19
+ var Notes = class extends Command {
20
+ static description = "List all notes";
21
+ async run() {
22
+ const client = await getClient();
23
+ const userId = await getUserId();
24
+ const notes = await listNotes(client, { user_id: userId });
25
+ const active = notes.filter((n) => !n.deleted_at);
26
+ if (active.length === 0) {
27
+ this.log("No notes yet. Create one: vertex new");
28
+ return;
29
+ }
30
+ this.log(`
31
+ ${pad("Title", 40)} ${pad("Type", 10)} ${pad("Updated", 20)}`);
32
+ this.log(` ${"\u2500".repeat(40)} ${"\u2500".repeat(10)} ${"\u2500".repeat(20)}`);
33
+ for (const n of active) {
34
+ const type = n.note_type === "regular" ? "" : n.note_type;
35
+ this.log(` ${pad(n.title, 40)} ${pad(type, 10)} ${formatDate(n.updated_at)}`);
36
+ }
37
+ this.log(`
38
+ ${active.length} note(s)
39
+ `);
40
+ }
41
+ };
42
+ export {
43
+ Notes as default
44
+ };
45
+ //# sourceMappingURL=notes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/notes.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { listNotes } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nfunction formatDate(dateStr: string): string {\n const d = new Date(dateStr);\n return d.toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\", hour: \"2-digit\", minute: \"2-digit\" });\n}\n\nfunction pad(str: string, len: number): string {\n return str.length > len ? str.slice(0, len - 1) + \"…\" : str.padEnd(len);\n}\n\nexport default class Notes extends Command {\n static override description = \"List all notes\";\n\n async run(): Promise<void> {\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId });\n const active = notes.filter((n) => !n.deleted_at);\n\n if (active.length === 0) {\n this.log(\"No notes yet. Create one: vertex new\");\n return;\n }\n\n this.log(`\\n ${pad(\"Title\", 40)} ${pad(\"Type\", 10)} ${pad(\"Updated\", 20)}`);\n this.log(` ${\"─\".repeat(40)} ${\"─\".repeat(10)} ${\"─\".repeat(20)}`);\n for (const n of active) {\n const type = n.note_type === \"regular\" ? \"\" : n.note_type;\n this.log(` ${pad(n.title, 40)} ${pad(type, 10)} ${formatDate(n.updated_at)}`);\n }\n this.log(`\\n ${active.length} note(s)\\n`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AAIxB,SAAS,WAAW,SAAyB;AAC3C,QAAM,IAAI,IAAI,KAAK,OAAO;AAC1B,SAAO,EAAE,mBAAmB,SAAS,EAAE,OAAO,SAAS,KAAK,WAAW,MAAM,WAAW,QAAQ,UAAU,CAAC;AAC7G;AAEA,SAAS,IAAI,KAAa,KAAqB;AAC7C,SAAO,IAAI,SAAS,MAAM,IAAI,MAAM,GAAG,MAAM,CAAC,IAAI,WAAM,IAAI,OAAO,GAAG;AACxE;AAEA,IAAqB,QAArB,cAAmC,QAAQ;AAAA,EACzC,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,OAAO,CAAC;AACzD,UAAM,SAAS,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU;AAEhD,QAAI,OAAO,WAAW,GAAG;AACvB,WAAK,IAAI,sCAAsC;AAC/C;AAAA,IACF;AAEA,SAAK,IAAI;AAAA,IAAO,IAAI,SAAS,EAAE,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC,IAAI,IAAI,WAAW,EAAE,CAAC,EAAE;AAC3E,SAAK,IAAI,KAAK,SAAI,OAAO,EAAE,CAAC,IAAI,SAAI,OAAO,EAAE,CAAC,IAAI,SAAI,OAAO,EAAE,CAAC,EAAE;AAClE,eAAW,KAAK,QAAQ;AACtB,YAAM,OAAO,EAAE,cAAc,YAAY,KAAK,EAAE;AAChD,WAAK,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,MAAM,EAAE,CAAC,IAAI,WAAW,EAAE,UAAU,CAAC,EAAE;AAAA,IAC/E;AACA,SAAK,IAAI;AAAA,IAAO,OAAO,MAAM;AAAA,CAAY;AAAA,EAC3C;AACF;","names":[]}
@@ -0,0 +1,35 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ listNotes,
8
+ restoreNote
9
+ } from "../chunk-4QLCD6TZ.js";
10
+
11
+ // src/commands/restore.ts
12
+ import { Command, Args } from "@oclif/core";
13
+ var Restore = class _Restore extends Command {
14
+ static description = "Restore a note from trash";
15
+ static args = {
16
+ title: Args.string({ description: "Note title (partial match)", required: true })
17
+ };
18
+ async run() {
19
+ const { args } = await this.parse(_Restore);
20
+ const client = await getClient();
21
+ const userId = await getUserId();
22
+ const notes = await listNotes(client, { user_id: userId, include_deleted: true });
23
+ const query = args.title.toLowerCase();
24
+ const match = notes.find((n) => n.deleted_at && n.title.toLowerCase().includes(query));
25
+ if (!match) {
26
+ this.error(`No trashed note matching "${args.title}"`);
27
+ }
28
+ await restoreNote(client, match.id);
29
+ this.log(`Restored: ${match.title}`);
30
+ }
31
+ };
32
+ export {
33
+ Restore as default
34
+ };
35
+ //# sourceMappingURL=restore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/restore.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport { listNotes, restoreNote } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nexport default class Restore extends Command {\n static override description = \"Restore a note from trash\";\n\n static override args = {\n title: Args.string({ description: \"Note title (partial match)\", required: true }),\n };\n\n async run(): Promise<void> {\n const { args } = await this.parse(Restore);\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId, include_deleted: true });\n const query = args.title.toLowerCase();\n const match = notes.find((n) => n.deleted_at && n.title.toLowerCase().includes(query));\n\n if (!match) {\n this.error(`No trashed note matching \"${args.title}\"`);\n }\n\n await restoreNote(client, match.id);\n this.log(`Restored: ${match.title}`);\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,SAAS,YAAY;AAI9B,IAAqB,UAArB,MAAqB,iBAAgB,QAAQ;AAAA,EAC3C,OAAgB,cAAc;AAAA,EAE9B,OAAgB,OAAO;AAAA,IACrB,OAAO,KAAK,OAAO,EAAE,aAAa,8BAA8B,UAAU,KAAK,CAAC;AAAA,EAClF;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,KAAK,IAAI,MAAM,KAAK,MAAM,QAAO;AACzC,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,QAAQ,iBAAiB,KAAK,CAAC;AAChF,UAAM,QAAQ,KAAK,MAAM,YAAY;AACrC,UAAM,QAAQ,MAAM,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,EAAE,SAAS,KAAK,CAAC;AAErF,QAAI,CAAC,OAAO;AACV,WAAK,MAAM,6BAA6B,KAAK,KAAK,GAAG;AAAA,IACvD;AAEA,UAAM,YAAY,QAAQ,MAAM,EAAE;AAClC,SAAK,IAAI,aAAa,MAAM,KAAK,EAAE;AAAA,EACrC;AACF;","names":[]}
@@ -0,0 +1,38 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ executeQuery
8
+ } from "../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/search.ts
11
+ import { Command, Args } from "@oclif/core";
12
+ var Search = class _Search extends Command {
13
+ static description = "Search notes (#tag, type:todo, keywords)";
14
+ static args = {
15
+ query: Args.string({ description: "Search query", required: true })
16
+ };
17
+ async run() {
18
+ const { args } = await this.parse(_Search);
19
+ const client = await getClient();
20
+ const userId = await getUserId();
21
+ const results = await executeQuery(client, userId, args.query);
22
+ if (results.length === 0) {
23
+ this.log("No results.");
24
+ return;
25
+ }
26
+ for (const r of results) {
27
+ const preview = r.block.content.slice(0, 80).replace(/\n/g, " ");
28
+ this.log(` [${r.block.type}] ${r.noteTitle}`);
29
+ this.log(` ${preview}${r.block.content.length > 80 ? "\u2026" : ""}`);
30
+ this.log("");
31
+ }
32
+ this.log(` ${results.length} result(s)`);
33
+ }
34
+ };
35
+ export {
36
+ Search as default
37
+ };
38
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/search.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport { executeQuery } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nexport default class Search extends Command {\n static override description = \"Search notes (#tag, type:todo, keywords)\";\n\n static override args = {\n query: Args.string({ description: \"Search query\", required: true }),\n };\n\n async run(): Promise<void> {\n const { args } = await this.parse(Search);\n const client = await getClient();\n const userId = await getUserId();\n const results = await executeQuery(client, userId, args.query);\n\n if (results.length === 0) {\n this.log(\"No results.\");\n return;\n }\n\n for (const r of results) {\n const preview = r.block.content.slice(0, 80).replace(/\\n/g, \" \");\n this.log(` [${r.block.type}] ${r.noteTitle}`);\n this.log(` ${preview}${r.block.content.length > 80 ? \"…\" : \"\"}`);\n this.log(\"\");\n }\n this.log(` ${results.length} result(s)`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,SAAS,YAAY;AAI9B,IAAqB,SAArB,MAAqB,gBAAe,QAAQ;AAAA,EAC1C,OAAgB,cAAc;AAAA,EAE9B,OAAgB,OAAO;AAAA,IACrB,OAAO,KAAK,OAAO,EAAE,aAAa,gBAAgB,UAAU,KAAK,CAAC;AAAA,EACpE;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,KAAK,IAAI,MAAM,KAAK,MAAM,OAAM;AACxC,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,UAAU,MAAM,aAAa,QAAQ,QAAQ,KAAK,KAAK;AAE7D,QAAI,QAAQ,WAAW,GAAG;AACxB,WAAK,IAAI,aAAa;AACtB;AAAA,IACF;AAEA,eAAW,KAAK,SAAS;AACvB,YAAM,UAAU,EAAE,MAAM,QAAQ,MAAM,GAAG,EAAE,EAAE,QAAQ,OAAO,GAAG;AAC/D,WAAK,IAAI,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,SAAS,EAAE;AAC7C,WAAK,IAAI,OAAO,OAAO,GAAG,EAAE,MAAM,QAAQ,SAAS,KAAK,WAAM,EAAE,EAAE;AAClE,WAAK,IAAI,EAAE;AAAA,IACb;AACA,SAAK,IAAI,KAAK,QAAQ,MAAM,YAAY;AAAA,EAC1C;AACF;","names":[]}
@@ -0,0 +1,39 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import {
6
+ loadConfig
7
+ } from "../chunk-PBF5EE4Y.js";
8
+ import {
9
+ VERTEX_VERSION,
10
+ formatFileSize,
11
+ getStorageInfo,
12
+ listNotes
13
+ } from "../chunk-4QLCD6TZ.js";
14
+
15
+ // src/commands/status.ts
16
+ import { Command } from "@oclif/core";
17
+ var Status = class extends Command {
18
+ static description = "Show account status and storage usage";
19
+ async run() {
20
+ const config = loadConfig();
21
+ const client = await getClient();
22
+ const userId = await getUserId();
23
+ const notes = await listNotes(client, { user_id: userId });
24
+ const active = notes.filter((n) => !n.deleted_at);
25
+ const trashed = notes.filter((n) => n.deleted_at);
26
+ const { used, cap } = await getStorageInfo(client, userId);
27
+ const pct = cap > 0 ? Math.round(used / cap * 100) : 0;
28
+ this.log(`
29
+ Vertex v${VERTEX_VERSION}`);
30
+ this.log(` User: ${config.email ?? "unknown"}`);
31
+ this.log(` Notes: ${active.length} active, ${trashed.length} trashed`);
32
+ this.log(` Storage: ${formatFileSize(used)} / ${formatFileSize(cap)} (${pct}%)`);
33
+ this.log("");
34
+ }
35
+ };
36
+ export {
37
+ Status as default
38
+ };
39
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/status.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { VERTEX_VERSION, listNotes, getStorageInfo, formatFileSize } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\nimport { loadConfig } from \"../lib/config.js\";\n\nexport default class Status extends Command {\n static override description = \"Show account status and storage usage\";\n\n async run(): Promise<void> {\n const config = loadConfig();\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId });\n const active = notes.filter((n) => !n.deleted_at);\n const trashed = notes.filter((n) => n.deleted_at);\n const { used, cap } = await getStorageInfo(client, userId);\n const pct = cap > 0 ? Math.round((used / cap) * 100) : 0;\n\n this.log(`\\n Vertex v${VERTEX_VERSION}`);\n this.log(` User: ${config.email ?? \"unknown\"}`);\n this.log(` Notes: ${active.length} active, ${trashed.length} trashed`);\n this.log(` Storage: ${formatFileSize(used)} / ${formatFileSize(cap)} (${pct}%)`);\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,eAAe;AAKxB,IAAqB,SAArB,cAAoC,QAAQ;AAAA,EAC1C,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,WAAW;AAC1B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,OAAO,CAAC;AACzD,UAAM,SAAS,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU;AAChD,UAAM,UAAU,MAAM,OAAO,CAAC,MAAM,EAAE,UAAU;AAChD,UAAM,EAAE,MAAM,IAAI,IAAI,MAAM,eAAe,QAAQ,MAAM;AACzD,UAAM,MAAM,MAAM,IAAI,KAAK,MAAO,OAAO,MAAO,GAAG,IAAI;AAEvD,SAAK,IAAI;AAAA,YAAe,cAAc,EAAE;AACxC,SAAK,IAAI,cAAc,OAAO,SAAS,SAAS,EAAE;AAClD,SAAK,IAAI,cAAc,OAAO,MAAM,YAAY,QAAQ,MAAM,UAAU;AACxE,SAAK,IAAI,cAAc,eAAe,IAAI,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,GAAG,IAAI;AAChF,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
@@ -0,0 +1,32 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ getUserTags
8
+ } from "../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/tags.ts
11
+ import { Command } from "@oclif/core";
12
+ var Tags = class extends Command {
13
+ static description = "List all tags";
14
+ async run() {
15
+ const client = await getClient();
16
+ const userId = await getUserId();
17
+ const tags = await getUserTags(client, userId);
18
+ if (tags.length === 0) {
19
+ this.log("No tags yet.");
20
+ return;
21
+ }
22
+ for (const t of tags) {
23
+ this.log(` #${t.name}`);
24
+ }
25
+ this.log(`
26
+ ${tags.length} tag(s)`);
27
+ }
28
+ };
29
+ export {
30
+ Tags as default
31
+ };
32
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/tags.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { getUserTags } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nexport default class Tags extends Command {\n static override description = \"List all tags\";\n\n async run(): Promise<void> {\n const client = await getClient();\n const userId = await getUserId();\n const tags = await getUserTags(client, userId);\n\n if (tags.length === 0) {\n this.log(\"No tags yet.\");\n return;\n }\n\n for (const t of tags) {\n this.log(` #${t.name}`);\n }\n this.log(`\\n ${tags.length} tag(s)`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AAIxB,IAAqB,OAArB,cAAkC,QAAQ;AAAA,EACxC,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,OAAO,MAAM,YAAY,QAAQ,MAAM;AAE7C,QAAI,KAAK,WAAW,GAAG;AACrB,WAAK,IAAI,cAAc;AACvB;AAAA,IACF;AAEA,eAAW,KAAK,MAAM;AACpB,WAAK,IAAI,MAAM,EAAE,IAAI,EAAE;AAAA,IACzB;AACA,SAAK,IAAI;AAAA,IAAO,KAAK,MAAM,SAAS;AAAA,EACtC;AACF;","names":[]}
@@ -0,0 +1,33 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ listNotes
8
+ } from "../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/today.ts
11
+ import { Command } from "@oclif/core";
12
+ var Today = class extends Command {
13
+ static description = "Open latest daily note in interactive mode";
14
+ async run() {
15
+ const client = await getClient();
16
+ const userId = await getUserId();
17
+ const notes = await listNotes(client, { user_id: userId, note_type: "daily" });
18
+ const dailies = notes.filter((n) => !n.deleted_at).sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
19
+ if (dailies.length === 0) {
20
+ this.log("No daily notes yet. Create one: vertex daily");
21
+ return;
22
+ }
23
+ const { default: Interactive } = await import("./interactive.js");
24
+ const cmd = new Interactive(this.argv, this.config);
25
+ await cmd.init();
26
+ process.argv = [process.argv[0], process.argv[1], dailies[0].title];
27
+ await Interactive.run([dailies[0].title]);
28
+ }
29
+ };
30
+ export {
31
+ Today as default
32
+ };
33
+ //# sourceMappingURL=today.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/today.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { listNotes } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nexport default class Today extends Command {\n static override description = \"Open latest daily note in interactive mode\";\n\n async run(): Promise<void> {\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId, note_type: \"daily\" as \"daily\" });\n const dailies = notes.filter((n) => !n.deleted_at).sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());\n\n if (dailies.length === 0) {\n this.log(\"No daily notes yet. Create one: vertex daily\");\n return;\n }\n\n const { default: Interactive } = await import(\"./interactive.js\");\n const cmd = new Interactive(this.argv, this.config);\n await cmd.init();\n process.argv = [process.argv[0], process.argv[1], dailies[0].title];\n await Interactive.run([dailies[0].title]);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AAIxB,IAAqB,QAArB,cAAmC,QAAQ;AAAA,EACzC,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,QAAQ,WAAW,QAAmB,CAAC;AACxF,UAAM,UAAU,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,UAAU,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC;AAErI,QAAI,QAAQ,WAAW,GAAG;AACxB,WAAK,IAAI,8CAA8C;AACvD;AAAA,IACF;AAEA,UAAM,EAAE,SAAS,YAAY,IAAI,MAAM,OAAO,kBAAkB;AAChE,UAAM,MAAM,IAAI,YAAY,KAAK,MAAM,KAAK,MAAM;AAClD,UAAM,IAAI,KAAK;AACf,YAAQ,OAAO,CAAC,QAAQ,KAAK,CAAC,GAAG,QAAQ,KAAK,CAAC,GAAG,QAAQ,CAAC,EAAE,KAAK;AAClE,UAAM,YAAY,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;AAAA,EAC1C;AACF;","names":[]}
@@ -0,0 +1,24 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../../chunk-DDFOKGIX.js";
5
+ import "../../chunk-PBF5EE4Y.js";
6
+ import {
7
+ emptyTrash
8
+ } from "../../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/trash/empty.ts
11
+ import { Command } from "@oclif/core";
12
+ var TrashEmpty = class extends Command {
13
+ static description = "Permanently delete all trashed notes";
14
+ async run() {
15
+ const client = await getClient();
16
+ const userId = await getUserId();
17
+ const count = await emptyTrash(client, userId);
18
+ this.log(`Permanently deleted ${count} note(s).`);
19
+ }
20
+ };
21
+ export {
22
+ TrashEmpty as default
23
+ };
24
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/commands/trash/empty.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { emptyTrash } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../../lib/client.js\";\n\nexport default class TrashEmpty extends Command {\n static override description = \"Permanently delete all trashed notes\";\n\n async run(): Promise<void> {\n const client = await getClient();\n const userId = await getUserId();\n const count = await emptyTrash(client, userId);\n this.log(`Permanently deleted ${count} note(s).`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AAIxB,IAAqB,aAArB,cAAwC,QAAQ;AAAA,EAC9C,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,WAAW,QAAQ,MAAM;AAC7C,SAAK,IAAI,uBAAuB,KAAK,WAAW;AAAA,EAClD;AACF;","names":[]}
@@ -0,0 +1,37 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../../chunk-DDFOKGIX.js";
5
+ import "../../chunk-PBF5EE4Y.js";
6
+ import {
7
+ listNotes
8
+ } from "../../chunk-4QLCD6TZ.js";
9
+
10
+ // src/commands/trash/index.ts
11
+ import { Command } from "@oclif/core";
12
+ function formatDate(dateStr) {
13
+ return new Date(dateStr).toLocaleDateString("en-US", { month: "short", day: "numeric" });
14
+ }
15
+ var Trash = class extends Command {
16
+ static description = "List trashed notes";
17
+ async run() {
18
+ const client = await getClient();
19
+ const userId = await getUserId();
20
+ const notes = await listNotes(client, { user_id: userId, include_deleted: true });
21
+ const trashed = notes.filter((n) => n.deleted_at);
22
+ if (trashed.length === 0) {
23
+ this.log("Trash is empty.");
24
+ return;
25
+ }
26
+ for (const n of trashed) {
27
+ this.log(` ${n.title.padEnd(40)} deleted ${formatDate(n.deleted_at)}`);
28
+ }
29
+ this.log(`
30
+ ${trashed.length} note(s) in trash`);
31
+ this.log(" Use: vertex restore <title> | vertex trash:empty");
32
+ }
33
+ };
34
+ export {
35
+ Trash as default
36
+ };
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/commands/trash/index.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { listNotes } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../../lib/client.js\";\n\nfunction formatDate(dateStr: string): string {\n return new Date(dateStr).toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\" });\n}\n\nexport default class Trash extends Command {\n static override description = \"List trashed notes\";\n\n async run(): Promise<void> {\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId, include_deleted: true });\n const trashed = notes.filter((n) => n.deleted_at);\n\n if (trashed.length === 0) {\n this.log(\"Trash is empty.\");\n return;\n }\n\n for (const n of trashed) {\n this.log(` ${n.title.padEnd(40)} deleted ${formatDate(n.deleted_at!)}`);\n }\n this.log(`\\n ${trashed.length} note(s) in trash`);\n this.log(\" Use: vertex restore <title> | vertex trash:empty\");\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,eAAe;AAIxB,SAAS,WAAW,SAAyB;AAC3C,SAAO,IAAI,KAAK,OAAO,EAAE,mBAAmB,SAAS,EAAE,OAAO,SAAS,KAAK,UAAU,CAAC;AACzF;AAEA,IAAqB,QAArB,cAAmC,QAAQ;AAAA,EACzC,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,QAAQ,iBAAiB,KAAK,CAAC;AAChF,UAAM,UAAU,MAAM,OAAO,CAAC,MAAM,EAAE,UAAU;AAEhD,QAAI,QAAQ,WAAW,GAAG;AACxB,WAAK,IAAI,iBAAiB;AAC1B;AAAA,IACF;AAEA,eAAW,KAAK,SAAS;AACvB,WAAK,IAAI,KAAK,EAAE,MAAM,OAAO,EAAE,CAAC,YAAY,WAAW,EAAE,UAAW,CAAC,EAAE;AAAA,IACzE;AACA,SAAK,IAAI;AAAA,IAAO,QAAQ,MAAM,mBAAmB;AACjD,SAAK,IAAI,oDAAoD;AAAA,EAC/D;AACF;","names":[]}
@@ -0,0 +1,35 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import {
7
+ exportNoteAsMarkdown,
8
+ listNotes
9
+ } from "../chunk-4QLCD6TZ.js";
10
+
11
+ // src/commands/view.ts
12
+ import { Command, Args } from "@oclif/core";
13
+ var View = class _View extends Command {
14
+ static description = "View a note as markdown";
15
+ static args = {
16
+ title: Args.string({ description: "Note title (partial match)", required: true })
17
+ };
18
+ async run() {
19
+ const { args } = await this.parse(_View);
20
+ const client = await getClient();
21
+ const userId = await getUserId();
22
+ const notes = await listNotes(client, { user_id: userId });
23
+ const query = args.title.toLowerCase();
24
+ const match = notes.find((n) => !n.deleted_at && n.title.toLowerCase().includes(query));
25
+ if (!match) {
26
+ this.error(`No note matching "${args.title}"`);
27
+ }
28
+ const md = await exportNoteAsMarkdown(client, match.id);
29
+ this.log(md);
30
+ }
31
+ };
32
+ export {
33
+ View as default
34
+ };
35
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/view.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport { listNotes, exportNoteAsMarkdown } from \"@vertex/core\";\nimport { getClient, getUserId } from \"../lib/client.js\";\n\nexport default class View extends Command {\n static override description = \"View a note as markdown\";\n\n static override args = {\n title: Args.string({ description: \"Note title (partial match)\", required: true }),\n };\n\n async run(): Promise<void> {\n const { args } = await this.parse(View);\n const client = await getClient();\n const userId = await getUserId();\n const notes = await listNotes(client, { user_id: userId });\n const query = args.title.toLowerCase();\n const match = notes.find((n) => !n.deleted_at && n.title.toLowerCase().includes(query));\n\n if (!match) {\n this.error(`No note matching \"${args.title}\"`);\n }\n\n const md = await exportNoteAsMarkdown(client, match.id);\n this.log(md);\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,SAAS,YAAY;AAI9B,IAAqB,OAArB,MAAqB,cAAa,QAAQ;AAAA,EACxC,OAAgB,cAAc;AAAA,EAE9B,OAAgB,OAAO;AAAA,IACrB,OAAO,KAAK,OAAO,EAAE,aAAa,8BAA8B,UAAU,KAAK,CAAC;AAAA,EAClF;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,KAAK,IAAI,MAAM,KAAK,MAAM,KAAI;AACtC,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,SAAS,MAAM,UAAU;AAC/B,UAAM,QAAQ,MAAM,UAAU,QAAQ,EAAE,SAAS,OAAO,CAAC;AACzD,UAAM,QAAQ,KAAK,MAAM,YAAY;AACrC,UAAM,QAAQ,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,MAAM,YAAY,EAAE,SAAS,KAAK,CAAC;AAEtF,QAAI,CAAC,OAAO;AACV,WAAK,MAAM,qBAAqB,KAAK,KAAK,GAAG;AAAA,IAC/C;AAEA,UAAM,KAAK,MAAM,qBAAqB,QAAQ,MAAM,EAAE;AACtD,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
@@ -0,0 +1,22 @@
1
+ import {
2
+ isLoggedIn,
3
+ loadConfig
4
+ } from "../chunk-PBF5EE4Y.js";
5
+
6
+ // src/commands/whoami.ts
7
+ import { Command } from "@oclif/core";
8
+ var Whoami = class extends Command {
9
+ static description = "Show logged-in user";
10
+ async run() {
11
+ if (!isLoggedIn()) {
12
+ this.log("Not logged in. Run: vertex login");
13
+ return;
14
+ }
15
+ const config = loadConfig();
16
+ this.log(config.email ?? "Logged in (no email on file)");
17
+ }
18
+ };
19
+ export {
20
+ Whoami as default
21
+ };
22
+ //# sourceMappingURL=whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/whoami.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport { loadConfig, isLoggedIn } from \"../lib/config.js\";\n\nexport default class Whoami extends Command {\n static override description = \"Show logged-in user\";\n\n async run(): Promise<void> {\n if (!isLoggedIn()) {\n this.log(\"Not logged in. Run: vertex login\");\n return;\n }\n const config = loadConfig();\n this.log(config.email ?? \"Logged in (no email on file)\");\n }\n}\n"],"mappings":";;;;;;AAAA,SAAS,eAAe;AAGxB,IAAqB,SAArB,cAAoC,QAAQ;AAAA,EAC1C,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,QAAI,CAAC,WAAW,GAAG;AACjB,WAAK,IAAI,kCAAkC;AAC3C;AAAA,IACF;AACA,UAAM,SAAS,WAAW;AAC1B,SAAK,IAAI,OAAO,SAAS,8BAA8B;AAAA,EACzD;AACF;","names":[]}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // src/index.ts
2
+ import { run } from "@oclif/core";
3
+ export {
4
+ run
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { run } from \"@oclif/core\";\n"],"mappings":";AAAA,SAAS,WAAW;","names":[]}
@@ -0,0 +1,11 @@
1
+ import {
2
+ getClient,
3
+ getUserId
4
+ } from "../chunk-DDFOKGIX.js";
5
+ import "../chunk-PBF5EE4Y.js";
6
+ import "../chunk-4QLCD6TZ.js";
7
+ export {
8
+ getClient,
9
+ getUserId
10
+ };
11
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import {
2
+ clearConfig,
3
+ isLoggedIn,
4
+ loadConfig,
5
+ saveConfig
6
+ } from "../chunk-PBF5EE4Y.js";
7
+ export {
8
+ clearConfig,
9
+ isLoggedIn,
10
+ loadConfig,
11
+ saveConfig
12
+ };
13
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ markdownToTiptap
3
+ } from "../chunk-FWK2J3FR.js";
4
+ export {
5
+ markdownToTiptap
6
+ };
7
+ //# sourceMappingURL=md-to-tiptap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "vertex-notes",
3
+ "version": "0.1.0",
4
+ "description": "Vertex — keyboard-first knowledge workspace CLI",
5
+ "type": "module",
6
+ "bin": {
7
+ "vertex": "./bin/run.js"
8
+ },
9
+ "main": "dist/index.js",
10
+ "files": ["bin", "dist"],
11
+ "keywords": ["vertex", "notes", "cli", "knowledge", "todo", "markdown", "productivity"],
12
+ "author": "Sahil Kumar Sinha",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/sahilcodes2002/vertex"
17
+ },
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
21
+ "scripts": {
22
+ "build": "tsup",
23
+ "typecheck": "tsc --noEmit",
24
+ "clean": "rm -rf dist",
25
+ "prepublishOnly": "pnpm build"
26
+ },
27
+ "dependencies": {
28
+ "@oclif/core": "^4.2.0",
29
+ "@supabase/supabase-js": "^2.49.0"
30
+ },
31
+ "devDependencies": {
32
+ "@vertex/core": "workspace:*",
33
+ "tsup": "^8.4.0",
34
+ "typescript": "^5.7.0",
35
+ "oclif": "^4.17.0"
36
+ },
37
+ "oclif": {
38
+ "bin": "vertex",
39
+ "dirname": "vertex",
40
+ "commands": "./dist/commands"
41
+ }
42
+ }