@alineo-labs/sqlite 0.1.1 → 0.1.3

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 CHANGED
@@ -13,10 +13,10 @@ For production workloads that need durability across multiple processes or machi
13
13
  ## Usage
14
14
 
15
15
  ```ts
16
- import { Alineo } from "alineo";
16
+ import { Sandbox } from "@alineo-labs/sandbox";
17
17
  import { SQLiteAdapter } from "@alineo-labs/sqlite";
18
18
 
19
- const client = new Alineo({
19
+ const client = new Sandbox({
20
20
  baseUrl: "http://localhost:8080",
21
21
  adapter: new SQLiteAdapter("./ledger.db"),
22
22
  });
package/dist/index.mjs CHANGED
@@ -78,7 +78,11 @@ function rowToEntry(row) {
78
78
  var SQLiteAdapter = class {
79
79
  db;
80
80
  constructor(path) {
81
- mkdirSync(dirname(path), { recursive: true });
81
+ try {
82
+ mkdirSync(dirname(path), { recursive: true });
83
+ } catch (e) {
84
+ if (e.code !== "EEXIST") throw e;
85
+ }
82
86
  this.db = new Database(path, { create: true });
83
87
  }
84
88
  async connect() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alineo-labs/sqlite",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "test": "bun test"
29
29
  },
30
30
  "dependencies": {
31
- "@alineo-labs/core": "0.1.0"
31
+ "@alineo-labs/core": "0.2.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "bun-types": "1.3.14",