mindoodb 0.0.1 → 0.0.2

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.
Files changed (77) hide show
  1. package/README.md +5 -5
  2. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts +9 -2
  3. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts.map +1 -1
  4. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js +39 -22
  5. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js.map +1 -1
  6. package/dist/appendonlystores/network/HttpTransport.d.ts +8 -2
  7. package/dist/appendonlystores/network/HttpTransport.d.ts.map +1 -1
  8. package/dist/appendonlystores/network/HttpTransport.js +50 -21
  9. package/dist/appendonlystores/network/HttpTransport.js.map +1 -1
  10. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts +15 -2
  11. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts.map +1 -1
  12. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js +52 -27
  13. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js.map +1 -1
  14. package/dist/core/BaseMindooDB.d.ts +26 -4
  15. package/dist/core/BaseMindooDB.d.ts.map +1 -1
  16. package/dist/core/BaseMindooDB.js +632 -253
  17. package/dist/core/BaseMindooDB.js.map +1 -1
  18. package/dist/core/BaseMindooTenant.d.ts +3 -1
  19. package/dist/core/BaseMindooTenant.d.ts.map +1 -1
  20. package/dist/core/BaseMindooTenant.js +83 -75
  21. package/dist/core/BaseMindooTenant.js.map +1 -1
  22. package/dist/core/BaseMindooTenantDirectory.d.ts +3 -1
  23. package/dist/core/BaseMindooTenantDirectory.d.ts.map +1 -1
  24. package/dist/core/BaseMindooTenantDirectory.js +40 -40
  25. package/dist/core/BaseMindooTenantDirectory.js.map +1 -1
  26. package/dist/core/BaseMindooTenantFactory.d.ts +3 -1
  27. package/dist/core/BaseMindooTenantFactory.d.ts.map +1 -1
  28. package/dist/core/BaseMindooTenantFactory.js +18 -12
  29. package/dist/core/BaseMindooTenantFactory.js.map +1 -1
  30. package/dist/core/appendonlystores/InMemoryContentAddressedStore.d.ts +8 -2
  31. package/dist/core/appendonlystores/InMemoryContentAddressedStore.d.ts.map +1 -1
  32. package/dist/core/appendonlystores/InMemoryContentAddressedStore.js +44 -18
  33. package/dist/core/appendonlystores/InMemoryContentAddressedStore.js.map +1 -1
  34. package/dist/core/appendonlystores/network/AuthenticationService.d.ts +3 -0
  35. package/dist/core/appendonlystores/network/AuthenticationService.d.ts.map +1 -1
  36. package/dist/core/appendonlystores/network/AuthenticationService.js +21 -17
  37. package/dist/core/appendonlystores/network/AuthenticationService.js.map +1 -1
  38. package/dist/core/appendonlystores/network/NetworkTransport.d.ts +15 -1
  39. package/dist/core/appendonlystores/network/NetworkTransport.d.ts.map +1 -1
  40. package/dist/core/appendonlystores/types.d.ts +14 -1
  41. package/dist/core/appendonlystores/types.d.ts.map +1 -1
  42. package/dist/core/crypto/MindooDocSigner.d.ts +3 -1
  43. package/dist/core/crypto/MindooDocSigner.d.ts.map +1 -1
  44. package/dist/core/crypto/MindooDocSigner.js +9 -5
  45. package/dist/core/crypto/MindooDocSigner.js.map +1 -1
  46. package/dist/core/crypto/RSAEncryption.d.ts +3 -1
  47. package/dist/core/crypto/RSAEncryption.d.ts.map +1 -1
  48. package/dist/core/crypto/RSAEncryption.js +13 -9
  49. package/dist/core/crypto/RSAEncryption.js.map +1 -1
  50. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts +1 -1
  51. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js +2 -2
  52. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js.map +1 -1
  53. package/dist/core/indexing/virtualviews/index.d.ts +1 -1
  54. package/dist/core/indexing/virtualviews/index.js +1 -1
  55. package/dist/core/keys/KeyBag.d.ts +4 -1
  56. package/dist/core/keys/KeyBag.d.ts.map +1 -1
  57. package/dist/core/keys/KeyBag.js +10 -5
  58. package/dist/core/keys/KeyBag.js.map +1 -1
  59. package/dist/core/logging/LogLevel.d.ts +21 -0
  60. package/dist/core/logging/LogLevel.d.ts.map +1 -0
  61. package/dist/core/logging/LogLevel.js +56 -0
  62. package/dist/core/logging/LogLevel.js.map +1 -0
  63. package/dist/core/logging/Logger.d.ts +37 -0
  64. package/dist/core/logging/Logger.d.ts.map +1 -0
  65. package/dist/core/logging/Logger.js +3 -0
  66. package/dist/core/logging/Logger.js.map +1 -0
  67. package/dist/core/logging/MindooLogger.d.ts +28 -0
  68. package/dist/core/logging/MindooLogger.d.ts.map +1 -0
  69. package/dist/core/logging/MindooLogger.js +217 -0
  70. package/dist/core/logging/MindooLogger.js.map +1 -0
  71. package/dist/core/logging/index.d.ts +4 -0
  72. package/dist/core/logging/index.d.ts.map +1 -0
  73. package/dist/core/logging/index.js +10 -0
  74. package/dist/core/logging/index.js.map +1 -0
  75. package/dist/core/types.d.ts +96 -28
  76. package/dist/core/types.d.ts.map +1 -1
  77. package/package.json +1 -1
