@fabrika/provider-contract 0.6.0 → 0.7.0

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/control.ts +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/provider-contract",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,6 +31,6 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@fabrika/auth-core": "0.6.0"
34
+ "@fabrika/auth-core": "0.7.0"
35
35
  }
36
36
  }
package/src/control.ts CHANGED
@@ -41,16 +41,29 @@ export interface ProviderDeploymentNamespace {
41
41
  readonly target: ProviderEnvelope
42
42
  }
43
43
 
44
+ /** A framework release as npm publishes it; the only form one may take before it reaches a generated build command. */
45
+ export const FRAMEWORK_RELEASE_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/
46
+
44
47
  /**
45
48
  * The access Control approved for one application environment (ADR-0050): the contract the proxy enforces and the
46
49
  * IAM vocabulary compiled from it. A provider publishes a contract application's endpoint table and reconciles its
47
50
  * IAM schema from this, never from the artifact or a runner's report.
48
51
  */
49
52
  export interface ProviderApprovedAccess {
53
+ /** The contract in this platform release's model, upcast from the application's own release's artifact (ADR-0062). */
50
54
  readonly contract: ContractArtifact
51
- /** `contractDigest(contract)`, which the application compares with `FABRIKA_CONTRACT_DIGEST` at startup. */
55
+ /**
56
+ * The digest the application's own framework release computes for its contract, which it compares with
57
+ * `FABRIKA_CONTRACT_DIGEST` at startup. It is `contractDigest(contract)` only when the application is on this
58
+ * release's artifact format, so a provider never derives it from `contract`.
59
+ */
52
60
  readonly contractDigest: string
53
61
  readonly schema: AppSchema
62
+ /**
63
+ * The `@fabrika/check` release whose reader read the application (`FRAMEWORK_RELEASE_PATTERN`): the newest patch of
64
+ * the framework minor it pins (ADR-0062). Its build checks with that release.
65
+ */
66
+ readonly checker: string
54
67
  }
55
68
 
56
69
  /** Persisted deploy data for one app environment. */