@ooraini/pgquic 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSES/THIRD_PARTY_LICENSES.txt +385 -0
- package/README.md +29 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.js +7184 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pgquic contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
Third-party licenses for @ooraini/pgquic
|
|
2
|
+
|
|
3
|
+
Generated from the packages bundled in dist/index.js.
|
|
4
|
+
|
|
5
|
+
==============================================================================
|
|
6
|
+
base64-js@1.5.1 (MIT)
|
|
7
|
+
==============================================================================
|
|
8
|
+
The MIT License (MIT)
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2014 Jameson Little
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in
|
|
20
|
+
all copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
+
THE SOFTWARE.
|
|
29
|
+
|
|
30
|
+
==============================================================================
|
|
31
|
+
buffer@6.0.3 (MIT)
|
|
32
|
+
==============================================================================
|
|
33
|
+
The MIT License (MIT)
|
|
34
|
+
|
|
35
|
+
Copyright (c) Feross Aboukhadijeh, and other contributors.
|
|
36
|
+
|
|
37
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
39
|
+
in the Software without restriction, including without limitation the rights
|
|
40
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
41
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
42
|
+
furnished to do so, subject to the following conditions:
|
|
43
|
+
|
|
44
|
+
The above copyright notice and this permission notice shall be included in
|
|
45
|
+
all copies or substantial portions of the Software.
|
|
46
|
+
|
|
47
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
48
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
49
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
50
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
51
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
52
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
53
|
+
THE SOFTWARE.
|
|
54
|
+
|
|
55
|
+
==============================================================================
|
|
56
|
+
events@3.3.0 (MIT)
|
|
57
|
+
==============================================================================
|
|
58
|
+
MIT
|
|
59
|
+
|
|
60
|
+
Copyright Joyent, Inc. and other Node contributors.
|
|
61
|
+
|
|
62
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
63
|
+
copy of this software and associated documentation files (the
|
|
64
|
+
"Software"), to deal in the Software without restriction, including
|
|
65
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
66
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
67
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
68
|
+
following conditions:
|
|
69
|
+
|
|
70
|
+
The above copyright notice and this permission notice shall be included
|
|
71
|
+
in all copies or substantial portions of the Software.
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
74
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
75
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
76
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
77
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
78
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
79
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
80
|
+
|
|
81
|
+
==============================================================================
|
|
82
|
+
ieee754@1.2.1 (BSD-3-Clause)
|
|
83
|
+
==============================================================================
|
|
84
|
+
Copyright 2008 Fair Oaks Labs, Inc.
|
|
85
|
+
|
|
86
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
87
|
+
|
|
88
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
89
|
+
|
|
90
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
91
|
+
|
|
92
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
93
|
+
|
|
94
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
95
|
+
|
|
96
|
+
==============================================================================
|
|
97
|
+
pg-cloudflare@1.4.0 (MIT)
|
|
98
|
+
==============================================================================
|
|
99
|
+
MIT License
|
|
100
|
+
|
|
101
|
+
Copyright (c) 2010 - 2021 Brian Carlson
|
|
102
|
+
|
|
103
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
104
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
105
|
+
in the Software without restriction, including without limitation the rights
|
|
106
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
107
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
108
|
+
furnished to do so, subject to the following conditions:
|
|
109
|
+
|
|
110
|
+
The above copyright notice and this permission notice shall be included in all
|
|
111
|
+
copies or substantial portions of the Software.
|
|
112
|
+
|
|
113
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
114
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
115
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
116
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
117
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
118
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
119
|
+
SOFTWARE.
|
|
120
|
+
|
|
121
|
+
==============================================================================
|
|
122
|
+
pg-connection-string@2.14.0 (MIT)
|
|
123
|
+
==============================================================================
|
|
124
|
+
The MIT License (MIT)
|
|
125
|
+
|
|
126
|
+
Copyright (c) 2014 Iced Development
|
|
127
|
+
|
|
128
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
129
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
130
|
+
in the Software without restriction, including without limitation the rights
|
|
131
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
132
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
133
|
+
furnished to do so, subject to the following conditions:
|
|
134
|
+
|
|
135
|
+
The above copyright notice and this permission notice shall be included in all
|
|
136
|
+
copies or substantial portions of the Software.
|
|
137
|
+
|
|
138
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
139
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
140
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
141
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
142
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
143
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
144
|
+
SOFTWARE.
|
|
145
|
+
|
|
146
|
+
==============================================================================
|
|
147
|
+
pg-int8@1.0.1 (ISC)
|
|
148
|
+
==============================================================================
|
|
149
|
+
Copyright © 2017, Charmander <~@charmander.me>
|
|
150
|
+
|
|
151
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
152
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
153
|
+
copyright notice and this permission notice appear in all copies.
|
|
154
|
+
|
|
155
|
+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
156
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
157
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
158
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
159
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
160
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
161
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
162
|
+
|
|
163
|
+
==============================================================================
|
|
164
|
+
pg-pool@3.14.0 (MIT)
|
|
165
|
+
==============================================================================
|
|
166
|
+
MIT License
|
|
167
|
+
|
|
168
|
+
Copyright (c) 2017 Brian M. Carlson
|
|
169
|
+
|
|
170
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
171
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
172
|
+
in the Software without restriction, including without limitation the rights
|
|
173
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
174
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
175
|
+
furnished to do so, subject to the following conditions:
|
|
176
|
+
|
|
177
|
+
The above copyright notice and this permission notice shall be included in all
|
|
178
|
+
copies or substantial portions of the Software.
|
|
179
|
+
|
|
180
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
181
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
182
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
183
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
184
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
185
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
186
|
+
SOFTWARE.
|
|
187
|
+
|
|
188
|
+
==============================================================================
|
|
189
|
+
pg-protocol@1.16.0 (MIT)
|
|
190
|
+
==============================================================================
|
|
191
|
+
MIT License
|
|
192
|
+
|
|
193
|
+
Copyright (c) 2010 - 2021 Brian Carlson
|
|
194
|
+
|
|
195
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
196
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
197
|
+
in the Software without restriction, including without limitation the rights
|
|
198
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
199
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
200
|
+
furnished to do so, subject to the following conditions:
|
|
201
|
+
|
|
202
|
+
The above copyright notice and this permission notice shall be included in all
|
|
203
|
+
copies or substantial portions of the Software.
|
|
204
|
+
|
|
205
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
206
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
207
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
208
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
209
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
210
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
211
|
+
SOFTWARE.
|
|
212
|
+
|
|
213
|
+
==============================================================================
|
|
214
|
+
pg-types@2.2.0 (MIT)
|
|
215
|
+
==============================================================================
|
|
216
|
+
The MIT License (MIT)
|
|
217
|
+
|
|
218
|
+
Copyright (c) 2014 Brian M. Carlson
|
|
219
|
+
|
|
220
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
221
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
222
|
+
in the Software without restriction, including without limitation the rights
|
|
223
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
224
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
225
|
+
furnished to do so, subject to the following conditions:
|
|
226
|
+
|
|
227
|
+
The above copyright notice and this permission notice shall be included in
|
|
228
|
+
all copies or substantial portions of the Software.
|
|
229
|
+
|
|
230
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
231
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
232
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
233
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
234
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
235
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
236
|
+
THE SOFTWARE.
|
|
237
|
+
|
|
238
|
+
==============================================================================
|
|
239
|
+
pg@8.23.0 (MIT)
|
|
240
|
+
==============================================================================
|
|
241
|
+
MIT License
|
|
242
|
+
|
|
243
|
+
Copyright (c) 2010 - 2021 Brian Carlson
|
|
244
|
+
|
|
245
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
246
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
247
|
+
in the Software without restriction, including without limitation the rights
|
|
248
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
249
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
250
|
+
furnished to do so, subject to the following conditions:
|
|
251
|
+
|
|
252
|
+
The above copyright notice and this permission notice shall be included in all
|
|
253
|
+
copies or substantial portions of the Software.
|
|
254
|
+
|
|
255
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
256
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
257
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
258
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
259
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
260
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
261
|
+
SOFTWARE.
|
|
262
|
+
|
|
263
|
+
==============================================================================
|
|
264
|
+
postgres-array@2.0.0 (MIT)
|
|
265
|
+
==============================================================================
|
|
266
|
+
The MIT License (MIT)
|
|
267
|
+
|
|
268
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
269
|
+
|
|
270
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
271
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
272
|
+
in the Software without restriction, including without limitation the rights
|
|
273
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
274
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
275
|
+
furnished to do so, subject to the following conditions:
|
|
276
|
+
|
|
277
|
+
The above copyright notice and this permission notice shall be included in
|
|
278
|
+
all copies or substantial portions of the Software.
|
|
279
|
+
|
|
280
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
281
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
282
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
283
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
284
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
285
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
286
|
+
THE SOFTWARE.
|
|
287
|
+
|
|
288
|
+
==============================================================================
|
|
289
|
+
postgres-bytea@1.0.1 (MIT)
|
|
290
|
+
==============================================================================
|
|
291
|
+
The MIT License (MIT)
|
|
292
|
+
|
|
293
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
294
|
+
|
|
295
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
296
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
297
|
+
in the Software without restriction, including without limitation the rights
|
|
298
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
299
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
300
|
+
furnished to do so, subject to the following conditions:
|
|
301
|
+
|
|
302
|
+
The above copyright notice and this permission notice shall be included in
|
|
303
|
+
all copies or substantial portions of the Software.
|
|
304
|
+
|
|
305
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
306
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
307
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
308
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
309
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
310
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
311
|
+
THE SOFTWARE.
|
|
312
|
+
|
|
313
|
+
==============================================================================
|
|
314
|
+
postgres-date@1.0.7 (MIT)
|
|
315
|
+
==============================================================================
|
|
316
|
+
The MIT License (MIT)
|
|
317
|
+
|
|
318
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
319
|
+
|
|
320
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
321
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
322
|
+
in the Software without restriction, including without limitation the rights
|
|
323
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
324
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
325
|
+
furnished to do so, subject to the following conditions:
|
|
326
|
+
|
|
327
|
+
The above copyright notice and this permission notice shall be included in
|
|
328
|
+
all copies or substantial portions of the Software.
|
|
329
|
+
|
|
330
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
331
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
332
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
333
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
334
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
335
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
336
|
+
THE SOFTWARE.
|
|
337
|
+
|
|
338
|
+
==============================================================================
|
|
339
|
+
postgres-interval@1.2.0 (MIT)
|
|
340
|
+
==============================================================================
|
|
341
|
+
The MIT License (MIT)
|
|
342
|
+
|
|
343
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
344
|
+
|
|
345
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
346
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
347
|
+
in the Software without restriction, including without limitation the rights
|
|
348
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
349
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
350
|
+
furnished to do so, subject to the following conditions:
|
|
351
|
+
|
|
352
|
+
The above copyright notice and this permission notice shall be included in
|
|
353
|
+
all copies or substantial portions of the Software.
|
|
354
|
+
|
|
355
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
356
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
357
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
358
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
359
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
360
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
361
|
+
THE SOFTWARE.
|
|
362
|
+
|
|
363
|
+
==============================================================================
|
|
364
|
+
xtend@4.0.2 (MIT)
|
|
365
|
+
==============================================================================
|
|
366
|
+
The MIT License (MIT)
|
|
367
|
+
Copyright (c) 2012-2014 Raynos.
|
|
368
|
+
|
|
369
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
370
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
371
|
+
in the Software without restriction, including without limitation the rights
|
|
372
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
373
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
374
|
+
furnished to do so, subject to the following conditions:
|
|
375
|
+
|
|
376
|
+
The above copyright notice and this permission notice shall be included in
|
|
377
|
+
all copies or substantial portions of the Software.
|
|
378
|
+
|
|
379
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
380
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
381
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
382
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
383
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
384
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
385
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @ooraini/pgquic
|
|
2
|
+
|
|
3
|
+
Connect to PostgreSQL from the browser over WebTransport.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @ooraini/pgquic
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Pool, PgWebTransport } from "@ooraini/pgquic";
|
|
11
|
+
|
|
12
|
+
const transport = new PgWebTransport({
|
|
13
|
+
url: "https://db.example.com/v1/session",
|
|
14
|
+
token: () => getAccessToken(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const pool = new Pool({
|
|
18
|
+
transport,
|
|
19
|
+
user: "app_user",
|
|
20
|
+
password: "password",
|
|
21
|
+
database: "app",
|
|
22
|
+
ssl: false,
|
|
23
|
+
enableChannelBinding: false,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const result = await pool.query("select now()");
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The package requires a [pgquic gateway](https://github.com/ooraini/pgquic). See the repository for gateway configuration and deployment.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ClientConfig, PoolConfig } from 'pg';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
type TokenProvider = string | (() => string | Promise<string>);
|
|
5
|
+
interface CertificateHash {
|
|
6
|
+
algorithm: "sha-256";
|
|
7
|
+
value: BufferSource;
|
|
8
|
+
}
|
|
9
|
+
interface PgWebTransportOptions {
|
|
10
|
+
url: string;
|
|
11
|
+
token?: TokenProvider;
|
|
12
|
+
serverCertificateHashes?: CertificateHash[];
|
|
13
|
+
maxConnections?: number;
|
|
14
|
+
highWaterMark?: number;
|
|
15
|
+
lowWaterMark?: number;
|
|
16
|
+
maxQueuedBytes?: number;
|
|
17
|
+
reconnectBaseDelayMs?: number;
|
|
18
|
+
reconnectMaxDelayMs?: number;
|
|
19
|
+
/** Test/runtime injection. Normal browser users should leave this unset. */
|
|
20
|
+
webTransportFactory?: (url: string, options: Record<string, unknown>) => WebTransportLike;
|
|
21
|
+
}
|
|
22
|
+
interface WebTransportLike {
|
|
23
|
+
ready: Promise<void>;
|
|
24
|
+
closed: Promise<unknown>;
|
|
25
|
+
createBidirectionalStream(): Promise<WebTransportBidirectionalStream>;
|
|
26
|
+
close(options?: {
|
|
27
|
+
closeCode?: number;
|
|
28
|
+
reason?: string;
|
|
29
|
+
}): void;
|
|
30
|
+
}
|
|
31
|
+
interface TransportState {
|
|
32
|
+
status: "idle" | "connecting" | "ready" | "backoff" | "closed";
|
|
33
|
+
generation: number;
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
activeConnections: number;
|
|
36
|
+
maxConnections: number;
|
|
37
|
+
totalSessions: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class PgWebTransport extends EventTarget {
|
|
41
|
+
private readonly options;
|
|
42
|
+
readonly queueLimits: {
|
|
43
|
+
high: number;
|
|
44
|
+
low: number;
|
|
45
|
+
maximum: number;
|
|
46
|
+
};
|
|
47
|
+
private session?;
|
|
48
|
+
private connecting?;
|
|
49
|
+
private sockets;
|
|
50
|
+
private status;
|
|
51
|
+
private generation;
|
|
52
|
+
private totalSessions;
|
|
53
|
+
private sessionId?;
|
|
54
|
+
private terminal;
|
|
55
|
+
private lastFailureAt;
|
|
56
|
+
private failures;
|
|
57
|
+
constructor(options: PgWebTransportOptions);
|
|
58
|
+
get state(): TransportState;
|
|
59
|
+
createSocket(): PgWebTransportSocket;
|
|
60
|
+
openStream(socket: PgWebTransportSocket): Promise<WebTransportBidirectionalStream>;
|
|
61
|
+
release(socket: PgWebTransportSocket): void;
|
|
62
|
+
private ensureSession;
|
|
63
|
+
private connectSession;
|
|
64
|
+
private sessionFailed;
|
|
65
|
+
private noteFailure;
|
|
66
|
+
close(): Promise<void>;
|
|
67
|
+
private changed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class PgWebTransportSocket extends EventEmitter {
|
|
71
|
+
private readonly transport;
|
|
72
|
+
private readonly limits;
|
|
73
|
+
writable: boolean;
|
|
74
|
+
connecting: boolean;
|
|
75
|
+
destroyed: boolean;
|
|
76
|
+
readonly generation: number | undefined;
|
|
77
|
+
private stream?;
|
|
78
|
+
private writer?;
|
|
79
|
+
private reader?;
|
|
80
|
+
private queue;
|
|
81
|
+
private queuedBytes;
|
|
82
|
+
private pumping;
|
|
83
|
+
private pressured;
|
|
84
|
+
private closeEmitted;
|
|
85
|
+
constructor(transport: PgWebTransport, limits?: {
|
|
86
|
+
high: number;
|
|
87
|
+
low: number;
|
|
88
|
+
maximum: number;
|
|
89
|
+
});
|
|
90
|
+
connect(..._ignored: unknown[]): this;
|
|
91
|
+
private open;
|
|
92
|
+
write(chunk: Uint8Array | string, encoding?: BufferEncoding, callback?: (error?: Error) => void): boolean;
|
|
93
|
+
private pump;
|
|
94
|
+
private readLoop;
|
|
95
|
+
end(chunk?: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
|
96
|
+
destroy(error?: Error): this;
|
|
97
|
+
private fail;
|
|
98
|
+
private finishClose;
|
|
99
|
+
setNoDelay(_enabled?: boolean): this;
|
|
100
|
+
setKeepAlive(_enabled?: boolean, _delay?: number): this;
|
|
101
|
+
ref(): this;
|
|
102
|
+
unref(): this;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface PgquicClientConfig extends ClientConfig {
|
|
106
|
+
transport: PgWebTransport;
|
|
107
|
+
enableChannelBinding?: boolean;
|
|
108
|
+
}
|
|
109
|
+
interface PgquicPoolConfig extends PoolConfig {
|
|
110
|
+
transport: PgWebTransport;
|
|
111
|
+
enableChannelBinding?: boolean;
|
|
112
|
+
}
|
|
113
|
+
declare const Client_base: any;
|
|
114
|
+
declare class Client extends Client_base {
|
|
115
|
+
constructor(config: PgquicClientConfig);
|
|
116
|
+
}
|
|
117
|
+
declare const Pool_base: any;
|
|
118
|
+
declare class Pool extends Pool_base {
|
|
119
|
+
constructor(config: PgquicPoolConfig);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { Client, PgWebTransport, type PgWebTransportOptions, PgWebTransportSocket, type PgquicClientConfig, type PgquicPoolConfig, Pool, type TokenProvider, type TransportState };
|