@@ -1,8 +1,9 @@
1
1
  import type { ContentAddressedStore } from "../../core/types";
2
- import type { StoreEntry, StoreEntryMetadata, MindooTenantDirectory } from "../../core/types";
2
+ import type { StoreEntry, StoreEntryMetadata, MindooTenantDirectory, StoreEntryType } from "../../core/types";
3
3
  import type { CryptoAdapter } from "../../core/crypto/CryptoAdapter";
4
4
  import type { NetworkEncryptedEntry } from "../../core/appendonlystores/network/types";
5
5
  import { AuthenticationService } from "../../core/appendonlystores/network/AuthenticationService";
6
+ import { Logger } from "../../core/logging";
6
7
  /**
7
8
  * Server-side network handler for ContentAddressedStore operations.
8
9
  *
@@ -21,6 +22,7 @@ export declare class ServerNetworkContentAddressedStore {
21
22
  private authService;
22
23
  private rsaEncryption;
23
24
  private cryptoAdapter;
25
+ private logger;
24
26
  /**
25
27
  * Create a new ServerNetworkContentAddressedStore.
26
28
  *
@@ -28,8 +30,9 @@ export declare class ServerNetworkContentAddressedStore {
28
30
  * @param directory The tenant directory for user lookup
29
31
  * @param authService The authentication service for token validation
30
32
  * @param cryptoAdapter The crypto adapter for encryption
33
+ * @param logger Optional logger instance
31
34
  */
32
- constructor(localStore: ContentAddressedStore, directory: MindooTenantDirectory, authService: AuthenticationService, cryptoAdapter: CryptoAdapter);
35
+ constructor(localStore: ContentAddressedStore, directory: MindooTenantDirectory, authService: AuthenticationService, cryptoAdapter: CryptoAdapter, logger?: Logger);
33
36
  /**
34
37
  * Get the ID of the underlying store.
35
38
  */
