@harperfast/harper-pro 5.0.0-beta.1 → 5.0.0-beta.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.
- package/core/.github/workflows/integration-tests.yml +7 -5
- package/core/components/componentLoader.ts +1 -1
- package/core/integrationTests/utils/harperLifecycle.ts +9 -5
- package/core/package.json +2 -1
- package/core/resources/ResourceInterface.ts +1 -1
- package/core/resources/Table.ts +9 -5
- package/core/resources/search.ts +1 -1
- package/core/security/jsLoader.ts +23 -6
- package/core/security/keys.js +7 -7
- package/core/unitTests/components/fixtures/testJSWithDeps/child-dir/typestrip.ts +2 -0
- package/core/unitTests/components/fixtures/testJSWithDeps/resources.js +3 -0
- package/core/unitTests/components/globalIsolation.test.js +1 -0
- package/core/unitTests/resources/query.test.js +16 -1
- package/core/utility/lmdb/commonUtility.js +21 -10
- package/dist/cloneNode/cloneNode.js +7 -3
- package/dist/cloneNode/cloneNode.js.map +1 -1
- package/dist/core/components/componentLoader.js +1 -1
- package/dist/core/components/componentLoader.js.map +1 -1
- package/dist/core/resources/Table.js +8 -3
- package/dist/core/resources/Table.js.map +1 -1
- package/dist/core/resources/search.js +1 -1
- package/dist/core/resources/search.js.map +1 -1
- package/dist/core/security/jsLoader.js +22 -7
- package/dist/core/security/jsLoader.js.map +1 -1
- package/dist/core/security/keys.js +7 -7
- package/dist/core/security/keys.js.map +1 -1
- package/dist/core/utility/lmdb/commonUtility.js +20 -13
- package/dist/core/utility/lmdb/commonUtility.js.map +1 -1
- package/dist/licensing/usageLicensing.js.map +1 -1
- package/dist/replication/knownNodes.js +5 -37
- package/dist/replication/knownNodes.js.map +1 -1
- package/dist/replication/nodeIdMapping.js +2 -35
- package/dist/replication/nodeIdMapping.js.map +1 -1
- package/dist/replication/replicationConnection.js +6 -3
- package/dist/replication/replicationConnection.js.map +1 -1
- package/dist/replication/replicator.js +3 -2
- package/dist/replication/replicator.js.map +1 -1
- package/dist/replication/setNode.js +1 -1
- package/dist/replication/setNode.js.map +1 -1
- package/dist/security/certificate.js.map +1 -1
- package/licensing/usageLicensing.ts +3 -2
- package/npm-shrinkwrap.json +59 -48
- package/package.json +3 -2
- package/replication/knownNodes.ts +3 -2
- package/replication/nodeIdMapping.ts +1 -1
- package/replication/replicationConnection.ts +17 -5
- package/replication/replicator.ts +7 -2
- package/replication/setNode.ts +1 -1
- package/security/certificate.ts +2 -1
- package/studio/web/assets/{index-PFlNdimM.js → index-CWN9Wp5V.js} +2 -2
- package/studio/web/assets/{index-PFlNdimM.js.map → index-CWN9Wp5V.js.map} +1 -1
- package/studio/web/assets/{index-C-GXfcup.js → index-CzghSAn2.js} +2 -2
- package/studio/web/assets/{index-C-GXfcup.js.map → index-CzghSAn2.js.map} +1 -1
- package/studio/web/assets/{index-BTgXJX9d.js → index-DMDhGP7N.js} +5 -5
- package/studio/web/assets/{index-BTgXJX9d.js.map → index-DMDhGP7N.js.map} +1 -1
- package/studio/web/assets/{index.lazy-C3TJZJ4o.js → index.lazy-C-yDTGUy.js} +2 -2
- package/studio/web/assets/{index.lazy-C3TJZJ4o.js.map → index.lazy-C-yDTGUy.js.map} +1 -1
- package/studio/web/assets/{profiler-DotzgiCJ.js → profiler-0fZAOscv.js} +2 -2
- package/studio/web/assets/{profiler-DotzgiCJ.js.map → profiler-0fZAOscv.js.map} +1 -1
- package/studio/web/assets/{react-redux-VxUEx_mU.js → react-redux-BIxqK8O6.js} +2 -2
- package/studio/web/assets/{react-redux-VxUEx_mU.js.map → react-redux-BIxqK8O6.js.map} +1 -1
- package/studio/web/assets/{startRecording-B_9J9Csd.js → startRecording-Ca3Gf2MY.js} +2 -2
- package/studio/web/assets/{startRecording-B_9J9Csd.js.map → startRecording-Ca3Gf2MY.js.map} +1 -1
- package/studio/web/index.html +1 -1
- package/core/resources/ResourceInterfaceV2.ts +0 -53
- package/core/resources/ResourceV2.ts +0 -67
- package/core/v1.d.ts +0 -39
- package/core/v1.js +0 -41
- package/core/v2.d.ts +0 -39
- package/core/v2.js +0 -41
- package/dist/core/resources/ResourceInterfaceV2.js +0 -3
- package/dist/core/resources/ResourceInterfaceV2.js.map +0 -1
- package/dist/core/resources/ResourceV2.js +0 -27
- package/dist/core/resources/ResourceV2.js.map +0 -1
package/studio/web/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<link rel="icon" type="dynamic-favicon" href="/favicon_purple.png" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Harper Fabric</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-DMDhGP7N.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-Y2g_iFpU.css">
|
|
11
11
|
</head>
|
|
12
12
|
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { User } from '../security/user.js';
|
|
2
|
-
import type { RecordObject } from './RecordEncoder.ts';
|
|
3
|
-
import { RequestTarget } from './RequestTarget.ts';
|
|
4
|
-
import { RequestTargetOrId, ResourceInterface, SubscriptionRequest, UpdatableRecord } from './ResourceInterface.ts';
|
|
5
|
-
|
|
6
|
-
// @ts-expect-error We changed the interface in v2 with breaking changes (by flipping target and newRecord/record)
|
|
7
|
-
export interface ResourceInterfaceV2<Record extends object = any> extends ResourceInterface<Record> {
|
|
8
|
-
get?(
|
|
9
|
-
target?: RequestTargetOrId
|
|
10
|
-
):
|
|
11
|
-
| (Record & Partial<RecordObject>)
|
|
12
|
-
| Promise<Record & Partial<RecordObject>>
|
|
13
|
-
| AsyncIterable<Record & Partial<RecordObject>>
|
|
14
|
-
| Promise<AsyncIterable<Record & Partial<RecordObject>>>;
|
|
15
|
-
search?(target: RequestTarget): AsyncIterable<Record & Partial<RecordObject>>;
|
|
16
|
-
|
|
17
|
-
create?(
|
|
18
|
-
target: RequestTargetOrId,
|
|
19
|
-
newRecord: Partial<Record & RecordObject>
|
|
20
|
-
): void | (Record & Partial<RecordObject>) | Promise<Record & Partial<RecordObject>>;
|
|
21
|
-
post?(
|
|
22
|
-
target: RequestTargetOrId,
|
|
23
|
-
newRecord: Partial<Record & RecordObject>
|
|
24
|
-
): void | (Record & Partial<RecordObject>) | Promise<Record & Partial<RecordObject>>;
|
|
25
|
-
|
|
26
|
-
put?(
|
|
27
|
-
target: RequestTargetOrId,
|
|
28
|
-
record: Record & RecordObject
|
|
29
|
-
): void | (Record & Partial<RecordObject>) | Promise<void | (Record & Partial<RecordObject>)>;
|
|
30
|
-
patch?(
|
|
31
|
-
target: RequestTargetOrId,
|
|
32
|
-
record: Partial<Record & RecordObject>
|
|
33
|
-
): void | (Record & Partial<RecordObject>) | Promise<void | (Record & Partial<RecordObject>)>;
|
|
34
|
-
update?(updates: Record & RecordObject, fullUpdate: true): ResourceInterface<Record & Partial<RecordObject>>;
|
|
35
|
-
update?(
|
|
36
|
-
updates: Partial<Record & RecordObject>,
|
|
37
|
-
fullUpdate?: boolean
|
|
38
|
-
):
|
|
39
|
-
| ResourceInterface<Record & Partial<RecordObject>>
|
|
40
|
-
| Promise<ResourceInterface<Record & Partial<RecordObject>> | UpdatableRecord<Record & Partial<RecordObject>>>;
|
|
41
|
-
|
|
42
|
-
delete?(target: RequestTargetOrId): boolean | Promise<boolean>;
|
|
43
|
-
|
|
44
|
-
invalidate(target: RequestTargetOrId): void | Promise<void>;
|
|
45
|
-
|
|
46
|
-
publish?(target: RequestTargetOrId, record: Record): void;
|
|
47
|
-
subscribe?(request: SubscriptionRequest): AsyncIterable<Record> | Promise<AsyncIterable<Record>>;
|
|
48
|
-
|
|
49
|
-
doesExist(): boolean;
|
|
50
|
-
wasLoadedFromSource(): boolean | void;
|
|
51
|
-
|
|
52
|
-
getCurrentUser(): User | undefined;
|
|
53
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { _assignPackageExport } from '../globals.js';
|
|
2
|
-
import { IterableEventQueue } from './IterableEventQueue.js';
|
|
3
|
-
import type { RecordObject } from './RecordEncoder.js';
|
|
4
|
-
import { RequestTarget } from './RequestTarget.js';
|
|
5
|
-
import { Resource } from './Resource.ts';
|
|
6
|
-
import { RequestTargetOrId } from './ResourceInterface.ts';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This is the main class that can be extended for any resource in HarperDB and provides the essential reusable
|
|
10
|
-
* uniform interface for interacting with data, defining the API for providing data (data sources) and for consuming
|
|
11
|
-
* data. This interface is used pervasively in HarperDB and is implemented by database tables and can be used to define
|
|
12
|
-
* sources for caching, real-data sources for messaging protocols, and RESTful endpoints, as well as any other types of
|
|
13
|
-
* data aggregation, processing, or monitoring.
|
|
14
|
-
*
|
|
15
|
-
* This base Resource class provides a set of static methods that are main entry points for querying and updating data
|
|
16
|
-
* in resources/tables. The static methods provide the default handling of arguments, context, and ensuring that
|
|
17
|
-
* internal actions are wrapped in a transaction. The base Resource class intended to be extended, and the instance
|
|
18
|
-
* methods can be overridden to provide specific implementations of actions like get, put, post, delete, and subscribe.
|
|
19
|
-
*/
|
|
20
|
-
export class ResourceV2<Record extends object = any> extends Resource<Record> {
|
|
21
|
-
static loadAsInstance: boolean = false;
|
|
22
|
-
|
|
23
|
-
get?(
|
|
24
|
-
target?: RequestTargetOrId
|
|
25
|
-
):
|
|
26
|
-
| (Record & Partial<RecordObject>)
|
|
27
|
-
| Promise<Record & Partial<RecordObject>>
|
|
28
|
-
| AsyncIterable<Record & Partial<RecordObject>>
|
|
29
|
-
| Promise<AsyncIterable<Record & Partial<RecordObject>>>;
|
|
30
|
-
|
|
31
|
-
search?(target: RequestTargetOrId): AsyncIterable<Record & Partial<RecordObject>>;
|
|
32
|
-
|
|
33
|
-
// @ts-expect-error We swapped the order of target and newRecord.
|
|
34
|
-
create?(
|
|
35
|
-
target: RequestTargetOrId,
|
|
36
|
-
newRecord: Partial<Record & RecordObject>
|
|
37
|
-
): void | (Record & Partial<RecordObject>) | Promise<Record & Partial<RecordObject>>;
|
|
38
|
-
|
|
39
|
-
// @ts-expect-error In v2, we're adjusting the types.
|
|
40
|
-
post(
|
|
41
|
-
target: RequestTargetOrId,
|
|
42
|
-
newRecord: Partial<Record & RecordObject>
|
|
43
|
-
): void | (Record & Partial<RecordObject>) | Promise<Record & Partial<RecordObject>> {
|
|
44
|
-
return super.post(target, newRecord);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// @ts-expect-error We swapped the order of target and record.
|
|
48
|
-
put?(
|
|
49
|
-
target: RequestTargetOrId,
|
|
50
|
-
record: Record & RecordObject
|
|
51
|
-
): void | (Record & Partial<RecordObject>) | Promise<void | (Record & Partial<RecordObject>)>;
|
|
52
|
-
|
|
53
|
-
// @ts-expect-error We swapped the order of target and record.
|
|
54
|
-
patch?(
|
|
55
|
-
target: RequestTargetOrId,
|
|
56
|
-
record: Partial<Record & RecordObject>
|
|
57
|
-
): void | (Record & Partial<RecordObject>) | Promise<void | (Record & Partial<RecordObject>)>;
|
|
58
|
-
|
|
59
|
-
delete?(target: RequestTargetOrId): boolean | Promise<boolean>;
|
|
60
|
-
invalidate?(target: RequestTargetOrId): void | Promise<void>;
|
|
61
|
-
|
|
62
|
-
// @ts-expect-error We swapped the order of target and record.
|
|
63
|
-
connect?(incomingMessages: IterableEventQueue<Record>, target: RequestTarget): AsyncIterable<Record>;
|
|
64
|
-
publish?(target: RequestTargetOrId, record: Record): void;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
_assignPackageExport('ResourceV2', ResourceV2);
|
package/core/v1.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export { Resource } from './resources/Resource.ts';
|
|
2
|
-
export type {
|
|
3
|
-
Context,
|
|
4
|
-
Query,
|
|
5
|
-
RequestTargetOrId,
|
|
6
|
-
Session,
|
|
7
|
-
SourceContext,
|
|
8
|
-
SubscriptionRequest,
|
|
9
|
-
} from './resources/ResourceInterface.ts';
|
|
10
|
-
export { ResourceInterface } from './resources/ResourceInterface.ts';
|
|
11
|
-
export type { User } from './security/user.ts';
|
|
12
|
-
export type { RecordObject } from './resources/RecordEncoder.ts';
|
|
13
|
-
export type { IterableEventQueue } from './resources/IterableEventQueue.ts';
|
|
14
|
-
export { RequestTarget } from './resources/RequestTarget.ts';
|
|
15
|
-
export { server } from './server/Server';
|
|
16
|
-
export { tables, databases, type Table } from './resources/databases.ts';
|
|
17
|
-
export type { Attribute } from './resources/Table.ts';
|
|
18
|
-
|
|
19
|
-
import type { Logger } from './components/Logger.ts';
|
|
20
|
-
declare const logger: Logger;
|
|
21
|
-
export { type Logger, logger };
|
|
22
|
-
|
|
23
|
-
export type { Scope } from './components/Scope.ts';
|
|
24
|
-
export type { FilesOption, FilesOptionObject } from './components/deriveGlobOptions.ts';
|
|
25
|
-
export type { FileAndURLPathConfig } from './components/Component.ts';
|
|
26
|
-
export { OptionsWatcher, type Config, type ConfigValue } from './components/OptionsWatcher.ts';
|
|
27
|
-
export {
|
|
28
|
-
EntryHandler,
|
|
29
|
-
type BaseEntry,
|
|
30
|
-
type FileEntry,
|
|
31
|
-
type EntryEvent,
|
|
32
|
-
type AddFileEvent,
|
|
33
|
-
type ChangeFileEvent,
|
|
34
|
-
type UnlinkFileEvent,
|
|
35
|
-
type FileEntryEvent,
|
|
36
|
-
type AddDirectoryEvent,
|
|
37
|
-
type UnlinkDirectoryEvent,
|
|
38
|
-
type DirectoryEntryEvent,
|
|
39
|
-
} from './components/EntryHandler.ts';
|
package/core/v1.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const workerThreads = require('node:worker_threads');
|
|
2
|
-
if (!workerThreads.isMainThread) {
|
|
3
|
-
// Prevents server from starting in worker threads if this was directly imported from a non-server user thread
|
|
4
|
-
if (!workerThreads.workerData) workerThreads.workerData = {};
|
|
5
|
-
workerThreads.workerData.noServerStart = true;
|
|
6
|
-
}
|
|
7
|
-
const { globals } = require('./server/threads/threadServer.js');
|
|
8
|
-
|
|
9
|
-
// exported types are needed for parsing as well
|
|
10
|
-
exports.Attribute = undefined;
|
|
11
|
-
exports.Config = undefined;
|
|
12
|
-
exports.ConfigValue = undefined;
|
|
13
|
-
exports.Context = undefined;
|
|
14
|
-
exports.FileAndURLPathConfig = undefined;
|
|
15
|
-
exports.FilesOption = undefined;
|
|
16
|
-
exports.FilesOptionObject = undefined;
|
|
17
|
-
exports.IterableEventQueue = undefined;
|
|
18
|
-
exports.Logger = undefined;
|
|
19
|
-
exports.Query = undefined;
|
|
20
|
-
exports.RecordObject = undefined;
|
|
21
|
-
exports.RequestTarget = undefined;
|
|
22
|
-
exports.RequestTargetOrId = undefined;
|
|
23
|
-
exports.Resource = undefined;
|
|
24
|
-
exports.ResourceInterface = undefined;
|
|
25
|
-
exports.Scope = undefined;
|
|
26
|
-
exports.Session = undefined;
|
|
27
|
-
exports.SourceContext = undefined;
|
|
28
|
-
exports.SubscriptionRequest = undefined;
|
|
29
|
-
exports.Table = undefined;
|
|
30
|
-
exports.User = undefined;
|
|
31
|
-
|
|
32
|
-
// these are all overwritten by the globals, but need to be here so that Node's static
|
|
33
|
-
// exports parser can analyze them
|
|
34
|
-
exports.tables = {};
|
|
35
|
-
exports.databases = {};
|
|
36
|
-
exports.getUser = undefined;
|
|
37
|
-
exports.server = {};
|
|
38
|
-
exports.contentTypes = null;
|
|
39
|
-
exports.threads = [];
|
|
40
|
-
exports.logger = {};
|
|
41
|
-
Object.assign(exports, globals);
|
package/core/v2.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export { ResourceV2 as Resource } from './resources/ResourceV2.ts';
|
|
2
|
-
export type {
|
|
3
|
-
Context,
|
|
4
|
-
Query,
|
|
5
|
-
RequestTargetOrId,
|
|
6
|
-
Session,
|
|
7
|
-
SourceContext,
|
|
8
|
-
SubscriptionRequest,
|
|
9
|
-
} from './resources/ResourceInterface.ts';
|
|
10
|
-
export { ResourceInterfaceV2 as ResourceInterface } from './resources/ResourceInterfaceV2.ts';
|
|
11
|
-
export type { User } from './security/user.ts';
|
|
12
|
-
export type { RecordObject } from './resources/RecordEncoder.ts';
|
|
13
|
-
export type { IterableEventQueue } from './resources/IterableEventQueue.ts';
|
|
14
|
-
export { RequestTarget } from './resources/RequestTarget.ts';
|
|
15
|
-
export { server } from './server/Server';
|
|
16
|
-
export { tables, databases, type Table } from './resources/databases.ts';
|
|
17
|
-
export type { Attribute } from './resources/Table.ts';
|
|
18
|
-
|
|
19
|
-
import type { Logger } from './components/Logger.ts';
|
|
20
|
-
declare const logger: Logger;
|
|
21
|
-
export { type Logger, logger };
|
|
22
|
-
|
|
23
|
-
export type { Scope } from './components/Scope.ts';
|
|
24
|
-
export type { FilesOption, FilesOptionObject } from './components/deriveGlobOptions.ts';
|
|
25
|
-
export type { FileAndURLPathConfig } from './components/Component.ts';
|
|
26
|
-
export { OptionsWatcher, type Config, type ConfigValue } from './components/OptionsWatcher.ts';
|
|
27
|
-
export {
|
|
28
|
-
EntryHandler,
|
|
29
|
-
type BaseEntry,
|
|
30
|
-
type FileEntry,
|
|
31
|
-
type EntryEvent,
|
|
32
|
-
type AddFileEvent,
|
|
33
|
-
type ChangeFileEvent,
|
|
34
|
-
type UnlinkFileEvent,
|
|
35
|
-
type FileEntryEvent,
|
|
36
|
-
type AddDirectoryEvent,
|
|
37
|
-
type UnlinkDirectoryEvent,
|
|
38
|
-
type DirectoryEntryEvent,
|
|
39
|
-
} from './components/EntryHandler.ts';
|
package/core/v2.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const workerThreads = require('node:worker_threads');
|
|
2
|
-
if (!workerThreads.isMainThread) {
|
|
3
|
-
// Prevents server from starting in worker threads if this was directly imported from a non-server user thread
|
|
4
|
-
if (!workerThreads.workerData) workerThreads.workerData = {};
|
|
5
|
-
workerThreads.workerData.noServerStart = true;
|
|
6
|
-
}
|
|
7
|
-
const { globals } = require('./server/threads/threadServer.js');
|
|
8
|
-
|
|
9
|
-
// exported types are needed for parsing as well
|
|
10
|
-
exports.Attribute = undefined;
|
|
11
|
-
exports.Config = undefined;
|
|
12
|
-
exports.ConfigValue = undefined;
|
|
13
|
-
exports.Context = undefined;
|
|
14
|
-
exports.FileAndURLPathConfig = undefined;
|
|
15
|
-
exports.FilesOption = undefined;
|
|
16
|
-
exports.FilesOptionObject = undefined;
|
|
17
|
-
exports.IterableEventQueue = undefined;
|
|
18
|
-
exports.Logger = undefined;
|
|
19
|
-
exports.Query = undefined;
|
|
20
|
-
exports.RecordObject = undefined;
|
|
21
|
-
exports.RequestTarget = undefined;
|
|
22
|
-
exports.RequestTargetOrId = undefined;
|
|
23
|
-
exports.Resource = undefined;
|
|
24
|
-
exports.ResourceInterface = undefined;
|
|
25
|
-
exports.Scope = undefined;
|
|
26
|
-
exports.Session = undefined;
|
|
27
|
-
exports.SourceContext = undefined;
|
|
28
|
-
exports.SubscriptionRequest = undefined;
|
|
29
|
-
exports.Table = undefined;
|
|
30
|
-
exports.User = undefined;
|
|
31
|
-
|
|
32
|
-
// these are all overwritten by the globals, but need to be here so that Node's static
|
|
33
|
-
// exports parser can analyze them
|
|
34
|
-
exports.tables = {};
|
|
35
|
-
exports.databases = {};
|
|
36
|
-
exports.getUser = undefined;
|
|
37
|
-
exports.server = {};
|
|
38
|
-
exports.contentTypes = null;
|
|
39
|
-
exports.threads = [];
|
|
40
|
-
exports.logger = {};
|
|
41
|
-
Object.assign(exports, globals);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceInterfaceV2.js","sourceRoot":"","sources":["../../../core/resources/ResourceInterfaceV2.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceV2 = void 0;
|
|
4
|
-
const globals_js_1 = require("../globals.js");
|
|
5
|
-
const Resource_ts_1 = require("./Resource.js");
|
|
6
|
-
/**
|
|
7
|
-
* This is the main class that can be extended for any resource in HarperDB and provides the essential reusable
|
|
8
|
-
* uniform interface for interacting with data, defining the API for providing data (data sources) and for consuming
|
|
9
|
-
* data. This interface is used pervasively in HarperDB and is implemented by database tables and can be used to define
|
|
10
|
-
* sources for caching, real-data sources for messaging protocols, and RESTful endpoints, as well as any other types of
|
|
11
|
-
* data aggregation, processing, or monitoring.
|
|
12
|
-
*
|
|
13
|
-
* This base Resource class provides a set of static methods that are main entry points for querying and updating data
|
|
14
|
-
* in resources/tables. The static methods provide the default handling of arguments, context, and ensuring that
|
|
15
|
-
* internal actions are wrapped in a transaction. The base Resource class intended to be extended, and the instance
|
|
16
|
-
* methods can be overridden to provide specific implementations of actions like get, put, post, delete, and subscribe.
|
|
17
|
-
*/
|
|
18
|
-
class ResourceV2 extends Resource_ts_1.Resource {
|
|
19
|
-
static loadAsInstance = false;
|
|
20
|
-
// @ts-expect-error In v2, we're adjusting the types.
|
|
21
|
-
post(target, newRecord) {
|
|
22
|
-
return super.post(target, newRecord);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ResourceV2 = ResourceV2;
|
|
26
|
-
(0, globals_js_1._assignPackageExport)('ResourceV2', ResourceV2);
|
|
27
|
-
//# sourceMappingURL=ResourceV2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceV2.js","sourceRoot":"","sources":["../../../core/resources/ResourceV2.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AAIrD,+CAAyC;AAGzC;;;;;;;;;;;GAWG;AACH,MAAa,UAAwC,SAAQ,sBAAgB;IAC5E,MAAM,CAAC,cAAc,GAAY,KAAK,CAAC;IAkBvC,qDAAqD;IACrD,IAAI,CACH,MAAyB,EACzB,SAAyC;QAEzC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACtC,CAAC;;AAzBF,gCA6CC;AAED,IAAA,iCAAoB,EAAC,YAAY,EAAE,UAAU,CAAC,CAAC"}
|