harperdb 4.5.0-beta.2 → 4.5.0-beta.3

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "harperdb",
3
- "version": "4.5.0-beta.2",
3
+ "version": "4.5.0-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "harperdb",
9
- "version": "4.5.0-beta.2",
9
+ "version": "4.5.0-beta.3",
10
10
  "hasInstallScript": true,
11
11
  "license": "SEE LICENSE IN LICENSE",
12
12
  "dependencies": {
@@ -1000,13 +1000,13 @@
1000
1000
  }
1001
1001
  },
1002
1002
  "node_modules/@babel/generator": {
1003
- "version": "7.26.9",
1004
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz",
1005
- "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==",
1003
+ "version": "7.26.10",
1004
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz",
1005
+ "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==",
1006
1006
  "license": "MIT",
1007
1007
  "dependencies": {
1008
- "@babel/parser": "^7.26.9",
1009
- "@babel/types": "^7.26.9",
1008
+ "@babel/parser": "^7.26.10",
1009
+ "@babel/types": "^7.26.10",
1010
1010
  "@jridgewell/gen-mapping": "^0.3.5",
1011
1011
  "@jridgewell/trace-mapping": "^0.3.25",
1012
1012
  "jsesc": "^3.0.2"
@@ -1046,12 +1046,12 @@
1046
1046
  }
1047
1047
  },
1048
1048
  "node_modules/@babel/parser": {
1049
- "version": "7.26.9",
1050
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz",
1051
- "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==",
1049
+ "version": "7.26.10",
1050
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz",
1051
+ "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==",
1052
1052
  "license": "MIT",
1053
1053
  "dependencies": {
1054
- "@babel/types": "^7.26.9"
1054
+ "@babel/types": "^7.26.10"
1055
1055
  },
1056
1056
  "bin": {
1057
1057
  "parser": "bin/babel-parser.js"
@@ -1061,9 +1061,9 @@
1061
1061
  }
1062
1062
  },
1063
1063
  "node_modules/@babel/runtime": {
1064
- "version": "7.26.9",
1065
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz",
1066
- "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==",
1064
+ "version": "7.26.10",
1065
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
1066
+ "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
1067
1067
  "license": "MIT",
1068
1068
  "dependencies": {
1069
1069
  "regenerator-runtime": "^0.14.0"
@@ -1087,16 +1087,16 @@
1087
1087
  }
1088
1088
  },
1089
1089
  "node_modules/@babel/traverse": {
1090
- "version": "7.26.9",
1091
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz",
1092
- "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==",
1090
+ "version": "7.26.10",
1091
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz",
1092
+ "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==",
1093
1093
  "license": "MIT",
1094
1094
  "dependencies": {
1095
1095
  "@babel/code-frame": "^7.26.2",
1096
- "@babel/generator": "^7.26.9",
1097
- "@babel/parser": "^7.26.9",
1096
+ "@babel/generator": "^7.26.10",
1097
+ "@babel/parser": "^7.26.10",
1098
1098
  "@babel/template": "^7.26.9",
1099
- "@babel/types": "^7.26.9",
1099
+ "@babel/types": "^7.26.10",
1100
1100
  "debug": "^4.3.1",
1101
1101
  "globals": "^11.1.0"
1102
1102
  },
@@ -1105,9 +1105,9 @@
1105
1105
  }
1106
1106
  },
