@treeseed/sdk 0.5.2 → 0.6.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +46 -0
- package/dist/operations/providers/default.js +1 -1
- package/dist/operations/services/config-runtime.d.ts +49 -42
- package/dist/operations/services/config-runtime.js +465 -142
- package/dist/operations/services/deploy.d.ts +298 -0
- package/dist/operations/services/deploy.js +381 -137
- package/dist/operations/services/git-workflow.d.ts +9 -0
- package/dist/operations/services/git-workflow.js +32 -0
- package/dist/operations/services/github-api.d.ts +115 -0
- package/dist/operations/services/github-api.js +455 -0
- package/dist/operations/services/github-automation.d.ts +19 -33
- package/dist/operations/services/github-automation.js +44 -131
- package/dist/operations/services/key-agent.d.ts +20 -1
- package/dist/operations/services/key-agent.js +267 -102
- package/dist/operations/services/knowledge-coop-launch.d.ts +2 -3
- package/dist/operations/services/knowledge-coop-launch.js +26 -12
- package/dist/operations/services/project-platform.d.ts +157 -150
- package/dist/operations/services/project-platform.js +129 -26
- package/dist/operations/services/railway-api.d.ts +244 -0
- package/dist/operations/services/railway-api.js +882 -0
- package/dist/operations/services/railway-deploy.d.ts +171 -27
- package/dist/operations/services/railway-deploy.js +672 -172
- package/dist/operations/services/runtime-tools.d.ts +18 -0
- package/dist/operations/services/runtime-tools.js +19 -6
- package/dist/operations/services/workspace-preflight.js +2 -2
- package/dist/platform/contracts.d.ts +7 -0
- package/dist/platform/deploy-config.js +23 -0
- package/dist/platform/deploy-runtime.d.ts +1 -0
- package/dist/platform/deploy-runtime.js +7 -9
- package/dist/platform/env.yaml +10 -9
- package/dist/platform/environment.js +4 -0
- package/dist/platform/plugin.d.ts +6 -0
- package/dist/platform/plugins/constants.d.ts +1 -0
- package/dist/platform/plugins/constants.js +1 -0
- package/dist/platform/plugins/runtime.d.ts +4 -0
- package/dist/platform/plugins/runtime.js +8 -1
- package/dist/platform/published-content.js +27 -4
- package/dist/platform/tenant/runtime-config.js +33 -24
- package/dist/plugin-default.d.ts +1 -0
- package/dist/plugin-default.js +1 -0
- package/dist/reconcile/builtin-adapters.d.ts +3 -0
- package/dist/reconcile/builtin-adapters.js +2093 -0
- package/dist/reconcile/contracts.d.ts +155 -0
- package/dist/reconcile/contracts.js +0 -0
- package/dist/reconcile/desired-state.d.ts +179 -0
- package/dist/reconcile/desired-state.js +319 -0
- package/dist/reconcile/engine.d.ts +405 -0
- package/dist/reconcile/engine.js +356 -0
- package/dist/reconcile/errors.d.ts +5 -0
- package/dist/reconcile/errors.js +13 -0
- package/dist/reconcile/index.d.ts +7 -0
- package/dist/reconcile/index.js +7 -0
- package/dist/reconcile/registry.d.ts +7 -0
- package/dist/reconcile/registry.js +64 -0
- package/dist/reconcile/state.d.ts +7 -0
- package/dist/reconcile/state.js +303 -0
- package/dist/reconcile/units.d.ts +6 -0
- package/dist/reconcile/units.js +68 -0
- package/dist/scripts/config-treeseed.js +27 -19
- package/dist/scripts/tenant-deploy.js +35 -14
- package/dist/workflow/operations.js +127 -22
- package/dist/workflow-support.d.ts +3 -1
- package/dist/workflow-support.js +50 -0
- package/dist/workflow.d.ts +2 -0
- package/package.json +7 -1
|
@@ -1,24 +1,67 @@
|
|
|
1
|
+
export declare function isUsableRailwayToken(value: any): boolean;
|
|
2
|
+
export declare function resolveRailwayAuthToken(env?: NodeJS.ProcessEnv): string;
|
|
3
|
+
export declare function buildRailwayCommandEnv(env?: NodeJS.ProcessEnv): {
|
|
4
|
+
[key: string]: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
export declare function runRailway(args: any, { cwd, capture, allowFailure, input, env }?: {
|
|
7
|
+
capture?: boolean | undefined;
|
|
8
|
+
allowFailure?: boolean | undefined;
|
|
9
|
+
}): import("child_process").SpawnSyncReturns<string>;
|
|
10
|
+
export declare function setRailwaySecretVariable({ cwd, service, environment, key, value, env, capture, allowFailure }: {
|
|
11
|
+
cwd: any;
|
|
12
|
+
service: any;
|
|
13
|
+
environment: any;
|
|
14
|
+
key: any;
|
|
15
|
+
value: any;
|
|
16
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
17
|
+
capture?: boolean | undefined;
|
|
18
|
+
allowFailure?: boolean | undefined;
|
|
19
|
+
}): import("child_process").SpawnSyncReturns<string> | null;
|
|
20
|
+
export declare function ensureRailwayProjectExists(service: any, { env }?: {
|
|
21
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
22
|
+
}): {
|
|
23
|
+
id: any;
|
|
24
|
+
name: any;
|
|
25
|
+
} | null;
|
|
26
|
+
export declare function ensureRailwayEnvironmentExists(service: any, { env }?: {
|
|
27
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
28
|
+
}): import("child_process").SpawnSyncReturns<string> | null;
|
|
29
|
+
export declare function ensureRailwayServiceExists(service: any, { env }?: {
|
|
30
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
31
|
+
}): import("child_process").SpawnSyncReturns<string>;
|
|
32
|
+
export declare function ensureRailwayProjectContext(service: any, { env, allowFailure, capture }?: {
|
|
33
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
34
|
+
allowFailure?: boolean | undefined;
|
|
35
|
+
capture?: boolean | undefined;
|
|
36
|
+
}): import("child_process").SpawnSyncReturns<string> | null;
|
|
1
37
|
export declare function configuredRailwayServices(tenantRoot: any, scope: any): ({
|
|
2
38
|
key: string;
|
|
3
39
|
scope: string;
|
|
4
40
|
projectId: string | null;
|
|
5
|
-
projectName: string
|
|
41
|
+
projectName: string;
|
|
6
42
|
serviceId: string | null;
|
|
7
|
-
serviceName: string
|
|
43
|
+
serviceName: string;
|
|
8
44
|
rootDir: string;
|
|
9
45
|
publicBaseUrl: string | null;
|
|
10
46
|
railwayEnvironment: string;
|
|
11
47
|
buildCommand: string | null;
|
|
12
48
|
startCommand: string | null;
|
|
49
|
+
healthcheckPath: any;
|
|
50
|
+
healthcheckTimeoutSeconds: any;
|
|
51
|
+
healthcheckIntervalSeconds: any;
|
|
52
|
+
restartPolicy: any;
|
|
53
|
+
runtimeMode: any;
|
|
13
54
|
schedule: string[];
|
|
14
55
|
hostingKind: string;
|
|
15
56
|
} | null)[];
|
|
16
|
-
export declare function configuredRailwayScheduledJobs(tenantRoot: any, scope: any
|
|
57
|
+
export declare function configuredRailwayScheduledJobs(tenantRoot: any, scope: any, { phase }?: {
|
|
58
|
+
phase?: string | undefined;
|
|
59
|
+
}): {
|
|
17
60
|
service: string;
|
|
18
61
|
projectId: string | null;
|
|
19
|
-
projectName: string
|
|
62
|
+
projectName: string;
|
|
20
63
|
serviceId: string | null;
|
|
21
|
-
serviceName: string
|
|
64
|
+
serviceName: string;
|
|
22
65
|
environment: string;
|
|
23
66
|
environmentId: string | null;
|
|
24
67
|
expression: string;
|
|
@@ -35,23 +78,28 @@ export declare function validateRailwayServiceConfiguration(tenantRoot: any, sco
|
|
|
35
78
|
key: string;
|
|
36
79
|
scope: string;
|
|
37
80
|
projectId: string | null;
|
|
38
|
-
projectName: string
|
|
81
|
+
projectName: string;
|
|
39
82
|
serviceId: string | null;
|
|
40
|
-
serviceName: string
|
|
83
|
+
serviceName: string;
|
|
41
84
|
rootDir: string;
|
|
42
85
|
publicBaseUrl: string | null;
|
|
43
86
|
railwayEnvironment: string;
|
|
44
87
|
buildCommand: string | null;
|
|
45
88
|
startCommand: string | null;
|
|
89
|
+
healthcheckPath: any;
|
|
90
|
+
healthcheckTimeoutSeconds: any;
|
|
91
|
+
healthcheckIntervalSeconds: any;
|
|
92
|
+
restartPolicy: any;
|
|
93
|
+
runtimeMode: any;
|
|
46
94
|
schedule: string[];
|
|
47
95
|
hostingKind: string;
|
|
48
96
|
} | null)[];
|
|
49
97
|
schedules: {
|
|
50
98
|
service: string;
|
|
51
99
|
projectId: string | null;
|
|
52
|
-
projectName: string
|
|
100
|
+
projectName: string;
|
|
53
101
|
serviceId: string | null;
|
|
54
|
-
serviceName: string
|
|
102
|
+
serviceName: string;
|
|
55
103
|
environment: string;
|
|
56
104
|
environmentId: string | null;
|
|
57
105
|
expression: string;
|
|
@@ -62,28 +110,35 @@ export declare function validateRailwayServiceConfiguration(tenantRoot: any, sco
|
|
|
62
110
|
hostingKind: string;
|
|
63
111
|
managedTopology: string[];
|
|
64
112
|
};
|
|
65
|
-
export declare function validateRailwayDeployPrerequisites(tenantRoot: any, scope: any
|
|
113
|
+
export declare function validateRailwayDeployPrerequisites(tenantRoot: any, scope: any, { env }?: {
|
|
114
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
115
|
+
}): {
|
|
66
116
|
services: ({
|
|
67
117
|
key: string;
|
|
68
118
|
scope: string;
|
|
69
119
|
projectId: string | null;
|
|
70
|
-
projectName: string
|
|
120
|
+
projectName: string;
|
|
71
121
|
serviceId: string | null;
|
|
72
|
-
serviceName: string
|
|
122
|
+
serviceName: string;
|
|
73
123
|
rootDir: string;
|
|
74
124
|
publicBaseUrl: string | null;
|
|
75
125
|
railwayEnvironment: string;
|
|
76
126
|
buildCommand: string | null;
|
|
77
127
|
startCommand: string | null;
|
|
128
|
+
healthcheckPath: any;
|
|
129
|
+
healthcheckTimeoutSeconds: any;
|
|
130
|
+
healthcheckIntervalSeconds: any;
|
|
131
|
+
restartPolicy: any;
|
|
132
|
+
runtimeMode: any;
|
|
78
133
|
schedule: string[];
|
|
79
134
|
hostingKind: string;
|
|
80
135
|
} | null)[];
|
|
81
136
|
schedules: {
|
|
82
137
|
service: string;
|
|
83
138
|
projectId: string | null;
|
|
84
|
-
projectName: string
|
|
139
|
+
projectName: string;
|
|
85
140
|
serviceId: string | null;
|
|
86
|
-
serviceName: string
|
|
141
|
+
serviceName: string;
|
|
87
142
|
environment: string;
|
|
88
143
|
environmentId: string | null;
|
|
89
144
|
expression: string;
|
|
@@ -94,37 +149,71 @@ export declare function validateRailwayDeployPrerequisites(tenantRoot: any, scop
|
|
|
94
149
|
hostingKind: string;
|
|
95
150
|
managedTopology: string[];
|
|
96
151
|
};
|
|
97
|
-
export declare function ensureRailwayScheduledJobs(tenantRoot: any, scope: any, { dryRun, fetchImpl, apiToken, apiUrl }?: {
|
|
152
|
+
export declare function ensureRailwayScheduledJobs(tenantRoot: any, scope: any, { dryRun, fetchImpl, apiToken, apiUrl, env }?: {
|
|
98
153
|
dryRun?: boolean | undefined;
|
|
99
154
|
fetchImpl?: typeof fetch | undefined;
|
|
155
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
100
156
|
}): Promise<{
|
|
101
|
-
id:
|
|
157
|
+
id: null;
|
|
102
158
|
status: string;
|
|
103
|
-
enabled:
|
|
104
|
-
command:
|
|
159
|
+
enabled: boolean;
|
|
160
|
+
command: string | null;
|
|
161
|
+
message: string;
|
|
105
162
|
service: string;
|
|
106
163
|
projectId: string | null;
|
|
107
|
-
projectName: string
|
|
164
|
+
projectName: string;
|
|
108
165
|
serviceId: string | null;
|
|
109
|
-
serviceName: string
|
|
166
|
+
serviceName: string;
|
|
110
167
|
environment: string;
|
|
111
168
|
environmentId: string | null;
|
|
112
169
|
expression: string;
|
|
113
170
|
logicalName: string;
|
|
114
|
-
}[]
|
|
115
|
-
|
|
171
|
+
}[] | ({
|
|
172
|
+
id: null;
|
|
173
|
+
projectId: string | null;
|
|
174
|
+
serviceId: string | null;
|
|
175
|
+
environmentId: string | null;
|
|
176
|
+
status: string;
|
|
177
|
+
enabled: boolean;
|
|
178
|
+
command: string | null;
|
|
179
|
+
service: string;
|
|
180
|
+
projectName: string;
|
|
181
|
+
serviceName: string;
|
|
182
|
+
environment: string;
|
|
183
|
+
expression: string;
|
|
184
|
+
logicalName: string;
|
|
185
|
+
} | {
|
|
186
|
+
projectId: string;
|
|
187
|
+
id: any;
|
|
188
|
+
status: string;
|
|
189
|
+
enabled: any;
|
|
190
|
+
command: any;
|
|
191
|
+
serviceId: string;
|
|
192
|
+
environmentId: string;
|
|
193
|
+
service: string;
|
|
194
|
+
projectName: string;
|
|
195
|
+
serviceName: string;
|
|
196
|
+
environment: string;
|
|
197
|
+
expression: string;
|
|
198
|
+
logicalName: string;
|
|
199
|
+
})[]>;
|
|
200
|
+
export declare function verifyRailwayScheduledJobs(tenantRoot: any, scope: any, { fetchImpl, apiToken, apiUrl, env }?: {
|
|
116
201
|
fetchImpl?: typeof fetch | undefined;
|
|
202
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
117
203
|
}): Promise<{
|
|
118
204
|
ok: boolean;
|
|
205
|
+
unsupported: boolean;
|
|
206
|
+
message: string;
|
|
119
207
|
checks: {
|
|
120
|
-
id:
|
|
208
|
+
id: null;
|
|
121
209
|
ok: boolean;
|
|
122
210
|
status: string;
|
|
211
|
+
message: string;
|
|
123
212
|
service: string;
|
|
124
213
|
projectId: string | null;
|
|
125
|
-
projectName: string
|
|
214
|
+
projectName: string;
|
|
126
215
|
serviceId: string | null;
|
|
127
|
-
serviceName: string
|
|
216
|
+
serviceName: string;
|
|
128
217
|
environment: string;
|
|
129
218
|
environmentId: string | null;
|
|
130
219
|
expression: string;
|
|
@@ -132,6 +221,48 @@ export declare function verifyRailwayScheduledJobs(tenantRoot: any, scope: any,
|
|
|
132
221
|
enabled: boolean;
|
|
133
222
|
logicalName: string;
|
|
134
223
|
}[];
|
|
224
|
+
} | {
|
|
225
|
+
ok: boolean;
|
|
226
|
+
checks: ({
|
|
227
|
+
id: null;
|
|
228
|
+
ok: boolean;
|
|
229
|
+
status: string;
|
|
230
|
+
message: string;
|
|
231
|
+
service: string;
|
|
232
|
+
projectId: string | null;
|
|
233
|
+
projectName: string;
|
|
234
|
+
serviceId: string | null;
|
|
235
|
+
serviceName: string;
|
|
236
|
+
environment: string;
|
|
237
|
+
environmentId: string | null;
|
|
238
|
+
expression: string;
|
|
239
|
+
command: string | null;
|
|
240
|
+
enabled: boolean;
|
|
241
|
+
logicalName: string;
|
|
242
|
+
} | {
|
|
243
|
+
id: any;
|
|
244
|
+
projectId: string;
|
|
245
|
+
serviceId: string;
|
|
246
|
+
environmentId: string;
|
|
247
|
+
ok: boolean;
|
|
248
|
+
status: string;
|
|
249
|
+
observed: {
|
|
250
|
+
expression: any;
|
|
251
|
+
command: any;
|
|
252
|
+
enabled: any;
|
|
253
|
+
} | null;
|
|
254
|
+
message: string | undefined;
|
|
255
|
+
service: string;
|
|
256
|
+
projectName: string;
|
|
257
|
+
serviceName: string;
|
|
258
|
+
environment: string;
|
|
259
|
+
expression: string;
|
|
260
|
+
command: string | null;
|
|
261
|
+
enabled: boolean;
|
|
262
|
+
logicalName: string;
|
|
263
|
+
})[];
|
|
264
|
+
unsupported?: undefined;
|
|
265
|
+
message?: undefined;
|
|
135
266
|
}>;
|
|
136
267
|
export declare function planRailwayServiceDeploy(service: any): {
|
|
137
268
|
command: string;
|
|
@@ -140,10 +271,23 @@ export declare function planRailwayServiceDeploy(service: any): {
|
|
|
140
271
|
};
|
|
141
272
|
export declare function deployRailwayService(tenantRoot: any, service: any, { dryRun }?: {
|
|
142
273
|
dryRun?: boolean | undefined;
|
|
143
|
-
}): {
|
|
274
|
+
}): Promise<{
|
|
144
275
|
service: any;
|
|
145
276
|
status: string;
|
|
146
277
|
command: string;
|
|
147
278
|
cwd: any;
|
|
148
279
|
publicBaseUrl: any;
|
|
149
|
-
|
|
280
|
+
runtimeConfiguration?: undefined;
|
|
281
|
+
} | {
|
|
282
|
+
service: any;
|
|
283
|
+
status: string;
|
|
284
|
+
command: string;
|
|
285
|
+
cwd: any;
|
|
286
|
+
publicBaseUrl: any;
|
|
287
|
+
runtimeConfiguration: {
|
|
288
|
+
updated: boolean;
|
|
289
|
+
healthcheckPath: string | null;
|
|
290
|
+
healthcheckTimeoutSeconds: number | null;
|
|
291
|
+
runtimeMode: string | null;
|
|
292
|
+
} | null;
|
|
293
|
+
}>;
|