@@ -71,6 +74,16 @@ export declare class ServerNetworkContentAddressedStore {
71
74
  * @returns List of new entry metadata for the specified document
72
75
  */
73
76
  handleFindNewEntriesForDoc(token: string, knownIds: string[], docId: string): Promise<StoreEntryMetadata[]>;
77
+ /**
78
+ * Handle a findEntries request from a client.
79
+ *
80
+ * @param token The JWT access token
81
+ * @param type The entry type to filter by
82
+ * @param creationDateFrom Optional start timestamp (inclusive)
83
+ * @param creationDateUntil Optional end timestamp (exclusive)
84
+ * @returns List of entry metadata matching the criteria
85
+ */
86
+ handleFindEntries(token: string, type: StoreEntryType, creationDateFrom: number | null, creationDateUntil: number | null): Promise<StoreEntryMetadata[]>;
74
87
  /**
75
88
  * Handle a getEntries request from a client.
76
89
  * Encrypts the entries with the client's RSA public key.
@@ -1 +1 @@
1
- {"version":3,"file":"ServerNetworkContentAddressedStore.d.ts","sourceRoot":"","sources":["../../../src/appendonlystores/network/ServerNetworkContentAddressedStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAA2B,MAAM,2CAA2C,CAAC;AAGhH,OAAO,EAAE,qBAAqB,EAAE,MAAM,2DA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AAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAcvE;;;;;;OAMG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAcvD;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC;IAcpB;;;;;;OAMG;YACW,aAAa;IAa3B;;;OAGG;YACW,qBAAqB;CAqCpC"}
1
+ {"version":3,"file":"ServerNetworkContentAddressedStore.d.ts","sourceRoot":"","sources":["../../../src/appendonlystores/network/ServerNetworkContentAddressedStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAA2B,MAAM,2CAA2C,CAAC;AAGhH,OAAO,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,EAAE,MAAM,EAAoC,MAAM,oBAAoB,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,qBAAa,kCAAkC;IAC7C,OAAO,CAAC,UAAU,CAAwB;IAC1C,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,WAAW,CAAwB;IAC3C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;;;;OAQG;gBAED,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,qBAAqB,EAChC,W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,MAAM,EAAE,CAAC;IAcvE;;;;;;OAMG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAcvD;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC;IAcpB;;;;;;OAMG;YACW,aAAa;IAa3B;;;OAGG;YACW,qBAAqB;CAqCpC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServerNetworkContentAddressedStore = void 0;
4
4
  const types_1 = require("../../core/appendonlystores/network/types");
5
5
  const RSAEncryption_1 = require("../../core/crypto/RSAEncryption");
6
+ const logging_1 = require("../../core/logging");
6
7
  /**
7
8
  * Server-side network handler for ContentAddressedStore operations.
8
9
  *
@@ -23,13 +24,18 @@ class ServerNetworkContentAddressedStore {
23
24
  * @param directory The tenant directory for user lookup
24
25
  * @param authService The authentication service for token validation
25
26
  * @param cryptoAdapter The crypto adapter for encryption
27
+ * @param logger Optional logger instance
26
28
  */
27
- constructor(localStore, directory, authService, cryptoAdapter) {
29
+ constructor(localStore, directory, authService, cryptoAdapter, logger) {
28
30
  this.localStore = localStore;
29
31
  this.directory = directory;
30
32
  this.authService = authService;
31
33
  this.cryptoAdapter = cryptoAdapter;
32
- this.rsaEncryption = new RSAEncryption_1.RSAEncryption(cryptoAdapter);
34
+ this.logger =
35
+ logger ||
36
+ new logging_1.MindooLogger((0, logging_1.getDefaultLogLevel)(), `ServerNetworkStore:${localStore.getId()}`, true);
37
+ const rsaLogger = this.logger.createChild("RSAEncryption");
38
+ this.rsaEncryption = new RSAEncryption_1.RSAEncryption(cryptoAdapter, rsaLogger);
33
39
  }
34
40
  /**
35
41
  * Get the ID of the underlying store.
@@ -44,7 +50,7 @@ class ServerNetworkContentAddressedStore {
44
50
  * @returns The challenge string
45
51
  */
46
52
  async handleChallengeRequest(username) {
47
- console.log(`[ServerNetworkContentAddressedStore] Handling challenge request for user: ${username}`);
53
+ this.logger.debug(`Handling challenge request for user: ${username}`);
48
54
  return this.authService.generateChallenge(username);
49
55
  }
50
56
  /**
@@ -55,7 +61,7 @@ class ServerNetworkContentAddressedStore {
55
61
  * @returns The authentication result with JWT token
56
62
  */
57
63
  async handleAuthenticate(challenge, signature) {
58
- console.log(`[ServerNetworkContentAddressedStore] Handling authentication for challenge: ${challenge}`);
64
+ this.logger.debug(`Handling authentication for challenge: ${challenge}`);
59
65
  return this.authService.authenticate(challenge, signature);
60
66
  }
61
67
  /**
@@ -66,13 +72,13 @@ class ServerNetworkContentAddressedStore {
66
72
  * @returns List of new entry metadata
67
73
  */
68
74
  async handleFindNewEntries(token, knownIds) {
69
- console.log(`[ServerNetworkContentAddressedStore] Handling findNewEntries request`);
75
+ this.logger.debug(`Handling findNewEntries request`);
70
76
  // Validate token
71
77
  const tokenPayload = await this.validateToken(token);
72
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
78
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
73
79
  // Find new entries
74
80
  const newEntries = await this.localStore.findNewEntries(knownIds);
75
- console.log(`[ServerNetworkContentAddressedStore] Found ${newEntries.length} new entries`);
81
+ this.logger.debug(`Found ${newEntries.length} new entries`);
76
82
  return newEntries;
77
83
  }
78
84
  /**
@@ -85,15 +91,34 @@ class ServerNetworkContentAddressedStore {
85
91
  * @returns List of new entry metadata for the specified document
86
92
  */
87
93
  async handleFindNewEntriesForDoc(token, knownIds, docId) {
88
- console.log(`[ServerNetworkContentAddressedStore] Handling findNewEntriesForDoc request for doc ${docId}`);
94
+ this.logger.debug(`Handling findNewEntriesForDoc request for doc ${docId}`);
89
95
  // Validate token
90
96
  const tokenPayload = await this.validateToken(token);
91
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
97
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
92
98
  // Find new entries for the specific document
93
99
  const newEntries = await this.localStore.findNewEntriesForDoc(knownIds, docId);
94
- console.log(`[ServerNetworkContentAddressedStore] Found ${newEntries.length} new entries for doc ${docId}`);
100
+ this.logger.debug(`Found ${newEntries.length} new entries for doc ${docId}`);
95
101
  return newEntries;
96
102
  }
103
+ /**
104
+ * Handle a findEntries request from a client.
105
+ *
106
+ * @param token The JWT access token
107
+ * @param type The entry type to filter by
108
+ * @param creationDateFrom Optional start timestamp (inclusive)
109
+ * @param creationDateUntil Optional end timestamp (exclusive)
110
+ * @returns List of entry metadata matching the criteria
111
+ */
112
+ async handleFindEntries(token, type, creationDateFrom, creationDateUntil) {
113
+ this.logger.debug(`Handling findEntries request for type ${type}`);
114
+ // Validate token
115
+ const tokenPayload = await this.validateToken(token);
116
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
117
+ // Find entries
118
+ const entries = await this.localStore.findEntries(type, creationDateFrom, creationDateUntil);
119
+ this.logger.debug(`Found ${entries.length} entries`);
120
+ return entries;
121
+ }
97
122
  /**
98
123
  * Handle a getEntries request from a client.
99
124
  * Encrypts the entries with the client's RSA public key.
@@ -103,23 +128,23 @@ class ServerNetworkContentAddressedStore {
103
128
  * @returns The entries with RSA-encrypted payloads
104
129
  */
105
130
  async handleGetEntries(token, ids) {
106
- console.log(`[ServerNetworkContentAddressedStore] Handling getEntries request for ${ids.length} entries`);
131
+ this.logger.debug(`Handling getEntries request for ${ids.length} entries`);
107
132
  // Validate token
108
133
  const tokenPayload = await this.validateToken(token);
109
134
  const username = tokenPayload.sub;
110
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${username}`);
135
+ this.logger.debug(`Token validated for user: ${username}`);
111
136
  // Get user's public encryption key
112
137
  const userKeys = await this.directory.getUserPublicKeys(username);
113
138
  if (!userKeys) {
114
139
  throw new types_1.NetworkError(types_1.NetworkErrorType.USER_NOT_FOUND, `User ${username} not found or revoked`);
115
140
  }
116
- console.log(`[ServerNetworkContentAddressedStore] Retrieved encryption key for user: ${username}`);
141
+ this.logger.debug(`Retrieved encryption key for user: ${username}`);
117
142
  // Get the entries from local store
118
143
  const entries = await this.localStore.getEntries(ids);
119
- console.log(`[ServerNetworkContentAddressedStore] Retrieved ${entries.length} entries from local store`);
144
+ this.logger.debug(`Retrieved ${entries.length} entries from local store`);
120
145
  // Encrypt each entry with the user's RSA public key
121
146
  const encryptedEntries = await this.encryptEntriesForUser(entries, userKeys.encryptionPublicKey);
122
- console.log(`[ServerNetworkContentAddressedStore] Encrypted ${encryptedEntries.length} entries for user: ${username}`);
147
+ this.logger.debug(`Encrypted ${encryptedEntries.length} entries for user: ${username}`);
123
148
  return encryptedEntries;
124
149
  }
125
150
  /**
@@ -129,10 +154,10 @@ class ServerNetworkContentAddressedStore {
129
154
  * @param entries The entries to store
130
155
  */
131
156
  async handlePutEntries(token, entries) {
132
- console.log(`[ServerNetworkContentAddressedStore] Handling putEntries request for ${entries.length} entries`);
157
+ this.logger.debug(`Handling putEntries request for ${entries.length} entries`);
133
158
  // Validate token
134
159
  const tokenPayload = await this.validateToken(token);
135
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
160
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
136
161
  // Process each entry
137
162
  for (const entry of entries) {
138
163
  // Verify the entry was created by a trusted user
@@ -143,7 +168,7 @@ class ServerNetworkContentAddressedStore {
143
168
  }
144
169
  // Store all entries
145
170
  await this.localStore.putEntries(entries);
146
- console.log(`[ServerNetworkContentAddressedStore] Successfully stored ${entries.length} entries`);
171
+ this.logger.debug(`Successfully stored ${entries.length} entries`);
147
172
  }
148
173
  /**
149
174
  * Handle a hasEntries request from a client.
@@ -154,13 +179,13 @@ class ServerNetworkContentAddressedStore {
154
179
  * @returns List of IDs that exist in the store
155
180
  */
156
181
  async handleHasEntries(token, ids) {
157
- console.log(`[ServerNetworkContentAddressedStore] Handling hasEntries request for ${ids.length} IDs`);
182
+ this.logger.debug(`Handling hasEntries request for ${ids.length} IDs`);
158
183
  // Validate token
159
184
  const tokenPayload = await this.validateToken(token);
160
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
185
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
161
186
  // Check which IDs exist in local store
162
187
  const existingIds = await this.localStore.hasEntries(ids);
163
- console.log(`[ServerNetworkContentAddressedStore] Found ${existingIds.length} existing entries out of ${ids.length} checked`);
188
+ this.logger.debug(`Found ${existingIds.length} existing entries out of ${ids.length} checked`);
164
189
  return existingIds;
165
190
  }
166
191
  /**
@@ -171,13 +196,13 @@ class ServerNetworkContentAddressedStore {
171
196
  * @returns List of all entry IDs in the store
172
197
  */
173
198
  async handleGetAllIds(token) {
174
- console.log(`[ServerNetworkContentAddressedStore] Handling getAllIds request`);
199
+ this.logger.debug(`Handling getAllIds request`);
175
200
  // Validate token
176
201
  const tokenPayload = await this.validateToken(token);
177
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
202
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
178
203
  // Get all entry IDs from local store
179
204
  const allIds = await this.localStore.getAllIds();
180
- console.log(`[ServerNetworkContentAddressedStore] Returning ${allIds.length} entry IDs`);
205
+ this.logger.debug(`Returning ${allIds.length} entry IDs`);
181
206
  return allIds;
182
207
  }
183
208
  /**
@@ -190,13 +215,13 @@ class ServerNetworkContentAddressedStore {
190
215
  * @returns List of entry IDs in dependency order
191
216
  */
192
217
  async handleResolveDependencies(token, startId, options) {
193
- console.log(`[ServerNetworkContentAddressedStore] Handling resolveDependencies request for ${startId}`);
218
+ this.logger.debug(`Handling resolveDependencies request for ${startId}`);
194
219
  // Validate token
195
220
  const tokenPayload = await this.validateToken(token);
196
- console.log(`[ServerNetworkContentAddressedStore] Token validated for user: ${tokenPayload.sub}`);
221
+ this.logger.debug(`Token validated for user: ${tokenPayload.sub}`);
197
222
  // Resolve dependencies in local store
198
223
  const resolvedIds = await this.localStore.resolveDependencies(startId, options);
199
- console.log(`[ServerNetworkContentAddressedStore] Resolved ${resolvedIds.length} dependencies`);
224
+ this.logger.debug(`Resolved ${resolvedIds.length} dependencies`);
200
225
  return resolvedIds;
201
226
  }
202
227
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ServerNetworkContentAddressedStore.js","sourceRoot":"","sources":["../../../src/appendonlystores/network/ServerNetworkContentAddressedStore.ts"],"names":[],"mappings":";;;AAIA,qEAA2F;AAC3F,mEAAgE;AAGhE;;;;;;;;;;;GAWG;AACH,MAAa,kCAAkC;IAO7C;;;;;;;OAOG;IACH,YACE,UAAiC,EACjC,SAAgC,EAChC,WAAkC,EAClC,aAA4B;QAE5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,sBAAsB,CAAC,QAAgB;QAC3C,OAAO,CAAC,GAAG,CAAC,6EAA6E,QAAQ,EAAE,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,SAAiB,EAAE,SAAqB;QAK/D,OAAO,CAAC,GAAG,CAAC,+EAA+E,SAAS,EAAE,CAAC,CAAC;QACxG,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC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AAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QAEhF,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,+BAA+B;YAC/B,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAC1D,KAAK,CAAC,aAAa,EACnB,SAAS,CACV,CAAC;YAEF,4EAA4E;YAC5E,MAAM,cAAc,GAA0B;gBAC5C,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;gBAC5C,eAAe,EAAE,KAAK,CAAC,eAAe;gBACtC,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,mBAAmB;aACpB,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9TD,gFA8TC"}
1
+ {"version":3,"file":"ServerNetworkContentAddressedStore.js","sourceRoot":"","sources":["../../../src/appendonlystores/network/ServerNetworkContentAddressedStore.ts"],"names":[],"mappings":";;;AAIA,qEAA2F;AAC3F,mEAAgE;AAEhE,gDAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAa,kCAAkC;IAQ7C;;;;;;;;OAQG;IACH,YACE,UAAiC,EACjC,SAAgC,EAChC,WAAkC,EAClC,aAA4B,EAC5B,MAAe;QAEf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC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BAChC,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,mBAAmB;aACpB,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AArWD,gFAqWC"}
@@ -1,6 +1,7 @@
1
- import { MindooDB, MindooDoc, MindooTenant, ProcessChangesCursor, ProcessChangesResult, AttachmentConfig, SigningKeyPair } from "./types";
1
+ import { MindooDB, MindooDoc, MindooTenant, ProcessChangesCursor, ProcessChangesResult, DocumentHistoryResult, AttachmentConfig, SigningKeyPair, PerformanceCallback } from "./types";
2
2
  import { BaseMindooTenant } from "./BaseMindooTenant";
3
3
  import type { ContentAddressedStore } from "./appendonlystores/types";
4
+ import { Logger } from "./logging";
4
5
  /**
5
6
  * BaseMindooDB is a platform-agnostic implementation of MindooDB
6
7
  * that works in both browser and server environments.
@@ -31,13 +32,26 @@ export declare class BaseMindooDB implements MindooDB {
31
32
  private docCache;
32
33
  private processedEntryIds;
33
34
  private automergeHashToEntryId;
34
- constructor(tenant: BaseMindooTenant, store: ContentAddressedStore, attachmentStore?: ContentAddressedStore, attachmentConfig?: AttachmentConfig, adminOnlyDb?: boolean);
35
+ private logger;
36
+ private performanceCallback?;
37
+ private publicKeyCache;
38
+ constructor(tenant: BaseMindooTenant, store: ContentAddressedStore, attachmentStore?: ContentAddressedStore, attachmentConfig?: AttachmentConfig, adminOnlyDb?: boolean, logger?: Logger, performanceCallback?: PerformanceCallback);
35
39
  /**
36
40
  * Get the admin public key from the tenant.
37
41
  * Only used when adminOnlyDb is true.
38
42
  */
39
43
  private getAdminPublicKey;
40
44
  isAdminOnlyDb(): boolean;
45
+ /**
46
+ * Get or import a CryptoKey for signature verification, with caching.
47
+ * This avoids re-importing the same public key multiple times.
48
+ */
49
+ private getOrImportPublicKey;
50
+ /**
51
+ * Verify a signature using a pre-imported CryptoKey.
52
+ * This bypasses the key import step for better performance when keys are cached.
53
+ */
54
+ private verifySignatureWithKey;
41
55
  /**
42
56
  * Compare two index entries for sorting.
43
57
  * Returns negative if a < b, positive if a > b, 0 if equal.
@@ -49,6 +63,8 @@ export declare class BaseMindooDB implements MindooDB {
49
63
  * When a document changes, it's removed from its current position and inserted
50
64
  * at the correct sorted position to maintain order by (lastModified, docId).
51
65
  *
66
+ * Optimized to only update lookup map for entries that actually moved.
67
+ *
52
68
  * @param docId The document ID
53
69
  * @param lastModified The new last modified timestamp
54
70
  * @param isDeleted Whether the document is deleted
@@ -97,7 +113,9 @@ export declare class BaseMindooDB implements MindooDB {
97
113
  private createDocumentInternal;
98
114
  getDocument(docId: string): Promise<MindooDoc>;
99
115
  getDocumentAtTimestamp(docId: string, timestamp: number): Promise<MindooDoc | null>;
116
+ iterateDocumentHistory(docId: string): AsyncGenerator<DocumentHistoryResult, void, unknown>;
100
117
  getAllDocumentIds(): Promise<string[]>;
118
+ getAllDocumentIdsAtTimestamp(timestamp: number): Promise<string[]>;
101
119
  deleteDocument(docId: string): Promise<void>;
102
120
  deleteDocumentWithSigningKey(docId: string, signingKeyPair: SigningKeyPair, signingKeyPassword: string): Promise<void>;
103
121
  /**
@@ -109,8 +127,12 @@ export declare class BaseMindooDB implements MindooDB {
109
127
  changeDoc(doc: MindooDoc, changeFunc: (doc: MindooDoc) => void | Promise<void>): Promise<void>;
110
128
  changeDocWithSigningKey(doc: MindooDoc, changeFunc: (doc: MindooDoc) => void | Promise<void>, signingKeyPair: SigningKeyPair, signingKeyPassword: string): Promise<void>;
111
129
  private changeDocInternal;
112
- processChangesSince(cursor: ProcessChangesCursor | null, limit: number, callback: (change: MindooDoc, currentCursor: ProcessChangesCursor) => boolean | void): Promise<ProcessChangesCursor>;
113
- iterateChangesSince(cursor: ProcessChangesCursor | null, pageSize?: number): AsyncGenerator<ProcessChangesResult, void, unknown>;
130
+ iterateChangesSince(cursor: ProcessChangesCursor | null): AsyncGenerator<ProcessChangesResult, void, unknown>;
131
+ /**
132
+ * Incrementally update a cached document with new entries.
133
+ * Returns the updated document, or null if document wasn't actually changed.
134
+ */
135
+ private applyNewEntriesToCachedDocument;
114
136
  /**
115
137
  * Internal method to load a document from the content-addressed store
116
138
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BaseMindooDB.d.ts","sourceRoot":"","sources":["../../src/core/BaseMindooDB.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,SAAS,EAKT,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EAEpB,gBAAgB,EAChB,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AA2BtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,YAAa,YAAW,QAAQ;IAC3C,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,eAAe,CAAoC;IAC3D,OAAO,CAAC,cAAc,CAAS;IAG/B,OAAO,CAAC,cAAc,CAAU;IAIhC,OAAO,CAAC,KAAK,CAA0E;IAGvF,OAAO,CAAC,WAAW,CAAkC;IAGrD,OAAO,CAAC,QAAQ,CAAuC;IAGvD,OAAO,CAAC,iBAAiB,CAAgB;IAIzC,OAAO,CAAC,sBAAsB,CAA+C;gBAG3E,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,qBAAqB,EAC5B,eAAe,CAAC,EAAE,qBAAqB,EACvC,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,WAAW,GAAE,OAAe;IAS9B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAIzB,aAAa,IAAI,OAAO;IAIxB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;IA0CnB;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAOpC;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IA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