@aventara/client 0.1.0-pilot.4 → 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 (65) hide show
  1. package/CHANGELOG.md +679 -0
  2. package/README.md +168 -132
  3. package/dist/cli/command.parser.d.ts +6 -4
  4. package/dist/cli/command.parser.js +22 -11
  5. package/dist/cli/generate.command.d.ts +6 -1
  6. package/dist/cli/generate.command.js +12 -1
  7. package/dist/cli/generation-failure.renderer.js +24 -24
  8. package/dist/cli/step.reporter.d.ts +31 -0
  9. package/dist/cli/step.reporter.js +87 -0
  10. package/dist/cli.js +2 -0
  11. package/dist/config/client-config.interface.d.ts +7 -7
  12. package/dist/config/config.loader.d.ts +4 -4
  13. package/dist/config/config.loader.js +7 -7
  14. package/dist/config/config.resolver.d.ts +7 -7
  15. package/dist/config/config.resolver.js +12 -12
  16. package/dist/config/env.cascade.d.ts +2 -2
  17. package/dist/config/env.cascade.js +4 -4
  18. package/dist/config/module-style.resolver.d.ts +1 -1
  19. package/dist/config/module-style.resolver.js +2 -2
  20. package/dist/config/tsconfig.locator.d.ts +1 -1
  21. package/dist/config/tsconfig.locator.js +2 -2
  22. package/dist/contract/contract.acceptance.d.ts +4 -4
  23. package/dist/contract/contract.acceptance.js +4 -4
  24. package/dist/contract/contract.fetcher.d.ts +3 -3
  25. package/dist/contract/contract.fetcher.js +6 -6
  26. package/dist/contract/contract.loader.d.ts +6 -6
  27. package/dist/contract/contract.loader.js +2 -2
  28. package/dist/emit/client-surface.emitter.d.ts +2 -2
  29. package/dist/emit/client-surface.emitter.js +77 -43
  30. package/dist/emit/client-tree.emitter.d.ts +3 -3
  31. package/dist/emit/client-tree.emitter.js +8 -5
  32. package/dist/emit/contract-carrier.emitter.d.ts +3 -3
  33. package/dist/emit/contract-carrier.emitter.js +1 -1
  34. package/dist/emit/derivation.emitter.js +1 -0
  35. package/dist/emit/descriptor.emitter.d.ts +2 -2
  36. package/dist/emit/descriptor.emitter.js +2 -2
  37. package/dist/emit/emitted-tree.interface.d.ts +1 -1
  38. package/dist/emit/enum.emitter.d.ts +2 -2
  39. package/dist/emit/field-check.emitter.d.ts +21 -0
  40. package/dist/emit/field-check.emitter.js +603 -0
  41. package/dist/emit/json-shape.emitter.d.ts +16 -0
  42. package/dist/emit/json-shape.emitter.js +88 -0
  43. package/dist/emit/name.deriver.d.ts +6 -6
  44. package/dist/emit/name.deriver.js +15 -15
  45. package/dist/emit/named-type.emitter.d.ts +2 -2
  46. package/dist/emit/runtime.emitter.d.ts +2 -2
  47. package/dist/emit/runtime.emitter.js +117 -112
  48. package/dist/emit/scalar.codec.d.ts +1 -1
  49. package/dist/emit/scalar.codec.js +78 -35
  50. package/dist/emit/transaction.emitter.js +131 -83
  51. package/dist/generate.d.ts +11 -3
  52. package/dist/generate.js +40 -26
  53. package/dist/index.d.ts +1 -1
  54. package/dist/init/client-init.errors.d.ts +4 -4
  55. package/dist/init/client-init.errors.js +4 -4
  56. package/dist/init/client-init.orchestrator.js +37 -22
  57. package/dist/init/client-init.questions.d.ts +5 -5
  58. package/dist/init/client-init.questions.js +10 -10
  59. package/dist/init/client-project.inspector.d.ts +2 -2
  60. package/dist/init/client-project.inspector.js +3 -3
  61. package/dist/init/command.runner.d.ts +2 -0
  62. package/dist/init/command.runner.js +4 -1
  63. package/dist/output/output.writer.d.ts +5 -5
  64. package/dist/output/output.writer.js +12 -12
  65. package/package.json +6 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,679 @@
