@dxos/util 2.33.8-dev.8609bc45 → 2.33.9-dev.002e8917
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/dist/src/complex.test.js +9 -9
- package/dist/src/complex.test.js.map +1 -1
- package/dist/src/human-hash.d.ts +41 -0
- package/dist/src/human-hash.d.ts.map +1 -0
- package/dist/src/human-hash.js +125 -0
- package/dist/src/human-hash.js.map +1 -0
- package/dist/src/human-hash.test.d.ts +2 -0
- package/dist/src/human-hash.test.d.ts.map +1 -0
- package/dist/src/human-hash.test.js +16 -0
- package/dist/src/human-hash.test.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/interval.d.ts +6 -0
- package/dist/src/interval.d.ts.map +1 -0
- package/dist/src/interval.js +22 -0
- package/dist/src/interval.js.map +1 -0
- package/dist/src/json.d.ts.map +1 -1
- package/dist/src/json.js +6 -5
- package/dist/src/json.js.map +1 -1
- package/dist/src/map.js +2 -2
- package/dist/src/map.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -6
- package/src/complex.test.ts +9 -9
- package/src/human-hash.test.ts +18 -0
- package/src/human-hash.ts +132 -0
- package/src/index.ts +2 -0
- package/src/interval.ts +18 -0
- package/src/json.ts +5 -3
- package/src/map.ts +1 -1
package/dist/src/complex.test.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
// Copyright 2020 DXOS.org
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const protocols_1 = require("@dxos/protocols");
|
|
7
7
|
const complex_1 = require("../src/complex");
|
|
8
|
-
const PulicKeySet = (0, complex_1.makeSet)(
|
|
8
|
+
const PulicKeySet = (0, complex_1.makeSet)(key => key.toHex());
|
|
9
9
|
test('ComplexSet', () => {
|
|
10
|
-
const key1 =
|
|
11
|
-
const key2 =
|
|
12
|
-
const key3 =
|
|
10
|
+
const key1 = protocols_1.PublicKey.random();
|
|
11
|
+
const key2 = protocols_1.PublicKey.random();
|
|
12
|
+
const key3 = protocols_1.PublicKey.random();
|
|
13
13
|
const set = new PulicKeySet([key1]);
|
|
14
14
|
expect(set.has(key1)).toBe(true);
|
|
15
15
|
expect(set.has(key2)).toBe(false);
|
|
@@ -26,11 +26,11 @@ test('ComplexSet', () => {
|
|
|
26
26
|
expect(set.has(key2)).toBe(true);
|
|
27
27
|
expect(Array.from(set.values())).toEqual([key2]);
|
|
28
28
|
});
|
|
29
|
-
const PulicKeyMap = (0, complex_1.makeMap)(
|
|
29
|
+
const PulicKeyMap = (0, complex_1.makeMap)(key => key.toHex());
|
|
30
30
|
test('ComplexMap', () => {
|
|
31
|
-
const key1 =
|
|
32
|
-
const key2 =
|
|
33
|
-
const key3 =
|
|
31
|
+
const key1 = protocols_1.PublicKey.random();
|
|
32
|
+
const key2 = protocols_1.PublicKey.random();
|
|
33
|
+
const key3 = protocols_1.PublicKey.random();
|
|
34
34
|
const map = new PulicKeyMap([[key1, 'a']]);
|
|
35
35
|
expect(map.has(key1)).toBe(true);
|
|
36
36
|
expect(map.has(key2)).toBe(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complex.test.js","sourceRoot":"","sources":["../../src/complex.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF
|
|
1
|
+
{"version":3,"file":"complex.test.js","sourceRoot":"","sources":["../../src/complex.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,+CAA4C;AAE5C,4CAAkD;AAElD,MAAM,WAAW,GAAG,IAAA,iBAAO,EAAY,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;AAE3D,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE;I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E,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAErD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEjB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PublicKeyLike } from '@dxos/protocols';
|
|
2
|
+
/**
|
|
3
|
+
* humanhash: Human-readable representations of digests.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HumanHasher {
|
|
6
|
+
private readonly wordlist;
|
|
7
|
+
/**
|
|
8
|
+
* Transforms hex digests to human-readable strings.
|
|
9
|
+
*
|
|
10
|
+
* The format of these strings will look something like:
|
|
11
|
+
* `victor-bacon-zulu-lima`. The output is obtained by compressing the input
|
|
12
|
+
* digest to a fixed number of bytes, then mapping those bytes to one of 256
|
|
13
|
+
* words. A default wordlist is provided, but you can override this if you
|
|
14
|
+
* prefer.
|
|
15
|
+
* As long as you use the same wordlist, the output will be consistent (i.e.
|
|
16
|
+
* the same digest will always render the same representation).
|
|
17
|
+
*
|
|
18
|
+
* @param wordlist A list of exactly 256 words to choose from
|
|
19
|
+
*/
|
|
20
|
+
constructor(wordlist?: string[]);
|
|
21
|
+
/**
|
|
22
|
+
* Humanize a given hexadecimal digest.
|
|
23
|
+
*
|
|
24
|
+
* Change the number of words output by specifying `words`. Change the
|
|
25
|
+
* word separator with `separator`.
|
|
26
|
+
*
|
|
27
|
+
* @param hexdigest A string of hexadecimal characters to humanize
|
|
28
|
+
* @param words How many words to output (more = safer)
|
|
29
|
+
* @param separator The string used to seperate the words
|
|
30
|
+
*/
|
|
31
|
+
humanize(hexdigest: string, words?: number, separator?: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Compress a list of byte values to a fixed target length.
|
|
34
|
+
*
|
|
35
|
+
* @param bytes A list of bytes (numbers from 0-254)
|
|
36
|
+
* @param target The number of bytes to return / compress to
|
|
37
|
+
*/
|
|
38
|
+
_compress(bytes: number[], target: number): number[];
|
|
39
|
+
}
|
|
40
|
+
export declare const humanize: (value: PublicKeyLike) => string;
|
|
41
|
+
//# sourceMappingURL=human-hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-hash.d.ts","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0C3D;;GAEG;AACH,qBAAa,WAAW;IAcT,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAbtC;;;;;;;;;;;;OAYG;gBAC2B,QAAQ,WAAmB;IAOzD;;;;;;;;;OASG;IACH,QAAQ,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,SAAI,EAAE,SAAS,SAAM;IAYvD;;;;;OAKG;IACH,SAAS,CAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;CAqB3C;AAID,eAAO,MAAM,QAAQ,UAAW,aAAa,KAAG,MAQ/C,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2021 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.humanize = exports.HumanHasher = void 0;
|
|
7
|
+
const protocols_1 = require("@dxos/protocols");
|
|
8
|
+
// From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
|
|
9
|
+
const DEFAULT_WORDLIST = [
|
|
10
|
+
'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
|
|
11
|
+
'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
|
|
12
|
+
'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
|
|
13
|
+
'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
|
|
14
|
+
'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
|
|
15
|
+
'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
|
|
16
|
+
'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
|
|
17
|
+
'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
|
|
18
|
+
'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
|
|
19
|
+
'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
|
|
20
|
+
'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
|
|
21
|
+
'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
|
|
22
|
+
'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
|
|
23
|
+
'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
|
|
24
|
+
'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
|
|
25
|
+
'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
|
|
26
|
+
'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
|
|
27
|
+
'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
|
|
28
|
+
'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
|
|
29
|
+
'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
|
|
30
|
+
'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
|
|
31
|
+
'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
|
|
32
|
+
'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
|
|
33
|
+
'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
|
|
34
|
+
'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
|
|
35
|
+
'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
|
|
36
|
+
'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
|
|
37
|
+
'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
|
|
38
|
+
'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
|
|
39
|
+
'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
|
|
40
|
+
'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
|
|
41
|
+
'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
|
|
42
|
+
'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
|
|
43
|
+
'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
|
|
44
|
+
'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
|
|
45
|
+
];
|
|
46
|
+
/**
|
|
47
|
+
* humanhash: Human-readable representations of digests.
|
|
48
|
+
*/
|
|
49
|
+
class HumanHasher {
|
|
50
|
+
/**
|
|
51
|
+
* Transforms hex digests to human-readable strings.
|
|
52
|
+
*
|
|
53
|
+
* The format of these strings will look something like:
|
|
54
|
+
* `victor-bacon-zulu-lima`. The output is obtained by compressing the input
|
|
55
|
+
* digest to a fixed number of bytes, then mapping those bytes to one of 256
|
|
56
|
+
* words. A default wordlist is provided, but you can override this if you
|
|
57
|
+
* prefer.
|
|
58
|
+
* As long as you use the same wordlist, the output will be consistent (i.e.
|
|
59
|
+
* the same digest will always render the same representation).
|
|
60
|
+
*
|
|
61
|
+
* @param wordlist A list of exactly 256 words to choose from
|
|
62
|
+
*/
|
|
63
|
+
constructor(wordlist = DEFAULT_WORDLIST) {
|
|
64
|
+
this.wordlist = wordlist;
|
|
65
|
+
if (wordlist.length !== 256) {
|
|
66
|
+
throw new Error('Wordlist must have exactly 256 items');
|
|
67
|
+
}
|
|
68
|
+
this.wordlist = wordlist;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Humanize a given hexadecimal digest.
|
|
72
|
+
*
|
|
73
|
+
* Change the number of words output by specifying `words`. Change the
|
|
74
|
+
* word separator with `separator`.
|
|
75
|
+
*
|
|
76
|
+
* @param hexdigest A string of hexadecimal characters to humanize
|
|
77
|
+
* @param words How many words to output (more = safer)
|
|
78
|
+
* @param separator The string used to seperate the words
|
|
79
|
+
*/
|
|
80
|
+
humanize(hexdigest, words = 4, separator = '-') {
|
|
81
|
+
const pairs = hexdigest.match(/(..?)/g);
|
|
82
|
+
if (!pairs) {
|
|
83
|
+
throw new Error('');
|
|
84
|
+
}
|
|
85
|
+
const bytes = pairs.map((x) => parseInt(x, 16));
|
|
86
|
+
const compressed = this._compress(bytes, words);
|
|
87
|
+
return compressed.map((x) => this.wordlist[x]).join(separator);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Compress a list of byte values to a fixed target length.
|
|
91
|
+
*
|
|
92
|
+
* @param bytes A list of bytes (numbers from 0-254)
|
|
93
|
+
* @param target The number of bytes to return / compress to
|
|
94
|
+
*/
|
|
95
|
+
_compress(bytes, target) {
|
|
96
|
+
const length = bytes.length;
|
|
97
|
+
if (target > length) {
|
|
98
|
+
throw new Error('Fewer input bytes than requested output');
|
|
99
|
+
}
|
|
100
|
+
// Calculate the segment size (divide and round down)
|
|
101
|
+
const segSize = length / target >> 0;
|
|
102
|
+
// Split 'bytes' array into 'target' number of segments.
|
|
103
|
+
const segments = [];
|
|
104
|
+
for (let i = 0; i < segSize * target; i += segSize) {
|
|
105
|
+
segments.push(bytes.slice(i, i + segSize));
|
|
106
|
+
}
|
|
107
|
+
// Catch any left-over bytes in the last segment.
|
|
108
|
+
segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
|
|
109
|
+
const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
|
|
110
|
+
return checksums;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.HumanHasher = HumanHasher;
|
|
114
|
+
const hasher = new HumanHasher();
|
|
115
|
+
const humanize = (value) => {
|
|
116
|
+
if (value instanceof Buffer || value instanceof Uint8Array) {
|
|
117
|
+
value = protocols_1.PublicKey.stringify(value);
|
|
118
|
+
}
|
|
119
|
+
else if (value instanceof protocols_1.PublicKey) {
|
|
120
|
+
value = value.toHex();
|
|
121
|
+
}
|
|
122
|
+
return hasher.humanize(value);
|
|
123
|
+
};
|
|
124
|
+
exports.humanize = humanize;
|
|
125
|
+
//# sourceMappingURL=human-hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-hash.js","sourceRoot":"","sources":["../../src/human-hash.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,+CAA2D;AAE3D,kGAAkG;AAElG,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IACzE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IACzE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW;IACvE,OAAO,EAAE,SAAS,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SAAS,CAAC,KAAK,CAAC,CAAC;KACpC;SAAM,IAAI,KAAK,YAAY,qBAAS,EAAE;QACrC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;KACvB;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC;AARW,QAAA,QAAQ,YAQnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-hash.test.d.ts","sourceRoot":"","sources":["../../src/human-hash.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2020 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// DXOS testing browser.
|
|
7
|
+
const crypto_1 = require("@dxos/crypto");
|
|
8
|
+
const protocols_1 = require("@dxos/protocols");
|
|
9
|
+
const human_hash_1 = require("./human-hash");
|
|
10
|
+
test('Hashing', () => {
|
|
11
|
+
const { publicKey, secretKey } = (0, crypto_1.createKeyPair)();
|
|
12
|
+
expect((0, human_hash_1.humanize)(publicKey)).not.toEqual((0, human_hash_1.humanize)(secretKey));
|
|
13
|
+
expect((0, human_hash_1.humanize)(publicKey)).toEqual((0, human_hash_1.humanize)(protocols_1.PublicKey.from(publicKey)));
|
|
14
|
+
expect((0, human_hash_1.humanize)((0, crypto_1.createId)())).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=human-hash.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-hash.test.js","sourceRoot":"","sources":["../../src/human-hash.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,wBAAwB;AAExB,yCAAuD;AACvD,+CAA4C;AAE5C,6CAAwC;AAExC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IACnB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAA,sBAAa,GAAE,CAAC;IAEjD,MAAM,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAA,qBAAQ,EAAC,qBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzE,MAAM,CAAC,IAAA,qBAAQ,EAAC,IAAA,iBAAQ,GAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7C,CAAC,CAAC,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -18,6 +18,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
__exportStar(require("./complex"), exports);
|
|
21
|
+
__exportStar(require("./human-hash"), exports);
|
|
22
|
+
__exportStar(require("./interval"), exports);
|
|
21
23
|
__exportStar(require("./json"), exports);
|
|
22
24
|
__exportStar(require("./map"), exports);
|
|
23
25
|
__exportStar(require("./range"), exports);
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,yCAAuB;AACvB,wCAAsB;AACtB,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,4CAA0B;AAC1B,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB;AACvB,wCAAsB;AACtB,0CAAwB;AACxB,0CAAwB;AACxB,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,yDAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interval.d.ts","sourceRoot":"","sources":["../../src/interval.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,0BAA0B,OAAQ,MAAM,IAAI,mBAAmB,MAAM,KAAG,MAAM,IAS1F,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.exponentialBackoffInterval = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Runs the callback in an exponentially increasing interval
|
|
9
|
+
* @returns Callback to clear the interval.
|
|
10
|
+
*/
|
|
11
|
+
const exponentialBackoffInterval = (cb, initialInterval) => {
|
|
12
|
+
let interval = initialInterval;
|
|
13
|
+
const repeat = () => {
|
|
14
|
+
cb();
|
|
15
|
+
interval *= 2;
|
|
16
|
+
timeoutId = setTimeout(repeat, interval);
|
|
17
|
+
};
|
|
18
|
+
let timeoutId = setTimeout(repeat, interval);
|
|
19
|
+
return () => clearTimeout(timeoutId);
|
|
20
|
+
};
|
|
21
|
+
exports.exponentialBackoffInterval = exponentialBackoffInterval;
|
|
22
|
+
//# sourceMappingURL=interval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../src/interval.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF;;;GAGG;AACI,MAAM,0BAA0B,GAAG,CAAC,EAAc,EAAE,eAAuB,EAAc,EAAE;IAChG,IAAI,QAAQ,GAAG,eAAe,CAAC;IAC/B,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,EAAE,EAAE,CAAC;QACL,QAAQ,IAAI,CAAC,CAAC;QACd,SAAS,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,IAAI,SAAS,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC"}
|
package/dist/src/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,YAAY,CAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAqBrE"}
|
package/dist/src/json.js
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.jsonReplacer = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const node_util_1 = require("node:util");
|
|
8
|
+
const protocols_1 = require("@dxos/protocols");
|
|
9
|
+
const human_hash_1 = require("./human-hash");
|
|
9
10
|
/**
|
|
10
11
|
* JSON.stringify replacer.
|
|
11
12
|
*/
|
|
12
13
|
function jsonReplacer(key, value) {
|
|
13
14
|
// TODO(burdon): Why is this represented as `{ type: 'Buffer', data }`.
|
|
14
|
-
if (value !== null && typeof value === 'object' && typeof value[
|
|
15
|
-
return value[
|
|
15
|
+
if (value !== null && typeof value === 'object' && typeof value[node_util_1.inspect.custom] === 'function') {
|
|
16
|
+
return value[node_util_1.inspect.custom]();
|
|
16
17
|
}
|
|
17
18
|
if (value !== null && typeof value === 'object' && value.type === 'Buffer' && Array.isArray(value.data)) {
|
|
18
19
|
if (value.data.length === 32) {
|
|
19
20
|
const key = Buffer.from(value.data);
|
|
20
|
-
return `[${(0,
|
|
21
|
+
return `[${(0, human_hash_1.humanize)(key)}]:[${protocols_1.PublicKey.stringify(key)}]`;
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
24
|
return Buffer.from(value.data).toString('hex');
|
package/dist/src/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,+
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,yCAAoC;AAEpC,+CAA4C;AAE5C,6CAAwC;AAExC;;GAEG;AACH,SAAgB,YAAY,CAAa,GAAW,EAAE,KAAU;IAC9D,uEAAuE;IACvE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,mBAAO,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;QAC9F,OAAO,KAAK,CAAC,mBAAO,CAAC,MAAM,CAAC,EAAE,CAAC;KAChC;IAED,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACvG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpC,OAAO,IAAI,IAAA,qBAAQ,EAAC,GAAG,CAAC,MAAM,qBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SAC3D;aAAM;YACL,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChD;KACF;IAED,wBAAwB;IACxB,mCAAmC;IACnC,8BAA8B;IAC9B,gBAAgB;IAChB,OAAO,KAAK,CAAC;IACb,SAAS;AACX,CAAC;AArBD,oCAqBC"}
|
package/dist/src/map.js
CHANGED
|
@@ -7,7 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.LazyMap = void 0;
|
|
10
|
-
const
|
|
10
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
11
11
|
/**
|
|
12
12
|
* Map with lazily created values.
|
|
13
13
|
*/
|
|
@@ -18,7 +18,7 @@ class LazyMap extends Map {
|
|
|
18
18
|
this._initFn = _initFn;
|
|
19
19
|
}
|
|
20
20
|
getOrInit(key) {
|
|
21
|
-
(0,
|
|
21
|
+
(0, node_assert_1.default)(key);
|
|
22
22
|
if (this.has(key)) {
|
|
23
23
|
return this.get(key);
|
|
24
24
|
}
|
package/dist/src/map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/map.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/map.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,8DAAiC;AAEjC;;GAEG;AACH,mDAAmD;AACnD,MAAa,OAAc,SAAQ,GAAS;IAC1C,YAAqB,OAAsB;QACzC,KAAK,EAAE,CAAC;QADW,YAAO,GAAP,OAAO,CAAe;IAE3C,CAAC;IAED,SAAS,CAAE,GAAM;QACf,IAAA,qBAAM,EAAC,GAAG,CAAC,CAAC;QAEZ,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACjB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;SACvB;aAAM;YACL,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACrB,OAAO,KAAK,CAAC;SACd;IACH,CAAC;CACF;AAhBD,0BAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../crypto/dist/src/encrypt.d.ts","../../crypto/dist/src/hash.d.ts","../../crypto/dist/src/human-hash.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/proto/gen/google/protobuf.d.ts","../../protocols/dist/src/proto/gen/dxos/credentials.d.ts","../../protocols/dist/src/proto/gen/dxos/halo/keys.d.ts","../../protocols/dist/src/proto/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/index.d.ts","../../crypto/dist/src/keys.d.ts","../../crypto/dist/src/validator.d.ts","../../crypto/dist/src/index.d.ts","../../debug/dist/src/assert.d.ts","../../debug/dist/src/console.d.ts","../../debug/dist/src/error-handler.d.ts","../../debug/dist/src/error-stream.d.ts","../../debug/dist/src/errors/dxos-error.d.ts","../../debug/dist/src/errors/errors.d.ts","../../debug/dist/src/errors/index.d.ts","../../debug/dist/src/fail.d.ts","../../debug/dist/src/log-method.d.ts","../../debug/dist/src/logging.d.ts","../../debug/dist/src/raise.d.ts","../../debug/dist/src/stack-trace.d.ts","../../debug/dist/src/strings.d.ts","../../debug/dist/src/throw.d.ts","../../debug/dist/src/throw-unhandled-rejection.d.ts","../../debug/dist/src/timeout-warning.d.ts","../../debug/dist/src/index.d.ts","../src/complex.ts","../src/complex.test.ts","../src/json.ts","../src/map.ts","../src/range.ts","../src/types.ts","../src/randomInt.ts","../src/subscription.ts","../src/uint8array.ts","../src/typeguards.ts","../src/isNotNullOrUndefined.ts","../src/index.ts","../src/map.test.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"0e6c82eab84a7ea274f61068f4db4ab85ce1eb64e4b630d427f47061423d6e56","aae72031068e978fc1b48ffba8a7884c5aa7ee19e0550060d6cf70a04b55afdd","fccc3ab2eb7278d4597fd8b2ae645ace954f1cb9d523acef67d876ed2b66e728","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","011267fade3e4c99b36a9d3d14734461309de6a989f5b27ac7ac98123083e31f","3134f52cda99065c8630aa4552c7509923f76af422bb5643b3bf49bfbbd0894c","7dab91e9b6f9cb074893138261f91345371bbf053099253bc47ccdc722388da3","58ada477113e6a47d967c034a83392adfcaad478688e6916a471919d8798ff53","0c45729ee48934bd4c5f7d2db2c93c26855bd60ddb9ed2e6b50eea540d10874a","e8ba6acb214115658895eddc9eb583d7e3ce74619b50a26bafeeb0496e08cdfd","bf826636d535002b619b91171aa68362f0b2a8486323191131f3d1824ff4d96d","830b201ad1bf6541b32ecb644a7f22102f2de52c3ce298be461d19fcdc69cc86","9c7639831cb6c173b899387480d0e35438dcd7424a9cdfc211ec1f888347011d","03ba2aa9d42a459ebdb546b6b9b7269691a420c3939ed41b7cf210c2f3af860a","49dada859a1e7a2ccfc38c4ee75ef4915983f033a751d0433c80b3932e4f75bc","408961bf1c33d835d9aa7f67892daf49830db17b892eab53a60b70a340e9a37a","217767768c03d9107fab244f0a1d41ee2fc9beea572b9b10d3bbfcda258fa471","4f1f99c145ff1ff5408e1cf043a4b47491e94fc1995d4db7915a5c5a46345d5f","a017d71a02e034534781e25b46b463a247f257f35927fdd22eb540648a218624","307608ba5cb4170e819ebda0ce4f2d18f102abead268a4bbcb42af67f876693a","a52dffe094fa29673bc950ed469299c1852d8cfcfa4d6cfb8a5b7d6e0ca55c3c","391b4ea9ef9bb44bb409b71f3f412cdced854a0851e903131a08b8aba4538109","72121353eb8b54ac8ecc7ec7fb647491a1b66cdd6aeff724f193221266bd068f","9e5f9b01148b742d5e7498fea6e98a177f5e4e3d796fc2a371fdded6e560fce8","84eb87ebd9a5f2e44a9059de4aa82f95ce772e7088c37c006ccc77ef41aa761f","7954a47ca41b3f1f3f6b902ea29d78d239b43f414cff58a857e75260c92fde14","58a2ca0c379c5761fd1cd6e1645cdab0325f5cf0a04cd43d5f551bb727750dcf","aeb42f4a6bd760d4bbaa7029d6470168f2ff738cf9be46b3d2500c417b9cbf59","cdb25af900a1ac76f32cb09ca4bf1f482f32df42e1ab6caaef872493d05be049","a9e293e60119009fe3098c83242507708f3b1fea7b1572b4c5560293877d3d9e",{"version":"7f7db9232355beb52d799ac71459ec6884864e60468a7f74102aebd97000e381","signature":"928947224959c3b37c11e6268624df74232d8ed85f98992a6ccc8f7a0ef50018"},{"version":"9e2bf095afcd4969715bc0399c1612d52ff75bae30aab5784f49f71961dd3fc1","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"cd65fdab85f7bfdcf3e550114b03311eeeff37cdaa6932b75387d233d3f7c143","signature":"f59184ab4d19f15badfe977ae1a29c6dcbd85d87a27c23eec6a0f9c103cb4abe"},{"version":"5d8dc178d835d61d8b67c3e9339423e5cc66bd33bbf216ff42231b20b36076f4","signature":"327fe0395a10f6c4c1d2d06805ca323b448c8d19f4ae762afb00047c08283164"},{"version":"9b230c64a2ca3ccd0ecf32b8f7064a5d799d653fe76ad0180043f52bc008681d","signature":"7906ac4ca3f7860207870620c388c5b2bae84455b7ae5a7f44f98a95116eb83b"},{"version":"ac3d6d5baa46370534c6aa13d6386f7bea0c7ad8c622035a77e99e2d40736fbf","signature":"ebc23fd80647c3f7353db4ee78ccdfe1eb8d77469135aace4664bbd311f0f7f8"},{"version":"906bd57d250d8664cabaece325197d02963ca0abde5f6e4d0a785aa3e55698f6","signature":"6bd2cd44d4eca8268659e47233f06b859257aa50b2c0da5c5f08ace7a6f1418d"},{"version":"f8e7b46c1c74c42a7eb1e71bf68a62ae603288985f21f69381dcee0a351aac18","signature":"f3081e3c746f97bc9be9c587543b1c7edeba352074914834e30ea68c09a521e9"},{"version":"3e9d90efc3b4d6b3bb3abffea5d8901a94126bef70ba138b4dcb5f0f9e6a09ac","signature":"c61c9d7c0c720c1377dca447ff8b90025346a3c9be56b3e02ffdbdf1eec989c6"},{"version":"9a2af5e89959ccdba1a63e749619cb29341969f9826c55538681fccee62d4b25","signature":"4ed29b0d5e2c6c60473d69438c9fc43fe4d3a678d2964255067ee03792389b97"},{"version":"9839e4781fe3173c84c8fd9e6a0dd2d73c07c814ed993af1db7503c4d5d65097","signature":"f20758d157f6e8fef38d65f6f698239d5ac686f43057b05ed80208571655f713"},{"version":"0d64dd723766c6a9155fc4358a563a485afd7176970168f965e9c2dffa449900","signature":"8e450bb982ee4ffb0c58859f17e370c56fe96740cd6469bf98adebc09d6dd681"},{"version":"c9f7a3aa9a97869d72abfdcff1fab9e4dd8eb06c6437959f1ca7c70d079899bc","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[99,150,152],[56,99],[59,99],[60,65,99],[61,71,72,79,88,98,99],[61,62,71,79,99],[63,99],[64,65,72,80,99],[65,88,95,99],[66,68,71,79,99],[67,99],[68,69,99],[70,71,99],[71,99],[71,72,73,88,98,99],[71,72,73,88,99],[99],[74,79,88,98,99],[71,72,74,75,79,88,95,98,99],[74,76,88,95,98,99],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105],[71,77,99],[78,98,99],[68,71,79,88,99],[80,99],[81,99],[59,82,99],[83,97,99,103],[84,99],[85,99],[71,86,99],[86,87,99,101],[71,88,89,90,99],[88,90,99],[88,89,99],[91,99],[92,99],[71,93,94,99],[93,94,99],[65,79,95,99],[96,99],[79,97,99],[60,74,85,98,99],[65,99],[88,99,100],[99,101],[99,102],[60,65,71,73,82,88,98,99,101,103],[88,99,104],[99,146,147],[99,146,147,148,149],[99,151],[53,54,55,99,113,114],[55,99,106,112],[99,106],[99,120],[99,120,121],[99,116,117,118,119,122,123,124,125,126,127,128,129,130,131],[99,112],[99,110,111],[99,107,109],[99,108],[99,109],[99,115,133],[99,132],[99,133,135,136,137,138,139,140,141,142,143],[99,115],[99,136],[133,135,136,137,138,139,140,141,142,143]],"referencedMap":[[153,1],[56,2],[57,2],[59,3],[60,4],[61,5],[62,6],[63,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,12],[70,13],[71,14],[72,15],[73,16],[58,17],[105,17],[74,18],[75,19],[76,20],[106,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,32],[88,33],[90,34],[89,35],[91,36],[92,37],[93,38],[94,39],[95,40],[96,41],[97,42],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,49],[146,17],[148,50],[150,51],[149,50],[147,17],[152,52],[151,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[53,17],[54,17],[55,17],[115,53],[113,54],[114,55],[116,17],[117,17],[118,14],[119,17],[120,17],[121,56],[122,57],[123,17],[132,58],[124,17],[125,17],[126,17],[127,17],[128,59],[130,17],[129,17],[131,17],[112,60],[108,61],[109,62],[107,17],[110,63],[111,55],[134,64],[133,65],[144,66],[143,17],[135,67],[145,68],[136,2],[139,17],[137,17],[140,17],[142,17],[138,17],[141,17]],"exportedModulesMap":[[153,1],[56,2],[57,2],[59,3],[60,4],[61,5],[62,6],[63,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,12],[70,13],[71,14],[72,15],[73,16],[58,17],[105,17],[74,18],[75,19],[76,20],[106,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,32],[88,33],[90,34],[89,35],[91,36],[92,37],[93,38],[94,39],[95,40],[96,41],[97,42],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,49],[146,17],[148,50],[150,51],[149,50],[147,17],[152,52],[151,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[36,17],[41,17],[42,17],[37,17],[38,17],[39,17],[40,17],[8,17],[46,17],[43,17],[44,17],[45,17],[47,17],[9,17],[48,17],[49,17],[50,17],[51,17],[1,17],[10,17],[52,17],[53,17],[54,17],[55,17],[115,53],[113,54],[114,55],[116,17],[117,17],[118,14],[119,17],[120,17],[121,56],[122,57],[123,17],[132,58],[124,17],[125,17],[126,17],[127,17],[128,59],[130,17],[129,17],[131,17],[112,60],[108,61],[109,62],[107,17],[110,63],[111,55],[144,69]],"semanticDiagnosticsPerFile":[153,56,57,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,58,105,74,75,76,106,77,78,79,80,81,82,83,84,85,86,87,88,90,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,146,148,150,149,147,152,151,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,53,54,55,115,113,114,116,117,118,119,120,121,122,123,132,124,125,126,127,128,130,129,131,112,108,109,107,110,111,134,133,144,143,135,145,136,139,137,140,142,138,141]},"version":"4.7.4"}
|
|
1
|
+
{"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts","../../protocols/dist/src/public-key.d.ts","../../protocols/dist/src/timeframe.d.ts","../../protocols/dist/src/index.d.ts","../../debug/dist/src/assert.d.ts","../../debug/dist/src/console.d.ts","../../debug/dist/src/error-handler.d.ts","../../debug/dist/src/error-stream.d.ts","../../debug/dist/src/errors/dxos-error.d.ts","../../debug/dist/src/errors/errors.d.ts","../../debug/dist/src/errors/index.d.ts","../../debug/dist/src/fail.d.ts","../../debug/dist/src/log-method.d.ts","../../debug/dist/src/logging.d.ts","../../debug/dist/src/raise.d.ts","../../debug/dist/src/stack-trace.d.ts","../../debug/dist/src/strings.d.ts","../../debug/dist/src/throw.d.ts","../../debug/dist/src/throw-unhandled-rejection.d.ts","../../debug/dist/src/timeout-warning.d.ts","../../debug/dist/src/index.d.ts","../src/complex.ts","../src/complex.test.ts","../../crypto/dist/src/encrypt.d.ts","../../crypto/dist/src/hash.d.ts","../../crypto/dist/src/keys.d.ts","../../crypto/dist/src/validator.d.ts","../../crypto/dist/src/index.d.ts","../src/human-hash.ts","../src/human-hash.test.ts","../src/interval.ts","../src/json.ts","../src/map.ts","../src/range.ts","../src/types.ts","../src/randomInt.ts","../src/subscription.ts","../src/uint8array.ts","../src/typeguards.ts","../src/isNotNullOrUndefined.ts","../src/index.ts","../src/map.test.ts","../../../../common/temp/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../../common/temp/node_modules/.pnpm/@sinclair+typebox@0.24.20/node_modules/@sinclair/typebox/typebox.d.ts","../../../../common/temp/node_modules/.pnpm/@jest+schemas@28.1.3/node_modules/@jest/schemas/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@28.1.3/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@28.1.3/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/jest-matcher-utils@28.1.3/node_modules/jest-matcher-utils/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@28.1.6/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","7ab6383af7cd92b7d19f0038816b929df737225f03eba8ec80123771c4e1360a","8bad6d59c88f12dde4174ad9a1e7375fa53349906beb1979638331a193620d54","bb4dcd8e439343e9262253b7b298b68e80914c0d7d460a0d0528abc8b06aa88b","03ba2aa9d42a459ebdb546b6b9b7269691a420c3939ed41b7cf210c2f3af860a","49dada859a1e7a2ccfc38c4ee75ef4915983f033a751d0433c80b3932e4f75bc","408961bf1c33d835d9aa7f67892daf49830db17b892eab53a60b70a340e9a37a","217767768c03d9107fab244f0a1d41ee2fc9beea572b9b10d3bbfcda258fa471","4f1f99c145ff1ff5408e1cf043a4b47491e94fc1995d4db7915a5c5a46345d5f","a017d71a02e034534781e25b46b463a247f257f35927fdd22eb540648a218624","307608ba5cb4170e819ebda0ce4f2d18f102abead268a4bbcb42af67f876693a","a52dffe094fa29673bc950ed469299c1852d8cfcfa4d6cfb8a5b7d6e0ca55c3c","391b4ea9ef9bb44bb409b71f3f412cdced854a0851e903131a08b8aba4538109","72121353eb8b54ac8ecc7ec7fb647491a1b66cdd6aeff724f193221266bd068f","9e5f9b01148b742d5e7498fea6e98a177f5e4e3d796fc2a371fdded6e560fce8","84eb87ebd9a5f2e44a9059de4aa82f95ce772e7088c37c006ccc77ef41aa761f","7954a47ca41b3f1f3f6b902ea29d78d239b43f414cff58a857e75260c92fde14","58a2ca0c379c5761fd1cd6e1645cdab0325f5cf0a04cd43d5f551bb727750dcf","aeb42f4a6bd760d4bbaa7029d6470168f2ff738cf9be46b3d2500c417b9cbf59","cdb25af900a1ac76f32cb09ca4bf1f482f32df42e1ab6caaef872493d05be049","a9e293e60119009fe3098c83242507708f3b1fea7b1572b4c5560293877d3d9e",{"version":"7f7db9232355beb52d799ac71459ec6884864e60468a7f74102aebd97000e381","signature":"928947224959c3b37c11e6268624df74232d8ed85f98992a6ccc8f7a0ef50018"},{"version":"d66abedcb2dd1cc29f5b4cd5db8d642d684a76fc3e3ef1c1790745053e7ebf2a","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"0e6c82eab84a7ea274f61068f4db4ab85ce1eb64e4b630d427f47061423d6e56","aae72031068e978fc1b48ffba8a7884c5aa7ee19e0550060d6cf70a04b55afdd","db69aac3d80e17984bd82c349e1e8a24fa787c76027b7b9999bfaef7bb232410","830b201ad1bf6541b32ecb644a7f22102f2de52c3ce298be461d19fcdc69cc86","e3d0023ea179500996021375faad1793a11b18c0fcf0a8da136815f22b707d9b",{"version":"455ddbe7be303ea151b11215b43fb2b483953cfd8421ee1d4faa15e11b65575c","signature":"eb4a42ce89bafbc5bed1e69fb41b1ae345dd3d63ddcc4e10044a2c743368f154"},{"version":"d55bd12cc37d098cb0b4120a77b2c1c8dd173c91a9402814b36078a1c450ebb4","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"5ae4cd74ec72344f2051f60de4de276be17c9d53acff20193464472c4b29ee90","signature":"02d5c84065783a8edd6d2dd47db9f2e76115375f3c308c26af9c2db387836320"},{"version":"bf64d89b53376a09fcd3f818743bc3419bb991ab9368b87dc6d45ef30298f46c","signature":"f59184ab4d19f15badfe977ae1a29c6dcbd85d87a27c23eec6a0f9c103cb4abe"},{"version":"ddc5ba78ad438d2f41acd35d7e36883b75f9c85949e33dcc804e5fa70fd5a9c1","signature":"327fe0395a10f6c4c1d2d06805ca323b448c8d19f4ae762afb00047c08283164"},{"version":"9b230c64a2ca3ccd0ecf32b8f7064a5d799d653fe76ad0180043f52bc008681d","signature":"7906ac4ca3f7860207870620c388c5b2bae84455b7ae5a7f44f98a95116eb83b"},{"version":"ac3d6d5baa46370534c6aa13d6386f7bea0c7ad8c622035a77e99e2d40736fbf","signature":"ebc23fd80647c3f7353db4ee78ccdfe1eb8d77469135aace4664bbd311f0f7f8"},{"version":"906bd57d250d8664cabaece325197d02963ca0abde5f6e4d0a785aa3e55698f6","signature":"6bd2cd44d4eca8268659e47233f06b859257aa50b2c0da5c5f08ace7a6f1418d"},{"version":"f8e7b46c1c74c42a7eb1e71bf68a62ae603288985f21f69381dcee0a351aac18","signature":"f3081e3c746f97bc9be9c587543b1c7edeba352074914834e30ea68c09a521e9"},{"version":"3e9d90efc3b4d6b3bb3abffea5d8901a94126bef70ba138b4dcb5f0f9e6a09ac","signature":"c61c9d7c0c720c1377dca447ff8b90025346a3c9be56b3e02ffdbdf1eec989c6"},{"version":"9a2af5e89959ccdba1a63e749619cb29341969f9826c55538681fccee62d4b25","signature":"4ed29b0d5e2c6c60473d69438c9fc43fe4d3a678d2964255067ee03792389b97"},{"version":"9839e4781fe3173c84c8fd9e6a0dd2d73c07c814ed993af1db7503c4d5d65097","signature":"f20758d157f6e8fef38d65f6f698239d5ac686f43057b05ed80208571655f713"},{"version":"d8eb93ad309fed947c50a88ec3e3c9d8239a5ac286180f424de2d430b75bda4b","signature":"34d820d5d1c3cb890e45ab6453a18c20d18f5f4f0db53876e84c3bf45b86d47f"},{"version":"c9f7a3aa9a97869d72abfdcff1fab9e4dd8eb06c6437959f1ca7c70d079899bc","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d982cdd2610155b3cbcbfa62ccabcf2d2b739f821518ef113348d160ef0010d9","ffcc5500e77223169833fc6eb59b3a507944a1f89574e0a1276b0ea7fc22c4a4","22f13de9e2fe5f0f4724797abd3d34a1cdd6e47ef81fc4933fea3b8bf4ad524b","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","cda0cb09b995489b7f4c57f168cd31b83dcbaa7aad49612734fb3c9c73f6e4f2",{"version":"1de1ad6a1929317171d8cfcd55bb2732257680c1bf89bcd53e1d46a4d8dbda22","affectsGlobalScope":true}],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[96,146],[96],[96,148,150],[53,96],[56,96],[57,62,96],[58,68,69,76,85,95,96],[58,59,68,76,96],[60,96],[61,62,69,77,96],[62,85,92,96],[63,65,68,76,96],[64,96],[65,66,96],[67,68,96],[68,96],[68,69,70,85,95,96],[68,69,70,85,96],[71,76,85,95,96],[68,69,71,72,76,85,92,95,96],[71,73,85,92,95,96],[53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102],[68,74,96],[75,95,96],[65,68,76,85,96],[77,96],[78,96],[56,79,96],[80,94,96,100],[81,96],[82,96],[68,83,96],[83,84,96,98],[68,85,86,87,96],[85,87,96],[85,86,96],[88,96],[89,96],[68,90,91,96],[90,91,96],[62,76,92,96],[93,96],[76,94,96],[57,71,82,95,96],[62,96],[85,96,97],[96,98],[96,99],[57,62,68,70,79,85,95,96,98,100],[85,96,101],[96,148],[96,145,149],[96,147],[96,126,127,128,129],[96,103,106],[96,103],[96,111],[96,111,112],[96,107,108,109,110,113,114,115,116,117,118,119,120,121,122],[96,106],[96,104,105],[96,103,104],[96,106,124],[96,123],[96,106,130,131],[96,124,131,133,134,135,136,137,138,139,140,141,142],[96,106,131],[96,135],[106],[124,131,133,134,135,136,137,138,139,140,141,142]],"referencedMap":[[147,1],[146,2],[151,3],[53,4],[54,4],[56,5],[57,6],[58,7],[59,8],[60,9],[61,10],[62,11],[63,12],[64,13],[65,14],[66,14],[67,15],[68,16],[69,17],[70,18],[55,2],[102,2],[71,19],[72,20],[73,21],[103,22],[74,23],[75,24],[76,25],[77,26],[78,27],[79,28],[80,29],[81,30],[82,31],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[145,2],[149,51],[150,52],[148,53],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[4,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[32,2],[33,2],[34,2],[35,2],[7,2],[36,2],[41,2],[42,2],[37,2],[38,2],[39,2],[40,2],[8,2],[46,2],[43,2],[44,2],[45,2],[47,2],[9,2],[48,2],[49,2],[50,2],[51,2],[1,2],[10,2],[52,2],[126,2],[127,2],[130,54],[128,55],[129,56],[107,2],[108,2],[109,16],[110,2],[111,2],[112,57],[113,58],[114,2],[123,59],[115,2],[116,2],[117,2],[118,2],[119,60],[121,2],[120,2],[122,2],[106,61],[104,56],[105,62],[125,63],[124,64],[132,65],[131,60],[143,66],[133,2],[142,2],[134,67],[144,68],[135,4],[138,2],[136,2],[139,2],[141,2],[137,2],[140,2]],"exportedModulesMap":[[147,1],[146,2],[151,3],[53,4],[54,4],[56,5],[57,6],[58,7],[59,8],[60,9],[61,10],[62,11],[63,12],[64,13],[65,14],[66,14],[67,15],[68,16],[69,17],[70,18],[55,2],[102,2],[71,19],[72,20],[73,21],[103,22],[74,23],[75,24],[76,25],[77,26],[78,27],[79,28],[80,29],[81,30],[82,31],[83,32],[84,33],[85,34],[87,35],[86,36],[88,37],[89,38],[90,39],[91,40],[92,41],[93,42],[94,43],[95,44],[96,45],[97,46],[98,47],[99,48],[100,49],[101,50],[145,2],[149,51],[150,52],[148,53],[12,2],[11,2],[2,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[3,2],[4,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[32,2],[33,2],[34,2],[35,2],[7,2],[36,2],[41,2],[42,2],[37,2],[38,2],[39,2],[40,2],[8,2],[46,2],[43,2],[44,2],[45,2],[47,2],[9,2],[48,2],[49,2],[50,2],[51,2],[1,2],[10,2],[52,2],[126,2],[127,2],[130,54],[128,55],[129,56],[107,2],[108,2],[109,16],[110,2],[111,2],[112,57],[113,58],[114,2],[123,59],[115,2],[116,2],[117,2],[118,2],[119,60],[121,2],[120,2],[122,2],[106,61],[104,56],[105,62],[131,69],[143,70]],"semanticDiagnosticsPerFile":[147,146,151,53,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,55,102,71,72,73,103,74,75,76,77,78,79,80,81,82,83,84,85,87,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,145,149,150,148,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,36,41,42,37,38,39,40,8,46,43,44,45,47,9,48,49,50,51,1,10,52,126,127,130,128,129,107,108,109,110,111,112,113,114,123,115,116,117,118,119,121,120,122,106,104,105,125,124,132,131,143,133,142,134,144,135,138,136,139,141,137,140]},"version":"4.7.4"}
|
package/package.json
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/util",
|
|
3
|
-
"version": "2.33.
|
|
3
|
+
"version": "2.33.9-dev.002e8917",
|
|
4
4
|
"description": "Temporary bucket for misc functions, which should graduate into separate packages.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "DXOS.org",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"types": "dist/src/index.d.ts",
|
|
9
|
+
"browser": {
|
|
10
|
+
"node:assert": "assert",
|
|
11
|
+
"node:util": "util"
|
|
12
|
+
},
|
|
9
13
|
"files": [
|
|
10
14
|
"dist",
|
|
11
15
|
"src"
|
|
12
16
|
],
|
|
13
17
|
"dependencies": {
|
|
14
|
-
"@dxos/
|
|
15
|
-
"@dxos/
|
|
16
|
-
"
|
|
18
|
+
"@dxos/debug": "2.33.9-dev.002e8917",
|
|
19
|
+
"@dxos/protocols": "2.33.9-dev.002e8917",
|
|
20
|
+
"assert": "^2.0.0",
|
|
21
|
+
"util": "^0.12.4"
|
|
17
22
|
},
|
|
18
23
|
"devDependencies": {
|
|
24
|
+
"@dxos/crypto": "2.33.9-dev.002e8917",
|
|
19
25
|
"@dxos/eslint-plugin": "~1.0.34",
|
|
20
|
-
"@dxos/protocols
|
|
21
|
-
"@
|
|
26
|
+
"@dxos/protocols": "2.33.9-dev.002e8917",
|
|
27
|
+
"@dxos/protocols-toolchain": "2.33.8",
|
|
28
|
+
"@types/jest": "^28.1.6",
|
|
29
|
+
"@types/node": "^16.11.27",
|
|
22
30
|
"eslint": "^7.12.1",
|
|
23
31
|
"typescript": "^4.7.2"
|
|
24
32
|
},
|
package/src/complex.test.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { PublicKey } from '@dxos/protocols';
|
|
6
6
|
|
|
7
7
|
import { makeSet, makeMap } from '../src/complex';
|
|
8
8
|
|
|
9
|
-
const PulicKeySet = makeSet<
|
|
9
|
+
const PulicKeySet = makeSet<PublicKey>(key => key.toHex());
|
|
10
10
|
|
|
11
11
|
test('ComplexSet', () => {
|
|
12
|
-
const key1 =
|
|
13
|
-
const key2 =
|
|
14
|
-
const key3 =
|
|
12
|
+
const key1 = PublicKey.random();
|
|
13
|
+
const key2 = PublicKey.random();
|
|
14
|
+
const key3 = PublicKey.random();
|
|
15
15
|
|
|
16
16
|
const set = new PulicKeySet([key1]);
|
|
17
17
|
|
|
@@ -37,12 +37,12 @@ test('ComplexSet', () => {
|
|
|
37
37
|
expect(Array.from(set.values())).toEqual([key2]);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
const PulicKeyMap = makeMap<
|
|
40
|
+
const PulicKeyMap = makeMap<PublicKey>(key => key.toHex());
|
|
41
41
|
|
|
42
42
|
test('ComplexMap', () => {
|
|
43
|
-
const key1 =
|
|
44
|
-
const key2 =
|
|
45
|
-
const key3 =
|
|
43
|
+
const key1 = PublicKey.random();
|
|
44
|
+
const key2 = PublicKey.random();
|
|
45
|
+
const key3 = PublicKey.random();
|
|
46
46
|
|
|
47
47
|
const map = new PulicKeyMap<string>([[key1, 'a']]);
|
|
48
48
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// DXOS testing browser.
|
|
6
|
+
|
|
7
|
+
import { createKeyPair, createId } from '@dxos/crypto';
|
|
8
|
+
import { PublicKey } from '@dxos/protocols';
|
|
9
|
+
|
|
10
|
+
import { humanize } from './human-hash';
|
|
11
|
+
|
|
12
|
+
test('Hashing', () => {
|
|
13
|
+
const { publicKey, secretKey } = createKeyPair();
|
|
14
|
+
|
|
15
|
+
expect(humanize(publicKey)).not.toEqual(humanize(secretKey));
|
|
16
|
+
expect(humanize(publicKey)).toEqual(humanize(PublicKey.from(publicKey)));
|
|
17
|
+
expect(humanize(createId())).toBeDefined();
|
|
18
|
+
});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { PublicKey, PublicKeyLike } from '@dxos/protocols';
|
|
6
|
+
|
|
7
|
+
// From https://github.com/SEBv15/humanhash/blob/166c1a6f70d854fe6767cdd76be1237112d4eaf1/index.js
|
|
8
|
+
|
|
9
|
+
const DEFAULT_WORDLIST = [
|
|
10
|
+
'ack', 'alabama', 'alanine', 'alaska', 'alpha', 'angel', 'apart', 'april',
|
|
11
|
+
'arizona', 'arkansas', 'artist', 'asparagus', 'aspen', 'august', 'autumn',
|
|
12
|
+
'avocado', 'bacon', 'bakerloo', 'batman', 'beer', 'berlin', 'beryllium',
|
|
13
|
+
'black', 'blossom', 'blue', 'bluebird', 'bravo', 'bulldog', 'burger',
|
|
14
|
+
'butter', 'california', 'carbon', 'cardinal', 'carolina', 'carpet', 'cat',
|
|
15
|
+
'ceiling', 'charlie', 'chicken', 'coffee', 'cola', 'cold', 'colorado',
|
|
16
|
+
'comet', 'connecticut', 'crazy', 'cup', 'dakota', 'december', 'delaware',
|
|
17
|
+
'delta', 'diet', 'don', 'double', 'early', 'earth', 'east', 'echo',
|
|
18
|
+
'edward', 'eight', 'eighteen', 'eleven', 'emma', 'enemy', 'equal',
|
|
19
|
+
'failed', 'fanta', 'fifteen', 'fillet', 'finch', 'fish', 'five', 'fix',
|
|
20
|
+
'floor', 'florida', 'football', 'four', 'fourteen', 'foxtrot', 'freddie',
|
|
21
|
+
'friend', 'fruit', 'gee', 'georgia', 'glucose', 'golf', 'green', 'grey',
|
|
22
|
+
'hamper', 'happy', 'harry', 'hawaii', 'helium', 'high', 'hot', 'hotel',
|
|
23
|
+
'hydrogen', 'idaho', 'illinois', 'india', 'indigo', 'ink', 'iowa',
|
|
24
|
+
'island', 'item', 'jersey', 'jig', 'johnny', 'juliet', 'july', 'jupiter',
|
|
25
|
+
'kansas', 'kentucky', 'kilo', 'king', 'kitten', 'lactose', 'lake', 'lamp',
|
|
26
|
+
'lemon', 'leopard', 'lima', 'lion', 'lithium', 'london', 'louisiana',
|
|
27
|
+
'low', 'magazine', 'magnesium', 'maine', 'mango', 'march', 'mars',
|
|
28
|
+
'maryland', 'massachusetts', 'may', 'mexico', 'michigan', 'mike',
|
|
29
|
+
'minnesota', 'mirror', 'mississippi', 'missouri', 'mobile', 'mockingbird',
|
|
30
|
+
'monkey', 'montana', 'moon', 'mountain', 'muppet', 'music', 'nebraska',
|
|
31
|
+
'neptune', 'network', 'nevada', 'nine', 'nineteen', 'nitrogen', 'north',
|
|
32
|
+
'november', 'nuts', 'october', 'ohio', 'oklahoma', 'one', 'orange',
|
|
33
|
+
'oranges', 'oregon', 'oscar', 'oven', 'oxygen', 'papa', 'paris', 'pasta',
|
|
34
|
+
'pennsylvania', 'pip', 'pizza', 'pluto', 'potato', 'princess', 'purple',
|
|
35
|
+
'quebec', 'queen', 'quiet', 'red', 'river', 'robert', 'robin', 'romeo',
|
|
36
|
+
'rugby', 'sad', 'salami', 'saturn', 'september', 'seven', 'seventeen',
|
|
37
|
+
'shade', 'sierra', 'single', 'sink', 'six', 'sixteen', 'skylark', 'snake',
|
|
38
|
+
'social', 'sodium', 'solar', 'south', 'spaghetti', 'speaker', 'spring',
|
|
39
|
+
'stairway', 'steak', 'stream', 'summer', 'sweet', 'table', 'tango', 'ten',
|
|
40
|
+
'tennessee', 'tennis', 'texas', 'thirteen', 'three', 'timing', 'triple',
|
|
41
|
+
'twelve', 'twenty', 'two', 'uncle', 'undress', 'uniform', 'uranus', 'utah',
|
|
42
|
+
'vegan', 'venus', 'vermont', 'victor', 'video', 'violet', 'virginia',
|
|
43
|
+
'washington', 'west', 'whiskey', 'white', 'william', 'winner', 'winter',
|
|
44
|
+
'wisconsin', 'wolfram', 'wyoming', 'xray', 'yankee', 'yellow', 'zebra', 'zulu'
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* humanhash: Human-readable representations of digests.
|
|
49
|
+
*/
|
|
50
|
+
export class HumanHasher {
|
|
51
|
+
/**
|
|
52
|
+
* Transforms hex digests to human-readable strings.
|
|
53
|
+
*
|
|
54
|
+
* The format of these strings will look something like:
|
|
55
|
+
* `victor-bacon-zulu-lima`. The output is obtained by compressing the input
|
|
56
|
+
* digest to a fixed number of bytes, then mapping those bytes to one of 256
|
|
57
|
+
* words. A default wordlist is provided, but you can override this if you
|
|
58
|
+
* prefer.
|
|
59
|
+
* As long as you use the same wordlist, the output will be consistent (i.e.
|
|
60
|
+
* the same digest will always render the same representation).
|
|
61
|
+
*
|
|
62
|
+
* @param wordlist A list of exactly 256 words to choose from
|
|
63
|
+
*/
|
|
64
|
+
constructor (private readonly wordlist = DEFAULT_WORDLIST) {
|
|
65
|
+
if (wordlist.length !== 256) {
|
|
66
|
+
throw new Error('Wordlist must have exactly 256 items');
|
|
67
|
+
}
|
|
68
|
+
this.wordlist = wordlist;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Humanize a given hexadecimal digest.
|
|
73
|
+
*
|
|
74
|
+
* Change the number of words output by specifying `words`. Change the
|
|
75
|
+
* word separator with `separator`.
|
|
76
|
+
*
|
|
77
|
+
* @param hexdigest A string of hexadecimal characters to humanize
|
|
78
|
+
* @param words How many words to output (more = safer)
|
|
79
|
+
* @param separator The string used to seperate the words
|
|
80
|
+
*/
|
|
81
|
+
humanize (hexdigest: string, words = 4, separator = '-') {
|
|
82
|
+
const pairs = hexdigest.match(/(..?)/g);
|
|
83
|
+
if (!pairs) {
|
|
84
|
+
throw new Error('');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const bytes = pairs.map((x) => parseInt(x, 16));
|
|
88
|
+
const compressed = this._compress(bytes, words);
|
|
89
|
+
|
|
90
|
+
return compressed.map((x) => this.wordlist[x]).join(separator);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Compress a list of byte values to a fixed target length.
|
|
95
|
+
*
|
|
96
|
+
* @param bytes A list of bytes (numbers from 0-254)
|
|
97
|
+
* @param target The number of bytes to return / compress to
|
|
98
|
+
*/
|
|
99
|
+
_compress (bytes: number[], target: number) {
|
|
100
|
+
const length = bytes.length;
|
|
101
|
+
if (target > length) {
|
|
102
|
+
throw new Error('Fewer input bytes than requested output');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Calculate the segment size (divide and round down)
|
|
106
|
+
const segSize = length / target >> 0;
|
|
107
|
+
|
|
108
|
+
// Split 'bytes' array into 'target' number of segments.
|
|
109
|
+
const segments = [];
|
|
110
|
+
for (let i = 0; i < segSize * target; i += segSize) {
|
|
111
|
+
segments.push(bytes.slice(i, i + segSize));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Catch any left-over bytes in the last segment.
|
|
115
|
+
segments[segments.length - 1] = segments[segments.length - 1].concat(bytes.slice(target * segSize));
|
|
116
|
+
|
|
117
|
+
const checksums = segments.map((x) => x.reduce((acc, curr) => acc ^ curr));
|
|
118
|
+
return checksums;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const hasher = new HumanHasher();
|
|
123
|
+
|
|
124
|
+
export const humanize = (value: PublicKeyLike): string => {
|
|
125
|
+
if (value instanceof Buffer || value instanceof Uint8Array) {
|
|
126
|
+
value = PublicKey.stringify(value);
|
|
127
|
+
} else if (value instanceof PublicKey) {
|
|
128
|
+
value = value.toHex();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return hasher.humanize(value);
|
|
132
|
+
};
|
package/src/index.ts
CHANGED
package/src/interval.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Runs the callback in an exponentially increasing interval
|
|
7
|
+
* @returns Callback to clear the interval.
|
|
8
|
+
*/
|
|
9
|
+
export const exponentialBackoffInterval = (cb: () => void, initialInterval: number): () => void => {
|
|
10
|
+
let interval = initialInterval;
|
|
11
|
+
const repeat = () => {
|
|
12
|
+
cb();
|
|
13
|
+
interval *= 2;
|
|
14
|
+
timeoutId = setTimeout(repeat, interval);
|
|
15
|
+
};
|
|
16
|
+
let timeoutId = setTimeout(repeat, interval);
|
|
17
|
+
return () => clearTimeout(timeoutId);
|
|
18
|
+
};
|
package/src/json.ts
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { inspect } from 'util';
|
|
5
|
+
import { inspect } from 'node:util';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { PublicKey } from '@dxos/protocols';
|
|
8
|
+
|
|
9
|
+
import { humanize } from './human-hash';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* JSON.stringify replacer.
|
|
@@ -18,7 +20,7 @@ export function jsonReplacer (this: any, key: string, value: any): any {
|
|
|
18
20
|
if (value !== null && typeof value === 'object' && value.type === 'Buffer' && Array.isArray(value.data)) {
|
|
19
21
|
if (value.data.length === 32) {
|
|
20
22
|
const key = Buffer.from(value.data);
|
|
21
|
-
return `[${humanize(key)}]:[${
|
|
23
|
+
return `[${humanize(key)}]:[${PublicKey.stringify(key)}]`;
|
|
22
24
|
} else {
|
|
23
25
|
return Buffer.from(value.data).toString('hex');
|
|
24
26
|
}
|