@viberaven/sessions 0.0.0-stage → 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 +202 -0
- package/NOTICE +41 -0
- package/README.md +136 -2
- package/THIRD_PARTY_NOTICES +6770 -0
- package/dist/browser.mjs +2642 -0
- package/examples/quickstart.mjs +11 -0
- package/licenses/Emscripten.txt +101 -0
- package/licenses/ICU.txt +542 -0
- package/licenses/OSSP-UUID.txt +24 -0
- package/licenses/OpenSSL.txt +177 -0
- package/licenses/PGlite.txt +176 -0
- package/licenses/PostgreSQL-extra.txt +3592 -0
- package/licenses/PostgreSQL.txt +23 -0
- package/licenses/README.md +36 -0
- package/licenses/Snowball.txt +29 -0
- package/licenses/async-mutex.txt +21 -0
- package/licenses/base64-js.txt +21 -0
- package/licenses/buffer.txt +21 -0
- package/licenses/compiler-rt.txt +311 -0
- package/licenses/dlmalloc.txt +135 -0
- package/licenses/esbuild.txt +21 -0
- package/licenses/ieee754.txt +11 -0
- package/licenses/libcxx.txt +311 -0
- package/licenses/libcxxabi.txt +311 -0
- package/licenses/libunwind.txt +311 -0
- package/licenses/libxml2-extra.txt +34 -0
- package/licenses/libxml2.txt +24 -0
- package/licenses/libxslt.txt +53 -0
- package/licenses/musl.txt +193 -0
- package/licenses/pg-protocol.txt +21 -0
- package/licenses/tinytar.txt +21 -0
- package/licenses/tslib.txt +28 -0
- package/licenses/tsup.txt +21 -0
- package/licenses/zlib.txt +22 -0
- package/package.json +74 -4
- package/runtime/engine/frozen/runtime/engine-host.mjs +377 -0
- package/runtime/engine/frozen/runtime/engine-logs/static-layout.json +21357 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/amcheck.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/auth_delay.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/auto_explain.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/basebackup_to_shell.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/basic_archive.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/bloom.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/btree_gin.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/btree_gist.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-5L4W4HOZ.js +3 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-C56CJGL3.js +6 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-CMNLZGEJ.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-DAMXLPQW.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-EZSFBMVG.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-GS6VKQIC.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-OCWZREWN.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-UQDQKWPM.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-YFZE77YQ.js +9 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/citext.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/amcheck.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/auto_explain.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/bloom.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/btree_gin.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/btree_gist.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/citext.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/cube.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/dict_int.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/dict_xsyn.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/earthdistance.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/file_fdw.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/fuzzystrmatch.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/hstore.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/intarray.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/isn.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/lo.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/ltree.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/moddatetime.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pageinspect.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_buffercache.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_freespacemap.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_stat_statements.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_surgery.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_trgm.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_visibility.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_walinspect.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pgcrypto.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/seg.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tablefunc.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tcn.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tsm_system_rows.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tsm_system_time.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/unaccent.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/uuid_ossp.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/cube.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dblink.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dict_int.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dict_xsyn.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/earthdistance.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/file_fdw.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/base.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/memfs-frontend.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/memfs2opfs.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/nodefs.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/opfs-ahp.js +4 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fuzzystrmatch.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/hstore.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/index.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/initdb.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/initdb.wasm +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/intagg.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/intarray.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/isn.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/live/index.js +134 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/lo.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/ltree.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/node-postgres/index.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/oid2name.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pageinspect.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/passwordcheck.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_buffercache.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_freespacemap.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_logicalinspect.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_overexplain.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_prewarm.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_stat_statements.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_surgery.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_trgm.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_visibility.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_walinspect.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgcrypto.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.data +37614 -8
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.wasm +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgrowlocks.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgstattuple.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/postgres_fdw.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/seg.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/spi.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tablefunc.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tcn.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/templating.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/test_decoding.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tsm_system_rows.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tsm_system_time.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/unaccent.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/uuid-ossp.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/vacuumlo.tar.gz +0 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/worker/index.js +2 -0
- package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/xml2.tar.gz +0 -0
- package/runtime/race/pin.mjs +12 -0
- package/runtime/runtime-manifest.json +579 -0
- package/runtime/wait/initial-image.tgz +0 -0
- package/runtime/wait/wire.mjs +39 -0
- package/src/browser-platform.mjs +12 -0
- package/src/browser.d.ts +5 -0
- package/src/browser.mjs +43 -0
- package/src/index.d.ts +45 -0
- package/src/index.mjs +22 -0
- package/src/runtime-integrity.mjs +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
VibeRaven Sessions
|
|
2
|
+
Copyright 2026 VibeRaven contributors.
|
|
3
|
+
|
|
4
|
+
VibeRaven-owned session host, deterministic inputs, operating-system boundary
|
|
5
|
+
additions and package adapters are provided under Apache License 2.0.
|
|
6
|
+
|
|
7
|
+
This product includes modified PGlite (Electric DB Limited and contributors),
|
|
8
|
+
licensed under Apache License 2.0, and PostgreSQL, licensed under the PostgreSQL
|
|
9
|
+
License. PGlite is a PostgreSQL WebAssembly distribution, not a VibeRaven-owned
|
|
10
|
+
database implementation. See LICENSE and licenses/PostgreSQL.txt.
|
|
11
|
+
|
|
12
|
+
The shipped engine is a modified PGlite/PostgreSQL build. Modifications implement
|
|
13
|
+
independent backend contexts, shared-kernel integration, scheduling, lifecycle,
|
|
14
|
+
signal handling and JSPI suspension at the operating-system boundary. The
|
|
15
|
+
modified generated runtime assets are pglite.wasm, pglite.js and the corresponding
|
|
16
|
+
PGlite runtime chunks; runtime/engine/frozen/runtime/engine-host.mjs and the wire/pin helpers provide
|
|
17
|
+
VibeRaven's host. No engine compilation or source modification is performed by
|
|
18
|
+
this package's build or swap scripts. Copies in runtime/ retain the exact approved
|
|
19
|
+
build bytes. The browser adapter is generated from those host bytes with browser
|
|
20
|
+
platform bindings and Buffer support; it is not a different engine build.
|
|
21
|
+
|
|
22
|
+
Bundled JavaScript includes PGlite's pg-protocol fork (Brian Carlson and Electric
|
|
23
|
+
DB contributors), PGlite utilities, async-mutex, tslib and tinytar. The browser
|
|
24
|
+
adapter includes buffer, base64-js and ieee754. Their notices are in licenses/.
|
|
25
|
+
|
|
26
|
+
The native build configuration includes ICU, libxml2, libxslt, zlib and OSSP UUID,
|
|
27
|
+
as well as Emscripten runtime/compiler support and musl libc. Their license texts
|
|
28
|
+
and PostgreSQL's additional source notices are in licenses/. The license-source
|
|
29
|
+
inventory describes the provenance limits of the provided binary build.
|
|
30
|
+
|
|
31
|
+
OpenSSL 3.0.17 (1 July 2025) is identified inside the bundled pgcrypto side module.
|
|
32
|
+
Its matching upstream Apache-2.0 license is retained in licenses/OpenSSL.txt.
|
|
33
|
+
Upstream attribution from crypto/evp/digest.c at tag openssl-3.0.17:
|
|
34
|
+
/*
|
|
35
|
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
|
36
|
+
*
|
|
37
|
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
38
|
+
* this file except in compliance with the License. You can obtain a copy
|
|
39
|
+
* in the file LICENSE in the source distribution or at
|
|
40
|
+
* https://www.openssl.org/source/license.html
|
|
41
|
+
*/
|
package/README.md
CHANGED
|
@@ -1,3 +1,137 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/favicon.svg" alt="VibeRaven" width="40" height="40" />
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @viberaven/sessions
|
|
4
|
+
|
|
5
|
+
Several real PostgreSQL 18.6 sessions in one PGlite WebAssembly instance, with explicit scheduling for deterministic concurrency tests and replay. Part of VibeRaven’s production context and checks for AI-built apps.
|
|
6
|
+
|
|
7
|
+
No external database server or Docker is required. Package **0.1.0** requires
|
|
8
|
+
**Node 24+ with JSPI** or a **Chrome Worker with JSPI**.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @viberaven/sessions@0.1.0
|
|
12
|
+
node --experimental-wasm-jspi quickstart.mjs
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The Node API requires Node 24+ and `--experimental-wasm-jspi`. Chrome Workers with
|
|
16
|
+
JSPI use `@viberaven/sessions/browser`. Unsupported hosts receive an explicit error.
|
|
17
|
+
The release was tested on Node 24.12.0 and Chrome 157; other Node 24+/Chrome versions
|
|
18
|
+
must expose JSPI. Node 20 remains supported by VibeRaven's separate free `check`.
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
Save this as `quickstart.mjs`:
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { createHost } from '@viberaven/sessions';
|
|
26
|
+
const db = await createHost({ children: [43, 44] });
|
|
27
|
+
await db.query(42, 'CREATE TABLE ticket (id int PRIMARY KEY, claimed_by text); INSERT INTO ticket VALUES (1, NULL)');
|
|
28
|
+
await db.query(43, "BEGIN; UPDATE ticket SET claimed_by = 'A' WHERE id = 1 AND claimed_by IS NULL");
|
|
29
|
+
const second = db.query(44, "BEGIN; UPDATE ticket SET claimed_by = 'B' WHERE id = 1 AND claimed_by IS NULL");
|
|
30
|
+
await db.waitUntilParked(44); console.log('B waits for A');
|
|
31
|
+
await db.query(43, 'COMMIT'); await second;
|
|
32
|
+
await db.query(44, 'COMMIT');
|
|
33
|
+
console.log((await db.query(42, 'SELECT claimed_by FROM ticket')).results.at(-1).rows);
|
|
34
|
+
await db.close();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Expected output:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
B waits for A
|
|
41
|
+
[ [ 'A' ] ]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A and B are independent transaction backends sharing the database. B parks on
|
|
45
|
+
PostgreSQL's row-lock wait path. A's commit wakes B; B rechecks its predicate and
|
|
46
|
+
leaves the claimed row unchanged. Backend 42 is the control connection.
|
|
47
|
+
|
|
48
|
+
## Frozen-engine proof
|
|
49
|
+
|
|
50
|
+
| Check on the L4 frozen runtime | Result |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| Public PostgreSQL isolation specs | **122/124** |
|
|
53
|
+
| Hidden new step orders | **199/200**; native PostgreSQL **200/200** through the same judge |
|
|
54
|
+
| Hidden real-app interleavings | **1,500/1,500**; native PostgreSQL **1,500/1,500** through the same judge |
|
|
55
|
+
| Byte-equal replays | **80/80** |
|
|
56
|
+
| Isolation cases | **0 crossings in 60 cases** |
|
|
57
|
+
| Speed against stock PGlite on four real repositories | **Within 10%** under the 15-pair protocol: 14/15, 15/15, 15/15 and 15/15 ratios <=1.10 |
|
|
58
|
+
|
|
59
|
+
Method: hash-frozen engine bytes, fresh-database native PostgreSQL controls through
|
|
60
|
+
the same judge, recorded protocol/results and replay bytes; speed uses 15 alternating
|
|
61
|
+
stock/engine pairs per repository with a >=12/15 threshold at <=1.10.
|
|
62
|
+
|
|
63
|
+
Both public misses remain: **deadlock-parallel completion order** and
|
|
64
|
+
**insert-conflict application_name/lock introspection** (the latter also fails on
|
|
65
|
+
native PostgreSQL through the same judge). The hidden new-order miss concerns
|
|
66
|
+
async-notify notification-queue usage. No real parallel workers, universal PostgreSQL
|
|
67
|
+
compatibility, whole-app safety or advantage over a plain coding agent is claimed.
|
|
68
|
+
|
|
69
|
+
[Method and limitations](https://github.com/ohad6k/VibeRaven/blob/main/docs/race.md#frozen-engine-proof).
|
|
70
|
+
|
|
71
|
+
## Measured release proof
|
|
72
|
+
|
|
73
|
+
Fresh local-tarball verification of VibeRaven 1.10.0 used this engine for the synthetic capacity test:
|
|
74
|
+
|
|
75
|
+
| Test | Completed orders | Broken invariants |
|
|
76
|
+
| --- | ---: | ---: |
|
|
77
|
+
| Original count-limit trigger | 60 | 24 |
|
|
78
|
+
| Shared guard-row fix | 60 | 0 |
|
|
79
|
+
|
|
80
|
+
The selected failure replay was byte-identical. The fixed run exercised real waits in 36 orders. These are bounded offline SQL scenarios; they do not certify a live application. The [public sample](https://github.com/ohad6k/VibeRaven/tree/main/examples/race-capacity) and [method and limits](https://github.com/ohad6k/VibeRaven/blob/main/docs/race.md) describe what you can reproduce.
|
|
81
|
+
|
|
82
|
+
## Supported hosts
|
|
83
|
+
|
|
84
|
+
| Host | Entry point | Requirement |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| Node | `@viberaven/sessions` | Node 24+ with `--experimental-wasm-jspi` |
|
|
87
|
+
| Chrome Worker | `@viberaven/sessions/browser` | JSPI and a worker bundler that serves the engine assets |
|
|
88
|
+
|
|
89
|
+
Release verification used Node 24.12.0 and Chrome 157. Other versions must expose JSPI. This table does not promise Firefox, Safari, Deno or Bun support. The browser adapter must be bundled with its runtime assets; the Node quickstart above is not a browser script.
|
|
90
|
+
|
|
91
|
+
## API and reproducibility
|
|
92
|
+
|
|
93
|
+
`createHost({children})` loads an empty pinned database image. `query(pid, sql)`
|
|
94
|
+
returns raw-protocol results as rows of text/null values, command tags, notices and
|
|
95
|
+
SQLSTATE errors. SQL errors are data in `results`, so inspect every result. Host
|
|
96
|
+
failures reject. `attach`, `disconnect`, `waitUntilParked`, `onWait`, `onProtocol`,
|
|
97
|
+
`signal` and `close` expose explicit lifecycle and scheduling. Always close the
|
|
98
|
+
host; do not await a waiting query before advancing the session that can wake it.
|
|
99
|
+
|
|
100
|
+
`loadExtensions(['pgcrypto'])` loads a bundled extension descriptor. Pass the
|
|
101
|
+
returned object as `extensions` to createHost, then execute `CREATE EXTENSION`.
|
|
102
|
+
Bundling an extension does not promise parity with every hosted Supabase service.
|
|
103
|
+
|
|
104
|
+
The optional `@viberaven/sessions/pin` module changes global clock/random sources
|
|
105
|
+
for deterministic test execution. Import it only in an isolated test subprocess,
|
|
106
|
+
before opening the engine. It is intentionally not loaded by the library API.
|
|
107
|
+
|
|
108
|
+
`verifyRuntime()` checks every distributed runtime file and its slot identity
|
|
109
|
+
before opening the Node engine. `runtime/runtime-manifest.json` records file hashes.
|
|
110
|
+
The minimal package slot is a subset of the original qualified runtime inputs:
|
|
111
|
+
|
|
112
|
+
- L4 frozen build identity: `787a86e16d9d83fb37bd1d5d7fd3f4be8beaa3ddbc80c6da31a017584c6f814d`.
|
|
113
|
+
- Distributed slot identity: `222dc0c0f184629c828dbf990e811d44f208ef8d8b9ead9770a84fe8563db6d5`.
|
|
114
|
+
- PostgreSQL 18.6; 113 unchanged runtime files. The omitted inputs include private
|
|
115
|
+
validation adapters, source patches, sourcemaps and unused CJS artifacts.
|
|
116
|
+
|
|
117
|
+
## Limitations
|
|
118
|
+
|
|
119
|
+
Tests cover supplied SQL, inputs and bounded statement issue orders. They do not
|
|
120
|
+
prove an entire application's security or explore every instruction interleaving.
|
|
121
|
+
Replay requires the same image, migrations, specs, options and deterministic input
|
|
122
|
+
prefix. External I/O, arbitrary native extensions, persistent advisory locks and
|
|
123
|
+
arbitrary schema changes during schedules are outside the CLI runner's contract.
|
|
124
|
+
Selected engine checks do not establish universal PostgreSQL compatibility. Run only repository SQL you trust; this engine is not a security sandbox.
|
|
125
|
+
|
|
126
|
+
This package provides engine sessions and explicit controls. VibeRaven's preview
|
|
127
|
+
`race` command supplies repository test writing, bounded exploration, reports and
|
|
128
|
+
replay. The full internal validation harness and application corpus are not part
|
|
129
|
+
of this distribution. No advantage over other coding agents is claimed.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
Apache-2.0 for VibeRaven additions and PGlite; PostgreSQL and third-party terms remain
|
|
134
|
+
attached. See `THIRD_PARTY_NOTICES` for the full bundled-library notices, plus
|
|
135
|
+
`LICENSE`, `NOTICE` and the `licenses/` source inventory. The frozen SDK does not
|
|
136
|
+
identify every linked library revision; notice-text provenance is recorded without
|
|
137
|
+
claiming an exact revision for an unidentified binary.
|