1
+ # @aventara/client
2
+
3
+ ## 1.0.0-rc.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8bb1d6a: Breaking: public type and class names take the `Av` prefix. Every public type and class is now `Av` plus what
8
+ it is, with a namespace only where the bare name would be ambiguous: configuration types are `AvConfig…`
9
+ (`AvConfig`, `AvConfigLayer`, `AvConfigResource`, …) and the three Contracts are `AvContract…` (`AvContractCore`,
10
+ `AvContractApplication`, `AvContractClient`). Functions keep their names (`createFramework`, `createFakeAdapter`,
11
+ `createPrismaAdapter`, `defineClientConfig`, `env`), and so do the names that already started with `Av`,
12
+ `AventaraModule`, `AventaraModuleOptions` and `AventaraModuleAsyncOptions`. There are no
13
+ aliases: replace each old name with the new one.
14
+
15
+ Three names merged or left:
16
+
17
+ - `PipelineContext` and `ComputeContext` (which was the same type) are one name, `AvContext`. A compute stage
18
+ now gets its own read-only ctx, `AvComputeContext` (see the ctx entry in `@aventara/core`'s changelog).
19
+ - `ComputedRead` is `AvComputeRead`, the one name of a read compute stage: a function, or `{ compute, dependsOn }`.
20
+ `ComputeOnRead`, the bare function type, is no longer exported; `AvComputeRead` accepts the function as it is.
21
+ - `defineFields` and `FrameworkFieldsShape` are removed; `defineResource` replaces them (below).
22
+
23
+ `defineResource` replaces `defineFields`. A Resource's configuration, its root block and its overlay blocks, can
24
+ live in its own module and be spread into each layer's `resources` tree:
25
+
26
+ ```ts
27
+ export const submission = defineResource<Model>()(
28
+ "Submission",
29
+ {
30
+ pipelines: { guards: [signedIn] },
31
+ fields: { title: { pipelines: { pipes: [trim] } } },
32
+ },
33
+ { client: { fields: { title: { pipelines: { validators: [AvZ.maxLength(80)] } } } } },
34
+ );
35
+
36
+ // aventara.config.ts
37
+ resources: { ...submission.root, ...payment.root },
38
+ client: { resources: { ...submission.client } },
39
+ ```
40
+
41
+ It returns `{ root, application?, client? }`, each `{ Submission: block }`; a layer given no block is left out. The
42
+ root block is typed exactly as `resources.Submission` is typed in place: field definitions are checked against what
43
+ the adapter discovered, stages are typed for the Resource, and a key no level admits is a type error at the key.
44
+ Each overlay block is typed as `application.resources.Submission` or `client.resources.Submission` is in place,
45
+ against the root block: it may name a field the root block defines, and a `definition` in it is a type error (and
46
+ `CONFIG_FORBIDDEN_IN_OVERLAY` at startup). Spread, the configuration is the inline one: the same Contracts and
47
+ ClientContract hash. A field `definition` that `defineFields` returned now sits at
48
+ `fields.<field>.definition` inside the block.
49
+
50
+ The generated client's names follow the same rule. Regenerate with `avclient generate`; then rename the
51
+ imports from `AvClient.ts`:
52
+
53
+ | Before | After |
54
+ | ----------------------- | ------------------------- |
55
+ | `AuthError` | `AvAuthError` |
56
+ | `CallOptions` | `AvCallOptions` |
57
+ | `Cause` | `AvCause` |
58
+ | `ConflictError` | `AvConflictError` |
59
+ | `ContractMismatchError` | `AvContractMismatchError` |
60
+ | `Decimal` | `AvDecimal` |
61
+ | `Fetch` | `AvFetch` |
62
+ | `FrameworkError` | `AvError` |
63
+ | `InternalError` | `AvInternalError` |
64
+ | `NotFoundError` | `AvNotFoundError` |
65
+ | `Operation<T>` | `AvOperation<T>` |
66
+ | `OperationCode` | `AvOperationCode` |
67
+ | `ProtocolError` | `AvProtocolError` |
68
+ | `TransportError` | `AvTransportError` |
69
+ | `ValidationCode` | `AvValidationCode` |
70
+ | `ValidationError` | `AvValidationError` |
71
+ | `ValidationIssue` | `AvValidationIssue` |
72
+
73
+ An enum whose name is one of these now walks the rename ladder (`AvDecimal` → `AvDecimalEnum`); an enum named
74
+ `Decimal` is emitted as `Decimal`.
75
+
76
+ `@aventara/core`, every renamed export:
77
+
78
+ | Before | After |
79
+ | ------------------------------------- | ---------------------------------- |
80
+ | `Adapter` | `AvAdapter` |
81
+ | `AdapterDiscoveryDiagnostic` | `AvAdapterDiscoveryDiagnostic` |
82
+ | `AdapterDiscoveryDiagnosticCode` | `AvAdapterDiscoveryDiagnosticCode` |
83
+ | `AdapterModel` | `AvAdapterModel` |
84
+ | `AddedFieldDefinition` | `AvConfigAddedFieldDefinition` |
85
+ | `AfterHook` | `AvAfterHook` |
86
+ | `AnyFrameworkConfig` | `AvConfigAny` |
87
+ | `AnyLayerConfig` | `AvConfigLayerAny` |
88
+ | `AnyResourcesBlock` | `AvConfigResourcesAny` |
89
+ | `ApplicationContract` | `AvContractApplication` |
90
+ | `ApplicationScalarForms` | `AvApplicationScalarForms` |
91
+ | `BeforeHook` | `AvBeforeHook` |
92
+ | `BuiltInScalar` | `AvBuiltInScalar` |
93
+ | `Cause` | `AvCause` |
94
+ | `ClientContract` | `AvContractClient` |
95
+ | `ClientContractProtocol` | `AvContractClientProtocol` |
96
+ | `ComputedRead` | `AvComputeRead` |
97
+ | `ComputeOnCreate` | `AvComputeCreate` |
98
+ | `ComputeOnUpdate` | `AvComputeUpdate` |
99
+ | `ConfigDiagnostic` | `AvConfigDiagnostic` |
100
+ | `ConfigDiagnosticCode` | `AvConfigDiagnosticCode` |
101
+ | `ConfigFieldKey` | `AvConfigFieldKey` |
102
+ | `ConfigLayer` | `AvConfigLayerName` |
103
+ | `Contract` | `AvContract` |
104
+ | `ContractCompilerDiagnostic` | `AvContractCompilerDiagnostic` |
105
+ | `ContractCompilerDiagnosticCode` | `AvContractCompilerDiagnosticCode` |
106
+ | `ContractHash` | `AvContractHash` |
107
+ | `ContractLimits` | `AvContractLimits` |
108
+ | `ContractProtocol` | `AvContractProtocol` |
109
+ | `CoreContract` | `AvContractCore` |
110
+ | `CreateDataInput` | `AvCreateDataInput` |
111
+ | `CursorInput` | `AvCursorInput` |
112
+ | `Decimal` | `AvDecimal` |
113
+ | `DeferredOperationCall` | `AvDeferredOperationCall` |
114
+ | `EffectiveFieldKey` | `AvEffectiveFieldKey` |
115
+ | `EnumDefinition` | `AvEnumDefinition` |
116
+ | `ExactFrameworkConfig` | `AvConfigExact` |
117
+ | `ExecutionOptions` | `AvExecutionOptions` |
118
+ | `Field` | `AvField` |
119
+ | `FieldComputeConfig` | `AvFieldCompute` |
120
+ | `FieldKey` | `AvFieldKey` |
121
+ | `FieldPipe` | `AvFieldPipe` |
122
+ | `FieldWriteGuard` | `AvFieldGuard` |
123
+ | `Filter` | `AvFilter` |
124
+ | `Framework` | `AvFramework` |
125
+ | `FrameworkConfig` | `AvConfig` |
126
+ | `FrameworkConstructionDiagnostic` | `AvConstructionDiagnostic` |
127
+ | `FrameworkConstructionError` | `AvConstructionError` |
128
+ | `FrameworkConstructionStage` | `AvConstructionStage` |
129
+ | `FrameworkContracts` | `AvContracts` |
130
+ | `FrameworkDiagnostic` | `AvDiagnostic` |
131
+ | `FrameworkDiagnosticsSink` | `AvDiagnosticsSink` |
132
+ | `FrameworkError` | `AvError` |
133
+ | `FrameworkExemptionsConfig` | `AvConfigExemptions` |
134
+ | `FrameworkFamilyConfig` | `AvConfigFamily` |
135
+ | `FrameworkFieldDefinition` | `AvConfigFieldDefinition` |
136
+ | `FrameworkFieldLifecycleTrait` | `AvConfigFieldLifecycleTrait` |
137
+ | `FrameworkLayerConfig` | `AvConfigLayer` |
138
+ | `FrameworkLayerKind` | `AvConfigLayerKind` |
139
+ | `FrameworkLimitsConfig` | `AvConfigLimits` |
140
+ | `FrameworkMisuseEvent` | `AvMisuseEvent` |
141
+ | `FrameworkMisuseSink` | `AvMisuseSink` |
142
+ | `FrameworkOperationsConfig` | `AvConfigOperations` |
143
+ | `FrameworkOperationsExemption` | `AvConfigOperationsExemption` |
144
+ | `FrameworkOverlayFieldConfig` | `AvConfigOverlayField` |
145
+ | `FrameworkRelationFieldExemption` | `AvConfigRelationFieldExemption` |
146
+ | `FrameworkResourceConfig` | `AvConfigResource` |
147
+ | `FrameworkResourceExemption` | `AvConfigResourceExemption` |
148
+ | `FrameworkResourceFieldsConfig` | `AvConfigResourceFields` |
149
+ | `FrameworkResourceKey` | `AvConfigResourceKey` |
150
+ | `FrameworkResourcesConfig` | `AvConfigResources` |
151
+ | `FrameworkResourceTransactionsConfig` | `AvConfigResourceTransactions` |
152
+ | `FrameworkRootFieldConfig` | `AvConfigRootField` |
153
+ | `FrameworkScalarFieldExemption` | `AvConfigScalarFieldExemption` |
154
+ | `FrameworkScalarTypeRef` | `AvConfigScalarTypeRef` |
155
+ | `FrameworkVariantConfig` | `AvConfigVariant` |
156
+ | `Guard` | `AvGuard` |
157
+ | `Identifier` | `AvIdentifier` |
158
+ | `IncludeInput` | `AvIncludeInput` |
159
+ | `Interceptor` | `AvInterceptor` |
160
+ | `JsonValue` | `AvJsonValue` |
161
+ | `KnownFieldDefinition` | `AvConfigKnownFieldDefinition` |
162
+ | `LifecycleTrait` | `AvLifecycleTrait` |
163
+ | `NullsOrder` | `AvNullsOrder` |
164
+ | `Operation` | `AvOperation` |
165
+ | `OperationArgumentMap` | `AvOperationArgumentMap` |
166
+ | `OperationArgumentsFor` | `AvOperationArgumentsFor` |
167
+ | `OperationAvailability` | `AvOperationAvailability` |
168
+ | `OperationCall` | `AvOperationCall` |
169
+ | `OperationCode` | `AvOperationCode` |
170
+ | `OperationDiagnostic` | `AvOperationDiagnostic` |
171
+ | `OperationErrorCode` | `AvOperationErrorCode` |
172
+ | `OperationFailureResponse` | `AvOperationFailureResponse` |
173
+ | `OperationFamily` | `AvOperationFamily` |
174
+ | `OperationGrammar` | `AvOperationGrammar` |
175
+ | `OperationIdentity` | `AvOperationIdentity` |
176
+ | `OperationNoMatchResponse` | `AvOperationNoMatchResponse` |
177
+ | `OperationReferenceSurface` | `AvOperationReferenceSurface` |
178
+ | `OperationResponse` | `AvOperationResponse` |
179
+ | `OperationResultFor` | `AvOperationResultFor` |
180
+ | `OperationSlot` | `AvOperationSlot` |
181
+ | `OperationSuccessCode` | `AvOperationSuccessCode` |
182
+ | `OperationSuccessDataCode` | `AvOperationSuccessDataCode` |
183
+ | `OperationSuccessResponse` | `AvOperationSuccessResponse` |
184
+ | `OperationVariant` | `AvOperationVariant` |
185
+ | `OperationVariantScopes` | `AvOperationVariantScopes` |
186
+ | `OrderByEntry` | `AvOrderByEntry` |
187
+ | `OrderByInput` | `AvOrderByInput` |
188
+ | `PaginationCapability` | `AvPaginationCapability` |
189
+ | `Pipe` | `AvPipe` |
190
+ | `PipelineConfig` | `AvPipeline` |
191
+ | `PipelineContext` | `AvContext` |
192
+ | `PipelineTransportContext` | `AvTransportContext` |
193
+ | `ProjectionEntry` | `AvProjectionEntry` |
194
+ | `ProjectionScope` | `AvProjectionScope` |
195
+ | `ProjectionScopes` | `AvProjectionScopes` |
196
+ | `ReferenceableField` | `AvReferenceableField` |
197
+ | `ReferenceBuilder` | `AvReferenceBuilder` |
198
+ | `RelationField` | `AvRelationField` |
199
+ | `RelationFieldCapabilities` | `AvRelationFieldCapabilities` |
200
+ | `RelationFieldCapabilityName` | `AvRelationFieldCapabilityName` |
201
+ | `RelationFieldPipelineConfig` | `AvRelationFieldPipeline` |
202
+ | `RelationFilterCapability` | `AvRelationFilterCapability` |
203
+ | `RelationMutationCapability` | `AvRelationMutationCapability` |
204
+ | `RelationMutationDirective` | `AvRelationMutationDirective` |
205
+ | `RelationProjectionCapability` | `AvRelationProjectionCapability` |
206
+ | `RelationProjectionInput` | `AvRelationProjectionInput` |
207
+ | `RelationReducer` | `AvRelationReducer` |
208
+ | `RelationReducerCapability` | `AvRelationReducerCapability` |
209
+ | `RequestOrigin` | `AvRequestOrigin` |
210
+ | `Resource` | `AvResource` |
211
+ | `ResourceFieldMap` | `AvResourceFieldMap` |
212
+ | `ResourceKey` | `AvResourceKey` |
213
+ | `ResourceOperations` | `AvResourceOperations` |
214
+ | `ScalarDefinition` | `AvScalarDefinition` |
215
+ | `ScalarField` | `AvScalarField` |
216
+ | `ScalarFieldCapabilities` | `AvScalarFieldCapabilities` |
217
+ | `ScalarFieldCapabilityName` | `AvScalarFieldCapabilityName` |
218
+ | `ScalarFieldKey` | `AvScalarFieldKey` |
219
+ | `ScalarFieldPipelineConfig` | `AvScalarFieldPipeline` |
220
+ | `ScalarFilterOperator` | `AvScalarFilterOperator` |
221
+ | `ScalarFormat` | `AvScalarFormat` |
222
+ | `ScalarMutationDirective` | `AvScalarMutationDirective` |
223
+ | `ScalarOrderInput` | `AvScalarOrderInput` |
224
+ | `ScalarRegistry` | `AvScalarRegistry` |
225
+ | `ScalarValueType` | `AvScalarValueType` |
226
+ | `ScopedRelationMutations` | `AvScopedRelationMutations` |
227
+ | `ScopedRelationReducers` | `AvScopedRelationReducers` |
228
+ | `SelectInput` | `AvSelectInput` |
229
+ | `SingleRowResult` | `AvSingleRowResult` |
230
+ | `SortDirection` | `AvSortDirection` |
231
+ | `TransactionAfterHook` | `AvTransactionAfterHook` |
232
+ | `TransactionBeforeHook` | `AvTransactionBeforeHook` |
233
+ | `TransactionCapability` | `AvTransactionCapability` |
234
+ | `TransactionCommittedResponse` | `AvTransactionCommittedResponse` |
235
+ | `TransactionDiagnostic` | `AvTransactionDiagnostic` |
236
+ | `TransactionFilter` | `AvTransactionFilter` |
237
+ | `TransactionGuard` | `AvTransactionGuard` |
238
+ | `TransactionIntegrityError` | `AvTransactionIntegrityError` |
239
+ | `TransactionIntegrityViolation` | `AvTransactionIntegrityViolation` |
240
+ | `TransactionInterceptor` | `AvTransactionInterceptor` |
241
+ | `TransactionPipe` | `AvTransactionPipe` |
242
+ | `TransactionPipelineConfig` | `AvTransactionPipeline` |
243
+ | `TransactionPipelineContext` | `AvTransactionContext` |
244
+ | `TransactionReference` | `AvTransactionReference` |
245
+ | `TransactionResponse` | `AvTransactionResponse` |
246
+ | `TransactionResults` | `AvTransactionResults` |
247
+ | `TransactionRunner` | `AvTransactionRunner` |
248
+ | `TransactionSlotPathError` | `AvTransactionSlotPathError` |
249
+ | `TransactionSlotPathViolation` | `AvTransactionSlotPathViolation` |
250
+ | `UniqueWhereInput` | `AvUniqueWhereInput` |
251
+ | `UpdateDataInput` | `AvUpdateDataInput` |
252
+ | `ValidationCode` | `AvValidationCode` |
253
+ | `ValidationIssue` | `AvValidationIssue` |
254
+ | `WhereInput` | `AvWhereInput` |
255
+ | `WireScalarForms` | `AvWireScalarForms` |
256
+ | `WriteScope` | `AvWriteScope` |
257
+ | `WriteScopes` | `AvWriteScopes` |
258
+
259
+ Error classes whose `name` a log or a test may read:
260
+
261
+ | Before | After |
262
+ | ------------------------ | -------------------------- |
263
+ | `CallerDataError` | `AvCallerDataError` |
264
+ | `ClientConfigError` | `AvClientConfigError` |
265
+ | `ComputedValueError` | `AvComputedValueError` |
266
+ | `ContractProtocolError` | `AvContractProtocolError` |
267
+ | `ContractTransportError` | `AvContractTransportError` |
268
+ | `EnvFileError` | `AvEnvFileError` |
269
+ | `OutputValidationError` | `AvOutputValidationError` |
270
+ | `OutputWriteError` | `AvOutputWriteError` |
271
+ | `PipeOutputError` | `AvPipeOutputError` |
272
+ | `UnmountedRouteError` | `AvUnmountedRouteError` |
273
+
274
+ `@aventara/testing`:
275
+
276
+ | Before | After |
277
+ | ------------------------ | -------------------------- |
278
+ | `AdapterFactory` | `AvAdapterFactory` |
279
+ | `FakeAdapter` | `AvFakeAdapter` |
280
+ | `FakeAdapterExecute` | `AvFakeAdapterExecute` |
281
+ | `FakeAdapterOptions` | `AvFakeAdapterOptions` |
282
+ | `FakeAdapterRollback` | `AvFakeAdapterRollback` |
283
+ | `FakeTransactionOutcome` | `AvFakeTransactionOutcome` |
284
+ | `FakeTransactionTrace` | `AvFakeTransactionTrace` |
285
+
286
+ `@aventara/client` (the `framework.client.ts` config types):
287
+
288
+ | Before | After |
289
+ | ------------------- | --------------------- |
290
+ | `ClientConfigInput` | `AvClientConfigInput` |
291
+ | `ConfigValue` | `AvClientConfigValue` |
292
+ | `EnvReference` | `AvEnvReference` |
293
+
294
+ `@aventara/prisma7-adapter`: its public types and error classes (`createPrismaAdapter` keeps its name):
295
+
296
+ | Before | After |
297
+ | ---------------------------------- | ------------------------------------ |
298
+ | `PrismaAdapterModel` | `AvPrismaAdapterModel` |
299
+ | `PrismaAdapterOptions` | `AvPrismaAdapterOptions` |
300
+ | `PrismaDelegate` | `AvPrismaDelegate` |
301
+ | `PrismaDelegateHost` | `AvPrismaDelegateHost` |
302
+ | `PrismaDelegateIndex` | `AvPrismaDelegateIndex` |
303
+ | `PrismaDiscoveryArtifact` | `AvPrismaDiscoveryArtifact` |
304
+ | `PrismaDriver` | `AvPrismaDriver` |
305
+ | `PrismaIsolationLevel` | `AvPrismaIsolationLevel` |
306
+ | `PrismaProvider` | `AvPrismaProvider` |
307
+ | `PrismaProviderProfile` | `AvPrismaProviderProfile` |
308
+ | `PrismaReferentialAction` | `AvPrismaReferentialAction` |
309
+ | `PrismaReferentialActionTable` | `AvPrismaReferentialActionTable` |
310
+ | `PrismaReferentialEdge` | `AvPrismaReferentialEdge` |
311
+ | `PrismaResourceReferentialActions` | `AvPrismaResourceReferentialActions` |
312
+ | `PrismaTransactionOptions` | `AvPrismaTransactionOptions` |
313
+ | `PrismaCapabilityDerivationError` | `AvPrismaCapabilityDerivationError` |
314
+ | `PrismaDiscoveryArtifactError` | `AvPrismaDiscoveryArtifactError` |
315
+ | `PrismaEmulationError` | `AvPrismaEmulationError` |
316
+ | `PrismaExecutionError` | `AvPrismaExecutionError` |
317
+ | `PrismaExistenceGateError` | `AvPrismaExistenceGateError` |
318
+ | `PrismaFieldProjectionError` | `AvPrismaFieldProjectionError` |
319
+ | `PrismaGenerateCliError` | `AvPrismaGenerateCliError` |
320
+ | `PrismaGenerateStepError` | `AvPrismaGenerateStepError` |
321
+ | `PrismaModelCompositionError` | `AvPrismaModelCompositionError` |
322
+ | `PrismaMutationTranslationError` | `AvPrismaMutationTranslationError` |
323
+ | `PrismaOperationTranslationError` | `AvPrismaOperationTranslationError` |
324
+ | `PrismaOrderTranslationError` | `AvPrismaOrderTranslationError` |
325
+ | `PrismaProjectionTranslationError` | `AvPrismaProjectionTranslationError` |
326
+ | `PrismaResultShapeError` | `AvPrismaResultShapeError` |
327
+ | `PrismaScalarConversionError` | `AvPrismaScalarConversionError` |
328
+ | `PrismaSchemaReaderError` | `AvPrismaSchemaReaderError` |
329
+ | `PrismaTypesReaderError` | `AvPrismaTypesReaderError` |
330
+ | `PrismaWhereTranslationError` | `AvPrismaWhereTranslationError` |
331
+
332
+ - 68d4395: New: the generated client checks field validators before it sends. When the ClientContract carries a field's
333
+ `validators` or a Json Shape's checks, `avclient generate` emits them into the client with the check code that runs
334
+ them, and every call and every transaction checks the values it holds first. A call that breaks a check rejects with
335
+ the same `AvValidationError` the server would answer, `A2004` with the same issues (`code`, `path`, `check`,
336
+ `params`, `message`), and no request is sent:
337
+
338
+ ```ts
339
+ try {
340
+ await avClient.projects.create.one({ data: { id: "p1", name: "no" } });
341
+ } catch (error) {
342
+ // error instanceof AvValidationError, error.code === "A2004", nothing was sent:
343
+ // error.cause.issues[0] → { code: "V1004", path: ["arguments", "data", "name"],
344
+ // message: "Value must be at least 3 characters long.", check: "min_length", params: { minimum: 3 } }
345
+ }
346
+ ```
347
+
348
+ - The server checks every value again. The client checks a value as the caller wrote it and the server checks it
349
+ after its field pipes, so a field pipe that normalizes a value (trims it, lower-cases it) must not turn a value the
350
+ client accepted into one the server refuses.
351
+ - A transaction is checked whole before it is sent: a bad literal value in any step rejects with the server's answer,
352
+ `cause.operation` naming the step. A `$ref` value is checked by the server, at its step.
353
+ - Nested write data, list fields (each entry and the list's length), `$push` entries and Json Shape checks are all
354
+ checked, a Json Shape's checks with the other validators in the order the call wrote the fields, and a plan step
355
+ by step, as the server does. A Json value that does not match its shape is sent, and the server answers it.
356
+ - The check code is `@aventara/core`'s own, copied into the generated output; the client still imports nothing from
357
+ `@aventara/*` or zod at runtime. A contract with no checks generates the same files as before.
358
+ - `AvValidationIssue` declares `check` and `params`, and the client keeps them on the issues a server sends (they
359
+ were dropped before).
360
+ - The server lists validator issues in the order the call wrote the fields (it used the model's field order), and a
361
+ Json Shape's issues in the order of its keys as the Contract lists them, so the client can list the same issues in
362
+ the same order. An issue inside a nested write whose operand is one entry rather than a list no longer names an
363
+ index the request does not have (`[…, "$update", "data", …]`, not `[…, "$update", 0, "data", …]`).
364
+
365
+ - 7a0cab9: A `where` now offers each field only the filter operators that field allows. The types of `framework.client`,
366
+ `framework.application`, `framework.clientTx`, `framework.appTx` and a generated client read the operators from the
367
+ field's effective `filter` capability, so an operator the server would refuse with `V1006` is now a type error
368
+ instead. That covers an operator the adapter does not offer for the field's type (no `contains` on an Int), an
369
+ operator a layer's exemptions removed (the client layer narrowing `email` to `equals` is refused on
370
+ `framework.client` and still allowed on `framework.application`), and operators inside a nested `not`. A plain
371
+ value, `null` or `$ref` as shorthand is equality, so it is only accepted where the field allows `equals`, and a field
372
+ narrowed to no operators at all can no longer be named in a `where`. Runtime behavior is unchanged.
373
+
374
+ A generated client picks this up when it is regenerated with this version of `@aventara/client`.
375
+
376
+ - c6e5010: Breaking: one stage order, and hooks now run inside interceptors. Every operation runs
377
+
378
+ ```
379
+ guards → pipes → validators → interceptors (before) → hooks.before → operation → hooks.after → interceptors (after) → filters
380
+ ```
381
+
382
+ Each stage runs over every level, outer to inner, before the next starts, so every interceptor wraps every hook: all
383
+ interceptors enter, then every `before` hook runs, then the operation, then every `after` hook (inner to outer), then
384
+ the interceptors unwind (inner to outer). In rc.0 every `before` hook ran ahead of every interceptor, every `after`
385
+ hook after every interceptor had unwound, and the overlay's `after` hooks after the root's; now the overlay's run
386
+ before the root's. Filters run inner to outer, and the first filter that handles an error wins. A call that a guard,
387
+ a pipe's output or a validator refuses runs no interceptor and no hook; the filters still see a thrown error. Inside
388
+ a transaction, a step's error its own filters leave unhandled continues to the Resource transaction filters (the
389
+ transaction's outer layer) before it is answered.
390
+
391
+ New: stages at every level of `resources`. `resources.<R>.pipelines`, `resources.<R>.operations.<family>.pipelines`
392
+ and `resources.<R>.operations.<family>.<variant>.pipelines` run now, in both layers, level by level: root layer,
393
+ overlay layer, root Resource, overlay Resource, root family, overlay family, root variant, overlay variant. Nothing
394
+ below removes a stage above. A stage is told the level it sits at: a Resource's `ctx.$operation.resource` is its name, a
395
+ family's `ctx.$operation.family` too, a variant's `ctx.$operation.variant` as well.
396
+
397
+ - Field pipes (`resources.<R>.fields.<f>.pipelines.pipes`) are pure: value in, value out, no `ctx`. They run on
398
+ each value the caller sent in top-level create, update or upsert data, right after the operation's pipes, root's
399
+ then overlay's; guards see the value as sent. In a transaction they run on every step's literal values before the
400
+ transaction opens, and on a `$ref` value when it is resolved at its step. A value a field pipe returns is held to the server's rules
401
+ (`A3004`). A relation field takes no field pipes (`COMPILER_RELATION_FIELD_CONFIG_UNSUPPORTED`).
402
+ - Field write guards (`resources.<R>.fields.<f>.pipelines.guards`) refuse with `A4001` when the caller sends
403
+ the field in create, update or upsert data, a relation field's `$connect` included. They run right after the
404
+ operation's guards, last among the guards.
405
+ - Transactions: every step's guards, pipes and validators run before the transaction opens, in plan order; an
406
+ operation pipe sees a `$ref` as the reference it is. A refused step opens nothing. Then BEGIN, and at each step
407
+ its `$ref`s are resolved, their field pipes and validators run, then the step's interceptors and hooks around its
408
+ adapter call. A forced call runs the same way. A step's guards and pipes no longer run inside the transaction, so
409
+ their ctx calls do not join it.
410
+ - Resource transaction stages (`resources.<R>.transactions.pipelines`) run once per transaction with a
411
+ top-level step on the Resource, inside it: guards and pipes see the whole plan (`ctx.$args`, `$ref`s unresolved),
412
+ interceptors and hooks wrap every step, and the `after` hooks see every step's result before the commit, so a
413
+ throw rolls everything back. Touched Resources run in the order their first step appears; a SQL step touches
414
+ nothing. A transaction pipe may change a step's arguments; they are held to the server's rules and their
415
+ validators at the step.
416
+ - `forceTransaction` on a family or a variant runs a plain call of that operation as a one-step transaction,
417
+ so its after hooks commit with the write or not at all, and the Resource's transaction stages run. It holds when
418
+ any layer sets it. As a step of a plan it is just a step. Under an effective `transactionsStyle: "none"` it is a
419
+ startup error (`CONFIG_INVALID_VALUE`).
420
+
421
+ Breaking: a transaction has one origin. `framework.transaction` refuses a list that mixes `appTx` and
422
+ `clientTx` handles: `A2004` with one new `V1020` issue, "Transaction mixes application and client steps.", at the
423
+ first step of the other origin, before anything runs. An `appTx.$sql` step is application-origin. Run each
424
+ origin's steps as its own transaction. The generated client's error codes include `V1020`.
425
+
426
+ - Generated clients changed. Regenerate with `avclient generate` after upgrading. `AvOperationCall` lost its
427
+ `Settlement` parameter, because every direct call now resolves its data. The generated tree no longer copies two
428
+ declaration files, `derivation/runtime/operation-response.d.ts` and `derivation/transactions/transaction-response.d.ts`,
429
+ since nothing in it uses them now. And core's in-process calls (`framework.application`, `framework.client`,
430
+ `framework.transaction`) now throw the same `AvError` subclasses the generated client throws, chosen by the same
431
+ code-to-class table, so the server and the client classify every failure the same way.
432
+
433
+ - Generated clients type required create fields. The ClientContract now states each Resource's create requirements
434
+ (`createRequirements`), and a generated client's create payloads require them: leaving out a required field, or
435
+ writing a required relation neither way or both ways (`author` and `authorId`), is a type error. A nested create
436
+ gets the relation it is created through from its parent. The Client Contract's hash changes; regenerate with
437
+ `avclient generate`. The generated tree copies one more declaration file, `derivation/contracts/create-requirements.d.ts`.
438
+
439
+ - Updated dependencies [800123b]
440
+ - Updated dependencies [8bb1d6a]
441
+ - Updated dependencies [68d4395]
442
+ - Updated dependencies [7e3d06f]
443
+ - Updated dependencies [1b5d3c0]
444
+ - Updated dependencies [6317811]
445
+ - Updated dependencies [6d0e5d6]
446
+ - Updated dependencies [7a0cab9]
447
+ - Updated dependencies [eb2a718]
448
+ - Updated dependencies [03312c5]
449
+ - Updated dependencies [123f6dc]
450
+ - Updated dependencies [b65df2e]
451
+ - Updated dependencies [c6e5010]
452
+ - Updated dependencies [c1f9389]
453
+ - Updated dependencies [9c52482]
454
+ - Updated dependencies [8396148]
455
+ - Updated dependencies [e8fbb02]
456
+ - Updated dependencies [916e5f6]
457
+ - Updated dependencies [6cbd158]
458
+ - @aventara/core@1.0.0-rc.1
459
+
460
+ ## 1.0.0-rc.0
461
+
462
+ ### Major Changes
463
+
464
+ - First release candidate of Aventara 1.0. The public API is now considered stable; changes before 1.0.0 are possible
465
+ based on feedback.
466
+
467
+ ### Minor Changes
468
+
469
+ - 24ffbab: A `Json` field can now have a type. Build its shape with `AvZ` from the new entry `@aventara/core/json` and declare it
470
+ on the field: `fields: { Post: { meta: { json: AvZ.object({ title: AvZ.string() }) } } }`. `framework.application`,
471
+ `framework.client`, `appTx`/`clientTx` and the generated client then read and write the field as that type instead of
472
+ generic JSON, and every write to it — create, update, upsert, nested writes and transaction steps, a value taken from
473
+ an earlier step included — is checked before the database is asked: a value out of shape is refused with `A2004` and
474
+ one issue per problem at its exact path (`V1000` missing key, `V1001` wrong type, `V1002` outside an enum or literal,
475
+ `V1004` integer out of range, `V1005` unknown key). Shapes are types only and their objects are closed; reads and
476
+ filters are never checked. Only a field the adapter discovered as `Json` takes a shape, and a Zod schema is not
477
+ accepted. The shape is part of the ClientContract (as JSON Schema), so declaring or changing one changes its hash:
478
+ regenerate the client. `@aventara/core` now depends on `zod` (`^4.6.5`), which only `@aventara/core/json` loads. The
479
+ shape types `AvZShape`, `AvZObject`, `AvZOptional` and `AvZNullable` are exported too, so a project that emits
480
+ declarations can export a shape or a configuration holding one.
481
+ - 24ffbab: Transaction steps can now reference earlier results in `$connect`, `$disconnect`, `$set`, `$connectOrCreate`'s `where`,
482
+ a `cursor`, a unique `where`, anywhere in a filter, and at any depth of nested relation writes. The generated client binds a `$ref` wherever a step's arguments
483
+ hold one, and its types accept one exactly where the server does: of the field's own type, nullable only for a filter's
484
+ equality on a nullable field, a list field for `in`, `notIn`, `hasEvery` and `hasSome`. Regenerate the client to use them.
485
+ - 24ffbab: `aventara new`, `aventara init`, `avclient init` and `avclient generate` show their steps while they work, so a long
486
+ install never looks hung: on a terminal, `[3/4] Installing dependencies (npm install)` with a spinner and the seconds so
487
+ far, then `✓` or `✗` and its time; in a pipe, in CI or with `NO_COLOR`, one plain line per step (`… done (12.4s)`),
488
+ with no control sequence. A closing line gives the total time. The steps go to stderr; stdout keeps the results and the
489
+ next steps. The output of `nest new` and of the install is shown only when it fails, as before, or as it runs with the
490
+ new `--verbose`.
491
+ - 24ffbab: A nested `$update` or `$delete` through a to-many relation filters plain fields only on Prisma 7, and Aventara now says
492
+ so up front: a relation filter in its `where` — `{ posts: { $update: { where: { category: { name: "x" } }, … } } }`, at
493
+ any depth, under `AND`/`OR`/`NOT` too — is refused with `A2004` / `V1006` before the database is asked, and is a type
494
+ error in `framework.application`, `framework.client`, `appTx`/`clientTx` and the generated client. Before, it reached
495
+ Prisma and fail as `A3001`. A to-one relation's nested filter keeps relation filters. The limit is stated by the adapter
496
+ in the Contract (`nestedWriteFilter: "scalar"`), so the ClientContract hash changes: regenerate the client.
497
+
498
+ ### Patch Changes
499
+
500
+ - 24ffbab: Each package ships its `CHANGELOG.md`, so the release notes are in the installed package beside the README.
501
+ - 24ffbab: **Behaviour changes:** server-side calls now copy what you pass them. `framework.application`, `framework.client`,
502
+ `framework.execute`, `framework.executeTransaction` and the `appTx`/`clientTx` builders read your arguments once, when
503
+ you call them, into plain data the framework owns; validation, guards, pipes, computed values and the adapter see only
504
+ that copy, so changing or revoking your object afterwards (an Immer draft after `produce`) no longer affects the
505
+ operation. A live Proxy (Vue `reactive`, MobX) still works.
506
+
507
+ A value that cannot be read — a revoked Proxy, a getter that throws — or that is not plain data — a class instance or a
508
+ `Map`; `Date`, `Decimal` and `Uint8Array` are fine — is now refused as your request's error: `A2004` with one `V1001` at
509
+ the value's path (`["arguments", …]`, or `["operations", i, "args", …]` with `cause.operation` in a transaction), before
510
+ any guard, pipe or adapter runs. Before, it was `A3000` (an internal error) or, from `appTx`/`clientTx`, a `TypeError`
511
+ thrown at the builder call; a builder now never throws, and `framework.transaction([...])` answers the refusal. The same
512
+ holds for a `framework.execute` / `executeTransaction` request object that cannot be read. Two answers change for
513
+ inputs that were never supported: a class instance where an object of arguments belongs (`where`, `data`, …) was
514
+ accepted or failed as `A3000`, and is now refused; inherited, non-enumerable and symbol keys are dropped, as JSON drops
515
+ them.
516
+
517
+ New optional root setting `misuse` (types `FrameworkMisuseSink`, `FrameworkMisuseEvent`), beside `diagnostics`: it
518
+ receives one event per refused value — its `kind` (`"unreadable-value"` or `"non-plain-value"`), the `path` the caller
519
+ received, and the operation's `origin`, `resource`, `family`, `variant` and transaction step (`operation`) when they
520
+ could be read — never the value itself. It cannot change a response; an error it throws or a promise it rejects is
521
+ ignored. `diagnostics` keeps receiving only unexpected failures.
522
+
523
+ HTTP requests are not copied again: a body the protocol parses from raw content is already plain data.
524
+
525
+ The generated client reads your arguments through one guard too: a value that cannot be read is refused with a
526
+ `TypeError` naming where (`… the value at /where/id could not be read.`) before anything is sent, and a `tx` builder
527
+ never throws — `transaction([...])` rejects with that error instead. Regenerate the client to pick this up.
528
+
529
+ - 032f792: The generated client's `transaction([...])` refuses an entry that is not one of its `tx` handles, or one handle
530
+ placed twice, with the path core answers for it: `["operations", i]`, the entry itself (was `["operation"]`).
531
+ Regenerate the client to pick this up.
532
+ - Updated dependencies [24ffbab]
533
+ - Updated dependencies [24ffbab]
534
+ - Updated dependencies [24ffbab]
535
+ - Updated dependencies [24ffbab]
536
+ - Updated dependencies [24ffbab]
537
+ - Updated dependencies [24ffbab]
538
+ - Updated dependencies [24ffbab]
539
+ - Updated dependencies [24ffbab]
540
+ - Updated dependencies [24ffbab]
541
+ - Updated dependencies [24ffbab]
542
+ - Updated dependencies [24ffbab]
543
+ - Updated dependencies [24ffbab]
544
+ - Updated dependencies [a973e89]
545
+ - Updated dependencies [1e65e9a]
546
+ - Updated dependencies
547
+ - Updated dependencies [a973e89]
548
+ - Updated dependencies [a973e89]
549
+ - Updated dependencies [1e65e9a]
550
+ - Updated dependencies [1e65e9a]
551
+ - Updated dependencies [24ffbab]
552
+ - Updated dependencies [2d00ad7]
553
+ - Updated dependencies [384a50c]
554
+ - Updated dependencies [d43d1cc]
555
+ - Updated dependencies [3f98749]
556
+ - Updated dependencies [032f792]
557
+ - Updated dependencies [dbe6961]
558
+ - @aventara/core@1.0.0-rc.0
559
+
560
+ ## 0.1.0-pilot.4
561
+
562
+ ### Patch Changes
563
+
564
+ - f37dcd6: The documentation shipped with the package — the comments an editor shows on hover, and the README — now describes
565
+ what each export does, how to use it, what it returns and what it throws. Notes about how the package was built and
566
+ why are no longer part of what is published.
567
+ - Updated dependencies [f37dcd6]
568
+ - @aventara/core@0.1.0-pilot.4
569
+
570
+ ## 0.1.0-pilot.3
571
+
572
+ ### Patch Changes
573
+
574
+ - 0c4b352: `avclient init` adds `.env` to the frontend's `.gitignore` whenever it puts the entrypoint variable in `.env`: Vite's
575
+ `.gitignore` lists only `*.local`, so the `.env` init wrote was committed. The file is only appended to — every line
576
+ kept, nothing added when `.env` is already listed — and created where the project has none, as `aventara init` does on
577
+ the server. The generated client itself is still committed.
578
+ - ac1ae3a: `avclient init` refuses a project with no `tsconfig.json` before it writes or installs anything. 0.1.0-pilot.2 wrote
579
+ `framework.client.ts`, the `.env` entry, the script and the devDependency, ran the install, and only then had the first
580
+ generation refuse the JavaScript project. The check is the one `avclient generate` makes — the same search from
581
+ `generateAt` up, the same sentence — and it runs once the questions are answered, before anything is written.
582
+ - c34e65d: `avclient init` and `avclient generate` no longer print Node's `ExperimentalWarning: stripTypeScriptTypes is an
583
+ experimental feature`. With your project's `typescript` the output is type-checked and Node's parser is never called;
584
+ without it, the degraded check still parses with Node's parser and says so in its own warning, and only that one Node
585
+ warning is held back while it parses.
586
+ - 5ab40b2: The generated client is type-checked with your project's own `typescript`, resolved from `generateAt`, not with one
587
+ installed beside `@aventara/client`. Run through `npx @aventara/client init`, the generator lives in npm's cache, where
588
+ its optional peer is never installed, so 0.1.0-pilot.2 warned "`typescript` could not be resolved … NOT type-checked"
589
+ and reported `(checked: syntax)` in a project that had TypeScript. It now reports `(checked: types)`. The degraded check
590
+ runs only when the project has no `typescript`, or one it cannot check with: TypeScript 7 (no classic compiler API), or
591
+ one older than 5.5, the peer range's floor — each said in its own warning.
592
+ - @aventara/core@0.1.0-pilot.3
593
+
594
+ ## 0.1.0-pilot.2
595
+
596
+ ### Patch Changes
597
+
598
+ - 80527cf: The generated client is still TypeScript source — `AvClient.ts` and `generated/` — compiled by your own toolchain, but
599
+ its internal imports are now written the way your project imports its own files, read from your `tsconfig.json` by
600
+ Prisma 7's rules: extensionless under `moduleResolution: "bundler"` (Next.js with Turbopack or webpack) or `module: "commonjs"`,
601
+ `.js` under `nodenext` (NestJS 12), `.ts` with `allowImportingTsExtensions` (Vite's react-ts template, Node's type
602
+ stripping). So
603
+ Next.js 16's Turbopack, which could not resolve 0.1.0-pilot.1's client, builds it, and you import it as you import your
604
+ own files: `./api/AvClient`, `./api/AvClient.js` in a `nodenext` ES module project, `./api/AvClient.ts` where your
605
+ imports name `.ts` files. A project with no
606
+ `tsconfig.json` is refused with a sentence saying so: JavaScript projects are not supported yet. The client also
607
+ type-checks under `"strict": false` (the tsconfig Next.js writes itself), where 0.1.0-pilot.1's transport did not.
608
+
609
+ The config is loaded the way Prisma 7 loads `prisma.config.ts` (c12 over jiti): `framework.client.ts` — or `.mts`,
610
+ `.cts`, `.js`, `.mjs`, `.cjs`, in ES module or CommonJS syntax, in any project. `avclient init` writes
611
+ `framework.client.ts`; a 0.1.0-pilot.1 `framework.client.mts` keeps working and is reused. Two config files are refused.
612
+
613
+ - e69e88d: The published packages are written for the people who use them. The JavaScript ships without comments; the type
614
+ declarations keep their documentation, and it, the error messages, the protocol fixtures' labels and the comments in a
615
+ generated client no longer carry the project's internal development notes.
616
+ - ab58424: A pipe's output is checked against the server's own rules before it reaches the adapter. The request is validated
617
+ against the caller's Contract; after each pipe, the arguments are validated against the Core Contract (plus fields the
618
+ caller's scope adds), so a pipe may still write what the caller cannot — a field the client Contract hides, such as a
619
+ password hash — but not what the server cannot store. A refusal is the new internal code `A3004 PIPE_OUTPUT_INVALID` (HTTP
620
+ 500). The caller receives only the generic `A server pipeline produced invalid arguments.`, like every internal
621
+ failure; the pipe (`pipes[i]` and its function name), the operation, the offending field and its V-code go to the
622
+ diagnostics sink as a `PipeOutputError`, and `@aventara/nest` writes them into its error log line. Nothing reaches the
623
+ adapter. This holds for operations and transaction steps alike (a plan answers with `cause.operation`). Generated
624
+ clients map `A3004` to `InternalError`; the protocol fixtures in `@aventara/testing` include an `A3004` row.
625
+ - 0ec37d4: `avclient --version` (and `-v`) prints the generator's version and exits 0, and `aventara` now accepts `-v` beside
626
+ `--version`, so both bins answer the same two flags.
627
+ - Updated dependencies [c2a3b7c]
628
+ - Updated dependencies [e69e88d]
629
+ - Updated dependencies [ab58424]
630
+ - Updated dependencies [23937f8]
631
+ - @aventara/core@0.1.0-pilot.2
632
+
633
+ ## 0.1.0-pilot.1
634
+
635
+ ### Patch Changes
636
+
637
+ - d5bd6eb: A CommonJS frontend works. `npm init -y` writes `"type": "commonjs"`, under which Node read `framework.client.ts` as
638
+ CommonJS and `avclient generate` stopped with "Cannot use import statement outside a module". `avclient init` now writes
639
+ `framework.client.mts`, an ES module in every project, and moves an existing `framework.client.ts` to it (asking first if
640
+ it was edited). `avclient generate` reads `framework.client.mts`, still reads `framework.client.ts`, refuses in one
641
+ sentence when both are present, and tells a `.ts` that fails to evaluate to rename itself.
642
+ - 4a12683: TypeScript 7 no longer blocks a frontend. The optional `typescript` peer is `>=5.5.0` with no upper bound, so `npm i`
643
+ in a project on `typescript` 7.x no longer fails with `ERESOLVE`. Under a `typescript` without the classic compiler API
644
+ (`createProgram`), `avclient generate` no longer refuses: it degrades to the syntax check with one warning naming the
645
+ version, and writes the client — which then type-checks under the project's own `tsc` 7.
646
+ - 799346e: The package READMEs (each package's npm page) are rewritten for the people who use the packages. The Prisma 7
647
+ adapter's README now states the actual behaviour of a to-many relation or `$count` projected on
648
+ `update.many`/`create.many`: a validation refusal, `A2004` with `V1008`, before any statement runs (it said `A3001`).
649
+ Every install or run command names the `@pilot` dist-tag.
650
+ - 88408be: `--help` (and `-h`) works after a command: `aventara new --help`, `aventara init --help`, `avclient init --help` and
651
+ `avclient generate --help` print that command's usage and exit 0, instead of refusing "unknown flag --help". Nothing
652
+ else on the line is read or run.
653
+ - Updated dependencies [a45f8a8]
654
+ - Updated dependencies [799346e]
655
+ - @aventara/core@0.1.0-pilot.1
656
+
657
+ ## 0.1.0-pilot.0
658
+
659
+ ### Minor Changes
660
+
661
+ - First pilot release of `@aventara/client`, the development-time client generator, bin `avclient`.
662
+
663
+ - `avclient init` sets up a frontend — `framework.client.ts`, the `.env` entry, the `avclient:generate` script and an
664
+ exact `@aventara/client` devDependency — then installs and generates.
665
+ - `avclient generate` reads the server's ClientContract and writes a standalone typed client that your application
666
+ imports; the generated code needs no `@aventara/client` at runtime. A client generated for an older contract fails
667
+ with a message telling you to run `avclient generate`. Messages are prefixed `avclient:`.
668
+ - The client's entrypoint follows the server's rule: `"api"`, `"/api/"` and `"//api//"` all mean `"/api"`, and a mount
669
+ path holding a backslash, a `.` segment, a non-ASCII character, a `%` or another character not allowed in a URL path
670
+ segment is refused rather than silently rewritten.
671
+ - `bigint`, `decimal`, `datetime` and `bytes` travel in the server's wire forms, and only canonical base64 is accepted
672
+ for `bytes`.
673
+ - At this release the `typescript` peer is `>=5.5.0 <7`, and TypeScript 7 is refused in one sentence (0.1.0-pilot.1
674
+ lifts this).
675
+
676
+ ### Patch Changes
677
+
678
+ - Updated dependencies
679
+ - @aventara/core@0.1.0-pilot.0