@enbox/dwn-sdk-js 0.3.4 → 0.3.6
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/dist/browser.mjs +8 -8
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +766 -1224
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/abstract-message.js +3 -3
- package/dist/esm/src/core/abstract-message.js.map +1 -1
- package/dist/esm/src/core/grant-authorization.js +6 -2
- package/dist/esm/src/core/grant-authorization.js.map +1 -1
- package/dist/esm/src/core/message.js +4 -4
- package/dist/esm/src/core/message.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-action.js +3 -3
- package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization.js +11 -11
- package/dist/esm/src/core/protocol-authorization.js.map +1 -1
- package/dist/esm/src/core/records-grant-authorization.js +1 -1
- package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
- package/dist/esm/src/dwn.js +9 -4
- package/dist/esm/src/dwn.js.map +1 -1
- package/dist/esm/src/event-stream/event-emitter-event-log.js +12 -12
- package/dist/esm/src/event-stream/event-emitter-event-log.js.map +1 -1
- package/dist/esm/src/handlers/messages-read.js +7 -7
- package/dist/esm/src/handlers/messages-read.js.map +1 -1
- package/dist/esm/src/handlers/messages-subscribe.js +1 -1
- package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/messages-sync.js +18 -18
- package/dist/esm/src/handlers/messages-sync.js.map +1 -1
- package/dist/esm/src/handlers/protocols-configure.js +1 -1
- package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
- package/dist/esm/src/handlers/protocols-query.js +1 -1
- package/dist/esm/src/handlers/protocols-query.js.map +1 -1
- package/dist/esm/src/handlers/records-count.js.map +1 -1
- package/dist/esm/src/handlers/records-delete.js.map +1 -1
- package/dist/esm/src/handlers/records-query.js.map +1 -1
- package/dist/esm/src/handlers/records-read.js +6 -6
- package/dist/esm/src/handlers/records-read.js.map +1 -1
- package/dist/esm/src/handlers/records-subscribe.js +1 -1
- package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/records-write.js +16 -16
- package/dist/esm/src/handlers/records-write.js.map +1 -1
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/interfaces/messages-subscribe.js +1 -1
- package/dist/esm/src/interfaces/messages-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/messages-sync.js +1 -1
- package/dist/esm/src/interfaces/messages-sync.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-configure.js +9 -9
- package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-query.js +1 -1
- package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-count.js +1 -1
- package/dist/esm/src/interfaces/records-count.js.map +1 -1
- package/dist/esm/src/interfaces/records-delete.js +1 -1
- package/dist/esm/src/interfaces/records-delete.js.map +1 -1
- package/dist/esm/src/interfaces/records-query.js +1 -1
- package/dist/esm/src/interfaces/records-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-read.js +1 -1
- package/dist/esm/src/interfaces/records-read.js.map +1 -1
- package/dist/esm/src/interfaces/records-subscribe.js +1 -1
- package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/records-write-signing.js +1 -1
- package/dist/esm/src/interfaces/records-write-signing.js.map +1 -1
- package/dist/esm/src/interfaces/records-write.js +9 -9
- package/dist/esm/src/interfaces/records-write.js.map +1 -1
- package/dist/esm/src/jose/jws/general/builder.js.map +1 -1
- package/dist/esm/src/jose/jws/general/verifier.js +30 -2
- package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
- package/dist/esm/src/protocols/permissions.js +1 -1
- package/dist/esm/src/protocols/permissions.js.map +1 -1
- package/dist/esm/src/smt/smt-store-level.js.map +1 -1
- package/dist/esm/src/smt/smt-store-memory.js.map +1 -1
- package/dist/esm/src/smt/sparse-merkle-tree.js +2 -2
- package/dist/esm/src/smt/sparse-merkle-tree.js.map +1 -1
- package/dist/esm/src/state-index/state-index-level.js.map +1 -1
- package/dist/esm/src/store/index-level-compound.js +10 -10
- package/dist/esm/src/store/index-level-compound.js.map +1 -1
- package/dist/esm/src/store/index-level.js +3 -3
- package/dist/esm/src/store/index-level.js.map +1 -1
- package/dist/esm/src/store/level-wrapper.js +1 -1
- package/dist/esm/src/store/level-wrapper.js.map +1 -1
- package/dist/esm/src/store/storage-controller.js +23 -10
- package/dist/esm/src/store/storage-controller.js.map +1 -1
- package/dist/esm/src/types/permission-types.js.map +1 -1
- package/dist/esm/src/utils/memory-cache.js.map +1 -1
- package/dist/esm/src/utils/messages.js +2 -2
- package/dist/esm/src/utils/messages.js.map +1 -1
- package/dist/esm/src/utils/private-key-signer.js.map +1 -1
- package/dist/esm/src/utils/records.js +1 -1
- package/dist/esm/src/utils/records.js.map +1 -1
- package/dist/esm/src/utils/time.js +5 -9
- package/dist/esm/src/utils/time.js.map +1 -1
- package/dist/esm/tests/core/grant-authorization.spec.js +38 -0
- package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -0
- package/dist/esm/tests/features/permissions.spec.js +1 -1
- package/dist/esm/tests/features/permissions.spec.js.map +1 -1
- package/dist/esm/tests/features/records-prune-cross-protocol.spec.js +422 -0
- package/dist/esm/tests/features/records-prune-cross-protocol.spec.js.map +1 -0
- package/dist/esm/tests/fuzz/object.fuzz.spec.js +1 -1
- package/dist/esm/tests/fuzz/object.fuzz.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-subscribe.spec.js +3 -26
- package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-sync.spec.js +3 -26
- package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
- package/dist/esm/tests/handlers/protocols-query.spec.js +4 -3
- package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js +2 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/jose/jws/general.spec.js +115 -0
- package/dist/esm/tests/jose/jws/general.spec.js.map +1 -1
- package/dist/esm/tests/test-suite.js +2 -0
- package/dist/esm/tests/test-suite.js.map +1 -1
- package/dist/esm/tests/utils/poller.js +2 -2
- package/dist/esm/tests/utils/poller.js.map +1 -1
- package/dist/esm/tests/utils/test-data-generator.js +1 -1
- package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/abstract-message.d.ts +4 -4
- package/dist/types/src/core/abstract-message.d.ts.map +1 -1
- package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/resumable-task-manager.d.ts +2 -2
- package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
- package/dist/types/src/dwn.d.ts +12 -12
- package/dist/types/src/dwn.d.ts.map +1 -1
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts +5 -5
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-read.d.ts +1 -1
- package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-subscribe.d.ts +1 -1
- package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-sync.d.ts +1 -1
- package/dist/types/src/handlers/messages-sync.d.ts.map +1 -1
- package/dist/types/src/handlers/protocols-configure.d.ts +1 -1
- package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/handlers/protocols-query.d.ts +1 -1
- package/dist/types/src/handlers/protocols-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-count.d.ts +1 -1
- package/dist/types/src/handlers/records-count.d.ts.map +1 -1
- package/dist/types/src/handlers/records-delete.d.ts +1 -1
- package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
- package/dist/types/src/handlers/records-query.d.ts +1 -1
- package/dist/types/src/handlers/records-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-read.d.ts +1 -1
- package/dist/types/src/handlers/records-read.d.ts.map +1 -1
- package/dist/types/src/handlers/records-subscribe.d.ts +1 -1
- package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/records-write.d.ts +1 -1
- package/dist/types/src/handlers/records-write.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +5 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-write.d.ts +2 -2
- package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
- package/dist/types/src/jose/jws/general/builder.d.ts +1 -1
- package/dist/types/src/jose/jws/general/builder.d.ts.map +1 -1
- package/dist/types/src/jose/jws/general/verifier.d.ts +13 -0
- package/dist/types/src/jose/jws/general/verifier.d.ts.map +1 -1
- package/dist/types/src/smt/smt-store-level.d.ts +1 -1
- package/dist/types/src/smt/smt-store-level.d.ts.map +1 -1
- package/dist/types/src/smt/smt-store-memory.d.ts +1 -1
- package/dist/types/src/smt/smt-store-memory.d.ts.map +1 -1
- package/dist/types/src/smt/sparse-merkle-tree.d.ts +1 -1
- package/dist/types/src/smt/sparse-merkle-tree.d.ts.map +1 -1
- package/dist/types/src/state-index/state-index-level.d.ts +3 -3
- package/dist/types/src/state-index/state-index-level.d.ts.map +1 -1
- package/dist/types/src/store/index-level.d.ts +2 -2
- package/dist/types/src/store/index-level.d.ts.map +1 -1
- package/dist/types/src/store/storage-controller.d.ts +19 -5
- package/dist/types/src/store/storage-controller.d.ts.map +1 -1
- package/dist/types/src/types/permission-types.d.ts +3 -4
- package/dist/types/src/types/permission-types.d.ts.map +1 -1
- package/dist/types/src/utils/memory-cache.d.ts +2 -2
- package/dist/types/src/utils/memory-cache.d.ts.map +1 -1
- package/dist/types/src/utils/private-key-signer.d.ts +2 -2
- package/dist/types/src/utils/private-key-signer.d.ts.map +1 -1
- package/dist/types/src/utils/time.d.ts +3 -6
- package/dist/types/src/utils/time.d.ts.map +1 -1
- package/dist/types/tests/core/grant-authorization.spec.d.ts +2 -0
- package/dist/types/tests/core/grant-authorization.spec.d.ts.map +1 -0
- package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts +29 -0
- package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts.map +1 -0
- package/dist/types/tests/handlers/messages-subscribe.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/protocols-query.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
- package/dist/types/tests/test-suite.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/core/abstract-message.ts +8 -8
- package/src/core/grant-authorization.ts +9 -2
- package/src/core/message.ts +4 -4
- package/src/core/protocol-authorization-action.ts +3 -3
- package/src/core/protocol-authorization-validation.ts +9 -9
- package/src/core/protocol-authorization.ts +24 -24
- package/src/core/records-grant-authorization.ts +1 -1
- package/src/core/resumable-task-manager.ts +2 -2
- package/src/dwn.ts +34 -17
- package/src/event-stream/event-emitter-event-log.ts +15 -15
- package/src/handlers/messages-read.ts +7 -7
- package/src/handlers/messages-subscribe.ts +2 -2
- package/src/handlers/messages-sync.ts +19 -19
- package/src/handlers/protocols-configure.ts +2 -2
- package/src/handlers/protocols-query.ts +2 -2
- package/src/handlers/records-count.ts +1 -1
- package/src/handlers/records-delete.ts +1 -1
- package/src/handlers/records-query.ts +1 -1
- package/src/handlers/records-read.ts +6 -6
- package/src/handlers/records-subscribe.ts +2 -2
- package/src/handlers/records-write.ts +18 -18
- package/src/index.ts +5 -5
- package/src/interfaces/messages-subscribe.ts +1 -1
- package/src/interfaces/messages-sync.ts +1 -1
- package/src/interfaces/protocols-configure.ts +12 -12
- package/src/interfaces/protocols-query.ts +1 -1
- package/src/interfaces/records-count.ts +1 -1
- package/src/interfaces/records-delete.ts +2 -2
- package/src/interfaces/records-query.ts +1 -1
- package/src/interfaces/records-read.ts +1 -1
- package/src/interfaces/records-subscribe.ts +1 -1
- package/src/interfaces/records-write-signing.ts +1 -1
- package/src/interfaces/records-write.ts +13 -13
- package/src/jose/jws/general/builder.ts +1 -1
- package/src/jose/jws/general/verifier.ts +44 -3
- package/src/protocols/permissions.ts +1 -1
- package/src/smt/smt-store-level.ts +1 -1
- package/src/smt/smt-store-memory.ts +1 -1
- package/src/smt/sparse-merkle-tree.ts +10 -10
- package/src/state-index/state-index-level.ts +3 -3
- package/src/store/index-level-compound.ts +11 -11
- package/src/store/index-level.ts +5 -5
- package/src/store/level-wrapper.ts +1 -1
- package/src/store/storage-controller.ts +31 -16
- package/src/types/permission-types.ts +3 -4
- package/src/utils/memory-cache.ts +2 -2
- package/src/utils/messages.ts +3 -3
- package/src/utils/private-key-signer.ts +2 -2
- package/src/utils/records.ts +2 -2
- package/src/utils/time.ts +5 -10
- package/dist/esm/src/utils/object.js +0 -40
- package/dist/esm/src/utils/object.js.map +0 -1
- package/dist/esm/tests/utils/object.spec.js +0 -36
- package/dist/esm/tests/utils/object.spec.js.map +0 -1
- package/dist/types/src/utils/object.d.ts +0 -13
- package/dist/types/src/utils/object.d.ts.map +0 -1
- package/dist/types/tests/utils/object.spec.d.ts +0 -2
- package/dist/types/tests/utils/object.spec.d.ts.map +0 -1
- package/src/utils/object.ts +0 -43
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { DwnInterfaceName } from '../../src/enums/dwn-interface-method.js';
|
|
3
|
+
import { Message } from '../../src/core/message.js';
|
|
4
|
+
import { TestDataGenerator } from '../utils/test-data-generator.js';
|
|
5
|
+
import { TestEventLog } from '../test-event-stream.js';
|
|
6
|
+
import { TestStores } from '../test-stores.js';
|
|
7
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'bun:test';
|
|
8
|
+
import { DataStream, Dwn, DwnConstant, Jws, ProtocolsConfigure, RecordsDelete, RecordsQuery, RecordsRead, } from '../../src/index.js';
|
|
9
|
+
import { DidKey, UniversalResolver } from '@enbox/dids';
|
|
10
|
+
/**
|
|
11
|
+
* Regression tests for cross-protocol prune cascade — closes #298.
|
|
12
|
+
*
|
|
13
|
+
* Semantics (decision under #298):
|
|
14
|
+
* A `RecordsDelete` with `prune: true` cascades to every descendant of the
|
|
15
|
+
* pruned record, regardless of which protocol a descendant declares itself
|
|
16
|
+
* under. `parentContextId` is a structural link — pruning a parent removes
|
|
17
|
+
* the entire subtree it rooted. Cross-protocol composing children (records
|
|
18
|
+
* in a different protocol that reference the parent via `$ref` / `uses`)
|
|
19
|
+
* participate in the cascade on equal footing with same-protocol children.
|
|
20
|
+
*
|
|
21
|
+
* Rationale:
|
|
22
|
+
* - A DWN is tenant-owned storage. The tenant's prune authority extends
|
|
23
|
+
* across the whole subtree they rooted, so walking the `parentId` chain
|
|
24
|
+
* unconditionally is the correct semantic.
|
|
25
|
+
* - Preserving cross-protocol orphans creates a half-alive state — readable
|
|
26
|
+
* but not updatable, since `validateReferentialIntegrity` in the
|
|
27
|
+
* `RecordsWrite` handler rejects any write whose parent is missing —
|
|
28
|
+
* which is worse for callers than cascading.
|
|
29
|
+
* - Same-protocol descendants at arbitrary depth already cascade via
|
|
30
|
+
* `parentId` with no protocol filter; treating a cross-protocol hop
|
|
31
|
+
* specially was inconsistent.
|
|
32
|
+
*
|
|
33
|
+
* These tests install multiple protocols linked via `uses` + `$ref`, write
|
|
34
|
+
* records across protocol boundaries, and assert that the entire subtree —
|
|
35
|
+
* same protocol or cross protocol, at any depth — is fully purged on prune.
|
|
36
|
+
*/
|
|
37
|
+
export function testRecordsPruneCrossProtocol() {
|
|
38
|
+
describe('records pruning — cross-protocol cascade (#298)', () => {
|
|
39
|
+
let didResolver;
|
|
40
|
+
let messageStore;
|
|
41
|
+
let dataStore;
|
|
42
|
+
let resumableTaskStore;
|
|
43
|
+
let stateIndex;
|
|
44
|
+
let eventLog;
|
|
45
|
+
let dwn;
|
|
46
|
+
// Protocol A — `threads`: root `thread` type with a nested `participant` role.
|
|
47
|
+
const threadsProtocol = {
|
|
48
|
+
protocol: 'https://threads.example.com',
|
|
49
|
+
published: true,
|
|
50
|
+
types: {
|
|
51
|
+
thread: { schema: 'https://threads.example.com/schemas/thread', dataFormats: ['application/json'] },
|
|
52
|
+
participant: { schema: 'https://threads.example.com/schemas/participant', dataFormats: ['application/json'] },
|
|
53
|
+
},
|
|
54
|
+
structure: {
|
|
55
|
+
thread: {
|
|
56
|
+
$actions: [
|
|
57
|
+
{ who: 'anyone', can: ['create', 'read', 'prune'] },
|
|
58
|
+
],
|
|
59
|
+
participant: {
|
|
60
|
+
$role: true,
|
|
61
|
+
$actions: [
|
|
62
|
+
{ who: 'anyone', can: ['read'] },
|
|
63
|
+
{ who: 'author', of: 'thread', can: ['create'] },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
// Protocol B — `comments` composes `threads:thread` via `$ref`.
|
|
70
|
+
const commentsProtocol = {
|
|
71
|
+
protocol: 'https://comments.example.com',
|
|
72
|
+
published: true,
|
|
73
|
+
uses: {
|
|
74
|
+
threads: 'https://threads.example.com',
|
|
75
|
+
},
|
|
76
|
+
types: {
|
|
77
|
+
comment: { schema: 'https://comments.example.com/schemas/comment', dataFormats: ['application/json'] },
|
|
78
|
+
},
|
|
79
|
+
structure: {
|
|
80
|
+
thread: {
|
|
81
|
+
$ref: 'threads:thread',
|
|
82
|
+
comment: {
|
|
83
|
+
$actions: [
|
|
84
|
+
{ who: 'anyone', can: ['create', 'read'] },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
// Protocol C — `reactions` composes `threads:thread` via `$ref`, nesting
|
|
91
|
+
// `comment` → `reaction`. Used to exercise multi-level cascade through
|
|
92
|
+
// a cross-protocol hop.
|
|
93
|
+
const reactionsProtocol = {
|
|
94
|
+
protocol: 'https://reactions.example.com',
|
|
95
|
+
published: true,
|
|
96
|
+
uses: {
|
|
97
|
+
threads: 'https://threads.example.com',
|
|
98
|
+
},
|
|
99
|
+
types: {
|
|
100
|
+
comment: { schema: 'https://reactions.example.com/schemas/comment', dataFormats: ['application/json'] },
|
|
101
|
+
reaction: { schema: 'https://reactions.example.com/schemas/reaction', dataFormats: ['application/json'] },
|
|
102
|
+
},
|
|
103
|
+
structure: {
|
|
104
|
+
thread: {
|
|
105
|
+
$ref: 'threads:thread',
|
|
106
|
+
comment: {
|
|
107
|
+
$actions: [
|
|
108
|
+
{ who: 'anyone', can: ['create', 'read'] },
|
|
109
|
+
],
|
|
110
|
+
reaction: {
|
|
111
|
+
$actions: [
|
|
112
|
+
{ who: 'anyone', can: ['create', 'read'] },
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
beforeAll(async () => {
|
|
120
|
+
didResolver = new UniversalResolver({ didResolvers: [DidKey] });
|
|
121
|
+
const stores = TestStores.get();
|
|
122
|
+
messageStore = stores.messageStore;
|
|
123
|
+
dataStore = stores.dataStore;
|
|
124
|
+
resumableTaskStore = stores.resumableTaskStore;
|
|
125
|
+
stateIndex = stores.stateIndex;
|
|
126
|
+
eventLog = TestEventLog.get();
|
|
127
|
+
dwn = await Dwn.create({ didResolver, messageStore, dataStore, stateIndex, eventLog, resumableTaskStore });
|
|
128
|
+
});
|
|
129
|
+
beforeEach(async () => {
|
|
130
|
+
sinon.restore();
|
|
131
|
+
await messageStore.clear();
|
|
132
|
+
await dataStore.clear();
|
|
133
|
+
await resumableTaskStore.clear();
|
|
134
|
+
await stateIndex.clear();
|
|
135
|
+
});
|
|
136
|
+
afterAll(async () => {
|
|
137
|
+
await dwn.close();
|
|
138
|
+
});
|
|
139
|
+
it('should cascade-purge a cross-protocol composing child when the parent is pruned', async () => {
|
|
140
|
+
// Shape:
|
|
141
|
+
// thread (threads) ← pruned
|
|
142
|
+
// comment (comments, cross-protocol child via $ref)
|
|
143
|
+
//
|
|
144
|
+
// Expected: both records fully purged. A cross-protocol child participates
|
|
145
|
+
// in the cascade on equal footing with a same-protocol child.
|
|
146
|
+
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
147
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: threadsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
148
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: commentsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
149
|
+
const threadWrite = await TestDataGenerator.generateRecordsWrite({
|
|
150
|
+
author: alice,
|
|
151
|
+
protocol: threadsProtocol.protocol,
|
|
152
|
+
protocolPath: 'thread',
|
|
153
|
+
schema: 'https://threads.example.com/schemas/thread',
|
|
154
|
+
dataFormat: 'application/json',
|
|
155
|
+
});
|
|
156
|
+
expect((await dwn.processMessage(alice.did, threadWrite.message, { dataStream: threadWrite.dataStream })).status.code).toBe(202);
|
|
157
|
+
const commentWrite = await TestDataGenerator.generateRecordsWrite({
|
|
158
|
+
author: alice,
|
|
159
|
+
protocol: commentsProtocol.protocol,
|
|
160
|
+
protocolPath: 'thread/comment',
|
|
161
|
+
schema: 'https://comments.example.com/schemas/comment',
|
|
162
|
+
dataFormat: 'application/json',
|
|
163
|
+
parentContextId: threadWrite.message.contextId,
|
|
164
|
+
});
|
|
165
|
+
expect((await dwn.processMessage(alice.did, commentWrite.message, { dataStream: commentWrite.dataStream })).status.code).toBe(202);
|
|
166
|
+
// Sanity: the comment is readable pre-prune.
|
|
167
|
+
expect((await dwn.processMessage(alice.did, (await RecordsRead.create({
|
|
168
|
+
signer: Jws.createSigner(alice),
|
|
169
|
+
filter: { recordId: commentWrite.message.recordId },
|
|
170
|
+
})).message)).status.code).toBe(200);
|
|
171
|
+
const threadPrune = await RecordsDelete.create({
|
|
172
|
+
recordId: threadWrite.message.recordId,
|
|
173
|
+
prune: true,
|
|
174
|
+
signer: Jws.createSigner(alice),
|
|
175
|
+
});
|
|
176
|
+
expect((await dwn.processMessage(alice.did, threadPrune.message)).status.code).toBe(202);
|
|
177
|
+
// The cross-protocol comment is purged.
|
|
178
|
+
expect((await dwn.processMessage(alice.did, (await RecordsRead.create({
|
|
179
|
+
signer: Jws.createSigner(alice),
|
|
180
|
+
filter: { recordId: commentWrite.message.recordId },
|
|
181
|
+
})).message)).status.code).toBe(404);
|
|
182
|
+
// Query confirms no records remain under the comments protocol.
|
|
183
|
+
const commentsQueryReply = await dwn.processMessage(alice.did, (await RecordsQuery.create({
|
|
184
|
+
signer: Jws.createSigner(alice),
|
|
185
|
+
filter: { protocol: commentsProtocol.protocol },
|
|
186
|
+
})).message);
|
|
187
|
+
expect(commentsQueryReply.status.code).toBe(200);
|
|
188
|
+
expect(commentsQueryReply.entries?.length).toBe(0);
|
|
189
|
+
// Message store has no residual messages for the comment's protocol.
|
|
190
|
+
const commentsStoreMessages = await messageStore.query(alice.did, [{
|
|
191
|
+
interface: DwnInterfaceName.Records,
|
|
192
|
+
protocol: commentsProtocol.protocol,
|
|
193
|
+
}]);
|
|
194
|
+
expect(commentsStoreMessages.messages.length).toBe(0);
|
|
195
|
+
});
|
|
196
|
+
it('should cascade recursively through mixed same-protocol + cross-protocol subtrees', async () => {
|
|
197
|
+
// Shape (3 levels, 2 protocols, mixed siblings):
|
|
198
|
+
// thread (threads) ← pruned
|
|
199
|
+
// participant (threads, same-protocol sibling)
|
|
200
|
+
// comment (reactions, cross-protocol sibling via $ref)
|
|
201
|
+
// reaction (reactions, cross-protocol grandchild)
|
|
202
|
+
//
|
|
203
|
+
// Expected: every descendant purged regardless of protocol or depth.
|
|
204
|
+
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
205
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: threadsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
206
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: reactionsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
207
|
+
const threadWrite = await TestDataGenerator.generateRecordsWrite({
|
|
208
|
+
author: alice,
|
|
209
|
+
protocol: threadsProtocol.protocol,
|
|
210
|
+
protocolPath: 'thread',
|
|
211
|
+
schema: 'https://threads.example.com/schemas/thread',
|
|
212
|
+
dataFormat: 'application/json',
|
|
213
|
+
});
|
|
214
|
+
await dwn.processMessage(alice.did, threadWrite.message, { dataStream: threadWrite.dataStream });
|
|
215
|
+
const participantWrite = await TestDataGenerator.generateRecordsWrite({
|
|
216
|
+
author: alice,
|
|
217
|
+
recipient: alice.did,
|
|
218
|
+
protocol: threadsProtocol.protocol,
|
|
219
|
+
protocolPath: 'thread/participant',
|
|
220
|
+
schema: 'https://threads.example.com/schemas/participant',
|
|
221
|
+
dataFormat: 'application/json',
|
|
222
|
+
parentContextId: threadWrite.message.contextId,
|
|
223
|
+
});
|
|
224
|
+
await dwn.processMessage(alice.did, participantWrite.message, { dataStream: participantWrite.dataStream });
|
|
225
|
+
const commentWrite = await TestDataGenerator.generateRecordsWrite({
|
|
226
|
+
author: alice,
|
|
227
|
+
protocol: reactionsProtocol.protocol,
|
|
228
|
+
protocolPath: 'thread/comment',
|
|
229
|
+
schema: 'https://reactions.example.com/schemas/comment',
|
|
230
|
+
dataFormat: 'application/json',
|
|
231
|
+
parentContextId: threadWrite.message.contextId,
|
|
232
|
+
});
|
|
233
|
+
await dwn.processMessage(alice.did, commentWrite.message, { dataStream: commentWrite.dataStream });
|
|
234
|
+
const reactionWrite = await TestDataGenerator.generateRecordsWrite({
|
|
235
|
+
author: alice,
|
|
236
|
+
protocol: reactionsProtocol.protocol,
|
|
237
|
+
protocolPath: 'thread/comment/reaction',
|
|
238
|
+
schema: 'https://reactions.example.com/schemas/reaction',
|
|
239
|
+
dataFormat: 'application/json',
|
|
240
|
+
parentContextId: commentWrite.message.contextId,
|
|
241
|
+
});
|
|
242
|
+
await dwn.processMessage(alice.did, reactionWrite.message, { dataStream: reactionWrite.dataStream });
|
|
243
|
+
const threadPrune = await RecordsDelete.create({
|
|
244
|
+
recordId: threadWrite.message.recordId,
|
|
245
|
+
prune: true,
|
|
246
|
+
signer: Jws.createSigner(alice),
|
|
247
|
+
});
|
|
248
|
+
expect((await dwn.processMessage(alice.did, threadPrune.message)).status.code).toBe(202);
|
|
249
|
+
// Every descendant is purged — same-protocol participant, cross-protocol
|
|
250
|
+
// comment, and the grandchild reaction that lives two levels below a
|
|
251
|
+
// cross-protocol hop.
|
|
252
|
+
for (const record of [participantWrite, commentWrite, reactionWrite]) {
|
|
253
|
+
const reply = await dwn.processMessage(alice.did, (await RecordsRead.create({
|
|
254
|
+
signer: Jws.createSigner(alice),
|
|
255
|
+
filter: { recordId: record.message.recordId },
|
|
256
|
+
})).message);
|
|
257
|
+
expect(reply.status.code).toBe(404);
|
|
258
|
+
}
|
|
259
|
+
const reactionsQueryReply = await dwn.processMessage(alice.did, (await RecordsQuery.create({
|
|
260
|
+
signer: Jws.createSigner(alice),
|
|
261
|
+
filter: { protocol: reactionsProtocol.protocol },
|
|
262
|
+
})).message);
|
|
263
|
+
expect(reactionsQueryReply.status.code).toBe(200);
|
|
264
|
+
expect(reactionsQueryReply.entries?.length).toBe(0);
|
|
265
|
+
});
|
|
266
|
+
it('should cascade across multiple sibling protocols rooted at the same parent', async () => {
|
|
267
|
+
// Shape:
|
|
268
|
+
// thread (threads) ← pruned
|
|
269
|
+
// commentsChild (comments, cross-protocol sibling A)
|
|
270
|
+
// reactionsChild (reactions, cross-protocol sibling B)
|
|
271
|
+
// reaction (reactions, grandchild)
|
|
272
|
+
//
|
|
273
|
+
// Two distinct cross-protocol children of the same parent, each in its own
|
|
274
|
+
// protocol, plus a grandchild under one of them. All must be purged.
|
|
275
|
+
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
276
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: threadsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
277
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: commentsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
278
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: reactionsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
279
|
+
const threadWrite = await TestDataGenerator.generateRecordsWrite({
|
|
280
|
+
author: alice,
|
|
281
|
+
protocol: threadsProtocol.protocol,
|
|
282
|
+
protocolPath: 'thread',
|
|
283
|
+
schema: 'https://threads.example.com/schemas/thread',
|
|
284
|
+
dataFormat: 'application/json',
|
|
285
|
+
});
|
|
286
|
+
await dwn.processMessage(alice.did, threadWrite.message, { dataStream: threadWrite.dataStream });
|
|
287
|
+
const commentsChild = await TestDataGenerator.generateRecordsWrite({
|
|
288
|
+
author: alice,
|
|
289
|
+
protocol: commentsProtocol.protocol,
|
|
290
|
+
protocolPath: 'thread/comment',
|
|
291
|
+
schema: 'https://comments.example.com/schemas/comment',
|
|
292
|
+
dataFormat: 'application/json',
|
|
293
|
+
parentContextId: threadWrite.message.contextId,
|
|
294
|
+
});
|
|
295
|
+
await dwn.processMessage(alice.did, commentsChild.message, { dataStream: commentsChild.dataStream });
|
|
296
|
+
const reactionsChild = await TestDataGenerator.generateRecordsWrite({
|
|
297
|
+
author: alice,
|
|
298
|
+
protocol: reactionsProtocol.protocol,
|
|
299
|
+
protocolPath: 'thread/comment',
|
|
300
|
+
schema: 'https://reactions.example.com/schemas/comment',
|
|
301
|
+
dataFormat: 'application/json',
|
|
302
|
+
parentContextId: threadWrite.message.contextId,
|
|
303
|
+
});
|
|
304
|
+
await dwn.processMessage(alice.did, reactionsChild.message, { dataStream: reactionsChild.dataStream });
|
|
305
|
+
const reaction = await TestDataGenerator.generateRecordsWrite({
|
|
306
|
+
author: alice,
|
|
307
|
+
protocol: reactionsProtocol.protocol,
|
|
308
|
+
protocolPath: 'thread/comment/reaction',
|
|
309
|
+
schema: 'https://reactions.example.com/schemas/reaction',
|
|
310
|
+
dataFormat: 'application/json',
|
|
311
|
+
parentContextId: reactionsChild.message.contextId,
|
|
312
|
+
});
|
|
313
|
+
await dwn.processMessage(alice.did, reaction.message, { dataStream: reaction.dataStream });
|
|
314
|
+
await dwn.processMessage(alice.did, (await RecordsDelete.create({
|
|
315
|
+
recordId: threadWrite.message.recordId,
|
|
316
|
+
prune: true,
|
|
317
|
+
signer: Jws.createSigner(alice),
|
|
318
|
+
})).message);
|
|
319
|
+
for (const record of [commentsChild, reactionsChild, reaction]) {
|
|
320
|
+
const reply = await dwn.processMessage(alice.did, (await RecordsRead.create({
|
|
321
|
+
signer: Jws.createSigner(alice),
|
|
322
|
+
filter: { recordId: record.message.recordId },
|
|
323
|
+
})).message);
|
|
324
|
+
expect(reply.status.code).toBe(404);
|
|
325
|
+
}
|
|
326
|
+
// Both sibling protocols are fully empty of records.
|
|
327
|
+
for (const protocol of [commentsProtocol.protocol, reactionsProtocol.protocol]) {
|
|
328
|
+
const queryReply = await dwn.processMessage(alice.did, (await RecordsQuery.create({
|
|
329
|
+
signer: Jws.createSigner(alice),
|
|
330
|
+
filter: { protocol },
|
|
331
|
+
})).message);
|
|
332
|
+
expect(queryReply.status.code).toBe(200);
|
|
333
|
+
expect(queryReply.entries?.length).toBe(0);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
it('should fully clean up message store, state index, and data store for cross-protocol descendants', async () => {
|
|
337
|
+
// Hardening guard: after a cross-protocol prune cascade no trace of any
|
|
338
|
+
// descendant remains in any of the three underlying storage layers.
|
|
339
|
+
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
340
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: threadsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
341
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: commentsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
342
|
+
const threadWrite = await TestDataGenerator.generateRecordsWrite({
|
|
343
|
+
author: alice,
|
|
344
|
+
protocol: threadsProtocol.protocol,
|
|
345
|
+
protocolPath: 'thread',
|
|
346
|
+
schema: 'https://threads.example.com/schemas/thread',
|
|
347
|
+
dataFormat: 'application/json',
|
|
348
|
+
});
|
|
349
|
+
await dwn.processMessage(alice.did, threadWrite.message, { dataStream: threadWrite.dataStream });
|
|
350
|
+
// Cross-protocol child whose payload is large enough to land in the data
|
|
351
|
+
// store (above the encode-with-message threshold). Forces the dataStore
|
|
352
|
+
// cleanup path to be exercised.
|
|
353
|
+
const largeCommentData = TestDataGenerator.randomBytes(DwnConstant.maxDataSizeAllowedToBeEncoded + 1);
|
|
354
|
+
const commentWrite = await TestDataGenerator.generateRecordsWrite({
|
|
355
|
+
author: alice,
|
|
356
|
+
protocol: commentsProtocol.protocol,
|
|
357
|
+
protocolPath: 'thread/comment',
|
|
358
|
+
schema: 'https://comments.example.com/schemas/comment',
|
|
359
|
+
dataFormat: 'application/json',
|
|
360
|
+
parentContextId: threadWrite.message.contextId,
|
|
361
|
+
data: largeCommentData,
|
|
362
|
+
});
|
|
363
|
+
await dwn.processMessage(alice.did, commentWrite.message, { dataStream: DataStream.fromBytes(largeCommentData) });
|
|
364
|
+
// Sanity: the comment's data landed in the data store.
|
|
365
|
+
expect(await dataStore.get(alice.did, commentWrite.message.recordId, commentWrite.message.descriptor.dataCid)).toBeDefined();
|
|
366
|
+
await dwn.processMessage(alice.did, (await RecordsDelete.create({
|
|
367
|
+
recordId: threadWrite.message.recordId,
|
|
368
|
+
prune: true,
|
|
369
|
+
signer: Jws.createSigner(alice),
|
|
370
|
+
})).message);
|
|
371
|
+
// Message store: no residual records for the comment's protocol.
|
|
372
|
+
const commentsStoreMessages = await messageStore.query(alice.did, [{
|
|
373
|
+
interface: DwnInterfaceName.Records,
|
|
374
|
+
protocol: commentsProtocol.protocol,
|
|
375
|
+
}]);
|
|
376
|
+
expect(commentsStoreMessages.messages.length).toBe(0);
|
|
377
|
+
// Data store: comment's data is gone.
|
|
378
|
+
expect(await dataStore.get(alice.did, commentWrite.message.recordId, commentWrite.message.descriptor.dataCid)).toBeUndefined();
|
|
379
|
+
// State index: no messageCid for the comment's RecordsWrite remains.
|
|
380
|
+
const commentRecordsWriteCid = await Message.getCid(commentWrite.message);
|
|
381
|
+
const allStateIndexCids = await stateIndex.getLeaves(alice.did, []);
|
|
382
|
+
expect(allStateIndexCids).not.toContain(commentRecordsWriteCid);
|
|
383
|
+
});
|
|
384
|
+
it('should leave cross-protocol composing children untouched on soft delete (prune omitted)', async () => {
|
|
385
|
+
// Negative control: soft-delete does not cascade. A RecordsDelete without
|
|
386
|
+
// `prune: true` only tombstones the parent and leaves descendants intact,
|
|
387
|
+
// cross-protocol or otherwise. This test guards against a regression
|
|
388
|
+
// where cascade-always inadvertently broadens soft-delete semantics.
|
|
389
|
+
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
390
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: threadsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
391
|
+
await dwn.processMessage(alice.did, (await ProtocolsConfigure.create({ definition: commentsProtocol, signer: Jws.createSigner(alice) })).message);
|
|
392
|
+
const threadWrite = await TestDataGenerator.generateRecordsWrite({
|
|
393
|
+
author: alice,
|
|
394
|
+
protocol: threadsProtocol.protocol,
|
|
395
|
+
protocolPath: 'thread',
|
|
396
|
+
schema: 'https://threads.example.com/schemas/thread',
|
|
397
|
+
dataFormat: 'application/json',
|
|
398
|
+
});
|
|
399
|
+
await dwn.processMessage(alice.did, threadWrite.message, { dataStream: threadWrite.dataStream });
|
|
400
|
+
const commentWrite = await TestDataGenerator.generateRecordsWrite({
|
|
401
|
+
author: alice,
|
|
402
|
+
protocol: commentsProtocol.protocol,
|
|
403
|
+
protocolPath: 'thread/comment',
|
|
404
|
+
schema: 'https://comments.example.com/schemas/comment',
|
|
405
|
+
dataFormat: 'application/json',
|
|
406
|
+
parentContextId: threadWrite.message.contextId,
|
|
407
|
+
});
|
|
408
|
+
await dwn.processMessage(alice.did, commentWrite.message, { dataStream: commentWrite.dataStream });
|
|
409
|
+
// Soft delete the thread (prune omitted).
|
|
410
|
+
expect((await dwn.processMessage(alice.did, (await RecordsDelete.create({
|
|
411
|
+
recordId: threadWrite.message.recordId,
|
|
412
|
+
signer: Jws.createSigner(alice),
|
|
413
|
+
})).message)).status.code).toBe(202);
|
|
414
|
+
// The cross-protocol comment is still readable.
|
|
415
|
+
expect((await dwn.processMessage(alice.did, (await RecordsRead.create({
|
|
416
|
+
signer: Jws.createSigner(alice),
|
|
417
|
+
filter: { recordId: commentWrite.message.recordId },
|
|
418
|
+
})).message)).status.code).toBe(200);
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=records-prune-cross-protocol.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"records-prune-cross-protocol.spec.js","sourceRoot":"","sources":["../../../../tests/features/records-prune-cross-protocol.spec.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EACL,UAAU,EACV,GAAG,EACH,WAAW,EACX,GAAG,EACH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C,OAAO,CAAC,SAAS;aAChD,CAAC,CAAC;YACH,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;YAEnG,0CAA0C;YAC1C,MAAM,CACJ,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,aAAa,CAAC,MAAM,CAAC;gBAC/D,QAAQ,EAAG,WAAW,CAAC,OAAO,CAAC,QAAQ;gBACvC,MAAM,EAAK,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAC1B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAEZ,gDAAgD;YAChD,MAAM,CACJ,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC;gBAC7D,MAAM,EAAG,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC;gBAChC,MAAM,EAAG,EAAE,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE;aACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAC1B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test';
|
|
2
2
|
import fc from 'fast-check';
|
|
3
|
-
import { isEmptyObject, removeEmptyObjects, removeUndefinedProperties } from '
|
|
3
|
+
import { isEmptyObject, removeEmptyObjects, removeUndefinedProperties } from '@enbox/common';
|
|
4
4
|
const numRuns = Number(process.env.FAST_CHECK_NUM_RUNS) || 100;
|
|
5
5
|
/**
|
|
6
6
|
* Generates nested objects with a mix of primitives, undefined values, and empty objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.fuzz.spec.js","sourceRoot":"","sources":["../../../../tests/fuzz/object.fuzz.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"object.fuzz.spec.js","sourceRoot":"","sources":["../../../../tests/fuzz/object.fuzz.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE7F,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,GAAG,CAAC;AAE/D;;;;;;GAMG;AACH,SAAS,YAAY;IACnB,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CACnB,EAAE,CAAC,MAAM,EAAE,EACX,EAAE,CAAC,OAAO,EAAE,EACZ,EAAE,CAAC,OAAO,EAAE,EACZ,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EACtB,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAChB,CAAC;IACF,OAAO,EAAE,CAAC,UAAU,CAClB,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,EAC1C,EAAE,CAAC,KAAK,CACN,IAAI,EACJ,EAAE,CAAC,UAAU,CACX,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS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,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;gBAEpC,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc;gBAE1C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACjC,CAAC,CACF,EACD,EAAE,OAAO,EAAE,CACZ,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAChF,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;YAClF,EAAE,CAAC,MAAM,CACP,EAAE,CAAC,QAAQ,CACT,YAAY,EAAE,EACd,CAAC,GAAG,EAAE,EAAE;gBACN,yBAAyB,CAAC,GAAG,CAAC,CAAC;gBAC/B,kBAAkB,CAAC,GAAG,CAAC,CAAC;gBAExB,oDAAoD;gBACpD,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACvC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;oBACnC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC,CACF,EACD,EAAE,OAAO,EAAE,CACZ,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -251,7 +251,7 @@ export function testMessagesSubscribeHandler() {
|
|
|
251
251
|
grantedTo: bob,
|
|
252
252
|
scope: {
|
|
253
253
|
interface: DwnInterfaceName.Messages,
|
|
254
|
-
method: DwnMethodName.
|
|
254
|
+
method: DwnMethodName.Read
|
|
255
255
|
}
|
|
256
256
|
});
|
|
257
257
|
const grantReply = await dwn.processMessage(alice.did, grantMessage, { dataStream });
|
|
@@ -393,29 +393,6 @@ export function testMessagesSubscribeHandler() {
|
|
|
393
393
|
expect(bobReply.status.code).toBe(401);
|
|
394
394
|
expect(bobReply.status.detail).toContain(DwnErrorCode.GrantAuthorizationInterfaceMismatch);
|
|
395
395
|
});
|
|
396
|
-
it('rejects subscribe of messages with mismatching method grant scopes', async () => {
|
|
397
|
-
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
398
|
-
const bob = await TestDataGenerator.generateDidKeyPersona();
|
|
399
|
-
// create grant that is scoped to `MessagesSync` for bob
|
|
400
|
-
const { message: grantMessage, dataStream } = await TestDataGenerator.generateGrantCreate({
|
|
401
|
-
author: alice,
|
|
402
|
-
grantedTo: bob,
|
|
403
|
-
scope: {
|
|
404
|
-
interface: DwnInterfaceName.Messages,
|
|
405
|
-
method: DwnMethodName.Sync,
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
const grantReply = await dwn.processMessage(alice.did, grantMessage, { dataStream });
|
|
409
|
-
expect(grantReply.status.code).toBe(202);
|
|
410
|
-
// bob attempts to use the `MessagesSync` grant on an `MessagesSubscribe` message
|
|
411
|
-
const { message: bobSubscribe } = await TestDataGenerator.generateMessagesSubscribe({
|
|
412
|
-
author: bob,
|
|
413
|
-
permissionGrantId: grantMessage.recordId
|
|
414
|
-
});
|
|
415
|
-
const bobReply = await dwn.processMessage(alice.did, bobSubscribe);
|
|
416
|
-
expect(bobReply.status.code).toBe(401);
|
|
417
|
-
expect(bobReply.status.detail).toContain(DwnErrorCode.GrantAuthorizationMethodMismatch);
|
|
418
|
-
});
|
|
419
396
|
describe('protocol filtered messages', () => {
|
|
420
397
|
it('allows subscribe of protocol filtered messages with matching protocol grant scopes', async () => {
|
|
421
398
|
const alice = await TestDataGenerator.generateDidKeyPersona();
|
|
@@ -442,7 +419,7 @@ export function testMessagesSubscribeHandler() {
|
|
|
442
419
|
grantedTo: bob,
|
|
443
420
|
scope: {
|
|
444
421
|
interface: DwnInterfaceName.Messages,
|
|
445
|
-
method: DwnMethodName.
|
|
422
|
+
method: DwnMethodName.Read,
|
|
446
423
|
protocol: protocol1.protocol
|
|
447
424
|
}
|
|
448
425
|
});
|
|
@@ -824,7 +801,7 @@ export function testMessagesSubscribeHandler() {
|
|
|
824
801
|
grantedTo: bob,
|
|
825
802
|
scope: {
|
|
826
803
|
interface: DwnInterfaceName.Messages,
|
|
827
|
-
method: DwnMethodName.
|
|
804
|
+
method: DwnMethodName.Read,
|
|
828
805
|
protocol: protocol1.protocol
|
|
829
806
|
}
|
|
830
807
|
});
|