@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/package.json +5 -5
- package/src/api.ts +137 -12
- package/src/cli.ts +42 -2
- package/src/codec.ts +70 -12
- package/src/collaborators.ts +5 -0
- package/src/control.ts +302 -43
- package/src/index.ts +119 -1
- package/src/manifest.ts +60 -3
- package/src/provider.ts +171 -31
- package/src/source-connection.ts +394 -0
- package/src/source.ts +1043 -0
- package/src/types.ts +18 -1
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
|
-
|
|
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
|