@aventara/prisma7-adapter 1.0.0-rc.0 → 1.0.0-rc.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +407 -0
  2. package/README.md +351 -320
  3. package/dist/discovery/artifact.loader.d.ts +4 -4
  4. package/dist/discovery/artifact.loader.js +14 -19
  5. package/dist/discovery/capability-surface.interface.d.ts +1 -1
  6. package/dist/discovery/capability.deriver.d.ts +6 -6
  7. package/dist/discovery/capability.deriver.js +3 -3
  8. package/dist/discovery/client-shape.verifier.d.ts +1 -1
  9. package/dist/discovery/client-shape.verifier.js +2 -2
  10. package/dist/discovery/discovery-artifact.interface.d.ts +30 -47
  11. package/dist/discovery/discovery-artifact.interface.js +1 -1
  12. package/dist/discovery/enum.mapper.d.ts +2 -2
  13. package/dist/discovery/field.mapper.d.ts +13 -13
  14. package/dist/discovery/field.mapper.js +10 -10
  15. package/dist/discovery/identifier.mapper.d.ts +7 -7
  16. package/dist/discovery/model.discoverer.d.ts +4 -4
  17. package/dist/discovery/model.discoverer.js +47 -17
  18. package/dist/discovery/operations.deriver.d.ts +6 -6
  19. package/dist/discovery/schema-facts.interface.d.ts +3 -3
  20. package/dist/discovery/schema.reader.d.ts +2 -2
  21. package/dist/discovery/schema.reader.js +5 -5
  22. package/dist/discovery/types.reader.d.ts +2 -2
  23. package/dist/discovery/types.reader.js +22 -22
  24. package/dist/discovery/vocabulary.dictionary.d.ts +14 -14
  25. package/dist/discovery/vocabulary.dictionary.js +1 -1
  26. package/dist/errors/error.normalizer.d.ts +11 -5
  27. package/dist/errors/error.normalizer.js +27 -5
  28. package/dist/errors/prisma-error.reader.d.ts +2 -0
  29. package/dist/errors/prisma-error.reader.js +1 -0
  30. package/dist/execution/first-variant.emulator.d.ts +4 -4
  31. package/dist/execution/first-variant.emulator.js +13 -9
  32. package/dist/execution/operation.executor.d.ts +9 -9
  33. package/dist/execution/operation.executor.js +17 -13
  34. package/dist/execution/result.shaper.d.ts +3 -3
  35. package/dist/execution/result.shaper.js +7 -7
  36. package/dist/execution/sql-statement.executor.d.ts +9 -0
  37. package/dist/execution/sql-statement.executor.js +58 -0
  38. package/dist/execution/transaction.executor.d.ts +8 -8
  39. package/dist/execution/transaction.executor.js +9 -5
  40. package/dist/generate/artifact.emitter.d.ts +5 -7
  41. package/dist/generate/artifact.emitter.js +7 -19
  42. package/dist/generate/discovery.cli.d.ts +3 -3
  43. package/dist/generate/discovery.cli.js +11 -11
  44. package/dist/generate/existence.gate.d.ts +4 -4
  45. package/dist/generate/existence.gate.js +4 -4
  46. package/dist/generate/index.d.ts +5 -5
  47. package/dist/generate/index.js +2 -2
  48. package/dist/generate/prisma.generate.d.ts +7 -8
  49. package/dist/generate/prisma.generate.js +11 -12
  50. package/dist/index.d.ts +4 -4
  51. package/dist/prisma-client.interface.d.ts +22 -8
  52. package/dist/prisma-client.interface.js +7 -0
  53. package/dist/prisma.adapter.d.ts +12 -12
  54. package/dist/prisma.adapter.js +11 -3
  55. package/dist/provider/provider-profile.d.ts +11 -11
  56. package/dist/translation/mutation.translator.d.ts +8 -8
  57. package/dist/translation/mutation.translator.js +30 -30
  58. package/dist/translation/operation.translator.d.ts +7 -7
  59. package/dist/translation/operation.translator.js +12 -12
  60. package/dist/translation/order-pagination.translator.d.ts +5 -5
  61. package/dist/translation/order-pagination.translator.js +16 -16
  62. package/dist/translation/projection.translator.d.ts +4 -4
  63. package/dist/translation/projection.translator.js +11 -11
  64. package/dist/translation/scalar.conversion.d.ts +9 -9
  65. package/dist/translation/scalar.conversion.js +11 -11
  66. package/dist/translation/where.translator.d.ts +5 -5
  67. package/dist/translation/where.translator.js +15 -15
  68. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,412 @@
