@hasna/mementos 0.14.2 → 0.14.4

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.
@@ -1,4 +1,4 @@
1
- import { Database } from "bun:sqlite";
1
+ import { SqliteAdapter as Database } from "@hasna/cloud";
2
2
  export declare function getDbPath(): string;
3
3
  export declare function getDatabase(dbPath?: string): Database;
4
4
  export declare function closeDatabase(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAmCtC,wBAAgB,SAAS,IAAI,MAAM,CAkBlC;AAs0BD,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAerD;AA+BD,wBAAgB,aAAa,IAAI,IAAI,CAKpC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,wBAAgB,GAAG,IAAI,MAAM,CAE5B;AAED,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAef"}
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AA8CzD,wBAAgB,SAAS,IAAI,MAAM,CAoBlC;AAs0BD,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAyBrD;AA+BD,wBAAgB,aAAa,IAAI,IAAI,CAKpC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,wBAAgB,GAAG,IAAI,MAAM,CAE5B;AAED,wBAAgB,IAAI,IAAI,MAAM,CAE7B;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAef"}
@@ -6,11 +6,11 @@ export interface Machine {
6
6
  created_at: string;
7
7
  last_seen_at: string;
8
8
  }
9
- export declare function registerMachine(name?: string, db?: import("bun:sqlite").Database): Machine;
10
- export declare function listMachines(db?: import("bun:sqlite").Database): Machine[];
11
- export declare function getMachine(id: string, db?: import("bun:sqlite").Database): Machine | null;
12
- export declare function renameMachine(id: string, newName: string, db?: import("bun:sqlite").Database): Machine;
13
- export declare function touchMachine(id: string, db?: import("bun:sqlite").Database): void;
9
+ export declare function registerMachine(name?: string, db?: import("@hasna/cloud").SqliteAdapter): Machine;
10
+ export declare function listMachines(db?: import("@hasna/cloud").SqliteAdapter): Machine[];
11
+ export declare function getMachine(id: string, db?: import("@hasna/cloud").SqliteAdapter): Machine | null;
12
+ export declare function renameMachine(id: string, newName: string, db?: import("@hasna/cloud").SqliteAdapter): Machine;
13
+ export declare function touchMachine(id: string, db?: import("@hasna/cloud").SqliteAdapter): void;
14
14
  /** Get or auto-register the current machine and return its ID. */
15
- export declare function getCurrentMachineId(db?: import("bun:sqlite").Database): string;
15
+ export declare function getCurrentMachineId(db?: import("@hasna/cloud").SqliteAdapter): string;
16
16
  //# sourceMappingURL=machines.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"machines.d.ts","sourceRoot":"","sources":["../../src/db/machines.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,IAAI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BAAgB,mBAAmB,CAAC,EAAE,uCAAgB,GAAG,MAAM,CAQ9D"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * PostgreSQL migrations for open-mementos cloud sync.
3
+ *
4
+ * Equivalent of the SQLite migrations in database.ts, translated for PostgreSQL.
5
+ * Each element is a standalone SQL string that must be executed in order.
6
+ */
7
+ export declare const PG_MIGRATIONS: string[];
8
+ //# sourceMappingURL=pg-migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-migrations.d.ts","sourceRoot":"","sources":["../../src/db/pg-migrations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,EA8kBjC,CAAC"}