harperdb 4.3.18 → 4.3.19
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 +45 -45
- package/bin/lite.js +15 -15
- package/launchServiceScripts/launchInstallNATSServer.js +1 -1
- package/launchServiceScripts/launchNatsIngestService.js +15 -15
- package/launchServiceScripts/launchNatsReplyService.js +15 -15
- package/launchServiceScripts/launchUpdateNodes4-0-0.js +15 -15
- package/npm-shrinkwrap.json +38 -35
- package/package.json +1 -1
- package/resources/IterableEventQueue.d.ts +0 -1
- package/resources/Resource.d.ts +10 -10
- package/resources/Table.d.ts +46 -47
- package/resources/auditStore.d.ts +0 -1
- package/resources/databases.d.ts +50 -51
- package/resources/transaction.d.ts +7 -0
- package/server/Server.d.ts +0 -2
- package/server/jobs/jobProcess.js +15 -15
- package/server/threads/threadServer.js +15 -15
- package/studio/build-local/asset-manifest.json +2 -2
- package/studio/build-local/index.html +1 -1
- package/studio/build-local/static/js/{main.3213e963.js → main.05c1913d.js} +2 -2
- package/utility/scripts/restartHdb.js +15 -15
- /package/studio/build-local/static/js/{main.3213e963.js.LICENSE.txt → main.05c1913d.js.LICENSE.txt} +0 -0
package/resources/databases.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { makeTable } from './Table';
|
|
3
2
|
interface Tables {
|
|
4
3
|
[table_name: string]: ReturnType<typeof makeTable>;
|
|
@@ -74,7 +73,7 @@ export declare function dropDatabase(database_name: any): Promise<void>;
|
|
|
74
73
|
export declare function table({ table: table_name, database: database_name, expiration, eviction, scanInterval: scan_interval, attributes, audit, sealed, trackDeletes: track_deletes, schemaDefined: schema_defined, origin, }: TableDefinition): {
|
|
75
74
|
new (identifier: import("./ResourceInterface").Id, source: any): {
|
|
76
75
|
ensureLoaded(): any;
|
|
77
|
-
get(query?:
|
|
76
|
+
get(query?: import("./ResourceInterface").Query | string): Promise<object | void> | object | void;
|
|
78
77
|
allowRead(user: any, query: any): any;
|
|
79
78
|
allowUpdate(user: any, updated_data: any): boolean;
|
|
80
79
|
allowCreate(user: any, new_data: {}): boolean;
|
|
@@ -121,20 +120,20 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
121
120
|
};
|
|
122
121
|
};
|
|
123
122
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
124
|
-
addListener<
|
|
125
|
-
once<
|
|
126
|
-
removeListener<
|
|
127
|
-
off<
|
|
123
|
+
addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
124
|
+
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
125
|
+
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
126
|
+
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
128
127
|
removeAllListeners(eventName?: string | symbol): any;
|
|
129
128
|
setMaxListeners(n: number): any;
|
|
130
129
|
getMaxListeners(): number;
|
|
131
|
-
listeners<
|
|
132
|
-
rawListeners<
|
|
133
|
-
emit<
|
|
134
|
-
listenerCount<
|
|
135
|
-
prependListener<
|
|
136
|
-
prependOnceListener<
|
|
137
|
-
eventNames(): (string | symbol)
|
|
130
|
+
listeners<K>(eventName: string | symbol): Array<Function>;
|
|
131
|
+
rawListeners<K>(eventName: string | symbol): Array<Function>;
|
|
132
|
+
emit<K>(eventName: string | symbol, ...args: any[]): boolean;
|
|
133
|
+
listenerCount<K>(eventName: string | symbol, listener?: Function): number;
|
|
134
|
+
prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
135
|
+
prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
136
|
+
eventNames(): Array<(string | symbol) & (string | symbol)>;
|
|
138
137
|
}>;
|
|
139
138
|
doesExist(): boolean;
|
|
140
139
|
publish(message: any, options?: any): void;
|
|
@@ -166,9 +165,9 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
166
165
|
dbisDB: any;
|
|
167
166
|
schemaDefined: any;
|
|
168
167
|
sourcedFrom(source: any, options: any): any;
|
|
169
|
-
getResource(id: import("./ResourceInterface").Id, request: any, resource_options?: any): {
|
|
168
|
+
getResource(id: import("./ResourceInterface").Id, request: any, resource_options?: any): Promise<{
|
|
170
169
|
ensureLoaded(): any;
|
|
171
|
-
get(query?:
|
|
170
|
+
get(query?: import("./ResourceInterface").Query | string): Promise<object | void> | object | void;
|
|
172
171
|
allowRead(user: any, query: any): any;
|
|
173
172
|
allowUpdate(user: any, updated_data: any): boolean;
|
|
174
173
|
allowCreate(user: any, new_data: {}): boolean;
|
|
@@ -215,20 +214,20 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
215
214
|
};
|
|
216
215
|
};
|
|
217
216
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
218
|
-
addListener<
|
|
219
|
-
once<
|
|
220
|
-
removeListener<
|
|
221
|
-
off<
|
|
217
|
+
addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
218
|
+
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
219
|
+
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
220
|
+
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
222
221
|
removeAllListeners(eventName?: string | symbol): any;
|
|
223
222
|
setMaxListeners(n: number): any;
|
|
224
223
|
getMaxListeners(): number;
|
|
225
|
-
listeners<
|
|
226
|
-
rawListeners<
|
|
227
|
-
emit<
|
|
228
|
-
listenerCount<
|
|
229
|
-
prependListener<
|
|
230
|
-
prependOnceListener<
|
|
231
|
-
eventNames(): (string | symbol)
|
|
224
|
+
listeners<K>(eventName: string | symbol): Array<Function>;
|
|
225
|
+
rawListeners<K>(eventName: string | symbol): Array<Function>;
|
|
226
|
+
emit<K>(eventName: string | symbol, ...args: any[]): boolean;
|
|
227
|
+
listenerCount<K>(eventName: string | symbol, listener?: Function): number;
|
|
228
|
+
prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
229
|
+
prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
230
|
+
eventNames(): Array<(string | symbol) & (string | symbol)>;
|
|
232
231
|
}>;
|
|
233
232
|
doesExist(): boolean;
|
|
234
233
|
publish(message: any, options?: any): void;
|
|
@@ -240,9 +239,9 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
240
239
|
connect(query?: {}): AsyncIterable<any>;
|
|
241
240
|
getId(): any;
|
|
242
241
|
getContext(): any;
|
|
243
|
-
} |
|
|
242
|
+
}> | {
|
|
244
243
|
ensureLoaded(): any;
|
|
245
|
-
get(query?:
|
|
244
|
+
get(query?: import("./ResourceInterface").Query | string): Promise<object | void> | object | void;
|
|
246
245
|
allowRead(user: any, query: any): any;
|
|
247
246
|
allowUpdate(user: any, updated_data: any): boolean;
|
|
248
247
|
allowCreate(user: any, new_data: {}): boolean;
|
|
@@ -289,20 +288,20 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
289
288
|
};
|
|
290
289
|
};
|
|
291
290
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
292
|
-
addListener<
|
|
293
|
-
once<
|
|
294
|
-
removeListener<
|
|
295
|
-
off<
|
|
291
|
+
addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
292
|
+
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
293
|
+
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
294
|
+
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
296
295
|
removeAllListeners(eventName?: string | symbol): any;
|
|
297
296
|
setMaxListeners(n: number): any;
|
|
298
297
|
getMaxListeners(): number;
|
|
299
|
-
listeners<
|
|
300
|
-
rawListeners<
|
|
301
|
-
emit<
|
|
302
|
-
listenerCount<
|
|
303
|
-
prependListener<
|
|
304
|
-
prependOnceListener<
|
|
305
|
-
eventNames(): (string | symbol)
|
|
298
|
+
listeners<K>(eventName: string | symbol): Array<Function>;
|
|
299
|
+
rawListeners<K>(eventName: string | symbol): Array<Function>;
|
|
300
|
+
emit<K>(eventName: string | symbol, ...args: any[]): boolean;
|
|
301
|
+
listenerCount<K>(eventName: string | symbol, listener?: Function): number;
|
|
302
|
+
prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
303
|
+
prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
304
|
+
eventNames(): Array<(string | symbol) & (string | symbol)>;
|
|
306
305
|
}>;
|
|
307
306
|
doesExist(): boolean;
|
|
308
307
|
publish(message: any, options?: any): void;
|
|
@@ -314,14 +313,14 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
314
313
|
connect(query?: {}): AsyncIterable<any>;
|
|
315
314
|
getId(): any;
|
|
316
315
|
getContext(): any;
|
|
317
|
-
}
|
|
316
|
+
};
|
|
318
317
|
setTTLExpiration(expiration: number | {
|
|
319
318
|
expiration: number;
|
|
320
319
|
eviction?: number;
|
|
321
320
|
scanInterval?: number;
|
|
322
321
|
}): void;
|
|
323
322
|
enableAuditing(audit_enabled?: boolean): void;
|
|
324
|
-
coerceId(id: string):
|
|
323
|
+
coerceId(id: string): number | string;
|
|
325
324
|
dropTable(): Promise<void>;
|
|
326
325
|
evict(id: any, existing_record: any, existing_version: any): any;
|
|
327
326
|
operation(operation: any, context: any): any;
|
|
@@ -355,11 +354,11 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
355
354
|
get(request: import("./ResourceInterface").Request, context?: import("./ResourceInterface").Context): Promise<object>;
|
|
356
355
|
get(query: import("./ResourceInterface").Query, context?: import("./ResourceInterface").Context): Promise<AsyncIterable<object>>;
|
|
357
356
|
put: {
|
|
358
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
357
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
359
358
|
reliesOnPrototype: boolean;
|
|
360
359
|
};
|
|
361
360
|
patch: {
|
|
362
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
361
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
363
362
|
reliesOnPrototype: boolean;
|
|
364
363
|
};
|
|
365
364
|
delete(identifier: import("./ResourceInterface").Id, context?: import("./ResourceInterface").Context): Promise<boolean>;
|
|
@@ -368,15 +367,15 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
368
367
|
create(id_prefix: import("./ResourceInterface").Id, record: any, context: import("./ResourceInterface").Context): Promise<import("./ResourceInterface").Id>;
|
|
369
368
|
create(record: any, context: import("./ResourceInterface").Context): Promise<import("./ResourceInterface").Id>;
|
|
370
369
|
invalidate: {
|
|
371
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
370
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
372
371
|
reliesOnPrototype: boolean;
|
|
373
372
|
};
|
|
374
373
|
post: {
|
|
375
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
374
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
376
375
|
reliesOnPrototype: boolean;
|
|
377
376
|
};
|
|
378
377
|
connect: {
|
|
379
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
378
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
380
379
|
reliesOnPrototype: boolean;
|
|
381
380
|
};
|
|
382
381
|
subscribe(request: import("./ResourceInterface").SubscriptionRequest): Promise<AsyncIterable<{
|
|
@@ -385,23 +384,23 @@ export declare function table({ table: table_name, database: database_name, expi
|
|
|
385
384
|
value: object;
|
|
386
385
|
}>>;
|
|
387
386
|
publish: {
|
|
388
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
387
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
389
388
|
reliesOnPrototype: boolean;
|
|
390
389
|
};
|
|
391
390
|
search: {
|
|
392
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
391
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
393
392
|
reliesOnPrototype: boolean;
|
|
394
393
|
};
|
|
395
394
|
query: {
|
|
396
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
395
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
397
396
|
reliesOnPrototype: boolean;
|
|
398
397
|
};
|
|
399
398
|
copy: {
|
|
400
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
399
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
401
400
|
reliesOnPrototype: boolean;
|
|
402
401
|
};
|
|
403
402
|
move: {
|
|
404
|
-
(id_or_query: import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
403
|
+
(id_or_query: string | import("./ResourceInterface").Id, data_or_context?: any, context?: import("./ResourceInterface").Context): any;
|
|
405
404
|
reliesOnPrototype: boolean;
|
|
406
405
|
};
|
|
407
406
|
isCollection(resource: any): any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Request } from './ResourceInterface';
|
|
2
|
+
export declare function transaction<T>(context: Request, callback: (transaction: TransactionSet) => T, options?: any): T;
|
|
3
|
+
export declare function transaction<T>(callback: (transaction: TransactionSet) => T): T;
|
|
4
|
+
export declare namespace transaction {
|
|
5
|
+
var commit: (context_source: any) => any;
|
|
6
|
+
var abort: (context_source: any) => any;
|
|
7
|
+
}
|