@captainsafia/burrow 1.0.0-preview.0a24dbc → 1.0.0-preview.d773ac0

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 (2) hide show
  1. package/dist/api.js +3 -2
  2. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/storage/index.ts
2
- import { mkdir, rename, readFile, unlink } from "node:fs/promises";
2
+ import { mkdir, rename, unlink } from "node:fs/promises";
3
3
  import { join as join2 } from "node:path";
4
4
  import { randomBytes } from "node:crypto";
5
5
 
@@ -65,7 +65,8 @@ class Storage {
65
65
  }
66
66
  async read() {
67
67
  try {
68
- const content = await readFile(this.storePath, "utf-8");
68
+ const file = Bun.file(this.storePath);
69
+ const content = await file.text();
69
70
  const store = JSON.parse(content);
70
71
  if (store.version !== STORE_VERSION) {
71
72
  throw new Error(`Unsupported store version: ${store.version}. Expected: ${STORE_VERSION}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captainsafia/burrow",
3
- "version": "1.0.0-preview.0a24dbc",
3
+ "version": "1.0.0-preview.d773ac0",
4
4
  "description": "Platform-agnostic, directory-scoped secrets manager",
5
5
  "type": "module",
6
6
  "main": "dist/api.js",