1107
1107
  "node_modules/@babel/types": {
1108
- "version": "7.26.9",
1109
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz",
1110
- "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==",
1108
+ "version": "7.26.10",
1109
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz",
1110
+ "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==",
1111
1111
  "license": "MIT",
1112
1112
  "dependencies": {
1113
1113
  "@babel/helper-string-parser": "^7.25.9",
@@ -2951,9 +2951,9 @@
2951
2951
  "license": "MIT"
2952
2952
  },
2953
2953
  "node_modules/@types/node": {
2954
- "version": "22.13.9",
2955
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.9.tgz",
2956
- "integrity": "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==",
2954
+ "version": "22.13.10",
2955
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
2956
+ "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
2957
2957
  "license": "MIT",
2958
2958
  "dependencies": {
2959
2959
  "undici-types": "~6.20.0"
@@ -3352,9 +3352,9 @@
3352
3352
  }
3353
3353
  },
3354
3354
  "node_modules/bl": {
3355
- "version": "6.0.20",
3356
- "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.20.tgz",
3357
- "integrity": "sha512-JMP0loH6ApbpT4Aa9oU5NqAkdDvcyc8koeuK8i5mYoBCVj3XCXG0uweGNN2m6DqaCO2yRHdm+MjCeTsR5VsmcA==",
3355
+ "version": "6.1.0",
3356
+ "resolved": "https://registry.npmjs.org/bl/-/bl-6.1.0.tgz",
3357
+ "integrity": "sha512-ClDyJGQkc8ZtzdAAbAwBmhMSpwN/sC9HA8jxdYm6nVUbCfZbe2mgza4qh7AuEYyEPB/c4Kznf9s66bnsKMQDjw==",
3358
3358
  "license": "MIT",
3359
3359
  "dependencies": {
3360
3360
  "@types/readable-stream": "^4.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harperdb",
3
- "version": "4.5.0-beta.2",
3
+ "version": "4.5.0-beta.3",
4
4
  "description": "HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.",
5
5
  "keywords": [
6
6
  "database",
@@ -41,6 +41,7 @@ export interface Table {
41
41
  sources: (new () => ResourceInterface)[];
42
42
  Transaction: ReturnType<typeof makeTable>;
43
43
  }
44
+ type ResidencyDefinition = number | string[] | void;
44
45
  /**
45
46
  * This returns a Table class for the given table settings (determined from the metadata table)
46
47
  * Instances of the returned class are Resource instances, intended to provide a consistent view or transaction of the table
@@ -104,7 +105,7 @@ export declare function makeTable(options: any): {
104
105
  _setChanges(changes: any): void;
105
106
  setRecord(record: any): void;
106
107
  invalidate(): void;
107
- _writeInvalidate(options: any): void;
108
+ _writeInvalidate(partial_record?: any, options?: any): void;
108
109
  _writeRelocate(options: any): void;
109
110
  /**
110
111
  * This is intended to acquire a lock on a record from the whole cluster.
@@ -213,6 +214,7 @@ export declare function makeTable(options: any): {
213
214
  propertyResolvers: any;
214
215
  userResolvers: {};
215
216
  sources: any[];
217
+ getResidencyById: (id: Id) => number | void;
216
218
  readonly expirationMS: any;
217
219
  dbisDB: any;
218
220
  schemaDefined: any;
@@ -294,7 +296,7 @@ export declare function makeTable(options: any): {
294
296
  _setChanges(changes: any): void;
295
297
  setRecord(record: any): void;
296
298
  invalidate(): void;
297
- _writeInvalidate(options: any): void;
299
+ _writeInvalidate(partial_record?: any, options?: any): void;
298
300
  _writeRelocate(options: any): void;
299
301
  /**
300
302
  * This is intended to acquire a lock on a record from the whole cluster.
@@ -440,7 +442,7 @@ export declare function makeTable(options: any): {
440
442
  _setChanges(changes: any): void;
441
443
  setRecord(record: any): void;
442
444
  invalidate(): void;
443
- _writeInvalidate(options: any): void;
445
+ _writeInvalidate(partial_record?: any, options?: any): void;
444
446
  _writeRelocate(options: any): void;
445
447
  /**
446
448
  * This is intended to acquire a lock on a record from the whole cluster.
@@ -544,9 +546,9 @@ export declare function makeTable(options: any): {
544
546
  scanInterval?: number;
545
547
  }): void;
546
548
  getResidencyRecord(id: any): any;
547
- setResidency(getResidency: (record: object, context: Context, previous_residency: string[]) => string[]): void;
548
- setResidencyById(getResidencyById: (id: Id) => string[]): void;
549
- getResidency(record: object, context: Context, previous_residency: string[]): any;
549
+ setResidency(getResidency: (record: object, context: Context) => ResidencyDefinition): void;
550
+ setResidencyById(getResidencyById: (id: Id) => number | void): void;
551
+ getResidency(record: object, context: Context): number | void | string[];
550
552
  /**
551
553
  * Turn on auditing at runtime
552
554
  */
@@ -113,7 +113,7 @@ export declare function table(table_definition: TableDefinition): {
113
113
  _setChanges(changes: any): void;
114
114
  setRecord(record: any): void;
115
115
  invalidate(): void;
116
- _writeInvalidate(options: any): void;
116
+ _writeInvalidate(partial_record?: any, options?: any): void;
117
117
  _writeRelocate(options: any): void;
118
118
  lock(): void;
119
119
  put(record: any): void;
@@ -218,6 +218,7 @@ export declare function table(table_definition: TableDefinition): {
218
218
  propertyResolvers: any;
219
219
  userResolvers: {};
220
220
  sources: any[];
221
+ getResidencyById: (id: import("./ResourceInterface").Id) => number | void;
221
222
  readonly expirationMS: any;
222
223
  dbisDB: any;
223
224
  schemaDefined: any;
@@ -260,7 +261,7 @@ export declare function table(table_definition: TableDefinition): {
260
261
  _setChanges(changes: any): void;
261
262
  setRecord(record: any): void;
262
263
  invalidate(): void;
263
- _writeInvalidate(options: any): void;
264
+ _writeInvalidate(partial_record?: any, options?: any): void;
264
265
  _writeRelocate(options: any): void;
265
266
  lock(): void;
266
267
  put(record: any): void;
@@ -367,7 +368,7 @@ export declare function table(table_definition: TableDefinition): {
367
368
  _setChanges(changes: any): void;
368
369
  setRecord(record: any): void;
369
370
  invalidate(): void;
370
- _writeInvalidate(options: any): void;
371
+ _writeInvalidate(partial_record?: any, options?: any): void;
371
372
  _writeRelocate(options: any): void;
372
373
  lock(): void;
373
374
  put(record: any): void;
@@ -447,9 +448,9 @@ export declare function table(table_definition: TableDefinition): {
447
448
  scanInterval?: number;
448
449
  }): void;
449
450
  getResidencyRecord(id: any): any;
450
- setResidency(getResidency: (record: object, context: import("./ResourceInterface").Context, previous_residency: string[]) => string[]): void;
451
- setResidencyById(getResidencyById: (id: import("./ResourceInterface").Id) => string[]): void;
452
- getResidency(record: object, context: import("./ResourceInterface").Context, previous_residency: string[]): any;
451
+ setResidency(getResidency: (record: object, context: import("./ResourceInterface").Context) => number | void | string[]): void;
452
+ setResidencyById(getResidencyById: (id: import("./ResourceInterface").Id) => number | void): void;
453
+ getResidency(record: object, context: import("./ResourceInterface").Context): number | void | string[];
453
454
  enableAuditing(audit_enabled?: boolean): void;
454
455
  coerceId(id: string): number | string;
455
456
  dropTable(): Promise<void>;
@@ -14,6 +14,9 @@ interface Server {
14
14
  authenticateUser(username: string, password: string, request: Request): any;
15
15
  operation(operation: any, context: any, authorize?: boolean): Promise<any>;
16
16
  recordAnalytics(value: Value, metric: string, path?: string, method?: string, type?: string): void;
17
+ nodes: string[];
18
+ shards: Map<number, string[]>;
19
+ hostname: string;
17
20
  }
18
21
  interface ServerOptions {
19
22
  port?: number;