@libp2p/multistream-select 0.0.0 → 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ This project is dual licensed under MIT and Apache-2.0.
2
+
3
+ MIT: https://www.opensource.org/licenses/mit
4
+ Apache-2.0: https://www.apache.org/licenses/license-2.0
package/package.json CHANGED
@@ -1,14 +1,127 @@
1
1
  {
2
2
  "name": "@libp2p/multistream-select",
3
- "version": "0.0.0",
4
- "leadMaintainer": "Jacob Heun <jacobheun@gmail.com>",
3
+ "version": "1.0.0",
5
4
  "description": "JavaScript implementation of multistream-select",
5
+ "license": "Apache-2.0 OR MIT",
6
+ "homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-multistream-select#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/libp2p/js-libp2p-interfaces.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/libp2p/js-libp2p-interfaces/issues"
13
+ },
14
+ "keywords": [
15
+ "ipfs",
16
+ "libp2p",
17
+ "multistream",
18
+ "protocol",
19
+ "stream"
20
+ ],
21
+ "engines": {
22
+ "node": ">=16.0.0",
23
+ "npm": ">=7.0.0"
24
+ },
6
25
  "type": "module",
7
- "types": "dist/src/index.d.ts",
26
+ "types": "./dist/src/index.d.ts",
8
27
  "files": [
9
- "dist",
10
- "src"
28
+ "src",
29
+ "dist/src",
30
+ "!dist/test",
31
+ "!**/*.tsbuildinfo"
11
32
  ],