1
1
  # @aventara/prisma7-adapter
2
2
 
3
+ ## 1.0.0-rc.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 800123b: New: `framework.appTx.$sql`, a developer SQL step in an application transaction. Write it as a tagged template,
8
+ `` framework.appTx.$sql<Row>`select pgmq.send('jobs', jsonb_build_object('postId', ${post.$ref("id")}))` ``, and put it in
9
+ `framework.transaction([...])` beside the other steps. Every interpolated value is a bound parameter, never SQL text:
10
+ strings, numbers, booleans, `bigint`, `null`, `Date`, `Decimal`, bytes, JSON values (bound as JSON text, so cast them
11
+ with `::jsonb`), and a `$ref` to an earlier step's field, read after that step ran. The statement runs in order in the
12
+ same database transaction, so a failure anywhere rolls everything back, and its rows are that step's entry in the
13
+ result, typed `Row[]` (or `unknown[]`). A plain-string call is refused, a later step cannot `$ref` a SQL step's rows,
14
+ and no pipeline runs around it.
15
+
16
+ It is server-side only: `clientTx` has no `$sql`, the ClientContract and its hash are unchanged, and `/_transactions`
17
+ cannot carry one.
18
+
19
+ The Prisma 7 adapter runs it with `$queryRaw` in its tagged form on the transaction client. A raw query's failure is
20
+ `P2010` on Prisma 7.10.0: a uniqueness or foreign-key violation answers `A2008`, anything else `A3001`. The rule is now
21
+ that Aventara never writes raw SQL itself, and developer SQL only goes through this bound template.
22
+
23
+ Adapter authors: an adapter declares `sqlStatements: true`, has an `executeSql` of its own (a plain statement, outside
24
+ any transaction: a stage's `ctx.$sql` there) and gives its transaction executor one too (`AvAdapter.executeSql`,
25
+ `AvAdapterTransactionExecutor`, `AvAdapterSqlStatement` in `@aventara/core/internal`). Without the declaration, a plan
26
+ with a SQL step is refused with `A2002`. The Prisma 7 adapter runs a statement outside a transaction with `$queryRaw`
27
+ on the base client, and declares `sqlStatements` with every driver.
28
+
29
+ - 8bb1d6a: Breaking: public type and class names take the `Av` prefix. Every public type and class is now `Av` plus what
30
+ it is, with a namespace only where the bare name would be ambiguous: configuration types are `AvConfig…`
31
+ (`AvConfig`, `AvConfigLayer`, `AvConfigResource`, …) and the three Contracts are `AvContract…` (`AvContractCore`,
32
+ `AvContractApplication`, `AvContractClient`). Functions keep their names (`createFramework`, `createFakeAdapter`,
33
+ `createPrismaAdapter`, `defineClientConfig`, `env`), and so do the names that already started with `Av`,
34
+ `AventaraModule`, `AventaraModuleOptions` and `AventaraModuleAsyncOptions`. There are no
35
+ aliases: replace each old name with the new one.
36
+
37
+ Three names merged or left:
38
+
39
+ - `PipelineContext` and `ComputeContext` (which was the same type) are one name, `AvContext`. A compute stage
40
+ now gets its own read-only ctx, `AvComputeContext` (see the ctx entry in `@aventara/core`'s changelog).
41
+ - `ComputedRead` is `AvComputeRead`, the one name of a read compute stage: a function, or `{ compute, dependsOn }`.
42
+ `ComputeOnRead`, the bare function type, is no longer exported; `AvComputeRead` accepts the function as it is.
43
+ - `defineFields` and `FrameworkFieldsShape` are removed; `defineResource` replaces them (below).
44
+
45
+ `defineResource` replaces `defineFields`. A Resource's configuration, its root block and its overlay blocks, can
46
+ live in its own module and be spread into each layer's `resources` tree:
47
+
48
+ ```ts
49
+ export const submission = defineResource<Model>()(
50
+ "Submission",
51
+ {
52
+ pipelines: { guards: [signedIn] },
53
+ fields: { title: { pipelines: { pipes: [trim] } } },
54
+ },
55
+ { client: { fields: { title: { pipelines: { validators: [AvZ.maxLength(80)] } } } } },
56
+ );
57
+
58
+ // aventara.config.ts
59
+ resources: { ...submission.root, ...payment.root },
60
+ client: { resources: { ...submission.client } },
61
+ ```
62
+
63
+ It returns `{ root, application?, client? }`, each `{ Submission: block }`; a layer given no block is left out. The
64
+ root block is typed exactly as `resources.Submission` is typed in place: field definitions are checked against what
65
+ the adapter discovered, stages are typed for the Resource, and a key no level admits is a type error at the key.
66
+ Each overlay block is typed as `application.resources.Submission` or `client.resources.Submission` is in place,
67
+ against the root block: it may name a field the root block defines, and a `definition` in it is a type error (and
68
+ `CONFIG_FORBIDDEN_IN_OVERLAY` at startup). Spread, the configuration is the inline one: the same Contracts and
69
+ ClientContract hash. A field `definition` that `defineFields` returned now sits at
70
+ `fields.<field>.definition` inside the block.
71
+
72
+ The generated client's names follow the same rule. Regenerate with `avclient generate`; then rename the
73
+ imports from `AvClient.ts`:
74
+
75
+ | Before | After |
76
+ | ----------------------- | ------------------------- |
77
+ | `AuthError` | `AvAuthError` |
78
+ | `CallOptions` | `AvCallOptions` |
79
+ | `Cause` | `AvCause` |
80
+ | `ConflictError` | `AvConflictError` |
81
+ | `ContractMismatchError` | `AvContractMismatchError` |
82
+ | `Decimal` | `AvDecimal` |
83
+ | `Fetch` | `AvFetch` |
84
+ | `FrameworkError` | `AvError` |
85
+ | `InternalError` | `AvInternalError` |
86
+ | `NotFoundError` | `AvNotFoundError` |
87
+ | `Operation<T>` | `AvOperation<T>` |
88
+ | `OperationCode` | `AvOperationCode` |
89
+ | `ProtocolError` | `AvProtocolError` |
90
+ | `TransportError` | `AvTransportError` |
91
+ | `ValidationCode` | `AvValidationCode` |
92
+ | `ValidationError` | `AvValidationError` |
93
+ | `ValidationIssue` | `AvValidationIssue` |
94
+
95
+ An enum whose name is one of these now walks the rename ladder (`AvDecimal` → `AvDecimalEnum`); an enum named
96
+ `Decimal` is emitted as `Decimal`.
97
+
98
+ `@aventara/core`, every renamed export:
99
+
100
+ | Before | After |
101
+ | ------------------------------------- | ---------------------------------- |
102
+ | `Adapter` | `AvAdapter` |
103
+ | `AdapterDiscoveryDiagnostic` | `AvAdapterDiscoveryDiagnostic` |
104
+ | `AdapterDiscoveryDiagnosticCode` | `AvAdapterDiscoveryDiagnosticCode` |
105
+ | `AdapterModel` | `AvAdapterModel` |
106
+ | `AddedFieldDefinition` | `AvConfigAddedFieldDefinition` |
107
+ | `AfterHook` | `AvAfterHook` |
108
+ | `AnyFrameworkConfig` | `AvConfigAny` |
109
+ | `AnyLayerConfig` | `AvConfigLayerAny` |
110
+ | `AnyResourcesBlock` | `AvConfigResourcesAny` |
111
+ | `ApplicationContract` | `AvContractApplication` |
112
+ | `ApplicationScalarForms` | `AvApplicationScalarForms` |
113
+ | `BeforeHook` | `AvBeforeHook` |
114
+ | `BuiltInScalar` | `AvBuiltInScalar` |
115
+ | `Cause` | `AvCause` |
116
+ | `ClientContract` | `AvContractClient` |
117
+ | `ClientContractProtocol` | `AvContractClientProtocol` |
118
+ | `ComputedRead` | `AvComputeRead` |
119
+ | `ComputeOnCreate` | `AvComputeCreate` |
120
+ | `ComputeOnUpdate` | `AvComputeUpdate` |
121
+ | `ConfigDiagnostic` | `AvConfigDiagnostic` |
122
+ | `ConfigDiagnosticCode` | `AvConfigDiagnosticCode` |
123
+ | `ConfigFieldKey` | `AvConfigFieldKey` |
124
+ | `ConfigLayer` | `AvConfigLayerName` |
125
+ | `Contract` | `AvContract` |
126
+ | `ContractCompilerDiagnostic` | `AvContractCompilerDiagnostic` |
127
+ | `ContractCompilerDiagnosticCode` | `AvContractCompilerDiagnosticCode` |
128
+ | `ContractHash` | `AvContractHash` |
129
+ | `ContractLimits` | `AvContractLimits` |
130
+ | `ContractProtocol` | `AvContractProtocol` |
131
+ | `CoreContract` | `AvContractCore` |
132
+ | `CreateDataInput` | `AvCreateDataInput` |
133
+ | `CursorInput` | `AvCursorInput` |
134
+ | `Decimal` | `AvDecimal` |
135
+ | `DeferredOperationCall` | `AvDeferredOperationCall` |
136
+ | `EffectiveFieldKey` | `AvEffectiveFieldKey` |
137
+ | `EnumDefinition` | `AvEnumDefinition` |
138
+ | `ExactFrameworkConfig` | `AvConfigExact` |
139
+ | `ExecutionOptions` | `AvExecutionOptions` |
140
+ | `Field` | `AvField` |
141
+ | `FieldComputeConfig` | `AvFieldCompute` |
142
+ | `FieldKey` | `AvFieldKey` |
143
+ | `FieldPipe` | `AvFieldPipe` |
144
+ | `FieldWriteGuard` | `AvFieldGuard` |
145
+ | `Filter` | `AvFilter` |
146
+ | `Framework` | `AvFramework` |
147
+ | `FrameworkConfig` | `AvConfig` |
148
+ | `FrameworkConstructionDiagnostic` | `AvConstructionDiagnostic` |
149
+ | `FrameworkConstructionError` | `AvConstructionError` |
150
+ | `FrameworkConstructionStage` | `AvConstructionStage` |
151
+ | `FrameworkContracts` | `AvContracts` |
152
+ | `FrameworkDiagnostic` | `AvDiagnostic` |
153
+ | `FrameworkDiagnosticsSink` | `AvDiagnosticsSink` |
154
+ | `FrameworkError` | `AvError` |
155
+ | `FrameworkExemptionsConfig` | `AvConfigExemptions` |
156
+ | `FrameworkFamilyConfig` | `AvConfigFamily` |
157
+ | `FrameworkFieldDefinition` | `AvConfigFieldDefinition` |
158
+ | `FrameworkFieldLifecycleTrait` | `AvConfigFieldLifecycleTrait` |
159
+ | `FrameworkLayerConfig` | `AvConfigLayer` |
160
+ | `FrameworkLayerKind` | `AvConfigLayerKind` |
161
+ | `FrameworkLimitsConfig` | `AvConfigLimits` |
162
+ | `FrameworkMisuseEvent` | `AvMisuseEvent` |
163
+ | `FrameworkMisuseSink` | `AvMisuseSink` |
164
+ | `FrameworkOperationsConfig` | `AvConfigOperations` |
165
+ | `FrameworkOperationsExemption` | `AvConfigOperationsExemption` |
166
+ | `FrameworkOverlayFieldConfig` | `AvConfigOverlayField` |
167
+ | `FrameworkRelationFieldExemption` | `AvConfigRelationFieldExemption` |
168
+ | `FrameworkResourceConfig` | `AvConfigResource` |
169
+ | `FrameworkResourceExemption` | `AvConfigResourceExemption` |
170
+ | `FrameworkResourceFieldsConfig` | `AvConfigResourceFields` |
171
+ | `FrameworkResourceKey` | `AvConfigResourceKey` |
172
+ | `FrameworkResourcesConfig` | `AvConfigResources` |
173
+ | `FrameworkResourceTransactionsConfig` | `AvConfigResourceTransactions` |
174
+ | `FrameworkRootFieldConfig` | `AvConfigRootField` |
175
+ | `FrameworkScalarFieldExemption` | `AvConfigScalarFieldExemption` |
176
+ | `FrameworkScalarTypeRef` | `AvConfigScalarTypeRef` |
177
+ | `FrameworkVariantConfig` | `AvConfigVariant` |
178
+ | `Guard` | `AvGuard` |
179
+ | `Identifier` | `AvIdentifier` |
180
+ | `IncludeInput` | `AvIncludeInput` |
181
+ | `Interceptor` | `AvInterceptor` |
182
+ | `JsonValue` | `AvJsonValue` |
183
+ | `KnownFieldDefinition` | `AvConfigKnownFieldDefinition` |
184
+ | `LifecycleTrait` | `AvLifecycleTrait` |
185
+ | `NullsOrder` | `AvNullsOrder` |
186
+ | `Operation` | `AvOperation` |
187
+ | `OperationArgumentMap` | `AvOperationArgumentMap` |
188
+ | `OperationArgumentsFor` | `AvOperationArgumentsFor` |
189
+ | `OperationAvailability` | `AvOperationAvailability` |
190
+ | `OperationCall` | `AvOperationCall` |
191
+ | `OperationCode` | `AvOperationCode` |
192
+ | `OperationDiagnostic` | `AvOperationDiagnostic` |
193
+ | `OperationErrorCode` | `AvOperationErrorCode` |
194
+ | `OperationFailureResponse` | `AvOperationFailureResponse` |
195
+ | `OperationFamily` | `AvOperationFamily` |
196
+ | `OperationGrammar` | `AvOperationGrammar` |
197
+ | `OperationIdentity` | `AvOperationIdentity` |
198
+ | `OperationNoMatchResponse` | `AvOperationNoMatchResponse` |
199
+ | `OperationReferenceSurface` | `AvOperationReferenceSurface` |
200
+ | `OperationResponse` | `AvOperationResponse` |
201
+ | `OperationResultFor` | `AvOperationResultFor` |
202
+ | `OperationSlot` | `AvOperationSlot` |
203
+ | `OperationSuccessCode` | `AvOperationSuccessCode` |
204
+ | `OperationSuccessDataCode` | `AvOperationSuccessDataCode` |
205
+ | `OperationSuccessResponse` | `AvOperationSuccessResponse` |
206
+ | `OperationVariant` | `AvOperationVariant` |
207
+ | `OperationVariantScopes` | `AvOperationVariantScopes` |
208
+ | `OrderByEntry` | `AvOrderByEntry` |
209
+ | `OrderByInput` | `AvOrderByInput` |
210
+ | `PaginationCapability` | `AvPaginationCapability` |
211
+ | `Pipe` | `AvPipe` |
212
+ | `PipelineConfig` | `AvPipeline` |
213
+ | `PipelineContext` | `AvContext` |
214
+ | `PipelineTransportContext` | `AvTransportContext` |
215
+ | `ProjectionEntry` | `AvProjectionEntry` |
216
+ | `ProjectionScope` | `AvProjectionScope` |
217
+ | `ProjectionScopes` | `AvProjectionScopes` |
218
+ | `ReferenceableField` | `AvReferenceableField` |
219
+ | `ReferenceBuilder` | `AvReferenceBuilder` |
220
+ | `RelationField` | `AvRelationField` |
221
+ | `RelationFieldCapabilities` | `AvRelationFieldCapabilities` |
222
+ | `RelationFieldCapabilityName` | `AvRelationFieldCapabilityName` |
223
+ | `RelationFieldPipelineConfig` | `AvRelationFieldPipeline` |
224
+ | `RelationFilterCapability` | `AvRelationFilterCapability` |
225
+ | `RelationMutationCapability` | `AvRelationMutationCapability` |
226
+ | `RelationMutationDirective` | `AvRelationMutationDirective` |
227
+ | `RelationProjectionCapability` | `AvRelationProjectionCapability` |
228
+ | `RelationProjectionInput` | `AvRelationProjectionInput` |
229
+ | `RelationReducer` | `AvRelationReducer` |
230
+ | `RelationReducerCapability` | `AvRelationReducerCapability` |
231
+ | `RequestOrigin` | `AvRequestOrigin` |
232
+ | `Resource` | `AvResource` |
233
+ | `ResourceFieldMap` | `AvResourceFieldMap` |
234
+ | `ResourceKey` | `AvResourceKey` |
235
+ | `ResourceOperations` | `AvResourceOperations` |
236
+ | `ScalarDefinition` | `AvScalarDefinition` |
237
+ | `ScalarField` | `AvScalarField` |
238
+ | `ScalarFieldCapabilities` | `AvScalarFieldCapabilities` |
239
+ | `ScalarFieldCapabilityName` | `AvScalarFieldCapabilityName` |
240
+ | `ScalarFieldKey` | `AvScalarFieldKey` |
241
+ | `ScalarFieldPipelineConfig` | `AvScalarFieldPipeline` |
242
+ | `ScalarFilterOperator` | `AvScalarFilterOperator` |
243
+ | `ScalarFormat` | `AvScalarFormat` |
244
+ | `ScalarMutationDirective` | `AvScalarMutationDirective` |
245
+ | `ScalarOrderInput` | `AvScalarOrderInput` |
246
+ | `ScalarRegistry` | `AvScalarRegistry` |
247
+ | `ScalarValueType` | `AvScalarValueType` |
248
+ | `ScopedRelationMutations` | `AvScopedRelationMutations` |
249
+ | `ScopedRelationReducers` | `AvScopedRelationReducers` |
250
+ | `SelectInput` | `AvSelectInput` |
251
+ | `SingleRowResult` | `AvSingleRowResult` |
252
+ | `SortDirection` | `AvSortDirection` |
253
+ | `TransactionAfterHook` | `AvTransactionAfterHook` |
254
+ | `TransactionBeforeHook` | `AvTransactionBeforeHook` |
255
+ | `TransactionCapability` | `AvTransactionCapability` |
256
+ | `TransactionCommittedResponse` | `AvTransactionCommittedResponse` |
257
+ | `TransactionDiagnostic` | `AvTransactionDiagnostic` |
258
+ | `TransactionFilter` | `AvTransactionFilter` |
259
+ | `TransactionGuard` | `AvTransactionGuard` |
260
+ | `TransactionIntegrityError` | `AvTransactionIntegrityError` |
261
+ | `TransactionIntegrityViolation` | `AvTransactionIntegrityViolation` |
262
+ | `TransactionInterceptor` | `AvTransactionInterceptor` |
263
+ | `TransactionPipe` | `AvTransactionPipe` |
264
+ | `TransactionPipelineConfig` | `AvTransactionPipeline` |
265
+ | `TransactionPipelineContext` | `AvTransactionContext` |
266
+ | `TransactionReference` | `AvTransactionReference` |
267
+ | `TransactionResponse` | `AvTransactionResponse` |
268
+ | `TransactionResults` | `AvTransactionResults` |
269
+ | `TransactionRunner` | `AvTransactionRunner` |
270
+ | `TransactionSlotPathError` | `AvTransactionSlotPathError` |
271
+ | `TransactionSlotPathViolation` | `AvTransactionSlotPathViolation` |
272
+ | `UniqueWhereInput` | `AvUniqueWhereInput` |
273
+ | `UpdateDataInput` | `AvUpdateDataInput` |
274
+ | `ValidationCode` | `AvValidationCode` |
275
+ | `ValidationIssue` | `AvValidationIssue` |
276
+ | `WhereInput` | `AvWhereInput` |
277
+ | `WireScalarForms` | `AvWireScalarForms` |
278
+ | `WriteScope` | `AvWriteScope` |
279
+ | `WriteScopes` | `AvWriteScopes` |
280
+
281
+ Error classes whose `name` a log or a test may read:
282
+
283
+ | Before | After |
284
+ | ------------------------ | -------------------------- |
285
+ | `CallerDataError` | `AvCallerDataError` |
286
+ | `ClientConfigError` | `AvClientConfigError` |
287
+ | `ComputedValueError` | `AvComputedValueError` |
288
+ | `ContractProtocolError` | `AvContractProtocolError` |
289
+ | `ContractTransportError` | `AvContractTransportError` |
290
+ | `EnvFileError` | `AvEnvFileError` |
291
+ | `OutputValidationError` | `AvOutputValidationError` |
292
+ | `OutputWriteError` | `AvOutputWriteError` |
293
+ | `PipeOutputError` | `AvPipeOutputError` |
294
+ | `UnmountedRouteError` | `AvUnmountedRouteError` |
295
+
296
+ `@aventara/testing`:
297
+
298
+ | Before | After |
299
+ | ------------------------ | -------------------------- |
300
+ | `AdapterFactory` | `AvAdapterFactory` |
301
+ | `FakeAdapter` | `AvFakeAdapter` |
302
+ | `FakeAdapterExecute` | `AvFakeAdapterExecute` |
303
+ | `FakeAdapterOptions` | `AvFakeAdapterOptions` |
304
+ | `FakeAdapterRollback` | `AvFakeAdapterRollback` |
305
+ | `FakeTransactionOutcome` | `AvFakeTransactionOutcome` |
306
+ | `FakeTransactionTrace` | `AvFakeTransactionTrace` |
307
+
308
+ `@aventara/client` (the `framework.client.ts` config types):
309
+
310
+ | Before | After |
311
+ | ------------------- | --------------------- |
312
+ | `ClientConfigInput` | `AvClientConfigInput` |
313
+ | `ConfigValue` | `AvClientConfigValue` |
314
+ | `EnvReference` | `AvEnvReference` |
315
+
316
+ `@aventara/prisma7-adapter`: its public types and error classes (`createPrismaAdapter` keeps its name):
317
+
318
+ | Before | After |
319
+ | ---------------------------------- | ------------------------------------ |
320
+ | `PrismaAdapterModel` | `AvPrismaAdapterModel` |
321
+ | `PrismaAdapterOptions` | `AvPrismaAdapterOptions` |
322
+ | `PrismaDelegate` | `AvPrismaDelegate` |
323
+ | `PrismaDelegateHost` | `AvPrismaDelegateHost` |
324
+ | `PrismaDelegateIndex` | `AvPrismaDelegateIndex` |
325
+ | `PrismaDiscoveryArtifact` | `AvPrismaDiscoveryArtifact` |
326
+ | `PrismaDriver` | `AvPrismaDriver` |
327
+ | `PrismaIsolationLevel` | `AvPrismaIsolationLevel` |
328
+ | `PrismaProvider` | `AvPrismaProvider` |
329
+ | `PrismaProviderProfile` | `AvPrismaProviderProfile` |
330
+ | `PrismaReferentialAction` | `AvPrismaReferentialAction` |
331
+ | `PrismaReferentialActionTable` | `AvPrismaReferentialActionTable` |
332
+ | `PrismaReferentialEdge` | `AvPrismaReferentialEdge` |
333
+ | `PrismaResourceReferentialActions` | `AvPrismaResourceReferentialActions` |
334
+ | `PrismaTransactionOptions` | `AvPrismaTransactionOptions` |
335
+ | `PrismaCapabilityDerivationError` | `AvPrismaCapabilityDerivationError` |
336
+ | `PrismaDiscoveryArtifactError` | `AvPrismaDiscoveryArtifactError` |
337
+ | `PrismaEmulationError` | `AvPrismaEmulationError` |
338
+ | `PrismaExecutionError` | `AvPrismaExecutionError` |
339
+ | `PrismaExistenceGateError` | `AvPrismaExistenceGateError` |
340
+ | `PrismaFieldProjectionError` | `AvPrismaFieldProjectionError` |
341
+ | `PrismaGenerateCliError` | `AvPrismaGenerateCliError` |
342
+ | `PrismaGenerateStepError` | `AvPrismaGenerateStepError` |
343
+ | `PrismaModelCompositionError` | `AvPrismaModelCompositionError` |
344
+ | `PrismaMutationTranslationError` | `AvPrismaMutationTranslationError` |
345
+ | `PrismaOperationTranslationError` | `AvPrismaOperationTranslationError` |
346
+ | `PrismaOrderTranslationError` | `AvPrismaOrderTranslationError` |
347
+ | `PrismaProjectionTranslationError` | `AvPrismaProjectionTranslationError` |
348
+ | `PrismaResultShapeError` | `AvPrismaResultShapeError` |
349
+ | `PrismaScalarConversionError` | `AvPrismaScalarConversionError` |
350
+ | `PrismaSchemaReaderError` | `AvPrismaSchemaReaderError` |
351
+ | `PrismaTypesReaderError` | `AvPrismaTypesReaderError` |
352
+ | `PrismaWhereTranslationError` | `AvPrismaWhereTranslationError` |
353
+
354
+ - 9c52482: A `$connect` to a row that does not exist now answers `404 A2003` (not found), the same as reading a missing row.
355
+ Before, it answered `422 A2004`. This covers a to-one `$connect` in `create`, `update` and `upsert`, a to-many
356
+ `$connect`, and the same writes inside a transaction plan, where `cause.operation` names the step. The message is
357
+ unchanged: "The operation's arguments referenced a record that does not exist." On `update.first`, the same mistake
358
+ answered `A2014` before, as if the row had changed underneath; it now answers `A2003` too, and a duplicate unique value
359
+ written through `update.first` answers `409 A2008` instead of `A3001`.
360
+
361
+ Clearer top-level messages for an unknown Resource or operation. `A2001` now says "The requested Resource is not
362
+ available." and `A2002` says "The requested operation is not available on this Resource.", instead of "Operation
363
+ arguments failed framework validation.", which stays the message of `A2004`, `A2007` and `A2009`. A transaction step
364
+ whose operation is outside the standard grammar now carries the same issue message as a single call, naming the
365
+ operation and the Resource (for example `Operation "dance.one" is not available on Resource "posts".`), instead of
366
+ "Operation is not part of the standard operation grammar."
367
+
368
+ A `$ref` with no `fingerprint` is `V1000` (required value missing) and answers `422 A2004`. Before, it was `V1017`
369
+ (fingerprint mismatch) under `A2007`. A fingerprint that is present but wrong is still `V1017`.
370
+
371
+ `aventara init` and `aventara new` link to the documentation at https://aventara-framework.vercel.app. The old
372
+ address redirects, so links already written into projects keep working.
373
+
374
+ - 916e5f6: A stage's `ctx.$sql` outside a transaction is a plain statement: the adapter runs it with `$queryRaw` in its
375
+ tagged form on the base client, with no `BEGIN` around it. Inside a transaction it still runs on the transaction
376
+ client. The adapter now declares `sqlStatements` with every driver, `@prisma/adapter-d1` included: there, with no
377
+ interactive transaction, `ctx.$sql` runs as a plain statement, and a transaction plan stays unavailable. In-process calls
378
+ (`framework.application`, `framework.client`, `framework.transaction`) now resolve data and throw `AvError`
379
+ subclasses (see `@aventara/core`).
380
+
381
+ - Breaking: the discovery artifact states each Resource's create requirements on its model
382
+ (`model.resources.<R>.createRequirements`): `required` columns, `oneOf` required relations with the fields holding
383
+ their reference, and `parentSupplies` for nested creates. The separate `createRequirements` table beside the model is
384
+ removed, and the artifact format is now 3: regenerate the artifact with `npm run aventara:prepare` (or
385
+ `aventara-prisma7-generate`). The model, and so `modelHash` and the Client Contract's hash, change for every schema
386
+ with a required column or relation. Required create fields are now typed in every create call (see
387
+ `@aventara/core`).
388
+
389
+ - Updated dependencies [800123b]
390
+ - Updated dependencies [8bb1d6a]
391
+ - Updated dependencies [68d4395]
392
+ - Updated dependencies [7e3d06f]
393
+ - Updated dependencies [1b5d3c0]
394
+ - Updated dependencies [6317811]
395
+ - Updated dependencies [6d0e5d6]
396
+ - Updated dependencies [7a0cab9]
397
+ - Updated dependencies [eb2a718]
398
+ - Updated dependencies [03312c5]
399
+ - Updated dependencies [123f6dc]
400
+ - Updated dependencies [b65df2e]
401
+ - Updated dependencies [c6e5010]
402
+ - Updated dependencies [c1f9389]
403
+ - Updated dependencies [9c52482]
404
+ - Updated dependencies [8396148]
405
+ - Updated dependencies [e8fbb02]
406
+ - Updated dependencies [916e5f6]
407
+ - Updated dependencies [6cbd158]
408
+ - @aventara/core@1.0.0-rc.1
409
+
3
410
  ## 1.0.0-rc.0
4
411
 
5
412
  ### Major Changes