Upload 1878 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .env +3 -0
- node_modules/.bin/mime +3 -0
- node_modules/.bin/mime.cmd +3 -0
- node_modules/.bin/mime.ps1 +3 -0
- node_modules/.bin/proto-loader-gen-types +3 -0
- node_modules/.bin/proto-loader-gen-types.cmd +3 -0
- node_modules/.bin/proto-loader-gen-types.ps1 +3 -0
- node_modules/.package-lock.json +1595 -0
- node_modules/@grpc/grpc-js/LICENSE +201 -0
- node_modules/@grpc/grpc-js/README.md +83 -0
- node_modules/@grpc/grpc-js/build/src/admin.d.ts +11 -0
- node_modules/@grpc/grpc-js/build/src/admin.js +31 -0
- node_modules/@grpc/grpc-js/build/src/admin.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts +90 -0
- node_modules/@grpc/grpc-js/build/src/backoff-timeout.js +174 -0
- node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials-filter.d.ts +16 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials-filter.js +76 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials-filter.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts +57 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials.js +153 -0
- node_modules/@grpc/grpc-js/build/src/call-credentials.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call-interface.d.ts +89 -0
- node_modules/@grpc/grpc-js/build/src/call-interface.js +84 -0
- node_modules/@grpc/grpc-js/build/src/call-interface.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call-number.d.ts +1 -0
- node_modules/@grpc/grpc-js/build/src/call-number.js +25 -0
- node_modules/@grpc/grpc-js/build/src/call-number.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call-stream.d.ts +165 -0
- node_modules/@grpc/grpc-js/build/src/call-stream.js +686 -0
- node_modules/@grpc/grpc-js/build/src/call-stream.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/call.d.ts +83 -0
- node_modules/@grpc/grpc-js/build/src/call.js +136 -0
- node_modules/@grpc/grpc-js/build/src/call.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts +44 -0
- node_modules/@grpc/grpc-js/build/src/certificate-provider.js +134 -0
- node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts +108 -0
- node_modules/@grpc/grpc-js/build/src/channel-credentials.js +272 -0
- node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/channel-options.d.ts +77 -0
- node_modules/@grpc/grpc-js/build/src/channel-options.js +71 -0
- node_modules/@grpc/grpc-js/build/src/channel-options.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/channel.d.ts +76 -0
- node_modules/@grpc/grpc-js/build/src/channel.js +68 -0
- node_modules/@grpc/grpc-js/build/src/channel.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/channelz.d.ts +159 -0
- node_modules/@grpc/grpc-js/build/src/channelz.js +584 -0
- node_modules/@grpc/grpc-js/build/src/channelz.js.map +1 -0
- node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts +120 -0
.env
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
GROQ_API_KEY=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
|
2 |
+
PLAYHT_USER_ID=EdvphB1JPkabEkUGrxfv7F6BQh83
|
3 |
+
PLAYHT_API_KEY=d218f38098984f95b3be0d6f0c2f1b69
|
node_modules/.bin/mime
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:394b93eaaac25f18a20d7cdd80920ecca1fe43c8e5b37501389e644944c6e01f
|
3 |
+
size 371
|
node_modules/.bin/mime.cmd
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd5ca2f059e780c0a4b1aa9cdd6edc7dc10413d30bf51ad537adbd428e5e7a16
|
3 |
+
size 316
|
node_modules/.bin/mime.ps1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a43d8b7d57dbbb21f2f98c331970d011177fa1c6be327aa0dbb84c1ad01e9201
|
3 |
+
size 769
|
node_modules/.bin/proto-loader-gen-types
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68e4e812c31768a84b650b383c9c7e9b8b1c177f28b29253ce71461318c51299
|
3 |
+
size 457
|
node_modules/.bin/proto-loader-gen-types.cmd
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd95d039f853fa930b299b5d30c0b2d9d08de9eef969dd7a82c119a5d4a5d023
|
3 |
+
size 359
|
node_modules/.bin/proto-loader-gen-types.ps1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cea49f12a3f42e2b6319b828a8b38d02734fa600002cf5717e822c3305716942
|
3 |
+
size 941
|
node_modules/.package-lock.json
ADDED
@@ -0,0 +1,1595 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "ai-calling-app",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 3,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"node_modules/@grpc/grpc-js": {
|
8 |
+
"version": "1.12.4",
|
9 |
+
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.4.tgz",
|
10 |
+
"integrity": "sha512-NBhrxEWnFh0FxeA0d//YP95lRFsSx2TNLEUQg4/W+5f/BMxcCjgOOIT24iD+ZB/tZw057j44DaIxja7w4XMrhg==",
|
11 |
+
"license": "Apache-2.0",
|
12 |
+
"dependencies": {
|
13 |
+
"@grpc/proto-loader": "^0.7.13",
|
14 |
+
"@js-sdsl/ordered-map": "^4.4.2"
|
15 |
+
},
|
16 |
+
"engines": {
|
17 |
+
"node": ">=12.10.0"
|
18 |
+
}
|
19 |
+
},
|
20 |
+
"node_modules/@grpc/proto-loader": {
|
21 |
+
"version": "0.7.13",
|
22 |
+
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz",
|
23 |
+
"integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==",
|
24 |
+
"license": "Apache-2.0",
|
25 |
+
"dependencies": {
|
26 |
+
"lodash.camelcase": "^4.3.0",
|
27 |
+
"long": "^5.0.0",
|
28 |
+
"protobufjs": "^7.2.5",
|
29 |
+
"yargs": "^17.7.2"
|
30 |
+
},
|
31 |
+
"bin": {
|
32 |
+
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
|
33 |
+
},
|
34 |
+
"engines": {
|
35 |
+
"node": ">=6"
|
36 |
+
}
|
37 |
+
},
|
38 |
+
"node_modules/@js-sdsl/ordered-map": {
|
39 |
+
"version": "4.4.2",
|
40 |
+
"resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
|
41 |
+
"integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==",
|
42 |
+
"license": "MIT",
|
43 |
+
"funding": {
|
44 |
+
"type": "opencollective",
|
45 |
+
"url": "https://opencollective.com/js-sdsl"
|
46 |
+
}
|
47 |
+
},
|
48 |
+
"node_modules/@protobufjs/aspromise": {
|
49 |
+
"version": "1.1.2",
|
50 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
51 |
+
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
|
52 |
+
"license": "BSD-3-Clause"
|
53 |
+
},
|
54 |
+
"node_modules/@protobufjs/base64": {
|
55 |
+
"version": "1.1.2",
|
56 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
57 |
+
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
|
58 |
+
"license": "BSD-3-Clause"
|
59 |
+
},
|
60 |
+
"node_modules/@protobufjs/codegen": {
|
61 |
+
"version": "2.0.4",
|
62 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
63 |
+
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
|
64 |
+
"license": "BSD-3-Clause"
|
65 |
+
},
|
66 |
+
"node_modules/@protobufjs/eventemitter": {
|
67 |
+
"version": "1.1.0",
|
68 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
69 |
+
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
|
70 |
+
"license": "BSD-3-Clause"
|
71 |
+
},
|
72 |
+
"node_modules/@protobufjs/fetch": {
|
73 |
+
"version": "1.1.0",
|
74 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
75 |
+
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
76 |
+
"license": "BSD-3-Clause",
|
77 |
+
"dependencies": {
|
78 |
+
"@protobufjs/aspromise": "^1.1.1",
|
79 |
+
"@protobufjs/inquire": "^1.1.0"
|
80 |
+
}
|
81 |
+
},
|
82 |
+
"node_modules/@protobufjs/float": {
|
83 |
+
"version": "1.0.2",
|
84 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
85 |
+
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
|
86 |
+
"license": "BSD-3-Clause"
|
87 |
+
},
|
88 |
+
"node_modules/@protobufjs/inquire": {
|
89 |
+
"version": "1.1.0",
|
90 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
91 |
+
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
|
92 |
+
"license": "BSD-3-Clause"
|
93 |
+
},
|
94 |
+
"node_modules/@protobufjs/path": {
|
95 |
+
"version": "1.1.2",
|
96 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
97 |
+
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
|
98 |
+
"license": "BSD-3-Clause"
|
99 |
+
},
|
100 |
+
"node_modules/@protobufjs/pool": {
|
101 |
+
"version": "1.1.0",
|
102 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
103 |
+
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
|
104 |
+
"license": "BSD-3-Clause"
|
105 |
+
},
|
106 |
+
"node_modules/@protobufjs/utf8": {
|
107 |
+
"version": "1.1.0",
|
108 |
+
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
109 |
+
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
|
110 |
+
"license": "BSD-3-Clause"
|
111 |
+
},
|
112 |
+
"node_modules/@tokenizer/token": {
|
113 |
+
"version": "0.3.0",
|
114 |
+
"resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
|
115 |
+
"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==",
|
116 |
+
"license": "MIT"
|
117 |
+
},
|
118 |
+
"node_modules/@types/node": {
|
119 |
+
"version": "18.19.68",
|
120 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.68.tgz",
|
121 |
+
"integrity": "sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==",
|
122 |
+
"license": "MIT",
|
123 |
+
"dependencies": {
|
124 |
+
"undici-types": "~5.26.4"
|
125 |
+
}
|
126 |
+
},
|
127 |
+
"node_modules/@types/node-fetch": {
|
128 |
+
"version": "2.6.12",
|
129 |
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz",
|
130 |
+
"integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==",
|
131 |
+
"license": "MIT",
|
132 |
+
"dependencies": {
|
133 |
+
"@types/node": "*",
|
134 |
+
"form-data": "^4.0.0"
|
135 |
+
}
|
136 |
+
},
|
137 |
+
"node_modules/abort-controller": {
|
138 |
+
"version": "3.0.0",
|
139 |
+
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
140 |
+
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
141 |
+
"license": "MIT",
|
142 |
+
"dependencies": {
|
143 |
+
"event-target-shim": "^5.0.0"
|
144 |
+
},
|
145 |
+
"engines": {
|
146 |
+
"node": ">=6.5"
|
147 |
+
}
|
148 |
+
},
|
149 |
+
"node_modules/accepts": {
|
150 |
+
"version": "1.3.8",
|
151 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
152 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
153 |
+
"license": "MIT",
|
154 |
+
"dependencies": {
|
155 |
+
"mime-types": "~2.1.34",
|
156 |
+
"negotiator": "0.6.3"
|
157 |
+
},
|
158 |
+
"engines": {
|
159 |
+
"node": ">= 0.6"
|
160 |
+
}
|
161 |
+
},
|
162 |
+
"node_modules/agentkeepalive": {
|
163 |
+
"version": "4.5.0",
|
164 |
+
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
|
165 |
+
"integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
|
166 |
+
"license": "MIT",
|
167 |
+
"dependencies": {
|
168 |
+
"humanize-ms": "^1.2.1"
|
169 |
+
},
|
170 |
+
"engines": {
|
171 |
+
"node": ">= 8.0.0"
|
172 |
+
}
|
173 |
+
},
|
174 |
+
"node_modules/ansi-regex": {
|
175 |
+
"version": "5.0.1",
|
176 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
177 |
+
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
178 |
+
"license": "MIT",
|
179 |
+
"engines": {
|
180 |
+
"node": ">=8"
|
181 |
+
}
|
182 |
+
},
|
183 |
+
"node_modules/ansi-styles": {
|
184 |
+
"version": "4.3.0",
|
185 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
186 |
+
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
187 |
+
"license": "MIT",
|
188 |
+
"dependencies": {
|
189 |
+
"color-convert": "^2.0.1"
|
190 |
+
},
|
191 |
+
"engines": {
|
192 |
+
"node": ">=8"
|
193 |
+
},
|
194 |
+
"funding": {
|
195 |
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
196 |
+
}
|
197 |
+
},
|
198 |
+
"node_modules/array-flatten": {
|
199 |
+
"version": "1.1.1",
|
200 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
201 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
202 |
+
"license": "MIT"
|
203 |
+
},
|
204 |
+
"node_modules/asynckit": {
|
205 |
+
"version": "0.4.0",
|
206 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
207 |
+
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
208 |
+
"license": "MIT"
|
209 |
+
},
|
210 |
+
"node_modules/axios": {
|
211 |
+
"version": "1.7.9",
|
212 |
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz",
|
213 |
+
"integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
|
214 |
+
"license": "MIT",
|
215 |
+
"dependencies": {
|
216 |
+
"follow-redirects": "^1.15.6",
|
217 |
+
"form-data": "^4.0.0",
|
218 |
+
"proxy-from-env": "^1.1.0"
|
219 |
+
}
|
220 |
+
},
|
221 |
+
"node_modules/body-parser": {
|
222 |
+
"version": "1.20.3",
|
223 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
224 |
+
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
225 |
+
"license": "MIT",
|
226 |
+
"dependencies": {
|
227 |
+
"bytes": "3.1.2",
|
228 |
+
"content-type": "~1.0.5",
|
229 |
+
"debug": "2.6.9",
|
230 |
+
"depd": "2.0.0",
|
231 |
+
"destroy": "1.2.0",
|
232 |
+
"http-errors": "2.0.0",
|
233 |
+
"iconv-lite": "0.4.24",
|
234 |
+
"on-finished": "2.4.1",
|
235 |
+
"qs": "6.13.0",
|
236 |
+
"raw-body": "2.5.2",
|
237 |
+
"type-is": "~1.6.18",
|
238 |
+
"unpipe": "1.0.0"
|
239 |
+
},
|
240 |
+
"engines": {
|
241 |
+
"node": ">= 0.8",
|
242 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
243 |
+
}
|
244 |
+
},
|
245 |
+
"node_modules/bytes": {
|
246 |
+
"version": "3.1.2",
|
247 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
248 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
249 |
+
"license": "MIT",
|
250 |
+
"engines": {
|
251 |
+
"node": ">= 0.8"
|
252 |
+
}
|
253 |
+
},
|
254 |
+
"node_modules/call-bind-apply-helpers": {
|
255 |
+
"version": "1.0.1",
|
256 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz",
|
257 |
+
"integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==",
|
258 |
+
"license": "MIT",
|
259 |
+
"dependencies": {
|
260 |
+
"es-errors": "^1.3.0",
|
261 |
+
"function-bind": "^1.1.2"
|
262 |
+
},
|
263 |
+
"engines": {
|
264 |
+
"node": ">= 0.4"
|
265 |
+
}
|
266 |
+
},
|
267 |
+
"node_modules/call-bound": {
|
268 |
+
"version": "1.0.3",
|
269 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
|
270 |
+
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
|
271 |
+
"license": "MIT",
|
272 |
+
"dependencies": {
|
273 |
+
"call-bind-apply-helpers": "^1.0.1",
|
274 |
+
"get-intrinsic": "^1.2.6"
|
275 |
+
},
|
276 |
+
"engines": {
|
277 |
+
"node": ">= 0.4"
|
278 |
+
},
|
279 |
+
"funding": {
|
280 |
+
"url": "https://github.com/sponsors/ljharb"
|
281 |
+
}
|
282 |
+
},
|
283 |
+
"node_modules/cliui": {
|
284 |
+
"version": "8.0.1",
|
285 |
+
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
286 |
+
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
287 |
+
"license": "ISC",
|
288 |
+
"dependencies": {
|
289 |
+
"string-width": "^4.2.0",
|
290 |
+
"strip-ansi": "^6.0.1",
|
291 |
+
"wrap-ansi": "^7.0.0"
|
292 |
+
},
|
293 |
+
"engines": {
|
294 |
+
"node": ">=12"
|
295 |
+
}
|
296 |
+
},
|
297 |
+
"node_modules/color-convert": {
|
298 |
+
"version": "2.0.1",
|
299 |
+
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
300 |
+
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
301 |
+
"license": "MIT",
|
302 |
+
"dependencies": {
|
303 |
+
"color-name": "~1.1.4"
|
304 |
+
},
|
305 |
+
"engines": {
|
306 |
+
"node": ">=7.0.0"
|
307 |
+
}
|
308 |
+
},
|
309 |
+
"node_modules/color-name": {
|
310 |
+
"version": "1.1.4",
|
311 |
+
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
312 |
+
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
313 |
+
"license": "MIT"
|
314 |
+
},
|
315 |
+
"node_modules/combined-stream": {
|
316 |
+
"version": "1.0.8",
|
317 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
318 |
+
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
319 |
+
"license": "MIT",
|
320 |
+
"dependencies": {
|
321 |
+
"delayed-stream": "~1.0.0"
|
322 |
+
},
|
323 |
+
"engines": {
|
324 |
+
"node": ">= 0.8"
|
325 |
+
}
|
326 |
+
},
|
327 |
+
"node_modules/content-disposition": {
|
328 |
+
"version": "0.5.4",
|
329 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
330 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
331 |
+
"license": "MIT",
|
332 |
+
"dependencies": {
|
333 |
+
"safe-buffer": "5.2.1"
|
334 |
+
},
|
335 |
+
"engines": {
|
336 |
+
"node": ">= 0.6"
|
337 |
+
}
|
338 |
+
},
|
339 |
+
"node_modules/content-type": {
|
340 |
+
"version": "1.0.5",
|
341 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
342 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
343 |
+
"license": "MIT",
|
344 |
+
"engines": {
|
345 |
+
"node": ">= 0.6"
|
346 |
+
}
|
347 |
+
},
|
348 |
+
"node_modules/cookie": {
|
349 |
+
"version": "0.7.1",
|
350 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
|
351 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
352 |
+
"license": "MIT",
|
353 |
+
"engines": {
|
354 |
+
"node": ">= 0.6"
|
355 |
+
}
|
356 |
+
},
|
357 |
+
"node_modules/cookie-signature": {
|
358 |
+
"version": "1.0.6",
|
359 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
360 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
361 |
+
"license": "MIT"
|
362 |
+
},
|
363 |
+
"node_modules/cross-fetch": {
|
364 |
+
"version": "4.0.0",
|
365 |
+
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz",
|
366 |
+
"integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==",
|
367 |
+
"license": "MIT",
|
368 |
+
"dependencies": {
|
369 |
+
"node-fetch": "^2.6.12"
|
370 |
+
}
|
371 |
+
},
|
372 |
+
"node_modules/debug": {
|
373 |
+
"version": "2.6.9",
|
374 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
375 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
376 |
+
"license": "MIT",
|
377 |
+
"dependencies": {
|
378 |
+
"ms": "2.0.0"
|
379 |
+
}
|
380 |
+
},
|
381 |
+
"node_modules/delayed-stream": {
|
382 |
+
"version": "1.0.0",
|
383 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
384 |
+
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
385 |
+
"license": "MIT",
|
386 |
+
"engines": {
|
387 |
+
"node": ">=0.4.0"
|
388 |
+
}
|
389 |
+
},
|
390 |
+
"node_modules/depd": {
|
391 |
+
"version": "2.0.0",
|
392 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
393 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
394 |
+
"license": "MIT",
|
395 |
+
"engines": {
|
396 |
+
"node": ">= 0.8"
|
397 |
+
}
|
398 |
+
},
|
399 |
+
"node_modules/destroy": {
|
400 |
+
"version": "1.2.0",
|
401 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
402 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
403 |
+
"license": "MIT",
|
404 |
+
"engines": {
|
405 |
+
"node": ">= 0.8",
|
406 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
407 |
+
}
|
408 |
+
},
|
409 |
+
"node_modules/dotenv": {
|
410 |
+
"version": "16.4.7",
|
411 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
412 |
+
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
|
413 |
+
"license": "BSD-2-Clause",
|
414 |
+
"engines": {
|
415 |
+
"node": ">=12"
|
416 |
+
},
|
417 |
+
"funding": {
|
418 |
+
"url": "https://dotenvx.com"
|
419 |
+
}
|
420 |
+
},
|
421 |
+
"node_modules/dunder-proto": {
|
422 |
+
"version": "1.0.1",
|
423 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
424 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
425 |
+
"license": "MIT",
|
426 |
+
"dependencies": {
|
427 |
+
"call-bind-apply-helpers": "^1.0.1",
|
428 |
+
"es-errors": "^1.3.0",
|
429 |
+
"gopd": "^1.2.0"
|
430 |
+
},
|
431 |
+
"engines": {
|
432 |
+
"node": ">= 0.4"
|
433 |
+
}
|
434 |
+
},
|
435 |
+
"node_modules/ee-first": {
|
436 |
+
"version": "1.1.1",
|
437 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
438 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
439 |
+
"license": "MIT"
|
440 |
+
},
|
441 |
+
"node_modules/emoji-regex": {
|
442 |
+
"version": "8.0.0",
|
443 |
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
444 |
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
445 |
+
"license": "MIT"
|
446 |
+
},
|
447 |
+
"node_modules/encodeurl": {
|
448 |
+
"version": "2.0.0",
|
449 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
450 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
451 |
+
"license": "MIT",
|
452 |
+
"engines": {
|
453 |
+
"node": ">= 0.8"
|
454 |
+
}
|
455 |
+
},
|
456 |
+
"node_modules/es-define-property": {
|
457 |
+
"version": "1.0.1",
|
458 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
459 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
460 |
+
"license": "MIT",
|
461 |
+
"engines": {
|
462 |
+
"node": ">= 0.4"
|
463 |
+
}
|
464 |
+
},
|
465 |
+
"node_modules/es-errors": {
|
466 |
+
"version": "1.3.0",
|
467 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
468 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
469 |
+
"license": "MIT",
|
470 |
+
"engines": {
|
471 |
+
"node": ">= 0.4"
|
472 |
+
}
|
473 |
+
},
|
474 |
+
"node_modules/es-object-atoms": {
|
475 |
+
"version": "1.0.0",
|
476 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
|
477 |
+
"integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
|
478 |
+
"license": "MIT",
|
479 |
+
"dependencies": {
|
480 |
+
"es-errors": "^1.3.0"
|
481 |
+
},
|
482 |
+
"engines": {
|
483 |
+
"node": ">= 0.4"
|
484 |
+
}
|
485 |
+
},
|
486 |
+
"node_modules/escalade": {
|
487 |
+
"version": "3.2.0",
|
488 |
+
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
489 |
+
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
490 |
+
"license": "MIT",
|
491 |
+
"engines": {
|
492 |
+
"node": ">=6"
|
493 |
+
}
|
494 |
+
},
|
495 |
+
"node_modules/escape-html": {
|
496 |
+
"version": "1.0.3",
|
497 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
498 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
499 |
+
"license": "MIT"
|
500 |
+
},
|
501 |
+
"node_modules/etag": {
|
502 |
+
"version": "1.8.1",
|
503 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
504 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
505 |
+
"license": "MIT",
|
506 |
+
"engines": {
|
507 |
+
"node": ">= 0.6"
|
508 |
+
}
|
509 |
+
},
|
510 |
+
"node_modules/event-target-shim": {
|
511 |
+
"version": "5.0.1",
|
512 |
+
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
513 |
+
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
514 |
+
"license": "MIT",
|
515 |
+
"engines": {
|
516 |
+
"node": ">=6"
|
517 |
+
}
|
518 |
+
},
|
519 |
+
"node_modules/express": {
|
520 |
+
"version": "4.21.2",
|
521 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
522 |
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
523 |
+
"license": "MIT",
|
524 |
+
"dependencies": {
|
525 |
+
"accepts": "~1.3.8",
|
526 |
+
"array-flatten": "1.1.1",
|
527 |
+
"body-parser": "1.20.3",
|
528 |
+
"content-disposition": "0.5.4",
|
529 |
+
"content-type": "~1.0.4",
|
530 |
+
"cookie": "0.7.1",
|
531 |
+
"cookie-signature": "1.0.6",
|
532 |
+
"debug": "2.6.9",
|
533 |
+
"depd": "2.0.0",
|
534 |
+
"encodeurl": "~2.0.0",
|
535 |
+
"escape-html": "~1.0.3",
|
536 |
+
"etag": "~1.8.1",
|
537 |
+
"finalhandler": "1.3.1",
|
538 |
+
"fresh": "0.5.2",
|
539 |
+
"http-errors": "2.0.0",
|
540 |
+
"merge-descriptors": "1.0.3",
|
541 |
+
"methods": "~1.1.2",
|
542 |
+
"on-finished": "2.4.1",
|
543 |
+
"parseurl": "~1.3.3",
|
544 |
+
"path-to-regexp": "0.1.12",
|
545 |
+
"proxy-addr": "~2.0.7",
|
546 |
+
"qs": "6.13.0",
|
547 |
+
"range-parser": "~1.2.1",
|
548 |
+
"safe-buffer": "5.2.1",
|
549 |
+
"send": "0.19.0",
|
550 |
+
"serve-static": "1.16.2",
|
551 |
+
"setprototypeof": "1.2.0",
|
552 |
+
"statuses": "2.0.1",
|
553 |
+
"type-is": "~1.6.18",
|
554 |
+
"utils-merge": "1.0.1",
|
555 |
+
"vary": "~1.1.2"
|
556 |
+
},
|
557 |
+
"engines": {
|
558 |
+
"node": ">= 0.10.0"
|
559 |
+
},
|
560 |
+
"funding": {
|
561 |
+
"type": "opencollective",
|
562 |
+
"url": "https://opencollective.com/express"
|
563 |
+
}
|
564 |
+
},
|
565 |
+
"node_modules/file-type": {
|
566 |
+
"version": "18.7.0",
|
567 |
+
"resolved": "https://registry.npmjs.org/file-type/-/file-type-18.7.0.tgz",
|
568 |
+
"integrity": "sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==",
|
569 |
+
"license": "MIT",
|
570 |
+
"dependencies": {
|
571 |
+
"readable-web-to-node-stream": "^3.0.2",
|
572 |
+
"strtok3": "^7.0.0",
|
573 |
+
"token-types": "^5.0.1"
|
574 |
+
},
|
575 |
+
"engines": {
|
576 |
+
"node": ">=14.16"
|
577 |
+
},
|
578 |
+
"funding": {
|
579 |
+
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
|
580 |
+
}
|
581 |
+
},
|
582 |
+
"node_modules/finalhandler": {
|
583 |
+
"version": "1.3.1",
|
584 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
585 |
+
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
586 |
+
"license": "MIT",
|
587 |
+
"dependencies": {
|
588 |
+
"debug": "2.6.9",
|
589 |
+
"encodeurl": "~2.0.0",
|
590 |
+
"escape-html": "~1.0.3",
|
591 |
+
"on-finished": "2.4.1",
|
592 |
+
"parseurl": "~1.3.3",
|
593 |
+
"statuses": "2.0.1",
|
594 |
+
"unpipe": "~1.0.0"
|
595 |
+
},
|
596 |
+
"engines": {
|
597 |
+
"node": ">= 0.8"
|
598 |
+
}
|
599 |
+
},
|
600 |
+
"node_modules/follow-redirects": {
|
601 |
+
"version": "1.15.9",
|
602 |
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
|
603 |
+
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
|
604 |
+
"funding": [
|
605 |
+
{
|
606 |
+
"type": "individual",
|
607 |
+
"url": "https://github.com/sponsors/RubenVerborgh"
|
608 |
+
}
|
609 |
+
],
|
610 |
+
"license": "MIT",
|
611 |
+
"engines": {
|
612 |
+
"node": ">=4.0"
|
613 |
+
},
|
614 |
+
"peerDependenciesMeta": {
|
615 |
+
"debug": {
|
616 |
+
"optional": true
|
617 |
+
}
|
618 |
+
}
|
619 |
+
},
|
620 |
+
"node_modules/form-data": {
|
621 |
+
"version": "4.0.1",
|
622 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
|
623 |
+
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
|
624 |
+
"license": "MIT",
|
625 |
+
"dependencies": {
|
626 |
+
"asynckit": "^0.4.0",
|
627 |
+
"combined-stream": "^1.0.8",
|
628 |
+
"mime-types": "^2.1.12"
|
629 |
+
},
|
630 |
+
"engines": {
|
631 |
+
"node": ">= 6"
|
632 |
+
}
|
633 |
+
},
|
634 |
+
"node_modules/form-data-encoder": {
|
635 |
+
"version": "1.7.2",
|
636 |
+
"resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
|
637 |
+
"integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==",
|
638 |
+
"license": "MIT"
|
639 |
+
},
|
640 |
+
"node_modules/formdata-node": {
|
641 |
+
"version": "4.4.1",
|
642 |
+
"resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
|
643 |
+
"integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
|
644 |
+
"license": "MIT",
|
645 |
+
"dependencies": {
|
646 |
+
"node-domexception": "1.0.0",
|
647 |
+
"web-streams-polyfill": "4.0.0-beta.3"
|
648 |
+
},
|
649 |
+
"engines": {
|
650 |
+
"node": ">= 12.20"
|
651 |
+
}
|
652 |
+
},
|
653 |
+
"node_modules/forwarded": {
|
654 |
+
"version": "0.2.0",
|
655 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
656 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
657 |
+
"license": "MIT",
|
658 |
+
"engines": {
|
659 |
+
"node": ">= 0.6"
|
660 |
+
}
|
661 |
+
},
|
662 |
+
"node_modules/fresh": {
|
663 |
+
"version": "0.5.2",
|
664 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
665 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
666 |
+
"license": "MIT",
|
667 |
+
"engines": {
|
668 |
+
"node": ">= 0.6"
|
669 |
+
}
|
670 |
+
},
|
671 |
+
"node_modules/fs": {
|
672 |
+
"version": "0.0.1-security",
|
673 |
+
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
|
674 |
+
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==",
|
675 |
+
"license": "ISC"
|
676 |
+
},
|
677 |
+
"node_modules/function-bind": {
|
678 |
+
"version": "1.1.2",
|
679 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
680 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
681 |
+
"license": "MIT",
|
682 |
+
"funding": {
|
683 |
+
"url": "https://github.com/sponsors/ljharb"
|
684 |
+
}
|
685 |
+
},
|
686 |
+
"node_modules/get-caller-file": {
|
687 |
+
"version": "2.0.5",
|
688 |
+
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
689 |
+
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
690 |
+
"license": "ISC",
|
691 |
+
"engines": {
|
692 |
+
"node": "6.* || 8.* || >= 10.*"
|
693 |
+
}
|
694 |
+
},
|
695 |
+
"node_modules/get-intrinsic": {
|
696 |
+
"version": "1.2.6",
|
697 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz",
|
698 |
+
"integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==",
|
699 |
+
"license": "MIT",
|
700 |
+
"dependencies": {
|
701 |
+
"call-bind-apply-helpers": "^1.0.1",
|
702 |
+
"dunder-proto": "^1.0.0",
|
703 |
+
"es-define-property": "^1.0.1",
|
704 |
+
"es-errors": "^1.3.0",
|
705 |
+
"es-object-atoms": "^1.0.0",
|
706 |
+
"function-bind": "^1.1.2",
|
707 |
+
"gopd": "^1.2.0",
|
708 |
+
"has-symbols": "^1.1.0",
|
709 |
+
"hasown": "^2.0.2",
|
710 |
+
"math-intrinsics": "^1.0.0"
|
711 |
+
},
|
712 |
+
"engines": {
|
713 |
+
"node": ">= 0.4"
|
714 |
+
},
|
715 |
+
"funding": {
|
716 |
+
"url": "https://github.com/sponsors/ljharb"
|
717 |
+
}
|
718 |
+
},
|
719 |
+
"node_modules/gopd": {
|
720 |
+
"version": "1.2.0",
|
721 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
722 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
723 |
+
"license": "MIT",
|
724 |
+
"engines": {
|
725 |
+
"node": ">= 0.4"
|
726 |
+
},
|
727 |
+
"funding": {
|
728 |
+
"url": "https://github.com/sponsors/ljharb"
|
729 |
+
}
|
730 |
+
},
|
731 |
+
"node_modules/groq-sdk": {
|
732 |
+
"version": "0.9.1",
|
733 |
+
"resolved": "https://registry.npmjs.org/groq-sdk/-/groq-sdk-0.9.1.tgz",
|
734 |
+
"integrity": "sha512-yFZ3+I0Oe/u+4PUKDUG8q5KpP9Hgc+ujhlBaAbcc4EMJb2RMn/atqG8i+Vnk7s+2K4rJ49mviO/kY0i9LbskCA==",
|
735 |
+
"license": "Apache-2.0",
|
736 |
+
"dependencies": {
|
737 |
+
"@types/node": "^18.11.18",
|
738 |
+
"@types/node-fetch": "^2.6.4",
|
739 |
+
"abort-controller": "^3.0.0",
|
740 |
+
"agentkeepalive": "^4.2.1",
|
741 |
+
"form-data-encoder": "1.7.2",
|
742 |
+
"formdata-node": "^4.3.2",
|
743 |
+
"node-fetch": "^2.6.7"
|
744 |
+
}
|
745 |
+
},
|
746 |
+
"node_modules/has-symbols": {
|
747 |
+
"version": "1.1.0",
|
748 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
749 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
750 |
+
"license": "MIT",
|
751 |
+
"engines": {
|
752 |
+
"node": ">= 0.4"
|
753 |
+
},
|
754 |
+
"funding": {
|
755 |
+
"url": "https://github.com/sponsors/ljharb"
|
756 |
+
}
|
757 |
+
},
|
758 |
+
"node_modules/hasown": {
|
759 |
+
"version": "2.0.2",
|
760 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
761 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
762 |
+
"license": "MIT",
|
763 |
+
"dependencies": {
|
764 |
+
"function-bind": "^1.1.2"
|
765 |
+
},
|
766 |
+
"engines": {
|
767 |
+
"node": ">= 0.4"
|
768 |
+
}
|
769 |
+
},
|
770 |
+
"node_modules/http-errors": {
|
771 |
+
"version": "2.0.0",
|
772 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
773 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
774 |
+
"license": "MIT",
|
775 |
+
"dependencies": {
|
776 |
+
"depd": "2.0.0",
|
777 |
+
"inherits": "2.0.4",
|
778 |
+
"setprototypeof": "1.2.0",
|
779 |
+
"statuses": "2.0.1",
|
780 |
+
"toidentifier": "1.0.1"
|
781 |
+
},
|
782 |
+
"engines": {
|
783 |
+
"node": ">= 0.8"
|
784 |
+
}
|
785 |
+
},
|
786 |
+
"node_modules/humanize-ms": {
|
787 |
+
"version": "1.2.1",
|
788 |
+
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
789 |
+
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
|
790 |
+
"license": "MIT",
|
791 |
+
"dependencies": {
|
792 |
+
"ms": "^2.0.0"
|
793 |
+
}
|
794 |
+
},
|
795 |
+
"node_modules/iconv-lite": {
|
796 |
+
"version": "0.4.24",
|
797 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
798 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
799 |
+
"license": "MIT",
|
800 |
+
"dependencies": {
|
801 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
802 |
+
},
|
803 |
+
"engines": {
|
804 |
+
"node": ">=0.10.0"
|
805 |
+
}
|
806 |
+
},
|
807 |
+
"node_modules/ieee754": {
|
808 |
+
"version": "1.2.1",
|
809 |
+
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
810 |
+
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
811 |
+
"funding": [
|
812 |
+
{
|
813 |
+
"type": "github",
|
814 |
+
"url": "https://github.com/sponsors/feross"
|
815 |
+
},
|
816 |
+
{
|
817 |
+
"type": "patreon",
|
818 |
+
"url": "https://www.patreon.com/feross"
|
819 |
+
},
|
820 |
+
{
|
821 |
+
"type": "consulting",
|
822 |
+
"url": "https://feross.org/support"
|
823 |
+
}
|
824 |
+
],
|
825 |
+
"license": "BSD-3-Clause"
|
826 |
+
},
|
827 |
+
"node_modules/inherits": {
|
828 |
+
"version": "2.0.4",
|
829 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
830 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
831 |
+
"license": "ISC"
|
832 |
+
},
|
833 |
+
"node_modules/ipaddr.js": {
|
834 |
+
"version": "1.9.1",
|
835 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
836 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
837 |
+
"license": "MIT",
|
838 |
+
"engines": {
|
839 |
+
"node": ">= 0.10"
|
840 |
+
}
|
841 |
+
},
|
842 |
+
"node_modules/is-fullwidth-code-point": {
|
843 |
+
"version": "3.0.0",
|
844 |
+
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
845 |
+
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
846 |
+
"license": "MIT",
|
847 |
+
"engines": {
|
848 |
+
"node": ">=8"
|
849 |
+
}
|
850 |
+
},
|
851 |
+
"node_modules/lodash.camelcase": {
|
852 |
+
"version": "4.3.0",
|
853 |
+
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
854 |
+
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
855 |
+
"license": "MIT"
|
856 |
+
},
|
857 |
+
"node_modules/long": {
|
858 |
+
"version": "5.2.3",
|
859 |
+
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
860 |
+
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
|
861 |
+
"license": "Apache-2.0"
|
862 |
+
},
|
863 |
+
"node_modules/math-intrinsics": {
|
864 |
+
"version": "1.0.0",
|
865 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz",
|
866 |
+
"integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==",
|
867 |
+
"license": "MIT",
|
868 |
+
"engines": {
|
869 |
+
"node": ">= 0.4"
|
870 |
+
}
|
871 |
+
},
|
872 |
+
"node_modules/media-typer": {
|
873 |
+
"version": "0.3.0",
|
874 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
875 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
876 |
+
"license": "MIT",
|
877 |
+
"engines": {
|
878 |
+
"node": ">= 0.6"
|
879 |
+
}
|
880 |
+
},
|
881 |
+
"node_modules/merge-descriptors": {
|
882 |
+
"version": "1.0.3",
|
883 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
884 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
885 |
+
"license": "MIT",
|
886 |
+
"funding": {
|
887 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
888 |
+
}
|
889 |
+
},
|
890 |
+
"node_modules/methods": {
|
891 |
+
"version": "1.1.2",
|
892 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
893 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
894 |
+
"license": "MIT",
|
895 |
+
"engines": {
|
896 |
+
"node": ">= 0.6"
|
897 |
+
}
|
898 |
+
},
|
899 |
+
"node_modules/mime": {
|
900 |
+
"version": "1.6.0",
|
901 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
902 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
903 |
+
"license": "MIT",
|
904 |
+
"bin": {
|
905 |
+
"mime": "cli.js"
|
906 |
+
},
|
907 |
+
"engines": {
|
908 |
+
"node": ">=4"
|
909 |
+
}
|
910 |
+
},
|
911 |
+
"node_modules/mime-db": {
|
912 |
+
"version": "1.52.0",
|
913 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
914 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
915 |
+
"license": "MIT",
|
916 |
+
"engines": {
|
917 |
+
"node": ">= 0.6"
|
918 |
+
}
|
919 |
+
},
|
920 |
+
"node_modules/mime-types": {
|
921 |
+
"version": "2.1.35",
|
922 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
923 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
924 |
+
"license": "MIT",
|
925 |
+
"dependencies": {
|
926 |
+
"mime-db": "1.52.0"
|
927 |
+
},
|
928 |
+
"engines": {
|
929 |
+
"node": ">= 0.6"
|
930 |
+
}
|
931 |
+
},
|
932 |
+
"node_modules/ms": {
|
933 |
+
"version": "2.0.0",
|
934 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
935 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
936 |
+
"license": "MIT"
|
937 |
+
},
|
938 |
+
"node_modules/negotiator": {
|
939 |
+
"version": "0.6.3",
|
940 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
941 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
942 |
+
"license": "MIT",
|
943 |
+
"engines": {
|
944 |
+
"node": ">= 0.6"
|
945 |
+
}
|
946 |
+
},
|
947 |
+
"node_modules/node-domexception": {
|
948 |
+
"version": "1.0.0",
|
949 |
+
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
950 |
+
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
951 |
+
"funding": [
|
952 |
+
{
|
953 |
+
"type": "github",
|
954 |
+
"url": "https://github.com/sponsors/jimmywarting"
|
955 |
+
},
|
956 |
+
{
|
957 |
+
"type": "github",
|
958 |
+
"url": "https://paypal.me/jimmywarting"
|
959 |
+
}
|
960 |
+
],
|
961 |
+
"license": "MIT",
|
962 |
+
"engines": {
|
963 |
+
"node": ">=10.5.0"
|
964 |
+
}
|
965 |
+
},
|
966 |
+
"node_modules/node-fetch": {
|
967 |
+
"version": "2.7.0",
|
968 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
969 |
+
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
970 |
+
"license": "MIT",
|
971 |
+
"dependencies": {
|
972 |
+
"whatwg-url": "^5.0.0"
|
973 |
+
},
|
974 |
+
"engines": {
|
975 |
+
"node": "4.x || >=6.0.0"
|
976 |
+
},
|
977 |
+
"peerDependencies": {
|
978 |
+
"encoding": "^0.1.0"
|
979 |
+
},
|
980 |
+
"peerDependenciesMeta": {
|
981 |
+
"encoding": {
|
982 |
+
"optional": true
|
983 |
+
}
|
984 |
+
}
|
985 |
+
},
|
986 |
+
"node_modules/object-inspect": {
|
987 |
+
"version": "1.13.3",
|
988 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz",
|
989 |
+
"integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==",
|
990 |
+
"license": "MIT",
|
991 |
+
"engines": {
|
992 |
+
"node": ">= 0.4"
|
993 |
+
},
|
994 |
+
"funding": {
|
995 |
+
"url": "https://github.com/sponsors/ljharb"
|
996 |
+
}
|
997 |
+
},
|
998 |
+
"node_modules/on-finished": {
|
999 |
+
"version": "2.4.1",
|
1000 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
1001 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
1002 |
+
"license": "MIT",
|
1003 |
+
"dependencies": {
|
1004 |
+
"ee-first": "1.1.1"
|
1005 |
+
},
|
1006 |
+
"engines": {
|
1007 |
+
"node": ">= 0.8"
|
1008 |
+
}
|
1009 |
+
},
|
1010 |
+
"node_modules/parseurl": {
|
1011 |
+
"version": "1.3.3",
|
1012 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
1013 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
1014 |
+
"license": "MIT",
|
1015 |
+
"engines": {
|
1016 |
+
"node": ">= 0.8"
|
1017 |
+
}
|
1018 |
+
},
|
1019 |
+
"node_modules/path": {
|
1020 |
+
"version": "0.12.7",
|
1021 |
+
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
|
1022 |
+
"integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
|
1023 |
+
"license": "MIT",
|
1024 |
+
"dependencies": {
|
1025 |
+
"process": "^0.11.1",
|
1026 |
+
"util": "^0.10.3"
|
1027 |
+
}
|
1028 |
+
},
|
1029 |
+
"node_modules/path-to-regexp": {
|
1030 |
+
"version": "0.1.12",
|
1031 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
1032 |
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
1033 |
+
"license": "MIT"
|
1034 |
+
},
|
1035 |
+
"node_modules/peek-readable": {
|
1036 |
+
"version": "5.3.1",
|
1037 |
+
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.3.1.tgz",
|
1038 |
+
"integrity": "sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw==",
|
1039 |
+
"license": "MIT",
|
1040 |
+
"engines": {
|
1041 |
+
"node": ">=14.16"
|
1042 |
+
},
|
1043 |
+
"funding": {
|
1044 |
+
"type": "github",
|
1045 |
+
"url": "https://github.com/sponsors/Borewit"
|
1046 |
+
}
|
1047 |
+
},
|
1048 |
+
"node_modules/playht": {
|
1049 |
+
"version": "0.14.0",
|
1050 |
+
"resolved": "https://registry.npmjs.org/playht/-/playht-0.14.0.tgz",
|
1051 |
+
"integrity": "sha512-jom/RKpwxh8OHPPjUL3UFXLuOmbKaSGwQ9dIECVB0CjlT7RW/d9n17jEBeM7GJAaOH77NerLKSRIydakKBJ3Sw==",
|
1052 |
+
"license": "MIT",
|
1053 |
+
"dependencies": {
|
1054 |
+
"@grpc/grpc-js": "^1.9.4",
|
1055 |
+
"axios": "^1.4.0",
|
1056 |
+
"cross-fetch": "^4.0.0",
|
1057 |
+
"file-type": "^18.5.0",
|
1058 |
+
"protobufjs": "^7.2.5",
|
1059 |
+
"tslib": "^2.1.0"
|
1060 |
+
}
|
1061 |
+
},
|
1062 |
+
"node_modules/process": {
|
1063 |
+
"version": "0.11.10",
|
1064 |
+
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
1065 |
+
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
|
1066 |
+
"license": "MIT",
|
1067 |
+
"engines": {
|
1068 |
+
"node": ">= 0.6.0"
|
1069 |
+
}
|
1070 |
+
},
|
1071 |
+
"node_modules/protobufjs": {
|
1072 |
+
"version": "7.4.0",
|
1073 |
+
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz",
|
1074 |
+
"integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==",
|
1075 |
+
"hasInstallScript": true,
|
1076 |
+
"license": "BSD-3-Clause",
|
1077 |
+
"dependencies": {
|
1078 |
+
"@protobufjs/aspromise": "^1.1.2",
|
1079 |
+
"@protobufjs/base64": "^1.1.2",
|
1080 |
+
"@protobufjs/codegen": "^2.0.4",
|
1081 |
+
"@protobufjs/eventemitter": "^1.1.0",
|
1082 |
+
"@protobufjs/fetch": "^1.1.0",
|
1083 |
+
"@protobufjs/float": "^1.0.2",
|
1084 |
+
"@protobufjs/inquire": "^1.1.0",
|
1085 |
+
"@protobufjs/path": "^1.1.2",
|
1086 |
+
"@protobufjs/pool": "^1.1.0",
|
1087 |
+
"@protobufjs/utf8": "^1.1.0",
|
1088 |
+
"@types/node": ">=13.7.0",
|
1089 |
+
"long": "^5.0.0"
|
1090 |
+
},
|
1091 |
+
"engines": {
|
1092 |
+
"node": ">=12.0.0"
|
1093 |
+
}
|
1094 |
+
},
|
1095 |
+
"node_modules/proxy-addr": {
|
1096 |
+
"version": "2.0.7",
|
1097 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
1098 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
1099 |
+
"license": "MIT",
|
1100 |
+
"dependencies": {
|
1101 |
+
"forwarded": "0.2.0",
|
1102 |
+
"ipaddr.js": "1.9.1"
|
1103 |
+
},
|
1104 |
+
"engines": {
|
1105 |
+
"node": ">= 0.10"
|
1106 |
+
}
|
1107 |
+
},
|
1108 |
+
"node_modules/proxy-from-env": {
|
1109 |
+
"version": "1.1.0",
|
1110 |
+
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
1111 |
+
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
1112 |
+
"license": "MIT"
|
1113 |
+
},
|
1114 |
+
"node_modules/qs": {
|
1115 |
+
"version": "6.13.0",
|
1116 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
1117 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
1118 |
+
"license": "BSD-3-Clause",
|
1119 |
+
"dependencies": {
|
1120 |
+
"side-channel": "^1.0.6"
|
1121 |
+
},
|
1122 |
+
"engines": {
|
1123 |
+
"node": ">=0.6"
|
1124 |
+
},
|
1125 |
+
"funding": {
|
1126 |
+
"url": "https://github.com/sponsors/ljharb"
|
1127 |
+
}
|
1128 |
+
},
|
1129 |
+
"node_modules/range-parser": {
|
1130 |
+
"version": "1.2.1",
|
1131 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
1132 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
1133 |
+
"license": "MIT",
|
1134 |
+
"engines": {
|
1135 |
+
"node": ">= 0.6"
|
1136 |
+
}
|
1137 |
+
},
|
1138 |
+
"node_modules/raw-body": {
|
1139 |
+
"version": "2.5.2",
|
1140 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
1141 |
+
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
1142 |
+
"license": "MIT",
|
1143 |
+
"dependencies": {
|
1144 |
+
"bytes": "3.1.2",
|
1145 |
+
"http-errors": "2.0.0",
|
1146 |
+
"iconv-lite": "0.4.24",
|
1147 |
+
"unpipe": "1.0.0"
|
1148 |
+
},
|
1149 |
+
"engines": {
|
1150 |
+
"node": ">= 0.8"
|
1151 |
+
}
|
1152 |
+
},
|
1153 |
+
"node_modules/readable-stream": {
|
1154 |
+
"version": "3.6.2",
|
1155 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
1156 |
+
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
1157 |
+
"license": "MIT",
|
1158 |
+
"dependencies": {
|
1159 |
+
"inherits": "^2.0.3",
|
1160 |
+
"string_decoder": "^1.1.1",
|
1161 |
+
"util-deprecate": "^1.0.1"
|
1162 |
+
},
|
1163 |
+
"engines": {
|
1164 |
+
"node": ">= 6"
|
1165 |
+
}
|
1166 |
+
},
|
1167 |
+
"node_modules/readable-web-to-node-stream": {
|
1168 |
+
"version": "3.0.2",
|
1169 |
+
"resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
|
1170 |
+
"integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
|
1171 |
+
"license": "MIT",
|
1172 |
+
"dependencies": {
|
1173 |
+
"readable-stream": "^3.6.0"
|
1174 |
+
},
|
1175 |
+
"engines": {
|
1176 |
+
"node": ">=8"
|
1177 |
+
},
|
1178 |
+
"funding": {
|
1179 |
+
"type": "github",
|
1180 |
+
"url": "https://github.com/sponsors/Borewit"
|
1181 |
+
}
|
1182 |
+
},
|
1183 |
+
"node_modules/require-directory": {
|
1184 |
+
"version": "2.1.1",
|
1185 |
+
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
1186 |
+
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
1187 |
+
"license": "MIT",
|
1188 |
+
"engines": {
|
1189 |
+
"node": ">=0.10.0"
|
1190 |
+
}
|
1191 |
+
},
|
1192 |
+
"node_modules/safe-buffer": {
|
1193 |
+
"version": "5.2.1",
|
1194 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
1195 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
1196 |
+
"funding": [
|
1197 |
+
{
|
1198 |
+
"type": "github",
|
1199 |
+
"url": "https://github.com/sponsors/feross"
|
1200 |
+
},
|
1201 |
+
{
|
1202 |
+
"type": "patreon",
|
1203 |
+
"url": "https://www.patreon.com/feross"
|
1204 |
+
},
|
1205 |
+
{
|
1206 |
+
"type": "consulting",
|
1207 |
+
"url": "https://feross.org/support"
|
1208 |
+
}
|
1209 |
+
],
|
1210 |
+
"license": "MIT"
|
1211 |
+
},
|
1212 |
+
"node_modules/safer-buffer": {
|
1213 |
+
"version": "2.1.2",
|
1214 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
1215 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
1216 |
+
"license": "MIT"
|
1217 |
+
},
|
1218 |
+
"node_modules/send": {
|
1219 |
+
"version": "0.19.0",
|
1220 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
1221 |
+
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
1222 |
+
"license": "MIT",
|
1223 |
+
"dependencies": {
|
1224 |
+
"debug": "2.6.9",
|
1225 |
+
"depd": "2.0.0",
|
1226 |
+
"destroy": "1.2.0",
|
1227 |
+
"encodeurl": "~1.0.2",
|
1228 |
+
"escape-html": "~1.0.3",
|
1229 |
+
"etag": "~1.8.1",
|
1230 |
+
"fresh": "0.5.2",
|
1231 |
+
"http-errors": "2.0.0",
|
1232 |
+
"mime": "1.6.0",
|
1233 |
+
"ms": "2.1.3",
|
1234 |
+
"on-finished": "2.4.1",
|
1235 |
+
"range-parser": "~1.2.1",
|
1236 |
+
"statuses": "2.0.1"
|
1237 |
+
},
|
1238 |
+
"engines": {
|
1239 |
+
"node": ">= 0.8.0"
|
1240 |
+
}
|
1241 |
+
},
|
1242 |
+
"node_modules/send/node_modules/encodeurl": {
|
1243 |
+
"version": "1.0.2",
|
1244 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
1245 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
1246 |
+
"license": "MIT",
|
1247 |
+
"engines": {
|
1248 |
+
"node": ">= 0.8"
|
1249 |
+
}
|
1250 |
+
},
|
1251 |
+
"node_modules/send/node_modules/ms": {
|
1252 |
+
"version": "2.1.3",
|
1253 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
1254 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
1255 |
+
"license": "MIT"
|
1256 |
+
},
|
1257 |
+
"node_modules/serve-static": {
|
1258 |
+
"version": "1.16.2",
|
1259 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
1260 |
+
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
1261 |
+
"license": "MIT",
|
1262 |
+
"dependencies": {
|
1263 |
+
"encodeurl": "~2.0.0",
|
1264 |
+
"escape-html": "~1.0.3",
|
1265 |
+
"parseurl": "~1.3.3",
|
1266 |
+
"send": "0.19.0"
|
1267 |
+
},
|
1268 |
+
"engines": {
|
1269 |
+
"node": ">= 0.8.0"
|
1270 |
+
}
|
1271 |
+
},
|
1272 |
+
"node_modules/setprototypeof": {
|
1273 |
+
"version": "1.2.0",
|
1274 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
1275 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
1276 |
+
"license": "ISC"
|
1277 |
+
},
|
1278 |
+
"node_modules/side-channel": {
|
1279 |
+
"version": "1.1.0",
|
1280 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
1281 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
1282 |
+
"license": "MIT",
|
1283 |
+
"dependencies": {
|
1284 |
+
"es-errors": "^1.3.0",
|
1285 |
+
"object-inspect": "^1.13.3",
|
1286 |
+
"side-channel-list": "^1.0.0",
|
1287 |
+
"side-channel-map": "^1.0.1",
|
1288 |
+
"side-channel-weakmap": "^1.0.2"
|
1289 |
+
},
|
1290 |
+
"engines": {
|
1291 |
+
"node": ">= 0.4"
|
1292 |
+
},
|
1293 |
+
"funding": {
|
1294 |
+
"url": "https://github.com/sponsors/ljharb"
|
1295 |
+
}
|
1296 |
+
},
|
1297 |
+
"node_modules/side-channel-list": {
|
1298 |
+
"version": "1.0.0",
|
1299 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
1300 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
1301 |
+
"license": "MIT",
|
1302 |
+
"dependencies": {
|
1303 |
+
"es-errors": "^1.3.0",
|
1304 |
+
"object-inspect": "^1.13.3"
|
1305 |
+
},
|
1306 |
+
"engines": {
|
1307 |
+
"node": ">= 0.4"
|
1308 |
+
},
|
1309 |
+
"funding": {
|
1310 |
+
"url": "https://github.com/sponsors/ljharb"
|
1311 |
+
}
|
1312 |
+
},
|
1313 |
+
"node_modules/side-channel-map": {
|
1314 |
+
"version": "1.0.1",
|
1315 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
1316 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
1317 |
+
"license": "MIT",
|
1318 |
+
"dependencies": {
|
1319 |
+
"call-bound": "^1.0.2",
|
1320 |
+
"es-errors": "^1.3.0",
|
1321 |
+
"get-intrinsic": "^1.2.5",
|
1322 |
+
"object-inspect": "^1.13.3"
|
1323 |
+
},
|
1324 |
+
"engines": {
|
1325 |
+
"node": ">= 0.4"
|
1326 |
+
},
|
1327 |
+
"funding": {
|
1328 |
+
"url": "https://github.com/sponsors/ljharb"
|
1329 |
+
}
|
1330 |
+
},
|
1331 |
+
"node_modules/side-channel-weakmap": {
|
1332 |
+
"version": "1.0.2",
|
1333 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
1334 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
1335 |
+
"license": "MIT",
|
1336 |
+
"dependencies": {
|
1337 |
+
"call-bound": "^1.0.2",
|
1338 |
+
"es-errors": "^1.3.0",
|
1339 |
+
"get-intrinsic": "^1.2.5",
|
1340 |
+
"object-inspect": "^1.13.3",
|
1341 |
+
"side-channel-map": "^1.0.1"
|
1342 |
+
},
|
1343 |
+
"engines": {
|
1344 |
+
"node": ">= 0.4"
|
1345 |
+
},
|
1346 |
+
"funding": {
|
1347 |
+
"url": "https://github.com/sponsors/ljharb"
|
1348 |
+
}
|
1349 |
+
},
|
1350 |
+
"node_modules/statuses": {
|
1351 |
+
"version": "2.0.1",
|
1352 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
1353 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
1354 |
+
"license": "MIT",
|
1355 |
+
"engines": {
|
1356 |
+
"node": ">= 0.8"
|
1357 |
+
}
|
1358 |
+
},
|
1359 |
+
"node_modules/string_decoder": {
|
1360 |
+
"version": "1.3.0",
|
1361 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
1362 |
+
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
1363 |
+
"license": "MIT",
|
1364 |
+
"dependencies": {
|
1365 |
+
"safe-buffer": "~5.2.0"
|
1366 |
+
}
|
1367 |
+
},
|
1368 |
+
"node_modules/string-width": {
|
1369 |
+
"version": "4.2.3",
|
1370 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
1371 |
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
1372 |
+
"license": "MIT",
|
1373 |
+
"dependencies": {
|
1374 |
+
"emoji-regex": "^8.0.0",
|
1375 |
+
"is-fullwidth-code-point": "^3.0.0",
|
1376 |
+
"strip-ansi": "^6.0.1"
|
1377 |
+
},
|
1378 |
+
"engines": {
|
1379 |
+
"node": ">=8"
|
1380 |
+
}
|
1381 |
+
},
|
1382 |
+
"node_modules/strip-ansi": {
|
1383 |
+
"version": "6.0.1",
|
1384 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
1385 |
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
1386 |
+
"license": "MIT",
|
1387 |
+
"dependencies": {
|
1388 |
+
"ansi-regex": "^5.0.1"
|
1389 |
+
},
|
1390 |
+
"engines": {
|
1391 |
+
"node": ">=8"
|
1392 |
+
}
|
1393 |
+
},
|
1394 |
+
"node_modules/strtok3": {
|
1395 |
+
"version": "7.1.1",
|
1396 |
+
"resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.1.1.tgz",
|
1397 |
+
"integrity": "sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg==",
|
1398 |
+
"license": "MIT",
|
1399 |
+
"dependencies": {
|
1400 |
+
"@tokenizer/token": "^0.3.0",
|
1401 |
+
"peek-readable": "^5.1.3"
|
1402 |
+
},
|
1403 |
+
"engines": {
|
1404 |
+
"node": ">=16"
|
1405 |
+
},
|
1406 |
+
"funding": {
|
1407 |
+
"type": "github",
|
1408 |
+
"url": "https://github.com/sponsors/Borewit"
|
1409 |
+
}
|
1410 |
+
},
|
1411 |
+
"node_modules/toidentifier": {
|
1412 |
+
"version": "1.0.1",
|
1413 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
1414 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
1415 |
+
"license": "MIT",
|
1416 |
+
"engines": {
|
1417 |
+
"node": ">=0.6"
|
1418 |
+
}
|
1419 |
+
},
|
1420 |
+
"node_modules/token-types": {
|
1421 |
+
"version": "5.0.1",
|
1422 |
+
"resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
|
1423 |
+
"integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",
|
1424 |
+
"license": "MIT",
|
1425 |
+
"dependencies": {
|
1426 |
+
"@tokenizer/token": "^0.3.0",
|
1427 |
+
"ieee754": "^1.2.1"
|
1428 |
+
},
|
1429 |
+
"engines": {
|
1430 |
+
"node": ">=14.16"
|
1431 |
+
},
|
1432 |
+
"funding": {
|
1433 |
+
"type": "github",
|
1434 |
+
"url": "https://github.com/sponsors/Borewit"
|
1435 |
+
}
|
1436 |
+
},
|
1437 |
+
"node_modules/tr46": {
|
1438 |
+
"version": "0.0.3",
|
1439 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
1440 |
+
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
1441 |
+
"license": "MIT"
|
1442 |
+
},
|
1443 |
+
"node_modules/tslib": {
|
1444 |
+
"version": "2.8.1",
|
1445 |
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
1446 |
+
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
1447 |
+
"license": "0BSD"
|
1448 |
+
},
|
1449 |
+
"node_modules/type-is": {
|
1450 |
+
"version": "1.6.18",
|
1451 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
1452 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
1453 |
+
"license": "MIT",
|
1454 |
+
"dependencies": {
|
1455 |
+
"media-typer": "0.3.0",
|
1456 |
+
"mime-types": "~2.1.24"
|
1457 |
+
},
|
1458 |
+
"engines": {
|
1459 |
+
"node": ">= 0.6"
|
1460 |
+
}
|
1461 |
+
},
|
1462 |
+
"node_modules/undici-types": {
|
1463 |
+
"version": "5.26.5",
|
1464 |
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
1465 |
+
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
1466 |
+
"license": "MIT"
|
1467 |
+
},
|
1468 |
+
"node_modules/unpipe": {
|
1469 |
+
"version": "1.0.0",
|
1470 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
1471 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
1472 |
+
"license": "MIT",
|
1473 |
+
"engines": {
|
1474 |
+
"node": ">= 0.8"
|
1475 |
+
}
|
1476 |
+
},
|
1477 |
+
"node_modules/util": {
|
1478 |
+
"version": "0.10.4",
|
1479 |
+
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
|
1480 |
+
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
|
1481 |
+
"license": "MIT",
|
1482 |
+
"dependencies": {
|
1483 |
+
"inherits": "2.0.3"
|
1484 |
+
}
|
1485 |
+
},
|
1486 |
+
"node_modules/util-deprecate": {
|
1487 |
+
"version": "1.0.2",
|
1488 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
1489 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
1490 |
+
"license": "MIT"
|
1491 |
+
},
|
1492 |
+
"node_modules/util/node_modules/inherits": {
|
1493 |
+
"version": "2.0.3",
|
1494 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
1495 |
+
"integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
|
1496 |
+
"license": "ISC"
|
1497 |
+
},
|
1498 |
+
"node_modules/utils-merge": {
|
1499 |
+
"version": "1.0.1",
|
1500 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
1501 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
1502 |
+
"license": "MIT",
|
1503 |
+
"engines": {
|
1504 |
+
"node": ">= 0.4.0"
|
1505 |
+
}
|
1506 |
+
},
|
1507 |
+
"node_modules/vary": {
|
1508 |
+
"version": "1.1.2",
|
1509 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
1510 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
1511 |
+
"license": "MIT",
|
1512 |
+
"engines": {
|
1513 |
+
"node": ">= 0.8"
|
1514 |
+
}
|
1515 |
+
},
|
1516 |
+
"node_modules/web-streams-polyfill": {
|
1517 |
+
"version": "4.0.0-beta.3",
|
1518 |
+
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
|
1519 |
+
"integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
|
1520 |
+
"license": "MIT",
|
1521 |
+
"engines": {
|
1522 |
+
"node": ">= 14"
|
1523 |
+
}
|
1524 |
+
},
|
1525 |
+
"node_modules/webidl-conversions": {
|
1526 |
+
"version": "3.0.1",
|
1527 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
1528 |
+
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
1529 |
+
"license": "BSD-2-Clause"
|
1530 |
+
},
|
1531 |
+
"node_modules/whatwg-url": {
|
1532 |
+
"version": "5.0.0",
|
1533 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
1534 |
+
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
1535 |
+
"license": "MIT",
|
1536 |
+
"dependencies": {
|
1537 |
+
"tr46": "~0.0.3",
|
1538 |
+
"webidl-conversions": "^3.0.0"
|
1539 |
+
}
|
1540 |
+
},
|
1541 |
+
"node_modules/wrap-ansi": {
|
1542 |
+
"version": "7.0.0",
|
1543 |
+
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
1544 |
+
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
1545 |
+
"license": "MIT",
|
1546 |
+
"dependencies": {
|
1547 |
+
"ansi-styles": "^4.0.0",
|
1548 |
+
"string-width": "^4.1.0",
|
1549 |
+
"strip-ansi": "^6.0.0"
|
1550 |
+
},
|
1551 |
+
"engines": {
|
1552 |
+
"node": ">=10"
|
1553 |
+
},
|
1554 |
+
"funding": {
|
1555 |
+
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
1556 |
+
}
|
1557 |
+
},
|
1558 |
+
"node_modules/y18n": {
|
1559 |
+
"version": "5.0.8",
|
1560 |
+
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
1561 |
+
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
1562 |
+
"license": "ISC",
|
1563 |
+
"engines": {
|
1564 |
+
"node": ">=10"
|
1565 |
+
}
|
1566 |
+
},
|
1567 |
+
"node_modules/yargs": {
|
1568 |
+
"version": "17.7.2",
|
1569 |
+
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
1570 |
+
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
1571 |
+
"license": "MIT",
|
1572 |
+
"dependencies": {
|
1573 |
+
"cliui": "^8.0.1",
|
1574 |
+
"escalade": "^3.1.1",
|
1575 |
+
"get-caller-file": "^2.0.5",
|
1576 |
+
"require-directory": "^2.1.1",
|
1577 |
+
"string-width": "^4.2.3",
|
1578 |
+
"y18n": "^5.0.5",
|
1579 |
+
"yargs-parser": "^21.1.1"
|
1580 |
+
},
|
1581 |
+
"engines": {
|
1582 |
+
"node": ">=12"
|
1583 |
+
}
|
1584 |
+
},
|
1585 |
+
"node_modules/yargs-parser": {
|
1586 |
+
"version": "21.1.1",
|
1587 |
+
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
1588 |
+
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
1589 |
+
"license": "ISC",
|
1590 |
+
"engines": {
|
1591 |
+
"node": ">=12"
|
1592 |
+
}
|
1593 |
+
}
|
1594 |
+
}
|
1595 |
+
}
|
node_modules/@grpc/grpc-js/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Apache License
|
2 |
+
Version 2.0, January 2004
|
3 |
+
http://www.apache.org/licenses/
|
4 |
+
|
5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
+
|
7 |
+
1. Definitions.
|
8 |
+
|
9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
+
|
12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
+
the copyright owner that is granting the License.
|
14 |
+
|
15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
+
other entities that control, are controlled by, or are under common
|
17 |
+
control with that entity. For the purposes of this definition,
|
18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
19 |
+
direction or management of such entity, whether by contract or
|
20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
+
|
23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
+
exercising permissions granted by this License.
|
25 |
+
|
26 |
+
"Source" form shall mean the preferred form for making modifications,
|
27 |
+
including but not limited to software source code, documentation
|
28 |
+
source, and configuration files.
|
29 |
+
|
30 |
+
"Object" form shall mean any form resulting from mechanical
|
31 |
+
transformation or translation of a Source form, including but
|
32 |
+
not limited to compiled object code, generated documentation,
|
33 |
+
and conversions to other media types.
|
34 |
+
|
35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
36 |
+
Object form, made available under the License, as indicated by a
|
37 |
+
copyright notice that is included in or attached to the work
|
38 |
+
(an example is provided in the Appendix below).
|
39 |
+
|
40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
+
form, that is based on (or derived from) the Work and for which the
|
42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
44 |
+
of this License, Derivative Works shall not include works that remain
|
45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
+
the Work and Derivative Works thereof.
|
47 |
+
|
48 |
+
"Contribution" shall mean any work of authorship, including
|
49 |
+
the original version of the Work and any modifications or additions
|
50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
+
means any form of electronic, verbal, or written communication sent
|
55 |
+
to the Licensor or its representatives, including but not limited to
|
56 |
+
communication on electronic mailing lists, source code control systems,
|
57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
59 |
+
excluding communication that is conspicuously marked or otherwise
|
60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
+
|
62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
64 |
+
subsequently incorporated within the Work.
|
65 |
+
|
66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
71 |
+
Work and such Derivative Works in Source or Object form.
|
72 |
+
|
73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
+
(except as stated in this section) patent license to make, have made,
|
77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
+
where such license applies only to those patent claims licensable
|
79 |
+
by such Contributor that are necessarily infringed by their
|
80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
82 |
+
institute patent litigation against any entity (including a
|
83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
+
or a Contribution incorporated within the Work constitutes direct
|
85 |
+
or contributory patent infringement, then any patent licenses
|
86 |
+
granted to You under this License for that Work shall terminate
|
87 |
+
as of the date such litigation is filed.
|
88 |
+
|
89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
+
Work or Derivative Works thereof in any medium, with or without
|
91 |
+
modifications, and in Source or Object form, provided that You
|
92 |
+
meet the following conditions:
|
93 |
+
|
94 |
+
(a) You must give any other recipients of the Work or
|
95 |
+
Derivative Works a copy of this License; and
|
96 |
+
|
97 |
+
(b) You must cause any modified files to carry prominent notices
|
98 |
+
stating that You changed the files; and
|
99 |
+
|
100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
101 |
+
that You distribute, all copyright, patent, trademark, and
|
102 |
+
attribution notices from the Source form of the Work,
|
103 |
+
excluding those notices that do not pertain to any part of
|
104 |
+
the Derivative Works; and
|
105 |
+
|
106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
+
distribution, then any Derivative Works that You distribute must
|
108 |
+
include a readable copy of the attribution notices contained
|
109 |
+
within such NOTICE file, excluding those notices that do not
|
110 |
+
pertain to any part of the Derivative Works, in at least one
|
111 |
+
of the following places: within a NOTICE text file distributed
|
112 |
+
as part of the Derivative Works; within the Source form or
|
113 |
+
documentation, if provided along with the Derivative Works; or,
|
114 |
+
within a display generated by the Derivative Works, if and
|
115 |
+
wherever such third-party notices normally appear. The contents
|
116 |
+
of the NOTICE file are for informational purposes only and
|
117 |
+
do not modify the License. You may add Your own attribution
|
118 |
+
notices within Derivative Works that You distribute, alongside
|
119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
120 |
+
that such additional attribution notices cannot be construed
|
121 |
+
as modifying the License.
|
122 |
+
|
123 |
+
You may add Your own copyright statement to Your modifications and
|
124 |
+
may provide additional or different license terms and conditions
|
125 |
+
for use, reproduction, or distribution of Your modifications, or
|
126 |
+
for any such Derivative Works as a whole, provided Your use,
|
127 |
+
reproduction, and distribution of the Work otherwise complies with
|
128 |
+
the conditions stated in this License.
|
129 |
+
|
130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
132 |
+
by You to the Licensor shall be under the terms and conditions of
|
133 |
+
this License, without any additional terms or conditions.
|
134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
+
the terms of any separate license agreement you may have executed
|
136 |
+
with Licensor regarding such Contributions.
|
137 |
+
|
138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
140 |
+
except as required for reasonable and customary use in describing the
|
141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
+
|
143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
+
agreed to in writing, Licensor provides the Work (and each
|
145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
+
implied, including, without limitation, any warranties or conditions
|
148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
+
appropriateness of using or redistributing the Work and assume any
|
151 |
+
risks associated with Your exercise of permissions under this License.
|
152 |
+
|
153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
+
whether in tort (including negligence), contract, or otherwise,
|
155 |
+
unless required by applicable law (such as deliberate and grossly
|
156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
+
liable to You for damages, including any direct, indirect, special,
|
158 |
+
incidental, or consequential damages of any character arising as a
|
159 |
+
result of this License or out of the use or inability to use the
|
160 |
+
Work (including but not limited to damages for loss of goodwill,
|
161 |
+
work stoppage, computer failure or malfunction, or any and all
|
162 |
+
other commercial damages or losses), even if such Contributor
|
163 |
+
has been advised of the possibility of such damages.
|
164 |
+
|
165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
+
or other liability obligations and/or rights consistent with this
|
169 |
+
License. However, in accepting such obligations, You may act only
|
170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
+
of any other Contributor, and only if You agree to indemnify,
|
172 |
+
defend, and hold each Contributor harmless for any liability
|
173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
174 |
+
of your accepting any such warranty or additional liability.
|
175 |
+
|
176 |
+
END OF TERMS AND CONDITIONS
|
177 |
+
|
178 |
+
APPENDIX: How to apply the Apache License to your work.
|
179 |
+
|
180 |
+
To apply the Apache License to your work, attach the following
|
181 |
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
182 |
+
replaced with your own identifying information. (Don't include
|
183 |
+
the brackets!) The text should be enclosed in the appropriate
|
184 |
+
comment syntax for the file format. We also recommend that a
|
185 |
+
file or class name and description of purpose be included on the
|
186 |
+
same "printed page" as the copyright notice for easier
|
187 |
+
identification within third-party archives.
|
188 |
+
|
189 |
+
Copyright {yyyy} {name of copyright owner}
|
190 |
+
|
191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
+
you may not use this file except in compliance with the License.
|
193 |
+
You may obtain a copy of the License at
|
194 |
+
|
195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
+
|
197 |
+
Unless required by applicable law or agreed to in writing, software
|
198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
+
See the License for the specific language governing permissions and
|
201 |
+
limitations under the License.
|
node_modules/@grpc/grpc-js/README.md
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Pure JavaScript gRPC Client
|
2 |
+
|
3 |
+
## Installation
|
4 |
+
|
5 |
+
Node 12 is recommended. The exact set of compatible Node versions can be found in the `engines` field of the `package.json` file.
|
6 |
+
|
7 |
+
```sh
|
8 |
+
npm install @grpc/grpc-js
|
9 |
+
```
|
10 |
+
|
11 |
+
## Documentation
|
12 |
+
|
13 |
+
Documentation specifically for the `@grpc/grpc-js` package is currently not available. However, [documentation is available for the `grpc` package](https://grpc.github.io/grpc/node/grpc.html), and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below.
|
14 |
+
|
15 |
+
## Features
|
16 |
+
|
17 |
+
- Clients
|
18 |
+
- Automatic reconnection
|
19 |
+
- Servers
|
20 |
+
- Streaming
|
21 |
+
- Metadata
|
22 |
+
- Partial compression support: clients can compress and decompress messages, and servers can decompress request messages
|
23 |
+
- Pick first and round robin load balancing policies
|
24 |
+
- Client Interceptors
|
25 |
+
- Connection Keepalives
|
26 |
+
- HTTP Connect support (proxies)
|
27 |
+
|
28 |
+
If you need a feature from the `grpc` package that is not provided by the `@grpc/grpc-js`, please file a feature request with that information.
|
29 |
+
|
30 |
+
This library does not directly handle `.proto` files. To use `.proto` files with this library we recommend using the `@grpc/proto-loader` package.
|
31 |
+
|
32 |
+
## Migrating from [`grpc`](https://www.npmjs.com/package/grpc)
|
33 |
+
|
34 |
+
`@grpc/grpc-js` is almost a drop-in replacement for `grpc`, but you may need to make a few code changes to use it:
|
35 |
+
|
36 |
+
- If you are currently loading `.proto` files using `grpc.load`, that function is not available in this library. You should instead load your `.proto` files using `@grpc/proto-loader` and load the resulting package definition objects into `@grpc/grpc-js` using `grpc.loadPackageDefinition`.
|
37 |
+
- If you are currently loading packages generated by `grpc-tools`, you should instead generate your files using the `generate_package_definition` option in `grpc-tools`, then load the object exported by the generated file into `@grpc/grpc-js` using `grpc.loadPackageDefinition`.
|
38 |
+
- If you have a server and you are using `Server#bind` to bind ports, you will need to use `Server#bindAsync` instead.
|
39 |
+
- If you are using any channel options supported in `grpc` but not supported in `@grpc/grpc-js`, you may need to adjust your code to handle the different behavior. Refer to [the list of supported options](#supported-channel-options) below.
|
40 |
+
- Refer to the [detailed package comparison](https://github.com/grpc/grpc-node/blob/master/PACKAGE-COMPARISON.md) for more details on the differences between `grpc` and `@grpc/grpc-js`.
|
41 |
+
|
42 |
+
## Supported Channel Options
|
43 |
+
Many channel arguments supported in `grpc` are not supported in `@grpc/grpc-js`. The channel arguments supported by `@grpc/grpc-js` are:
|
44 |
+
- `grpc.ssl_target_name_override`
|
45 |
+
- `grpc.primary_user_agent`
|
46 |
+
- `grpc.secondary_user_agent`
|
47 |
+
- `grpc.default_authority`
|
48 |
+
- `grpc.keepalive_time_ms`
|
49 |
+
- `grpc.keepalive_timeout_ms`
|
50 |
+
- `grpc.keepalive_permit_without_calls`
|
51 |
+
- `grpc.service_config`
|
52 |
+
- `grpc.max_concurrent_streams`
|
53 |
+
- `grpc.initial_reconnect_backoff_ms`
|
54 |
+
- `grpc.max_reconnect_backoff_ms`
|
55 |
+
- `grpc.use_local_subchannel_pool`
|
56 |
+
- `grpc.max_send_message_length`
|
57 |
+
- `grpc.max_receive_message_length`
|
58 |
+
- `grpc.enable_http_proxy`
|
59 |
+
- `grpc.default_compression_algorithm`
|
60 |
+
- `grpc.enable_channelz`
|
61 |
+
- `grpc.dns_min_time_between_resolutions_ms`
|
62 |
+
- `grpc.enable_retries`
|
63 |
+
- `grpc.max_connection_age_ms`
|
64 |
+
- `grpc.max_connection_age_grace_ms`
|
65 |
+
- `grpc.max_connection_idle_ms`
|
66 |
+
- `grpc.per_rpc_retry_buffer_size`
|
67 |
+
- `grpc.retry_buffer_size`
|
68 |
+
- `grpc.service_config_disable_resolution`
|
69 |
+
- `grpc.client_idle_timeout_ms`
|
70 |
+
- `grpc-node.max_session_memory`
|
71 |
+
- `grpc-node.tls_enable_trace`
|
72 |
+
- `grpc-node.retry_max_attempts_limit`
|
73 |
+
- `channelOverride`
|
74 |
+
- `channelFactoryOverride`
|
75 |
+
|
76 |
+
## Some Notes on API Guarantees
|
77 |
+
|
78 |
+
The public API of this library follows semantic versioning, with some caveats:
|
79 |
+
|
80 |
+
- Some methods are prefixed with an underscore. These methods are internal and should not be considered part of the public API.
|
81 |
+
- The class `Call` is only exposed due to limitations of TypeScript. It should not be considered part of the public API.
|
82 |
+
- In general, any API that is exposed by this library but is not exposed by the `grpc` library is likely an error and should not be considered part of the public API.
|
83 |
+
- The `grpc.experimental` namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update.
|
node_modules/@grpc/grpc-js/build/src/admin.d.ts
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { ServiceDefinition } from './make-client';
|
2 |
+
import { Server, UntypedServiceImplementation } from './server';
|
3 |
+
interface GetServiceDefinition {
|
4 |
+
(): ServiceDefinition;
|
5 |
+
}
|
6 |
+
interface GetHandlers {
|
7 |
+
(): UntypedServiceImplementation;
|
8 |
+
}
|
9 |
+
export declare function registerAdminService(getServiceDefinition: GetServiceDefinition, getHandlers: GetHandlers): void;
|
10 |
+
export declare function addAdminServicesToServer(server: Server): void;
|
11 |
+
export {};
|
node_modules/@grpc/grpc-js/build/src/admin.js
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2021 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.addAdminServicesToServer = exports.registerAdminService = void 0;
|
20 |
+
const registeredAdminServices = [];
|
21 |
+
function registerAdminService(getServiceDefinition, getHandlers) {
|
22 |
+
registeredAdminServices.push({ getServiceDefinition, getHandlers });
|
23 |
+
}
|
24 |
+
exports.registerAdminService = registerAdminService;
|
25 |
+
function addAdminServicesToServer(server) {
|
26 |
+
for (const { getServiceDefinition, getHandlers } of registeredAdminServices) {
|
27 |
+
server.addService(getServiceDefinition(), getHandlers());
|
28 |
+
}
|
29 |
+
}
|
30 |
+
exports.addAdminServicesToServer = addAdminServicesToServer;
|
31 |
+
//# sourceMappingURL=admin.js.map
|
node_modules/@grpc/grpc-js/build/src/admin.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/admin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAaH,MAAM,uBAAuB,GAGvB,EAAE,CAAC;AAET,SAAgB,oBAAoB,CAClC,oBAA0C,EAC1C,WAAwB;IAExB,uBAAuB,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC;AALD,oDAKC;AAED,SAAgB,wBAAwB,CAAC,MAAc;IACrD,KAAK,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,IAAI,uBAAuB,EAAE,CAAC;QAC5E,MAAM,CAAC,UAAU,CAAC,oBAAoB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC;AAJD,4DAIC"}
|
node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export interface BackoffOptions {
|
2 |
+
initialDelay?: number;
|
3 |
+
multiplier?: number;
|
4 |
+
jitter?: number;
|
5 |
+
maxDelay?: number;
|
6 |
+
}
|
7 |
+
export declare class BackoffTimeout {
|
8 |
+
private callback;
|
9 |
+
/**
|
10 |
+
* The delay time at the start, and after each reset.
|
11 |
+
*/
|
12 |
+
private readonly initialDelay;
|
13 |
+
/**
|
14 |
+
* The exponential backoff multiplier.
|
15 |
+
*/
|
16 |
+
private readonly multiplier;
|
17 |
+
/**
|
18 |
+
* The maximum delay time
|
19 |
+
*/
|
20 |
+
private readonly maxDelay;
|
21 |
+
/**
|
22 |
+
* The maximum fraction by which the delay time can randomly vary after
|
23 |
+
* applying the multiplier.
|
24 |
+
*/
|
25 |
+
private readonly jitter;
|
26 |
+
/**
|
27 |
+
* The delay time for the next time the timer runs.
|
28 |
+
*/
|
29 |
+
private nextDelay;
|
30 |
+
/**
|
31 |
+
* The handle of the underlying timer. If running is false, this value refers
|
32 |
+
* to an object representing a timer that has ended, but it can still be
|
33 |
+
* interacted with without error.
|
34 |
+
*/
|
35 |
+
private timerId;
|
36 |
+
/**
|
37 |
+
* Indicates whether the timer is currently running.
|
38 |
+
*/
|
39 |
+
private running;
|
40 |
+
/**
|
41 |
+
* Indicates whether the timer should keep the Node process running if no
|
42 |
+
* other async operation is doing so.
|
43 |
+
*/
|
44 |
+
private hasRef;
|
45 |
+
/**
|
46 |
+
* The time that the currently running timer was started. Only valid if
|
47 |
+
* running is true.
|
48 |
+
*/
|
49 |
+
private startTime;
|
50 |
+
/**
|
51 |
+
* The approximate time that the currently running timer will end. Only valid
|
52 |
+
* if running is true.
|
53 |
+
*/
|
54 |
+
private endTime;
|
55 |
+
constructor(callback: () => void, options?: BackoffOptions);
|
56 |
+
private runTimer;
|
57 |
+
/**
|
58 |
+
* Call the callback after the current amount of delay time
|
59 |
+
*/
|
60 |
+
runOnce(): void;
|
61 |
+
/**
|
62 |
+
* Stop the timer. The callback will not be called until `runOnce` is called
|
63 |
+
* again.
|
64 |
+
*/
|
65 |
+
stop(): void;
|
66 |
+
/**
|
67 |
+
* Reset the delay time to its initial value. If the timer is still running,
|
68 |
+
* retroactively apply that reset to the current timer.
|
69 |
+
*/
|
70 |
+
reset(): void;
|
71 |
+
/**
|
72 |
+
* Check whether the timer is currently running.
|
73 |
+
*/
|
74 |
+
isRunning(): boolean;
|
75 |
+
/**
|
76 |
+
* Set that while the timer is running, it should keep the Node process
|
77 |
+
* running.
|
78 |
+
*/
|
79 |
+
ref(): void;
|
80 |
+
/**
|
81 |
+
* Set that while the timer is running, it should not keep the Node process
|
82 |
+
* running.
|
83 |
+
*/
|
84 |
+
unref(): void;
|
85 |
+
/**
|
86 |
+
* Get the approximate timestamp of when the timer will fire. Only valid if
|
87 |
+
* this.isRunning() is true.
|
88 |
+
*/
|
89 |
+
getEndTime(): Date;
|
90 |
+
}
|
node_modules/@grpc/grpc-js/build/src/backoff-timeout.js
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.BackoffTimeout = void 0;
|
20 |
+
const INITIAL_BACKOFF_MS = 1000;
|
21 |
+
const BACKOFF_MULTIPLIER = 1.6;
|
22 |
+
const MAX_BACKOFF_MS = 120000;
|
23 |
+
const BACKOFF_JITTER = 0.2;
|
24 |
+
/**
|
25 |
+
* Get a number uniformly at random in the range [min, max)
|
26 |
+
* @param min
|
27 |
+
* @param max
|
28 |
+
*/
|
29 |
+
function uniformRandom(min, max) {
|
30 |
+
return Math.random() * (max - min) + min;
|
31 |
+
}
|
32 |
+
class BackoffTimeout {
|
33 |
+
constructor(callback, options) {
|
34 |
+
this.callback = callback;
|
35 |
+
/**
|
36 |
+
* The delay time at the start, and after each reset.
|
37 |
+
*/
|
38 |
+
this.initialDelay = INITIAL_BACKOFF_MS;
|
39 |
+
/**
|
40 |
+
* The exponential backoff multiplier.
|
41 |
+
*/
|
42 |
+
this.multiplier = BACKOFF_MULTIPLIER;
|
43 |
+
/**
|
44 |
+
* The maximum delay time
|
45 |
+
*/
|
46 |
+
this.maxDelay = MAX_BACKOFF_MS;
|
47 |
+
/**
|
48 |
+
* The maximum fraction by which the delay time can randomly vary after
|
49 |
+
* applying the multiplier.
|
50 |
+
*/
|
51 |
+
this.jitter = BACKOFF_JITTER;
|
52 |
+
/**
|
53 |
+
* Indicates whether the timer is currently running.
|
54 |
+
*/
|
55 |
+
this.running = false;
|
56 |
+
/**
|
57 |
+
* Indicates whether the timer should keep the Node process running if no
|
58 |
+
* other async operation is doing so.
|
59 |
+
*/
|
60 |
+
this.hasRef = true;
|
61 |
+
/**
|
62 |
+
* The time that the currently running timer was started. Only valid if
|
63 |
+
* running is true.
|
64 |
+
*/
|
65 |
+
this.startTime = new Date();
|
66 |
+
/**
|
67 |
+
* The approximate time that the currently running timer will end. Only valid
|
68 |
+
* if running is true.
|
69 |
+
*/
|
70 |
+
this.endTime = new Date();
|
71 |
+
if (options) {
|
72 |
+
if (options.initialDelay) {
|
73 |
+
this.initialDelay = options.initialDelay;
|
74 |
+
}
|
75 |
+
if (options.multiplier) {
|
76 |
+
this.multiplier = options.multiplier;
|
77 |
+
}
|
78 |
+
if (options.jitter) {
|
79 |
+
this.jitter = options.jitter;
|
80 |
+
}
|
81 |
+
if (options.maxDelay) {
|
82 |
+
this.maxDelay = options.maxDelay;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
this.nextDelay = this.initialDelay;
|
86 |
+
this.timerId = setTimeout(() => { }, 0);
|
87 |
+
clearTimeout(this.timerId);
|
88 |
+
}
|
89 |
+
runTimer(delay) {
|
90 |
+
var _a, _b;
|
91 |
+
this.endTime = this.startTime;
|
92 |
+
this.endTime.setMilliseconds(this.endTime.getMilliseconds() + this.nextDelay);
|
93 |
+
clearTimeout(this.timerId);
|
94 |
+
this.timerId = setTimeout(() => {
|
95 |
+
this.callback();
|
96 |
+
this.running = false;
|
97 |
+
}, delay);
|
98 |
+
if (!this.hasRef) {
|
99 |
+
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Call the callback after the current amount of delay time
|
104 |
+
*/
|
105 |
+
runOnce() {
|
106 |
+
this.running = true;
|
107 |
+
this.startTime = new Date();
|
108 |
+
this.runTimer(this.nextDelay);
|
109 |
+
const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay);
|
110 |
+
const jitterMagnitude = nextBackoff * this.jitter;
|
111 |
+
this.nextDelay =
|
112 |
+
nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude);
|
113 |
+
}
|
114 |
+
/**
|
115 |
+
* Stop the timer. The callback will not be called until `runOnce` is called
|
116 |
+
* again.
|
117 |
+
*/
|
118 |
+
stop() {
|
119 |
+
clearTimeout(this.timerId);
|
120 |
+
this.running = false;
|
121 |
+
}
|
122 |
+
/**
|
123 |
+
* Reset the delay time to its initial value. If the timer is still running,
|
124 |
+
* retroactively apply that reset to the current timer.
|
125 |
+
*/
|
126 |
+
reset() {
|
127 |
+
this.nextDelay = this.initialDelay;
|
128 |
+
if (this.running) {
|
129 |
+
const now = new Date();
|
130 |
+
const newEndTime = this.startTime;
|
131 |
+
newEndTime.setMilliseconds(newEndTime.getMilliseconds() + this.nextDelay);
|
132 |
+
clearTimeout(this.timerId);
|
133 |
+
if (now < newEndTime) {
|
134 |
+
this.runTimer(newEndTime.getTime() - now.getTime());
|
135 |
+
}
|
136 |
+
else {
|
137 |
+
this.running = false;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
/**
|
142 |
+
* Check whether the timer is currently running.
|
143 |
+
*/
|
144 |
+
isRunning() {
|
145 |
+
return this.running;
|
146 |
+
}
|
147 |
+
/**
|
148 |
+
* Set that while the timer is running, it should keep the Node process
|
149 |
+
* running.
|
150 |
+
*/
|
151 |
+
ref() {
|
152 |
+
var _a, _b;
|
153 |
+
this.hasRef = true;
|
154 |
+
(_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
155 |
+
}
|
156 |
+
/**
|
157 |
+
* Set that while the timer is running, it should not keep the Node process
|
158 |
+
* running.
|
159 |
+
*/
|
160 |
+
unref() {
|
161 |
+
var _a, _b;
|
162 |
+
this.hasRef = false;
|
163 |
+
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
164 |
+
}
|
165 |
+
/**
|
166 |
+
* Get the approximate timestamp of when the timer will fire. Only valid if
|
167 |
+
* this.isRunning() is true.
|
168 |
+
*/
|
169 |
+
getEndTime() {
|
170 |
+
return this.endTime;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
exports.BackoffTimeout = BackoffTimeout;
|
174 |
+
//# sourceMappingURL=backoff-timeout.js.map
|
node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"backoff-timeout.js","sourceRoot":"","sources":["../../src/backoff-timeout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;A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DED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Call } from './call-stream';
|
2 |
+
import { Channel } from './channel';
|
3 |
+
import { BaseFilter, Filter, FilterFactory } from './filter';
|
4 |
+
import { Metadata } from './metadata';
|
5 |
+
export declare class CallCredentialsFilter extends BaseFilter implements Filter {
|
6 |
+
private readonly channel;
|
7 |
+
private readonly stream;
|
8 |
+
private serviceUrl;
|
9 |
+
constructor(channel: Channel, stream: Call);
|
10 |
+
sendMetadata(metadata: Promise<Metadata>): Promise<Metadata>;
|
11 |
+
}
|
12 |
+
export declare class CallCredentialsFilterFactory implements FilterFactory<CallCredentialsFilter> {
|
13 |
+
private readonly channel;
|
14 |
+
constructor(channel: Channel);
|
15 |
+
createFilter(callStream: Call): CallCredentialsFilter;
|
16 |
+
}
|
node_modules/@grpc/grpc-js/build/src/call-credentials-filter.js
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.CallCredentialsFilterFactory = exports.CallCredentialsFilter = void 0;
|
20 |
+
const filter_1 = require("./filter");
|
21 |
+
const constants_1 = require("./constants");
|
22 |
+
const uri_parser_1 = require("./uri-parser");
|
23 |
+
const error_1 = require("./error");
|
24 |
+
class CallCredentialsFilter extends filter_1.BaseFilter {
|
25 |
+
constructor(channel, stream) {
|
26 |
+
var _a, _b;
|
27 |
+
super();
|
28 |
+
this.channel = channel;
|
29 |
+
this.stream = stream;
|
30 |
+
this.channel = channel;
|
31 |
+
this.stream = stream;
|
32 |
+
const splitPath = stream.getMethod().split('/');
|
33 |
+
let serviceName = '';
|
34 |
+
/* The standard path format is "/{serviceName}/{methodName}", so if we split
|
35 |
+
* by '/', the first item should be empty and the second should be the
|
36 |
+
* service name */
|
37 |
+
if (splitPath.length >= 2) {
|
38 |
+
serviceName = splitPath[1];
|
39 |
+
}
|
40 |
+
const hostname = (_b = (_a = (0, uri_parser_1.splitHostPort)(stream.getHost())) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : 'localhost';
|
41 |
+
/* Currently, call credentials are only allowed on HTTPS connections, so we
|
42 |
+
* can assume that the scheme is "https" */
|
43 |
+
this.serviceUrl = `https://${hostname}/${serviceName}`;
|
44 |
+
}
|
45 |
+
async sendMetadata(metadata) {
|
46 |
+
const credentials = this.stream.getCredentials();
|
47 |
+
const credsMetadata = credentials.generateMetadata({
|
48 |
+
service_url: this.serviceUrl,
|
49 |
+
});
|
50 |
+
const resultMetadata = await metadata;
|
51 |
+
try {
|
52 |
+
resultMetadata.merge(await credsMetadata);
|
53 |
+
}
|
54 |
+
catch (error) {
|
55 |
+
this.stream.cancelWithStatus(constants_1.Status.UNAUTHENTICATED, `Failed to retrieve auth metadata with error: ${(0, error_1.getErrorMessage)(error)}`);
|
56 |
+
return Promise.reject('Failed to retrieve auth metadata');
|
57 |
+
}
|
58 |
+
if (resultMetadata.get('authorization').length > 1) {
|
59 |
+
this.stream.cancelWithStatus(constants_1.Status.INTERNAL, '"authorization" metadata cannot have multiple values');
|
60 |
+
return Promise.reject('"authorization" metadata cannot have multiple values');
|
61 |
+
}
|
62 |
+
return resultMetadata;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
exports.CallCredentialsFilter = CallCredentialsFilter;
|
66 |
+
class CallCredentialsFilterFactory {
|
67 |
+
constructor(channel) {
|
68 |
+
this.channel = channel;
|
69 |
+
this.channel = channel;
|
70 |
+
}
|
71 |
+
createFilter(callStream) {
|
72 |
+
return new CallCredentialsFilter(this.channel, callStream);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
exports.CallCredentialsFilterFactory = CallCredentialsFilterFactory;
|
76 |
+
//# sourceMappingURL=call-credentials-filter.js.map
|
node_modules/@grpc/grpc-js/build/src/call-credentials-filter.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call-credentials-filter.js","sourceRoot":"","sources":["../../src/call-credentials-filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAIH,qCAA6D;AAE7D,2CAAqC;AACrC,6CAA6C;AAE7C,mCAA0C;AAE1C,MAAa,qBAAsB,SAAQ,mBAAU;IAEnD,YACmB,OAAgB,EAChB,MAAY;;QAE7B,KAAK,EAAE,CAAC;QAHS,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAM;QAG7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,SAAS,GAAa,MAAM,CAAC,SAAS,E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AED,MAAa,4BAA4B;IAEvC,YAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,UAAgB;QAC3B,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AATD,oEASC"}
|
node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Metadata } from './metadata';
|
2 |
+
export interface CallMetadataOptions {
|
3 |
+
method_name: string;
|
4 |
+
service_url: string;
|
5 |
+
}
|
6 |
+
export type CallMetadataGenerator = (options: CallMetadataOptions, cb: (err: Error | null, metadata?: Metadata) => void) => void;
|
7 |
+
export interface OldOAuth2Client {
|
8 |
+
getRequestMetadata: (url: string, callback: (err: Error | null, headers?: {
|
9 |
+
[index: string]: string;
|
10 |
+
}) => void) => void;
|
11 |
+
}
|
12 |
+
export interface CurrentOAuth2Client {
|
13 |
+
getRequestHeaders: (url?: string) => Promise<{
|
14 |
+
[index: string]: string;
|
15 |
+
}>;
|
16 |
+
}
|
17 |
+
export type OAuth2Client = OldOAuth2Client | CurrentOAuth2Client;
|
18 |
+
/**
|
19 |
+
* A class that represents a generic method of adding authentication-related
|
20 |
+
* metadata on a per-request basis.
|
21 |
+
*/
|
22 |
+
export declare abstract class CallCredentials {
|
23 |
+
/**
|
24 |
+
* Asynchronously generates a new Metadata object.
|
25 |
+
* @param options Options used in generating the Metadata object.
|
26 |
+
*/
|
27 |
+
abstract generateMetadata(options: CallMetadataOptions): Promise<Metadata>;
|
28 |
+
/**
|
29 |
+
* Creates a new CallCredentials object from properties of both this and
|
30 |
+
* another CallCredentials object. This object's metadata generator will be
|
31 |
+
* called first.
|
32 |
+
* @param callCredentials The other CallCredentials object.
|
33 |
+
*/
|
34 |
+
abstract compose(callCredentials: CallCredentials): CallCredentials;
|
35 |
+
/**
|
36 |
+
* Check whether two call credentials objects are equal. Separate
|
37 |
+
* SingleCallCredentials with identical metadata generator functions are
|
38 |
+
* equal.
|
39 |
+
* @param other The other CallCredentials object to compare with.
|
40 |
+
*/
|
41 |
+
abstract _equals(other: CallCredentials): boolean;
|
42 |
+
/**
|
43 |
+
* Creates a new CallCredentials object from a given function that generates
|
44 |
+
* Metadata objects.
|
45 |
+
* @param metadataGenerator A function that accepts a set of options, and
|
46 |
+
* generates a Metadata object based on these options, which is passed back
|
47 |
+
* to the caller via a supplied (err, metadata) callback.
|
48 |
+
*/
|
49 |
+
static createFromMetadataGenerator(metadataGenerator: CallMetadataGenerator): CallCredentials;
|
50 |
+
/**
|
51 |
+
* Create a gRPC credential from a Google credential object.
|
52 |
+
* @param googleCredentials The authentication client to use.
|
53 |
+
* @return The resulting CallCredentials object.
|
54 |
+
*/
|
55 |
+
static createFromGoogleCredential(googleCredentials: OAuth2Client): CallCredentials;
|
56 |
+
static createEmpty(): CallCredentials;
|
57 |
+
}
|
node_modules/@grpc/grpc-js/build/src/call-credentials.js
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.CallCredentials = void 0;
|
20 |
+
const metadata_1 = require("./metadata");
|
21 |
+
function isCurrentOauth2Client(client) {
|
22 |
+
return ('getRequestHeaders' in client &&
|
23 |
+
typeof client.getRequestHeaders === 'function');
|
24 |
+
}
|
25 |
+
/**
|
26 |
+
* A class that represents a generic method of adding authentication-related
|
27 |
+
* metadata on a per-request basis.
|
28 |
+
*/
|
29 |
+
class CallCredentials {
|
30 |
+
/**
|
31 |
+
* Creates a new CallCredentials object from a given function that generates
|
32 |
+
* Metadata objects.
|
33 |
+
* @param metadataGenerator A function that accepts a set of options, and
|
34 |
+
* generates a Metadata object based on these options, which is passed back
|
35 |
+
* to the caller via a supplied (err, metadata) callback.
|
36 |
+
*/
|
37 |
+
static createFromMetadataGenerator(metadataGenerator) {
|
38 |
+
return new SingleCallCredentials(metadataGenerator);
|
39 |
+
}
|
40 |
+
/**
|
41 |
+
* Create a gRPC credential from a Google credential object.
|
42 |
+
* @param googleCredentials The authentication client to use.
|
43 |
+
* @return The resulting CallCredentials object.
|
44 |
+
*/
|
45 |
+
static createFromGoogleCredential(googleCredentials) {
|
46 |
+
return CallCredentials.createFromMetadataGenerator((options, callback) => {
|
47 |
+
let getHeaders;
|
48 |
+
if (isCurrentOauth2Client(googleCredentials)) {
|
49 |
+
getHeaders = googleCredentials.getRequestHeaders(options.service_url);
|
50 |
+
}
|
51 |
+
else {
|
52 |
+
getHeaders = new Promise((resolve, reject) => {
|
53 |
+
googleCredentials.getRequestMetadata(options.service_url, (err, headers) => {
|
54 |
+
if (err) {
|
55 |
+
reject(err);
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
if (!headers) {
|
59 |
+
reject(new Error('Headers not set by metadata plugin'));
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
resolve(headers);
|
63 |
+
});
|
64 |
+
});
|
65 |
+
}
|
66 |
+
getHeaders.then(headers => {
|
67 |
+
const metadata = new metadata_1.Metadata();
|
68 |
+
for (const key of Object.keys(headers)) {
|
69 |
+
metadata.add(key, headers[key]);
|
70 |
+
}
|
71 |
+
callback(null, metadata);
|
72 |
+
}, err => {
|
73 |
+
callback(err);
|
74 |
+
});
|
75 |
+
});
|
76 |
+
}
|
77 |
+
static createEmpty() {
|
78 |
+
return new EmptyCallCredentials();
|
79 |
+
}
|
80 |
+
}
|
81 |
+
exports.CallCredentials = CallCredentials;
|
82 |
+
class ComposedCallCredentials extends CallCredentials {
|
83 |
+
constructor(creds) {
|
84 |
+
super();
|
85 |
+
this.creds = creds;
|
86 |
+
}
|
87 |
+
async generateMetadata(options) {
|
88 |
+
const base = new metadata_1.Metadata();
|
89 |
+
const generated = await Promise.all(this.creds.map(cred => cred.generateMetadata(options)));
|
90 |
+
for (const gen of generated) {
|
91 |
+
base.merge(gen);
|
92 |
+
}
|
93 |
+
return base;
|
94 |
+
}
|
95 |
+
compose(other) {
|
96 |
+
return new ComposedCallCredentials(this.creds.concat([other]));
|
97 |
+
}
|
98 |
+
_equals(other) {
|
99 |
+
if (this === other) {
|
100 |
+
return true;
|
101 |
+
}
|
102 |
+
if (other instanceof ComposedCallCredentials) {
|
103 |
+
return this.creds.every((value, index) => value._equals(other.creds[index]));
|
104 |
+
}
|
105 |
+
else {
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
class SingleCallCredentials extends CallCredentials {
|
111 |
+
constructor(metadataGenerator) {
|
112 |
+
super();
|
113 |
+
this.metadataGenerator = metadataGenerator;
|
114 |
+
}
|
115 |
+
generateMetadata(options) {
|
116 |
+
return new Promise((resolve, reject) => {
|
117 |
+
this.metadataGenerator(options, (err, metadata) => {
|
118 |
+
if (metadata !== undefined) {
|
119 |
+
resolve(metadata);
|
120 |
+
}
|
121 |
+
else {
|
122 |
+
reject(err);
|
123 |
+
}
|
124 |
+
});
|
125 |
+
});
|
126 |
+
}
|
127 |
+
compose(other) {
|
128 |
+
return new ComposedCallCredentials([this, other]);
|
129 |
+
}
|
130 |
+
_equals(other) {
|
131 |
+
if (this === other) {
|
132 |
+
return true;
|
133 |
+
}
|
134 |
+
if (other instanceof SingleCallCredentials) {
|
135 |
+
return this.metadataGenerator === other.metadataGenerator;
|
136 |
+
}
|
137 |
+
else {
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
class EmptyCallCredentials extends CallCredentials {
|
143 |
+
generateMetadata(options) {
|
144 |
+
return Promise.resolve(new metadata_1.Metadata());
|
145 |
+
}
|
146 |
+
compose(other) {
|
147 |
+
return other;
|
148 |
+
}
|
149 |
+
_equals(other) {
|
150 |
+
return other instanceof EmptyCallCredentials;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
//# sourceMappingURL=call-credentials.js.map
|
node_modules/@grpc/grpc-js/build/src/call-credentials.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call-credentials.js","sourceRoot":"","sources":["../../src/call-credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,yCAAsC;AAgCtC,SAAS,qBAAqB,CAC5B,MAAoB;IAEpB,OAAO,CACL,mBAAmB,IAAI,MAAM;QAC7B,OAAO,MAAM,CAAC,iBAAiB,KAAK,UAAU,CAC/C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAsB,eAAe;IAsBnC;;;;;;OAMG;IACH,MAAM,CAAC,2BAA2B,CAChC,iBAAwC;QAExC,OAAO,IAAI,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAC/B,iBAA+B;QAE/B,OAAO,eAAe,CAAC,2BAA2B,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;YACvE,IAAI,UAAgD,CAAC;YACrD,IAAI,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBAC7C,UAAU,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACxE,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC3C,iBAAiB,CAAC,kBAAkB,CAClC,OAAO,CAAC,WAAW,EACnB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;wBACf,IAAI,GAAG,EAAE,CAAC;4BACR,MAAM,CAAC,GAAG,CAAC,CAAC;4BACZ,OAAO;wBACT,CA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OAAO,CAAC,KAAsB;QAC5B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;YAC3C,OAAO,IAAI,CAAC,iBAAiB,KAAK,KAAK,CAAC,iBAAiB,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAED,MAAM,oBAAqB,SAAQ,eAAe;IAChD,gBAAgB,CAAC,OAA4B;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,mBAAQ,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,KAAK,YAAY,oBAAoB,CAAC;IAC/C,CAAC;CACF"}
|
node_modules/@grpc/grpc-js/build/src/call-interface.d.ts
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
import { CallCredentials } from './call-credentials';
|
3 |
+
import { Status } from './constants';
|
4 |
+
import { Deadline } from './deadline';
|
5 |
+
import { Metadata } from './metadata';
|
6 |
+
import { ServerSurfaceCall } from './server-call';
|
7 |
+
export interface CallStreamOptions {
|
8 |
+
deadline: Deadline;
|
9 |
+
flags: number;
|
10 |
+
host: string;
|
11 |
+
parentCall: ServerSurfaceCall | null;
|
12 |
+
}
|
13 |
+
export type PartialCallStreamOptions = Partial<CallStreamOptions>;
|
14 |
+
export interface StatusObject {
|
15 |
+
code: Status;
|
16 |
+
details: string;
|
17 |
+
metadata: Metadata;
|
18 |
+
}
|
19 |
+
export type PartialStatusObject = Pick<StatusObject, 'code' | 'details'> & {
|
20 |
+
metadata?: Metadata | null | undefined;
|
21 |
+
};
|
22 |
+
export declare const enum WriteFlags {
|
23 |
+
BufferHint = 1,
|
24 |
+
NoCompress = 2,
|
25 |
+
WriteThrough = 4
|
26 |
+
}
|
27 |
+
export interface WriteObject {
|
28 |
+
message: Buffer;
|
29 |
+
flags?: number;
|
30 |
+
}
|
31 |
+
export interface MetadataListener {
|
32 |
+
(metadata: Metadata, next: (metadata: Metadata) => void): void;
|
33 |
+
}
|
34 |
+
export interface MessageListener {
|
35 |
+
(message: any, next: (message: any) => void): void;
|
36 |
+
}
|
37 |
+
export interface StatusListener {
|
38 |
+
(status: StatusObject, next: (status: StatusObject) => void): void;
|
39 |
+
}
|
40 |
+
export interface FullListener {
|
41 |
+
onReceiveMetadata: MetadataListener;
|
42 |
+
onReceiveMessage: MessageListener;
|
43 |
+
onReceiveStatus: StatusListener;
|
44 |
+
}
|
45 |
+
export type Listener = Partial<FullListener>;
|
46 |
+
/**
|
47 |
+
* An object with methods for handling the responses to a call.
|
48 |
+
*/
|
49 |
+
export interface InterceptingListener {
|
50 |
+
onReceiveMetadata(metadata: Metadata): void;
|
51 |
+
onReceiveMessage(message: any): void;
|
52 |
+
onReceiveStatus(status: StatusObject): void;
|
53 |
+
}
|
54 |
+
export declare function isInterceptingListener(listener: Listener | InterceptingListener): listener is InterceptingListener;
|
55 |
+
export declare class InterceptingListenerImpl implements InterceptingListener {
|
56 |
+
private listener;
|
57 |
+
private nextListener;
|
58 |
+
private processingMetadata;
|
59 |
+
private hasPendingMessage;
|
60 |
+
private pendingMessage;
|
61 |
+
private processingMessage;
|
62 |
+
private pendingStatus;
|
63 |
+
constructor(listener: FullListener, nextListener: InterceptingListener);
|
64 |
+
private processPendingMessage;
|
65 |
+
private processPendingStatus;
|
66 |
+
onReceiveMetadata(metadata: Metadata): void;
|
67 |
+
onReceiveMessage(message: any): void;
|
68 |
+
onReceiveStatus(status: StatusObject): void;
|
69 |
+
}
|
70 |
+
export interface WriteCallback {
|
71 |
+
(error?: Error | null): void;
|
72 |
+
}
|
73 |
+
export interface MessageContext {
|
74 |
+
callback?: WriteCallback;
|
75 |
+
flags?: number;
|
76 |
+
}
|
77 |
+
export interface Call {
|
78 |
+
cancelWithStatus(status: Status, details: string): void;
|
79 |
+
getPeer(): string;
|
80 |
+
start(metadata: Metadata, listener: InterceptingListener): void;
|
81 |
+
sendMessageWithContext(context: MessageContext, message: Buffer): void;
|
82 |
+
startRead(): void;
|
83 |
+
halfClose(): void;
|
84 |
+
getCallNumber(): number;
|
85 |
+
setCredentials(credentials: CallCredentials): void;
|
86 |
+
}
|
87 |
+
export interface DeadlineInfoProvider {
|
88 |
+
getDeadlineInfo(): string[];
|
89 |
+
}
|
node_modules/@grpc/grpc-js/build/src/call-interface.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2022 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.InterceptingListenerImpl = exports.isInterceptingListener = void 0;
|
20 |
+
function isInterceptingListener(listener) {
|
21 |
+
return (listener.onReceiveMetadata !== undefined &&
|
22 |
+
listener.onReceiveMetadata.length === 1);
|
23 |
+
}
|
24 |
+
exports.isInterceptingListener = isInterceptingListener;
|
25 |
+
class InterceptingListenerImpl {
|
26 |
+
constructor(listener, nextListener) {
|
27 |
+
this.listener = listener;
|
28 |
+
this.nextListener = nextListener;
|
29 |
+
this.processingMetadata = false;
|
30 |
+
this.hasPendingMessage = false;
|
31 |
+
this.processingMessage = false;
|
32 |
+
this.pendingStatus = null;
|
33 |
+
}
|
34 |
+
processPendingMessage() {
|
35 |
+
if (this.hasPendingMessage) {
|
36 |
+
this.nextListener.onReceiveMessage(this.pendingMessage);
|
37 |
+
this.pendingMessage = null;
|
38 |
+
this.hasPendingMessage = false;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
processPendingStatus() {
|
42 |
+
if (this.pendingStatus) {
|
43 |
+
this.nextListener.onReceiveStatus(this.pendingStatus);
|
44 |
+
}
|
45 |
+
}
|
46 |
+
onReceiveMetadata(metadata) {
|
47 |
+
this.processingMetadata = true;
|
48 |
+
this.listener.onReceiveMetadata(metadata, metadata => {
|
49 |
+
this.processingMetadata = false;
|
50 |
+
this.nextListener.onReceiveMetadata(metadata);
|
51 |
+
this.processPendingMessage();
|
52 |
+
this.processPendingStatus();
|
53 |
+
});
|
54 |
+
}
|
55 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
56 |
+
onReceiveMessage(message) {
|
57 |
+
/* If this listener processes messages asynchronously, the last message may
|
58 |
+
* be reordered with respect to the status */
|
59 |
+
this.processingMessage = true;
|
60 |
+
this.listener.onReceiveMessage(message, msg => {
|
61 |
+
this.processingMessage = false;
|
62 |
+
if (this.processingMetadata) {
|
63 |
+
this.pendingMessage = msg;
|
64 |
+
this.hasPendingMessage = true;
|
65 |
+
}
|
66 |
+
else {
|
67 |
+
this.nextListener.onReceiveMessage(msg);
|
68 |
+
this.processPendingStatus();
|
69 |
+
}
|
70 |
+
});
|
71 |
+
}
|
72 |
+
onReceiveStatus(status) {
|
73 |
+
this.listener.onReceiveStatus(status, processedStatus => {
|
74 |
+
if (this.processingMetadata || this.processingMessage) {
|
75 |
+
this.pendingStatus = processedStatus;
|
76 |
+
}
|
77 |
+
else {
|
78 |
+
this.nextListener.onReceiveStatus(processedStatus);
|
79 |
+
}
|
80 |
+
});
|
81 |
+
}
|
82 |
+
}
|
83 |
+
exports.InterceptingListenerImpl = InterceptingListenerImpl;
|
84 |
+
//# sourceMappingURL=call-interface.js.map
|
node_modules/@grpc/grpc-js/build/src/call-interface.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call-interface.js","sourceRoot":"","sources":["../../src/call-interface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAqEH,SAAgB,sBAAsB,CACpC,QAAyC;IAEzC,OAAO,CACL,QAAQ,CAAC,iBAAiB,KAAK,SAAS;QACxC,QAAQ,CAAC,iBAAiB,CAAC,MAAM,KAAK,CAAC,CACxC,CAAC;AACJ,CAAC;AAPD,wDAOC;AAED,MAAa,wBAAwB;IAMnC,YACU,Q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YAC/B,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;gBAC1B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;gBACxC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACD,eAAe,CAAC,MAAoB;QAClC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE;YACtD,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACtD,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;YACrD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA3DD,4DA2DC"}
|
node_modules/@grpc/grpc-js/build/src/call-number.d.ts
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
export declare function getNextCallNumber(): number;
|
node_modules/@grpc/grpc-js/build/src/call-number.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2022 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.getNextCallNumber = void 0;
|
20 |
+
let nextCallNumber = 0;
|
21 |
+
function getNextCallNumber() {
|
22 |
+
return nextCallNumber++;
|
23 |
+
}
|
24 |
+
exports.getNextCallNumber = getNextCallNumber;
|
25 |
+
//# sourceMappingURL=call-number.js.map
|
node_modules/@grpc/grpc-js/build/src/call-number.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call-number.js","sourceRoot":"","sources":["../../src/call-number.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB,SAAgB,iBAAiB;IAC/B,OAAO,cAAc,EAAE,CAAC;AAC1B,CAAC;AAFD,8CAEC"}
|
node_modules/@grpc/grpc-js/build/src/call-stream.d.ts
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
/// <reference types="node" />
|
3 |
+
import * as http2 from 'http2';
|
4 |
+
import { CallCredentials } from './call-credentials';
|
5 |
+
import { Status } from './constants';
|
6 |
+
import { Filter } from './filter';
|
7 |
+
import { FilterStackFactory, FilterStack } from './filter-stack';
|
8 |
+
import { Metadata } from './metadata';
|
9 |
+
import { ChannelImplementation } from './channel';
|
10 |
+
import { SubchannelCallStatsTracker, Subchannel } from './subchannel';
|
11 |
+
import { ServerSurfaceCall } from './server-call';
|
12 |
+
export type Deadline = Date | number;
|
13 |
+
export interface CallStreamOptions {
|
14 |
+
deadline: Deadline;
|
15 |
+
flags: number;
|
16 |
+
host: string;
|
17 |
+
parentCall: ServerSurfaceCall | null;
|
18 |
+
}
|
19 |
+
export type PartialCallStreamOptions = Partial<CallStreamOptions>;
|
20 |
+
export interface StatusObject {
|
21 |
+
code: Status;
|
22 |
+
details: string;
|
23 |
+
metadata: Metadata;
|
24 |
+
}
|
25 |
+
export declare const enum WriteFlags {
|
26 |
+
BufferHint = 1,
|
27 |
+
NoCompress = 2,
|
28 |
+
WriteThrough = 4
|
29 |
+
}
|
30 |
+
export interface WriteObject {
|
31 |
+
message: Buffer;
|
32 |
+
flags?: number;
|
33 |
+
}
|
34 |
+
export interface MetadataListener {
|
35 |
+
(metadata: Metadata, next: (metadata: Metadata) => void): void;
|
36 |
+
}
|
37 |
+
export interface MessageListener {
|
38 |
+
(message: any, next: (message: any) => void): void;
|
39 |
+
}
|
40 |
+
export interface StatusListener {
|
41 |
+
(status: StatusObject, next: (status: StatusObject) => void): void;
|
42 |
+
}
|
43 |
+
export interface FullListener {
|
44 |
+
onReceiveMetadata: MetadataListener;
|
45 |
+
onReceiveMessage: MessageListener;
|
46 |
+
onReceiveStatus: StatusListener;
|
47 |
+
}
|
48 |
+
export type Listener = Partial<FullListener>;
|
49 |
+
/**
|
50 |
+
* An object with methods for handling the responses to a call.
|
51 |
+
*/
|
52 |
+
export interface InterceptingListener {
|
53 |
+
onReceiveMetadata(metadata: Metadata): void;
|
54 |
+
onReceiveMessage(message: any): void;
|
55 |
+
onReceiveStatus(status: StatusObject): void;
|
56 |
+
}
|
57 |
+
export declare function isInterceptingListener(listener: Listener | InterceptingListener): listener is InterceptingListener;
|
58 |
+
export declare class InterceptingListenerImpl implements InterceptingListener {
|
59 |
+
private listener;
|
60 |
+
private nextListener;
|
61 |
+
private processingMetadata;
|
62 |
+
private hasPendingMessage;
|
63 |
+
private pendingMessage;
|
64 |
+
private processingMessage;
|
65 |
+
private pendingStatus;
|
66 |
+
constructor(listener: FullListener, nextListener: InterceptingListener);
|
67 |
+
private processPendingMessage;
|
68 |
+
private processPendingStatus;
|
69 |
+
onReceiveMetadata(metadata: Metadata): void;
|
70 |
+
onReceiveMessage(message: any): void;
|
71 |
+
onReceiveStatus(status: StatusObject): void;
|
72 |
+
}
|
73 |
+
export interface WriteCallback {
|
74 |
+
(error?: Error | null): void;
|
75 |
+
}
|
76 |
+
export interface MessageContext {
|
77 |
+
callback?: WriteCallback;
|
78 |
+
flags?: number;
|
79 |
+
}
|
80 |
+
export interface Call {
|
81 |
+
cancelWithStatus(status: Status, details: string): void;
|
82 |
+
getPeer(): string;
|
83 |
+
start(metadata: Metadata, listener: InterceptingListener): void;
|
84 |
+
sendMessageWithContext(context: MessageContext, message: Buffer): void;
|
85 |
+
startRead(): void;
|
86 |
+
halfClose(): void;
|
87 |
+
getDeadline(): Deadline;
|
88 |
+
getCredentials(): CallCredentials;
|
89 |
+
setCredentials(credentials: CallCredentials): void;
|
90 |
+
getMethod(): string;
|
91 |
+
getHost(): string;
|
92 |
+
}
|
93 |
+
export declare class Http2CallStream implements Call {
|
94 |
+
private readonly methodName;
|
95 |
+
private readonly channel;
|
96 |
+
private readonly options;
|
97 |
+
private readonly channelCallCredentials;
|
98 |
+
private readonly callNumber;
|
99 |
+
credentials: CallCredentials;
|
100 |
+
filterStack: FilterStack;
|
101 |
+
private http2Stream;
|
102 |
+
private pendingRead;
|
103 |
+
private isWriteFilterPending;
|
104 |
+
private pendingWrite;
|
105 |
+
private pendingWriteCallback;
|
106 |
+
private writesClosed;
|
107 |
+
private decoder;
|
108 |
+
private isReadFilterPending;
|
109 |
+
private canPush;
|
110 |
+
/**
|
111 |
+
* Indicates that an 'end' event has come from the http2 stream, so there
|
112 |
+
* will be no more data events.
|
113 |
+
*/
|
114 |
+
private readsClosed;
|
115 |
+
private statusOutput;
|
116 |
+
private unpushedReadMessages;
|
117 |
+
private unfilteredReadMessages;
|
118 |
+
private mappedStatusCode;
|
119 |
+
private finalStatus;
|
120 |
+
private subchannel;
|
121 |
+
private disconnectListener;
|
122 |
+
private listener;
|
123 |
+
private internalError;
|
124 |
+
private configDeadline;
|
125 |
+
private statusWatchers;
|
126 |
+
private streamEndWatchers;
|
127 |
+
private callStatsTracker;
|
128 |
+
constructor(methodName: string, channel: ChannelImplementation, options: CallStreamOptions, filterStackFactory: FilterStackFactory, channelCallCredentials: CallCredentials, callNumber: number);
|
129 |
+
private outputStatus;
|
130 |
+
private trace;
|
131 |
+
/**
|
132 |
+
* On first call, emits a 'status' event with the given StatusObject.
|
133 |
+
* Subsequent calls are no-ops.
|
134 |
+
* @param status The status of the call.
|
135 |
+
*/
|
136 |
+
private endCall;
|
137 |
+
private maybeOutputStatus;
|
138 |
+
private push;
|
139 |
+
private handleFilterError;
|
140 |
+
private handleFilteredRead;
|
141 |
+
private filterReceivedMessage;
|
142 |
+
private tryPush;
|
143 |
+
private handleTrailers;
|
144 |
+
private writeMessageToStream;
|
145 |
+
attachHttp2Stream(stream: http2.ClientHttp2Stream, subchannel: Subchannel, extraFilters: Filter[], callStatsTracker: SubchannelCallStatsTracker): void;
|
146 |
+
start(metadata: Metadata, listener: InterceptingListener): void;
|
147 |
+
private destroyHttp2Stream;
|
148 |
+
cancelWithStatus(status: Status, details: string): void;
|
149 |
+
getDeadline(): Deadline;
|
150 |
+
getCredentials(): CallCredentials;
|
151 |
+
setCredentials(credentials: CallCredentials): void;
|
152 |
+
getStatus(): StatusObject | null;
|
153 |
+
getPeer(): string;
|
154 |
+
getMethod(): string;
|
155 |
+
getHost(): string;
|
156 |
+
setConfigDeadline(configDeadline: Deadline): void;
|
157 |
+
addStatusWatcher(watcher: (status: StatusObject) => void): void;
|
158 |
+
addStreamEndWatcher(watcher: (success: boolean) => void): void;
|
159 |
+
addFilters(extraFilters: Filter[]): void;
|
160 |
+
getCallNumber(): number;
|
161 |
+
startRead(): void;
|
162 |
+
private maybeCloseWrites;
|
163 |
+
sendMessageWithContext(context: MessageContext, message: Buffer): void;
|
164 |
+
halfClose(): void;
|
165 |
+
}
|
node_modules/@grpc/grpc-js/build/src/call-stream.js
ADDED
@@ -0,0 +1,686 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.Http2CallStream = exports.InterceptingListenerImpl = exports.isInterceptingListener = void 0;
|
20 |
+
const http2 = require("http2");
|
21 |
+
const os = require("os");
|
22 |
+
const constants_1 = require("./constants");
|
23 |
+
const metadata_1 = require("./metadata");
|
24 |
+
const stream_decoder_1 = require("./stream-decoder");
|
25 |
+
const logging = require("./logging");
|
26 |
+
const constants_2 = require("./constants");
|
27 |
+
const error_1 = require("./error");
|
28 |
+
const TRACER_NAME = 'call_stream';
|
29 |
+
const { HTTP2_HEADER_STATUS, HTTP2_HEADER_CONTENT_TYPE, NGHTTP2_CANCEL, } = http2.constants;
|
30 |
+
/**
|
31 |
+
* Should do approximately the same thing as util.getSystemErrorName but the
|
32 |
+
* TypeScript types don't have that function for some reason so I just made my
|
33 |
+
* own.
|
34 |
+
* @param errno
|
35 |
+
*/
|
36 |
+
function getSystemErrorName(errno) {
|
37 |
+
for (const [name, num] of Object.entries(os.constants.errno)) {
|
38 |
+
if (num === errno) {
|
39 |
+
return name;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
return 'Unknown system error ' + errno;
|
43 |
+
}
|
44 |
+
function getMinDeadline(deadlineList) {
|
45 |
+
let minValue = Infinity;
|
46 |
+
for (const deadline of deadlineList) {
|
47 |
+
const deadlineMsecs = deadline instanceof Date ? deadline.getTime() : deadline;
|
48 |
+
if (deadlineMsecs < minValue) {
|
49 |
+
minValue = deadlineMsecs;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
return minValue;
|
53 |
+
}
|
54 |
+
function isInterceptingListener(listener) {
|
55 |
+
return (listener.onReceiveMetadata !== undefined &&
|
56 |
+
listener.onReceiveMetadata.length === 1);
|
57 |
+
}
|
58 |
+
exports.isInterceptingListener = isInterceptingListener;
|
59 |
+
class InterceptingListenerImpl {
|
60 |
+
constructor(listener, nextListener) {
|
61 |
+
this.listener = listener;
|
62 |
+
this.nextListener = nextListener;
|
63 |
+
this.processingMetadata = false;
|
64 |
+
this.hasPendingMessage = false;
|
65 |
+
this.processingMessage = false;
|
66 |
+
this.pendingStatus = null;
|
67 |
+
}
|
68 |
+
processPendingMessage() {
|
69 |
+
if (this.hasPendingMessage) {
|
70 |
+
this.nextListener.onReceiveMessage(this.pendingMessage);
|
71 |
+
this.pendingMessage = null;
|
72 |
+
this.hasPendingMessage = false;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
processPendingStatus() {
|
76 |
+
if (this.pendingStatus) {
|
77 |
+
this.nextListener.onReceiveStatus(this.pendingStatus);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
onReceiveMetadata(metadata) {
|
81 |
+
this.processingMetadata = true;
|
82 |
+
this.listener.onReceiveMetadata(metadata, (metadata) => {
|
83 |
+
this.processingMetadata = false;
|
84 |
+
this.nextListener.onReceiveMetadata(metadata);
|
85 |
+
this.processPendingMessage();
|
86 |
+
this.processPendingStatus();
|
87 |
+
});
|
88 |
+
}
|
89 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
90 |
+
onReceiveMessage(message) {
|
91 |
+
/* If this listener processes messages asynchronously, the last message may
|
92 |
+
* be reordered with respect to the status */
|
93 |
+
this.processingMessage = true;
|
94 |
+
this.listener.onReceiveMessage(message, (msg) => {
|
95 |
+
this.processingMessage = false;
|
96 |
+
if (this.processingMetadata) {
|
97 |
+
this.pendingMessage = msg;
|
98 |
+
this.hasPendingMessage = true;
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
this.nextListener.onReceiveMessage(msg);
|
102 |
+
this.processPendingStatus();
|
103 |
+
}
|
104 |
+
});
|
105 |
+
}
|
106 |
+
onReceiveStatus(status) {
|
107 |
+
this.listener.onReceiveStatus(status, (processedStatus) => {
|
108 |
+
if (this.processingMetadata || this.processingMessage) {
|
109 |
+
this.pendingStatus = processedStatus;
|
110 |
+
}
|
111 |
+
else {
|
112 |
+
this.nextListener.onReceiveStatus(processedStatus);
|
113 |
+
}
|
114 |
+
});
|
115 |
+
}
|
116 |
+
}
|
117 |
+
exports.InterceptingListenerImpl = InterceptingListenerImpl;
|
118 |
+
class Http2CallStream {
|
119 |
+
constructor(methodName, channel, options, filterStackFactory, channelCallCredentials, callNumber) {
|
120 |
+
this.methodName = methodName;
|
121 |
+
this.channel = channel;
|
122 |
+
this.options = options;
|
123 |
+
this.channelCallCredentials = channelCallCredentials;
|
124 |
+
this.callNumber = callNumber;
|
125 |
+
this.http2Stream = null;
|
126 |
+
this.pendingRead = false;
|
127 |
+
this.isWriteFilterPending = false;
|
128 |
+
this.pendingWrite = null;
|
129 |
+
this.pendingWriteCallback = null;
|
130 |
+
this.writesClosed = false;
|
131 |
+
this.decoder = new stream_decoder_1.StreamDecoder();
|
132 |
+
this.isReadFilterPending = false;
|
133 |
+
this.canPush = false;
|
134 |
+
/**
|
135 |
+
* Indicates that an 'end' event has come from the http2 stream, so there
|
136 |
+
* will be no more data events.
|
137 |
+
*/
|
138 |
+
this.readsClosed = false;
|
139 |
+
this.statusOutput = false;
|
140 |
+
this.unpushedReadMessages = [];
|
141 |
+
this.unfilteredReadMessages = [];
|
142 |
+
// Status code mapped from :status. To be used if grpc-status is not received
|
143 |
+
this.mappedStatusCode = constants_1.Status.UNKNOWN;
|
144 |
+
// This is populated (non-null) if and only if the call has ended
|
145 |
+
this.finalStatus = null;
|
146 |
+
this.subchannel = null;
|
147 |
+
this.listener = null;
|
148 |
+
this.internalError = null;
|
149 |
+
this.configDeadline = Infinity;
|
150 |
+
this.statusWatchers = [];
|
151 |
+
this.streamEndWatchers = [];
|
152 |
+
this.callStatsTracker = null;
|
153 |
+
this.filterStack = filterStackFactory.createFilter(this);
|
154 |
+
this.credentials = channelCallCredentials;
|
155 |
+
this.disconnectListener = () => {
|
156 |
+
this.endCall({
|
157 |
+
code: constants_1.Status.UNAVAILABLE,
|
158 |
+
details: 'Connection dropped',
|
159 |
+
metadata: new metadata_1.Metadata(),
|
160 |
+
});
|
161 |
+
};
|
162 |
+
if (this.options.parentCall &&
|
163 |
+
this.options.flags & constants_1.Propagate.CANCELLATION) {
|
164 |
+
this.options.parentCall.on('cancelled', () => {
|
165 |
+
this.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled by parent call');
|
166 |
+
});
|
167 |
+
}
|
168 |
+
}
|
169 |
+
outputStatus() {
|
170 |
+
/* Precondition: this.finalStatus !== null */
|
171 |
+
if (this.listener && !this.statusOutput) {
|
172 |
+
this.statusOutput = true;
|
173 |
+
const filteredStatus = this.filterStack.receiveTrailers(this.finalStatus);
|
174 |
+
this.trace('ended with status: code=' +
|
175 |
+
filteredStatus.code +
|
176 |
+
' details="' +
|
177 |
+
filteredStatus.details +
|
178 |
+
'"');
|
179 |
+
this.statusWatchers.forEach(watcher => watcher(filteredStatus));
|
180 |
+
/* We delay the actual action of bubbling up the status to insulate the
|
181 |
+
* cleanup code in this class from any errors that may be thrown in the
|
182 |
+
* upper layers as a result of bubbling up the status. In particular,
|
183 |
+
* if the status is not OK, the "error" event may be emitted
|
184 |
+
* synchronously at the top level, which will result in a thrown error if
|
185 |
+
* the user does not handle that event. */
|
186 |
+
process.nextTick(() => {
|
187 |
+
var _a;
|
188 |
+
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(filteredStatus);
|
189 |
+
});
|
190 |
+
if (this.subchannel) {
|
191 |
+
this.subchannel.callUnref();
|
192 |
+
this.subchannel.removeDisconnectListener(this.disconnectListener);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
trace(text) {
|
197 |
+
logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text);
|
198 |
+
}
|
199 |
+
/**
|
200 |
+
* On first call, emits a 'status' event with the given StatusObject.
|
201 |
+
* Subsequent calls are no-ops.
|
202 |
+
* @param status The status of the call.
|
203 |
+
*/
|
204 |
+
endCall(status) {
|
205 |
+
/* If the status is OK and a new status comes in (e.g. from a
|
206 |
+
* deserialization failure), that new status takes priority */
|
207 |
+
if (this.finalStatus === null || this.finalStatus.code === constants_1.Status.OK) {
|
208 |
+
this.finalStatus = status;
|
209 |
+
this.maybeOutputStatus();
|
210 |
+
}
|
211 |
+
this.destroyHttp2Stream();
|
212 |
+
}
|
213 |
+
maybeOutputStatus() {
|
214 |
+
if (this.finalStatus !== null) {
|
215 |
+
/* The combination check of readsClosed and that the two message buffer
|
216 |
+
* arrays are empty checks that there all incoming data has been fully
|
217 |
+
* processed */
|
218 |
+
if (this.finalStatus.code !== constants_1.Status.OK ||
|
219 |
+
(this.readsClosed &&
|
220 |
+
this.unpushedReadMessages.length === 0 &&
|
221 |
+
this.unfilteredReadMessages.length === 0 &&
|
222 |
+
!this.isReadFilterPending)) {
|
223 |
+
this.outputStatus();
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
push(message) {
|
228 |
+
this.trace('pushing to reader message of length ' +
|
229 |
+
(message instanceof Buffer ? message.length : null));
|
230 |
+
this.canPush = false;
|
231 |
+
process.nextTick(() => {
|
232 |
+
var _a;
|
233 |
+
/* If we have already output the status any later messages should be
|
234 |
+
* ignored, and can cause out-of-order operation errors higher up in the
|
235 |
+
* stack. Checking as late as possible here to avoid any race conditions.
|
236 |
+
*/
|
237 |
+
if (this.statusOutput) {
|
238 |
+
return;
|
239 |
+
}
|
240 |
+
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveMessage(message);
|
241 |
+
this.maybeOutputStatus();
|
242 |
+
});
|
243 |
+
}
|
244 |
+
handleFilterError(error) {
|
245 |
+
this.cancelWithStatus(constants_1.Status.INTERNAL, error.message);
|
246 |
+
}
|
247 |
+
handleFilteredRead(message) {
|
248 |
+
/* If we the call has already ended with an error, we don't want to do
|
249 |
+
* anything with this message. Dropping it on the floor is correct
|
250 |
+
* behavior */
|
251 |
+
if (this.finalStatus !== null && this.finalStatus.code !== constants_1.Status.OK) {
|
252 |
+
this.maybeOutputStatus();
|
253 |
+
return;
|
254 |
+
}
|
255 |
+
this.isReadFilterPending = false;
|
256 |
+
if (this.canPush) {
|
257 |
+
this.http2Stream.pause();
|
258 |
+
this.push(message);
|
259 |
+
}
|
260 |
+
else {
|
261 |
+
this.trace('unpushedReadMessages.push message of length ' + message.length);
|
262 |
+
this.unpushedReadMessages.push(message);
|
263 |
+
}
|
264 |
+
if (this.unfilteredReadMessages.length > 0) {
|
265 |
+
/* nextMessage is guaranteed not to be undefined because
|
266 |
+
unfilteredReadMessages is non-empty */
|
267 |
+
const nextMessage = this.unfilteredReadMessages.shift();
|
268 |
+
this.filterReceivedMessage(nextMessage);
|
269 |
+
}
|
270 |
+
}
|
271 |
+
filterReceivedMessage(framedMessage) {
|
272 |
+
/* If we the call has already ended with an error, we don't want to do
|
273 |
+
* anything with this message. Dropping it on the floor is correct
|
274 |
+
* behavior */
|
275 |
+
if (this.finalStatus !== null && this.finalStatus.code !== constants_1.Status.OK) {
|
276 |
+
this.maybeOutputStatus();
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
this.trace('filterReceivedMessage of length ' + framedMessage.length);
|
280 |
+
this.isReadFilterPending = true;
|
281 |
+
this.filterStack
|
282 |
+
.receiveMessage(Promise.resolve(framedMessage))
|
283 |
+
.then(this.handleFilteredRead.bind(this), this.handleFilterError.bind(this));
|
284 |
+
}
|
285 |
+
tryPush(messageBytes) {
|
286 |
+
if (this.isReadFilterPending) {
|
287 |
+
this.trace('unfilteredReadMessages.push message of length ' +
|
288 |
+
(messageBytes && messageBytes.length));
|
289 |
+
this.unfilteredReadMessages.push(messageBytes);
|
290 |
+
}
|
291 |
+
else {
|
292 |
+
this.filterReceivedMessage(messageBytes);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
handleTrailers(headers) {
|
296 |
+
this.streamEndWatchers.forEach(watcher => watcher(true));
|
297 |
+
let headersString = '';
|
298 |
+
for (const header of Object.keys(headers)) {
|
299 |
+
headersString += '\t\t' + header + ': ' + headers[header] + '\n';
|
300 |
+
}
|
301 |
+
this.trace('Received server trailers:\n' + headersString);
|
302 |
+
let metadata;
|
303 |
+
try {
|
304 |
+
metadata = metadata_1.Metadata.fromHttp2Headers(headers);
|
305 |
+
}
|
306 |
+
catch (e) {
|
307 |
+
metadata = new metadata_1.Metadata();
|
308 |
+
}
|
309 |
+
const metadataMap = metadata.getMap();
|
310 |
+
let code = this.mappedStatusCode;
|
311 |
+
if (code === constants_1.Status.UNKNOWN &&
|
312 |
+
typeof metadataMap['grpc-status'] === 'string') {
|
313 |
+
const receivedStatus = Number(metadataMap['grpc-status']);
|
314 |
+
if (receivedStatus in constants_1.Status) {
|
315 |
+
code = receivedStatus;
|
316 |
+
this.trace('received status code ' + receivedStatus + ' from server');
|
317 |
+
}
|
318 |
+
metadata.remove('grpc-status');
|
319 |
+
}
|
320 |
+
let details = '';
|
321 |
+
if (typeof metadataMap['grpc-message'] === 'string') {
|
322 |
+
details = decodeURI(metadataMap['grpc-message']);
|
323 |
+
metadata.remove('grpc-message');
|
324 |
+
this.trace('received status details string "' + details + '" from server');
|
325 |
+
}
|
326 |
+
const status = { code, details, metadata };
|
327 |
+
// This is a no-op if the call was already ended when handling headers.
|
328 |
+
this.endCall(status);
|
329 |
+
}
|
330 |
+
writeMessageToStream(message, callback) {
|
331 |
+
var _a;
|
332 |
+
(_a = this.callStatsTracker) === null || _a === void 0 ? void 0 : _a.addMessageSent();
|
333 |
+
this.http2Stream.write(message, callback);
|
334 |
+
}
|
335 |
+
attachHttp2Stream(stream, subchannel, extraFilters, callStatsTracker) {
|
336 |
+
this.filterStack.push(extraFilters);
|
337 |
+
if (this.finalStatus !== null) {
|
338 |
+
stream.close(NGHTTP2_CANCEL);
|
339 |
+
}
|
340 |
+
else {
|
341 |
+
this.trace('attachHttp2Stream from subchannel ' + subchannel.getAddress());
|
342 |
+
this.http2Stream = stream;
|
343 |
+
this.subchannel = subchannel;
|
344 |
+
this.callStatsTracker = callStatsTracker;
|
345 |
+
subchannel.addDisconnectListener(this.disconnectListener);
|
346 |
+
subchannel.callRef();
|
347 |
+
stream.on('response', (headers, flags) => {
|
348 |
+
var _a;
|
349 |
+
let headersString = '';
|
350 |
+
for (const header of Object.keys(headers)) {
|
351 |
+
headersString += '\t\t' + header + ': ' + headers[header] + '\n';
|
352 |
+
}
|
353 |
+
this.trace('Received server headers:\n' + headersString);
|
354 |
+
switch (headers[':status']) {
|
355 |
+
// TODO(murgatroid99): handle 100 and 101
|
356 |
+
case 400:
|
357 |
+
this.mappedStatusCode = constants_1.Status.INTERNAL;
|
358 |
+
break;
|
359 |
+
case 401:
|
360 |
+
this.mappedStatusCode = constants_1.Status.UNAUTHENTICATED;
|
361 |
+
break;
|
362 |
+
case 403:
|
363 |
+
this.mappedStatusCode = constants_1.Status.PERMISSION_DENIED;
|
364 |
+
break;
|
365 |
+
case 404:
|
366 |
+
this.mappedStatusCode = constants_1.Status.UNIMPLEMENTED;
|
367 |
+
break;
|
368 |
+
case 429:
|
369 |
+
case 502:
|
370 |
+
case 503:
|
371 |
+
case 504:
|
372 |
+
this.mappedStatusCode = constants_1.Status.UNAVAILABLE;
|
373 |
+
break;
|
374 |
+
default:
|
375 |
+
this.mappedStatusCode = constants_1.Status.UNKNOWN;
|
376 |
+
}
|
377 |
+
if (flags & http2.constants.NGHTTP2_FLAG_END_STREAM) {
|
378 |
+
this.handleTrailers(headers);
|
379 |
+
}
|
380 |
+
else {
|
381 |
+
let metadata;
|
382 |
+
try {
|
383 |
+
metadata = metadata_1.Metadata.fromHttp2Headers(headers);
|
384 |
+
}
|
385 |
+
catch (error) {
|
386 |
+
this.endCall({
|
387 |
+
code: constants_1.Status.UNKNOWN,
|
388 |
+
details: (0, error_1.getErrorMessage)(error),
|
389 |
+
metadata: new metadata_1.Metadata(),
|
390 |
+
});
|
391 |
+
return;
|
392 |
+
}
|
393 |
+
try {
|
394 |
+
const finalMetadata = this.filterStack.receiveMetadata(metadata);
|
395 |
+
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveMetadata(finalMetadata);
|
396 |
+
}
|
397 |
+
catch (error) {
|
398 |
+
this.endCall({
|
399 |
+
code: constants_1.Status.UNKNOWN,
|
400 |
+
details: (0, error_1.getErrorMessage)(error),
|
401 |
+
metadata: new metadata_1.Metadata(),
|
402 |
+
});
|
403 |
+
}
|
404 |
+
}
|
405 |
+
});
|
406 |
+
stream.on('trailers', this.handleTrailers.bind(this));
|
407 |
+
stream.on('data', (data) => {
|
408 |
+
this.trace('receive HTTP/2 data frame of length ' + data.length);
|
409 |
+
const messages = this.decoder.write(data);
|
410 |
+
for (const message of messages) {
|
411 |
+
this.trace('parsed message of length ' + message.length);
|
412 |
+
this.callStatsTracker.addMessageReceived();
|
413 |
+
this.tryPush(message);
|
414 |
+
}
|
415 |
+
});
|
416 |
+
stream.on('end', () => {
|
417 |
+
this.readsClosed = true;
|
418 |
+
this.maybeOutputStatus();
|
419 |
+
});
|
420 |
+
stream.on('close', () => {
|
421 |
+
/* Use process.next tick to ensure that this code happens after any
|
422 |
+
* "error" event that may be emitted at about the same time, so that
|
423 |
+
* we can bubble up the error message from that event. */
|
424 |
+
process.nextTick(() => {
|
425 |
+
var _a;
|
426 |
+
this.trace('HTTP/2 stream closed with code ' + stream.rstCode);
|
427 |
+
/* If we have a final status with an OK status code, that means that
|
428 |
+
* we have received all of the messages and we have processed the
|
429 |
+
* trailers and the call completed successfully, so it doesn't matter
|
430 |
+
* how the stream ends after that */
|
431 |
+
if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
let code;
|
435 |
+
let details = '';
|
436 |
+
switch (stream.rstCode) {
|
437 |
+
case http2.constants.NGHTTP2_NO_ERROR:
|
438 |
+
/* If we get a NO_ERROR code and we already have a status, the
|
439 |
+
* stream completed properly and we just haven't fully processed
|
440 |
+
* it yet */
|
441 |
+
if (this.finalStatus !== null) {
|
442 |
+
return;
|
443 |
+
}
|
444 |
+
code = constants_1.Status.INTERNAL;
|
445 |
+
details = `Received RST_STREAM with code ${stream.rstCode}`;
|
446 |
+
break;
|
447 |
+
case http2.constants.NGHTTP2_REFUSED_STREAM:
|
448 |
+
code = constants_1.Status.UNAVAILABLE;
|
449 |
+
details = 'Stream refused by server';
|
450 |
+
break;
|
451 |
+
case http2.constants.NGHTTP2_CANCEL:
|
452 |
+
code = constants_1.Status.CANCELLED;
|
453 |
+
details = 'Call cancelled';
|
454 |
+
break;
|
455 |
+
case http2.constants.NGHTTP2_ENHANCE_YOUR_CALM:
|
456 |
+
code = constants_1.Status.RESOURCE_EXHAUSTED;
|
457 |
+
details = 'Bandwidth exhausted or memory limit exceeded';
|
458 |
+
break;
|
459 |
+
case http2.constants.NGHTTP2_INADEQUATE_SECURITY:
|
460 |
+
code = constants_1.Status.PERMISSION_DENIED;
|
461 |
+
details = 'Protocol not secure enough';
|
462 |
+
break;
|
463 |
+
case http2.constants.NGHTTP2_INTERNAL_ERROR:
|
464 |
+
code = constants_1.Status.INTERNAL;
|
465 |
+
if (this.internalError === null) {
|
466 |
+
/* This error code was previously handled in the default case, and
|
467 |
+
* there are several instances of it online, so I wanted to
|
468 |
+
* preserve the original error message so that people find existing
|
469 |
+
* information in searches, but also include the more recognizable
|
470 |
+
* "Internal server error" message. */
|
471 |
+
details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`;
|
472 |
+
}
|
473 |
+
else {
|
474 |
+
if (this.internalError.code === 'ECONNRESET' || this.internalError.code === 'ETIMEDOUT') {
|
475 |
+
code = constants_1.Status.UNAVAILABLE;
|
476 |
+
details = this.internalError.message;
|
477 |
+
}
|
478 |
+
else {
|
479 |
+
/* The "Received RST_STREAM with code ..." error is preserved
|
480 |
+
* here for continuity with errors reported online, but the
|
481 |
+
* error message at the end will probably be more relevant in
|
482 |
+
* most cases. */
|
483 |
+
details = `Received RST_STREAM with code ${stream.rstCode} triggered by internal client error: ${this.internalError.message}`;
|
484 |
+
}
|
485 |
+
}
|
486 |
+
break;
|
487 |
+
default:
|
488 |
+
code = constants_1.Status.INTERNAL;
|
489 |
+
details = `Received RST_STREAM with code ${stream.rstCode}`;
|
490 |
+
}
|
491 |
+
// This is a no-op if trailers were received at all.
|
492 |
+
// This is OK, because status codes emitted here correspond to more
|
493 |
+
// catastrophic issues that prevent us from receiving trailers in the
|
494 |
+
// first place.
|
495 |
+
this.endCall({ code, details, metadata: new metadata_1.Metadata() });
|
496 |
+
});
|
497 |
+
});
|
498 |
+
stream.on('error', (err) => {
|
499 |
+
/* We need an error handler here to stop "Uncaught Error" exceptions
|
500 |
+
* from bubbling up. However, errors here should all correspond to
|
501 |
+
* "close" events, where we will handle the error more granularly */
|
502 |
+
/* Specifically looking for stream errors that were *not* constructed
|
503 |
+
* from a RST_STREAM response here:
|
504 |
+
* https://github.com/nodejs/node/blob/8b8620d580314050175983402dfddf2674e8e22a/lib/internal/http2/core.js#L2267
|
505 |
+
*/
|
506 |
+
if (err.code !== 'ERR_HTTP2_STREAM_ERROR') {
|
507 |
+
this.trace('Node error event: message=' +
|
508 |
+
err.message +
|
509 |
+
' code=' +
|
510 |
+
err.code +
|
511 |
+
' errno=' +
|
512 |
+
getSystemErrorName(err.errno) +
|
513 |
+
' syscall=' +
|
514 |
+
err.syscall);
|
515 |
+
this.internalError = err;
|
516 |
+
}
|
517 |
+
this.streamEndWatchers.forEach(watcher => watcher(false));
|
518 |
+
});
|
519 |
+
if (!this.pendingRead) {
|
520 |
+
stream.pause();
|
521 |
+
}
|
522 |
+
if (this.pendingWrite) {
|
523 |
+
if (!this.pendingWriteCallback) {
|
524 |
+
throw new Error('Invalid state in write handling code');
|
525 |
+
}
|
526 |
+
this.trace('sending data chunk of length ' +
|
527 |
+
this.pendingWrite.length +
|
528 |
+
' (deferred)');
|
529 |
+
try {
|
530 |
+
this.writeMessageToStream(this.pendingWrite, this.pendingWriteCallback);
|
531 |
+
}
|
532 |
+
catch (error) {
|
533 |
+
this.endCall({
|
534 |
+
code: constants_1.Status.UNAVAILABLE,
|
535 |
+
details: `Write failed with error ${(0, error_1.getErrorMessage)(error)}`,
|
536 |
+
metadata: new metadata_1.Metadata()
|
537 |
+
});
|
538 |
+
}
|
539 |
+
}
|
540 |
+
this.maybeCloseWrites();
|
541 |
+
}
|
542 |
+
}
|
543 |
+
start(metadata, listener) {
|
544 |
+
this.trace('Sending metadata');
|
545 |
+
this.listener = listener;
|
546 |
+
this.channel._startCallStream(this, metadata);
|
547 |
+
this.maybeOutputStatus();
|
548 |
+
}
|
549 |
+
destroyHttp2Stream() {
|
550 |
+
var _a;
|
551 |
+
// The http2 stream could already have been destroyed if cancelWithStatus
|
552 |
+
// is called in response to an internal http2 error.
|
553 |
+
if (this.http2Stream !== null && !this.http2Stream.destroyed) {
|
554 |
+
/* If the call has ended with an OK status, communicate that when closing
|
555 |
+
* the stream, partly to avoid a situation in which we detect an error
|
556 |
+
* RST_STREAM as a result after we have the status */
|
557 |
+
let code;
|
558 |
+
if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) {
|
559 |
+
code = http2.constants.NGHTTP2_NO_ERROR;
|
560 |
+
}
|
561 |
+
else {
|
562 |
+
code = http2.constants.NGHTTP2_CANCEL;
|
563 |
+
}
|
564 |
+
this.trace('close http2 stream with code ' + code);
|
565 |
+
this.http2Stream.close(code);
|
566 |
+
}
|
567 |
+
}
|
568 |
+
cancelWithStatus(status, details) {
|
569 |
+
this.trace('cancelWithStatus code: ' + status + ' details: "' + details + '"');
|
570 |
+
this.endCall({ code: status, details, metadata: new metadata_1.Metadata() });
|
571 |
+
}
|
572 |
+
getDeadline() {
|
573 |
+
const deadlineList = [this.options.deadline];
|
574 |
+
if (this.options.parentCall && this.options.flags & constants_1.Propagate.DEADLINE) {
|
575 |
+
deadlineList.push(this.options.parentCall.getDeadline());
|
576 |
+
}
|
577 |
+
if (this.configDeadline) {
|
578 |
+
deadlineList.push(this.configDeadline);
|
579 |
+
}
|
580 |
+
return getMinDeadline(deadlineList);
|
581 |
+
}
|
582 |
+
getCredentials() {
|
583 |
+
return this.credentials;
|
584 |
+
}
|
585 |
+
setCredentials(credentials) {
|
586 |
+
this.credentials = this.channelCallCredentials.compose(credentials);
|
587 |
+
}
|
588 |
+
getStatus() {
|
589 |
+
return this.finalStatus;
|
590 |
+
}
|
591 |
+
getPeer() {
|
592 |
+
var _a, _b;
|
593 |
+
return (_b = (_a = this.subchannel) === null || _a === void 0 ? void 0 : _a.getAddress()) !== null && _b !== void 0 ? _b : this.channel.getTarget();
|
594 |
+
}
|
595 |
+
getMethod() {
|
596 |
+
return this.methodName;
|
597 |
+
}
|
598 |
+
getHost() {
|
599 |
+
return this.options.host;
|
600 |
+
}
|
601 |
+
setConfigDeadline(configDeadline) {
|
602 |
+
this.configDeadline = configDeadline;
|
603 |
+
}
|
604 |
+
addStatusWatcher(watcher) {
|
605 |
+
this.statusWatchers.push(watcher);
|
606 |
+
}
|
607 |
+
addStreamEndWatcher(watcher) {
|
608 |
+
this.streamEndWatchers.push(watcher);
|
609 |
+
}
|
610 |
+
addFilters(extraFilters) {
|
611 |
+
this.filterStack.push(extraFilters);
|
612 |
+
}
|
613 |
+
getCallNumber() {
|
614 |
+
return this.callNumber;
|
615 |
+
}
|
616 |
+
startRead() {
|
617 |
+
/* If the stream has ended with an error, we should not emit any more
|
618 |
+
* messages and we should communicate that the stream has ended */
|
619 |
+
if (this.finalStatus !== null && this.finalStatus.code !== constants_1.Status.OK) {
|
620 |
+
this.readsClosed = true;
|
621 |
+
this.maybeOutputStatus();
|
622 |
+
return;
|
623 |
+
}
|
624 |
+
this.canPush = true;
|
625 |
+
if (this.http2Stream === null) {
|
626 |
+
this.pendingRead = true;
|
627 |
+
}
|
628 |
+
else {
|
629 |
+
if (this.unpushedReadMessages.length > 0) {
|
630 |
+
const nextMessage = this.unpushedReadMessages.shift();
|
631 |
+
this.push(nextMessage);
|
632 |
+
return;
|
633 |
+
}
|
634 |
+
/* Only resume reading from the http2Stream if we don't have any pending
|
635 |
+
* messages to emit */
|
636 |
+
this.http2Stream.resume();
|
637 |
+
}
|
638 |
+
}
|
639 |
+
maybeCloseWrites() {
|
640 |
+
if (this.writesClosed &&
|
641 |
+
!this.isWriteFilterPending &&
|
642 |
+
this.http2Stream !== null) {
|
643 |
+
this.trace('calling end() on HTTP/2 stream');
|
644 |
+
this.http2Stream.end();
|
645 |
+
}
|
646 |
+
}
|
647 |
+
sendMessageWithContext(context, message) {
|
648 |
+
var _a;
|
649 |
+
this.trace('write() called with message of length ' + message.length);
|
650 |
+
const writeObj = {
|
651 |
+
message,
|
652 |
+
flags: context.flags,
|
653 |
+
};
|
654 |
+
const cb = (_a = context.callback) !== null && _a !== void 0 ? _a : (() => { });
|
655 |
+
this.isWriteFilterPending = true;
|
656 |
+
this.filterStack.sendMessage(Promise.resolve(writeObj)).then((message) => {
|
657 |
+
this.isWriteFilterPending = false;
|
658 |
+
if (this.http2Stream === null) {
|
659 |
+
this.trace('deferring writing data chunk of length ' + message.message.length);
|
660 |
+
this.pendingWrite = message.message;
|
661 |
+
this.pendingWriteCallback = cb;
|
662 |
+
}
|
663 |
+
else {
|
664 |
+
this.trace('sending data chunk of length ' + message.message.length);
|
665 |
+
try {
|
666 |
+
this.writeMessageToStream(message.message, cb);
|
667 |
+
}
|
668 |
+
catch (error) {
|
669 |
+
this.endCall({
|
670 |
+
code: constants_1.Status.UNAVAILABLE,
|
671 |
+
details: `Write failed with error ${(0, error_1.getErrorMessage)(error)}`,
|
672 |
+
metadata: new metadata_1.Metadata()
|
673 |
+
});
|
674 |
+
}
|
675 |
+
this.maybeCloseWrites();
|
676 |
+
}
|
677 |
+
}, this.handleFilterError.bind(this));
|
678 |
+
}
|
679 |
+
halfClose() {
|
680 |
+
this.trace('end() called');
|
681 |
+
this.writesClosed = true;
|
682 |
+
this.maybeCloseWrites();
|
683 |
+
}
|
684 |
+
}
|
685 |
+
exports.Http2CallStream = Http2CallStream;
|
686 |
+
//# sourceMappingURL=call-stream.js.map
|
node_modules/@grpc/grpc-js/build/src/call-stream.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call-stream.js","sourceRoot":"","sources":["../../src/call-stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,+BAA+B;AAC/B,yBAAyB;AAGzB,2CAAgD;AAGhD,yCAAsC;AACtC,qDAAiD;AAGjD,qCAAqC;AACrC,2CAA2C;AAE3C,mCAA0C;AAE1C,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,MAAM,EACJ,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,GACf,GAAG,KAAK,CAAC,SAAS,CAAC;AAiBpB;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACvC,KAAK,MAAM,CAAC,IAAI,EAAE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I,mBAAQ,EAAE;qBACzB,CAAC,CAAC;iBACJ;gBACD,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACzB;QACH,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;CACF;AA7nBD,0CA6nBC"}
|
node_modules/@grpc/grpc-js/build/src/call.d.ts
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
/// <reference types="node" />
|
3 |
+
/// <reference types="node" />
|
4 |
+
import { EventEmitter } from 'events';
|
5 |
+
import { Duplex, Readable, Writable } from 'stream';
|
6 |
+
import { StatusObject } from './call-interface';
|
7 |
+
import { EmitterAugmentation1 } from './events';
|
8 |
+
import { Metadata } from './metadata';
|
9 |
+
import { ObjectReadable, ObjectWritable, WriteCallback } from './object-stream';
|
10 |
+
import { InterceptingCallInterface } from './client-interceptors';
|
11 |
+
/**
|
12 |
+
* A type extending the built-in Error object with additional fields.
|
13 |
+
*/
|
14 |
+
export type ServiceError = StatusObject & Error;
|
15 |
+
/**
|
16 |
+
* A base type for all user-facing values returned by client-side method calls.
|
17 |
+
*/
|
18 |
+
export type SurfaceCall = {
|
19 |
+
call?: InterceptingCallInterface;
|
20 |
+
cancel(): void;
|
21 |
+
getPeer(): string;
|
22 |
+
} & EmitterAugmentation1<'metadata', Metadata> & EmitterAugmentation1<'status', StatusObject> & EventEmitter;
|
23 |
+
/**
|
24 |
+
* A type representing the return value of a unary method call.
|
25 |
+
*/
|
26 |
+
export type ClientUnaryCall = SurfaceCall;
|
27 |
+
/**
|
28 |
+
* A type representing the return value of a server stream method call.
|
29 |
+
*/
|
30 |
+
export type ClientReadableStream<ResponseType> = {
|
31 |
+
deserialize: (chunk: Buffer) => ResponseType;
|
32 |
+
} & SurfaceCall & ObjectReadable<ResponseType>;
|
33 |
+
/**
|
34 |
+
* A type representing the return value of a client stream method call.
|
35 |
+
*/
|
36 |
+
export type ClientWritableStream<RequestType> = {
|
37 |
+
serialize: (value: RequestType) => Buffer;
|
38 |
+
} & SurfaceCall & ObjectWritable<RequestType>;
|
39 |
+
/**
|
40 |
+
* A type representing the return value of a bidirectional stream method call.
|
41 |
+
*/
|
42 |
+
export type ClientDuplexStream<RequestType, ResponseType> = ClientWritableStream<RequestType> & ClientReadableStream<ResponseType>;
|
43 |
+
/**
|
44 |
+
* Construct a ServiceError from a StatusObject. This function exists primarily
|
45 |
+
* as an attempt to make the error stack trace clearly communicate that the
|
46 |
+
* error is not necessarily a problem in gRPC itself.
|
47 |
+
* @param status
|
48 |
+
*/
|
49 |
+
export declare function callErrorFromStatus(status: StatusObject, callerStack: string): ServiceError;
|
50 |
+
export declare class ClientUnaryCallImpl extends EventEmitter implements ClientUnaryCall {
|
51 |
+
call?: InterceptingCallInterface;
|
52 |
+
constructor();
|
53 |
+
cancel(): void;
|
54 |
+
getPeer(): string;
|
55 |
+
}
|
56 |
+
export declare class ClientReadableStreamImpl<ResponseType> extends Readable implements ClientReadableStream<ResponseType> {
|
57 |
+
readonly deserialize: (chunk: Buffer) => ResponseType;
|
58 |
+
call?: InterceptingCallInterface;
|
59 |
+
constructor(deserialize: (chunk: Buffer) => ResponseType);
|
60 |
+
cancel(): void;
|
61 |
+
getPeer(): string;
|
62 |
+
_read(_size: number): void;
|
63 |
+
}
|
64 |
+
export declare class ClientWritableStreamImpl<RequestType> extends Writable implements ClientWritableStream<RequestType> {
|
65 |
+
readonly serialize: (value: RequestType) => Buffer;
|
66 |
+
call?: InterceptingCallInterface;
|
67 |
+
constructor(serialize: (value: RequestType) => Buffer);
|
68 |
+
cancel(): void;
|
69 |
+
getPeer(): string;
|
70 |
+
_write(chunk: RequestType, encoding: string, cb: WriteCallback): void;
|
71 |
+
_final(cb: Function): void;
|
72 |
+
}
|
73 |
+
export declare class ClientDuplexStreamImpl<RequestType, ResponseType> extends Duplex implements ClientDuplexStream<RequestType, ResponseType> {
|
74 |
+
readonly serialize: (value: RequestType) => Buffer;
|
75 |
+
readonly deserialize: (chunk: Buffer) => ResponseType;
|
76 |
+
call?: InterceptingCallInterface;
|
77 |
+
constructor(serialize: (value: RequestType) => Buffer, deserialize: (chunk: Buffer) => ResponseType);
|
78 |
+
cancel(): void;
|
79 |
+
getPeer(): string;
|
80 |
+
_read(_size: number): void;
|
81 |
+
_write(chunk: RequestType, encoding: string, cb: WriteCallback): void;
|
82 |
+
_final(cb: Function): void;
|
83 |
+
}
|
node_modules/@grpc/grpc-js/build/src/call.js
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.ClientDuplexStreamImpl = exports.ClientWritableStreamImpl = exports.ClientReadableStreamImpl = exports.ClientUnaryCallImpl = exports.callErrorFromStatus = void 0;
|
20 |
+
const events_1 = require("events");
|
21 |
+
const stream_1 = require("stream");
|
22 |
+
const constants_1 = require("./constants");
|
23 |
+
/**
|
24 |
+
* Construct a ServiceError from a StatusObject. This function exists primarily
|
25 |
+
* as an attempt to make the error stack trace clearly communicate that the
|
26 |
+
* error is not necessarily a problem in gRPC itself.
|
27 |
+
* @param status
|
28 |
+
*/
|
29 |
+
function callErrorFromStatus(status, callerStack) {
|
30 |
+
const message = `${status.code} ${constants_1.Status[status.code]}: ${status.details}`;
|
31 |
+
const error = new Error(message);
|
32 |
+
const stack = `${error.stack}\nfor call at\n${callerStack}`;
|
33 |
+
return Object.assign(new Error(message), status, { stack });
|
34 |
+
}
|
35 |
+
exports.callErrorFromStatus = callErrorFromStatus;
|
36 |
+
class ClientUnaryCallImpl extends events_1.EventEmitter {
|
37 |
+
constructor() {
|
38 |
+
super();
|
39 |
+
}
|
40 |
+
cancel() {
|
41 |
+
var _a;
|
42 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');
|
43 |
+
}
|
44 |
+
getPeer() {
|
45 |
+
var _a, _b;
|
46 |
+
return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
exports.ClientUnaryCallImpl = ClientUnaryCallImpl;
|
50 |
+
class ClientReadableStreamImpl extends stream_1.Readable {
|
51 |
+
constructor(deserialize) {
|
52 |
+
super({ objectMode: true });
|
53 |
+
this.deserialize = deserialize;
|
54 |
+
}
|
55 |
+
cancel() {
|
56 |
+
var _a;
|
57 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');
|
58 |
+
}
|
59 |
+
getPeer() {
|
60 |
+
var _a, _b;
|
61 |
+
return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';
|
62 |
+
}
|
63 |
+
_read(_size) {
|
64 |
+
var _a;
|
65 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead();
|
66 |
+
}
|
67 |
+
}
|
68 |
+
exports.ClientReadableStreamImpl = ClientReadableStreamImpl;
|
69 |
+
class ClientWritableStreamImpl extends stream_1.Writable {
|
70 |
+
constructor(serialize) {
|
71 |
+
super({ objectMode: true });
|
72 |
+
this.serialize = serialize;
|
73 |
+
}
|
74 |
+
cancel() {
|
75 |
+
var _a;
|
76 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');
|
77 |
+
}
|
78 |
+
getPeer() {
|
79 |
+
var _a, _b;
|
80 |
+
return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';
|
81 |
+
}
|
82 |
+
_write(chunk, encoding, cb) {
|
83 |
+
var _a;
|
84 |
+
const context = {
|
85 |
+
callback: cb,
|
86 |
+
};
|
87 |
+
const flags = Number(encoding);
|
88 |
+
if (!Number.isNaN(flags)) {
|
89 |
+
context.flags = flags;
|
90 |
+
}
|
91 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
|
92 |
+
}
|
93 |
+
_final(cb) {
|
94 |
+
var _a;
|
95 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose();
|
96 |
+
cb();
|
97 |
+
}
|
98 |
+
}
|
99 |
+
exports.ClientWritableStreamImpl = ClientWritableStreamImpl;
|
100 |
+
class ClientDuplexStreamImpl extends stream_1.Duplex {
|
101 |
+
constructor(serialize, deserialize) {
|
102 |
+
super({ objectMode: true });
|
103 |
+
this.serialize = serialize;
|
104 |
+
this.deserialize = deserialize;
|
105 |
+
}
|
106 |
+
cancel() {
|
107 |
+
var _a;
|
108 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');
|
109 |
+
}
|
110 |
+
getPeer() {
|
111 |
+
var _a, _b;
|
112 |
+
return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';
|
113 |
+
}
|
114 |
+
_read(_size) {
|
115 |
+
var _a;
|
116 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead();
|
117 |
+
}
|
118 |
+
_write(chunk, encoding, cb) {
|
119 |
+
var _a;
|
120 |
+
const context = {
|
121 |
+
callback: cb,
|
122 |
+
};
|
123 |
+
const flags = Number(encoding);
|
124 |
+
if (!Number.isNaN(flags)) {
|
125 |
+
context.flags = flags;
|
126 |
+
}
|
127 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
|
128 |
+
}
|
129 |
+
_final(cb) {
|
130 |
+
var _a;
|
131 |
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose();
|
132 |
+
cb();
|
133 |
+
}
|
134 |
+
}
|
135 |
+
exports.ClientDuplexStreamImpl = ClientDuplexStreamImpl;
|
136 |
+
//# sourceMappingURL=call.js.map
|
node_modules/@grpc/grpc-js/build/src/call.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,mCAAsC;AACtC,mCAAoD;AAGpD,2CAAqC;AAiDrC;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,MAAoB,EACpB,WAAmB;IAEnB,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,kBAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;IAC3E,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,kBAAkB,WAAW,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9D,CAAC;AARD,kDAQC;AAED,MAAa,mBACX,SAAQ,qBAAY;IAIpB;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,MAAM;;QACJ,MAAA,IAAI,CAAC,IAAI,0CAAE,gBAAgB,CAAC,kBAAM,CAAC,SAAS,EAAE,q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AM,CAAC,EAAY;;QACjB,MAAA,IAAI,CAAC,IAAI,0CAAE,SAAS,EAAE,CAAC;QACvB,EAAE,EAAE,CAAC;IACP,CAAC;CACF;AAvCD,wDAuCC"}
|
node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
export interface CaCertificateUpdate {
|
3 |
+
caCertificate: Buffer;
|
4 |
+
}
|
5 |
+
export interface IdentityCertificateUpdate {
|
6 |
+
certificate: Buffer;
|
7 |
+
privateKey: Buffer;
|
8 |
+
}
|
9 |
+
export interface CaCertificateUpdateListener {
|
10 |
+
(update: CaCertificateUpdate | null): void;
|
11 |
+
}
|
12 |
+
export interface IdentityCertificateUpdateListener {
|
13 |
+
(update: IdentityCertificateUpdate | null): void;
|
14 |
+
}
|
15 |
+
export interface CertificateProvider {
|
16 |
+
addCaCertificateListener(listener: CaCertificateUpdateListener): void;
|
17 |
+
removeCaCertificateListener(listener: CaCertificateUpdateListener): void;
|
18 |
+
addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void;
|
19 |
+
removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void;
|
20 |
+
}
|
21 |
+
export interface FileWatcherCertificateProviderConfig {
|
22 |
+
certificateFile?: string | undefined;
|
23 |
+
privateKeyFile?: string | undefined;
|
24 |
+
caCertificateFile?: string | undefined;
|
25 |
+
refreshIntervalMs: number;
|
26 |
+
}
|
27 |
+
export declare class FileWatcherCertificateProvider implements CertificateProvider {
|
28 |
+
private config;
|
29 |
+
private refreshTimer;
|
30 |
+
private fileResultPromise;
|
31 |
+
private latestCaUpdate;
|
32 |
+
private caListeners;
|
33 |
+
private latestIdentityUpdate;
|
34 |
+
private identityListeners;
|
35 |
+
private lastUpdateTime;
|
36 |
+
constructor(config: FileWatcherCertificateProviderConfig);
|
37 |
+
private updateCertificates;
|
38 |
+
private maybeStartWatchingFiles;
|
39 |
+
private maybeStopWatchingFiles;
|
40 |
+
addCaCertificateListener(listener: CaCertificateUpdateListener): void;
|
41 |
+
removeCaCertificateListener(listener: CaCertificateUpdateListener): void;
|
42 |
+
addIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void;
|
43 |
+
removeIdentityCertificateListener(listener: IdentityCertificateUpdateListener): void;
|
44 |
+
}
|
node_modules/@grpc/grpc-js/build/src/certificate-provider.js
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2024 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.FileWatcherCertificateProvider = void 0;
|
20 |
+
const fs = require("fs");
|
21 |
+
const logging = require("./logging");
|
22 |
+
const constants_1 = require("./constants");
|
23 |
+
const util_1 = require("util");
|
24 |
+
const TRACER_NAME = 'certificate_provider';
|
25 |
+
function trace(text) {
|
26 |
+
logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
|
27 |
+
}
|
28 |
+
const readFilePromise = (0, util_1.promisify)(fs.readFile);
|
29 |
+
class FileWatcherCertificateProvider {
|
30 |
+
constructor(config) {
|
31 |
+
this.config = config;
|
32 |
+
this.refreshTimer = null;
|
33 |
+
this.fileResultPromise = null;
|
34 |
+
this.latestCaUpdate = null;
|
35 |
+
this.caListeners = new Set();
|
36 |
+
this.latestIdentityUpdate = null;
|
37 |
+
this.identityListeners = new Set();
|
38 |
+
this.lastUpdateTime = null;
|
39 |
+
if ((config.certificateFile === undefined) !== (config.privateKeyFile === undefined)) {
|
40 |
+
throw new Error('certificateFile and privateKeyFile must be set or unset together');
|
41 |
+
}
|
42 |
+
if (config.certificateFile === undefined && config.caCertificateFile === undefined) {
|
43 |
+
throw new Error('At least one of certificateFile and caCertificateFile must be set');
|
44 |
+
}
|
45 |
+
trace('File watcher constructed with config ' + JSON.stringify(config));
|
46 |
+
}
|
47 |
+
updateCertificates() {
|
48 |
+
if (this.fileResultPromise) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
this.fileResultPromise = Promise.allSettled([
|
52 |
+
this.config.certificateFile ? readFilePromise(this.config.certificateFile) : Promise.reject(),
|
53 |
+
this.config.privateKeyFile ? readFilePromise(this.config.privateKeyFile) : Promise.reject(),
|
54 |
+
this.config.caCertificateFile ? readFilePromise(this.config.caCertificateFile) : Promise.reject()
|
55 |
+
]);
|
56 |
+
this.fileResultPromise.then(([certificateResult, privateKeyResult, caCertificateResult]) => {
|
57 |
+
if (!this.refreshTimer) {
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
trace('File watcher read certificates certificate' + (certificateResult ? '!=' : '==') + 'null, privateKey' + (privateKeyResult ? '!=' : '==') + 'null, CA certificate' + (caCertificateResult ? '!=' : '==') + 'null');
|
61 |
+
this.lastUpdateTime = new Date();
|
62 |
+
this.fileResultPromise = null;
|
63 |
+
if (certificateResult.status === 'fulfilled' && privateKeyResult.status === 'fulfilled') {
|
64 |
+
this.latestIdentityUpdate = {
|
65 |
+
certificate: certificateResult.value,
|
66 |
+
privateKey: privateKeyResult.value
|
67 |
+
};
|
68 |
+
}
|
69 |
+
else {
|
70 |
+
this.latestIdentityUpdate = null;
|
71 |
+
}
|
72 |
+
if (caCertificateResult.status === 'fulfilled') {
|
73 |
+
this.latestCaUpdate = {
|
74 |
+
caCertificate: caCertificateResult.value
|
75 |
+
};
|
76 |
+
}
|
77 |
+
for (const listener of this.identityListeners) {
|
78 |
+
listener(this.latestIdentityUpdate);
|
79 |
+
}
|
80 |
+
for (const listener of this.caListeners) {
|
81 |
+
listener(this.latestCaUpdate);
|
82 |
+
}
|
83 |
+
});
|
84 |
+
trace('File watcher initiated certificate update');
|
85 |
+
}
|
86 |
+
maybeStartWatchingFiles() {
|
87 |
+
if (!this.refreshTimer) {
|
88 |
+
/* Perform the first read immediately, but only if there was not already
|
89 |
+
* a recent read, to avoid reading from the filesystem significantly more
|
90 |
+
* frequently than configured if the provider quickly switches between
|
91 |
+
* used and unused. */
|
92 |
+
const timeSinceLastUpdate = this.lastUpdateTime ? (new Date()).getTime() - this.lastUpdateTime.getTime() : Infinity;
|
93 |
+
if (timeSinceLastUpdate > this.config.refreshIntervalMs) {
|
94 |
+
this.updateCertificates();
|
95 |
+
}
|
96 |
+
if (timeSinceLastUpdate > this.config.refreshIntervalMs * 2) {
|
97 |
+
// Clear out old updates if they are definitely stale
|
98 |
+
this.latestCaUpdate = null;
|
99 |
+
this.latestIdentityUpdate = null;
|
100 |
+
}
|
101 |
+
this.refreshTimer = setInterval(() => this.updateCertificates(), this.config.refreshIntervalMs);
|
102 |
+
trace('File watcher started watching');
|
103 |
+
}
|
104 |
+
}
|
105 |
+
maybeStopWatchingFiles() {
|
106 |
+
if (this.caListeners.size === 0 && this.identityListeners.size === 0) {
|
107 |
+
this.fileResultPromise = null;
|
108 |
+
if (this.refreshTimer) {
|
109 |
+
clearInterval(this.refreshTimer);
|
110 |
+
this.refreshTimer = null;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
addCaCertificateListener(listener) {
|
115 |
+
this.caListeners.add(listener);
|
116 |
+
this.maybeStartWatchingFiles();
|
117 |
+
process.nextTick(listener, this.latestCaUpdate);
|
118 |
+
}
|
119 |
+
removeCaCertificateListener(listener) {
|
120 |
+
this.caListeners.delete(listener);
|
121 |
+
this.maybeStopWatchingFiles();
|
122 |
+
}
|
123 |
+
addIdentityCertificateListener(listener) {
|
124 |
+
this.identityListeners.add(listener);
|
125 |
+
this.maybeStartWatchingFiles();
|
126 |
+
process.nextTick(listener, this.latestIdentityUpdate);
|
127 |
+
}
|
128 |
+
removeIdentityCertificateListener(listener) {
|
129 |
+
this.identityListeners.delete(listener);
|
130 |
+
this.maybeStopWatchingFiles();
|
131 |
+
}
|
132 |
+
}
|
133 |
+
exports.FileWatcherCertificateProvider = FileWatcherCertificateProvider;
|
134 |
+
//# sourceMappingURL=certificate-provider.js.map
|
node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map
ADDED
@@ -0,0 +1 @@
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Q,CAAC,CAAC;QACxC,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;CACF;AA5GD,wEA4GC"}
|
node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
/// <reference types="node" />
|
3 |
+
import { ConnectionOptions, PeerCertificate, SecureContext } from 'tls';
|
4 |
+
import { CallCredentials } from './call-credentials';
|
5 |
+
import { CertificateProvider } from './certificate-provider';
|
6 |
+
/**
|
7 |
+
* A callback that will receive the expected hostname and presented peer
|
8 |
+
* certificate as parameters. The callback should return an error to
|
9 |
+
* indicate that the presented certificate is considered invalid and
|
10 |
+
* otherwise returned undefined.
|
11 |
+
*/
|
12 |
+
export type CheckServerIdentityCallback = (hostname: string, cert: PeerCertificate) => Error | undefined;
|
13 |
+
/**
|
14 |
+
* Additional peer verification options that can be set when creating
|
15 |
+
* SSL credentials.
|
16 |
+
*/
|
17 |
+
export interface VerifyOptions {
|
18 |
+
/**
|
19 |
+
* If set, this callback will be invoked after the usual hostname verification
|
20 |
+
* has been performed on the peer certificate.
|
21 |
+
*/
|
22 |
+
checkServerIdentity?: CheckServerIdentityCallback;
|
23 |
+
rejectUnauthorized?: boolean;
|
24 |
+
}
|
25 |
+
/**
|
26 |
+
* A class that contains credentials for communicating over a channel, as well
|
27 |
+
* as a set of per-call credentials, which are applied to every method call made
|
28 |
+
* over a channel initialized with an instance of this class.
|
29 |
+
*/
|
30 |
+
export declare abstract class ChannelCredentials {
|
31 |
+
protected callCredentials: CallCredentials;
|
32 |
+
protected constructor(callCredentials?: CallCredentials);
|
33 |
+
/**
|
34 |
+
* Returns a copy of this object with the included set of per-call credentials
|
35 |
+
* expanded to include callCredentials.
|
36 |
+
* @param callCredentials A CallCredentials object to associate with this
|
37 |
+
* instance.
|
38 |
+
*/
|
39 |
+
abstract compose(callCredentials: CallCredentials): ChannelCredentials;
|
40 |
+
/**
|
41 |
+
* Gets the set of per-call credentials associated with this instance.
|
42 |
+
*/
|
43 |
+
_getCallCredentials(): CallCredentials;
|
44 |
+
/**
|
45 |
+
* Gets a SecureContext object generated from input parameters if this
|
46 |
+
* instance was created with createSsl, or null if this instance was created
|
47 |
+
* with createInsecure.
|
48 |
+
*/
|
49 |
+
abstract _getConnectionOptions(): ConnectionOptions | null;
|
50 |
+
/**
|
51 |
+
* Indicates whether this credentials object creates a secure channel.
|
52 |
+
*/
|
53 |
+
abstract _isSecure(): boolean;
|
54 |
+
/**
|
55 |
+
* Check whether two channel credentials objects are equal. Two secure
|
56 |
+
* credentials are equal if they were constructed with the same parameters.
|
57 |
+
* @param other The other ChannelCredentials Object
|
58 |
+
*/
|
59 |
+
abstract _equals(other: ChannelCredentials): boolean;
|
60 |
+
_ref(): void;
|
61 |
+
_unref(): void;
|
62 |
+
/**
|
63 |
+
* Return a new ChannelCredentials instance with a given set of credentials.
|
64 |
+
* The resulting instance can be used to construct a Channel that communicates
|
65 |
+
* over TLS.
|
66 |
+
* @param rootCerts The root certificate data.
|
67 |
+
* @param privateKey The client certificate private key, if available.
|
68 |
+
* @param certChain The client certificate key chain, if available.
|
69 |
+
* @param verifyOptions Additional options to modify certificate verification
|
70 |
+
*/
|
71 |
+
static createSsl(rootCerts?: Buffer | null, privateKey?: Buffer | null, certChain?: Buffer | null, verifyOptions?: VerifyOptions): ChannelCredentials;
|
72 |
+
/**
|
73 |
+
* Return a new ChannelCredentials instance with credentials created using
|
74 |
+
* the provided secureContext. The resulting instances can be used to
|
75 |
+
* construct a Channel that communicates over TLS. gRPC will not override
|
76 |
+
* anything in the provided secureContext, so the environment variables
|
77 |
+
* GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will
|
78 |
+
* not be applied.
|
79 |
+
* @param secureContext The return value of tls.createSecureContext()
|
80 |
+
* @param verifyOptions Additional options to modify certificate verification
|
81 |
+
*/
|
82 |
+
static createFromSecureContext(secureContext: SecureContext, verifyOptions?: VerifyOptions): ChannelCredentials;
|
83 |
+
/**
|
84 |
+
* Return a new ChannelCredentials instance with no credentials.
|
85 |
+
*/
|
86 |
+
static createInsecure(): ChannelCredentials;
|
87 |
+
}
|
88 |
+
declare class CertificateProviderChannelCredentialsImpl extends ChannelCredentials {
|
89 |
+
private caCertificateProvider;
|
90 |
+
private identityCertificateProvider;
|
91 |
+
private verifyOptions;
|
92 |
+
private refcount;
|
93 |
+
private latestCaUpdate;
|
94 |
+
private latestIdentityUpdate;
|
95 |
+
private caCertificateUpdateListener;
|
96 |
+
private identityCertificateUpdateListener;
|
97 |
+
constructor(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, verifyOptions: VerifyOptions | null);
|
98 |
+
compose(callCredentials: CallCredentials): ChannelCredentials;
|
99 |
+
_getConnectionOptions(): ConnectionOptions | null;
|
100 |
+
_isSecure(): boolean;
|
101 |
+
_equals(other: ChannelCredentials): boolean;
|
102 |
+
_ref(): void;
|
103 |
+
_unref(): void;
|
104 |
+
private handleCaCertificateUpdate;
|
105 |
+
private handleIdentityCertitificateUpdate;
|
106 |
+
}
|
107 |
+
export declare function createCertificateProviderChannelCredentials(caCertificateProvider: CertificateProvider, identityCertificateProvider: CertificateProvider | null, verifyOptions?: VerifyOptions): CertificateProviderChannelCredentialsImpl;
|
108 |
+
export {};
|
node_modules/@grpc/grpc-js/build/src/channel-credentials.js
ADDED
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.createCertificateProviderChannelCredentials = exports.ChannelCredentials = void 0;
|
20 |
+
const tls_1 = require("tls");
|
21 |
+
const call_credentials_1 = require("./call-credentials");
|
22 |
+
const tls_helpers_1 = require("./tls-helpers");
|
23 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
24 |
+
function verifyIsBufferOrNull(obj, friendlyName) {
|
25 |
+
if (obj && !(obj instanceof Buffer)) {
|
26 |
+
throw new TypeError(`${friendlyName}, if provided, must be a Buffer.`);
|
27 |
+
}
|
28 |
+
}
|
29 |
+
/**
|
30 |
+
* A class that contains credentials for communicating over a channel, as well
|
31 |
+
* as a set of per-call credentials, which are applied to every method call made
|
32 |
+
* over a channel initialized with an instance of this class.
|
33 |
+
*/
|
34 |
+
class ChannelCredentials {
|
35 |
+
constructor(callCredentials) {
|
36 |
+
this.callCredentials = callCredentials || call_credentials_1.CallCredentials.createEmpty();
|
37 |
+
}
|
38 |
+
/**
|
39 |
+
* Gets the set of per-call credentials associated with this instance.
|
40 |
+
*/
|
41 |
+
_getCallCredentials() {
|
42 |
+
return this.callCredentials;
|
43 |
+
}
|
44 |
+
_ref() {
|
45 |
+
// Do nothing by default
|
46 |
+
}
|
47 |
+
_unref() {
|
48 |
+
// Do nothing by default
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* Return a new ChannelCredentials instance with a given set of credentials.
|
52 |
+
* The resulting instance can be used to construct a Channel that communicates
|
53 |
+
* over TLS.
|
54 |
+
* @param rootCerts The root certificate data.
|
55 |
+
* @param privateKey The client certificate private key, if available.
|
56 |
+
* @param certChain The client certificate key chain, if available.
|
57 |
+
* @param verifyOptions Additional options to modify certificate verification
|
58 |
+
*/
|
59 |
+
static createSsl(rootCerts, privateKey, certChain, verifyOptions) {
|
60 |
+
var _a;
|
61 |
+
verifyIsBufferOrNull(rootCerts, 'Root certificate');
|
62 |
+
verifyIsBufferOrNull(privateKey, 'Private key');
|
63 |
+
verifyIsBufferOrNull(certChain, 'Certificate chain');
|
64 |
+
if (privateKey && !certChain) {
|
65 |
+
throw new Error('Private key must be given with accompanying certificate chain');
|
66 |
+
}
|
67 |
+
if (!privateKey && certChain) {
|
68 |
+
throw new Error('Certificate chain must be given with accompanying private key');
|
69 |
+
}
|
70 |
+
const secureContext = (0, tls_1.createSecureContext)({
|
71 |
+
ca: (_a = rootCerts !== null && rootCerts !== void 0 ? rootCerts : (0, tls_helpers_1.getDefaultRootsData)()) !== null && _a !== void 0 ? _a : undefined,
|
72 |
+
key: privateKey !== null && privateKey !== void 0 ? privateKey : undefined,
|
73 |
+
cert: certChain !== null && certChain !== void 0 ? certChain : undefined,
|
74 |
+
ciphers: tls_helpers_1.CIPHER_SUITES,
|
75 |
+
});
|
76 |
+
return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {});
|
77 |
+
}
|
78 |
+
/**
|
79 |
+
* Return a new ChannelCredentials instance with credentials created using
|
80 |
+
* the provided secureContext. The resulting instances can be used to
|
81 |
+
* construct a Channel that communicates over TLS. gRPC will not override
|
82 |
+
* anything in the provided secureContext, so the environment variables
|
83 |
+
* GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will
|
84 |
+
* not be applied.
|
85 |
+
* @param secureContext The return value of tls.createSecureContext()
|
86 |
+
* @param verifyOptions Additional options to modify certificate verification
|
87 |
+
*/
|
88 |
+
static createFromSecureContext(secureContext, verifyOptions) {
|
89 |
+
return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {});
|
90 |
+
}
|
91 |
+
/**
|
92 |
+
* Return a new ChannelCredentials instance with no credentials.
|
93 |
+
*/
|
94 |
+
static createInsecure() {
|
95 |
+
return new InsecureChannelCredentialsImpl();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
exports.ChannelCredentials = ChannelCredentials;
|
99 |
+
class InsecureChannelCredentialsImpl extends ChannelCredentials {
|
100 |
+
constructor() {
|
101 |
+
super();
|
102 |
+
}
|
103 |
+
compose(callCredentials) {
|
104 |
+
throw new Error('Cannot compose insecure credentials');
|
105 |
+
}
|
106 |
+
_getConnectionOptions() {
|
107 |
+
return {};
|
108 |
+
}
|
109 |
+
_isSecure() {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
_equals(other) {
|
113 |
+
return other instanceof InsecureChannelCredentialsImpl;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
class SecureChannelCredentialsImpl extends ChannelCredentials {
|
117 |
+
constructor(secureContext, verifyOptions) {
|
118 |
+
super();
|
119 |
+
this.secureContext = secureContext;
|
120 |
+
this.verifyOptions = verifyOptions;
|
121 |
+
this.connectionOptions = {
|
122 |
+
secureContext,
|
123 |
+
};
|
124 |
+
// Node asserts that this option is a function, so we cannot pass undefined
|
125 |
+
if (verifyOptions === null || verifyOptions === void 0 ? void 0 : verifyOptions.checkServerIdentity) {
|
126 |
+
this.connectionOptions.checkServerIdentity =
|
127 |
+
verifyOptions.checkServerIdentity;
|
128 |
+
}
|
129 |
+
if ((verifyOptions === null || verifyOptions === void 0 ? void 0 : verifyOptions.rejectUnauthorized) !== undefined) {
|
130 |
+
this.connectionOptions.rejectUnauthorized =
|
131 |
+
verifyOptions.rejectUnauthorized;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
compose(callCredentials) {
|
135 |
+
const combinedCallCredentials = this.callCredentials.compose(callCredentials);
|
136 |
+
return new ComposedChannelCredentialsImpl(this, combinedCallCredentials);
|
137 |
+
}
|
138 |
+
_getConnectionOptions() {
|
139 |
+
// Copy to prevent callers from mutating this.connectionOptions
|
140 |
+
return Object.assign({}, this.connectionOptions);
|
141 |
+
}
|
142 |
+
_isSecure() {
|
143 |
+
return true;
|
144 |
+
}
|
145 |
+
_equals(other) {
|
146 |
+
if (this === other) {
|
147 |
+
return true;
|
148 |
+
}
|
149 |
+
if (other instanceof SecureChannelCredentialsImpl) {
|
150 |
+
return (this.secureContext === other.secureContext &&
|
151 |
+
this.verifyOptions.checkServerIdentity ===
|
152 |
+
other.verifyOptions.checkServerIdentity);
|
153 |
+
}
|
154 |
+
else {
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
class CertificateProviderChannelCredentialsImpl extends ChannelCredentials {
|
160 |
+
constructor(caCertificateProvider, identityCertificateProvider, verifyOptions) {
|
161 |
+
super();
|
162 |
+
this.caCertificateProvider = caCertificateProvider;
|
163 |
+
this.identityCertificateProvider = identityCertificateProvider;
|
164 |
+
this.verifyOptions = verifyOptions;
|
165 |
+
this.refcount = 0;
|
166 |
+
this.latestCaUpdate = null;
|
167 |
+
this.latestIdentityUpdate = null;
|
168 |
+
this.caCertificateUpdateListener = this.handleCaCertificateUpdate.bind(this);
|
169 |
+
this.identityCertificateUpdateListener = this.handleIdentityCertitificateUpdate.bind(this);
|
170 |
+
}
|
171 |
+
compose(callCredentials) {
|
172 |
+
const combinedCallCredentials = this.callCredentials.compose(callCredentials);
|
173 |
+
return new ComposedChannelCredentialsImpl(this, combinedCallCredentials);
|
174 |
+
}
|
175 |
+
_getConnectionOptions() {
|
176 |
+
var _a, _b, _c;
|
177 |
+
if (this.latestCaUpdate === null) {
|
178 |
+
return null;
|
179 |
+
}
|
180 |
+
if (this.identityCertificateProvider !== null && this.latestIdentityUpdate === null) {
|
181 |
+
return null;
|
182 |
+
}
|
183 |
+
const secureContext = (0, tls_1.createSecureContext)({
|
184 |
+
ca: this.latestCaUpdate.caCertificate,
|
185 |
+
key: (_a = this.latestIdentityUpdate) === null || _a === void 0 ? void 0 : _a.privateKey,
|
186 |
+
cert: (_b = this.latestIdentityUpdate) === null || _b === void 0 ? void 0 : _b.certificate,
|
187 |
+
ciphers: tls_helpers_1.CIPHER_SUITES
|
188 |
+
});
|
189 |
+
const options = {
|
190 |
+
secureContext: secureContext
|
191 |
+
};
|
192 |
+
if ((_c = this.verifyOptions) === null || _c === void 0 ? void 0 : _c.checkServerIdentity) {
|
193 |
+
options.checkServerIdentity = this.verifyOptions.checkServerIdentity;
|
194 |
+
}
|
195 |
+
return options;
|
196 |
+
}
|
197 |
+
_isSecure() {
|
198 |
+
return true;
|
199 |
+
}
|
200 |
+
_equals(other) {
|
201 |
+
var _a, _b;
|
202 |
+
if (this === other) {
|
203 |
+
return true;
|
204 |
+
}
|
205 |
+
if (other instanceof CertificateProviderChannelCredentialsImpl) {
|
206 |
+
return this.caCertificateProvider === other.caCertificateProvider &&
|
207 |
+
this.identityCertificateProvider === other.identityCertificateProvider &&
|
208 |
+
((_a = this.verifyOptions) === null || _a === void 0 ? void 0 : _a.checkServerIdentity) === ((_b = other.verifyOptions) === null || _b === void 0 ? void 0 : _b.checkServerIdentity);
|
209 |
+
}
|
210 |
+
else {
|
211 |
+
return false;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
_ref() {
|
215 |
+
var _a;
|
216 |
+
if (this.refcount === 0) {
|
217 |
+
this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener);
|
218 |
+
(_a = this.identityCertificateProvider) === null || _a === void 0 ? void 0 : _a.addIdentityCertificateListener(this.identityCertificateUpdateListener);
|
219 |
+
}
|
220 |
+
this.refcount += 1;
|
221 |
+
}
|
222 |
+
_unref() {
|
223 |
+
var _a;
|
224 |
+
this.refcount -= 1;
|
225 |
+
if (this.refcount === 0) {
|
226 |
+
this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener);
|
227 |
+
(_a = this.identityCertificateProvider) === null || _a === void 0 ? void 0 : _a.removeIdentityCertificateListener(this.identityCertificateUpdateListener);
|
228 |
+
}
|
229 |
+
}
|
230 |
+
handleCaCertificateUpdate(update) {
|
231 |
+
this.latestCaUpdate = update;
|
232 |
+
}
|
233 |
+
handleIdentityCertitificateUpdate(update) {
|
234 |
+
this.latestIdentityUpdate = update;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
function createCertificateProviderChannelCredentials(caCertificateProvider, identityCertificateProvider, verifyOptions) {
|
238 |
+
return new CertificateProviderChannelCredentialsImpl(caCertificateProvider, identityCertificateProvider, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : null);
|
239 |
+
}
|
240 |
+
exports.createCertificateProviderChannelCredentials = createCertificateProviderChannelCredentials;
|
241 |
+
class ComposedChannelCredentialsImpl extends ChannelCredentials {
|
242 |
+
constructor(channelCredentials, callCreds) {
|
243 |
+
super(callCreds);
|
244 |
+
this.channelCredentials = channelCredentials;
|
245 |
+
if (!channelCredentials._isSecure()) {
|
246 |
+
throw new Error('Cannot compose insecure credentials');
|
247 |
+
}
|
248 |
+
}
|
249 |
+
compose(callCredentials) {
|
250 |
+
const combinedCallCredentials = this.callCredentials.compose(callCredentials);
|
251 |
+
return new ComposedChannelCredentialsImpl(this.channelCredentials, combinedCallCredentials);
|
252 |
+
}
|
253 |
+
_getConnectionOptions() {
|
254 |
+
return this.channelCredentials._getConnectionOptions();
|
255 |
+
}
|
256 |
+
_isSecure() {
|
257 |
+
return true;
|
258 |
+
}
|
259 |
+
_equals(other) {
|
260 |
+
if (this === other) {
|
261 |
+
return true;
|
262 |
+
}
|
263 |
+
if (other instanceof ComposedChannelCredentialsImpl) {
|
264 |
+
return (this.channelCredentials._equals(other.channelCredentials) &&
|
265 |
+
this.callCredentials._equals(other.callCredentials));
|
266 |
+
}
|
267 |
+
else {
|
268 |
+
return false;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
}
|
272 |
+
//# sourceMappingURL=channel-credentials.js.map
|
node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"channel-credentials.js","sourceRoot":"","sources":["../../src/channel-credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,6BAKa;AAEb,yDAAqD;AACrD,+CAAmE;AAGnE,8DAA8D;AAC9D,SAAS,oBAAoB,CAAC,GAAQ,EAAE,YAAoB;IAC1D,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,YAAY,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,GAAG,YAAY,kCAAkC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AA0BD;;;;GAIG;AACH,MAAsB,kBAAkB;IAGtC,YAAsB,eAAiC;QACrD,IAAI,CAAC,eAAe,GAAG,eAAe,IAAI,kCAAe,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IASD;;OAEG;IACH,mBAAmB;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAqBD,IAAI;QACF,wBAAwB;IAC1B,CAAC;IAED,MAAM;QACJ,wBAAwB;IAC1B,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,SAAS,CACd,SAAyB,EACzB,UAA0B,EAC1B,SAAyB,EACzB,aAA6B;;QAE7B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AAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,KAAK,YAAY,8BAA8B,EAAE,CAAC;YACpD,OAAO,CACL,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC;gBACzD,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CACpD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
node_modules/@grpc/grpc-js/build/src/channel-options.d.ts
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { CompressionAlgorithms } from './compression-algorithms';
|
2 |
+
/**
|
3 |
+
* An interface that contains options used when initializing a Channel instance.
|
4 |
+
*/
|
5 |
+
export interface ChannelOptions {
|
6 |
+
'grpc.ssl_target_name_override'?: string;
|
7 |
+
'grpc.primary_user_agent'?: string;
|
8 |
+
'grpc.secondary_user_agent'?: string;
|
9 |
+
'grpc.default_authority'?: string;
|
10 |
+
'grpc.keepalive_time_ms'?: number;
|
11 |
+
'grpc.keepalive_timeout_ms'?: number;
|
12 |
+
'grpc.keepalive_permit_without_calls'?: number;
|
13 |
+
'grpc.service_config'?: string;
|
14 |
+
'grpc.max_concurrent_streams'?: number;
|
15 |
+
'grpc.initial_reconnect_backoff_ms'?: number;
|
16 |
+
'grpc.max_reconnect_backoff_ms'?: number;
|
17 |
+
'grpc.use_local_subchannel_pool'?: number;
|
18 |
+
'grpc.max_send_message_length'?: number;
|
19 |
+
'grpc.max_receive_message_length'?: number;
|
20 |
+
'grpc.enable_http_proxy'?: number;
|
21 |
+
'grpc.http_connect_target'?: string;
|
22 |
+
'grpc.http_connect_creds'?: string;
|
23 |
+
'grpc.default_compression_algorithm'?: CompressionAlgorithms;
|
24 |
+
'grpc.enable_channelz'?: number;
|
25 |
+
'grpc.dns_min_time_between_resolutions_ms'?: number;
|
26 |
+
'grpc.enable_retries'?: number;
|
27 |
+
'grpc.per_rpc_retry_buffer_size'?: number;
|
28 |
+
'grpc.retry_buffer_size'?: number;
|
29 |
+
'grpc.max_connection_age_ms'?: number;
|
30 |
+
'grpc.max_connection_age_grace_ms'?: number;
|
31 |
+
'grpc.max_connection_idle_ms'?: number;
|
32 |
+
'grpc-node.max_session_memory'?: number;
|
33 |
+
'grpc.service_config_disable_resolution'?: number;
|
34 |
+
'grpc.client_idle_timeout_ms'?: number;
|
35 |
+
/**
|
36 |
+
* Set the enableTrace option in TLS clients and servers
|
37 |
+
*/
|
38 |
+
'grpc-node.tls_enable_trace'?: number;
|
39 |
+
'grpc.lb.ring_hash.ring_size_cap'?: number;
|
40 |
+
'grpc-node.retry_max_attempts_limit'?: number;
|
41 |
+
[key: string]: any;
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* This is for checking provided options at runtime. This is an object for
|
45 |
+
* easier membership checking.
|
46 |
+
*/
|
47 |
+
export declare const recognizedOptions: {
|
48 |
+
'grpc.ssl_target_name_override': boolean;
|
49 |
+
'grpc.primary_user_agent': boolean;
|
50 |
+
'grpc.secondary_user_agent': boolean;
|
51 |
+
'grpc.default_authority': boolean;
|
52 |
+
'grpc.keepalive_time_ms': boolean;
|
53 |
+
'grpc.keepalive_timeout_ms': boolean;
|
54 |
+
'grpc.keepalive_permit_without_calls': boolean;
|
55 |
+
'grpc.service_config': boolean;
|
56 |
+
'grpc.max_concurrent_streams': boolean;
|
57 |
+
'grpc.initial_reconnect_backoff_ms': boolean;
|
58 |
+
'grpc.max_reconnect_backoff_ms': boolean;
|
59 |
+
'grpc.use_local_subchannel_pool': boolean;
|
60 |
+
'grpc.max_send_message_length': boolean;
|
61 |
+
'grpc.max_receive_message_length': boolean;
|
62 |
+
'grpc.enable_http_proxy': boolean;
|
63 |
+
'grpc.enable_channelz': boolean;
|
64 |
+
'grpc.dns_min_time_between_resolutions_ms': boolean;
|
65 |
+
'grpc.enable_retries': boolean;
|
66 |
+
'grpc.per_rpc_retry_buffer_size': boolean;
|
67 |
+
'grpc.retry_buffer_size': boolean;
|
68 |
+
'grpc.max_connection_age_ms': boolean;
|
69 |
+
'grpc.max_connection_age_grace_ms': boolean;
|
70 |
+
'grpc-node.max_session_memory': boolean;
|
71 |
+
'grpc.service_config_disable_resolution': boolean;
|
72 |
+
'grpc.client_idle_timeout_ms': boolean;
|
73 |
+
'grpc-node.tls_enable_trace': boolean;
|
74 |
+
'grpc.lb.ring_hash.ring_size_cap': boolean;
|
75 |
+
'grpc-node.retry_max_attempts_limit': boolean;
|
76 |
+
};
|
77 |
+
export declare function channelOptionsEqual(options1: ChannelOptions, options2: ChannelOptions): boolean;
|
node_modules/@grpc/grpc-js/build/src/channel-options.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.channelOptionsEqual = exports.recognizedOptions = void 0;
|
20 |
+
/**
|
21 |
+
* This is for checking provided options at runtime. This is an object for
|
22 |
+
* easier membership checking.
|
23 |
+
*/
|
24 |
+
exports.recognizedOptions = {
|
25 |
+
'grpc.ssl_target_name_override': true,
|
26 |
+
'grpc.primary_user_agent': true,
|
27 |
+
'grpc.secondary_user_agent': true,
|
28 |
+
'grpc.default_authority': true,
|
29 |
+
'grpc.keepalive_time_ms': true,
|
30 |
+
'grpc.keepalive_timeout_ms': true,
|
31 |
+
'grpc.keepalive_permit_without_calls': true,
|
32 |
+
'grpc.service_config': true,
|
33 |
+
'grpc.max_concurrent_streams': true,
|
34 |
+
'grpc.initial_reconnect_backoff_ms': true,
|
35 |
+
'grpc.max_reconnect_backoff_ms': true,
|
36 |
+
'grpc.use_local_subchannel_pool': true,
|
37 |
+
'grpc.max_send_message_length': true,
|
38 |
+
'grpc.max_receive_message_length': true,
|
39 |
+
'grpc.enable_http_proxy': true,
|
40 |
+
'grpc.enable_channelz': true,
|
41 |
+
'grpc.dns_min_time_between_resolutions_ms': true,
|
42 |
+
'grpc.enable_retries': true,
|
43 |
+
'grpc.per_rpc_retry_buffer_size': true,
|
44 |
+
'grpc.retry_buffer_size': true,
|
45 |
+
'grpc.max_connection_age_ms': true,
|
46 |
+
'grpc.max_connection_age_grace_ms': true,
|
47 |
+
'grpc-node.max_session_memory': true,
|
48 |
+
'grpc.service_config_disable_resolution': true,
|
49 |
+
'grpc.client_idle_timeout_ms': true,
|
50 |
+
'grpc-node.tls_enable_trace': true,
|
51 |
+
'grpc.lb.ring_hash.ring_size_cap': true,
|
52 |
+
'grpc-node.retry_max_attempts_limit': true,
|
53 |
+
};
|
54 |
+
function channelOptionsEqual(options1, options2) {
|
55 |
+
const keys1 = Object.keys(options1).sort();
|
56 |
+
const keys2 = Object.keys(options2).sort();
|
57 |
+
if (keys1.length !== keys2.length) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
for (let i = 0; i < keys1.length; i += 1) {
|
61 |
+
if (keys1[i] !== keys2[i]) {
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
if (options1[keys1[i]] !== options2[keys2[i]]) {
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
exports.channelOptionsEqual = channelOptionsEqual;
|
71 |
+
//# sourceMappingURL=channel-options.js.map
|
node_modules/@grpc/grpc-js/build/src/channel-options.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"channel-options.js","sourceRoot":"","sources":["../../src/channel-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAuDH;;;GAGG;AACU,QAAA,iBAAiB,GAAG;IAC/B,+BAA+B,EAAE,IAAI;IACrC,yBAAyB,EAAE,IAAI;IAC/B,2BAA2B,EAAE,IAAI;IACjC,wBAAwB,EAAE,IAAI;IAC9B,wBAAwB,EAAE,IAAI;IAC9B,2BAA2B,EAAE,IAAI;IACjC,qCAAqC,EAAE,IAAI;IAC3C,qBAAqB,EAAE,IAAI;IAC3B,6BAA6B,EAAE,IAAI;IACnC,mCAAmC,EAAE,IAAI;IACzC,+BAA+B,EAAE,IAAI;IACrC,gCAAgC,E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/build/src/channel.d.ts
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { ChannelCredentials } from './channel-credentials';
|
2 |
+
import { ChannelOptions } from './channel-options';
|
3 |
+
import { ServerSurfaceCall } from './server-call';
|
4 |
+
import { ConnectivityState } from './connectivity-state';
|
5 |
+
import type { ChannelRef } from './channelz';
|
6 |
+
import { Call } from './call-interface';
|
7 |
+
import { Deadline } from './deadline';
|
8 |
+
/**
|
9 |
+
* An interface that represents a communication channel to a server specified
|
10 |
+
* by a given address.
|
11 |
+
*/
|
12 |
+
export interface Channel {
|
13 |
+
/**
|
14 |
+
* Close the channel. This has the same functionality as the existing
|
15 |
+
* grpc.Client.prototype.close
|
16 |
+
*/
|
17 |
+
close(): void;
|
18 |
+
/**
|
19 |
+
* Return the target that this channel connects to
|
20 |
+
*/
|
21 |
+
getTarget(): string;
|
22 |
+
/**
|
23 |
+
* Get the channel's current connectivity state. This method is here mainly
|
24 |
+
* because it is in the existing internal Channel class, and there isn't
|
25 |
+
* another good place to put it.
|
26 |
+
* @param tryToConnect If true, the channel will start connecting if it is
|
27 |
+
* idle. Otherwise, idle channels will only start connecting when a
|
28 |
+
* call starts.
|
29 |
+
*/
|
30 |
+
getConnectivityState(tryToConnect: boolean): ConnectivityState;
|
31 |
+
/**
|
32 |
+
* Watch for connectivity state changes. This is also here mainly because
|
33 |
+
* it is in the existing external Channel class.
|
34 |
+
* @param currentState The state to watch for transitions from. This should
|
35 |
+
* always be populated by calling getConnectivityState immediately
|
36 |
+
* before.
|
37 |
+
* @param deadline A deadline for waiting for a state change
|
38 |
+
* @param callback Called with no error when a state change, or with an
|
39 |
+
* error if the deadline passes without a state change.
|
40 |
+
*/
|
41 |
+
watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void;
|
42 |
+
/**
|
43 |
+
* Get the channelz reference object for this channel. A request to the
|
44 |
+
* channelz service for the id in this object will provide information
|
45 |
+
* about this channel.
|
46 |
+
*/
|
47 |
+
getChannelzRef(): ChannelRef;
|
48 |
+
/**
|
49 |
+
* Create a call object. Call is an opaque type that is used by the Client
|
50 |
+
* class. This function is called by the gRPC library when starting a
|
51 |
+
* request. Implementers should return an instance of Call that is returned
|
52 |
+
* from calling createCall on an instance of the provided Channel class.
|
53 |
+
* @param method The full method string to request.
|
54 |
+
* @param deadline The call deadline
|
55 |
+
* @param host A host string override for making the request
|
56 |
+
* @param parentCall A server call to propagate some information from
|
57 |
+
* @param propagateFlags A bitwise combination of elements of grpc.propagate
|
58 |
+
* that indicates what information to propagate from parentCall.
|
59 |
+
*/
|
60 |
+
createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call;
|
61 |
+
}
|
62 |
+
export declare class ChannelImplementation implements Channel {
|
63 |
+
private internalChannel;
|
64 |
+
constructor(target: string, credentials: ChannelCredentials, options: ChannelOptions);
|
65 |
+
close(): void;
|
66 |
+
getTarget(): string;
|
67 |
+
getConnectivityState(tryToConnect: boolean): ConnectivityState;
|
68 |
+
watchConnectivityState(currentState: ConnectivityState, deadline: Date | number, callback: (error?: Error) => void): void;
|
69 |
+
/**
|
70 |
+
* Get the channelz reference object for this channel. The returned value is
|
71 |
+
* garbage if channelz is disabled for this channel.
|
72 |
+
* @returns
|
73 |
+
*/
|
74 |
+
getChannelzRef(): ChannelRef;
|
75 |
+
createCall(method: string, deadline: Deadline, host: string | null | undefined, parentCall: ServerSurfaceCall | null, propagateFlags: number | null | undefined): Call;
|
76 |
+
}
|
node_modules/@grpc/grpc-js/build/src/channel.js
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
/*
|
3 |
+
* Copyright 2019 gRPC authors.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.ChannelImplementation = void 0;
|
20 |
+
const channel_credentials_1 = require("./channel-credentials");
|
21 |
+
const internal_channel_1 = require("./internal-channel");
|
22 |
+
class ChannelImplementation {
|
23 |
+
constructor(target, credentials, options) {
|
24 |
+
if (typeof target !== 'string') {
|
25 |
+
throw new TypeError('Channel target must be a string');
|
26 |
+
}
|
27 |
+
if (!(credentials instanceof channel_credentials_1.ChannelCredentials)) {
|
28 |
+
throw new TypeError('Channel credentials must be a ChannelCredentials object');
|
29 |
+
}
|
30 |
+
if (options) {
|
31 |
+
if (typeof options !== 'object') {
|
32 |
+
throw new TypeError('Channel options must be an object');
|
33 |
+
}
|
34 |
+
}
|
35 |
+
this.internalChannel = new internal_channel_1.InternalChannel(target, credentials, options);
|
36 |
+
}
|
37 |
+
close() {
|
38 |
+
this.internalChannel.close();
|
39 |
+
}
|
40 |
+
getTarget() {
|
41 |
+
return this.internalChannel.getTarget();
|
42 |
+
}
|
43 |
+
getConnectivityState(tryToConnect) {
|
44 |
+
return this.internalChannel.getConnectivityState(tryToConnect);
|
45 |
+
}
|
46 |
+
watchConnectivityState(currentState, deadline, callback) {
|
47 |
+
this.internalChannel.watchConnectivityState(currentState, deadline, callback);
|
48 |
+
}
|
49 |
+
/**
|
50 |
+
* Get the channelz reference object for this channel. The returned value is
|
51 |
+
* garbage if channelz is disabled for this channel.
|
52 |
+
* @returns
|
53 |
+
*/
|
54 |
+
getChannelzRef() {
|
55 |
+
return this.internalChannel.getChannelzRef();
|
56 |
+
}
|
57 |
+
createCall(method, deadline, host, parentCall, propagateFlags) {
|
58 |
+
if (typeof method !== 'string') {
|
59 |
+
throw new TypeError('Channel#createCall: method must be a string');
|
60 |
+
}
|
61 |
+
if (!(typeof deadline === 'number' || deadline instanceof Date)) {
|
62 |
+
throw new TypeError('Channel#createCall: deadline must be a number or Date');
|
63 |
+
}
|
64 |
+
return this.internalChannel.createCall(method, deadline, host, parentCall, propagateFlags);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
exports.ChannelImplementation = ChannelImplementation;
|
68 |
+
//# sourceMappingURL=channel.js.map
|
node_modules/@grpc/grpc-js/build/src/channel.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../src/channel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,+DAA2D;AAO3D,yDAAqD;AAoErD,MAAa,qBAAqB;IAGhC,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AI,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,YAAY,IAAI,CAAC,EAAE,CAAC;YAChE,MAAM,IAAI,SAAS,CACjB,uDAAuD,CACxD,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CACpC,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,CACf,CAAC;IACJ,CAAC;CACF;AAjFD,sDAiFC"}
|
node_modules/@grpc/grpc-js/build/src/channelz.d.ts
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
import { OrderedMap } from '@js-sdsl/ordered-map';
|
3 |
+
import { ConnectivityState } from './connectivity-state';
|
4 |
+
import { ChannelTrace } from './generated/grpc/channelz/v1/ChannelTrace';
|
5 |
+
import { SubchannelAddress } from './subchannel-address';
|
6 |
+
import { ChannelzDefinition, ChannelzHandlers } from './generated/grpc/channelz/v1/Channelz';
|
7 |
+
export type TraceSeverity = 'CT_UNKNOWN' | 'CT_INFO' | 'CT_WARNING' | 'CT_ERROR';
|
8 |
+
interface Ref {
|
9 |
+
kind: EntityTypes;
|
10 |
+
id: number;
|
11 |
+
name: string;
|
12 |
+
}
|
13 |
+
export interface ChannelRef extends Ref {
|
14 |
+
kind: EntityTypes.channel;
|
15 |
+
}
|
16 |
+
export interface SubchannelRef extends Ref {
|
17 |
+
kind: EntityTypes.subchannel;
|
18 |
+
}
|
19 |
+
export interface ServerRef extends Ref {
|
20 |
+
kind: EntityTypes.server;
|
21 |
+
}
|
22 |
+
export interface SocketRef extends Ref {
|
23 |
+
kind: EntityTypes.socket;
|
24 |
+
}
|
25 |
+
interface TraceEvent {
|
26 |
+
description: string;
|
27 |
+
severity: TraceSeverity;
|
28 |
+
timestamp: Date;
|
29 |
+
childChannel?: ChannelRef;
|
30 |
+
childSubchannel?: SubchannelRef;
|
31 |
+
}
|
32 |
+
export declare class ChannelzTraceStub {
|
33 |
+
readonly events: TraceEvent[];
|
34 |
+
readonly creationTimestamp: Date;
|
35 |
+
readonly eventsLogged = 0;
|
36 |
+
addTrace(): void;
|
37 |
+
getTraceMessage(): ChannelTrace;
|
38 |
+
}
|
39 |
+
export declare class ChannelzTrace {
|
40 |
+
events: TraceEvent[];
|
41 |
+
creationTimestamp: Date;
|
42 |
+
eventsLogged: number;
|
43 |
+
constructor();
|
44 |
+
addTrace(severity: TraceSeverity, description: string, child?: ChannelRef | SubchannelRef): void;
|
45 |
+
getTraceMessage(): ChannelTrace;
|
46 |
+
}
|
47 |
+
export declare class ChannelzChildrenTracker {
|
48 |
+
private channelChildren;
|
49 |
+
private subchannelChildren;
|
50 |
+
private socketChildren;
|
51 |
+
private trackerMap;
|
52 |
+
refChild(child: ChannelRef | SubchannelRef | SocketRef): void;
|
53 |
+
unrefChild(child: ChannelRef | SubchannelRef | SocketRef): void;
|
54 |
+
getChildLists(): ChannelzChildren;
|
55 |
+
}
|
56 |
+
export declare class ChannelzChildrenTrackerStub extends ChannelzChildrenTracker {
|
57 |
+
refChild(): void;
|
58 |
+
unrefChild(): void;
|
59 |
+
}
|
60 |
+
export declare class ChannelzCallTracker {
|
61 |
+
callsStarted: number;
|
62 |
+
callsSucceeded: number;
|
63 |
+
callsFailed: number;
|
64 |
+
lastCallStartedTimestamp: Date | null;
|
65 |
+
addCallStarted(): void;
|
66 |
+
addCallSucceeded(): void;
|
67 |
+
addCallFailed(): void;
|
68 |
+
}
|
69 |
+
export declare class ChannelzCallTrackerStub extends ChannelzCallTracker {
|
70 |
+
addCallStarted(): void;
|
71 |
+
addCallSucceeded(): void;
|
72 |
+
addCallFailed(): void;
|
73 |
+
}
|
74 |
+
export interface ChannelzChildren {
|
75 |
+
channels: OrderedMap<number, {
|
76 |
+
ref: ChannelRef;
|
77 |
+
count: number;
|
78 |
+
}>;
|
79 |
+
subchannels: OrderedMap<number, {
|
80 |
+
ref: SubchannelRef;
|
81 |
+
count: number;
|
82 |
+
}>;
|
83 |
+
sockets: OrderedMap<number, {
|
84 |
+
ref: SocketRef;
|
85 |
+
count: number;
|
86 |
+
}>;
|
87 |
+
}
|
88 |
+
export interface ChannelInfo {
|
89 |
+
target: string;
|
90 |
+
state: ConnectivityState;
|
91 |
+
trace: ChannelzTrace | ChannelzTraceStub;
|
92 |
+
callTracker: ChannelzCallTracker | ChannelzCallTrackerStub;
|
93 |
+
children: ChannelzChildren;
|
94 |
+
}
|
95 |
+
export type SubchannelInfo = ChannelInfo;
|
96 |
+
export interface ServerInfo {
|
97 |
+
trace: ChannelzTrace;
|
98 |
+
callTracker: ChannelzCallTracker;
|
99 |
+
listenerChildren: ChannelzChildren;
|
100 |
+
sessionChildren: ChannelzChildren;
|
101 |
+
}
|
102 |
+
export interface TlsInfo {
|
103 |
+
cipherSuiteStandardName: string | null;
|
104 |
+
cipherSuiteOtherName: string | null;
|
105 |
+
localCertificate: Buffer | null;
|
106 |
+
remoteCertificate: Buffer | null;
|
107 |
+
}
|
108 |
+
export interface SocketInfo {
|
109 |
+
localAddress: SubchannelAddress | null;
|
110 |
+
remoteAddress: SubchannelAddress | null;
|
111 |
+
security: TlsInfo | null;
|
112 |
+
remoteName: string | null;
|
113 |
+
streamsStarted: number;
|
114 |
+
streamsSucceeded: number;
|
115 |
+
streamsFailed: number;
|
116 |
+
messagesSent: number;
|
117 |
+
messagesReceived: number;
|
118 |
+
keepAlivesSent: number;
|
119 |
+
lastLocalStreamCreatedTimestamp: Date | null;
|
120 |
+
lastRemoteStreamCreatedTimestamp: Date | null;
|
121 |
+
lastMessageSentTimestamp: Date | null;
|
122 |
+
lastMessageReceivedTimestamp: Date | null;
|
123 |
+
localFlowControlWindow: number | null;
|
124 |
+
remoteFlowControlWindow: number | null;
|
125 |
+
}
|
126 |
+
interface ChannelEntry {
|
127 |
+
ref: ChannelRef;
|
128 |
+
getInfo(): ChannelInfo;
|
129 |
+
}
|
130 |
+
interface SubchannelEntry {
|
131 |
+
ref: SubchannelRef;
|
132 |
+
getInfo(): SubchannelInfo;
|
133 |
+
}
|
134 |
+
interface ServerEntry {
|
135 |
+
ref: ServerRef;
|
136 |
+
getInfo(): ServerInfo;
|
137 |
+
}
|
138 |
+
interface SocketEntry {
|
139 |
+
ref: SocketRef;
|
140 |
+
getInfo(): SocketInfo;
|
141 |
+
}
|
142 |
+
export declare const enum EntityTypes {
|
143 |
+
channel = "channel",
|
144 |
+
subchannel = "subchannel",
|
145 |
+
server = "server",
|
146 |
+
socket = "socket"
|
147 |
+
}
|
148 |
+
export type RefByType<T extends EntityTypes> = T extends EntityTypes.channel ? ChannelRef : T extends EntityTypes.server ? ServerRef : T extends EntityTypes.socket ? SocketRef : T extends EntityTypes.subchannel ? SubchannelRef : never;
|
149 |
+
export type EntryByType<T extends EntityTypes> = T extends EntityTypes.channel ? ChannelEntry : T extends EntityTypes.server ? ServerEntry : T extends EntityTypes.socket ? SocketEntry : T extends EntityTypes.subchannel ? SubchannelEntry : never;
|
150 |
+
export type InfoByType<T extends EntityTypes> = T extends EntityTypes.channel ? ChannelInfo : T extends EntityTypes.subchannel ? SubchannelInfo : T extends EntityTypes.server ? ServerInfo : T extends EntityTypes.socket ? SocketInfo : never;
|
151 |
+
export declare const registerChannelzChannel: (name: string, getInfo: () => ChannelInfo, channelzEnabled: boolean) => ChannelRef;
|
152 |
+
export declare const registerChannelzSubchannel: (name: string, getInfo: () => ChannelInfo, channelzEnabled: boolean) => SubchannelRef;
|
153 |
+
export declare const registerChannelzServer: (name: string, getInfo: () => ServerInfo, channelzEnabled: boolean) => ServerRef;
|
154 |
+
export declare const registerChannelzSocket: (name: string, getInfo: () => SocketInfo, channelzEnabled: boolean) => SocketRef;
|
155 |
+
export declare function unregisterChannelzRef(ref: ChannelRef | SubchannelRef | ServerRef | SocketRef): void;
|
156 |
+
export declare function getChannelzHandlers(): ChannelzHandlers;
|
157 |
+
export declare function getChannelzServiceDefinition(): ChannelzDefinition;
|
158 |
+
export declare function setup(): void;
|
159 |
+
export {};
|
node_modules/@grpc/grpc-js/build/src/channelz.js
ADDED
@@ -0,0 +1,584 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
+
* you may not use this file except in compliance with the License.
|
7 |
+
* You may obtain a copy of the License at
|
8 |
+
*
|
9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
*
|
11 |
+
* Unless required by applicable law or agreed to in writing, software
|
12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
+
* See the License for the specific language governing permissions and
|
15 |
+
* limitations under the License.
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
19 |
+
exports.setup = exports.getChannelzServiceDefinition = exports.getChannelzHandlers = exports.unregisterChannelzRef = exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = void 0;
|
20 |
+
const net_1 = require("net");
|
21 |
+
const ordered_map_1 = require("@js-sdsl/ordered-map");
|
22 |
+
const connectivity_state_1 = require("./connectivity-state");
|
23 |
+
const constants_1 = require("./constants");
|
24 |
+
const subchannel_address_1 = require("./subchannel-address");
|
25 |
+
const admin_1 = require("./admin");
|
26 |
+
const make_client_1 = require("./make-client");
|
27 |
+
function channelRefToMessage(ref) {
|
28 |
+
return {
|
29 |
+
channel_id: ref.id,
|
30 |
+
name: ref.name,
|
31 |
+
};
|
32 |
+
}
|
33 |
+
function subchannelRefToMessage(ref) {
|
34 |
+
return {
|
35 |
+
subchannel_id: ref.id,
|
36 |
+
name: ref.name,
|
37 |
+
};
|
38 |
+
}
|
39 |
+
function serverRefToMessage(ref) {
|
40 |
+
return {
|
41 |
+
server_id: ref.id,
|
42 |
+
};
|
43 |
+
}
|
44 |
+
function socketRefToMessage(ref) {
|
45 |
+
return {
|
46 |
+
socket_id: ref.id,
|
47 |
+
name: ref.name,
|
48 |
+
};
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* The loose upper bound on the number of events that should be retained in a
|
52 |
+
* trace. This may be exceeded by up to a factor of 2. Arbitrarily chosen as a
|
53 |
+
* number that should be large enough to contain the recent relevant
|
54 |
+
* information, but small enough to not use excessive memory.
|
55 |
+
*/
|
56 |
+
const TARGET_RETAINED_TRACES = 32;
|
57 |
+
/**
|
58 |
+
* Default number of sockets/servers/channels/subchannels to return
|
59 |
+
*/
|
60 |
+
const DEFAULT_MAX_RESULTS = 100;
|
61 |
+
class ChannelzTraceStub {
|
62 |
+
constructor() {
|
63 |
+
this.events = [];
|
64 |
+
this.creationTimestamp = new Date();
|
65 |
+
this.eventsLogged = 0;
|
66 |
+
}
|
67 |
+
addTrace() { }
|
68 |
+
getTraceMessage() {
|
69 |
+
return {
|
70 |
+
creation_timestamp: dateToProtoTimestamp(this.creationTimestamp),
|
71 |
+
num_events_logged: this.eventsLogged,
|
72 |
+
events: [],
|
73 |
+
};
|
74 |
+
}
|
75 |
+
}
|
76 |
+
exports.ChannelzTraceStub = ChannelzTraceStub;
|
77 |
+
class ChannelzTrace {
|
78 |
+
constructor() {
|
79 |
+
this.events = [];
|
80 |
+
this.eventsLogged = 0;
|
81 |
+
this.creationTimestamp = new Date();
|
82 |
+
}
|
83 |
+
addTrace(severity, description, child) {
|
84 |
+
const timestamp = new Date();
|
85 |
+
this.events.push({
|
86 |
+
description: description,
|
87 |
+
severity: severity,
|
88 |
+
timestamp: timestamp,
|
89 |
+
childChannel: (child === null || child === void 0 ? void 0 : child.kind) === 'channel' ? child : undefined,
|
90 |
+
childSubchannel: (child === null || child === void 0 ? void 0 : child.kind) === 'subchannel' ? child : undefined,
|
91 |
+
});
|
92 |
+
// Whenever the trace array gets too large, discard the first half
|
93 |
+
if (this.events.length >= TARGET_RETAINED_TRACES * 2) {
|
94 |
+
this.events = this.events.slice(TARGET_RETAINED_TRACES);
|
95 |
+
}
|
96 |
+
this.eventsLogged += 1;
|
97 |
+
}
|
98 |
+
getTraceMessage() {
|
99 |
+
return {
|
100 |
+
creation_timestamp: dateToProtoTimestamp(this.creationTimestamp),
|
101 |
+
num_events_logged: this.eventsLogged,
|
102 |
+
events: this.events.map(event => {
|
103 |
+
return {
|
104 |
+
description: event.description,
|
105 |
+
severity: event.severity,
|
106 |
+
timestamp: dateToProtoTimestamp(event.timestamp),
|
107 |
+
channel_ref: event.childChannel
|
108 |
+
? channelRefToMessage(event.childChannel)
|
109 |
+
: null,
|
110 |
+
subchannel_ref: event.childSubchannel
|
111 |
+
? subchannelRefToMessage(event.childSubchannel)
|
112 |
+
: null,
|
113 |
+
};
|
114 |
+
}),
|
115 |
+
};
|
116 |
+
}
|
117 |
+
}
|
118 |
+
exports.ChannelzTrace = ChannelzTrace;
|
119 |
+
class ChannelzChildrenTracker {
|
120 |
+
constructor() {
|
121 |
+
this.channelChildren = new ordered_map_1.OrderedMap();
|
122 |
+
this.subchannelChildren = new ordered_map_1.OrderedMap();
|
123 |
+
this.socketChildren = new ordered_map_1.OrderedMap();
|
124 |
+
this.trackerMap = {
|
125 |
+
["channel" /* EntityTypes.channel */]: this.channelChildren,
|
126 |
+
["subchannel" /* EntityTypes.subchannel */]: this.subchannelChildren,
|
127 |
+
["socket" /* EntityTypes.socket */]: this.socketChildren,
|
128 |
+
};
|
129 |
+
}
|
130 |
+
refChild(child) {
|
131 |
+
const tracker = this.trackerMap[child.kind];
|
132 |
+
const trackedChild = tracker.find(child.id);
|
133 |
+
if (trackedChild.equals(tracker.end())) {
|
134 |
+
tracker.setElement(child.id, {
|
135 |
+
ref: child,
|
136 |
+
count: 1,
|
137 |
+
}, trackedChild);
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
trackedChild.pointer[1].count += 1;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
unrefChild(child) {
|
144 |
+
const tracker = this.trackerMap[child.kind];
|
145 |
+
const trackedChild = tracker.getElementByKey(child.id);
|
146 |
+
if (trackedChild !== undefined) {
|
147 |
+
trackedChild.count -= 1;
|
148 |
+
if (trackedChild.count === 0) {
|
149 |
+
tracker.eraseElementByKey(child.id);
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
getChildLists() {
|
154 |
+
return {
|
155 |
+
channels: this.channelChildren,
|
156 |
+
subchannels: this.subchannelChildren,
|
157 |
+
sockets: this.socketChildren,
|
158 |
+
};
|
159 |
+
}
|
160 |
+
}
|
161 |
+
exports.ChannelzChildrenTracker = ChannelzChildrenTracker;
|
162 |
+
class ChannelzChildrenTrackerStub extends ChannelzChildrenTracker {
|
163 |
+
refChild() { }
|
164 |
+
unrefChild() { }
|
165 |
+
}
|
166 |
+
exports.ChannelzChildrenTrackerStub = ChannelzChildrenTrackerStub;
|
167 |
+
class ChannelzCallTracker {
|
168 |
+
constructor() {
|
169 |
+
this.callsStarted = 0;
|
170 |
+
this.callsSucceeded = 0;
|
171 |
+
this.callsFailed = 0;
|
172 |
+
this.lastCallStartedTimestamp = null;
|
173 |
+
}
|
174 |
+
addCallStarted() {
|
175 |
+
this.callsStarted += 1;
|
176 |
+
this.lastCallStartedTimestamp = new Date();
|
177 |
+
}
|
178 |
+
addCallSucceeded() {
|
179 |
+
this.callsSucceeded += 1;
|
180 |
+
}
|
181 |
+
addCallFailed() {
|
182 |
+
this.callsFailed += 1;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
exports.ChannelzCallTracker = ChannelzCallTracker;
|
186 |
+
class ChannelzCallTrackerStub extends ChannelzCallTracker {
|
187 |
+
addCallStarted() { }
|
188 |
+
addCallSucceeded() { }
|
189 |
+
addCallFailed() { }
|
190 |
+
}
|
191 |
+
exports.ChannelzCallTrackerStub = ChannelzCallTrackerStub;
|
192 |
+
const entityMaps = {
|
193 |
+
["channel" /* EntityTypes.channel */]: new ordered_map_1.OrderedMap(),
|
194 |
+
["subchannel" /* EntityTypes.subchannel */]: new ordered_map_1.OrderedMap(),
|
195 |
+
["server" /* EntityTypes.server */]: new ordered_map_1.OrderedMap(),
|
196 |
+
["socket" /* EntityTypes.socket */]: new ordered_map_1.OrderedMap(),
|
197 |
+
};
|
198 |
+
const generateRegisterFn = (kind) => {
|
199 |
+
let nextId = 1;
|
200 |
+
function getNextId() {
|
201 |
+
return nextId++;
|
202 |
+
}
|
203 |
+
const entityMap = entityMaps[kind];
|
204 |
+
return (name, getInfo, channelzEnabled) => {
|
205 |
+
const id = getNextId();
|
206 |
+
const ref = { id, name, kind };
|
207 |
+
if (channelzEnabled) {
|
208 |
+
entityMap.setElement(id, { ref, getInfo });
|
209 |
+
}
|
210 |
+
return ref;
|
211 |
+
};
|
212 |
+
};
|
213 |
+
exports.registerChannelzChannel = generateRegisterFn("channel" /* EntityTypes.channel */);
|
214 |
+
exports.registerChannelzSubchannel = generateRegisterFn("subchannel" /* EntityTypes.subchannel */);
|
215 |
+
exports.registerChannelzServer = generateRegisterFn("server" /* EntityTypes.server */);
|
216 |
+
exports.registerChannelzSocket = generateRegisterFn("socket" /* EntityTypes.socket */);
|
217 |
+
function unregisterChannelzRef(ref) {
|
218 |
+
entityMaps[ref.kind].eraseElementByKey(ref.id);
|
219 |
+
}
|
220 |
+
exports.unregisterChannelzRef = unregisterChannelzRef;
|
221 |
+
/**
|
222 |
+
* Parse a single section of an IPv6 address as two bytes
|
223 |
+
* @param addressSection A hexadecimal string of length up to 4
|
224 |
+
* @returns The pair of bytes representing this address section
|
225 |
+
*/
|
226 |
+
function parseIPv6Section(addressSection) {
|
227 |
+
const numberValue = Number.parseInt(addressSection, 16);
|
228 |
+
return [(numberValue / 256) | 0, numberValue % 256];
|
229 |
+
}
|
230 |
+
/**
|
231 |
+
* Parse a chunk of an IPv6 address string to some number of bytes
|
232 |
+
* @param addressChunk Some number of segments of up to 4 hexadecimal
|
233 |
+
* characters each, joined by colons.
|
234 |
+
* @returns The list of bytes representing this address chunk
|
235 |
+
*/
|
236 |
+
function parseIPv6Chunk(addressChunk) {
|
237 |
+
if (addressChunk === '') {
|
238 |
+
return [];
|
239 |
+
}
|
240 |
+
const bytePairs = addressChunk
|
241 |
+
.split(':')
|
242 |
+
.map(section => parseIPv6Section(section));
|
243 |
+
const result = [];
|
244 |
+
return result.concat(...bytePairs);
|
245 |
+
}
|
246 |
+
/**
|
247 |
+
* Converts an IPv4 or IPv6 address from string representation to binary
|
248 |
+
* representation
|
249 |
+
* @param ipAddress an IP address in standard IPv4 or IPv6 text format
|
250 |
+
* @returns
|
251 |
+
*/
|
252 |
+
function ipAddressStringToBuffer(ipAddress) {
|
253 |
+
if ((0, net_1.isIPv4)(ipAddress)) {
|
254 |
+
return Buffer.from(Uint8Array.from(ipAddress.split('.').map(segment => Number.parseInt(segment))));
|
255 |
+
}
|
256 |
+
else if ((0, net_1.isIPv6)(ipAddress)) {
|
257 |
+
let leftSection;
|
258 |
+
let rightSection;
|
259 |
+
const doubleColonIndex = ipAddress.indexOf('::');
|
260 |
+
if (doubleColonIndex === -1) {
|
261 |
+
leftSection = ipAddress;
|
262 |
+
rightSection = '';
|
263 |
+
}
|
264 |
+
else {
|
265 |
+
leftSection = ipAddress.substring(0, doubleColonIndex);
|
266 |
+
rightSection = ipAddress.substring(doubleColonIndex + 2);
|
267 |
+
}
|
268 |
+
const leftBuffer = Buffer.from(parseIPv6Chunk(leftSection));
|
269 |
+
const rightBuffer = Buffer.from(parseIPv6Chunk(rightSection));
|
270 |
+
const middleBuffer = Buffer.alloc(16 - leftBuffer.length - rightBuffer.length, 0);
|
271 |
+
return Buffer.concat([leftBuffer, middleBuffer, rightBuffer]);
|
272 |
+
}
|
273 |
+
else {
|
274 |
+
return null;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
function connectivityStateToMessage(state) {
|
278 |
+
switch (state) {
|
279 |
+
case connectivity_state_1.ConnectivityState.CONNECTING:
|
280 |
+
return {
|
281 |
+
state: 'CONNECTING',
|
282 |
+
};
|
283 |
+
case connectivity_state_1.ConnectivityState.IDLE:
|
284 |
+
return {
|
285 |
+
state: 'IDLE',
|
286 |
+
};
|
287 |
+
case connectivity_state_1.ConnectivityState.READY:
|
288 |
+
return {
|
289 |
+
state: 'READY',
|
290 |
+
};
|
291 |
+
case connectivity_state_1.ConnectivityState.SHUTDOWN:
|
292 |
+
return {
|
293 |
+
state: 'SHUTDOWN',
|
294 |
+
};
|
295 |
+
case connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE:
|
296 |
+
return {
|
297 |
+
state: 'TRANSIENT_FAILURE',
|
298 |
+
};
|
299 |
+
default:
|
300 |
+
return {
|
301 |
+
state: 'UNKNOWN',
|
302 |
+
};
|
303 |
+
}
|
304 |
+
}
|
305 |
+
function dateToProtoTimestamp(date) {
|
306 |
+
if (!date) {
|
307 |
+
return null;
|
308 |
+
}
|
309 |
+
const millisSinceEpoch = date.getTime();
|
310 |
+
return {
|
311 |
+
seconds: (millisSinceEpoch / 1000) | 0,
|
312 |
+
nanos: (millisSinceEpoch % 1000) * 1000000,
|
313 |
+
};
|
314 |
+
}
|
315 |
+
function getChannelMessage(channelEntry) {
|
316 |
+
const resolvedInfo = channelEntry.getInfo();
|
317 |
+
const channelRef = [];
|
318 |
+
const subchannelRef = [];
|
319 |
+
resolvedInfo.children.channels.forEach(el => {
|
320 |
+
channelRef.push(channelRefToMessage(el[1].ref));
|
321 |
+
});
|
322 |
+
resolvedInfo.children.subchannels.forEach(el => {
|
323 |
+
subchannelRef.push(subchannelRefToMessage(el[1].ref));
|
324 |
+
});
|
325 |
+
return {
|
326 |
+
ref: channelRefToMessage(channelEntry.ref),
|
327 |
+
data: {
|
328 |
+
target: resolvedInfo.target,
|
329 |
+
state: connectivityStateToMessage(resolvedInfo.state),
|
330 |
+
calls_started: resolvedInfo.callTracker.callsStarted,
|
331 |
+
calls_succeeded: resolvedInfo.callTracker.callsSucceeded,
|
332 |
+
calls_failed: resolvedInfo.callTracker.callsFailed,
|
333 |
+
last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp),
|
334 |
+
trace: resolvedInfo.trace.getTraceMessage(),
|
335 |
+
},
|
336 |
+
channel_ref: channelRef,
|
337 |
+
subchannel_ref: subchannelRef,
|
338 |
+
};
|
339 |
+
}
|
340 |
+
function GetChannel(call, callback) {
|
341 |
+
const channelId = parseInt(call.request.channel_id, 10);
|
342 |
+
const channelEntry = entityMaps["channel" /* EntityTypes.channel */].getElementByKey(channelId);
|
343 |
+
if (channelEntry === undefined) {
|
344 |
+
callback({
|
345 |
+
code: constants_1.Status.NOT_FOUND,
|
346 |
+
details: 'No channel data found for id ' + channelId,
|
347 |
+
});
|
348 |
+
return;
|
349 |
+
}
|
350 |
+
callback(null, { channel: getChannelMessage(channelEntry) });
|
351 |
+
}
|
352 |
+
function GetTopChannels(call, callback) {
|
353 |
+
const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS;
|
354 |
+
const resultList = [];
|
355 |
+
const startId = parseInt(call.request.start_channel_id, 10);
|
356 |
+
const channelEntries = entityMaps["channel" /* EntityTypes.channel */];
|
357 |
+
let i;
|
358 |
+
for (i = channelEntries.lowerBound(startId); !i.equals(channelEntries.end()) && resultList.length < maxResults; i = i.next()) {
|
359 |
+
resultList.push(getChannelMessage(i.pointer[1]));
|
360 |
+
}
|
361 |
+
callback(null, {
|
362 |
+
channel: resultList,
|
363 |
+
end: i.equals(channelEntries.end()),
|
364 |
+
});
|
365 |
+
}
|
366 |
+
function getServerMessage(serverEntry) {
|
367 |
+
const resolvedInfo = serverEntry.getInfo();
|
368 |
+
const listenSocket = [];
|
369 |
+
resolvedInfo.listenerChildren.sockets.forEach(el => {
|
370 |
+
listenSocket.push(socketRefToMessage(el[1].ref));
|
371 |
+
});
|
372 |
+
return {
|
373 |
+
ref: serverRefToMessage(serverEntry.ref),
|
374 |
+
data: {
|
375 |
+
calls_started: resolvedInfo.callTracker.callsStarted,
|
376 |
+
calls_succeeded: resolvedInfo.callTracker.callsSucceeded,
|
377 |
+
calls_failed: resolvedInfo.callTracker.callsFailed,
|
378 |
+
last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp),
|
379 |
+
trace: resolvedInfo.trace.getTraceMessage(),
|
380 |
+
},
|
381 |
+
listen_socket: listenSocket,
|
382 |
+
};
|
383 |
+
}
|
384 |
+
function GetServer(call, callback) {
|
385 |
+
const serverId = parseInt(call.request.server_id, 10);
|
386 |
+
const serverEntries = entityMaps["server" /* EntityTypes.server */];
|
387 |
+
const serverEntry = serverEntries.getElementByKey(serverId);
|
388 |
+
if (serverEntry === undefined) {
|
389 |
+
callback({
|
390 |
+
code: constants_1.Status.NOT_FOUND,
|
391 |
+
details: 'No server data found for id ' + serverId,
|
392 |
+
});
|
393 |
+
return;
|
394 |
+
}
|
395 |
+
callback(null, { server: getServerMessage(serverEntry) });
|
396 |
+
}
|
397 |
+
function GetServers(call, callback) {
|
398 |
+
const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS;
|
399 |
+
const startId = parseInt(call.request.start_server_id, 10);
|
400 |
+
const serverEntries = entityMaps["server" /* EntityTypes.server */];
|
401 |
+
const resultList = [];
|
402 |
+
let i;
|
403 |
+
for (i = serverEntries.lowerBound(startId); !i.equals(serverEntries.end()) && resultList.length < maxResults; i = i.next()) {
|
404 |
+
resultList.push(getServerMessage(i.pointer[1]));
|
405 |
+
}
|
406 |
+
callback(null, {
|
407 |
+
server: resultList,
|
408 |
+
end: i.equals(serverEntries.end()),
|
409 |
+
});
|
410 |
+
}
|
411 |
+
function GetSubchannel(call, callback) {
|
412 |
+
const subchannelId = parseInt(call.request.subchannel_id, 10);
|
413 |
+
const subchannelEntry = entityMaps["subchannel" /* EntityTypes.subchannel */].getElementByKey(subchannelId);
|
414 |
+
if (subchannelEntry === undefined) {
|
415 |
+
callback({
|
416 |
+
code: constants_1.Status.NOT_FOUND,
|
417 |
+
details: 'No subchannel data found for id ' + subchannelId,
|
418 |
+
});
|
419 |
+
return;
|
420 |
+
}
|
421 |
+
const resolvedInfo = subchannelEntry.getInfo();
|
422 |
+
const listenSocket = [];
|
423 |
+
resolvedInfo.children.sockets.forEach(el => {
|
424 |
+
listenSocket.push(socketRefToMessage(el[1].ref));
|
425 |
+
});
|
426 |
+
const subchannelMessage = {
|
427 |
+
ref: subchannelRefToMessage(subchannelEntry.ref),
|
428 |
+
data: {
|
429 |
+
target: resolvedInfo.target,
|
430 |
+
state: connectivityStateToMessage(resolvedInfo.state),
|
431 |
+
calls_started: resolvedInfo.callTracker.callsStarted,
|
432 |
+
calls_succeeded: resolvedInfo.callTracker.callsSucceeded,
|
433 |
+
calls_failed: resolvedInfo.callTracker.callsFailed,
|
434 |
+
last_call_started_timestamp: dateToProtoTimestamp(resolvedInfo.callTracker.lastCallStartedTimestamp),
|
435 |
+
trace: resolvedInfo.trace.getTraceMessage(),
|
436 |
+
},
|
437 |
+
socket_ref: listenSocket,
|
438 |
+
};
|
439 |
+
callback(null, { subchannel: subchannelMessage });
|
440 |
+
}
|
441 |
+
function subchannelAddressToAddressMessage(subchannelAddress) {
|
442 |
+
var _a;
|
443 |
+
if ((0, subchannel_address_1.isTcpSubchannelAddress)(subchannelAddress)) {
|
444 |
+
return {
|
445 |
+
address: 'tcpip_address',
|
446 |
+
tcpip_address: {
|
447 |
+
ip_address: (_a = ipAddressStringToBuffer(subchannelAddress.host)) !== null && _a !== void 0 ? _a : undefined,
|
448 |
+
port: subchannelAddress.port,
|
449 |
+
},
|
450 |
+
};
|
451 |
+
}
|
452 |
+
else {
|
453 |
+
return {
|
454 |
+
address: 'uds_address',
|
455 |
+
uds_address: {
|
456 |
+
filename: subchannelAddress.path,
|
457 |
+
},
|
458 |
+
};
|
459 |
+
}
|
460 |
+
}
|
461 |
+
function GetSocket(call, callback) {
|
462 |
+
var _a, _b, _c, _d, _e;
|
463 |
+
const socketId = parseInt(call.request.socket_id, 10);
|
464 |
+
const socketEntry = entityMaps["socket" /* EntityTypes.socket */].getElementByKey(socketId);
|
465 |
+
if (socketEntry === undefined) {
|
466 |
+
callback({
|
467 |
+
code: constants_1.Status.NOT_FOUND,
|
468 |
+
details: 'No socket data found for id ' + socketId,
|
469 |
+
});
|
470 |
+
return;
|
471 |
+
}
|
472 |
+
const resolvedInfo = socketEntry.getInfo();
|
473 |
+
const securityMessage = resolvedInfo.security
|
474 |
+
? {
|
475 |
+
model: 'tls',
|
476 |
+
tls: {
|
477 |
+
cipher_suite: resolvedInfo.security.cipherSuiteStandardName
|
478 |
+
? 'standard_name'
|
479 |
+
: 'other_name',
|
480 |
+
standard_name: (_a = resolvedInfo.security.cipherSuiteStandardName) !== null && _a !== void 0 ? _a : undefined,
|
481 |
+
other_name: (_b = resolvedInfo.security.cipherSuiteOtherName) !== null && _b !== void 0 ? _b : undefined,
|
482 |
+
local_certificate: (_c = resolvedInfo.security.localCertificate) !== null && _c !== void 0 ? _c : undefined,
|
483 |
+
remote_certificate: (_d = resolvedInfo.security.remoteCertificate) !== null && _d !== void 0 ? _d : undefined,
|
484 |
+
},
|
485 |
+
}
|
486 |
+
: null;
|
487 |
+
const socketMessage = {
|
488 |
+
ref: socketRefToMessage(socketEntry.ref),
|
489 |
+
local: resolvedInfo.localAddress
|
490 |
+
? subchannelAddressToAddressMessage(resolvedInfo.localAddress)
|
491 |
+
: null,
|
492 |
+
remote: resolvedInfo.remoteAddress
|
493 |
+
? subchannelAddressToAddressMessage(resolvedInfo.remoteAddress)
|
494 |
+
: null,
|
495 |
+
remote_name: (_e = resolvedInfo.remoteName) !== null && _e !== void 0 ? _e : undefined,
|
496 |
+
security: securityMessage,
|
497 |
+
data: {
|
498 |
+
keep_alives_sent: resolvedInfo.keepAlivesSent,
|
499 |
+
streams_started: resolvedInfo.streamsStarted,
|
500 |
+
streams_succeeded: resolvedInfo.streamsSucceeded,
|
501 |
+
streams_failed: resolvedInfo.streamsFailed,
|
502 |
+
last_local_stream_created_timestamp: dateToProtoTimestamp(resolvedInfo.lastLocalStreamCreatedTimestamp),
|
503 |
+
last_remote_stream_created_timestamp: dateToProtoTimestamp(resolvedInfo.lastRemoteStreamCreatedTimestamp),
|
504 |
+
messages_received: resolvedInfo.messagesReceived,
|
505 |
+
messages_sent: resolvedInfo.messagesSent,
|
506 |
+
last_message_received_timestamp: dateToProtoTimestamp(resolvedInfo.lastMessageReceivedTimestamp),
|
507 |
+
last_message_sent_timestamp: dateToProtoTimestamp(resolvedInfo.lastMessageSentTimestamp),
|
508 |
+
local_flow_control_window: resolvedInfo.localFlowControlWindow
|
509 |
+
? { value: resolvedInfo.localFlowControlWindow }
|
510 |
+
: null,
|
511 |
+
remote_flow_control_window: resolvedInfo.remoteFlowControlWindow
|
512 |
+
? { value: resolvedInfo.remoteFlowControlWindow }
|
513 |
+
: null,
|
514 |
+
},
|
515 |
+
};
|
516 |
+
callback(null, { socket: socketMessage });
|
517 |
+
}
|
518 |
+
function GetServerSockets(call, callback) {
|
519 |
+
const serverId = parseInt(call.request.server_id, 10);
|
520 |
+
const serverEntry = entityMaps["server" /* EntityTypes.server */].getElementByKey(serverId);
|
521 |
+
if (serverEntry === undefined) {
|
522 |
+
callback({
|
523 |
+
code: constants_1.Status.NOT_FOUND,
|
524 |
+
details: 'No server data found for id ' + serverId,
|
525 |
+
});
|
526 |
+
return;
|
527 |
+
}
|
528 |
+
const startId = parseInt(call.request.start_socket_id, 10);
|
529 |
+
const maxResults = parseInt(call.request.max_results, 10) || DEFAULT_MAX_RESULTS;
|
530 |
+
const resolvedInfo = serverEntry.getInfo();
|
531 |
+
// If we wanted to include listener sockets in the result, this line would
|
532 |
+
// instead say
|
533 |
+
// const allSockets = resolvedInfo.listenerChildren.sockets.concat(resolvedInfo.sessionChildren.sockets).sort((ref1, ref2) => ref1.id - ref2.id);
|
534 |
+
const allSockets = resolvedInfo.sessionChildren.sockets;
|
535 |
+
const resultList = [];
|
536 |
+
let i;
|
537 |
+
for (i = allSockets.lowerBound(startId); !i.equals(allSockets.end()) && resultList.length < maxResults; i = i.next()) {
|
538 |
+
resultList.push(socketRefToMessage(i.pointer[1].ref));
|
539 |
+
}
|
540 |
+
callback(null, {
|
541 |
+
socket_ref: resultList,
|
542 |
+
end: i.equals(allSockets.end()),
|
543 |
+
});
|
544 |
+
}
|
545 |
+
function getChannelzHandlers() {
|
546 |
+
return {
|
547 |
+
GetChannel,
|
548 |
+
GetTopChannels,
|
549 |
+
GetServer,
|
550 |
+
GetServers,
|
551 |
+
GetSubchannel,
|
552 |
+
GetSocket,
|
553 |
+
GetServerSockets,
|
554 |
+
};
|
555 |
+
}
|
556 |
+
exports.getChannelzHandlers = getChannelzHandlers;
|
557 |
+
let loadedChannelzDefinition = null;
|
558 |
+
function getChannelzServiceDefinition() {
|
559 |
+
if (loadedChannelzDefinition) {
|
560 |
+
return loadedChannelzDefinition;
|
561 |
+
}
|
562 |
+
/* The purpose of this complexity is to avoid loading @grpc/proto-loader at
|
563 |
+
* runtime for users who will not use/enable channelz. */
|
564 |
+
const loaderLoadSync = require('@grpc/proto-loader')
|
565 |
+
.loadSync;
|
566 |
+
const loadedProto = loaderLoadSync('channelz.proto', {
|
567 |
+
keepCase: true,
|
568 |
+
longs: String,
|
569 |
+
enums: String,
|
570 |
+
defaults: true,
|
571 |
+
oneofs: true,
|
572 |
+
includeDirs: [`${__dirname}/../../proto`],
|
573 |
+
});
|
574 |
+
const channelzGrpcObject = (0, make_client_1.loadPackageDefinition)(loadedProto);
|
575 |
+
loadedChannelzDefinition =
|
576 |
+
channelzGrpcObject.grpc.channelz.v1.Channelz.service;
|
577 |
+
return loadedChannelzDefinition;
|
578 |
+
}
|
579 |
+
exports.getChannelzServiceDefinition = getChannelzServiceDefinition;
|
580 |
+
function setup() {
|
581 |
+
(0, admin_1.registerAdminService)(getChannelzServiceDefinition, getChannelzHandlers);
|
582 |
+
}
|
583 |
+
exports.setup = setup;
|
584 |
+
//# sourceMappingURL=channelz.js.map
|
node_modules/@grpc/grpc-js/build/src/channelz.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"channelz.js","sourceRoot":"","sources":["../../src/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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Metadata } from './metadata';
|
2 |
+
import { Listener, MetadataListener, MessageListener, StatusListener, InterceptingListener, MessageContext } from './call-interface';
|
3 |
+
import { Status } from './constants';
|
4 |
+
import { Channel } from './channel';
|
5 |
+
import { CallOptions } from './client';
|
6 |
+
import { ClientMethodDefinition } from './make-client';
|
7 |
+
/**
|
8 |
+
* Error class associated with passing both interceptors and interceptor
|
9 |
+
* providers to a client constructor or as call options.
|
10 |
+
*/
|
11 |
+
export declare class InterceptorConfigurationError extends Error {
|
12 |
+
constructor(message: string);
|
13 |
+
}
|
14 |
+
export interface MetadataRequester {
|
15 |
+
(metadata: Metadata, listener: InterceptingListener, next: (metadata: Metadata, listener: InterceptingListener | Listener) => void): void;
|
16 |
+
}
|
17 |
+
export interface MessageRequester {
|
18 |
+
(message: any, next: (message: any) => void): void;
|
19 |
+
}
|
20 |
+
export interface CloseRequester {
|
21 |
+
(next: () => void): void;
|
22 |
+
}
|
23 |
+
export interface CancelRequester {
|
24 |
+
(next: () => void): void;
|
25 |
+
}
|
26 |
+
/**
|
27 |
+
* An object with methods for intercepting and modifying outgoing call operations.
|
28 |
+
*/
|
29 |
+
export interface FullRequester {
|
30 |
+
start: MetadataRequester;
|
31 |
+
sendMessage: MessageRequester;
|
32 |
+
halfClose: CloseRequester;
|
33 |
+
cancel: CancelRequester;
|
34 |
+
}
|
35 |
+
export type Requester = Partial<FullRequester>;
|
36 |
+
export declare class ListenerBuilder {
|
37 |
+
private metadata;
|
38 |
+
private message;
|
39 |
+
private status;
|
40 |
+
withOnReceiveMetadata(onReceiveMetadata: MetadataListener): this;
|
41 |
+
withOnReceiveMessage(onReceiveMessage: MessageListener): this;
|
42 |
+
withOnReceiveStatus(onReceiveStatus: StatusListener): this;
|
43 |
+
build(): Listener;
|
44 |
+
}
|
45 |
+
export declare class RequesterBuilder {
|
46 |
+
private start;
|
47 |
+
private message;
|
48 |
+
private halfClose;
|
49 |
+
private cancel;
|
50 |
+
withStart(start: MetadataRequester): this;
|
51 |
+
withSendMessage(sendMessage: MessageRequester): this;
|
52 |
+
withHalfClose(halfClose: CloseRequester): this;
|
53 |
+
withCancel(cancel: CancelRequester): this;
|
54 |
+
build(): Requester;
|
55 |
+
}
|
56 |
+
export interface InterceptorOptions extends CallOptions {
|
57 |
+
method_definition: ClientMethodDefinition<any, any>;
|
58 |
+
}
|
59 |
+
export interface InterceptingCallInterface {
|
60 |
+
cancelWithStatus(status: Status, details: string): void;
|
61 |
+
getPeer(): string;
|
62 |
+
start(metadata: Metadata, listener?: Partial<InterceptingListener>): void;
|
63 |
+
sendMessageWithContext(context: MessageContext, message: any): void;
|
64 |
+
sendMessage(message: any): void;
|
65 |
+
startRead(): void;
|
66 |
+
halfClose(): void;
|
67 |
+
}
|
68 |
+
export declare class InterceptingCall implements InterceptingCallInterface {
|
69 |
+
private nextCall;
|
70 |
+
/**
|
71 |
+
* The requester that this InterceptingCall uses to modify outgoing operations
|
72 |
+
*/
|
73 |
+
private requester;
|
74 |
+
/**
|
75 |
+
* Indicates that metadata has been passed to the requester's start
|
76 |
+
* method but it has not been passed to the corresponding next callback
|
77 |
+
*/
|
78 |
+
private processingMetadata;
|
79 |
+
/**
|
80 |
+
* Message context for a pending message that is waiting for
|
81 |
+
*/
|
82 |
+
private pendingMessageContext;
|
83 |
+
private pendingMessage;
|
84 |
+
/**
|
85 |
+
* Indicates that a message has been passed to the requester's sendMessage
|
86 |
+
* method but it has not been passed to the corresponding next callback
|
87 |
+
*/
|
88 |
+
private processingMessage;
|
89 |
+
/**
|
90 |
+
* Indicates that a status was received but could not be propagated because
|
91 |
+
* a message was still being processed.
|
92 |
+
*/
|
93 |
+
private pendingHalfClose;
|
94 |
+
constructor(nextCall: InterceptingCallInterface, requester?: Requester);
|
95 |
+
cancelWithStatus(status: Status, details: string): void;
|
96 |
+
getPeer(): string;
|
97 |
+
private processPendingMessage;
|
98 |
+
private processPendingHalfClose;
|
99 |
+
start(metadata: Metadata, interceptingListener?: Partial<InterceptingListener>): void;
|
100 |
+
sendMessageWithContext(context: MessageContext, message: any): void;
|
101 |
+
sendMessage(message: any): void;
|
102 |
+
startRead(): void;
|
103 |
+
halfClose(): void;
|
104 |
+
}
|
105 |
+
export interface NextCall {
|
106 |
+
(options: InterceptorOptions): InterceptingCallInterface;
|
107 |
+
}
|
108 |
+
export interface Interceptor {
|
109 |
+
(options: InterceptorOptions, nextCall: NextCall): InterceptingCall;
|
110 |
+
}
|
111 |
+
export interface InterceptorProvider {
|
112 |
+
(methodDefinition: ClientMethodDefinition<any, any>): Interceptor;
|
113 |
+
}
|
114 |
+
export interface InterceptorArguments {
|
115 |
+
clientInterceptors: Interceptor[];
|
116 |
+
clientInterceptorProviders: InterceptorProvider[];
|
117 |
+
callInterceptors: Interceptor[];
|
118 |
+
callInterceptorProviders: InterceptorProvider[];
|
119 |
+
}
|
120 |
+
export declare function getInterceptingCall(interceptorArgs: InterceptorArguments, methodDefinition: ClientMethodDefinition<any, any>, options: CallOptions, channel: Channel): InterceptingCallInterface;
|