@substrat-run/contract-tests 0.90.1 → 0.91.1
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/entity-check-plan.d.ts +29 -1
- package/dist/entity-check-plan.d.ts.map +1 -1
- package/dist/entity-check-plan.js +20 -3
- package/dist/entity-check-plan.js.map +1 -1
- package/dist/entity-check-suite.d.ts +6 -0
- package/dist/entity-check-suite.d.ts.map +1 -1
- package/dist/entity-check-suite.js +39 -8
- package/dist/entity-check-suite.js.map +1 -1
- package/package.json +3 -3
|
@@ -71,6 +71,29 @@ export interface EntityCheckSuiteOptions {
|
|
|
71
71
|
readonly permissions: readonly string[];
|
|
72
72
|
readonly because: string;
|
|
73
73
|
}>>;
|
|
74
|
+
/**
|
|
75
|
+
* Input fields that must carry a SECOND entity the kit makes, per operation
|
|
76
|
+
* (#939): `{ 'ticket0/merge': { intoConversationId: 'conversation' } }`.
|
|
77
|
+
*
|
|
78
|
+
* `merge` folds `conversationId` into `intoConversationId` and checks the
|
|
79
|
+
* declared key on both ends. A sample value in `inputs` cannot stand in for the
|
|
80
|
+
* second one: a made-up id is refused before the check under test answers, and
|
|
81
|
+
* an id minted once at collect time is granted to nobody — so case 1 is denied
|
|
82
|
+
* on the survivor and reads as a broken handler. What the field needs is an
|
|
83
|
+
* entity that EXISTS, fresh per case, that the probe holds the key on.
|
|
84
|
+
*
|
|
85
|
+
* So the kit creates it the way it creates the target — `createEntity(type)`,
|
|
86
|
+
* per case — and grants the same keys on it, in BOTH cases. Case 2 still
|
|
87
|
+
* separates: the probe holds the key on the co-entity and on A, and is refused
|
|
88
|
+
* for B. The bare id is written into the field; a field taking a whole ref is
|
|
89
|
+
* not this shape.
|
|
90
|
+
*
|
|
91
|
+
* What this does NOT assert, stated so the receipt cannot overclaim: that the
|
|
92
|
+
* handler checks the co-entity at all. The pair measures the declared check on
|
|
93
|
+
* the TARGET; a second check on the co-entity is the operation's own claim,
|
|
94
|
+
* asserted where its scenario is written.
|
|
95
|
+
*/
|
|
96
|
+
readonly coEntities?: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
74
97
|
/**
|
|
75
98
|
* The in-scope operations this kit cannot generate, each with its reason.
|
|
76
99
|
*
|
|
@@ -112,6 +135,11 @@ export interface PlannedCheck {
|
|
|
112
135
|
};
|
|
113
136
|
/** Input fields the schema fixes to one value, supplied by the kit (#890). */
|
|
114
137
|
readonly fixed: Record<string, unknown>;
|
|
138
|
+
/**
|
|
139
|
+
* Input fields the kit fills with a second entity it makes and grants on, by
|
|
140
|
+
* declared type (#939). Empty for every operation that names none.
|
|
141
|
+
*/
|
|
142
|
+
readonly coEntities: Readonly<Record<string, string>>;
|
|
115
143
|
}
|
|
116
144
|
/**
|
|
117
145
|
* Partition an operation set into what this kit can drive and what it cannot.
|
|
@@ -131,7 +159,7 @@ export interface PlannedCheck {
|
|
|
131
159
|
* work order and over a protocol, and a handler that honoured the check for one
|
|
132
160
|
* and not the other has nowhere left to hide.
|
|
133
161
|
*/
|
|
134
|
-
export declare function planEntityCheckCoverage(operations: Readonly<Record<string, object>>, inputs?: Readonly<Record<string, Readonly<Record<string, unknown>>>>, refEntityType?: string): {
|
|
162
|
+
export declare function planEntityCheckCoverage(operations: Readonly<Record<string, object>>, inputs?: Readonly<Record<string, Readonly<Record<string, unknown>>>>, refEntityType?: string, coEntities?: Readonly<Record<string, Readonly<Record<string, string>>>>): {
|
|
135
163
|
covered: PlannedCheck[];
|
|
136
164
|
uncovered: Record<string, string>;
|
|
137
165
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-check-plan.d.ts","sourceRoot":"","sources":["../src/entity-check-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,YAAY,CAAC,UAAU,EAA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,UAAU,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAM,GAC1E;IAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAgHhE"}
|
|
@@ -94,7 +94,7 @@ function requiredExtras(op, idField, supplied = []) {
|
|
|
94
94
|
* work order and over a protocol, and a handler that honoured the check for one
|
|
95
95
|
* and not the other has nowhere left to hide.
|
|
96
96
|
*/
|
|
97
|
-
export function planEntityCheckCoverage(operations, inputs = {}, refEntityType) {
|
|
97
|
+
export function planEntityCheckCoverage(operations, inputs = {}, refEntityType, coEntities = {}) {
|
|
98
98
|
const covered = [];
|
|
99
99
|
const uncovered = {};
|
|
100
100
|
for (const [name, raw] of Object.entries(operations).sort(([a], [b]) => a.localeCompare(b))) {
|
|
@@ -102,6 +102,21 @@ export function planEntityCheckCoverage(operations, inputs = {}, refEntityType)
|
|
|
102
102
|
const check = entityCheckOf(op);
|
|
103
103
|
if (!check)
|
|
104
104
|
continue;
|
|
105
|
+
// A co-entity (#939) is supplied by the kit, so its field is never a missing
|
|
106
|
+
// sample — but only where the field exists, and is not the target's own. A
|
|
107
|
+
// declaration naming a field the schema does not have is a stale note, and a
|
|
108
|
+
// stale note that quietly counted as coverage would be the overclaim this
|
|
109
|
+
// whole partition exists to avoid.
|
|
110
|
+
const co = coEntities[name] ?? {};
|
|
111
|
+
const targetField = check.refFrom ? check.refFrom.split('.')[0] : check.idFrom;
|
|
112
|
+
const misnamed = Object.keys(co).filter((field) => field === targetField || !(field in (op.input?.shape ?? {})));
|
|
113
|
+
if (misnamed.length > 0) {
|
|
114
|
+
uncovered[name] =
|
|
115
|
+
`names a co-entity for '${misnamed.join("', '")}', which is not an input field ` +
|
|
116
|
+
'beside the target';
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const coFields = Object.keys(co);
|
|
105
120
|
// The ref case first: it names neither a type nor an id field, because the
|
|
106
121
|
// field it names carries both (#896).
|
|
107
122
|
if (check.refFrom) {
|
|
@@ -117,7 +132,7 @@ export function planEntityCheckCoverage(operations, inputs = {}, refEntityType)
|
|
|
117
132
|
uncovered[name] = `declares 'refFrom: ${check.refFrom}', which names no input field`;
|
|
118
133
|
continue;
|
|
119
134
|
}
|
|
120
|
-
const missing = requiredExtras(op, '', [path[0]]).filter((f) => inputs[name]?.[f] === undefined);
|
|
135
|
+
const missing = requiredExtras(op, '', [path[0], ...coFields]).filter((f) => inputs[name]?.[f] === undefined);
|
|
121
136
|
if (missing.length > 0) {
|
|
122
137
|
uncovered[name] = `no sample input for required field(s): ${missing.join(', ')}`;
|
|
123
138
|
continue;
|
|
@@ -128,6 +143,7 @@ export function planEntityCheckCoverage(operations, inputs = {}, refEntityType)
|
|
|
128
143
|
entity: refEntityType,
|
|
129
144
|
target: { kind: 'ref', path },
|
|
130
145
|
fixed: fixedFields(op, path[0]),
|
|
146
|
+
coEntities: co,
|
|
131
147
|
});
|
|
132
148
|
continue;
|
|
133
149
|
}
|
|
@@ -158,7 +174,7 @@ export function planEntityCheckCoverage(operations, inputs = {}, refEntityType)
|
|
|
158
174
|
types = values;
|
|
159
175
|
}
|
|
160
176
|
const typeField = check.entityFrom ? [check.entityFrom] : [];
|
|
161
|
-
const missing = requiredExtras(op, check.idFrom, typeField).filter((f) => inputs[name]?.[f] === undefined);
|
|
177
|
+
const missing = requiredExtras(op, check.idFrom, [...typeField, ...coFields]).filter((f) => inputs[name]?.[f] === undefined);
|
|
162
178
|
if (missing.length > 0) {
|
|
163
179
|
uncovered[name] = `no sample input for required field(s): ${missing.join(', ')}`;
|
|
164
180
|
continue;
|
|
@@ -173,6 +189,7 @@ export function planEntityCheckCoverage(operations, inputs = {}, refEntityType)
|
|
|
173
189
|
...fixedFields(op, check.idFrom),
|
|
174
190
|
...(check.entityFrom ? { [check.entityFrom]: type } : {}),
|
|
175
191
|
},
|
|
192
|
+
coEntities: co,
|
|
176
193
|
});
|
|
177
194
|
}
|
|
178
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-check-plan.js","sourceRoot":"","sources":["../src/entity-check-plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity-check-plan.js","sourceRoot":"","sources":["../src/entity-check-plan.ts"],"names":[],"mappings":"AAyIA,gFAAgF;AAChF,SAAS,aAAa,CAAC,EAAc;IACnC,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;IACjC,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpE,OAAO,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AACnG,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,MAAe;IACvC,MAAM,MAAM,GAAI,MAA+B,CAAC,MAAM,CAAC;IACvD,IAAI,MAAM,YAAY,GAAG;QAAE,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAI,MAAgC,CAAC,OAAO,CAAC;IAC1D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAS,WAAW,CAAC,EAAc,EAAE,OAAe;IAClD,MAAM,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,KAAK,GAA4B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE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AO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,SAAS,CAAC,IAAI,CAAC,GAAG,0CAA0C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACjF,SAAS;QACX,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI;gBACJ,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;gBACpB,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBAC5C,KAAK,EAAE;oBACL,GAAG,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC;oBAChC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC1D;gBACD,UAAU,EAAE,EAAE;aACf,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -7,9 +7,15 @@ import type { EntityCheckFixture, EntityCheckSuiteOptions } from './entity-check
|
|
|
7
7
|
* ```ts
|
|
8
8
|
* entityCheckConformanceSuite('todo', todoOperations, makeFixture, {
|
|
9
9
|
* inputs: { 'todo/rename-list': { name: 'renamed' } },
|
|
10
|
+
* coEntities: { 'todo/merge-lists': { intoListId: 'list' } },
|
|
10
11
|
* uncovered: { 'todo/set-item-done': 'resolved — the id is not in the input' },
|
|
11
12
|
* });
|
|
12
13
|
* ```
|
|
14
|
+
*
|
|
15
|
+
* An operation naming a SECOND entity of the kind it narrows to — `merge`, a
|
|
16
|
+
* future `move` — declares it under `coEntities` (#939): the kit makes one per
|
|
17
|
+
* case and grants the same keys on it, so the field carries something that
|
|
18
|
+
* exists and the pair still measures the check on the target.
|
|
13
19
|
*/
|
|
14
20
|
export declare function entityCheckConformanceSuite(subjectName: string, operations: Readonly<Record<string, object>>, makeFixture: () => Promise<EntityCheckFixture>, options?: EntityCheckSuiteOptions): void;
|
|
15
21
|
//# sourceMappingURL=entity-check-suite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-check-suite.d.ts","sourceRoot":"","sources":["../src/entity-check-suite.ts"],"names":[],"mappings":"AA+DA,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAG1F
|
|
1
|
+
{"version":3,"file":"entity-check-suite.d.ts","sourceRoot":"","sources":["../src/entity-check-suite.ts"],"names":[],"mappings":"AA+DA,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAG1F;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC5C,WAAW,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,EAC9C,OAAO,GAAE,uBAA4B,GACpC,IAAI,CA8KN"}
|
|
@@ -68,15 +68,21 @@ import { planEntityCheckCoverage } from './entity-check-plan.js';
|
|
|
68
68
|
* ```ts
|
|
69
69
|
* entityCheckConformanceSuite('todo', todoOperations, makeFixture, {
|
|
70
70
|
* inputs: { 'todo/rename-list': { name: 'renamed' } },
|
|
71
|
+
* coEntities: { 'todo/merge-lists': { intoListId: 'list' } },
|
|
71
72
|
* uncovered: { 'todo/set-item-done': 'resolved — the id is not in the input' },
|
|
72
73
|
* });
|
|
73
74
|
* ```
|
|
75
|
+
*
|
|
76
|
+
* An operation naming a SECOND entity of the kind it narrows to — `merge`, a
|
|
77
|
+
* future `move` — declares it under `coEntities` (#939): the kit makes one per
|
|
78
|
+
* case and grants the same keys on it, so the field carries something that
|
|
79
|
+
* exists and the pair still measures the check on the target.
|
|
74
80
|
*/
|
|
75
81
|
export function entityCheckConformanceSuite(subjectName, operations, makeFixture, options = {}) {
|
|
76
82
|
const declaredUncovered = options.uncovered ?? {};
|
|
77
83
|
const supplied = options.inputs ?? {};
|
|
78
84
|
// Partitioned at collection time so the generated tests can be named.
|
|
79
|
-
const { covered, uncovered } = planEntityCheckCoverage(operations, supplied, options.refEntityType);
|
|
85
|
+
const { covered, uncovered } = planEntityCheckCoverage(operations, supplied, options.refEntityType, options.coEntities);
|
|
80
86
|
describe(`declared entity checks are honoured: ${subjectName}`, () => {
|
|
81
87
|
it('covers every entity check it can, and names every one it cannot', () => {
|
|
82
88
|
// The whole partition asserted at once. A new operation with an entity
|
|
@@ -91,15 +97,24 @@ export function entityCheckConformanceSuite(subjectName, operations, makeFixture
|
|
|
91
97
|
const driven = new Set(covered.map((c) => c.name));
|
|
92
98
|
expect(Object.keys(options.alsoGrant ?? {}).filter((n) => !driven.has(n))).toEqual([]);
|
|
93
99
|
});
|
|
100
|
+
it('makes a second entity only for an operation it drives', () => {
|
|
101
|
+
// Same reasoning as `alsoGrant`: a `coEntities` entry naming an operation
|
|
102
|
+
// that is uncovered or absent is a note about coverage that is not there.
|
|
103
|
+
const driven = new Set(covered.map((c) => c.name));
|
|
104
|
+
expect(Object.keys(options.coEntities ?? {}).filter((n) => !driven.has(n))).toEqual([]);
|
|
105
|
+
});
|
|
94
106
|
it('generated a pair for at least one operation', () => {
|
|
95
107
|
// A suite that generated nothing passes every assertion above it. This is
|
|
96
108
|
// the zero guard: silence must not read as success.
|
|
97
109
|
expect(covered.length).toBeGreaterThan(0);
|
|
98
110
|
});
|
|
99
|
-
for (const { name, key, entity, target, fixed } of covered) {
|
|
100
|
-
const
|
|
111
|
+
for (const { name, key, entity, target, fixed, coEntities } of covered) {
|
|
112
|
+
const beside = Object.entries(coEntities)
|
|
113
|
+
.map(([field, type]) => `, a second ${type} in '${field}'`)
|
|
114
|
+
.join('');
|
|
115
|
+
const where = (target.kind === 'ref'
|
|
101
116
|
? `ref from '${target.path.join('.')}'`
|
|
102
|
-
: `id from '${target.path[0]}'
|
|
117
|
+
: `id from '${target.path[0]}'`) + beside;
|
|
103
118
|
/**
|
|
104
119
|
* The input the pair is driven with. A `refFrom` check is handed the whole
|
|
105
120
|
* ref — which is the assertion, since an engine declaring this shape claims
|
|
@@ -137,12 +152,26 @@ export function entityCheckConformanceSuite(subjectName, operations, makeFixture
|
|
|
137
152
|
* delegate. All of them NARROWED to the one entity — never scope-wide,
|
|
138
153
|
* which is what keeps case 1 able to catch a node check.
|
|
139
154
|
*/
|
|
140
|
-
const grantAllOn = async (fixture, entityId) => {
|
|
141
|
-
const ref = { entityType
|
|
155
|
+
const grantAllOn = async (fixture, entityId, entityType = entity) => {
|
|
156
|
+
const ref = { entityType, entityId };
|
|
142
157
|
await fixture.grantOnEntity(key, ref);
|
|
143
158
|
for (const extra of extraKeys)
|
|
144
159
|
await fixture.grantOnEntity(extra, ref);
|
|
145
160
|
};
|
|
161
|
+
/**
|
|
162
|
+
* The second entities the operation needs beside its target (#939), made
|
|
163
|
+
* fresh and granted the same keys — in both cases, so that what case 2
|
|
164
|
+
* refuses is the target and nothing else.
|
|
165
|
+
*/
|
|
166
|
+
const coEntitiesFor = async (fixture) => {
|
|
167
|
+
const made = {};
|
|
168
|
+
for (const [field, type] of Object.entries(coEntities)) {
|
|
169
|
+
const id = await fixture.createEntity(type);
|
|
170
|
+
await grantAllOn(fixture, id, type);
|
|
171
|
+
made[field] = id;
|
|
172
|
+
}
|
|
173
|
+
return made;
|
|
174
|
+
};
|
|
146
175
|
const denialFrom = async (fixture, input) => {
|
|
147
176
|
const isDenial = fixture.isDenial ?? ((e) => e instanceof PermissionDenied);
|
|
148
177
|
try {
|
|
@@ -161,7 +190,8 @@ export function entityCheckConformanceSuite(subjectName, operations, makeFixture
|
|
|
161
190
|
const fixture = await makeFixture();
|
|
162
191
|
const targetId = await fixture.createEntity(entity);
|
|
163
192
|
await grantAllOn(fixture, targetId);
|
|
164
|
-
const
|
|
193
|
+
const beside = await coEntitiesFor(fixture);
|
|
194
|
+
const outcome = await denialFrom(fixture, inputFor(targetId, { ...extrasNow(), ...beside }));
|
|
165
195
|
const denied = outcome !== undefined && !outcome.notADenial;
|
|
166
196
|
expect(denied, `${name} denied a principal holding ${key} on the very ${entity} it was ` +
|
|
167
197
|
'invoked against — the handler is checking the node, not the entity').toBe(false);
|
|
@@ -173,7 +203,8 @@ export function entityCheckConformanceSuite(subjectName, operations, makeFixture
|
|
|
173
203
|
const granted = await fixture.createEntity(entity);
|
|
174
204
|
await grantAllOn(fixture, granted);
|
|
175
205
|
const other = await fixture.createEntity(entity);
|
|
176
|
-
const
|
|
206
|
+
const beside = await coEntitiesFor(fixture);
|
|
207
|
+
const outcome = await denialFrom(fixture, inputFor(other, { ...extrasNow(), ...beside }));
|
|
177
208
|
const notADenial = outcome?.notADenial;
|
|
178
209
|
expect(outcome, `${name} allowed a principal to reach a ${entity} they hold no grant on`).toBeDefined();
|
|
179
210
|
expect(notADenial, `${name} failed against an ungranted ${entity}, but not with a permission ` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-check-suite.js","sourceRoot":"","sources":["../src/entity-check-suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,E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OAAO,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBACnD,MAAM,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;oBACnC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;oBACjD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;oBAE5C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;oBAC1F,MAAM,UAAU,GAAI,OAAgD,EAAE,UAAU,CAAC;oBACjF,MAAM,CACJ,OAAO,EACP,GAAG,IAAI,mCAAmC,MAAM,wBAAwB,CACzE,CAAC,WAAW,EAAE,CAAC;oBAChB,MAAM,CACJ,UAAU,EACV,GAAG,IAAI,gCAAgC,MAAM,8BAA8B;wBACzE,yDAAyD,CAC5D,CAAC,aAAa,EAAE,CAAC;gBACpB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/contract-tests",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.1",
|
|
4
4
|
"description": "The suite every scope-host adapter must pass, forever (D-14)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"vitest": "^3.2.7",
|
|
34
|
-
"@substrat-run/contracts": "^0.
|
|
35
|
-
"@substrat-run/kernel": "^0.
|
|
34
|
+
"@substrat-run/contracts": "^0.91.1",
|
|
35
|
+
"@substrat-run/kernel": "^0.91.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|