harperdb 4.7.18 → 4.7.20
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/README.md +1 -1
- package/bin/harperdb.js +57 -57
- package/bin/lite.js +54 -54
- package/components/EntryHandler.d.ts +2 -1
- package/components/Logger.d.ts +12 -0
- package/components/OptionsWatcher.d.ts +2 -1
- package/components/Scope.d.ts +16 -5
- package/index.d.ts +20 -9
- package/index.js +3 -0
- package/launchServiceScripts/launchNatsIngestService.js +54 -54
- package/launchServiceScripts/launchNatsReplyService.js +54 -54
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +54 -54
- package/npm-shrinkwrap.json +346 -335
- package/package.json +1 -1
- package/resources/Table.d.ts +10 -4
- package/resources/databases.d.ts +12 -2
- package/server/jobs/jobProcess.js +54 -54
- package/server/threads/threadServer.js +54 -54
- package/studio/web/assets/{index-reMfz-PE.js → index-D-fcKyYx.js} +1 -1
- package/studio/web/assets/{index-C7BE1t1i.js → index-JYy8fJSs.js} +1 -1
- package/studio/web/assets/index-Zl65hD8K.css +1 -0
- package/studio/web/assets/index-oKJ2dNTo.js +234 -0
- package/studio/web/assets/{index.lazy-DG7DUk1C.js → index.lazy-C7Y8KaC7.js} +1 -1
- package/studio/web/assets/profiler-CxDJoqcP.js +1 -0
- package/studio/web/assets/{react-redux-4JeOy3fU.js → react-redux-LHAYowSO.js} +1 -1
- package/studio/web/assets/startRecording-CTUOSIln.js +2 -0
- package/studio/web/index.html +2 -2
- package/utility/scripts/restartHdb.js +54 -54
- package/v1.d.ts +8 -16
- package/v1.js +3 -0
- package/v2.d.ts +8 -16
- package/v2.js +41 -0
- package/studio/web/assets/index-BZ1HpJ7A.css +0 -1
- package/studio/web/assets/index-Bu-PphJh.js +0 -234
- package/studio/web/assets/profiler-B4vE9rPH.js +0 -1
- package/studio/web/assets/startRecording-B3i2VhSx.js +0 -2
package/package.json
CHANGED
package/resources/Table.d.ts
CHANGED
|
@@ -10,11 +10,17 @@ import { type RecordObject, type Entry } from './RecordEncoder.ts';
|
|
|
10
10
|
import { RequestTarget } from './RequestTarget.ts';
|
|
11
11
|
export type Attribute = {
|
|
12
12
|
name: string;
|
|
13
|
-
type: string;
|
|
13
|
+
type: 'ID' | 'Int' | 'Float' | 'Long' | 'String' | 'Boolean' | 'Date' | 'Bytes' | 'Any' | 'BigInt' | 'Blob' | string;
|
|
14
14
|
assignCreatedTime?: boolean;
|
|
15
15
|
assignUpdatedTime?: boolean;
|
|
16
|
+
nullable?: boolean;
|
|
16
17
|
expiresAt?: boolean;
|
|
17
18
|
isPrimaryKey?: boolean;
|
|
19
|
+
indexed?: unknown;
|
|
20
|
+
relationship?: unknown;
|
|
21
|
+
computed?: unknown;
|
|
22
|
+
properties?: Array<Attribute>;
|
|
23
|
+
elements?: Attribute;
|
|
18
24
|
};
|
|
19
25
|
export declare const INVALIDATED = 1;
|
|
20
26
|
export declare const EVICTED = 8;
|
|
@@ -25,7 +31,7 @@ export interface Table {
|
|
|
25
31
|
databasePath: string;
|
|
26
32
|
tableName: string;
|
|
27
33
|
databaseName: string;
|
|
28
|
-
attributes:
|
|
34
|
+
attributes: Attribute[];
|
|
29
35
|
primaryKey: string;
|
|
30
36
|
splitSegments?: boolean;
|
|
31
37
|
replicate?: boolean;
|
|
@@ -147,7 +153,7 @@ export declare function makeTable(options: any): {
|
|
|
147
153
|
audit: any;
|
|
148
154
|
databasePath: any;
|
|
149
155
|
databaseName: any;
|
|
150
|
-
attributes:
|
|
156
|
+
attributes: Attribute[];
|
|
151
157
|
replicate: any;
|
|
152
158
|
sealed: any;
|
|
153
159
|
splitSegments: any;
|
|
@@ -437,7 +443,7 @@ export declare function makeTable(options: any): {
|
|
|
437
443
|
* @param options
|
|
438
444
|
*/
|
|
439
445
|
subscribeOnThisThread(workerIndex: any, options: any): boolean;
|
|
440
|
-
addAttributes(attributesToAdd:
|
|
446
|
+
addAttributes(attributesToAdd: Attribute[]): Promise<any>;
|
|
441
447
|
removeAttributes(names: string[]): Promise<any>;
|
|
442
448
|
/**
|
|
443
449
|
* Get the size of the table in bytes (based on amount of pages stored in the database)
|
package/resources/databases.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
1
2
|
import { makeTable } from './Table.ts';
|
|
2
3
|
export declare const NON_REPLICATING_SYSTEM_TABLES: string[];
|
|
3
4
|
export type Table = ReturnType<typeof makeTable>;
|
|
@@ -7,6 +8,12 @@ export interface Tables {
|
|
|
7
8
|
export interface Databases {
|
|
8
9
|
[databaseName: string]: Tables;
|
|
9
10
|
}
|
|
11
|
+
export type DatabaseWatcherEventMap = {
|
|
12
|
+
updateTable: [table: Table, originIsNotCluster?: boolean];
|
|
13
|
+
dropTable: [tableName: string, databaseName: string];
|
|
14
|
+
dropDatabase: [databaseName: string];
|
|
15
|
+
};
|
|
16
|
+
export declare const databaseEventsEmitter: EventEmitter<DatabaseWatcherEventMap>;
|
|
10
17
|
export declare const tables: Tables;
|
|
11
18
|
export declare const databases: Databases;
|
|
12
19
|
export declare const databaseEnvs: Map<string, any>;
|
|
@@ -82,10 +89,13 @@ export declare function dropTableMeta({ table: tableName, database: databaseName
|
|
|
82
89
|
table: any;
|
|
83
90
|
database: any;
|
|
84
91
|
}): Promise<any[]>;
|
|
85
|
-
export declare function onUpdatedTable(listener:
|
|
92
|
+
export declare function onUpdatedTable(listener: (table: Table) => void): {
|
|
93
|
+
remove(): void;
|
|
94
|
+
};
|
|
95
|
+
export declare function onRemovedTable(listener: (tableName: string, databaseName: string) => void): {
|
|
86
96
|
remove(): void;
|
|
87
97
|
};
|
|
88
|
-
export declare function onRemovedDB(listener:
|
|
98
|
+
export declare function onRemovedDB(listener: (databaseName: string) => void): {
|
|
89
99
|
remove(): void;
|
|
90
100
|
};
|
|
91
101
|
export declare function getDefaultCompression(): {
|