@dxos/random-access-storage 0.8.4-main.548089c → 0.8.4-main.59c2e9b

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/package.json CHANGED
@@ -1,13 +1,28 @@
1
1
  {
2
2
  "name": "@dxos/random-access-storage",
3
- "version": "0.8.4-main.548089c",
3
+ "version": "0.8.4-main.59c2e9b",
4
4
  "description": "Multiple random storage types.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
- "sideEffects": true,
13
+ "sideEffects": false,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#storage": {
17
+ "source": {
18
+ "browser": "./src/browser/index.ts",
19
+ "default": "./src/node/index.ts"
20
+ },
21
+ "types": "./dist/types/src/node/index.d.ts",
22
+ "browser": "./dist/lib/browser/browser/index.mjs",
23
+ "default": "./dist/lib/node-esm/node/index.mjs"
24
+ }
25
+ },
11
26
  "exports": {
12
27
  ".": {
13
28
  "source": "./src/index.ts",
@@ -16,9 +31,6 @@
16
31
  "node": "./dist/lib/node-esm/index.mjs"
17
32
  }
18
33
  },
19
- "browser": {
20
- "./src/index.ts": "./src/browser/index.ts"
21
- },
22
34
  "types": "dist/types/src/index.d.ts",
23
35
  "typesVersions": {
24
36
  "*": {}
@@ -38,13 +50,13 @@
38
50
  "random-access-file": "^2.2.1",
39
51
  "random-access-memory": "^4.1.0",
40
52
  "random-access-storage": "^1.3.0",
41
- "@dxos/async": "0.8.4-main.548089c",
42
- "@dxos/debug": "0.8.4-main.548089c",
43
- "@dxos/invariant": "0.8.4-main.548089c",
44
- "@dxos/tracing": "0.8.4-main.548089c",
45
- "@dxos/log": "0.8.4-main.548089c",
46
- "@dxos/util": "0.8.4-main.548089c",
47
- "@dxos/node-std": "0.8.4-main.548089c"
53
+ "@dxos/async": "0.8.4-main.59c2e9b",
54
+ "@dxos/debug": "0.8.4-main.59c2e9b",
55
+ "@dxos/invariant": "0.8.4-main.59c2e9b",
56
+ "@dxos/log": "0.8.4-main.59c2e9b",
57
+ "@dxos/tracing": "0.8.4-main.59c2e9b",
58
+ "@dxos/node-std": "0.8.4-main.59c2e9b",
59
+ "@dxos/util": "0.8.4-main.59c2e9b"
48
60
  },
49
61
  "devDependencies": {
50
62
  "@types/pify": "^3.0.2",
@@ -6,7 +6,7 @@ import { type File } from './file';
6
6
  import { type StorageType } from './storage';
7
7
  import { getFullPath } from './utils';
8
8
 
9
- export type DirectoryParams = {
9
+ export type DirectoryProps = {
10
10
  type: StorageType;
11
11
  path: string;
12
12
  // TODO(burdon): Create interface for these methods (shared with AbstractStorage).
@@ -28,7 +28,7 @@ export class Directory {
28
28
  private readonly _remove: () => Promise<void>;
29
29
  private readonly _onFlush?: () => Promise<void>;
30
30
 
31
- constructor({ type, path, list, getOrCreateFile, remove, onFlush }: DirectoryParams) {
31
+ constructor({ type, path, list, getOrCreateFile, remove, onFlush }: DirectoryProps) {
32
32
  this.type = type;
33
33
  this.path = path;
34
34
  this._list = list;
package/src/index.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
- export * from './node';
5
+ export * from '#storage';