@dxos/hypercore 0.8.3 → 0.8.4-main.28f8d3d

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/hypercore",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-main.28f8d3d",
4
4
  "description": "Hypercore wrapper and utils.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,6 +10,7 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
16
  "node": "./dist/lib/node-esm/index.mjs"
@@ -28,16 +29,16 @@
28
29
  "sodium-native": "^3.2.0",
29
30
  "sodium-universal": "^3.0.2",
30
31
  "streamx": "^2.12.5",
31
- "@dxos/async": "0.8.3",
32
- "@dxos/codec-protobuf": "0.8.3",
33
- "@dxos/crypto": "0.8.3",
34
- "@dxos/debug": "0.8.3",
35
- "@dxos/invariant": "0.8.3",
36
- "@dxos/keys": "0.8.3",
37
- "@dxos/node-std": "0.8.3",
38
- "@dxos/random-access-storage": "0.8.3",
39
- "@dxos/typings": "0.8.3",
40
- "@dxos/util": "0.8.3"
32
+ "@dxos/async": "0.8.4-main.28f8d3d",
33
+ "@dxos/codec-protobuf": "0.8.4-main.28f8d3d",
34
+ "@dxos/crypto": "0.8.4-main.28f8d3d",
35
+ "@dxos/debug": "0.8.4-main.28f8d3d",
36
+ "@dxos/invariant": "0.8.4-main.28f8d3d",
37
+ "@dxos/node-std": "0.8.4-main.28f8d3d",
38
+ "@dxos/random-access-storage": "0.8.4-main.28f8d3d",
39
+ "@dxos/util": "0.8.4-main.28f8d3d",
40
+ "@dxos/keys": "0.8.4-main.28f8d3d",
41
+ "@dxos/typings": "0.8.4-main.28f8d3d"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/randombytes": "^2.0.0",
@@ -46,10 +47,10 @@
46
47
  "hypercore-protocol": "^8.0.7",
47
48
  "noise-protocol": "3.0.1",
48
49
  "random-access-memory": "^4.1.0",
49
- "@dxos/random": "0.8.3",
50
- "@dxos/tracing": "0.8.3",
51
- "@dxos/util": "0.8.3",
52
- "@dxos/log": "0.8.3"
50
+ "@dxos/log": "0.8.4-main.28f8d3d",
51
+ "@dxos/random": "0.8.4-main.28f8d3d",
52
+ "@dxos/tracing": "0.8.4-main.28f8d3d",
53
+ "@dxos/util": "0.8.4-main.28f8d3d"
53
54
  },
54
55
  "publishConfig": {
55
56
  "access": "public"
package/src/crypto.ts CHANGED
@@ -2,9 +2,10 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import { type AbstractValueEncoding, type Crypto } from 'hypercore';
6
5
  import { callbackify } from 'node:util';
7
6
 
7
+ import { type AbstractValueEncoding, type Crypto } from 'hypercore';
8
+
8
9
  import { type Codec, type EncodingOptions } from '@dxos/codec-protobuf';
9
10
  import { type Signer, verifySignature } from '@dxos/crypto';
10
11
  import { invariant } from '@dxos/invariant';
@@ -6,7 +6,7 @@ import hypercore from 'hypercore';
6
6
  import type { Hypercore, HypercoreOptions } from 'hypercore';
7
7
 
8
8
  import { invariant } from '@dxos/invariant';
9
- import { createStorage, type Directory, StorageType } from '@dxos/random-access-storage';
9
+ import { type Directory, StorageType, createStorage } from '@dxos/random-access-storage';
10
10
 
11
11
  import { py } from './util';
12
12
 
@@ -2,8 +2,9 @@
2
2
  // Copyright 2019 DXOS.org
3
3
  //
4
4
 
5
- import { type AbstractValueEncoding } from 'hypercore';
6
5
  import util from 'node:util';
6
+
7
+ import { type AbstractValueEncoding } from 'hypercore';
7
8
  import { describe, expect, test } from 'vitest';
8
9
 
9
10
  import { type Codec } from '@dxos/codec-protobuf';
@@ -3,6 +3,7 @@
3
3
  //
4
4
 
5
5
  import util from 'node:util';
6
+
6
7
  import { describe, test } from 'vitest';
7
8
 
8
9
  import { latch } from '@dxos/async';
@@ -4,17 +4,17 @@
4
4
 
5
5
  import { describe, expect, test } from 'vitest';
6
6
 
7
- import { latch, sleep, Trigger } from '@dxos/async';
7
+ import { Trigger, latch, sleep } from '@dxos/async';
8
8
  import { createKeyPair } from '@dxos/crypto';
9
9
  import { log } from '@dxos/log';
10
10
  import { faker } from '@dxos/random';
11
- import { createStorage, StorageType } from '@dxos/random-access-storage';
11
+ import { StorageType, createStorage } from '@dxos/random-access-storage';
12
12
  import { TRACE_PROCESSOR } from '@dxos/tracing';
13
13
  import { range, sum } from '@dxos/util';
14
14
 
15
15
  import { HypercoreFactory } from './hypercore-factory';
16
16
  import { createReadable } from './iterator';
17
- import { batch, createDataItem, type TestDataItem } from './testing';
17
+ import { type TestDataItem, batch, createDataItem } from './testing';
18
18
 
19
19
  const noop = () => {};
20
20
 
@@ -3,6 +3,7 @@
3
3
  //
4
4
 
5
5
  import util from 'node:util';
6
+
6
7
  import { Writable } from 'streamx';
7
8
  import { describe, test } from 'vitest';
8
9