@highstate/backend 0.7.1 → 0.7.3
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.mjs → index.js} +1255 -916
- package/dist/library/source-resolution-worker.js +55 -0
- package/dist/library/worker/main.js +207 -0
- package/dist/{terminal-CqIsctlZ.mjs → library-BW5oPM7V.js} +210 -87
- package/dist/shared/index.js +6 -0
- package/dist/utils-ByadNcv4.js +102 -0
- package/package.json +14 -18
- package/src/common/index.ts +3 -0
- package/src/common/local.ts +22 -0
- package/src/common/pulumi.ts +230 -0
- package/src/common/utils.ts +137 -0
- package/src/config.ts +40 -0
- package/src/index.ts +6 -0
- package/src/library/abstractions.ts +83 -0
- package/src/library/factory.ts +20 -0
- package/src/library/index.ts +2 -0
- package/src/library/local.ts +404 -0
- package/src/library/source-resolution-worker.ts +96 -0
- package/src/library/worker/evaluator.ts +119 -0
- package/src/library/worker/loader.ts +93 -0
- package/src/library/worker/main.ts +82 -0
- package/src/library/worker/protocol.ts +38 -0
- package/src/orchestrator/index.ts +1 -0
- package/src/orchestrator/manager.ts +165 -0
- package/src/orchestrator/operation-workset.ts +483 -0
- package/src/orchestrator/operation.ts +647 -0
- package/src/preferences/shared.ts +1 -0
- package/src/project/abstractions.ts +89 -0
- package/src/project/factory.ts +11 -0
- package/src/project/index.ts +4 -0
- package/src/project/local.ts +412 -0
- package/src/project/lock.ts +39 -0
- package/src/project/manager.ts +374 -0
- package/src/runner/abstractions.ts +146 -0
- package/src/runner/factory.ts +22 -0
- package/src/runner/index.ts +2 -0
- package/src/runner/local.ts +698 -0
- package/src/secret/abstractions.ts +59 -0
- package/src/secret/factory.ts +22 -0
- package/src/secret/index.ts +2 -0
- package/src/secret/local.ts +152 -0
- package/src/services.ts +133 -0
- package/src/shared/index.ts +10 -0
- package/src/shared/library.ts +77 -0
- package/src/shared/operation.ts +85 -0
- package/src/shared/project.ts +62 -0
- package/src/shared/resolvers/graph-resolver.ts +111 -0
- package/src/shared/resolvers/input-hash.ts +77 -0
- package/src/shared/resolvers/input.ts +314 -0
- package/src/shared/resolvers/registry.ts +10 -0
- package/src/shared/resolvers/validation.ts +94 -0
- package/src/shared/state.ts +262 -0
- package/src/shared/terminal.ts +13 -0
- package/src/state/abstractions.ts +222 -0
- package/src/state/factory.ts +22 -0
- package/src/state/index.ts +3 -0
- package/src/state/local.ts +605 -0
- package/src/state/manager.ts +33 -0
- package/src/terminal/docker.ts +90 -0
- package/src/terminal/factory.ts +20 -0
- package/src/terminal/index.ts +3 -0
- package/src/terminal/manager.ts +330 -0
- package/src/terminal/run.sh.ts +37 -0
- package/src/terminal/shared.ts +50 -0
- package/src/workspace/abstractions.ts +41 -0
- package/src/workspace/factory.ts +14 -0
- package/src/workspace/index.ts +2 -0
- package/src/workspace/local.ts +54 -0
- package/dist/index.d.ts +0 -760
- package/dist/library/worker/main.mjs +0 -164
- package/dist/runner/source-resolution-worker.mjs +0 -22
- package/dist/shared/index.d.ts +0 -85
- package/dist/shared/index.mjs +0 -54
- package/dist/terminal-Cm2WqcyB.d.ts +0 -1589
package/dist/index.d.ts
DELETED
@@ -1,760 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { WhoAmIResult, Stack, ConfigMap } from '@pulumi/pulumi/automation';
|
3
|
-
import { Logger } from 'pino';
|
4
|
-
import { ComponentModel, Entity, InstanceModel, CompositeInstance, UnitSource } from '@highstate/contract';
|
5
|
-
import { H as HubModel, I as InstanceModelPatch, a as HubModelPatch, P as ProjectOperation, b as InstanceState, T as TerminalSession, c as InstanceStatus, d as InstanceStatePatch, e as InstancePageBlock, f as InstanceTerminal, g as ProjectOperationRequest } from './terminal-Cm2WqcyB.js';
|
6
|
-
import { BetterLock } from 'better-lock/dist/better_lock';
|
7
|
-
import { Stream, Writable } from 'node:stream';
|
8
|
-
|
9
|
-
declare class SecretAccessDeniedError extends Error {
|
10
|
-
constructor(projectId: string, key: string);
|
11
|
-
}
|
12
|
-
interface SecretBackend {
|
13
|
-
/**
|
14
|
-
* Check if the state and secrets of the project are locked.
|
15
|
-
* The backend may not implement this method.
|
16
|
-
*
|
17
|
-
* @param projectId The ID of the project.
|
18
|
-
*
|
19
|
-
* @returns `true` if the project is locked, `false` if the project is unlocked.
|
20
|
-
*/
|
21
|
-
isLocked?(projectId: string): Promise<boolean>;
|
22
|
-
/**
|
23
|
-
* Unlock the state and secrets of the project.
|
24
|
-
* The backend may not implement this method.
|
25
|
-
*
|
26
|
-
* @param projectId The ID of the project.
|
27
|
-
* @param password The password to unlock the secrets.
|
28
|
-
*
|
29
|
-
* @returns `true` if the project is unlocked, `false` if the password is incorrect.
|
30
|
-
*/
|
31
|
-
unlock?(projectId: string, password: string): Promise<boolean>;
|
32
|
-
/**
|
33
|
-
* Get the secrets of the component.
|
34
|
-
*
|
35
|
-
* @param projectId The ID of the project.
|
36
|
-
* @param instanceId The ID of the instance.
|
37
|
-
*
|
38
|
-
* @returns A record of secret key-value pairs or `null` if the secrets are not found.
|
39
|
-
* @throws {SecretAccessDeniedError} If access to the secrets is denied.
|
40
|
-
*/
|
41
|
-
get(projectId: string, instanceId: string): Promise<Record<string, unknown>>;
|
42
|
-
/**
|
43
|
-
* Set the secrets of the component.
|
44
|
-
*
|
45
|
-
* @param projectId The ID of the project.
|
46
|
-
* @param instanceId The ID of the instance.
|
47
|
-
* @param values The record of secret key-value pairs.
|
48
|
-
*
|
49
|
-
* @throws {SecretAccessDeniedError} If access to the secrets is denied.
|
50
|
-
*/
|
51
|
-
set(projectId: string, instanceId: string, values: Record<string, unknown>): Promise<void>;
|
52
|
-
}
|
53
|
-
|
54
|
-
type RunOptions = {
|
55
|
-
projectId: string;
|
56
|
-
pulumiProjectName: string;
|
57
|
-
pulumiStackName: string;
|
58
|
-
envVars?: Record<string, string>;
|
59
|
-
};
|
60
|
-
type RunLocalOptions = RunOptions & {
|
61
|
-
projectPath: string;
|
62
|
-
stackConfig?: ConfigMap;
|
63
|
-
};
|
64
|
-
declare class LocalPulumiHost {
|
65
|
-
private readonly logger;
|
66
|
-
private lock;
|
67
|
-
private constructor();
|
68
|
-
getCurrentUser(): Promise<WhoAmIResult | null>;
|
69
|
-
runEmpty<T>(options: RunOptions, fn: (stack: Stack) => Promise<T>): Promise<T>;
|
70
|
-
runLocal<T>(options: RunLocalOptions, fn: (stack: Stack) => Promise<T>): Promise<T>;
|
71
|
-
private sharedPassword;
|
72
|
-
private passwords;
|
73
|
-
hasPassword(projectId: string): boolean;
|
74
|
-
setPassword(projectId: string, password: string): void;
|
75
|
-
removePassword(projectId: string): void;
|
76
|
-
private getPassword;
|
77
|
-
tryUnlockStack(stack: Stack, error: unknown): Promise<boolean>;
|
78
|
-
static create(logger: Logger): LocalPulumiHost;
|
79
|
-
}
|
80
|
-
|
81
|
-
declare const secretBackendConfig: z.ZodObject<{
|
82
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH: z.ZodOptional<z.ZodString>;
|
83
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME: z.ZodOptional<z.ZodString>;
|
84
|
-
HIGHSTATE_BACKEND_SECRET_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
85
|
-
}, "strip", z.ZodTypeAny, {
|
86
|
-
HIGHSTATE_BACKEND_SECRET_TYPE: "local";
|
87
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH?: string | undefined;
|
88
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME?: string | undefined;
|
89
|
-
}, {
|
90
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH?: string | undefined;
|
91
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME?: string | undefined;
|
92
|
-
HIGHSTATE_BACKEND_SECRET_TYPE?: "local" | undefined;
|
93
|
-
}>;
|
94
|
-
declare function createSecretBackend(config: z.infer<typeof secretBackendConfig>, localPulumiHost: LocalPulumiHost, logger: Logger): Promise<SecretBackend>;
|
95
|
-
|
96
|
-
type LibraryModel = Readonly<{
|
97
|
-
components: Readonly<Record<string, ComponentModel>>;
|
98
|
-
entities: Readonly<Record<string, Entity>>;
|
99
|
-
}>;
|
100
|
-
interface LibraryBackend {
|
101
|
-
/**
|
102
|
-
* Loads the library.
|
103
|
-
*/
|
104
|
-
loadLibrary(): Promise<LibraryModel>;
|
105
|
-
/**
|
106
|
-
* Watches the library for changes.
|
107
|
-
* Returns an async iterable that emits the library whenever it changes.
|
108
|
-
*/
|
109
|
-
watchLibrary?(signal?: AbortSignal): AsyncIterable<LibraryModel>;
|
110
|
-
/**
|
111
|
-
* Evaluates the instances and returns the evaluated composite instances.
|
112
|
-
*
|
113
|
-
* @param allInstances The all instances defined in the project.
|
114
|
-
* @param instanceIds The instance IDs to evaluate.
|
115
|
-
*/
|
116
|
-
evaluateCompositeInstances(allInstances: InstanceModel[], instanceIds: string[]): Promise<readonly CompositeInstance[]>;
|
117
|
-
/**
|
118
|
-
* Evaluates the modules and returns the evaluated instances.
|
119
|
-
*
|
120
|
-
* @param modulePaths The module paths to evaluate.
|
121
|
-
*/
|
122
|
-
evaluateModules(modulePaths: string[]): Promise<readonly InstanceModel[]>;
|
123
|
-
}
|
124
|
-
|
125
|
-
declare const libraryBackendConfig: z.ZodObject<{
|
126
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES: z.ZodDefault<z.ZodEffects<z.ZodString, string[], string>>;
|
127
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
128
|
-
}, "strip", z.ZodTypeAny, {
|
129
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES: string[];
|
130
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE: "local";
|
131
|
-
}, {
|
132
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES?: string | undefined;
|
133
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE?: "local" | undefined;
|
134
|
-
}>;
|
135
|
-
declare function createLibraryBackend(config: z.infer<typeof libraryBackendConfig>, logger: Logger): LibraryBackend;
|
136
|
-
|
137
|
-
declare const configSchema: z.ZodObject<{
|
138
|
-
HIGHSTATE_BACKEND_LOGGER_NAME: z.ZodDefault<z.ZodString>;
|
139
|
-
HIGHSTATE_BACKEND_LOGGER_LEVEL: z.ZodDefault<z.ZodEnum<["fatal", "error", "warn", "info", "debug", "trace"]>>;
|
140
|
-
HIGHSTATE_BACKEND_WORKSPACE_LOCAL_DIR: z.ZodOptional<z.ZodString>;
|
141
|
-
HIGHSTATE_BACKEND_WORKSPACE_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
142
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY: z.ZodDefault<z.ZodString>;
|
143
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST: z.ZodOptional<z.ZodString>;
|
144
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE: z.ZodDefault<z.ZodEnum<["docker"]>>;
|
145
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_SOURCE_CHECK: z.ZodDefault<z.ZodBoolean>;
|
146
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_STATE_CHECK: z.ZodDefault<z.ZodBoolean>;
|
147
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_PRINT_OUTPUT: z.ZodDefault<z.ZodBoolean>;
|
148
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SOURCE_BASE_PATH: z.ZodOptional<z.ZodString>;
|
149
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_CACHE_DIR: z.ZodOptional<z.ZodString>;
|
150
|
-
HIGHSTATE_BACKEND_RUNNER_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
151
|
-
HIGHSTATE_BACKEND_STATE_LOCAL_DIR: z.ZodOptional<z.ZodString>;
|
152
|
-
HIGHSTATE_BACKEND_STATE_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
153
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH: z.ZodOptional<z.ZodString>;
|
154
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME: z.ZodOptional<z.ZodString>;
|
155
|
-
HIGHSTATE_BACKEND_SECRET_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
156
|
-
HIGHSTATE_BACKEND_PROJECT_PROJECTS_DIR: z.ZodOptional<z.ZodString>;
|
157
|
-
HIGHSTATE_BACKEND_PROJECT_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
158
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES: z.ZodDefault<z.ZodEffects<z.ZodString, string[], string>>;
|
159
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE: z.ZodDefault<z.ZodEnum<["local"]>>;
|
160
|
-
}, "strip", z.ZodTypeAny, {
|
161
|
-
HIGHSTATE_BACKEND_SECRET_TYPE: "local";
|
162
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES: string[];
|
163
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE: "local";
|
164
|
-
HIGHSTATE_BACKEND_PROJECT_TYPE: "local";
|
165
|
-
HIGHSTATE_BACKEND_STATE_TYPE: "local";
|
166
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_SOURCE_CHECK: boolean;
|
167
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_STATE_CHECK: boolean;
|
168
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_PRINT_OUTPUT: boolean;
|
169
|
-
HIGHSTATE_BACKEND_RUNNER_TYPE: "local";
|
170
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY: string;
|
171
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE: "docker";
|
172
|
-
HIGHSTATE_BACKEND_WORKSPACE_TYPE: "local";
|
173
|
-
HIGHSTATE_BACKEND_LOGGER_NAME: string;
|
174
|
-
HIGHSTATE_BACKEND_LOGGER_LEVEL: "fatal" | "error" | "warn" | "info" | "debug" | "trace";
|
175
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH?: string | undefined;
|
176
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME?: string | undefined;
|
177
|
-
HIGHSTATE_BACKEND_PROJECT_PROJECTS_DIR?: string | undefined;
|
178
|
-
HIGHSTATE_BACKEND_STATE_LOCAL_DIR?: string | undefined;
|
179
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SOURCE_BASE_PATH?: string | undefined;
|
180
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_CACHE_DIR?: string | undefined;
|
181
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST?: string | undefined;
|
182
|
-
HIGHSTATE_BACKEND_WORKSPACE_LOCAL_DIR?: string | undefined;
|
183
|
-
}, {
|
184
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_PATH?: string | undefined;
|
185
|
-
HIGHSTATE_BACKEND_SECRET_PROJECT_NAME?: string | undefined;
|
186
|
-
HIGHSTATE_BACKEND_SECRET_TYPE?: "local" | undefined;
|
187
|
-
HIGHSTATE_BACKEND_LIBRARY_LOCAL_MODULES?: string | undefined;
|
188
|
-
HIGHSTATE_BACKEND_LIBRARY_TYPE?: "local" | undefined;
|
189
|
-
HIGHSTATE_BACKEND_PROJECT_PROJECTS_DIR?: string | undefined;
|
190
|
-
HIGHSTATE_BACKEND_PROJECT_TYPE?: "local" | undefined;
|
191
|
-
HIGHSTATE_BACKEND_STATE_LOCAL_DIR?: string | undefined;
|
192
|
-
HIGHSTATE_BACKEND_STATE_TYPE?: "local" | undefined;
|
193
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_SOURCE_CHECK?: boolean | undefined;
|
194
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SKIP_STATE_CHECK?: boolean | undefined;
|
195
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_PRINT_OUTPUT?: boolean | undefined;
|
196
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_SOURCE_BASE_PATH?: string | undefined;
|
197
|
-
HIGHSTATE_BACKEND_RUNNER_LOCAL_CACHE_DIR?: string | undefined;
|
198
|
-
HIGHSTATE_BACKEND_RUNNER_TYPE?: "local" | undefined;
|
199
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY?: string | undefined;
|
200
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST?: string | undefined;
|
201
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE?: "docker" | undefined;
|
202
|
-
HIGHSTATE_BACKEND_WORKSPACE_LOCAL_DIR?: string | undefined;
|
203
|
-
HIGHSTATE_BACKEND_WORKSPACE_TYPE?: "local" | undefined;
|
204
|
-
HIGHSTATE_BACKEND_LOGGER_NAME?: string | undefined;
|
205
|
-
HIGHSTATE_BACKEND_LOGGER_LEVEL?: "fatal" | "error" | "warn" | "info" | "debug" | "trace" | undefined;
|
206
|
-
}>;
|
207
|
-
type Config = z.infer<typeof configSchema>;
|
208
|
-
declare function loadConfig(env?: NodeJS.ProcessEnv, useDotenv?: boolean): Promise<Config>;
|
209
|
-
|
210
|
-
type ProjectModel = {
|
211
|
-
instances: InstanceModel[];
|
212
|
-
hubs: HubModel[];
|
213
|
-
};
|
214
|
-
interface ProjectBackend {
|
215
|
-
/**
|
216
|
-
* List the names of the available projects.
|
217
|
-
*/
|
218
|
-
getProjectNames(): Promise<string[]>;
|
219
|
-
/**
|
220
|
-
* Get the instances and hubs of the project.
|
221
|
-
*
|
222
|
-
* @param projectId The ID of the project.
|
223
|
-
*/
|
224
|
-
getProject(projectId: string): Promise<ProjectModel>;
|
225
|
-
/**
|
226
|
-
* Create an empty project.
|
227
|
-
*
|
228
|
-
* @param projectId The ID of the project.
|
229
|
-
*/
|
230
|
-
createProject(projectId: string): Promise<void>;
|
231
|
-
/**
|
232
|
-
* Create the instance of the project.
|
233
|
-
*
|
234
|
-
* @param projectId The ID of the project.
|
235
|
-
* @param instance The instance to update.
|
236
|
-
*/
|
237
|
-
createInstance(projectId: string, instance: InstanceModel): Promise<InstanceModel>;
|
238
|
-
/**
|
239
|
-
* Rename the instance of the project.
|
240
|
-
* Changes its id and updates all references to the instance.
|
241
|
-
* Potentially dangerous, but safe when the instance is not yet created.
|
242
|
-
*/
|
243
|
-
renameInstance(projectId: string, instanceId: string, newName: string): Promise<InstanceModel>;
|
244
|
-
/**
|
245
|
-
* Patches the instance of the project.
|
246
|
-
*
|
247
|
-
* @param projectId The ID of the project.
|
248
|
-
* @param instanceId The ID of the instance to update.
|
249
|
-
* @param patch The patch to apply to the instance.
|
250
|
-
*/
|
251
|
-
updateInstance(projectId: string, instanceId: string, patch: InstanceModelPatch): Promise<InstanceModel>;
|
252
|
-
/**
|
253
|
-
* Delete the instance of the project.
|
254
|
-
*
|
255
|
-
* @param projectId The ID of the project.
|
256
|
-
* @param instanceId The ID of the instance to delete.
|
257
|
-
*/
|
258
|
-
deleteInstance(projectId: string, instanceId: string): Promise<void>;
|
259
|
-
/**
|
260
|
-
* Create a hub in the project.
|
261
|
-
*
|
262
|
-
* @param projectId The ID of the project.
|
263
|
-
* @param hub The hub to create.
|
264
|
-
*/
|
265
|
-
createHub(projectId: string, hub: HubModel): Promise<HubModel>;
|
266
|
-
/**
|
267
|
-
* Patches the hub of the project.
|
268
|
-
*
|
269
|
-
* @param projectId The ID of the project.
|
270
|
-
* @param hubId The ID of the hub to update.
|
271
|
-
* @param patch The patch to apply to the hub.
|
272
|
-
*/
|
273
|
-
updateHub(projectId: string, hubId: string, patch: HubModelPatch): Promise<HubModel>;
|
274
|
-
/**
|
275
|
-
* Delete the hub of the project.
|
276
|
-
*
|
277
|
-
* @param projectId The ID of the project.
|
278
|
-
* @param hubId The ID of the hub to delete.
|
279
|
-
*/
|
280
|
-
deleteHub(projectId: string, hubId: string): Promise<void>;
|
281
|
-
}
|
282
|
-
|
283
|
-
declare class ProjectLock {
|
284
|
-
private readonly lock;
|
285
|
-
private readonly projectId;
|
286
|
-
constructor(lock: BetterLock, projectId: string);
|
287
|
-
canImmediatelyAcquireLock(instanceId: string): boolean;
|
288
|
-
lockInstance<T>(instanceId: string, fn: () => Promise<T>): Promise<T>;
|
289
|
-
lockInstances<T>(instanceIds: string[], fn: () => Promise<T>): Promise<T>;
|
290
|
-
}
|
291
|
-
declare class ProjectLockManager {
|
292
|
-
private readonly lock;
|
293
|
-
getLock(projectId: string): ProjectLock;
|
294
|
-
}
|
295
|
-
|
296
|
-
type LogEntry = [instanceId: string, line: string];
|
297
|
-
type TerminalHistoryEntry = [sessionId: string, line: string];
|
298
|
-
type EvaluatedCompositeInstance = CompositeInstance & {
|
299
|
-
/**
|
300
|
-
* The hash of the input of the instance at the moment of the evaluation.
|
301
|
-
*/
|
302
|
-
inputHash: string;
|
303
|
-
};
|
304
|
-
interface StateBackend {
|
305
|
-
/**
|
306
|
-
* Gets the active operations which are not completed or failed.
|
307
|
-
*/
|
308
|
-
getActiveOperations(): Promise<ProjectOperation[]>;
|
309
|
-
/**
|
310
|
-
* Gets recent operations of the project.
|
311
|
-
* If `beforeOperationId` is provided, returns the operations before the specified operation ID.
|
312
|
-
* The page size is fixed to 10.
|
313
|
-
*
|
314
|
-
* @param projectId The ID of the project.
|
315
|
-
* @param beforeOperationId The ID of the operation to get the operations before.
|
316
|
-
*/
|
317
|
-
getOperations(projectId: string, beforeOperationId?: string): Promise<ProjectOperation[]>;
|
318
|
-
/**
|
319
|
-
* Gets the current (cached) instance states of the project.
|
320
|
-
* Actual states should be retrieved from the runner (and they are still may not be up-to-date).
|
321
|
-
*
|
322
|
-
* @param projectId The ID of the project.
|
323
|
-
*/
|
324
|
-
getInstanceStates(projectId: string): Promise<InstanceState[]>;
|
325
|
-
/**
|
326
|
-
* Gets the current (cached) state of the instance.
|
327
|
-
*
|
328
|
-
* @param projectId The ID of the project.
|
329
|
-
* @param instanceId The ID of the instance.
|
330
|
-
*/
|
331
|
-
getInstanceState(projectId: string, instanceId: string): Promise<InstanceState | null>;
|
332
|
-
/**
|
333
|
-
* Gets the affected instance states at the moment of the operation completion.
|
334
|
-
* The logs are not included.
|
335
|
-
*
|
336
|
-
* @param operationId The ID of the operation.
|
337
|
-
*/
|
338
|
-
getAffectedInstanceStates(operationId: string): Promise<InstanceState[]>;
|
339
|
-
/**
|
340
|
-
* Gets the full logs of the instance at the moment of the operation completion.
|
341
|
-
*
|
342
|
-
* @param operationId The ID of the operation.
|
343
|
-
* @param instanceId The ID of the instance.
|
344
|
-
*/
|
345
|
-
getInstanceLogs(operationId: string, instanceId: string): Promise<string[]>;
|
346
|
-
/**
|
347
|
-
* Puts the operation to the state.
|
348
|
-
* The operation must have a unique ID sortable chronologically.
|
349
|
-
* Also, the operation must have the project ID.
|
350
|
-
*
|
351
|
-
* @param operation The operation to put.
|
352
|
-
*/
|
353
|
-
putOperation(operation: ProjectOperation): Promise<void>;
|
354
|
-
/**
|
355
|
-
* Puts the instance states affected by the operation to the state.
|
356
|
-
*
|
357
|
-
* @param projectId The ID of the project.
|
358
|
-
* @param operationId The ID of the operation.
|
359
|
-
* @param states The instance states to put.
|
360
|
-
*/
|
361
|
-
putAffectedInstanceStates(projectId: string, operationId: string, states: InstanceState[]): Promise<void>;
|
362
|
-
/**
|
363
|
-
* Puts the instance states of the project to the state.
|
364
|
-
*
|
365
|
-
* @param projectId The ID of the project.
|
366
|
-
* @param states The instance states to put.
|
367
|
-
*/
|
368
|
-
putInstanceStates(projectId: string, states: InstanceState[]): Promise<void>;
|
369
|
-
/**
|
370
|
-
* Appends the log lines to the instance logs.
|
371
|
-
*
|
372
|
-
* @param operationId The ID of the operation.
|
373
|
-
* @param logs The logs to append. Each log is a tuple of the instance ID and the log line.
|
374
|
-
*/
|
375
|
-
appendInstanceLogs(operationId: string, logs: LogEntry[]): Promise<void>;
|
376
|
-
/**
|
377
|
-
* Gets the evaluated composite instance.
|
378
|
-
*
|
379
|
-
* @param projectId The ID of the project.
|
380
|
-
* @param instanceId The ID of the instance.
|
381
|
-
*/
|
382
|
-
getCompositeInstance(projectId: string, instanceId: string): Promise<EvaluatedCompositeInstance | null>;
|
383
|
-
/**
|
384
|
-
* Gets the input hash of the evaluated composite instance.
|
385
|
-
*
|
386
|
-
* @param projectId The ID of the project.
|
387
|
-
* @param instanceId The ID of the instance.
|
388
|
-
*/
|
389
|
-
getCompositeInstanceInputHash(projectId: string, instanceId: string): Promise<string | null>;
|
390
|
-
/**
|
391
|
-
* Puts the evaluated composite instances of the project to the state.
|
392
|
-
*
|
393
|
-
* @param projectId The ID of the project.
|
394
|
-
* @param instances The instances to put.
|
395
|
-
*/
|
396
|
-
putCompositeInstances(projectId: string, instances: EvaluatedCompositeInstance[]): Promise<void>;
|
397
|
-
/**
|
398
|
-
* Clears the evaluation state of the instance.
|
399
|
-
*
|
400
|
-
* @param projectId The ID of the project.
|
401
|
-
* @param instanceIds The IDs of the instances to clear.
|
402
|
-
*/
|
403
|
-
clearCompositeInstances(projectId: string, instanceIds: string[]): Promise<void>;
|
404
|
-
/**
|
405
|
-
* Gets all the terminal sessions of the instance.
|
406
|
-
*
|
407
|
-
* @param projectId The ID of the project.
|
408
|
-
* @param instanceId The ID of the instance.
|
409
|
-
*/
|
410
|
-
getTerminalSessions(projectId: string, instanceId: string): Promise<TerminalSession[]>;
|
411
|
-
/**
|
412
|
-
* Gets the terminal session.
|
413
|
-
*
|
414
|
-
* @param projectId The ID of the project.
|
415
|
-
* @param instanceId The ID of the instance.
|
416
|
-
* @param sessionId The ID of the session.
|
417
|
-
*/
|
418
|
-
getTerminalSession(projectId: string, instanceId: string, sessionId: string): Promise<TerminalSession | null>;
|
419
|
-
/**
|
420
|
-
* Puts the terminal sessions of the instance to the state.
|
421
|
-
*
|
422
|
-
* @param projectId The ID of the project.
|
423
|
-
* @param instanceId The ID of the instance.
|
424
|
-
* @param session The terminal session to put.
|
425
|
-
*/
|
426
|
-
putTerminalSession(projectId: string, instanceId: string, session: TerminalSession): Promise<void>;
|
427
|
-
/**
|
428
|
-
* Gets the history lines of the terminal session.
|
429
|
-
*
|
430
|
-
* @param sessionId The ID of the session.
|
431
|
-
*/
|
432
|
-
getTerminalSessionHistory(sessionId: string): Promise<string[]>;
|
433
|
-
/**
|
434
|
-
* Appends the history lines to the terminal sessions.
|
435
|
-
*
|
436
|
-
* @param entries The entries to append.
|
437
|
-
*/
|
438
|
-
appendTerminalSessionHistory(entries: TerminalHistoryEntry[]): Promise<void>;
|
439
|
-
}
|
440
|
-
|
441
|
-
declare class ProjectManager {
|
442
|
-
private readonly projectBackend;
|
443
|
-
private readonly stateBackend;
|
444
|
-
private readonly operationManager;
|
445
|
-
private readonly library;
|
446
|
-
private readonly logger;
|
447
|
-
private constructor();
|
448
|
-
getCompositeInstance(projectId: string, instanceId: string): Promise<CompositeInstance>;
|
449
|
-
createInstance(projectId: string, instance: InstanceModel): Promise<InstanceModel>;
|
450
|
-
updateInstance(projectId: string, instanceId: string, patch: InstanceModelPatch): Promise<InstanceModel>;
|
451
|
-
renameInstance(projectId: string, instanceId: string, newName: string): Promise<InstanceModel>;
|
452
|
-
deleteInstance(projectId: string, instanceId: string): Promise<void>;
|
453
|
-
private updateInstanceChildren;
|
454
|
-
private waitForCompositeInstance;
|
455
|
-
private prepareInputHashResolver;
|
456
|
-
static create(projectBackend: ProjectBackend, stateBackend: StateBackend, operationManager: OperationManager, library: LibraryBackend, logger: Logger): ProjectManager;
|
457
|
-
}
|
458
|
-
|
459
|
-
type RunnerBaseOptions = {
|
460
|
-
/**
|
461
|
-
* The HighState project ID.
|
462
|
-
*/
|
463
|
-
projectId: string;
|
464
|
-
/**
|
465
|
-
* The type of the instance to run.
|
466
|
-
*/
|
467
|
-
instanceType: string;
|
468
|
-
/**
|
469
|
-
* The name of the instance to run.
|
470
|
-
*/
|
471
|
-
instanceName: string;
|
472
|
-
/**
|
473
|
-
* The signal to abort the operation.
|
474
|
-
*/
|
475
|
-
signal?: AbortSignal;
|
476
|
-
};
|
477
|
-
type InstanceUpdateOptions = RunnerBaseOptions & {
|
478
|
-
/**
|
479
|
-
* The source of the unit.
|
480
|
-
*/
|
481
|
-
source: UnitSource;
|
482
|
-
/**
|
483
|
-
* The configuration of the stack.
|
484
|
-
*/
|
485
|
-
config: Record<string, string>;
|
486
|
-
/**
|
487
|
-
* The values of the secrets.
|
488
|
-
*/
|
489
|
-
secrets: Record<string, string>;
|
490
|
-
/**
|
491
|
-
* Whether to refresh the state before updating.
|
492
|
-
*/
|
493
|
-
refresh?: boolean;
|
494
|
-
};
|
495
|
-
type InstanceDestroyOptions = RunnerBaseOptions & {
|
496
|
-
/**
|
497
|
-
* The source of the unit.
|
498
|
-
*/
|
499
|
-
source: UnitSource;
|
500
|
-
/**
|
501
|
-
* Whether to refresh the state before updating.
|
502
|
-
*/
|
503
|
-
refresh?: boolean;
|
504
|
-
/**
|
505
|
-
* Whether to delete the unreachable resources (e.g. k8s resources in unreachable clusters).
|
506
|
-
*/
|
507
|
-
deleteUnreachable?: boolean;
|
508
|
-
};
|
509
|
-
type InstanceWatchOptions = RunnerBaseOptions & {
|
510
|
-
/**
|
511
|
-
* The final statuses to watch.
|
512
|
-
* If the instance reaches one of these statuses, it should return the current state and exit.
|
513
|
-
*/
|
514
|
-
finalStatuses?: InstanceStatus[];
|
515
|
-
};
|
516
|
-
interface RunnerBackend {
|
517
|
-
/**
|
518
|
-
* Watches the instance state.
|
519
|
-
*
|
520
|
-
* Returns the async iterable of the instance state patches.
|
521
|
-
* The fields with `undefined` values should be ignored, and the fields with `null` values should be removed.
|
522
|
-
*/
|
523
|
-
watch(options: InstanceWatchOptions): AsyncIterable<InstanceStatePatch>;
|
524
|
-
/**
|
525
|
-
* Gets the actual state of the instance.
|
526
|
-
*/
|
527
|
-
getState(options: RunnerBaseOptions): Promise<InstanceState>;
|
528
|
-
/**
|
529
|
-
* Gets the content of the page.
|
530
|
-
*/
|
531
|
-
getPageContent(options: RunnerBaseOptions, pageName: string): Promise<InstancePageBlock[] | null>;
|
532
|
-
/**
|
533
|
-
* Gets the content of the file.
|
534
|
-
*/
|
535
|
-
getFileContent(options: RunnerBaseOptions, fileName: string): Promise<string | null>;
|
536
|
-
/**
|
537
|
-
* Gets the terminal factory.
|
538
|
-
*/
|
539
|
-
getTerminalFactory(options: RunnerBaseOptions, terminalName: string): Promise<InstanceTerminal | null>;
|
540
|
-
/**
|
541
|
-
* Updates the instance.
|
542
|
-
*
|
543
|
-
* The operation must only be aborted by the signal, not even when the connection is closed.
|
544
|
-
* If the instance is already updating, it should exit immediately.
|
545
|
-
* If the instance is running another operation, it should throw an error.
|
546
|
-
*/
|
547
|
-
update(options: InstanceUpdateOptions): Promise<void>;
|
548
|
-
/**
|
549
|
-
* Previews the instance update without actually applying the changes.
|
550
|
-
*
|
551
|
-
* The operation must only be aborted by the signal, not even when the connection is closed.
|
552
|
-
* If the instance is already updating, it should exit immediately.
|
553
|
-
* If the instance is running another operation, it should throw an error.
|
554
|
-
*/
|
555
|
-
preview(options: InstanceUpdateOptions): Promise<void>;
|
556
|
-
/**
|
557
|
-
* Destroys the instance.
|
558
|
-
*
|
559
|
-
* The operation must only be aborted by the signal, not even when the connection is closed.
|
560
|
-
* If the instance is not created, it should exit immediately.
|
561
|
-
* If the instance is running another operation, it should throw an error.
|
562
|
-
*/
|
563
|
-
destroy(options: InstanceDestroyOptions): Promise<void>;
|
564
|
-
/**
|
565
|
-
* Refreshes the instance.
|
566
|
-
*
|
567
|
-
* The operation must only be aborted by the signal, not even when the connection is closed.
|
568
|
-
* If the instance is not created, it should exit immediately.
|
569
|
-
* If the instance is running another operation, it should throw an error.
|
570
|
-
* If the instance is not running, it should exit immediately.
|
571
|
-
*/
|
572
|
-
refresh(options: RunnerBaseOptions): Promise<void>;
|
573
|
-
}
|
574
|
-
|
575
|
-
type OperationEvents = Record<string, [ProjectOperation]>;
|
576
|
-
type StateEvents = Record<string, [Partial<InstanceState>]>;
|
577
|
-
type CompositeInstanceEvents = Record<string, [CompositeInstance]>;
|
578
|
-
type InstanceLogsEvents = Record<string, [string]>;
|
579
|
-
declare class OperationManager {
|
580
|
-
private readonly runnerBackend;
|
581
|
-
private readonly stateBackend;
|
582
|
-
private readonly libraryBackend;
|
583
|
-
private readonly projectBackend;
|
584
|
-
private readonly secretBackend;
|
585
|
-
private readonly projectLockManager;
|
586
|
-
private readonly logger;
|
587
|
-
constructor(runnerBackend: RunnerBackend, stateBackend: StateBackend, libraryBackend: LibraryBackend, projectBackend: ProjectBackend, secretBackend: SecretBackend, projectLockManager: ProjectLockManager, logger: Logger);
|
588
|
-
private readonly operationEE;
|
589
|
-
private readonly stateEE;
|
590
|
-
private readonly compositeInstanceEE;
|
591
|
-
private readonly instanceLogsEE;
|
592
|
-
private readonly runtimeOperations;
|
593
|
-
/**
|
594
|
-
* Watches for all instance state changes in the project.
|
595
|
-
*
|
596
|
-
* @param projectId The project ID to watch.
|
597
|
-
* @param signal The signal to abort the operation.
|
598
|
-
*/
|
599
|
-
watchInstanceStates(projectId: string, signal?: AbortSignal): AsyncIterable<Partial<InstanceState>>;
|
600
|
-
/**
|
601
|
-
* Watches for all project operations in the project.
|
602
|
-
*
|
603
|
-
* @param projectId The project ID to watch.
|
604
|
-
* @param signal The signal to abort the operation.
|
605
|
-
*/
|
606
|
-
watchOperations(projectId: string, signal?: AbortSignal): AsyncIterable<ProjectOperation>;
|
607
|
-
/**
|
608
|
-
* Watches for changes in the composite instance.
|
609
|
-
*
|
610
|
-
* @param projectId The project ID to watch.
|
611
|
-
* @param instanceId The instance ID to watch.
|
612
|
-
* @param signal The signal to abort the operation.
|
613
|
-
*/
|
614
|
-
watchCompositeInstance(projectId: string, instanceId: string, signal?: AbortSignal): AsyncIterable<CompositeInstance>;
|
615
|
-
/**
|
616
|
-
* Watches for logs of the instance in the operation.
|
617
|
-
*
|
618
|
-
* @param operationId The operation ID to watch.
|
619
|
-
* @param instanceId The instance ID to watch.
|
620
|
-
* @param signal The signal to abort the operation.
|
621
|
-
*/
|
622
|
-
watchInstanceLogs(operationId: string, instanceId: string, signal?: AbortSignal): AsyncIterable<string>;
|
623
|
-
/**
|
624
|
-
* Launches the project operation.
|
625
|
-
*
|
626
|
-
* @param request The operation request to launch.
|
627
|
-
*/
|
628
|
-
launch(request: ProjectOperationRequest): Promise<ProjectOperation>;
|
629
|
-
/**
|
630
|
-
* Cancels the current operation.
|
631
|
-
* Does nothing if no operation is running.
|
632
|
-
*/
|
633
|
-
cancel(operationId: string): void;
|
634
|
-
private startOperation;
|
635
|
-
static create(runnerBackend: RunnerBackend, stateBackend: StateBackend, libraryBackend: LibraryBackend, projectBackend: ProjectBackend, secretBackend: SecretBackend, projectLockManager: ProjectLockManager, logger: Logger): Promise<OperationManager>;
|
636
|
-
}
|
637
|
-
|
638
|
-
type TerminalRunOptions = {
|
639
|
-
/**
|
640
|
-
* The factory to use.
|
641
|
-
*/
|
642
|
-
factory: InstanceTerminal;
|
643
|
-
/**
|
644
|
-
* The input stream.
|
645
|
-
*/
|
646
|
-
stdin: Stream;
|
647
|
-
/**
|
648
|
-
* The output stream.
|
649
|
-
*/
|
650
|
-
stdout: NodeJS.WritableStream;
|
651
|
-
/**
|
652
|
-
* The signal to abort the terminal.
|
653
|
-
*/
|
654
|
-
signal?: AbortSignal;
|
655
|
-
};
|
656
|
-
interface TerminalBackend {
|
657
|
-
/**
|
658
|
-
* Creates a new terminal and runs it.
|
659
|
-
*
|
660
|
-
* @param options The options.
|
661
|
-
*/
|
662
|
-
run(options: TerminalRunOptions): Promise<void>;
|
663
|
-
}
|
664
|
-
|
665
|
-
declare const terminalBackendConfig: z.ZodObject<{
|
666
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY: z.ZodDefault<z.ZodString>;
|
667
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST: z.ZodOptional<z.ZodString>;
|
668
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE: z.ZodDefault<z.ZodEnum<["docker"]>>;
|
669
|
-
}, "strip", z.ZodTypeAny, {
|
670
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY: string;
|
671
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE: "docker";
|
672
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST?: string | undefined;
|
673
|
-
}, {
|
674
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_BINARY?: string | undefined;
|
675
|
-
HIGHSTATE_BACKEND_TERMINAL_DOCKER_HOST?: string | undefined;
|
676
|
-
HIGHSTATE_BACKEND_TERMINAL_TYPE?: "docker" | undefined;
|
677
|
-
}>;
|
678
|
-
declare function createTerminalBackend(config: z.infer<typeof terminalBackendConfig>, logger: Logger): TerminalBackend;
|
679
|
-
|
680
|
-
declare class TerminalManager {
|
681
|
-
private readonly terminalBackend;
|
682
|
-
private readonly stateBackend;
|
683
|
-
private readonly runnerBackend;
|
684
|
-
private readonly logger;
|
685
|
-
private readonly managedTerminals;
|
686
|
-
private constructor();
|
687
|
-
createSession(projectId: string, instanceId: string, terminalName: string): Promise<TerminalSession>;
|
688
|
-
ensureSessionCreated(projectId: string, instanceId: string, terminalName: string): Promise<TerminalSession>;
|
689
|
-
close(sessionId: string): void;
|
690
|
-
attach(projectId: string, instanceId: string, sessionId: string, stdin: Stream, stdout: Writable, signal: AbortSignal): Promise<void>;
|
691
|
-
private createManagedTerminal;
|
692
|
-
private closeTerminalIfNotAttached;
|
693
|
-
static create(terminalBackend: TerminalBackend, stateBackend: StateBackend, runnerBackend: RunnerBackend, logger: Logger): TerminalManager;
|
694
|
-
private persistHistory;
|
695
|
-
}
|
696
|
-
|
697
|
-
interface WorkspaceBackend {
|
698
|
-
/**
|
699
|
-
* Gets the layout of the workspace.
|
700
|
-
*/
|
701
|
-
getWorkspaceLayout(): Promise<unknown>;
|
702
|
-
/**
|
703
|
-
* Sets the layout of the workspace.
|
704
|
-
*/
|
705
|
-
setWorkspaceLayout(layout: unknown): Promise<void>;
|
706
|
-
/**
|
707
|
-
* Gets the viewport of the project.
|
708
|
-
*
|
709
|
-
* @param projectId The ID of the project.
|
710
|
-
*/
|
711
|
-
getProjectViewport(projectId: string): Promise<unknown>;
|
712
|
-
/**
|
713
|
-
* Sets the viewport of the project.
|
714
|
-
*
|
715
|
-
* @param projectId The ID of the project.
|
716
|
-
*/
|
717
|
-
setProjectViewport(projectId: string, viewport: unknown): Promise<void>;
|
718
|
-
/**
|
719
|
-
* Gets the viewport of the composite instance.
|
720
|
-
*
|
721
|
-
* @param projectId The ID of the project.
|
722
|
-
* @param instanceId The ID of the instance.
|
723
|
-
*/
|
724
|
-
getInstanceViewport(projectId: string, instanceId: string): Promise<unknown>;
|
725
|
-
/**
|
726
|
-
* Sets the viewport of the composite instance.
|
727
|
-
*
|
728
|
-
* @param projectId The ID of the project.
|
729
|
-
* @param instanceId The ID of the instance.
|
730
|
-
*/
|
731
|
-
setInstanceViewport(projectId: string, instanceId: string, viewport: unknown): Promise<void>;
|
732
|
-
}
|
733
|
-
|
734
|
-
type Services = {
|
735
|
-
readonly logger: Logger;
|
736
|
-
readonly libraryBackend: LibraryBackend;
|
737
|
-
readonly secretBackend: SecretBackend;
|
738
|
-
readonly runnerBackend: RunnerBackend;
|
739
|
-
readonly projectBackend: ProjectBackend;
|
740
|
-
readonly projectManager: ProjectManager;
|
741
|
-
readonly stateBackend: StateBackend;
|
742
|
-
readonly operationManager: OperationManager;
|
743
|
-
readonly terminalBackend: TerminalBackend;
|
744
|
-
readonly terminalManager: TerminalManager;
|
745
|
-
readonly workspaceBackend: WorkspaceBackend;
|
746
|
-
};
|
747
|
-
interface CreateServicesOptions {
|
748
|
-
/**
|
749
|
-
* The config to use. If not provided, it will be loaded from the environment.
|
750
|
-
*/
|
751
|
-
readonly config?: Config;
|
752
|
-
/**
|
753
|
-
* The already created services to use. If the particular service is not provided, it will be created.
|
754
|
-
*/
|
755
|
-
readonly services?: Partial<Services>;
|
756
|
-
}
|
757
|
-
declare function createServices({ config, services: { logger, libraryBackend, secretBackend, runnerBackend, projectBackend, projectManager, stateBackend, operationManager, terminalBackend, terminalManager, workspaceBackend, }, }?: CreateServicesOptions): Promise<Services>;
|
758
|
-
declare function getSharedServices(options?: CreateServicesOptions): Promise<Services>;
|
759
|
-
|
760
|
-
export { type CompositeInstanceEvents, type Config, type CreateServicesOptions, type InstanceLogsEvents, type LibraryBackend, type LibraryModel, type OperationEvents, OperationManager, SecretAccessDeniedError, type SecretBackend, type Services, type StateEvents, type TerminalBackend, TerminalManager, type TerminalRunOptions, createLibraryBackend, createSecretBackend, createServices, createTerminalBackend, getSharedServices, libraryBackendConfig, loadConfig, secretBackendConfig, terminalBackendConfig };
|