@fabrika/provider-contract 0.9.0-dev.20 → 0.9.0-dev.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/provider-contract",
3
- "version": "0.9.0-dev.20",
3
+ "version": "0.9.0-dev.21",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,7 +42,7 @@
42
42
  "test": "bun test"
43
43
  },
44
44
  "dependencies": {
45
- "@fabrika/auth-core": "0.9.0-dev.20",
46
- "@fabrika/proxy-core": "0.9.0-dev.20"
45
+ "@fabrika/auth-core": "0.9.0-dev.21",
46
+ "@fabrika/proxy-core": "0.9.0-dev.21"
47
47
  }
48
48
  }
package/src/control.ts CHANGED
@@ -132,6 +132,13 @@ export interface ProviderSourceResolutionInput {
132
132
  readonly signal: AbortSignal
133
133
  }
134
134
 
135
+ /** The build descriptor of a deploy's commit: its repository path and its text. */
136
+ export interface ProviderSourceDescriptorInput {
137
+ readonly environment: ProviderEnvironment
138
+ readonly path: string
139
+ readonly contents: string
140
+ }
141
+
135
142
  /** The exact source revision a provider resolved before starting deploy work. */
136
143
  export interface ProviderSourceResolution {
137
144
  readonly commitSha: string
@@ -673,6 +680,13 @@ export interface ControlProvider {
673
680
  /** Absent means core stores the registration as submitted. */
674
681
  normalizeRegistration?(input: ProviderRegistrationInput): ProviderRegistration
675
682
  resolveSource?(input: ProviderSourceResolutionInput): Promise<ProviderSourceResolution>
683
+ /**
684
+ * The environment's artifact with the build descriptor a deploy's commit carries, validated as a registration is; it
685
+ * throws a refusal that names the refused key. Control calls it from a deploy run whose commit holds a descriptor the
686
+ * registered artifact does not, deploys with the result, and stores it once the run's publication passed (ADR-0043).
687
+ * Null when the provider does not re-register this artifact from a commit; absent means it re-registers none.
688
+ */
689
+ withSourceDescriptor?(input: ProviderSourceDescriptorInput): Promise<ProviderEnvelope | null>
676
690
  /**
677
691
  * Mutation-free check of a candidate's compatibility with its placement. Control calls it before publishing the
678
692
  * snapshot, under the namespace lease, on every publication attempt. The candidate is not yet approved access.
@@ -119,6 +119,12 @@ export interface ProviderSourceResolutionInput {
119
119
  readonly sourceBinding?: ProviderSourceBinding;
120
120
  readonly signal: AbortSignal;
121
121
  }
122
+ /** The build descriptor of a deploy's commit: its repository path and its text. */
123
+ export interface ProviderSourceDescriptorInput {
124
+ readonly environment: ProviderEnvironment;
125
+ readonly path: string;
126
+ readonly contents: string;
127
+ }
122
128
  /** The exact source revision a provider resolved before starting deploy work. */
123
129
  export interface ProviderSourceResolution {
124
130
  readonly commitSha: string;
@@ -593,6 +599,13 @@ export interface ControlProvider {
593
599
  /** Absent means core stores the registration as submitted. */
594
600
  normalizeRegistration?(input: ProviderRegistrationInput): ProviderRegistration;
595
601
  resolveSource?(input: ProviderSourceResolutionInput): Promise<ProviderSourceResolution>;
602
+ /**
603
+ * The environment's artifact with the build descriptor a deploy's commit carries, validated as a registration is; it
604
+ * throws a refusal that names the refused key. Control calls it from a deploy run whose commit holds a descriptor the
605
+ * registered artifact does not, deploys with the result, and stores it once the run's publication passed (ADR-0043).
606
+ * Null when the provider does not re-register this artifact from a commit; absent means it re-registers none.
607
+ */
608
+ withSourceDescriptor?(input: ProviderSourceDescriptorInput): Promise<ProviderEnvelope | null>;
596
609
  /**
597
610
  * Mutation-free check of a candidate's compatibility with its placement. Control calls it before publishing the
598
611
  * snapshot, under the namespace lease, on every publication attempt. The candidate is not yet approved access.