33
+ "exports": {
34
+ ".": {
35
+ "import": "./dist/src/index.js"
36
+ }
37
+ },
38
+ "eslintConfig": {
39
+ "extends": "ipfs",
40
+ "parserOptions": {
41
+ "sourceType": "module"
42
+ }
43
+ },
44
+ "release": {
45
+ "branches": [
46
+ "master"
47
+ ],
48
+ "plugins": [
49
+ [
50
+ "@semantic-release/commit-analyzer",
51
+ {
52
+ "preset": "conventionalcommits",
53
+ "releaseRules": [
54
+ {
55
+ "breaking": true,
56
+ "release": "major"
57
+ },
58
+ {
59
+ "revert": true,
60
+ "release": "patch"
61
+ },
62
+ {
63
+ "type": "feat",
64
+ "release": "minor"
65
+ },
66
+ {
67
+ "type": "fix",
68
+ "release": "patch"
69
+ },
70
+ {
71
+ "type": "chore",
72
+ "release": "patch"
73
+ },
74
+ {
75
+ "type": "docs",
76
+ "release": "patch"
77
+ },
78
+ {
79
+ "type": "test",
80
+ "release": "patch"
81
+ },
82
+ {
83
+ "scope": "no-release",
84
+ "release": false
85
+ }
86
+ ]
87
+ }
88
+ ],
89
+ [
90
+ "@semantic-release/release-notes-generator",
91
+ {
92
+ "preset": "conventionalcommits",
93
+ "presetConfig": {
94
+ "types": [
95
+ {
96
+ "type": "feat",
97
+ "section": "Features"
98
+ },
99
+ {
100
+ "type": "fix",
101
+ "section": "Bug Fixes"
102
+ },
103
+ {
104
+ "type": "chore",
105
+ "section": "Trivial Changes"
106
+ },
107
+ {
108
+ "type": "docs",
109
+ "section": "Trivial Changes"
110
+ },
111
+ {
112
+ "type": "test",
113
+ "section": "Tests"
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ ],
119
+ "@semantic-release/changelog",
120
+ "@semantic-release/npm",
121
+ "@semantic-release/github",
122
+ "@semantic-release/git"
123
+ ]
124
+ },
12
125
  "scripts": {
13
126
  "lint": "aegir lint",
14
127
  "dep-check": "aegir dep-check dist/src/**/*.js dist/test/**/*.js",
@@ -22,59 +135,31 @@
22
135
  "test:node": "npm run test -- -t node --cov",
23
136
  "test:electron-main": "npm run test -- -t electron-main"
24
137
  },
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/multiformats/js-multistream-select.git"
28
- },
29
- "pre-push": [
30
- "lint"
31
- ],
32
- "keywords": [
33
- "stream",
34
- "multistream",
35
- "protocol",
36
- "ipfs",
37
- "libp2p"
38
- ],
39
- "license": "MIT",
40
- "bugs": {
41
- "url": "https://github.com/multiformats/js-multistream-select/issues"
42
- },
43
- "homepage": "https://github.com/multiformats/js-multistream-select#readme",
44
138
  "dependencies": {
45
139
  "@libp2p/interfaces": "^1.3.6",
46
- "it-stream-types": "^1.0.4",
47
- "abortable-iterator": "^4.0.2",
48
140
  "@libp2p/logger": "^1.0.3",
141
+ "abortable-iterator": "^4.0.2",
49
142
  "err-code": "^3.0.1",
50
143
  "it-first": "^1.0.6",
51
144
  "it-handshake": "^3.0.0",
52
145
  "it-length-prefixed": "^7.0.0",
53
146
  "it-pipe": "^2.0.3",
147
+ "it-pushable": "^2.0.1",
54
148
  "it-reader": "^5.0.0",
149
+ "it-stream-types": "^1.0.4",
55
150
  "p-defer": "^4.0.0",
56
- "uint8arrays": "^3.0.0",
57
- "uint8arraylist": "^1.2.0"
151
+ "uint8arraylist": "^1.2.0",
152
+ "uint8arrays": "^3.0.0"
58
153
  },
59
154
  "devDependencies": {
60
155
  "aegir": "^36.1.1",
156
+ "iso-random-stream": "^2.0.2",
157
+ "it-all": "^1.0.6",
158
+ "it-map": "^1.0.6",
61
159
  "it-pair": "^2.0.2",
62
160
  "p-timeout": "^5.0.2",
63
161
  "timeout-abort-controller": "^3.0.0",
64
162
  "util": "^0.12.4",
65
163
  "varint": "^6.0.0"
66
- },
67
- "contributors": [
68
- "David Dias <daviddias.p@gmail.com>",
69
- "Jacob Heun <jacobheun@gmail.com>",
70
- "Alex Potsides <alex@achingbrain.net>",
71
- "dignifiedquire <dignifiedquire@gmail.com>",
72
- "Victor Bjelkholm <victorbjelkholm@gmail.com>",
73
- "Richard Littauer <richard.littauer@gmail.com>",
74
- "Vasco Santos <vasco.santos@moxy.studio>",
75
- "Alan Shaw <alan.shaw@protocol.ai>",
76
- "Hugo Dias <mail@hugodias.me>",
77
- "Didrik Nordström <didrik.nordstrom@gmail.com>",
78
- "Projjol Banerji <probaner23@gmail.com>"
79
- ]
164
+ }
80
165
  }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=dialer.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialer.spec.d.ts","sourceRoot":"","sources":["../../test/dialer.spec.ts"],"names":[],"mappings":""}
@@ -1,144 +0,0 @@
1
- /* eslint-env mocha */
2
- /* eslint max-nested-callbacks: ["error", 5] */
3
- import { expect } from 'aegir/utils/chai.js';
4
- import { pipe } from 'it-pipe';
5
- import all from 'it-all';
6
- import { Uint8ArrayList } from 'uint8arraylist';
7
- import { pair } from 'it-pair';
8
- import { reader } from 'it-reader';
9
- import pTimeout from 'p-timeout';
10
- import randomBytes from 'iso-random-stream/src/random.js';
11
- import * as Multistream from '../src/multistream.js';
12
- import { Dialer, PROTOCOL_ID } from '../src/index.js';
13
- import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
14
- import map from 'it-map';
15
- describe('Dialer', () => {
16
- describe('dialer.select', () => {
17
- it('should select from single protocol', async () => {
18
- const protocol = '/echo/1.0.0';
19
- const duplex = pair();
20
- const mss = new Dialer(duplex);
21
- const selection = await mss.select(protocol);
22
- expect(selection.protocol).to.equal(protocol);
23
- // Ensure stream is usable after selection
24
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
25
- const output = await pipe(input, selection.stream, async (source) => await all(source));
26
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
27
- });
28
- it('should fail to select twice', async () => {
29
- const protocol = '/echo/1.0.0';
30
- const protocol2 = '/echo/2.0.0';
31
- const duplex = pair();
32
- const mss = new Dialer(duplex);
33
- const selection = await mss.select(protocol);
34
- expect(selection.protocol).to.equal(protocol);
35
- // A second select will timeout
36
- await pTimeout(mss.select(protocol2), 1e3)
37
- .then(() => expect.fail('should have timed out'), (err) => {
38
- expect(err).to.exist();
39
- });
40
- });
41
- it('should select from multiple protocols', async () => {
42
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
43
- const selectedProtocol = protocols[protocols.length - 1];
44
- const stream = pair();
45
- const duplex = {
46
- sink: stream.sink,
47
- source: (async function* () {
48
- const source = reader(stream.source);
49
- let msg;
50
- // First message will be multistream-select header
51
- msg = await Multistream.readString(source);
52
- expect(msg).to.equal(PROTOCOL_ID);
53
- // Echo it back
54
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
55
- // Reject protocols until selectedProtocol appears
56
- while (true) {
57
- msg = await Multistream.readString(source);
58
- if (msg === selectedProtocol) {
59
- yield Multistream.encode(uint8ArrayFromString(selectedProtocol));
60
- break;
61
- }
62
- else {
63
- yield Multistream.encode(uint8ArrayFromString('na'));
64
- }
65
- }
66
- // Rest is data
67
- yield* map(source, (buf) => buf.slice());
68
- })()
69
- };
70
- const mss = new Dialer(duplex);
71
- const selection = await mss.select(protocols);
72
- expect(protocols).to.have.length(2);
73
- expect(selection.protocol).to.equal(selectedProtocol);
74
- // Ensure stream is usable after selection
75
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
76
- const output = await pipe(input, selection.stream, async (source) => await all(source));
77
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
78
- });
79
- it('should throw if protocol selection fails', async () => {
80
- const protocol = ['/echo/2.0.0', '/echo/1.0.0'];
81
- const stream = pair();
82
- const duplex = {
83
- sink: stream.sink,
84
- source: (async function* () {
85
- const source = reader(stream.source);
86
- let msg;
87
- // First message will be multistream-select header
88
- msg = await Multistream.readString(source);
89
- expect(msg).to.equal(PROTOCOL_ID);
90
- // Echo it back
91
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
92
- // Reject all protocols
93
- while (true) {
94
- msg = await Multistream.readString(source);
95
- yield Multistream.encode(uint8ArrayFromString('na'));
96
- }
97
- })()
98
- };
99
- const mss = new Dialer(duplex);
100
- await expect(mss.select(protocol)).to.eventually.be.rejected().with.property('code', 'ERR_UNSUPPORTED_PROTOCOL');
101
- });
102
- });
103
- describe('dialer.ls', () => {
104
- it('should list remote protocols', async () => {
105
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
106
- const selectedProtocol = protocols[protocols.length - 1];
107
- const stream = pair();
108
- const duplex = {
109
- sink: stream.sink,
110
- source: (async function* () {
111
- const source = reader(stream.source);
112
- let msg;
113
- // First message will be multistream-select header
114
- msg = await Multistream.readString(source);
115
- expect(msg).to.equal(PROTOCOL_ID);
116
- // Echo it back
117
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
118
- // Second message will be ls
119
- msg = await Multistream.readString(source);
120
- expect(msg).to.equal('ls');
121
- // Respond with protocols
122
- yield Multistream.encode(new Uint8ArrayList(...protocols.map(p => Multistream.encode(uint8ArrayFromString(p)))).slice());
123
- // Third message will be selectedProtocol
124
- msg = await Multistream.readString(source);
125
- expect(msg).to.equal(selectedProtocol);
126
- // Echo it back
127
- yield Multistream.encode(uint8ArrayFromString(selectedProtocol));
128
- // Rest is data
129
- yield* map(source, (buf) => buf.slice());
130
- })()
131
- };
132
- const mss = new Dialer(duplex);
133
- const lsProtocols = await mss.ls();
134
- expect(lsProtocols).to.eql(protocols);
135
- const selection = await mss.select(selectedProtocol);
136
- expect(selection.protocol).to.equal(selectedProtocol);
137
- // Ensure stream is usable after selection
138
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
139
- const output = await pipe(input, selection.stream, async (source) => await all(source));
140
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
141
- });
142
- });
143
- });
144
- //# sourceMappingURL=dialer.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialer.spec.js","sourceRoot":"","sources":["../../test/dialer.spec.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,+CAA+C;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,MA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E,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QAC5F,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=integration.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration.spec.d.ts","sourceRoot":"","sources":["../../test/integration.spec.ts"],"names":[],"mappings":""}
@@ -1,55 +0,0 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'aegir/utils/chai.js';
3
- import { pipe } from 'it-pipe';
4
- import all from 'it-all';
5
- import { Uint8ArrayList } from 'uint8arraylist';
6
- import { duplexPair } from 'it-pair/duplex';
7
- import randomBytes from 'iso-random-stream/src/random.js';
8
- import { Dialer, Listener } from '../src/index.js';
9
- describe('Dialer and Listener integration', () => {
10
- it('should handle and select', async () => {
11
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
12
- const selectedProtocol = protocols[protocols.length - 1];
13
- const pair = duplexPair();
14
- const dialer = new Dialer(pair[0]);
15
- const listener = new Listener(pair[1]);
16
- const [dialerSelection, listenerSelection] = await Promise.all([
17
- dialer.select(protocols),
18
- listener.handle(selectedProtocol)
19
- ]);
20
- expect(dialerSelection.protocol).to.equal(selectedProtocol);
21
- expect(listenerSelection.protocol).to.equal(selectedProtocol);
22
- // Ensure stream is usable after selection
23
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
24
- const output = await Promise.all([
25
- pipe(input, dialerSelection.stream, async (source) => await all(source)),
26
- pipe(listenerSelection.stream, listenerSelection.stream)
27
- ]);
28
- expect(new Uint8ArrayList(...output[0]).slice()).to.eql(new Uint8ArrayList(...input).slice());
29
- });
30
- it('should handle, ls and select', async () => {
31
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
32
- const selectedProtocol = protocols[protocols.length - 1];
33
- const pair = duplexPair();
34
- const dialer = new Dialer(pair[0]);
35
- const listener = new Listener(pair[1]);
36
- const [listenerSelection, dialerSelection] = await Promise.all([
37
- listener.handle(selectedProtocol),
38
- (async () => {
39
- const listenerProtocols = await dialer.ls();
40
- expect(listenerProtocols).to.eql([selectedProtocol]);
41
- return await dialer.select(selectedProtocol);
42
- })()
43
- ]);
44
- expect(dialerSelection.protocol).to.equal(selectedProtocol);
45
- expect(listenerSelection.protocol).to.equal(selectedProtocol);
46
- // Ensure stream is usable after selection
47
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
48
- const output = await Promise.all([
49
- pipe(input, dialerSelection.stream, async (source) => await all(source)),
50
- pipe(listenerSelection.stream, listenerSelection.stream)
51
- ]);
52
- expect(new Uint8ArrayList(...output[0]).slice()).to.eql(new Uint8ArrayList(...input).slice());
53
- });
54
- });
55
- //# sourceMappingURL=integration.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration.spec.js","sourceRoot":"","sources":["../../test/integration.spec.ts"],"names":[],"mappings":"AAAA,sBAAsB;AAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,WAAW,MAAM,iCAAiC,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAElD,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,SAAS,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAA;QAChD,MAAM,gBAAgB,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;Q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M,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;YACxE,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;SACzD,CAAC,CAAA;QACF,MAAM,CAAC,IAAI,cAAc,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IAC/F,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=listener.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listener.spec.d.ts","sourceRoot":"","sources":["../../test/listener.spec.ts"],"names":[],"mappings":""}
@@ -1,123 +0,0 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'aegir/utils/chai.js';
3
- import { pipe } from 'it-pipe';
4
- import { Uint8ArrayList } from 'uint8arraylist';
5
- import { reader } from 'it-reader';
6
- import all from 'it-all';
7
- import * as Lp from 'it-length-prefixed';
8
- import * as Multistream from '../src/multistream.js';
9
- import randomBytes from 'iso-random-stream/src/random.js';
10
- import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
11
- import { toString as uint8ArrayToString } from 'uint8arrays/to-string';
12
- import { Listener, PROTOCOL_ID } from '../src/index.js';
13
- import map from 'it-map';
14
- describe('Listener', () => {
15
- describe('listener.handle', () => {
16
- it('should handle a protocol', async () => {
17
- const protocol = '/echo/1.0.0';
18
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
19
- let output = [];
20
- const duplex = {
21
- sink: async (source) => {
22
- const read = reader(source);
23
- let msg;
24
- // First message will be multistream-select header
25
- msg = await Multistream.readString(read);
26
- expect(msg).to.equal(PROTOCOL_ID);
27
- // Second message will be protocol
28
- msg = await Multistream.readString(read);
29
- expect(msg).to.equal(protocol);
30
- // Rest is data
31
- output = await all(read);
32
- },
33
- source: (function* () {
34
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
35
- yield Multistream.encode(uint8ArrayFromString(protocol));
36
- yield* input;
37
- })()
38
- };
39
- const mss = new Listener(duplex);
40
- const selection = await mss.handle(protocol);
41
- expect(selection.protocol).to.equal(protocol);
42
- await pipe(selection.stream, selection.stream);
43
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
44
- });
45
- it('should reject unhandled protocols', async () => {
46
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
47
- const handledProtocols = ['/test/1.0.0', protocols[protocols.length - 1]];
48
- const handledProtocol = protocols[protocols.length - 1];
49
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
50
- let output = [];
51
- const duplex = {
52
- sink: async (source) => {
53
- const read = reader(source);
54
- let msg;
55
- // First message will be multistream-select header
56
- msg = await Multistream.readString(read);
57
- expect(msg).to.equal(PROTOCOL_ID);
58
- // Second message will be na
59
- msg = await Multistream.readString(read);
60
- expect(msg).to.equal('na');
61
- // Third message will be handledProtocol
62
- msg = await Multistream.readString(read);
63
- expect(msg).to.equal(handledProtocol);
64
- // Rest is data
65
- output = await all(read);
66
- },
67
- source: (function* () {
68
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
69
- for (const protocol of protocols) {
70
- yield Multistream.encode(uint8ArrayFromString(protocol));
71
- }
72
- yield* input;
73
- })()
74
- };
75
- const mss = new Listener(duplex);
76
- const selection = await mss.handle(handledProtocols);
77
- expect(selection.protocol).to.equal(handledProtocol);
78
- await pipe(selection.stream, selection.stream);
79
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
80
- });
81
- it('should handle ls', async () => {
82
- const protocols = ['/echo/2.0.0', '/echo/1.0.0'];
83
- const handledProtocols = ['/test/1.0.0', protocols[protocols.length - 1]];
84
- const handledProtocol = protocols[protocols.length - 1];
85
- const input = [randomBytes(10), randomBytes(64), randomBytes(3)];
86
- let output = [];
87
- const duplex = {
88
- sink: async (source) => {
89
- const read = reader(source);
90
- let msg;
91
- // First message will be multistream-select header
92
- msg = await Multistream.readString(read);
93
- expect(msg).to.equal(PROTOCOL_ID);
94
- // Second message will be ls response
95
- const buf = await Multistream.read(read);
96
- const protocolsReader = reader([buf]);
97
- // Decode each of the protocols from the reader
98
- const lsProtocols = await pipe(protocolsReader, Lp.decode(),
99
- // Stringify and remove the newline
100
- (source) => map(source, (buf) => uint8ArrayToString(buf).trim()), async (source) => await all(source));
101
- expect(lsProtocols).to.deep.equal(handledProtocols);
102
- // Third message will be handledProtocol
103
- msg = await Multistream.readString(read);
104
- expect(msg).to.equal(handledProtocol);
105
- // Rest is data
106
- output = await all(read);
107
- },
108
- source: (function* () {
109
- yield Multistream.encode(uint8ArrayFromString(PROTOCOL_ID));
110
- yield Multistream.encode(uint8ArrayFromString('ls'));
111
- yield Multistream.encode(uint8ArrayFromString(handledProtocol));
112
- yield* input;
113
- })()
114
- };
115
- const mss = new Listener(duplex);
116
- const selection = await mss.handle(handledProtocols);
117
- expect(selection.protocol).to.equal(handledProtocol);
118
- await pipe(selection.stream, selection.stream);
119
- expect(new Uint8ArrayList(...output).slice()).to.eql(new Uint8ArrayList(...input).slice());
120
- });
121
- });
122
- });
123
- //# sourceMappingURL=listener.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listener.spec.js","sourceRoot":"","sources":["../../test/listener.spec.ts"],"names":[],"mappings":"AAAA,sBAAsB;AAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,KAAK,EAAE,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AE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;YAEpD,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;YAE9C,MAAM,CAAC,IAAI,cAAc,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QAC5F,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=multistream.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multistream.spec.d.ts","sourceRoot":"","sources":["../../test/multistream.spec.ts"],"names":[],"mappings":""}
@@ -1,86 +0,0 @@
1
- /* eslint-env mocha */
2
- /* eslint max-nested-callbacks: ["error", 6] */
3
- import { expect } from 'aegir/utils/chai.js';
4
- import * as Varint from 'varint';
5
- import { Uint8ArrayList } from 'uint8arraylist';
6
- import { reader } from 'it-reader';
7
- import * as Multistream from '../src/multistream.js';
8
- import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
9
- import { concat as uint8ArrayConcat } from 'uint8arrays/concat';
10
- import { pushable } from 'it-pushable';
11
- import all from 'it-all';
12
- describe('Multistream', () => {
13
- describe('Multistream.encode', () => {
14
- it('should encode data Buffer as a multistream-select message', () => {
15
- const input = uint8ArrayFromString(`TEST${Date.now()}`);
16
- const output = Multistream.encode(input);
17
- const expected = uint8ArrayConcat([
18
- Uint8Array.from(Varint.encode(input.length + 1)),
19
- input,
20
- uint8ArrayFromString('\n')
21
- ]);
22
- expect(output.slice()).to.eql(expected);
23
- });
24
- it('should encode data Uint8ArrayList as a multistream-select message', () => {
25
- const input = new Uint8ArrayList(uint8ArrayFromString('TEST'), uint8ArrayFromString(`${Date.now()}`));
26
- const output = Multistream.encode(input.slice());
27
- const expected = uint8ArrayConcat([
28
- Uint8Array.from(Varint.encode(input.length + 1)),
29
- input.slice(),
30
- uint8ArrayFromString('\n')
31
- ]);
32
- expect(output.slice()).to.eql(expected);
33
- });
34
- });
35
- describe('Multistream.write', () => {
36
- it('should encode and write a multistream-select message', async () => {
37
- const input = uint8ArrayFromString(`TEST${Date.now()}`);
38
- const writer = pushable();
39
- Multistream.write(writer, input);
40
- const expected = uint8ArrayConcat([
41
- Uint8Array.from(Varint.encode(input.length + 1)),
42
- input,
43
- uint8ArrayFromString('\n')
44
- ]);
45
- writer.end();
46
- const output = await all(writer);
47
- expect(output.length).to.equal(1);
48
- expect(output[0]).to.eql(expected);
49
- });
50
- });
51
- describe('Multistream.read', () => {
52
- it('should decode a multistream-select message', async () => {
53
- const input = uint8ArrayFromString(`TEST${Date.now()}`);
54
- const source = reader([uint8ArrayConcat([
55
- Uint8Array.from(Varint.encode(input.length + 1)),
56
- input,
57
- uint8ArrayFromString('\n')
58
- ])]);
59
- const output = await Multistream.read(source);
60
- expect(output.slice()).to.eql(input);
61
- });
62
- it('should throw for non-newline delimited message', async () => {
63
- const input = uint8ArrayFromString(`TEST${Date.now()}`);
64
- const source = reader([uint8ArrayConcat([
65
- Uint8Array.from(Varint.encode(input.length)),
66
- input
67
- ])]);
68
- await expect(Multistream.read(source)).to.eventually.be.rejected()
69
- .with.property('code', 'ERR_INVALID_MULTISTREAM_SELECT_MESSAGE');
70
- });
71
- it('should be abortable', async () => {
72
- const input = uint8ArrayFromString(`TEST${Date.now()}`);
73
- const source = reader([uint8ArrayConcat([
74
- Uint8Array.from(Varint.encode(input.length + 1)),
75
- input,
76
- uint8ArrayFromString('\n')
77
- ])]);
78
- const controller = new AbortController();
79
- controller.abort();
80
- await expect(Multistream.read(source, {
81
- signal: controller.signal
82
- })).to.eventually.be.rejected().with.property('code', 'ABORT_ERR');
83
- });
84
- });
85
- });
86
- //# sourceMappingURL=multistream.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mult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AAC,QAAQ,CAAC,MAAM,EAAE,wCAAwC,CAAC,CAAA;QACpE,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;YACnC,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;YAEvD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,gBAAgB,CAAC;oBACtC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBAChD,KAAK;oBACL,oBAAoB,CAAC,IAAI,CAAC;iBAC3B,CAAC,CAAC,CAAC,CAAA;YAEJ,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;YACxC,UAAU,CAAC,KAAK,EAAE,CAAA;YAElB,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE;gBACpC,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QACpE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/constants.ts","../../libp2p-logger/dist/src/index.d.ts","../../../node_modules/uint8arraylist/dist/src/index.d.ts","../../../node_modules/it-length-prefixed/dist/src/varint-encode.d.ts","../../../node_modules/it-stream-types/dist/src/index.d.ts","../../../node_modules/it-length-prefixed/dist/src/encode.d.ts","../../../node_modules/it-length-prefixed/dist/src/varint-decode.d.ts","../../../node_modules/it-reader/dist/src/index.d.ts","../../../node_modules/it-length-prefixed/dist/src/decode.d.ts","../../../node_modules/it-length-prefixed/dist/src/int32be-encode.d.ts","../../../node_modules/it-length-prefixed/dist/src/int32be-decode.d.ts","../../../node_modules/it-length-prefixed/dist/src/index.d.ts","../../../node_modules/it-pipe/dist/src/index.d.ts","../../../node_modules/err-code/dist/index.d.ts","../../../node_modules/multiformats/types/src/bases/interface.d.ts","../../../node_modules/multiformats/types/src/bases/base.d.ts","../../../node_modules/uint8arrays/types/src/util/bases.d.ts","../../../node_modules/uint8arrays/types/src/from-string.d.ts","../../../node_modules/it-first/dist/index.d.ts","../../../node_modules/abortable-iterator/dist/src/abort-error.d.ts","../../../node_modules/abortable-iterator/dist/src/index.d.ts","../../../node_modules/uint8arrays/types/src/to-string.d.ts","../../../node_modules/it-pushable/dist/src/index.d.ts","../../../node_modules/multiformats/types/src/hashes/interface.d.ts","../../../node_modules/multiformats/types/src/cid.d.ts","../../libp2p-interfaces/dist/src/peer-id/index.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../../../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../../libp2p-interfaces/dist/src/connection/status.d.ts","../../libp2p-interfaces/dist/src/connection/index.d.ts","../../libp2p-interfaces/dist/src/index.d.ts","../src/multistream.ts","../../../node_modules/it-handshake/dist/src/index.d.ts","../src/handle.ts","../src/select.ts","../src/ls.ts","../src/index.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/chai-as-promised/index.d.ts","../../../node_modules/chai-parentheses/index.d.ts","../../../node_modules/@types/chai-subset/index.d.ts","../../../node_modules/chai-bites/index.d.ts","../../../node_modules/@types/chai-string/index.d.ts","../../../node_modules/aegir/dist/utils/chai.d.ts","../../../node_modules/it-all/dist/index.d.ts","../../../node_modules/it-pair/dist/src/index.d.ts","../node_modules/p-timeout/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/iso-random-stream/dist/src/random.d.ts","../../../node_modules/it-map/dist/index.d.ts","../test/dialer.spec.ts","../../../node_modules/it-pair/dist/src/duplex.d.ts","../test/integration.spec.ts","../test/listener.spec.ts","../../../node_modules/@types/varint/index.d.ts","../../../node_modules/uint8arrays/types/src/concat.d.ts","../test/multistream.spec.ts","../../../node_modules/@types/bl/bufferlist.d.ts","../../../node_modules/safe-buffer/index.d.ts","../../../node_modules/@types/readable-stream/index.d.ts","../../../node_modules/@types/bl/index.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/long/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/retry/index.d.ts","../../../node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"e34eb9339171ec45da2801c1967e4d378bd61a1dceaa1b1b4e1b6d28cb9ca962","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","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":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"a13ee7e067a516dc4df0dda8e8c31d25be4476296dc1c77b8300d2dcbc007d77","30e892a821a6e8e4b3598a940b41d2cd657c6aa8440a23dfb8e5fbdc270c1ea3","4f00c9dd564e5542aa61670a7ac7967fd4b73fd429e23a9f0e3b4d358980b4c7","db83c54caf14725c794ca2ab866884467e28bf22f0f54500a236c655ab8bc690","02416ac1a9fe3c5ec70dfaed050f1a26aa65c50f655402dcb91223fbe51bccb4","b3d6a8b9c63b62f87e784f5ddda956598b8ebce19013ec05d2dcf3683a9fcf60","7e1bdcfe75eecef8546ab7c618536979e6c39d7e7b2292437d0ddb6716bba1a3","52bb316da75e9fbf73b48f219675c921c2a42a0895e62fff8cc0da0a81b69d34","cd1c8ef880ecfc1d1e21742224d027ad439eb7e106c9fad1829afc29a62e4932","8c605560e16a2c3eb4488d4e5dbef7ed1e8f8f787b672e6d86a9af18e6017e1e","3656314858005e9a13cc187e7a0fd4e5e72fd083221780ef845fbd7c9e9129c2","13654830bdc50313fe763da76093c1e92c5b0c2a52f6b2bc7594cc1fb408db3b","f00942e44eca69e4bdd1f470773a60d72dcd637e5433f01d85aa23adab1b3172","a02a19deaa2c497d36c136459dd2561b57ebb22075ac0d6aad176430a8639aa1","930446bf32192f698b78f8ea4b309d8c2cfe02ab5ad78e4db907417405ebf5e7","a9fa925f15fdd7529fefd4fb81c43dde5db0db2fd1694ef4709c193f01d78046","e47d9ea931ddade1deee3946884e8dc7aafbf4af74f9ecb85ef77c895100bd39","0841c3aed9354ad025302d5c7cde53916825047646e559d918b62a31500aebe7","eaaf77e904f786c1f37b53580d9237d777d4c1b6b6229a9c5799d8b32c33782f","d9b9c8643cc9909046a2c4f9786362549372172cbf2b5dd64af91bb0cb428f07","1e696d3bb095bc56363c69d6799302fdde67ab28d629d93efdd04182207ebc84","7c515715da56f17e695e2c3611cf073d2cebfd417497652b35f9042b7235d5b2","250bd1481953c84af471f56ee92d7a7f29336a663241ee9714b2532851c824be","5d3e07dbeabff37885262d9b4bd21c3185d95a09a268ab795f81135046a32bf4","89d50ad716096682f845bf44755426e5be18da6fe3ffd96c13716a9237df3040","1e1da070f54f60f2d8aa2a2059879ee39f52bc7531aa336c8b22cb170e20f034","dcaaf86cdcf77baf88172a23d27df51c284afd72935bd1d57c7a9edd2f4f6007","e98201d93618544d1a18190de964fd08ffc44eb0036c0fcd7de5165384e6f0c7","6666d48a46dbfd565490e7f8789093e2392c5bdcc3a380dfdd91c77237e43101","71d1e7611aec17a624e0d7e74a70fa22e4c457cd44be9f8b000cd761ca03abba","9083487adbc91bf5f727cd22e74635d2b60ea331f3e800ea8877b615ab35bcc2",{"version":"0c4fd44b2d8e670367490dddcf3c285ba0d861764506eba9f166e7c2e1eda44e","signature":"bd276818c307b8c84325d50fabef799451403d53ff33be9ee163d766550e7ac8"},"c408837a937758a69dd38288a6d03226767a37b89fac42e9f2e6042f1d2d2c49",{"version":"2cc55641632e6198fda50ace019a60577d90d3c46d719587f9a95abfdd7878ce","signature":"392faacf153c2c7220ef78095a22ea03ad8f29b2d2b66475deda1d57ca67f6a6"},"b35de28605b5a0a5f952f4e9509d4f9a832deca15f6c282ffcfd8c5b51800943","b7a3efbca923513d5edfbe57578e597f9b2fd8aeb12eaef0b3450edf3b196aac","a286c52210ffd138e8faadd0f45e2676d796f85baf33ac6c9c41873a1287a521",{"version":"c8747693e5872ad5ef3aa016731a06915e1c34dae987829d9aa5bd40c7a2c54b","affectsGlobalScope":true},{"version":"63e2182615c513e89bb8a3e749d08f7c379e86490fcdbf6d35f2c14b3507a6e8","affectsGlobalScope":true},{"version":"c1f79c6d85cd84518fd7349588b3c61bdc189f58e3866f925cbf4631c81e31f9","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},{"version":"42f28f4cfca4a70bd89c1d55d76c7978275030b894f6793f36890265c11a83a4","affectsGlobalScope":true},{"version":"41071d2f1a39386d10bf36d1ba4712ad42a900047f16a109936df9e48f13673e","affectsGlobalScope":true},"61f705a779045717e1a18c75456c2a7ca52eb50e0694a3da86fddfe67503bff6","4c558073806c6a5cadec7463e3d44dc6ef725596cd36ad0d8f364c2658d8d687","92b9f3e07db0687bcbd4a875704214c2c464cd1bfc8d7cc90c65d4f2a812c411","c2f2e0d6fd83e551d0203b770d250c7def6a64bdee7159445c2d259ba51ba826","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"19fa46aae5c730811087296a9dff1dbb7be3b63170668628c3018b28775d1b4d","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8","c084f8d0919bb8b4b76ccbdf51179802f5e69f6728abcbc72dc16c999fde3c9c","d87b61404881d95c0aea019cd6a7af157f9ef5cc52e158f5c644931115813f41","397b2527381dd69697b178629be3240422b7a377b82a38d5d5566563a632cdc1","c9d1863d9d39d92b542160d556abb2215111b7b0ad12c3d4367f66bf7b6a680d","5f419ecd2f7b0f64c5ed043951d3b5da7d0c82e648855b13b8edf286be4d37f3",{"version":"9e130b8b98c91f4926aa1261159e3c23659fda02ddb385a70f219563d9de6ecd","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"a35c3c9a957697fd70aef0bed183fcf1258264c877bf2a12dcd80d6b0c2a6fe4","4e37a214f2cd5a350affba5580d1d7c01ca83da6393ef2c13a66d74fc7b95eac",{"version":"5a6dd1572621d760ca6bcbb73895fbc26530fdbd359f4cc77a213609ed4cf026","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"9bba2209d41d622d34c30c36ea1f5ab13f10fc69dd7933918dce353dc4376703","5e379df3d61561c2ed7789b5995b9ba2143bbba21a905e2381e16efe7d1fa424","dd978a63c94ab731a6544f57b3bf105b191b613b46cea6d40adafdc7e99c2e71","e92e5257d413d87d2367f0ddc723c6d2d95ef47fee8ab3be5073542e0aa2e59b","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","e8465811693dfe4e96ef2b3dffda539d6edfe896961b7af37b44db2c0e48532b","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05",{"version":"30bf01dd2e284098445264c8d71c608890cc11c142f36d0193aa655bdc0a40cb","affectsGlobalScope":true},"6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","550650516d34048712520ffb1fce4a02f2d837761ee45c7d9868a7a35e7b0343","24a09dc3e07d69b0a224dbd14b2994c40d1efd0954e759004b61b9e683dabe5f","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","45627c7d24633686b0274d9402652930ba2e4fe74df04f114393ae121d1e8afe","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":false,"esModuleInterop":true,"importsNotUsedAsValues":2,"module":6,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":false,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":7},"fileIdsList":[[67,131],[131],[131,138],[131,138,148,150],[78,131],[131,152],[88,131],[91,131],[92,97,131],[93,103,104,111,120,130,131],[93,94,103,111,131],[95,131],[96,97,104,112,131],[97,120,127,131],[98,100,103,111,131],[99,131],[100,101,131],[102,103,131],[103,131],[103,104,105,120,130,131],[103,104,105,120,131],[106,111,120,130,131],[103,104,106,107,111,120,127,130,131],[106,108,120,127,130,131],[88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137],[103,109,131],[110,130,131],[100,103,111,120,131],[112,131],[113,131],[91,114,131],[115,129,131,135],[116,131],[117,131],[103,118,131],[118,119,131,133],[103,120,121,122,131],[120,122,131],[120,121,131],[123,131],[124,131],[103,125,126,131],[125,126,131],[97,111,120,127,131],[128,131],[111,129,131],[92,106,117,130,131],[97,131],[120,131,132],[131,133],[131,134],[92,97,103,105,114,120,130,131,133,135],[120,131,136],[131,138,149],[131,164],[131,166],[103,120,131,138],[45,60,131],[78,79,80,81,82,83,131],[78,79,131],[97,131,138],[45,48,63,131],[43,45,47,48,131],[43,44,45,131],[44,46,47,49,50,51,131],[47,131],[44,131],[45,131],[43,45,131],[55,131],[55,64,131],[57,131],[55,56,131],[45,66,68,69,131],[66,68,70,131],[55,64,65,131],[41,42,43,45,58,71,72,73,131],[41,45,71,74,75,76,131],[42,45,48,52,53,58,62,71,72,73,131],[43,45,48,52,53,54,58,59,61,62,63,71,131],[42,45,54,58,71,72,73,131],[43,45,48,53,58,72,77,84,85,86,87,131,139,140],[43,53,77,84,85,131,139,142],[43,45,48,52,53,58,62,72,77,84,85,131,139,140],[43,48,58,63,72,84,85,131,145,146],[45,71],[43,48,63,71]],"referencedMap":[[68,1],[67,2],[148,3],[151,4],[79,5],[83,5],[81,5],[78,2],[153,6],[154,2],[155,2],[156,2],[157,2],[158,2],[159,2],[160,2],[152,2],[88,7],[89,7],[91,8],[92,9],[93,10],[94,11],[95,12],[96,13],[97,14],[98,15],[99,16],[100,17],[101,17],[102,18],[103,19],[104,20],[105,21],[90,2],[137,2],[106,22],[107,23],[108,24],[138,25],[109,26],[110,27],[111,28],[112,29],[113,30],[114,31],[115,32],[116,33],[117,34],[118,35],[119,36],[120,37],[122,38],[121,39],[123,40],[124,41],[125,42],[126,43],[127,44],[128,45],[129,46],[130,47],[131,48],[132,49],[133,50],[134,51],[135,52],[136,53],[161,2],[162,2],[150,54],[163,2],[165,55],[164,2],[145,3],[166,2],[167,56],[168,57],[60,2],[61,58],[84,59],[82,5],[80,60],[54,2],[139,61],[85,2],[59,2],[73,62],[49,63],[46,64],[52,65],[51,66],[50,67],[47,2],[44,2],[140,2],[142,68],[86,68],[53,68],[63,2],[48,69],[45,2],[56,70],[55,2],[65,71],[64,2],[149,2],[8,2],[9,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[1,2],[40,2],[43,2],[146,2],[58,72],[62,72],[57,73],[70,74],[69,2],[71,75],[66,76],[42,2],[87,2],[41,2],[74,77],[77,78],[76,79],[72,80],[75,81],[141,82],[143,83],[144,84],[147,85]],"exportedModulesMap":[[68,1],[67,2],[148,3],[151,4],[79,5],[83,5],[81,5],[78,2],[153,6],[154,2],[155,2],[156,2],[157,2],[158,2],[159,2],[160,2],[152,2],[88,7],[89,7],[91,8],[92,9],[93,10],[94,11],[95,12],[96,13],[97,14],[98,15],[99,16],[100,17],[101,17],[102,18],[103,19],[104,20],[105,21],[90,2],[137,2],[106,22],[107,23],[108,24],[138,25],[109,26],[110,27],[111,28],[112,29],[113,30],[114,31],[115,32],[116,33],[117,34],[118,35],[119,36],[120,37],[122,38],[121,39],[123,40],[124,41],[125,42],[126,43],[127,44],[128,45],[129,46],[130,47],[131,48],[132,49],[133,50],[134,51],[135,52],[136,53],[161,2],[162,2],[150,54],[163,2],[165,55],[164,2],[145,3],[166,2],[167,56],[168,57],[60,2],[61,58],[84,59],[82,5],[80,60],[54,2],[139,61],[85,2],[59,2],[73,62],[49,63],[46,64],[52,65],[51,66],[50,67],[47,2],[44,2],[140,2],[142,68],[86,68],[53,68],[63,2],[48,69],[45,2],[56,70],[55,2],[65,71],[64,2],[149,2],[8,2],[9,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[1,2],[40,2],[43,2],[146,2],[58,72],[62,72],[57,73],[70,74],[69,2],[71,75],[66,76],[42,2],[87,2],[41,2],[74,86],[77,78],[76,79],[72,87],[75,81],[141,82],[143,83]],"semanticDiagnosticsPerFile":[68,67,148,151,79,83,81,78,153,154,155,156,157,158,159,160,152,88,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,90,137,106,107,108,138,109,110,111,112,113,114,115,116,117,118,119,120,122,121,123,124,125,126,127,128,129,130,131,132,133,134,135,136,161,162,150,163,165,164,145,166,167,168,60,61,84,82,80,54,139,85,59,73,49,46,52,51,50,47,44,140,142,86,53,63,48,45,56,55,65,64,149,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,1,40,43,146,58,62,57,70,69,71,66,42,87,41,74,77,76,72,75,141,143,144,147]},"version":"4.4.4"}