mindoodb 0.0.19 → 0.0.21
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 +200 -0
- package/README-server.md +14 -14
- package/README.md +12 -10
- package/dist/browser/appendonlystores/IndexedDBContentAddressedStore.d.ts +6 -0
- package/dist/browser/appendonlystores/IndexedDBContentAddressedStore.d.ts.map +1 -1
- package/dist/browser/appendonlystores/IndexedDBContentAddressedStore.js +519 -373
- package/dist/browser/appendonlystores/IndexedDBContentAddressedStore.js.map +1 -1
- package/dist/browser/cache/IndexedDBLocalCacheStore.d.ts +12 -0
- package/dist/browser/cache/IndexedDBLocalCacheStore.d.ts.map +1 -1
- package/dist/browser/cache/IndexedDBLocalCacheStore.js +152 -65
- package/dist/browser/cache/IndexedDBLocalCacheStore.js.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +14 -0
- package/dist/core/BaseMindooDB.d.ts +594 -6
- package/dist/core/BaseMindooDB.d.ts.map +1 -1
- package/dist/core/BaseMindooDB.js +2478 -191
- package/dist/core/BaseMindooDB.js.map +1 -1
- package/dist/core/BaseMindooTenant.d.ts +65 -1
- package/dist/core/BaseMindooTenant.d.ts.map +1 -1
- package/dist/core/BaseMindooTenant.js +250 -35
- package/dist/core/BaseMindooTenant.js.map +1 -1
- package/dist/core/BaseMindooTenantFactory.d.ts.map +1 -1
- package/dist/core/BaseMindooTenantFactory.js +47 -18
- package/dist/core/BaseMindooTenantFactory.js.map +1 -1
- package/dist/core/DocumentConflictAnalysis.d.ts +22 -0
- package/dist/core/DocumentConflictAnalysis.d.ts.map +1 -0
- package/dist/core/DocumentConflictAnalysis.js +101 -0
- package/dist/core/DocumentConflictAnalysis.js.map +1 -0
- package/dist/core/MindooDBServerAdmin.d.ts +26 -1
- package/dist/core/MindooDBServerAdmin.d.ts.map +1 -1
- package/dist/core/MindooDBServerAdmin.js +19 -3
- package/dist/core/MindooDBServerAdmin.js.map +1 -1
- package/dist/core/appendonlystores/types.d.ts +9 -0
- package/dist/core/appendonlystores/types.d.ts.map +1 -1
- package/dist/core/automerge-adapter.d.ts.map +1 -1
- package/dist/core/automerge-adapter.js +26 -14
- package/dist/core/automerge-adapter.js.map +1 -1
- package/dist/core/cache/EncryptedLocalCacheStore.d.ts +51 -1
- package/dist/core/cache/EncryptedLocalCacheStore.d.ts.map +1 -1
- package/dist/core/cache/EncryptedLocalCacheStore.js +48 -9
- package/dist/core/cache/EncryptedLocalCacheStore.js.map +1 -1
- package/dist/core/cache/LocalCacheStore.d.ts +34 -0
- package/dist/core/cache/LocalCacheStore.d.ts.map +1 -1
- package/dist/core/cache/LocalCacheStore.js +16 -0
- package/dist/core/cache/LocalCacheStore.js.map +1 -1
- package/dist/core/databaseIdValidation.d.ts +13 -0
- package/dist/core/databaseIdValidation.d.ts.map +1 -0
- package/dist/core/databaseIdValidation.js +38 -0
- package/dist/core/databaseIdValidation.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js +5 -1
- package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualView.d.ts +14 -0
- package/dist/core/indexing/virtualviews/VirtualView.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualView.js +38 -6
- package/dist/core/indexing/virtualviews/VirtualView.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts +9 -2
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.js +10 -3
- package/dist/core/indexing/virtualviews/VirtualViewDataChange.js.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts +23 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.js +17 -1
- package/dist/core/indexing/virtualviews/VirtualViewEntryData.js.map +1 -1
- package/dist/core/indexing/virtualviews/types.d.ts +8 -0
- package/dist/core/indexing/virtualviews/types.d.ts.map +1 -1
- package/dist/core/indexing/virtualviews/types.js.map +1 -1
- package/dist/core/keys/KeyBag.d.ts +244 -7
- package/dist/core/keys/KeyBag.d.ts.map +1 -1
- package/dist/core/keys/KeyBag.js +299 -82
- package/dist/core/keys/KeyBag.js.map +1 -1
- package/dist/core/tenantIdValidation.d.ts +19 -0
- package/dist/core/tenantIdValidation.d.ts.map +1 -0
- package/dist/core/tenantIdValidation.js +43 -0
- package/dist/core/tenantIdValidation.js.map +1 -0
- package/dist/core/types.d.ts +703 -12
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/node/cache/FileSystemLocalCacheStore.d.ts +2 -1
- package/dist/node/cache/FileSystemLocalCacheStore.d.ts.map +1 -1
- package/dist/node/cache/FileSystemLocalCacheStore.js +4 -0
- package/dist/node/cache/FileSystemLocalCacheStore.js.map +1 -1
- package/dist/node/server/ServerSync.d.ts.map +1 -1
- package/dist/node/server/ServerSync.js +3 -1
- package/dist/node/server/ServerSync.js.map +1 -1
- package/dist/node/server/TenantManager.d.ts +1 -0
- package/dist/node/server/TenantManager.d.ts.map +1 -1
- package/dist/node/server/TenantManager.js +11 -3
- package/dist/node/server/TenantManager.js.map +1 -1
- package/dist/node/server/validation.d.ts +2 -6
- package/dist/node/server/validation.d.ts.map +1 -1
- package/dist/node/server/validation.js +14 -24
- package/dist/node/server/validation.js.map +1 -1
- package/dist/reactnative/cache/MMKVLocalCacheStore.d.ts +1 -0
- package/dist/reactnative/cache/MMKVLocalCacheStore.d.ts.map +1 -1
- package/dist/reactnative/cache/MMKVLocalCacheStore.js +14 -0
- package/dist/reactnative/cache/MMKVLocalCacheStore.js.map +1 -1
- package/package.json +25 -23
package/LICENSE
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
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 describing the origin of the Work and
|
|
141
|
+
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 accept support,
|
|
167
|
+
warranty, indemnity, or other liability obligations and/or rights
|
|
168
|
+
consistent with this License. However, in accepting such obligations,
|
|
169
|
+
You may act only on Your own behalf and on Your sole responsibility,
|
|
170
|
+
not on behalf of any other Contributor, and only if You agree to
|
|
171
|
+
indemnify, defend, and hold each Contributor harmless for any
|
|
172
|
+
liability incurred by, or claims asserted against, such Contributor
|
|
173
|
+
by reason of your accepting any such warranty or additional liability.
|
|
174
|
+
|
|
175
|
+
END OF TERMS AND CONDITIONS
|
|
176
|
+
|
|
177
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
178
|
+
|
|
179
|
+
To apply the Apache License to your work, attach the following
|
|
180
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
181
|
+
replaced with your own identifying information. (Don't include
|
|
182
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
183
|
+
comment syntax for the file format. We also recommend that a
|
|
184
|
+
file or class name and description of purpose be included on the
|
|
185
|
+
same "printed page" as the copyright notice for easier
|
|
186
|
+
identification within third-party archives.
|
|
187
|
+
|
|
188
|
+
Copyright 2026 Mindoo GmbH
|
|
189
|
+
|
|
190
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
+
you may not use this file except in compliance with the License.
|
|
192
|
+
You may obtain a copy of the License at
|
|
193
|
+
|
|
194
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
+
|
|
196
|
+
Unless required by applicable law or agreed to in writing, software
|
|
197
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
+
See the License for the specific language governing permissions and
|
|
200
|
+
limitations under the License.
|
package/README-server.md
CHANGED
|
@@ -435,7 +435,7 @@ The `add-to-network` CLI automates mutual trust exchange. It fetches each server
|
|
|
435
435
|
|
|
436
436
|
```bash
|
|
437
437
|
printf '%s' 'admin-pass' > ./.admin-password && chmod 600 ./.admin-password
|
|
438
|
-
|
|
438
|
+
pnpm server:add-to-network -- \
|
|
439
439
|
--new-server http://localhost:3001 \
|
|
440
440
|
--servers http://localhost:1661 \
|
|
441
441
|
--identity ../mindoodb-data-s1/system-admin-cn-sysadmin-o-myorg.identity.json \
|
|
@@ -576,7 +576,7 @@ Controls which system admins can call which `/system/*` endpoints. See [How `con
|
|
|
576
576
|
|
|
577
577
|
### `server.identity.json` (global)
|
|
578
578
|
|
|
579
|
-
Generated by `
|
|
579
|
+
Generated by `pnpm server:init`. Contains a `PrivateUserId` with encrypted private keys:
|
|
580
580
|
|
|
581
581
|
```json
|
|
582
582
|
{
|
|
@@ -657,7 +657,7 @@ Generated by `npm run server:init`. Contains a `PrivateUserId` with encrypted pr
|
|
|
657
657
|
|
|
658
658
|
## CLI Reference
|
|
659
659
|
|
|
660
|
-
### `
|
|
660
|
+
### `pnpm server:dev` / `pnpm server:start` — Start the server
|
|
661
661
|
|
|
662
662
|
Launches the MindooDB server process. `server:dev` runs via `ts-node` for development; `server:start` runs the compiled JavaScript. The server loads its identity from `server.identity.json` and the capabilities-based authorization config from `config.json` in the data directory.
|
|
663
663
|
|
|
@@ -671,7 +671,7 @@ Launches the MindooDB server process. `server:dev` runs via `ts-node` for develo
|
|
|
671
671
|
| `--tls-key` | — | Path to TLS private key file (PEM) | — |
|
|
672
672
|
| `--help` | `-h` | Show help message | — |
|
|
673
673
|
|
|
674
|
-
### `
|
|
674
|
+
### `pnpm server:init` — Initialize server identity
|
|
675
675
|
|
|
676
676
|
One-time setup that generates the server's Ed25519/RSA keypair (`server.identity.json`) and an empty `trusted-servers.json`. It also interactively offers to create a first system admin keypair and writes the initial `config.json` with that admin's public key in the `capabilities` section.
|
|
677
677
|
|
|
@@ -682,7 +682,7 @@ One-time setup that generates the server's Ed25519/RSA keypair (`server.identity
|
|
|
682
682
|
| `--force` | `-f` | Overwrite existing identity | — |
|
|
683
683
|
| `--help` | `-h` | Show help message | — |
|
|
684
684
|
|
|
685
|
-
### `
|
|
685
|
+
### `pnpm server:add-to-network` — Add a server to the network
|
|
686
686
|
|
|
687
687
|
Automates mutual trust exchange when adding a new server to an existing network. For each existing server it fetches public keys from `/.well-known/mindoodb-server-info` and calls `POST /system/trusted-servers` in both directions so that the new server and every existing server trust each other.
|
|
688
688
|
|
|
@@ -696,7 +696,7 @@ Automates mutual trust exchange when adding a new server to an existing network.
|
|
|
696
696
|
|
|
697
697
|
Password resolution order: read `MINDOODB_SYSTEM_ADMIN_PASSWORD`, then `--password-file`, then a hidden prompt on an interactive TTY. The CLI authenticates with the `--identity` file against every server it contacts (`--new-server` **and** each URL in `--servers`), so that identity's principal (username + public signing key) must be listed in the `capabilities` section of each server's `config.json`.
|
|
698
698
|
|
|
699
|
-
### `
|
|
699
|
+
### `pnpm identity:info` — Show public information from an identity file
|
|
700
700
|
|
|
701
701
|
| Option | Description | Default |
|
|
702
702
|
|--------|-------------|---------|
|
|
@@ -705,7 +705,7 @@ Password resolution order: read `MINDOODB_SYSTEM_ADMIN_PASSWORD`, then `--passwo
|
|
|
705
705
|
|
|
706
706
|
Prints the username, a stable SHA-256 username hash (`Public user ID (hex)`), both public keys, the fixed salt string names (`signing`, `encryption`), and whether encrypted private keys are present.
|
|
707
707
|
|
|
708
|
-
### `
|
|
708
|
+
### `pnpm identity:change-password` — Re-encrypt an identity with a new password
|
|
709
709
|
|
|
710
710
|
| Option | Description | Default |
|
|
711
711
|
|--------|-------------|---------|
|
|
@@ -714,7 +714,7 @@ Prints the username, a stable SHA-256 username hash (`Public user ID (hex)`), bo
|
|
|
714
714
|
|
|
715
715
|
Prompts for the current password, the new password, and confirmation using hidden input. The file is updated atomically in place.
|
|
716
716
|
|
|
717
|
-
### `
|
|
717
|
+
### `pnpm identity:export-public` — Export only the public portion of an identity
|
|
718
718
|
|
|
719
719
|
| Option | Description | Default |
|
|
720
720
|
|--------|-------------|---------|
|
|
@@ -845,7 +845,7 @@ The server can serve static files from a local directory, which is useful for ho
|
|
|
845
845
|
### Usage
|
|
846
846
|
|
|
847
847
|
```bash
|
|
848
|
-
MINDOODB_SERVER_PASSWORD_FILE=./.server-password
|
|
848
|
+
MINDOODB_SERVER_PASSWORD_FILE=./.server-password pnpm server:dev -- --static-dir ./webapp-bootstrap
|
|
849
849
|
```
|
|
850
850
|
|
|
851
851
|
The static directory might contain a minimal bootstrap page that registers a service worker and triggers the initial MindooDB sync for a distributed web application:
|
|
@@ -867,7 +867,7 @@ The server supports TLS directly via `--tls-cert` and `--tls-key` flags. No addi
|
|
|
867
867
|
### Starting with TLS
|
|
868
868
|
|
|
869
869
|
```bash
|
|
870
|
-
MINDOODB_SERVER_PASSWORD_FILE=./.server-password
|
|
870
|
+
MINDOODB_SERVER_PASSWORD_FILE=./.server-password pnpm server:dev -- \
|
|
871
871
|
--tls-cert /etc/letsencrypt/live/sync.example.com/fullchain.pem \
|
|
872
872
|
--tls-key /etc/letsencrypt/live/sync.example.com/privkey.pem \
|
|
873
873
|
-p 443
|
|
@@ -1030,19 +1030,19 @@ From the **repository root** (where `README-server.md` lives):
|
|
|
1030
1030
|
### Build
|
|
1031
1031
|
|
|
1032
1032
|
```bash
|
|
1033
|
-
|
|
1033
|
+
pnpm build
|
|
1034
1034
|
```
|
|
1035
1035
|
|
|
1036
1036
|
### Run in development mode
|
|
1037
1037
|
|
|
1038
1038
|
```bash
|
|
1039
|
-
MINDOODB_SERVER_PASSWORD_FILE=./.server-password
|
|
1039
|
+
MINDOODB_SERVER_PASSWORD_FILE=./.server-password pnpm server:dev -- -d ./data -p 1661
|
|
1040
1040
|
```
|
|
1041
1041
|
|
|
1042
1042
|
### Run built version
|
|
1043
1043
|
|
|
1044
1044
|
```bash
|
|
1045
|
-
MINDOODB_SERVER_PASSWORD_FILE=./.server-password
|
|
1045
|
+
MINDOODB_SERVER_PASSWORD_FILE=./.server-password pnpm server:start -- -d ./data -p 1661
|
|
1046
1046
|
```
|
|
1047
1047
|
|
|
1048
1048
|
## Testing
|
|
@@ -1051,5 +1051,5 @@ The integration tests are located in the main MindooDB package at `src/__tests__
|
|
|
1051
1051
|
|
|
1052
1052
|
```bash
|
|
1053
1053
|
# From the root mindoodb directory
|
|
1054
|
-
|
|
1054
|
+
pnpm test -- ExampleServer
|
|
1055
1055
|
```
|
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ Traditional databases trust the server. If your hosting provider is compromised,
|
|
|
65
65
|
### Installation
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
|
|
68
|
+
pnpm add mindoodb
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
> 📱 **React Native / Expo?** See the [React Native setup guide](./docs/reactnative.md) for mobile-specific instructions with native performance.
|
|
@@ -76,7 +76,7 @@ npm install mindoodb
|
|
|
76
76
|
|---------|---------------|------------------|
|
|
77
77
|
| Node.js | Use `mindoodb` directly in a Node script | [Getting Started](./docs/getting-started.md#nodejs) |
|
|
78
78
|
| Web | Import from `mindoodb/browser` | [Getting Started](./docs/getting-started.md#web-browser) |
|
|
79
|
-
| React Native / Expo | Run `
|
|
79
|
+
| React Native / Expo | Run `pnpm dlx mindoodb setup-react-native` in your app root | [React Native Guide](./docs/reactnative.md) |
|
|
80
80
|
|
|
81
81
|
### React Native Recommendation
|
|
82
82
|
|
|
@@ -268,25 +268,25 @@ Run tests from the command line:
|
|
|
268
268
|
|
|
269
269
|
```bash
|
|
270
270
|
# Node.js unit/integration tests (Jest)
|
|
271
|
-
|
|
271
|
+
pnpm test
|
|
272
272
|
|
|
273
273
|
# Install Chromium once for browser tests
|
|
274
|
-
|
|
274
|
+
pnpm test:browser:install
|
|
275
275
|
|
|
276
276
|
# Real browser runtime tests (Playwright + headless Chromium)
|
|
277
|
-
|
|
277
|
+
pnpm test:browser
|
|
278
278
|
|
|
279
279
|
# Run Node + browser lanes
|
|
280
|
-
|
|
280
|
+
pnpm test:all
|
|
281
281
|
```
|
|
282
282
|
|
|
283
283
|
### Test coverage by environment
|
|
284
284
|
|
|
285
285
|
| Environment | Command | What is covered today |
|
|
286
286
|
|-------------|---------|------------------------|
|
|
287
|
-
| Node.js | `
|
|
288
|
-
| Browser | `
|
|
289
|
-
| React Native / Expo | `
|
|
287
|
+
| Node.js | `pnpm test` | Full Jest suite for core APIs (documents, sync logic, indexing, virtual views, settings, trust model, attachments, etc.) |
|
|
288
|
+
| Browser | `pnpm test:browser` | Real Chromium runtime via Playwright, including browser entrypoint usage, document lifecycle, real HTTP sync endpoint flows, and browser Virtual View update behavior |
|
|
289
|
+
| React Native / Expo | `pnpm test -- ReactNativeCrypto.test.ts` | Crypto adapter behavior in Jest (uses `src/__mocks__/expo-standard-web-crypto.ts`), not a device/simulator E2E run |
|
|
290
290
|
|
|
291
291
|
### Browser sync test behavior
|
|
292
292
|
|
|
@@ -313,7 +313,9 @@ Need commercial support, have questions, or want to request a feature? We're her
|
|
|
313
313
|
|
|
314
314
|
## License
|
|
315
315
|
|
|
316
|
-
Apache 2.0
|
|
316
|
+
MindooDB is released under the [Apache License 2.0](./LICENSE). See the [`LICENSE`](./LICENSE) file for the full text.
|
|
317
|
+
|
|
318
|
+
Copyright (c) 2026 Mindoo GmbH.
|
|
317
319
|
|
|
318
320
|
## Author
|
|
319
321
|
|
|
@@ -24,6 +24,7 @@ interface StoreByteTotals {
|
|
|
24
24
|
metadataBytes: number;
|
|
25
25
|
totalBytes: number;
|
|
26
26
|
}
|
|
27
|
+
export declare function isIndexedDBConnectionLostError(error: unknown): boolean;
|
|
27
28
|
/**
|
|
28
29
|
* An IndexedDB-backed ContentAddressedStore.
|
|
29
30
|
*
|
|
@@ -52,6 +53,8 @@ export declare class IndexedDBContentAddressedStore implements ContentAddressedS
|
|
|
52
53
|
getId(): string;
|
|
53
54
|
getStoreKind(): StoreKind;
|
|
54
55
|
getCacheIdentity(): string;
|
|
56
|
+
private resetConnection;
|
|
57
|
+
private runWithReconnect;
|
|
55
58
|
/**
|
|
56
59
|
* Returns approximate payload bytes currently stored in this browser-backed
|
|
57
60
|
* content-addressed store.
|
|
@@ -78,10 +81,13 @@ export declare class IndexedDBContentAddressedStore implements ContentAddressedS
|
|
|
78
81
|
planDocumentMaterializationBatch(docIds: string[], options?: MaterializationPlanOptions): Promise<DocumentMaterializationBatchPlan>;
|
|
79
82
|
resolveDependencies(startId: string, options?: Record<string, unknown>): Promise<string[]>;
|
|
80
83
|
purgeDocHistory(docId: string): Promise<void>;
|
|
84
|
+
deleteEntriesForAttachment(docId: string, attachmentId: string): Promise<number>;
|
|
85
|
+
deleteEntriesById(entryIds: string[]): Promise<number>;
|
|
81
86
|
clearAllLocalData(): Promise<void>;
|
|
82
87
|
awaitIndexReady(_options?: AwaitIndexReadyOptions): Promise<StoreIndexBuildStatus>;
|
|
83
88
|
getIndexBuildStatus(): StoreIndexBuildStatus;
|
|
84
89
|
private matchesScanFilters;
|
|
90
|
+
private deleteEntriesWhere;
|
|
85
91
|
private readEntriesForDoc;
|
|
86
92
|
/**
|
|
87
93
|
* Backfills the byte counters the first time an existing database is opened
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDBContentAddressedStore.d.ts","sourceRoot":"","sources":["../../../src/browser/appendonlystores/IndexedDBContentAddressedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,SAAS,EACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,gCAAgC,EAChC,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAoC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"IndexedDBContentAddressedStore.d.ts","sourceRoot":"","sources":["../../../src/browser/appendonlystores/IndexedDBContentAddressedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,SAAS,EACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,gCAAgC,EAChC,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAoC,MAAM,oBAAoB,CAAC;AAqC9E,UAAU,eAAe;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAUD,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYtE;AAqRD;;;;;;;;;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