@dxos/kv-store 0.10.0 → 0.11.1

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.
@@ -0,0 +1,7 @@
1
+ import { Level } from "level";
2
+ //#region src/create-level.ts
3
+ var createLevel = (path) => new Level(path);
4
+ //#endregion
5
+ export { createLevel };
6
+
7
+ //# sourceMappingURL=create-level.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-level.mjs","names":[],"sources":["../../src/create-level.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Level } from 'level';\n\nimport { type LevelDB } from './level';\n\n// Kept out of the package's main entry: `level` binds a native addon when it is imported, which a\n// compiled single-file binary cannot carry, so importing `@dxos/kv-store` for its types alone must not\n// reach it. Types live in `./level`; only callers that actually open a database import this.\n// TODO(burdon): Replace this lib with just typings?\nexport const createLevel = (path: string): LevelDB => new Level<string, string>(path);\n"],"mappings":";;AAYA,IAAa,eAAe,SAA0B,IAAI,MAAsB,IAAI"}
File without changes
@@ -0,0 +1,8 @@
1
+ import { createLevel } from "./create-level.mjs";
2
+ import { PublicKey } from "@dxos/keys";
3
+ //#region src/testing/create-test-level.ts
4
+ var createTestLevel = (path = `/tmp/dxos-${PublicKey.random().toHex()}`) => createLevel(path);
5
+ //#endregion
6
+ export { createTestLevel };
7
+
8
+ //# sourceMappingURL=testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.mjs","names":[],"sources":["../../src/testing/create-test-level.ts"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { PublicKey } from '@dxos/keys';\n\nimport { createLevel } from '../create-level';\nimport { type LevelDB } from '../level';\n\nexport const createTestLevel = (path = `/tmp/dxos-${PublicKey.random().toHex()}`): LevelDB => createLevel(path);\n"],"mappings":";;;AASA,IAAa,mBAAmB,OAAO,aAAa,UAAU,OAAO,CAAC,CAAC,MAAM,QAAiB,YAAY,IAAI"}
@@ -0,0 +1,3 @@
1
+ import { type LevelDB } from './level';
2
+ export declare const createLevel: (path: string) => LevelDB;
3
+ //# sourceMappingURL=create-level.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-level.d.ts","sourceRoot":"","sources":["../../../src/create-level.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAMvC,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,OAA0C,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { type AbstractChainedBatch, type AbstractSublevel } from 'abstract-level';
2
- import { Level } from 'level';
2
+ import { type Level } from 'level';
3
3
  export type LevelDB = Level<string, string>;
4
4
  export type SublevelDB = AbstractSublevel<any, string | Buffer | Uint8Array, string, any>;
5
5
  export type BatchLevel = AbstractChainedBatch<any, string, string>;
6
- export declare const createLevel: (path: string) => LevelDB;
7
6
  //# sourceMappingURL=level.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../../src/level.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1F,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAGnE,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,OAA0C,CAAC"}
1
+ {"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../../src/level.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAC;AAGnC,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1F,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-test-level.d.ts","sourceRoot":"","sources":["../../../../src/testing/create-test-level.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,eAAe,qBAAuD,OAA4B,CAAC"}
1
+ {"version":3,"file":"create-test-level.d.ts","sourceRoot":"","sources":["../../../../src/testing/create-test-level.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,eAAe,qBAAuD,OAA4B,CAAC"}