@fabrika/provider-zerops 0.0.4 → 0.0.6

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/src/types.ts CHANGED
@@ -9,6 +9,7 @@ import type {
9
9
  ZeropsYamlRun,
10
10
  ZeropsYamlSetup,
11
11
  } from './schema.generated'
12
+ import type { ZeropsSourceRepository } from './source'
12
13
 
13
14
  export interface ZeropsResourceContext {
14
15
  env: string
@@ -113,12 +114,28 @@ export interface ZeropsAppConfig extends AppConfigBase {
113
114
  target: ZeropsSourceTarget
114
115
  }
115
116
 
117
+ /** Exact, credential-free source coordinates composed for one non-dry runtime invocation. */
118
+ export interface ZeropsRuntimeSource {
119
+ runId: string
120
+ repository: ZeropsSourceRepository
121
+ commitSha: string
122
+ githubInstallationId?: number
123
+ }
124
+
125
+ /** Credential-free recovery state persisted beside one Zerops app-version id. */
126
+ export type ZeropsRunState =
127
+ | { appVersionId: string; phase: 'version_created' }
128
+ | { appVersionId: string; phase: 'source_uploaded' }
129
+ | { appVersionId: string; phase: 'build_trigger_requested' }
130
+ | { appVersionId: string; phase: 'build_triggered'; processId?: string }
131
+
116
132
  /** Ephemeral runtime coordinates. This value is encoded only after credentials are composed. */
117
133
  export interface ZeropsRuntimeTarget {
118
134
  projectId: string
119
135
  serviceId: string
120
136
  accessToken: string
121
- buildFromGit?: string
137
+ /** Absent only for dry runs, which perform no source or Zerops mutation. */
138
+ source?: ZeropsRuntimeSource
122
139
  apiBaseUrl?: string
123
140
  propustkaUrl?: string
124
141
  adminKey?: string