@aventara/core 1.0.0-rc.8 → 1.0.0-rc.9

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 (44) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/ERRORS.md +2 -2
  3. package/README.md +75 -6
  4. package/dist/compiler/contract-compiler-diagnostic.guidance.js +2 -2
  5. package/dist/config/config.resolver.d.ts +2 -0
  6. package/dist/config/config.resolver.js +7 -2
  7. package/dist/config/config.validator.js +36 -12
  8. package/dist/config/exact-framework-config.d.ts +11 -1
  9. package/dist/config/framework-config.d.ts +9 -0
  10. package/dist/contracts/contract-canonicalizer.js +2 -0
  11. package/dist/framework/contract-view.d.ts +9 -1
  12. package/dist/framework/framework-construction.error.js +2 -0
  13. package/dist/framework/framework.d.ts +22 -1
  14. package/dist/framework/framework.factory.js +29 -10
  15. package/dist/framework/operation-facade.d.ts +53 -6
  16. package/dist/index.d.ts +2 -1
  17. package/dist/internal.d.ts +1 -0
  18. package/dist/internal.js +1 -0
  19. package/dist/policy/access-provider.interface.d.ts +36 -0
  20. package/dist/policy/access-provider.interface.js +1 -0
  21. package/dist/policy/access-provider.registry.d.ts +9 -0
  22. package/dist/policy/access-provider.registry.js +10 -0
  23. package/dist/policy/policy-startup.validator.js +10 -10
  24. package/dist/prebuilt/core-version.generated.d.ts +1 -1
  25. package/dist/prebuilt/core-version.generated.js +1 -1
  26. package/dist/prebuilt/prebuilt-inputs.fingerprint.js +16 -1
  27. package/dist/protocol/http-response.encoder.js +2 -2
  28. package/dist/runtime/caller-data.copier.js +3 -4
  29. package/dist/runtime/core-class.brand.d.ts +10 -0
  30. package/dist/runtime/core-class.brand.js +21 -0
  31. package/dist/runtime/decimal.d.ts +14 -0
  32. package/dist/runtime/decimal.js +21 -0
  33. package/dist/runtime/diagnostics-reporter.js +13 -1
  34. package/dist/runtime/framework-error.js +9 -0
  35. package/dist/runtime/readonly-value.d.ts +1 -1
  36. package/dist/runtime/readonly-value.js +2 -2
  37. package/dist/runtime/scalar-runtime.js +4 -5
  38. package/dist/transactions/operation-arguments-encoder.js +8 -3
  39. package/dist/transactions/sql-statement.validator.js +2 -2
  40. package/dist/transactions/transaction-integrity-error.js +2 -0
  41. package/dist/transactions/transaction-plan-assembler.d.ts +9 -2
  42. package/dist/transactions/transaction-plan-assembler.js +17 -2
  43. package/dist/transactions/transaction-slot-path-error.js +2 -0
  44. package/package.json +1 -1
@@ -139,8 +139,23 @@ export function createTransactionPlanAssembler(contracts, protocol, misuse) {
139
139
  handles.set(handle, record);
140
140
  return handle;
141
141
  };
142
- const defer = (origin, resource, identity, args) => {
143
- const copy = snapshot(args, STEP_REFERENCE_MIRROR);
142
+ const defer = (origin, resource, identity, args, forms = "wire") => {
143
+ const snapped = snapshot(args, STEP_REFERENCE_MIRROR);
144
+ let copy = snapped;
145
+ if (origin === "client" &&
146
+ forms === "application" &&
147
+ snapped.refused === undefined) {
148
+ try {
149
+ copy = {
150
+ args: encodeOperationArgumentsForWire(contracts.client, { resource, ...identity }, snapped.args),
151
+ };
152
+ }
153
+ catch (error) {
154
+ if (!(error instanceof AvCallerDataError)) {
155
+ throw error;
156
+ }
157
+ }
158
+ }
144
159
  let sent = copy.args;
145
160
  try {
146
161
  sent = withoutUnsentWriteValues(origin === "application" ? contracts.application : contracts.client, { resource, family: identity.family }, copy.args);
@@ -1,3 +1,4 @@
1
+ import { brandCoreClass } from "../runtime/core-class.brand.js";
1
2
  const TRANSACTION_SLOT_PATH_MESSAGES = {
2
3
  "slot-prefix": "Transaction slot path does not name a member below the operation's arguments.",
3
4
  "absent-member": "Transaction slot path names an absent member of the operation arguments.",
@@ -11,3 +12,4 @@ export class AvTransactionSlotPathError extends Error {
11
12
  this.violation = violation;
12
13
  }
13
14
  }
15
+ brandCoreClass(AvTransactionSlotPathError, "AvTransactionSlotPathError");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventara/core",
3
- "version": "1.0.0-rc.8",
3
+ "version": "1.0.0-rc.9",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Core runtime, contract compiler, and extension APIs for Aventara.",
6
6
  "type": "module",