@aventara/testing 1.0.0-rc.0 → 1.0.0-rc.10
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/CHANGELOG.md +544 -1
- package/README.md +23 -22
- package/dist/adapters/adapter-factory.d.ts +2 -2
- package/dist/adapters/fake-adapter.d.ts +16 -16
- package/dist/index.d.ts +2 -2
- package/dist/protocol/corpus-contract.fixture.d.ts +226 -51
- package/dist/protocol/corpus-contract.fixture.js +74 -35
- package/dist/protocol/in-process.driver.d.ts +2 -2
- package/dist/protocol/in-process.driver.js +2 -0
- package/dist/protocol/per-route.driver.d.ts +2 -1
- package/dist/protocol/per-route.driver.js +2 -0
- package/dist/protocol/protocol-conformance.d.ts +4 -4
- package/dist/protocol/protocol-corpus.d.ts +6 -4
- package/dist/protocol/protocol-driver.d.ts +2 -2
- package/dist/protocol/protocol-fixture.d.ts +4 -4
- package/dist/protocol/protocol-fixtures.js +146 -4
- package/dist/protocol/protocol-fixtures.json-codec.d.ts +2 -1
- package/dist/protocol/protocol-fixtures.json-codec.js +5 -1
- package/fixtures/protocol-v1.json +113 -100
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,548 @@
|
|
|
1
1
|
# @aventara/testing
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 04bb39a: `engines.node` is now `^22.23.4 || >=24.22.1`, the Node security releases of 2026-10-20 (CVE-2026-105481,
|
|
8
|
+
CVE-2026-105482, CVE-2026-105483, CVE-2026-106069, CVE-2026-106072, CVE-2026-106073, CVE-2026-106074,
|
|
9
|
+
CVE-2026-111497). The bins refuse an older Node in one sentence naming that range.
|
|
10
|
+
- 587dd01: The protocol corpus covers `POST /_access/can`: its answers and refusals, driven against a third corpus Client
|
|
11
|
+
Contract built with `access`. `AvProtocolCorpus.framework(hash)` serves that Contract for its hash, and
|
|
12
|
+
`fixtures/protocol-v1.json` carries it beside the other two.
|
|
13
|
+
- Updated dependencies [587dd01]
|
|
14
|
+
- Updated dependencies [d7e7369]
|
|
15
|
+
- Updated dependencies [7ee547b]
|
|
16
|
+
- Updated dependencies [f52c499]
|
|
17
|
+
- Updated dependencies [2907484]
|
|
18
|
+
- Updated dependencies [a6bbdf0]
|
|
19
|
+
- Updated dependencies [3e26549]
|
|
20
|
+
- Updated dependencies [a6bbdf0]
|
|
21
|
+
- Updated dependencies [6f3f6f6]
|
|
22
|
+
- Updated dependencies [04bb39a]
|
|
23
|
+
- Updated dependencies [3fb3333]
|
|
24
|
+
- Updated dependencies [827ccb6]
|
|
25
|
+
- Updated dependencies [7f5abc3]
|
|
26
|
+
- Updated dependencies [88263a1]
|
|
27
|
+
- Updated dependencies [10341d5]
|
|
28
|
+
- Updated dependencies [8129844]
|
|
29
|
+
- Updated dependencies [88263a1]
|
|
30
|
+
- Updated dependencies [3020b5c]
|
|
31
|
+
- Updated dependencies [88263a1]
|
|
32
|
+
- Updated dependencies [88263a1]
|
|
33
|
+
- @aventara/core@1.0.0-rc.10
|
|
34
|
+
|
|
35
|
+
## 1.0.0-rc.9
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [205a379]
|
|
40
|
+
- Updated dependencies [a0bb05e]
|
|
41
|
+
- Updated dependencies [86ab319]
|
|
42
|
+
- Updated dependencies [fdf52e6]
|
|
43
|
+
- @aventara/core@1.0.0-rc.9
|
|
44
|
+
|
|
45
|
+
## 1.0.0-rc.8
|
|
46
|
+
|
|
47
|
+
1.0.0-rc.5, rc.6 and rc.7 were tagged but never published; 1.0.0-rc.8 contains everything listed under them and the changes below.
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [1c8e4ee]
|
|
52
|
+
- @aventara/core@1.0.0-rc.8
|
|
53
|
+
|
|
54
|
+
## 1.0.0-rc.7
|
|
55
|
+
|
|
56
|
+
1.0.0-rc.5 and 1.0.0-rc.6 were tagged but never published; 1.0.0-rc.7 contains everything listed under them and the changes below.
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [f917c1c]
|
|
61
|
+
- @aventara/core@1.0.0-rc.7
|
|
62
|
+
|
|
63
|
+
## 1.0.0-rc.6
|
|
64
|
+
|
|
65
|
+
1.0.0-rc.5 was tagged but never published. 1.0.0-rc.6 contains everything listed under 1.0.0-rc.5 and the fix below.
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [1cf72e0]
|
|
70
|
+
- @aventara/core@1.0.0-rc.6
|
|
71
|
+
|
|
72
|
+
## 1.0.0-rc.5
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [4795ff1]
|
|
77
|
+
- Updated dependencies [9e178ca]
|
|
78
|
+
- @aventara/core@1.0.0-rc.5
|
|
79
|
+
|
|
80
|
+
## 1.0.0-rc.4
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- Updated dependencies [e3d03a7]
|
|
85
|
+
- Updated dependencies [d10639a]
|
|
86
|
+
- Updated dependencies [f67e68c]
|
|
87
|
+
- Updated dependencies [708556c]
|
|
88
|
+
- Updated dependencies [3a0dfca]
|
|
89
|
+
- Updated dependencies [99169d2]
|
|
90
|
+
- Updated dependencies [0fd2608]
|
|
91
|
+
- Updated dependencies [154e440]
|
|
92
|
+
- Updated dependencies [2fcffdb]
|
|
93
|
+
- @aventara/core@1.0.0-rc.4
|
|
94
|
+
|
|
95
|
+
## 1.0.0-rc.3
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [b38034d]
|
|
100
|
+
- Updated dependencies [b38034d]
|
|
101
|
+
- Updated dependencies [b38034d]
|
|
102
|
+
- Updated dependencies [b38034d]
|
|
103
|
+
- Updated dependencies [b38034d]
|
|
104
|
+
- Updated dependencies [b38034d]
|
|
105
|
+
- @aventara/core@1.0.0-rc.3
|
|
106
|
+
|
|
107
|
+
## 1.0.0-rc.2
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- Updated dependencies [9366e16]
|
|
112
|
+
- Updated dependencies [9366e16]
|
|
113
|
+
- Updated dependencies [9366e16]
|
|
114
|
+
- Updated dependencies [9366e16]
|
|
115
|
+
- @aventara/core@1.0.0-rc.2
|
|
116
|
+
|
|
117
|
+
## 1.0.0-rc.1
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- 8bb1d6a: Breaking: public type and class names take the `Av` prefix. Every public type and class is now `Av` plus what
|
|
122
|
+
it is, with a namespace only where the bare name would be ambiguous: configuration types are `AvConfig…`
|
|
123
|
+
(`AvConfig`, `AvConfigLayer`, `AvConfigResource`, …) and the three Contracts are `AvContract…` (`AvContractCore`,
|
|
124
|
+
`AvContractApplication`, `AvContractClient`). Functions keep their names (`createFramework`, `createFakeAdapter`,
|
|
125
|
+
`createPrismaAdapter`, `defineClientConfig`, `env`), and so do the names that already started with `Av`,
|
|
126
|
+
`AventaraModule`, `AventaraModuleOptions` and `AventaraModuleAsyncOptions`. There are no
|
|
127
|
+
aliases: replace each old name with the new one.
|
|
128
|
+
|
|
129
|
+
Three names merged or left:
|
|
130
|
+
|
|
131
|
+
- `PipelineContext` and `ComputeContext` (which was the same type) are one name, `AvContext`. A compute stage
|
|
132
|
+
now gets its own read-only ctx, `AvComputeContext` (see the ctx entry below).
|
|
133
|
+
- `ComputedRead` is `AvComputeRead`, the one name of a read compute stage: a function, or `{ compute, dependsOn }`.
|
|
134
|
+
`ComputeOnRead`, the bare function type, is no longer exported; `AvComputeRead` accepts the function as it is.
|
|
135
|
+
- `defineFields` and `FrameworkFieldsShape` are removed; `defineResource` replaces them (below).
|
|
136
|
+
|
|
137
|
+
`defineResource` replaces `defineFields`. A Resource's configuration, its root block and its overlay blocks, can
|
|
138
|
+
live in its own module and be spread into each layer's `resources` tree:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
export const submission = defineResource<Model>()(
|
|
142
|
+
"Submission",
|
|
143
|
+
{
|
|
144
|
+
pipelines: { guards: [signedIn] },
|
|
145
|
+
fields: { title: { pipelines: { pipes: [trim] } } },
|
|
146
|
+
},
|
|
147
|
+
{ client: { fields: { title: { pipelines: { validators: [AvZ.maxLength(80)] } } } } },
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// aventara.config.ts
|
|
151
|
+
resources: { ...submission.root, ...payment.root },
|
|
152
|
+
client: { resources: { ...submission.client } },
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
It returns `{ root, application?, client? }`, each `{ Submission: block }`; a layer given no block is left out. The
|
|
156
|
+
root block is typed exactly as `resources.Submission` is typed in place: field definitions are checked against what
|
|
157
|
+
the adapter discovered, stages are typed for the Resource, and a key no level admits is a type error at the key.
|
|
158
|
+
Each overlay block is typed as `application.resources.Submission` or `client.resources.Submission` is in place,
|
|
159
|
+
against the root block: it may name a field the root block defines, and a `definition` in it is a type error (and
|
|
160
|
+
`CONFIG_FORBIDDEN_IN_OVERLAY` at startup). Spread, the configuration is the inline one: the same Contracts and
|
|
161
|
+
ClientContract hash. A field `definition` that `defineFields` returned now sits at
|
|
162
|
+
`fields.<field>.definition` inside the block.
|
|
163
|
+
|
|
164
|
+
The generated client's names follow the same rule. Regenerate with `avclient generate`; then rename the
|
|
165
|
+
imports from `AvClient.ts`:
|
|
166
|
+
|
|
167
|
+
| Before | After |
|
|
168
|
+
| ----------------------- | ------------------------- |
|
|
169
|
+
| `AuthError` | `AvAuthError` |
|
|
170
|
+
| `CallOptions` | `AvCallOptions` |
|
|
171
|
+
| `Cause` | `AvCause` |
|
|
172
|
+
| `ConflictError` | `AvConflictError` |
|
|
173
|
+
| `ContractMismatchError` | `AvContractMismatchError` |
|
|
174
|
+
| `Decimal` | `AvDecimal` |
|
|
175
|
+
| `Fetch` | `AvFetch` |
|
|
176
|
+
| `FrameworkError` | `AvError` |
|
|
177
|
+
| `InternalError` | `AvInternalError` |
|
|
178
|
+
| `NotFoundError` | `AvNotFoundError` |
|
|
179
|
+
| `Operation<T>` | `AvOperation<T>` |
|
|
180
|
+
| `OperationCode` | `AvOperationCode` |
|
|
181
|
+
| `ProtocolError` | `AvProtocolError` |
|
|
182
|
+
| `TransportError` | `AvTransportError` |
|
|
183
|
+
| `ValidationCode` | `AvValidationCode` |
|
|
184
|
+
| `ValidationError` | `AvValidationError` |
|
|
185
|
+
| `ValidationIssue` | `AvValidationIssue` |
|
|
186
|
+
|
|
187
|
+
An enum whose name is one of these now walks the rename ladder (`AvDecimal` → `AvDecimalEnum`); an enum named
|
|
188
|
+
`Decimal` is emitted as `Decimal`.
|
|
189
|
+
|
|
190
|
+
`@aventara/core`, every renamed export:
|
|
191
|
+
|
|
192
|
+
| Before | After |
|
|
193
|
+
| ------------------------------------- | ---------------------------------- |
|
|
194
|
+
| `Adapter` | `AvAdapter` |
|
|
195
|
+
| `AdapterDiscoveryDiagnostic` | `AvAdapterDiscoveryDiagnostic` |
|
|
196
|
+
| `AdapterDiscoveryDiagnosticCode` | `AvAdapterDiscoveryDiagnosticCode` |
|
|
197
|
+
| `AdapterModel` | `AvAdapterModel` |
|
|
198
|
+
| `AddedFieldDefinition` | `AvConfigAddedFieldDefinition` |
|
|
199
|
+
| `AfterHook` | `AvAfterHook` |
|
|
200
|
+
| `AnyFrameworkConfig` | `AvConfigAny` |
|
|
201
|
+
| `AnyLayerConfig` | `AvConfigLayerAny` |
|
|
202
|
+
| `AnyResourcesBlock` | `AvConfigResourcesAny` |
|
|
203
|
+
| `ApplicationContract` | `AvContractApplication` |
|
|
204
|
+
| `ApplicationScalarForms` | `AvApplicationScalarForms` |
|
|
205
|
+
| `BeforeHook` | `AvBeforeHook` |
|
|
206
|
+
| `BuiltInScalar` | `AvBuiltInScalar` |
|
|
207
|
+
| `Cause` | `AvCause` |
|
|
208
|
+
| `ClientContract` | `AvContractClient` |
|
|
209
|
+
| `ClientContractProtocol` | `AvContractClientProtocol` |
|
|
210
|
+
| `ComputedRead` | `AvComputeRead` |
|
|
211
|
+
| `ComputeOnCreate` | `AvComputeCreate` |
|
|
212
|
+
| `ComputeOnUpdate` | `AvComputeUpdate` |
|
|
213
|
+
| `ConfigDiagnostic` | `AvConfigDiagnostic` |
|
|
214
|
+
| `ConfigDiagnosticCode` | `AvConfigDiagnosticCode` |
|
|
215
|
+
| `ConfigFieldKey` | `AvConfigFieldKey` |
|
|
216
|
+
| `ConfigLayer` | `AvConfigLayerName` |
|
|
217
|
+
| `Contract` | `AvContract` |
|
|
218
|
+
| `ContractCompilerDiagnostic` | `AvContractCompilerDiagnostic` |
|
|
219
|
+
| `ContractCompilerDiagnosticCode` | `AvContractCompilerDiagnosticCode` |
|
|
220
|
+
| `ContractHash` | `AvContractHash` |
|
|
221
|
+
| `ContractLimits` | `AvContractLimits` |
|
|
222
|
+
| `ContractProtocol` | `AvContractProtocol` |
|
|
223
|
+
| `CoreContract` | `AvContractCore` |
|
|
224
|
+
| `CreateDataInput` | `AvCreateDataInput` |
|
|
225
|
+
| `CursorInput` | `AvCursorInput` |
|
|
226
|
+
| `Decimal` | `AvDecimal` |
|
|
227
|
+
| `DeferredOperationCall` | `AvDeferredOperationCall` |
|
|
228
|
+
| `EffectiveFieldKey` | `AvEffectiveFieldKey` |
|
|
229
|
+
| `EnumDefinition` | `AvEnumDefinition` |
|
|
230
|
+
| `ExactFrameworkConfig` | `AvConfigExact` |
|
|
231
|
+
| `ExecutionOptions` | `AvExecutionOptions` |
|
|
232
|
+
| `Field` | `AvField` |
|
|
233
|
+
| `FieldComputeConfig` | `AvFieldCompute` |
|
|
234
|
+
| `FieldKey` | `AvFieldKey` |
|
|
235
|
+
| `FieldPipe` | `AvFieldPipe` |
|
|
236
|
+
| `FieldWriteGuard` | `AvFieldGuard` |
|
|
237
|
+
| `Filter` | `AvFilter` |
|
|
238
|
+
| `Framework` | `AvFramework` |
|
|
239
|
+
| `FrameworkConfig` | `AvConfig` |
|
|
240
|
+
| `FrameworkConstructionDiagnostic` | `AvConstructionDiagnostic` |
|
|
241
|
+
| `FrameworkConstructionError` | `AvConstructionError` |
|
|
242
|
+
| `FrameworkConstructionStage` | `AvConstructionStage` |
|
|
243
|
+
| `FrameworkContracts` | `AvContracts` |
|
|
244
|
+
| `FrameworkDiagnostic` | `AvDiagnostic` |
|
|
245
|
+
| `FrameworkDiagnosticsSink` | `AvDiagnosticsSink` |
|
|
246
|
+
| `FrameworkError` | `AvError` |
|
|
247
|
+
| `FrameworkExemptionsConfig` | `AvConfigExemptions` |
|
|
248
|
+
| `FrameworkFamilyConfig` | `AvConfigFamily` |
|
|
249
|
+
| `FrameworkFieldDefinition` | `AvConfigFieldDefinition` |
|
|
250
|
+
| `FrameworkFieldLifecycleTrait` | `AvConfigFieldLifecycleTrait` |
|
|
251
|
+
| `FrameworkLayerConfig` | `AvConfigLayer` |
|
|
252
|
+
| `FrameworkLayerKind` | `AvConfigLayerKind` |
|
|
253
|
+
| `FrameworkLimitsConfig` | `AvConfigLimits` |
|
|
254
|
+
| `FrameworkMisuseEvent` | `AvMisuseEvent` |
|
|
255
|
+
| `FrameworkMisuseSink` | `AvMisuseSink` |
|
|
256
|
+
| `FrameworkOperationsConfig` | `AvConfigOperations` |
|
|
257
|
+
| `FrameworkOperationsExemption` | `AvConfigOperationsExemption` |
|
|
258
|
+
| `FrameworkOverlayFieldConfig` | `AvConfigOverlayField` |
|
|
259
|
+
| `FrameworkRelationFieldExemption` | `AvConfigRelationFieldExemption` |
|
|
260
|
+
| `FrameworkResourceConfig` | `AvConfigResource` |
|
|
261
|
+
| `FrameworkResourceExemption` | `AvConfigResourceExemption` |
|
|
262
|
+
| `FrameworkResourceFieldsConfig` | `AvConfigResourceFields` |
|
|
263
|
+
| `FrameworkResourceKey` | `AvConfigResourceKey` |
|
|
264
|
+
| `FrameworkResourcesConfig` | `AvConfigResources` |
|
|
265
|
+
| `FrameworkResourceTransactionsConfig` | `AvConfigResourceTransactions` |
|
|
266
|
+
| `FrameworkRootFieldConfig` | `AvConfigRootField` |
|
|
267
|
+
| `FrameworkScalarFieldExemption` | `AvConfigScalarFieldExemption` |
|
|
268
|
+
| `FrameworkScalarTypeRef` | `AvConfigScalarTypeRef` |
|
|
269
|
+
| `FrameworkVariantConfig` | `AvConfigVariant` |
|
|
270
|
+
| `Guard` | `AvGuard` |
|
|
271
|
+
| `Identifier` | `AvIdentifier` |
|
|
272
|
+
| `IncludeInput` | `AvIncludeInput` |
|
|
273
|
+
| `Interceptor` | `AvInterceptor` |
|
|
274
|
+
| `JsonValue` | `AvJsonValue` |
|
|
275
|
+
| `KnownFieldDefinition` | `AvConfigKnownFieldDefinition` |
|
|
276
|
+
| `LifecycleTrait` | `AvLifecycleTrait` |
|
|
277
|
+
| `NullsOrder` | `AvNullsOrder` |
|
|
278
|
+
| `Operation` | `AvOperation` |
|
|
279
|
+
| `OperationArgumentMap` | `AvOperationArgumentMap` |
|
|
280
|
+
| `OperationArgumentsFor` | `AvOperationArgumentsFor` |
|
|
281
|
+
| `OperationAvailability` | `AvOperationAvailability` |
|
|
282
|
+
| `OperationCall` | `AvOperationCall` |
|
|
283
|
+
| `OperationCode` | `AvOperationCode` |
|
|
284
|
+
| `OperationDiagnostic` | `AvOperationDiagnostic` |
|
|
285
|
+
| `OperationErrorCode` | `AvOperationErrorCode` |
|
|
286
|
+
| `OperationFailureResponse` | `AvOperationFailureResponse` |
|
|
287
|
+
| `OperationFamily` | `AvOperationFamily` |
|
|
288
|
+
| `OperationGrammar` | `AvOperationGrammar` |
|
|
289
|
+
| `OperationIdentity` | `AvOperationIdentity` |
|
|
290
|
+
| `OperationNoMatchResponse` | `AvOperationNoMatchResponse` |
|
|
291
|
+
| `OperationReferenceSurface` | `AvOperationReferenceSurface` |
|
|
292
|
+
| `OperationResponse` | `AvOperationResponse` |
|
|
293
|
+
| `OperationResultFor` | `AvOperationResultFor` |
|
|
294
|
+
| `OperationSlot` | `AvOperationSlot` |
|
|
295
|
+
| `OperationSuccessCode` | `AvOperationSuccessCode` |
|
|
296
|
+
| `OperationSuccessDataCode` | `AvOperationSuccessDataCode` |
|
|
297
|
+
| `OperationSuccessResponse` | `AvOperationSuccessResponse` |
|
|
298
|
+
| `OperationVariant` | `AvOperationVariant` |
|
|
299
|
+
| `OperationVariantScopes` | `AvOperationVariantScopes` |
|
|
300
|
+
| `OrderByEntry` | `AvOrderByEntry` |
|
|
301
|
+
| `OrderByInput` | `AvOrderByInput` |
|
|
302
|
+
| `PaginationCapability` | `AvPaginationCapability` |
|
|
303
|
+
| `Pipe` | `AvPipe` |
|
|
304
|
+
| `PipelineConfig` | `AvPipeline` |
|
|
305
|
+
| `PipelineContext` | `AvContext` |
|
|
306
|
+
| `PipelineTransportContext` | `AvTransportContext` |
|
|
307
|
+
| `ProjectionEntry` | `AvProjectionEntry` |
|
|
308
|
+
| `ProjectionScope` | `AvProjectionScope` |
|
|
309
|
+
| `ProjectionScopes` | `AvProjectionScopes` |
|
|
310
|
+
| `ReferenceableField` | `AvReferenceableField` |
|
|
311
|
+
| `ReferenceBuilder` | `AvReferenceBuilder` |
|
|
312
|
+
| `RelationField` | `AvRelationField` |
|
|
313
|
+
| `RelationFieldCapabilities` | `AvRelationFieldCapabilities` |
|
|
314
|
+
| `RelationFieldCapabilityName` | `AvRelationFieldCapabilityName` |
|
|
315
|
+
| `RelationFieldPipelineConfig` | `AvRelationFieldPipeline` |
|
|
316
|
+
| `RelationFilterCapability` | `AvRelationFilterCapability` |
|
|
317
|
+
| `RelationMutationCapability` | `AvRelationMutationCapability` |
|
|
318
|
+
| `RelationMutationDirective` | `AvRelationMutationDirective` |
|
|
319
|
+
| `RelationProjectionCapability` | `AvRelationProjectionCapability` |
|
|
320
|
+
| `RelationProjectionInput` | `AvRelationProjectionInput` |
|
|
321
|
+
| `RelationReducer` | `AvRelationReducer` |
|
|
322
|
+
| `RelationReducerCapability` | `AvRelationReducerCapability` |
|
|
323
|
+
| `RequestOrigin` | `AvRequestOrigin` |
|
|
324
|
+
| `Resource` | `AvResource` |
|
|
325
|
+
| `ResourceFieldMap` | `AvResourceFieldMap` |
|
|
326
|
+
| `ResourceKey` | `AvResourceKey` |
|
|
327
|
+
| `ResourceOperations` | `AvResourceOperations` |
|
|
328
|
+
| `ScalarDefinition` | `AvScalarDefinition` |
|
|
329
|
+
| `ScalarField` | `AvScalarField` |
|
|
330
|
+
| `ScalarFieldCapabilities` | `AvScalarFieldCapabilities` |
|
|
331
|
+
| `ScalarFieldCapabilityName` | `AvScalarFieldCapabilityName` |
|
|
332
|
+
| `ScalarFieldKey` | `AvScalarFieldKey` |
|
|
333
|
+
| `ScalarFieldPipelineConfig` | `AvScalarFieldPipeline` |
|
|
334
|
+
| `ScalarFilterOperator` | `AvScalarFilterOperator` |
|
|
335
|
+
| `ScalarFormat` | `AvScalarFormat` |
|
|
336
|
+
| `ScalarMutationDirective` | `AvScalarMutationDirective` |
|
|
337
|
+
| `ScalarOrderInput` | `AvScalarOrderInput` |
|
|
338
|
+
| `ScalarRegistry` | `AvScalarRegistry` |
|
|
339
|
+
| `ScalarValueType` | `AvScalarValueType` |
|
|
340
|
+
| `ScopedRelationMutations` | `AvScopedRelationMutations` |
|
|
341
|
+
| `ScopedRelationReducers` | `AvScopedRelationReducers` |
|
|
342
|
+
| `SelectInput` | `AvSelectInput` |
|
|
343
|
+
| `SingleRowResult` | `AvSingleRowResult` |
|
|
344
|
+
| `SortDirection` | `AvSortDirection` |
|
|
345
|
+
| `TransactionAfterHook` | `AvTransactionAfterHook` |
|
|
346
|
+
| `TransactionBeforeHook` | `AvTransactionBeforeHook` |
|
|
347
|
+
| `TransactionCapability` | `AvTransactionCapability` |
|
|
348
|
+
| `TransactionCommittedResponse` | `AvTransactionCommittedResponse` |
|
|
349
|
+
| `TransactionDiagnostic` | `AvTransactionDiagnostic` |
|
|
350
|
+
| `TransactionFilter` | `AvTransactionFilter` |
|
|
351
|
+
| `TransactionGuard` | `AvTransactionGuard` |
|
|
352
|
+
| `TransactionIntegrityError` | `AvTransactionIntegrityError` |
|
|
353
|
+
| `TransactionIntegrityViolation` | `AvTransactionIntegrityViolation` |
|
|
354
|
+
| `TransactionInterceptor` | `AvTransactionInterceptor` |
|
|
355
|
+
| `TransactionPipe` | `AvTransactionPipe` |
|
|
356
|
+
| `TransactionPipelineConfig` | `AvTransactionPipeline` |
|
|
357
|
+
| `TransactionPipelineContext` | `AvTransactionContext` |
|
|
358
|
+
| `TransactionReference` | `AvTransactionReference` |
|
|
359
|
+
| `TransactionResponse` | `AvTransactionResponse` |
|
|
360
|
+
| `TransactionResults` | `AvTransactionResults` |
|
|
361
|
+
| `TransactionRunner` | `AvTransactionRunner` |
|
|
362
|
+
| `TransactionSlotPathError` | `AvTransactionSlotPathError` |
|
|
363
|
+
| `TransactionSlotPathViolation` | `AvTransactionSlotPathViolation` |
|
|
364
|
+
| `UniqueWhereInput` | `AvUniqueWhereInput` |
|
|
365
|
+
| `UpdateDataInput` | `AvUpdateDataInput` |
|
|
366
|
+
| `ValidationCode` | `AvValidationCode` |
|
|
367
|
+
| `ValidationIssue` | `AvValidationIssue` |
|
|
368
|
+
| `WhereInput` | `AvWhereInput` |
|
|
369
|
+
| `WireScalarForms` | `AvWireScalarForms` |
|
|
370
|
+
| `WriteScope` | `AvWriteScope` |
|
|
371
|
+
| `WriteScopes` | `AvWriteScopes` |
|
|
372
|
+
|
|
373
|
+
Error classes whose `name` a log or a test may read:
|
|
374
|
+
|
|
375
|
+
| Before | After |
|
|
376
|
+
| ------------------------ | -------------------------- |
|
|
377
|
+
| `CallerDataError` | `AvCallerDataError` |
|
|
378
|
+
| `ClientConfigError` | `AvClientConfigError` |
|
|
379
|
+
| `ComputedValueError` | `AvComputedValueError` |
|
|
380
|
+
| `ContractProtocolError` | `AvContractProtocolError` |
|
|
381
|
+
| `ContractTransportError` | `AvContractTransportError` |
|
|
382
|
+
| `EnvFileError` | `AvEnvFileError` |
|
|
383
|
+
| `OutputValidationError` | `AvOutputValidationError` |
|
|
384
|
+
| `OutputWriteError` | `AvOutputWriteError` |
|
|
385
|
+
| `PipeOutputError` | `AvPipeOutputError` |
|
|
386
|
+
| `UnmountedRouteError` | `AvUnmountedRouteError` |
|
|
387
|
+
|
|
388
|
+
`@aventara/testing`:
|
|
389
|
+
|
|
390
|
+
| Before | After |
|
|
391
|
+
| ------------------------ | -------------------------- |
|
|
392
|
+
| `AdapterFactory` | `AvAdapterFactory` |
|
|
393
|
+
| `FakeAdapter` | `AvFakeAdapter` |
|
|
394
|
+
| `FakeAdapterExecute` | `AvFakeAdapterExecute` |
|
|
395
|
+
| `FakeAdapterOptions` | `AvFakeAdapterOptions` |
|
|
396
|
+
| `FakeAdapterRollback` | `AvFakeAdapterRollback` |
|
|
397
|
+
| `FakeTransactionOutcome` | `AvFakeTransactionOutcome` |
|
|
398
|
+
| `FakeTransactionTrace` | `AvFakeTransactionTrace` |
|
|
399
|
+
|
|
400
|
+
`@aventara/client` (the `framework.client.ts` config types):
|
|
401
|
+
|
|
402
|
+
| Before | After |
|
|
403
|
+
| ------------------- | --------------------- |
|
|
404
|
+
| `ClientConfigInput` | `AvClientConfigInput` |
|
|
405
|
+
| `ConfigValue` | `AvClientConfigValue` |
|
|
406
|
+
| `EnvReference` | `AvEnvReference` |
|
|
407
|
+
|
|
408
|
+
`@aventara/prisma7-adapter`: its public types and error classes (`createPrismaAdapter` keeps its name):
|
|
409
|
+
|
|
410
|
+
| Before | After |
|
|
411
|
+
| ---------------------------------- | ------------------------------------ |
|
|
412
|
+
| `PrismaAdapterModel` | `AvPrismaAdapterModel` |
|
|
413
|
+
| `PrismaAdapterOptions` | `AvPrismaAdapterOptions` |
|
|
414
|
+
| `PrismaDelegate` | `AvPrismaDelegate` |
|
|
415
|
+
| `PrismaDelegateHost` | `AvPrismaDelegateHost` |
|
|
416
|
+
| `PrismaDelegateIndex` | `AvPrismaDelegateIndex` |
|
|
417
|
+
| `PrismaDiscoveryArtifact` | `AvPrismaDiscoveryArtifact` |
|
|
418
|
+
| `PrismaDriver` | `AvPrismaDriver` |
|
|
419
|
+
| `PrismaIsolationLevel` | `AvPrismaIsolationLevel` |
|
|
420
|
+
| `PrismaProvider` | `AvPrismaProvider` |
|
|
421
|
+
| `PrismaProviderProfile` | `AvPrismaProviderProfile` |
|
|
422
|
+
| `PrismaReferentialAction` | `AvPrismaReferentialAction` |
|
|
423
|
+
| `PrismaReferentialActionTable` | `AvPrismaReferentialActionTable` |
|
|
424
|
+
| `PrismaReferentialEdge` | `AvPrismaReferentialEdge` |
|
|
425
|
+
| `PrismaResourceReferentialActions` | `AvPrismaResourceReferentialActions` |
|
|
426
|
+
| `PrismaTransactionOptions` | `AvPrismaTransactionOptions` |
|
|
427
|
+
| `PrismaCapabilityDerivationError` | `AvPrismaCapabilityDerivationError` |
|
|
428
|
+
| `PrismaDiscoveryArtifactError` | `AvPrismaDiscoveryArtifactError` |
|
|
429
|
+
| `PrismaEmulationError` | `AvPrismaEmulationError` |
|
|
430
|
+
| `PrismaExecutionError` | `AvPrismaExecutionError` |
|
|
431
|
+
| `PrismaExistenceGateError` | `AvPrismaExistenceGateError` |
|
|
432
|
+
| `PrismaFieldProjectionError` | `AvPrismaFieldProjectionError` |
|
|
433
|
+
| `PrismaGenerateCliError` | `AvPrismaGenerateCliError` |
|
|
434
|
+
| `PrismaGenerateStepError` | `AvPrismaGenerateStepError` |
|
|
435
|
+
| `PrismaModelCompositionError` | `AvPrismaModelCompositionError` |
|
|
436
|
+
| `PrismaMutationTranslationError` | `AvPrismaMutationTranslationError` |
|
|
437
|
+
| `PrismaOperationTranslationError` | `AvPrismaOperationTranslationError` |
|
|
438
|
+
| `PrismaOrderTranslationError` | `AvPrismaOrderTranslationError` |
|
|
439
|
+
| `PrismaProjectionTranslationError` | `AvPrismaProjectionTranslationError` |
|
|
440
|
+
| `PrismaResultShapeError` | `AvPrismaResultShapeError` |
|
|
441
|
+
| `PrismaScalarConversionError` | `AvPrismaScalarConversionError` |
|
|
442
|
+
| `PrismaSchemaReaderError` | `AvPrismaSchemaReaderError` |
|
|
443
|
+
| `PrismaTypesReaderError` | `AvPrismaTypesReaderError` |
|
|
444
|
+
| `PrismaWhereTranslationError` | `AvPrismaWhereTranslationError` |
|
|
445
|
+
|
|
446
|
+
- 1b5d3c0: Breaking: every framework member of a pipeline ctx is `$`-prefixed, and ctx is now the framework's executor.
|
|
447
|
+
The rest of ctx is your Resources: `ctx.<Resource>.<family>.<variant>(args)`, plus `ctx.$sql` and
|
|
448
|
+
`ctx.$transaction`. Because a Resource name can never start with `$` (`COMPILER_RESERVED_RESOURCE_NAME`), a Resource
|
|
449
|
+
never shadows a framework member. The old names are gone with no alias. Reading one is a type error; at runtime it
|
|
450
|
+
is `undefined`.
|
|
451
|
+
|
|
452
|
+
| rc.0 | rc.1 |
|
|
453
|
+
| --------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
454
|
+
| `ctx.resource`, `ctx.family`, `ctx.variant`, `ctx.nested` | `ctx.$operation.resource`, `.family`, `.variant`, `.nested` |
|
|
455
|
+
| `ctx.args` | `ctx.$args` (a transaction stage: the plan, `readonly AvTransactionStep[]`) |
|
|
456
|
+
| `ctx.origin` | `ctx.$origin` |
|
|
457
|
+
| `ctx.requestId` | `ctx.$requestId` |
|
|
458
|
+
| `ctx.transport` | `ctx.$transport` |
|
|
459
|
+
| `ctx.contract` | `ctx.$contract` |
|
|
460
|
+
|
|
461
|
+
A transaction stage's ctx has no `$operation`.
|
|
462
|
+
|
|
463
|
+
```ts
|
|
464
|
+
hooks: {
|
|
465
|
+
after: [
|
|
466
|
+
async (post, ctx) => {
|
|
467
|
+
await ctx.User.update.unique({ where: { id: authorId }, data: { postCount: { $increment: 1 } } });
|
|
468
|
+
await ctx.$sql`insert into audit_events (actor, action) values (${actorId}, ${"post.create"})`;
|
|
469
|
+
},
|
|
470
|
+
],
|
|
471
|
+
},
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
- A ctx call is raw and application-origin. It runs the Framework Validation Layer against the
|
|
475
|
+
ApplicationContract, plus field pipes, field validators and compute. It runs no developer stage: no guards, pipes,
|
|
476
|
+
hooks, interceptors or filters at any level, no field write guards, no nested target guards, no Resource
|
|
477
|
+
transaction stages, and no `forceTransaction` wrapping. So a hook's call never re-enters the hook that made it.
|
|
478
|
+
The application layer's exposure limits it. The client's does not.
|
|
479
|
+
- A call resolves the operation's data directly (a row, a list, a count, or `null` for a first-style miss). A
|
|
480
|
+
failure throws the `AvError` subclass of its code's class (`AvNotFoundError`, `AvValidationError`, …; see the
|
|
481
|
+
in-process calls entry below) carrying the failure's `code` and `cause`.
|
|
482
|
+
- It joins the current transaction. That covers a plan step's stages, a forced call's stages, a Resource's
|
|
483
|
+
transaction stages and a `ctx.$transaction` callback. Outside a transaction each call runs on its own. Under
|
|
484
|
+
`forceTransaction`, an after hook's ctx writes commit with the operation or not at all (the outbox and
|
|
485
|
+
counter-on-another-Resource cases).
|
|
486
|
+
- `ctx.$sql` is the bound tagged template of `appTx.$sql`, run at once. It takes only the tagged-template form,
|
|
487
|
+
binds every value, needs the Adapter's `sqlStatements`, and accepts no `$ref`. It resolves the rows, typed by
|
|
488
|
+
`ctx.$sql<Row>`. Inside a transaction it runs on it; outside one it is a plain statement, with no transaction
|
|
489
|
+
opened around it, and `transactionsStyle: "none"` does not affect it (only `ctx.$transaction` is refused there).
|
|
490
|
+
- `ctx.$transaction(async (tx) => …)` runs the callback in one transaction, with `tx` the ctx bound to it, and
|
|
491
|
+
resolves what the callback returns. A throw rolls it back and is rethrown as it was. Inside an open transaction it
|
|
492
|
+
opens nothing and joins.
|
|
493
|
+
- The executor is typed from the adapter's model, with the application forms and the operation's data
|
|
494
|
+
as the result, like `framework.application`'s success data. A stage typed for any model (`AvGuard` with no model)
|
|
495
|
+
names no Resource.
|
|
496
|
+
- Compute gets a read-only ctx, `AvComputeContext` (new public name). It carries the `$` facts and
|
|
497
|
+
`ctx.<Resource>.find.*` (`find.count` included), and nothing that writes: no write families, no `$sql`, no
|
|
498
|
+
`$transaction`. This holds at runtime too: reaching one throws, and the operation answers `A3000`. A compute
|
|
499
|
+
stage's input is now `{ field, value, data, ctx }` (`{ field, value, record, ctx }` on read). rc.0's `origin`,
|
|
500
|
+
`resource` and `operation` members are gone: use `ctx.$origin`, `ctx.$operation`, and the stage's placement for
|
|
501
|
+
its Resource.
|
|
502
|
+
- A transaction pipe's returned plan is typed `readonly AvTransactionStep[]` (any model). The runtime holds it to
|
|
503
|
+
the plan it was given, as before.
|
|
504
|
+
|
|
505
|
+
- 9c52482: A `$connect` to a row that does not exist now answers `404 A2003` (not found), the same as reading a missing row.
|
|
506
|
+
Before, it answered `422 A2004`. This covers a to-one `$connect` in `create`, `update` and `upsert`, a to-many
|
|
507
|
+
`$connect`, and the same writes inside a transaction plan, where `cause.operation` names the step. The message is
|
|
508
|
+
unchanged: "The operation's arguments referenced a record that does not exist." On `update.first`, the same mistake
|
|
509
|
+
answered `A2014` before, as if the row had changed underneath; it now answers `A2003` too, and a duplicate unique value
|
|
510
|
+
written through `update.first` answers `409 A2008` instead of `A3001`.
|
|
511
|
+
|
|
512
|
+
Clearer top-level messages for an unknown Resource or operation. `A2001` now says "The requested Resource is not
|
|
513
|
+
available." and `A2002` says "The requested operation is not available on this Resource.", instead of "Operation
|
|
514
|
+
arguments failed framework validation.", which stays the message of `A2004`, `A2007` and `A2009`. A transaction step
|
|
515
|
+
whose operation is outside the standard grammar now carries the same issue message as a single call, naming the
|
|
516
|
+
operation and the Resource (for example `Operation "dance.one" is not available on Resource "posts".`), instead of
|
|
517
|
+
"Operation is not part of the standard operation grammar."
|
|
518
|
+
|
|
519
|
+
A `$ref` with no `fingerprint` is `V1000` (required value missing) and answers `422 A2004`. Before, it was `V1017`
|
|
520
|
+
(fingerprint mismatch) under `A2007`. A fingerprint that is present but wrong is still `V1017`.
|
|
521
|
+
|
|
522
|
+
`aventara init` and `aventara new` link to the documentation at https://aventara-framework.vercel.app. The old
|
|
523
|
+
address redirects, so links already written into projects keep working.
|
|
524
|
+
|
|
525
|
+
- Updated dependencies [800123b]
|
|
526
|
+
- Updated dependencies [8bb1d6a]
|
|
527
|
+
- Updated dependencies [68d4395]
|
|
528
|
+
- Updated dependencies [7e3d06f]
|
|
529
|
+
- Updated dependencies [1b5d3c0]
|
|
530
|
+
- Updated dependencies [6317811]
|
|
531
|
+
- Updated dependencies [6d0e5d6]
|
|
532
|
+
- Updated dependencies [7a0cab9]
|
|
533
|
+
- Updated dependencies [eb2a718]
|
|
534
|
+
- Updated dependencies [03312c5]
|
|
535
|
+
- Updated dependencies [123f6dc]
|
|
536
|
+
- Updated dependencies [b65df2e]
|
|
537
|
+
- Updated dependencies [c6e5010]
|
|
538
|
+
- Updated dependencies [c1f9389]
|
|
539
|
+
- Updated dependencies [9c52482]
|
|
540
|
+
- Updated dependencies [8396148]
|
|
541
|
+
- Updated dependencies [e8fbb02]
|
|
542
|
+
- Updated dependencies [916e5f6]
|
|
543
|
+
- Updated dependencies [6cbd158]
|
|
544
|
+
- @aventara/core@1.0.0-rc.1
|
|
545
|
+
|
|
3
546
|
## 1.0.0-rc.0
|
|
4
547
|
|
|
5
548
|
### Major Changes
|
|
@@ -36,7 +579,7 @@
|
|
|
36
579
|
`framework.transaction`, `framework.executeTransaction` and `POST /_transactions` alike. A single call is unchanged
|
|
37
580
|
(`["arguments", …]`). If your code reads `issue.path` from a transaction's answer, drop the `"operations", i, "args"`
|
|
38
581
|
prefix to get the path inside that step's arguments. `@aventara/testing`'s protocol corpus row "a client-hidden
|
|
39
|
-
field —
|
|
582
|
+
field — /\_transactions" and `fixtures/protocol-v1.json` carry the new path.
|
|
40
583
|
- 032f792: **Behaviour changes, transactions:** an error about a transaction step itself — rather than its arguments — now
|
|
41
584
|
names the step too, so every path in a transaction's answer is a path through the request you sent: an unknown or
|
|
42
585
|
hidden Resource is at `["operations", i, "resource"]`, a fingerprint that does not match at
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# `@aventara/testing`
|
|
2
2
|
|
|
3
|
-
Conformance fixtures and testing utilities for Aventara extensions
|
|
4
|
-
|
|
3
|
+
Conformance fixtures and testing utilities for Aventara extensions. They test an adapter or a transport host from
|
|
4
|
+
outside.
|
|
5
5
|
|
|
6
|
-
- `createFakeAdapter
|
|
6
|
+
- `createFakeAdapter`: an in-memory adapter, with transaction tracing, for testing code that runs an `AvFramework`
|
|
7
7
|
without a database.
|
|
8
|
-
- `runAvProtocolConformance(driver)
|
|
8
|
+
- `runAvProtocolConformance(driver)`: drives the protocol corpus (`AvProtocolFixtures`) through one host and reports,
|
|
9
9
|
per row, every mismatch with the expected status, code, cause, headers and body. A host supplies an
|
|
10
|
-
`AvProtocolDriver`: given
|
|
11
|
-
- `AvProtocolCorpus
|
|
12
|
-
- `@aventara/testing/fixtures/protocol-v1.json
|
|
10
|
+
`AvProtocolDriver`: given an `AvFramework`, a session that sends one protocol request and returns the answer, and closes.
|
|
11
|
+
- `AvProtocolCorpus`: the corpus's server side, for serving it through your own client or host (below).
|
|
12
|
+
- `@aventara/testing/fixtures/protocol-v1.json`: the same corpus as plain JSON, for a client or host written in any
|
|
13
13
|
language (below).
|
|
14
14
|
|
|
15
15
|
It depends on `@aventara/core` only.
|
|
@@ -17,15 +17,15 @@ It depends on `@aventara/core` only.
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install --save-dev @aventara/testing
|
|
20
|
+
npm install --save-dev @aventara/testing@rc
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Node `^22.
|
|
23
|
+
Node `^22.23.4 || >=24.22.1`. ES modules.
|
|
24
24
|
|
|
25
25
|
## Serving the corpus through your own stack
|
|
26
26
|
|
|
27
|
-
`runAvProtocolConformance` builds the corpus `
|
|
28
|
-
point a client you are writing at it,
|
|
27
|
+
`runAvProtocolConformance` builds the corpus `AvFramework` itself. To serve it from a host or test bench of your own,
|
|
28
|
+
for example to point a client you are writing at it, take it from `AvProtocolCorpus`:
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
31
|
import { AvProtocolCorpus, AvProtocolFixtures } from "@aventara/testing";
|
|
@@ -35,12 +35,12 @@ const framework = await AvProtocolCorpus.framework();
|
|
|
35
35
|
// then send each row's `request` and compare the answer with the row's `server`.
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
- `framework(contractHash?)
|
|
38
|
+
- `framework(contractHash?)`: a fresh corpus `AvFramework`, backed by an in-memory adapter whose answers every row
|
|
39
39
|
states. Pass a row's `Aventara-Contract-Hash` to get the contract that row targets: a few rows target a second
|
|
40
40
|
contract without transactions, and every other hash (a stale one included) gets the main contract.
|
|
41
|
-
- `entrypoint
|
|
42
|
-
- `clientContractHash
|
|
43
|
-
`GET /_contract` names.
|
|
41
|
+
- `entrypoint`: where the corpus is mounted; every row's `path` is relative to it.
|
|
42
|
+
- `clientContractHash`: the main ClientContract's hash. A client generated against it sends this hash, and
|
|
43
|
+
`GET /_contract` names it.
|
|
44
44
|
|
|
45
45
|
A row whose `client.outcome` is `"transport-error"` describes an answer no host produces (a proxy's HTML page, a
|
|
46
46
|
dropped connection); skip it when serving, as the conformance run does. A row's `adapterCalls` counts the operations
|
|
@@ -48,9 +48,9 @@ the corpus adapter was handed, which only the conformance run can observe.
|
|
|
48
48
|
|
|
49
49
|
## The corpus as JSON
|
|
50
50
|
|
|
51
|
-
`@aventara/testing/fixtures/protocol-v1.json` holds the whole corpus for protocol version 1
|
|
52
|
-
`AvProtocolFixtures` when the package is built
|
|
53
|
-
host written in another language can be held to the same answers:
|
|
51
|
+
`@aventara/testing/fixtures/protocol-v1.json` holds the whole corpus for protocol version 1. It is generated from
|
|
52
|
+
`AvProtocolFixtures` when the package is built, with every row in the same order and with the same fields, so a client
|
|
53
|
+
or host written in another language can be held to the same answers:
|
|
54
54
|
|
|
55
55
|
```json
|
|
56
56
|
{
|
|
@@ -62,9 +62,9 @@ host written in another language can be held to the same answers:
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
- `contracts
|
|
65
|
+
- `contracts`: each ClientContract a row targets: its hash and its exact `GET /_contract` bytes (`document`, a
|
|
66
66
|
string). The first is the main contract, `clientContractHash`; a row targets the other by sending its hash.
|
|
67
|
-
- `rows
|
|
67
|
+
- `rows`: as `AvProtocolFixture` describes them. One body is too large to write out (one byte over the 1 MiB request
|
|
68
68
|
limit): its `request.body.content` is a recipe, `{ "prefix": "…", "repeat": "x", "times": 1048567, "suffix": "…" }`,
|
|
69
69
|
standing for `prefix` + `repeat` repeated `times` times + `suffix`. Every other `content` is the body's text.
|
|
70
70
|
|
|
@@ -77,5 +77,6 @@ corpus on Express and Fastify in its own tests. Each package's README ships in i
|
|
|
77
77
|
|
|
78
78
|
## License
|
|
79
79
|
|
|
80
|
-
PolyForm Shield 1.0.0 with an additional permission
|
|
81
|
-
use it to build a product that competes with Aventara itself. See `LICENSE` and
|
|
80
|
+
PolyForm Shield 1.0.0 with an additional permission. It is free to use, including in commercial applications, but you
|
|
81
|
+
may not use it to build a product that competes with Aventara itself. See `LICENSE` and
|
|
82
|
+
`LICENSE-ADDITIONAL-PERMISSION.md`.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AvAdapter, AvAdapterModel } from "@aventara/core";
|
|
2
2
|
/** Builds the Adapter under test; reusable adapter conformance suites take one. */
|
|
3
|
-
export type
|
|
3
|
+
export type AvAdapterFactory<M extends AvAdapterModel = AvAdapterModel> = () => AvAdapter<M> | Promise<AvAdapter<M>>;
|