hereya-cli 0.89.1 → 0.91.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/README.md +88 -75
- package/dist/backend/cloud/cloud-backend/apps-deploy.d.ts +69 -0
- package/dist/backend/cloud/cloud-backend/apps-deploy.js +94 -0
- package/dist/backend/cloud/cloud-backend/apps-versions.d.ts +69 -0
- package/dist/backend/cloud/cloud-backend/apps-versions.js +113 -0
- package/dist/backend/cloud/cloud-backend/executor-broker.d.ts +25 -0
- package/dist/backend/cloud/cloud-backend/executor-broker.js +38 -0
- package/dist/backend/cloud/cloud-backend/executor-jobs.d.ts +75 -0
- package/dist/backend/cloud/cloud-backend/executor-jobs.js +110 -0
- package/dist/backend/cloud/cloud-backend/misc.d.ts +5 -0
- package/dist/backend/cloud/cloud-backend/misc.js +78 -0
- package/dist/backend/cloud/cloud-backend/packages-publish.d.ts +3 -0
- package/dist/backend/cloud/cloud-backend/packages-publish.js +99 -0
- package/dist/backend/cloud/cloud-backend/packages-registry.d.ts +6 -0
- package/dist/backend/cloud/cloud-backend/packages-registry.js +146 -0
- package/dist/backend/cloud/cloud-backend/packages-workspace.d.ts +4 -0
- package/dist/backend/cloud/cloud-backend/packages-workspace.js +50 -0
- package/dist/backend/cloud/cloud-backend/projects.d.ts +7 -0
- package/dist/backend/cloud/cloud-backend/projects.js +122 -0
- package/dist/backend/cloud/cloud-backend/state.d.ts +6 -0
- package/dist/backend/cloud/cloud-backend/state.js +86 -0
- package/dist/backend/cloud/cloud-backend/utils.d.ts +55 -0
- package/dist/backend/cloud/cloud-backend/utils.js +56 -0
- package/dist/backend/cloud/cloud-backend/workspace-env.d.ts +5 -0
- package/dist/backend/cloud/cloud-backend/workspace-env.js +63 -0
- package/dist/backend/cloud/cloud-backend/workspaces.d.ts +7 -0
- package/dist/backend/cloud/cloud-backend/workspaces.js +124 -0
- package/dist/backend/cloud/cloud-backend.d.ts +59 -126
- package/dist/backend/cloud/cloud-backend.js +100 -1087
- package/dist/backend/cloud/cloud-backend.test.setup.d.ts +13 -0
- package/dist/backend/cloud/cloud-backend.test.setup.js +14 -0
- package/dist/backend/common.d.ts +2 -2
- package/dist/backend/local.setup.d.ts +10 -0
- package/dist/backend/local.setup.js +20 -0
- package/dist/commands/executor/start/index.d.ts +4 -11
- package/dist/commands/executor/start/index.js +118 -520
- package/dist/commands/workspace/executor/install/index.d.ts +3 -0
- package/dist/commands/workspace/executor/install/index.js +210 -76
- package/dist/commands/workspace/executor/uninstall/index.d.ts +1 -0
- package/dist/commands/workspace/executor/uninstall/index.js +30 -4
- package/dist/executor/local.d.ts +0 -1
- package/dist/executor/local.js +10 -62
- package/dist/executor/resolve-env.d.ts +88 -0
- package/dist/executor/resolve-env.js +77 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/infrastructure/index.d.ts +12 -16
- package/dist/infrastructure/index.js +18 -25
- package/dist/infrastructure/registry.d.ts +38 -0
- package/dist/infrastructure/registry.js +61 -0
- package/dist/lib/env/test.setup.d.ts +7 -0
- package/dist/lib/env/test.setup.js +18 -0
- package/dist/lib/executor-start/auth.d.ts +2 -0
- package/dist/lib/executor-start/auth.js +21 -0
- package/dist/lib/executor-start/execute-app-job.d.ts +13 -0
- package/dist/lib/executor-start/execute-app-job.js +146 -0
- package/dist/lib/executor-start/execute-deploy-job.d.ts +14 -0
- package/dist/lib/executor-start/execute-deploy-job.js +64 -0
- package/dist/lib/executor-start/execute-init-job.d.ts +14 -0
- package/dist/lib/executor-start/execute-init-job.js +135 -0
- package/dist/lib/executor-start/format.d.ts +13 -0
- package/dist/lib/executor-start/format.js +22 -0
- package/dist/lib/executor-start/job-dispatch.d.ts +15 -0
- package/dist/lib/executor-start/job-dispatch.js +89 -0
- package/dist/lib/package/index.d.ts +25 -25
- package/oclif.manifest.json +43 -3
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { resolveWorkspaceName } from '../../../lib/workspace-utils.js';
|
|
2
|
+
import { safeResponseJson } from './utils.js';
|
|
3
|
+
import { getWorkspace } from './workspaces.js';
|
|
4
|
+
export async function setEnvVar(config, input) {
|
|
5
|
+
const formData = new FormData();
|
|
6
|
+
formData.append('key', input.name);
|
|
7
|
+
formData.append('value', input.value);
|
|
8
|
+
formData.append('infrastructure', input.infrastructure);
|
|
9
|
+
const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/env`, {
|
|
10
|
+
body: formData,
|
|
11
|
+
headers: {
|
|
12
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
13
|
+
},
|
|
14
|
+
method: 'POST',
|
|
15
|
+
});
|
|
16
|
+
if (!response.ok) {
|
|
17
|
+
return {
|
|
18
|
+
reason: JSON.stringify(await safeResponseJson(response)),
|
|
19
|
+
success: false,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
success: true,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export async function unsetEnvVar(config, input) {
|
|
27
|
+
const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/env/${encodeURIComponent(input.name)}`, {
|
|
28
|
+
headers: {
|
|
29
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
30
|
+
},
|
|
31
|
+
method: 'DELETE',
|
|
32
|
+
});
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
return {
|
|
35
|
+
reason: JSON.stringify(await safeResponseJson(response)),
|
|
36
|
+
success: false,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
success: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export async function getWorkspaceEnv(config, input) {
|
|
44
|
+
// Apply org prefix if project has one and workspace doesn't
|
|
45
|
+
const workspaceName = resolveWorkspaceName(input.workspace, input.project);
|
|
46
|
+
const workspace$ = await getWorkspace(config, workspaceName);
|
|
47
|
+
if (!workspace$.found) {
|
|
48
|
+
return {
|
|
49
|
+
reason: `Workspace ${input.workspace} not found`,
|
|
50
|
+
success: false,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (workspace$.hasError) {
|
|
54
|
+
return {
|
|
55
|
+
reason: workspace$.error,
|
|
56
|
+
success: false,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
env: workspace$.workspace.env ?? {},
|
|
61
|
+
success: true,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateWorkspaceInput, CreateWorkspaceOutput, DeleteWorkspaceInput, DeleteWorkspaceOutput, GetWorkspaceOutput, ListWorkspacesInput, UpdateWorkspaceInput, UpdateWorkspaceOutput } from '../../common.js';
|
|
2
|
+
import { CloudHttpConfig } from './utils.js';
|
|
3
|
+
export declare function createWorkspace(config: CloudHttpConfig, input: CreateWorkspaceInput): Promise<CreateWorkspaceOutput>;
|
|
4
|
+
export declare function deleteWorkspace(config: CloudHttpConfig, input: DeleteWorkspaceInput): Promise<DeleteWorkspaceOutput>;
|
|
5
|
+
export declare function getWorkspace(config: CloudHttpConfig, name: string): Promise<GetWorkspaceOutput>;
|
|
6
|
+
export declare function listWorkspaces(config: CloudHttpConfig, input?: ListWorkspacesInput): Promise<string[]>;
|
|
7
|
+
export declare function updateWorkspace(config: CloudHttpConfig, input: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { convertWorkspace, safeResponseJson } from './utils.js';
|
|
2
|
+
export async function createWorkspace(config, input) {
|
|
3
|
+
const formData = new FormData();
|
|
4
|
+
formData.append('name', input.name);
|
|
5
|
+
if (input.mirrorOf) {
|
|
6
|
+
formData.append('mirrorOf', input.mirrorOf);
|
|
7
|
+
}
|
|
8
|
+
if (input.profile) {
|
|
9
|
+
formData.append('profile', input.profile);
|
|
10
|
+
}
|
|
11
|
+
if (input.isDeploy !== undefined) {
|
|
12
|
+
formData.append('isDeploy', String(input.isDeploy));
|
|
13
|
+
}
|
|
14
|
+
const response = await fetch(`${config.url}/api/workspaces`, {
|
|
15
|
+
body: formData,
|
|
16
|
+
headers: {
|
|
17
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
18
|
+
},
|
|
19
|
+
method: 'POST',
|
|
20
|
+
});
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
return {
|
|
23
|
+
reason: JSON.stringify(await safeResponseJson(response)),
|
|
24
|
+
success: false,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const result = await response.json();
|
|
28
|
+
return {
|
|
29
|
+
isNew: true,
|
|
30
|
+
success: true,
|
|
31
|
+
workspace: convertWorkspace(result.workspace),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export async function deleteWorkspace(config, input) {
|
|
35
|
+
const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.name)}`, {
|
|
36
|
+
headers: {
|
|
37
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
38
|
+
},
|
|
39
|
+
method: 'DELETE',
|
|
40
|
+
});
|
|
41
|
+
if (!response.ok) {
|
|
42
|
+
return {
|
|
43
|
+
reason: JSON.stringify(await safeResponseJson(response)),
|
|
44
|
+
success: false,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
success: true,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export async function getWorkspace(config, name) {
|
|
52
|
+
const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(name)}`, {
|
|
53
|
+
headers: {
|
|
54
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
55
|
+
},
|
|
56
|
+
method: 'GET',
|
|
57
|
+
});
|
|
58
|
+
if (response.status === 404) {
|
|
59
|
+
return {
|
|
60
|
+
found: false,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (!response.ok) {
|
|
64
|
+
const error = await safeResponseJson(response);
|
|
65
|
+
return {
|
|
66
|
+
error: JSON.stringify(error),
|
|
67
|
+
found: true,
|
|
68
|
+
hasError: true,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const result = await response.json();
|
|
72
|
+
return {
|
|
73
|
+
found: true,
|
|
74
|
+
hasError: false,
|
|
75
|
+
workspace: convertWorkspace(result.workspace),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export async function listWorkspaces(config, input) {
|
|
79
|
+
const url = new URL(`${config.url}/api/workspaces`);
|
|
80
|
+
if (input?.org) {
|
|
81
|
+
url.searchParams.set('org', input.org);
|
|
82
|
+
}
|
|
83
|
+
const response = await fetch(url.toString(), {
|
|
84
|
+
headers: {
|
|
85
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
86
|
+
},
|
|
87
|
+
method: 'GET',
|
|
88
|
+
});
|
|
89
|
+
if (!response.ok) {
|
|
90
|
+
throw new Error(JSON.stringify(await safeResponseJson(response)));
|
|
91
|
+
}
|
|
92
|
+
const result = await response.json();
|
|
93
|
+
return result.workspaces.map((workspace) => workspace.name);
|
|
94
|
+
}
|
|
95
|
+
export async function updateWorkspace(config, input) {
|
|
96
|
+
const formData = new FormData();
|
|
97
|
+
if (input.profile !== undefined) {
|
|
98
|
+
formData.append('profile', input.profile === null ? '' : input.profile);
|
|
99
|
+
}
|
|
100
|
+
if (input.hasExecutor !== undefined) {
|
|
101
|
+
formData.append('hasExecutor', input.hasExecutor === null ? '' : String(input.hasExecutor));
|
|
102
|
+
}
|
|
103
|
+
if (input.isDeploy !== undefined) {
|
|
104
|
+
formData.append('isDeploy', input.isDeploy === null ? '' : String(input.isDeploy));
|
|
105
|
+
}
|
|
106
|
+
const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.name)}`, {
|
|
107
|
+
body: formData,
|
|
108
|
+
headers: {
|
|
109
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
110
|
+
},
|
|
111
|
+
method: 'PATCH',
|
|
112
|
+
});
|
|
113
|
+
if (!response.ok) {
|
|
114
|
+
return {
|
|
115
|
+
reason: JSON.stringify(await safeResponseJson(response)),
|
|
116
|
+
success: false,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const result = await response.json();
|
|
120
|
+
return {
|
|
121
|
+
success: true,
|
|
122
|
+
workspace: convertWorkspace(result.workspace),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
@@ -1,88 +1,36 @@
|
|
|
1
1
|
import { Config } from '../../lib/config/common.js';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { Backend } from '../common.js';
|
|
3
|
+
import * as appsDeploy from './cloud-backend/apps-deploy.js';
|
|
4
|
+
import * as appsVersions from './cloud-backend/apps-versions.js';
|
|
5
|
+
import * as executorBroker from './cloud-backend/executor-broker.js';
|
|
6
|
+
import * as executorJobs from './cloud-backend/executor-jobs.js';
|
|
7
|
+
import * as misc from './cloud-backend/misc.js';
|
|
8
|
+
import * as packagesPublish from './cloud-backend/packages-publish.js';
|
|
9
|
+
import * as packagesRegistry from './cloud-backend/packages-registry.js';
|
|
10
|
+
import * as packagesWorkspace from './cloud-backend/packages-workspace.js';
|
|
11
|
+
import * as projects from './cloud-backend/projects.js';
|
|
12
|
+
import * as state from './cloud-backend/state.js';
|
|
13
|
+
import * as workspaceEnv from './cloud-backend/workspace-env.js';
|
|
14
|
+
import * as workspaces from './cloud-backend/workspaces.js';
|
|
4
15
|
interface CloudBackendConfig {
|
|
5
16
|
accessToken: string;
|
|
6
17
|
clientId: string;
|
|
7
18
|
refreshToken: string;
|
|
8
19
|
url: string;
|
|
9
20
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export interface AppVersionSummary {
|
|
16
|
-
commit?: string;
|
|
17
|
-
parameters?: Record<string, IParameterSpec>;
|
|
18
|
-
publishedAt?: string;
|
|
19
|
-
repository?: string;
|
|
20
|
-
sha256?: string;
|
|
21
|
-
version: string;
|
|
22
|
-
}
|
|
23
|
-
export interface AppDeploymentSummary {
|
|
24
|
-
appName?: string;
|
|
25
|
-
env?: Record<string, string>;
|
|
26
|
-
lastJobId?: null | string;
|
|
27
|
-
parameters?: Record<string, unknown>;
|
|
28
|
-
state?: unknown;
|
|
29
|
-
status: string;
|
|
30
|
-
version?: string;
|
|
31
|
-
workspace: string;
|
|
32
|
-
}
|
|
33
|
-
export type DeployAppInput = {
|
|
34
|
-
name: string;
|
|
35
|
-
parameters?: Record<string, string>;
|
|
36
|
-
version?: string;
|
|
37
|
-
workspace: string;
|
|
38
|
-
};
|
|
39
|
-
export type DestroyAppInput = {
|
|
40
|
-
name: string;
|
|
41
|
-
parameters?: Record<string, string>;
|
|
42
|
-
workspace: string;
|
|
43
|
-
};
|
|
44
|
-
export type GetAppDeploymentInput = {
|
|
45
|
-
name: string;
|
|
46
|
-
workspace: string;
|
|
47
|
-
};
|
|
48
|
-
export type PublishAppVersionInput = {
|
|
49
|
-
commit: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
hereyaYaml: string;
|
|
52
|
-
name: string;
|
|
53
|
-
parameters?: Record<string, IParameterSpec>;
|
|
54
|
-
repository: string;
|
|
55
|
-
sha256: string;
|
|
56
|
-
version: string;
|
|
57
|
-
visibility?: 'private' | 'public';
|
|
58
|
-
};
|
|
59
|
-
export type PublishAppVersionOutput = {
|
|
60
|
-
app: {
|
|
61
|
-
id?: string;
|
|
62
|
-
name: string;
|
|
63
|
-
version: string;
|
|
64
|
-
};
|
|
65
|
-
success: true;
|
|
66
|
-
} | {
|
|
67
|
-
reason: string;
|
|
68
|
-
success: false;
|
|
69
|
-
};
|
|
70
|
-
export type UpdateAppDeploymentInput = {
|
|
71
|
-
env?: Record<string, string>;
|
|
72
|
-
lastJobId?: string;
|
|
73
|
-
name: string;
|
|
74
|
-
state?: unknown;
|
|
75
|
-
status: string;
|
|
76
|
-
workspace: string;
|
|
77
|
-
};
|
|
21
|
+
export type { AppDeploymentSummary, DeployAppInput, DestroyAppInput, GetAppDeploymentInput, UpdateAppDeploymentInput, } from './cloud-backend/apps-deploy.js';
|
|
22
|
+
export type { AppSummary, AppVersionSummary, PublishAppVersionInput, PublishAppVersionOutput, } from './cloud-backend/apps-versions.js';
|
|
23
|
+
type SubmitJobInput = Parameters<typeof executorJobs.submitExecutorJob>[1];
|
|
24
|
+
type UpdateJobInput = Parameters<typeof executorJobs.updateExecutorJob>[1];
|
|
25
|
+
type GetJobStatusInput = Parameters<typeof executorJobs.getExecutorJobStatus>[1];
|
|
78
26
|
export declare class CloudBackend implements Backend {
|
|
79
27
|
private readonly config;
|
|
80
28
|
constructor(config: CloudBackendConfig);
|
|
81
|
-
addPackageToWorkspace(input:
|
|
82
|
-
createWorkspace(input:
|
|
83
|
-
deleteState(input:
|
|
84
|
-
deleteWorkspace(input:
|
|
85
|
-
deployApp(input: DeployAppInput): Promise<{
|
|
29
|
+
addPackageToWorkspace(input: Parameters<typeof packagesWorkspace.addPackageToWorkspace>[1]): Promise<import("../common.js").AddPackageToWorkspaceOutput>;
|
|
30
|
+
createWorkspace(input: Parameters<typeof workspaces.createWorkspace>[1]): Promise<import("../common.js").CreateWorkspaceOutput>;
|
|
31
|
+
deleteState(input: Parameters<typeof state.deleteState>[1]): Promise<import("../common.js").DeleteStateOutput>;
|
|
32
|
+
deleteWorkspace(input: Parameters<typeof workspaces.deleteWorkspace>[1]): Promise<import("../common.js").DeleteWorkspaceOutput>;
|
|
33
|
+
deployApp(input: appsDeploy.DeployAppInput): Promise<{
|
|
86
34
|
deploymentId: string;
|
|
87
35
|
jobId: string;
|
|
88
36
|
success: true;
|
|
@@ -90,14 +38,14 @@ export declare class CloudBackend implements Backend {
|
|
|
90
38
|
reason: string;
|
|
91
39
|
success: false;
|
|
92
40
|
}>;
|
|
93
|
-
destroyApp(input: DestroyAppInput): Promise<{
|
|
41
|
+
destroyApp(input: appsDeploy.DestroyAppInput): Promise<{
|
|
94
42
|
jobId: string;
|
|
95
43
|
success: true;
|
|
96
44
|
} | {
|
|
97
45
|
reason: string;
|
|
98
46
|
success: false;
|
|
99
47
|
}>;
|
|
100
|
-
exportBackend(): Promise<ExportBackendOutput>;
|
|
48
|
+
exportBackend(): Promise<import("../common.js").ExportBackendOutput>;
|
|
101
49
|
generateExecutorToken(input: {
|
|
102
50
|
workspace: string;
|
|
103
51
|
}): Promise<{
|
|
@@ -109,14 +57,14 @@ export declare class CloudBackend implements Backend {
|
|
|
109
57
|
success: false;
|
|
110
58
|
}>;
|
|
111
59
|
getApp(name: string): Promise<{
|
|
112
|
-
app: AppSummary;
|
|
60
|
+
app: appsVersions.AppSummary;
|
|
113
61
|
success: true;
|
|
114
62
|
} | {
|
|
115
63
|
reason: string;
|
|
116
64
|
success: false;
|
|
117
65
|
}>;
|
|
118
|
-
getAppDeployment(input: GetAppDeploymentInput): Promise<{
|
|
119
|
-
deployment: AppDeploymentSummary;
|
|
66
|
+
getAppDeployment(input: appsDeploy.GetAppDeploymentInput): Promise<{
|
|
67
|
+
deployment: appsDeploy.AppDeploymentSummary;
|
|
120
68
|
success: true;
|
|
121
69
|
} | {
|
|
122
70
|
reason: string;
|
|
@@ -126,18 +74,13 @@ export declare class CloudBackend implements Backend {
|
|
|
126
74
|
name: string;
|
|
127
75
|
version?: string;
|
|
128
76
|
}): Promise<{
|
|
129
|
-
appVersion: AppVersionSummary;
|
|
77
|
+
appVersion: appsVersions.AppVersionSummary;
|
|
130
78
|
success: true;
|
|
131
79
|
} | {
|
|
132
80
|
reason: string;
|
|
133
81
|
success: false;
|
|
134
82
|
}>;
|
|
135
|
-
getExecutorJobStatus(input: {
|
|
136
|
-
jobId: string;
|
|
137
|
-
lastStatus?: string;
|
|
138
|
-
poll?: boolean;
|
|
139
|
-
workspace: string;
|
|
140
|
-
}): Promise<{
|
|
83
|
+
getExecutorJobStatus(input: GetJobStatusInput): Promise<{
|
|
141
84
|
job: {
|
|
142
85
|
id: string;
|
|
143
86
|
logs: string;
|
|
@@ -150,25 +93,25 @@ export declare class CloudBackend implements Backend {
|
|
|
150
93
|
reason: string;
|
|
151
94
|
success: false;
|
|
152
95
|
}>;
|
|
153
|
-
getPackageByVersion(name: string, version: string): Promise<GetPackageOutput>;
|
|
154
|
-
getPackageLatest(name: string): Promise<GetPackageOutput>;
|
|
155
|
-
getProjectMetadata(input:
|
|
156
|
-
getProvisioningId(input:
|
|
157
|
-
getState(input:
|
|
158
|
-
getWorkspace(name: string): Promise<GetWorkspaceOutput>;
|
|
159
|
-
getWorkspaceEnv(input:
|
|
160
|
-
importBackend(input:
|
|
161
|
-
importProject(input:
|
|
162
|
-
init(input:
|
|
96
|
+
getPackageByVersion(name: string, version: string): Promise<import("../common.js").GetPackageOutput>;
|
|
97
|
+
getPackageLatest(name: string): Promise<import("../common.js").GetPackageOutput>;
|
|
98
|
+
getProjectMetadata(input: Parameters<typeof projects.getProjectMetadata>[1]): Promise<import("../common.js").GetProjectMetadataOutput>;
|
|
99
|
+
getProvisioningId(input: Parameters<typeof misc.getProvisioningId>[1]): Promise<import("../common.js").GetProvisioningIdOutput>;
|
|
100
|
+
getState(input: Parameters<typeof state.getState>[1]): Promise<import("../common.js").GetStateOutput>;
|
|
101
|
+
getWorkspace(name: string): Promise<import("../common.js").GetWorkspaceOutput>;
|
|
102
|
+
getWorkspaceEnv(input: Parameters<typeof workspaceEnv.getWorkspaceEnv>[1]): Promise<import("../common.js").GetWorkspaceEnvOutput>;
|
|
103
|
+
importBackend(input: Parameters<typeof misc.importBackend>[1]): Promise<import("../common.js").ImportBackendOutput>;
|
|
104
|
+
importProject(input: Parameters<typeof projects.importProject>[1]): Promise<import("../common.js").ImportProjectOutput>;
|
|
105
|
+
init(input: Parameters<typeof projects.init>[1]): Promise<import("../common.js").InitProjectOutput>;
|
|
163
106
|
listAppDeployments(name: string): Promise<{
|
|
164
|
-
deployments: AppDeploymentSummary[];
|
|
107
|
+
deployments: appsDeploy.AppDeploymentSummary[];
|
|
165
108
|
success: true;
|
|
166
109
|
} | {
|
|
167
110
|
reason: string;
|
|
168
111
|
success: false;
|
|
169
112
|
}>;
|
|
170
113
|
listApps(): Promise<{
|
|
171
|
-
apps: AppSummary[];
|
|
114
|
+
apps: appsVersions.AppSummary[];
|
|
172
115
|
success: true;
|
|
173
116
|
} | {
|
|
174
117
|
reason: string;
|
|
@@ -179,11 +122,11 @@ export declare class CloudBackend implements Backend {
|
|
|
179
122
|
success: false;
|
|
180
123
|
} | {
|
|
181
124
|
success: true;
|
|
182
|
-
versions: AppVersionSummary[];
|
|
125
|
+
versions: appsVersions.AppVersionSummary[];
|
|
183
126
|
}>;
|
|
184
|
-
listPackageVersions(name: string): Promise<ListPackageVersionsOutput>;
|
|
185
|
-
listProjects(): Promise<ListProjectsOutput>;
|
|
186
|
-
listWorkspaces(input?:
|
|
127
|
+
listPackageVersions(name: string): Promise<import("../common.js").ListPackageVersionsOutput>;
|
|
128
|
+
listProjects(): Promise<import("../common.js").ListProjectsOutput>;
|
|
129
|
+
listWorkspaces(input?: Parameters<typeof workspaces.listWorkspaces>[1]): Promise<string[]>;
|
|
187
130
|
pollExecutorJobs(input: {
|
|
188
131
|
executorId?: string;
|
|
189
132
|
workspace: string;
|
|
@@ -199,9 +142,10 @@ export declare class CloudBackend implements Backend {
|
|
|
199
142
|
success: false;
|
|
200
143
|
unauthorized?: true;
|
|
201
144
|
}>;
|
|
202
|
-
publishAppVersion(input: PublishAppVersionInput): Promise<PublishAppVersionOutput>;
|
|
203
|
-
publishPackage(input:
|
|
204
|
-
|
|
145
|
+
publishAppVersion(input: appsVersions.PublishAppVersionInput): Promise<appsVersions.PublishAppVersionOutput>;
|
|
146
|
+
publishPackage(input: Parameters<typeof packagesPublish.publishPackage>[1]): Promise<import("../common.js").PublishPackageOutput>;
|
|
147
|
+
registerExecutorBroker(input: executorBroker.RegisterExecutorBrokerInput): Promise<executorBroker.RegisterExecutorBrokerOutput>;
|
|
148
|
+
removePackageFromWorkspace(input: Parameters<typeof packagesWorkspace.removePackageFromWorkspace>[1]): Promise<import("../common.js").AddPackageToWorkspaceOutput>;
|
|
205
149
|
revokeExecutorToken(input: {
|
|
206
150
|
workspace: string;
|
|
207
151
|
}): Promise<{
|
|
@@ -210,42 +154,31 @@ export declare class CloudBackend implements Backend {
|
|
|
210
154
|
} | {
|
|
211
155
|
success: true;
|
|
212
156
|
}>;
|
|
213
|
-
saveProjectMetadata(input:
|
|
157
|
+
saveProjectMetadata(input: Parameters<typeof projects.saveProjectMetadata>[1]): Promise<import("../common.js").SaveProjectMetadataOutput>;
|
|
214
158
|
saveState(config: Config, workspace?: string): Promise<void>;
|
|
215
|
-
searchPackages(input:
|
|
216
|
-
setEnvVar(input:
|
|
217
|
-
submitExecutorJob(input: {
|
|
218
|
-
payload: object;
|
|
219
|
-
type: 'app-deploy' | 'app-destroy' | 'deploy' | 'destroy' | 'provision' | 'resolve-env' | 'undeploy';
|
|
220
|
-
workspace: string;
|
|
221
|
-
}): Promise<{
|
|
159
|
+
searchPackages(input: Parameters<typeof packagesRegistry.searchPackages>[1]): Promise<import("../common.js").SearchPackagesOutput>;
|
|
160
|
+
setEnvVar(input: Parameters<typeof workspaceEnv.setEnvVar>[1]): Promise<import("../common.js").SetEnvVarOutput>;
|
|
161
|
+
submitExecutorJob(input: SubmitJobInput): Promise<{
|
|
222
162
|
jobId: string;
|
|
223
163
|
success: true;
|
|
224
164
|
} | {
|
|
225
165
|
reason: string;
|
|
226
166
|
success: false;
|
|
227
167
|
}>;
|
|
228
|
-
|
|
229
|
-
|
|
168
|
+
unregisterExecutorBroker(input: executorBroker.UnregisterExecutorBrokerInput): Promise<executorBroker.UnregisterExecutorBrokerOutput>;
|
|
169
|
+
unsetEnvVar(input: Parameters<typeof workspaceEnv.unsetEnvVar>[1]): Promise<import("../common.js").SetEnvVarOutput>;
|
|
170
|
+
updateAppDeployment(input: appsDeploy.UpdateAppDeploymentInput): Promise<{
|
|
230
171
|
reason: string;
|
|
231
172
|
success: false;
|
|
232
173
|
} | {
|
|
233
174
|
success: true;
|
|
234
175
|
}>;
|
|
235
|
-
updateExecutorJob(input: {
|
|
236
|
-
jobId: string;
|
|
237
|
-
logs?: string;
|
|
238
|
-
result?: object;
|
|
239
|
-
status?: 'completed' | 'failed';
|
|
240
|
-
}): Promise<{
|
|
176
|
+
updateExecutorJob(input: UpdateJobInput): Promise<{
|
|
241
177
|
reason: string;
|
|
242
178
|
success: false;
|
|
243
179
|
unauthorized?: true;
|
|
244
180
|
} | {
|
|
245
181
|
success: true;
|
|
246
182
|
}>;
|
|
247
|
-
updateWorkspace(input:
|
|
248
|
-
private convertWorkspace;
|
|
249
|
-
private safeResponseJson;
|
|
183
|
+
updateWorkspace(input: Parameters<typeof workspaces.updateWorkspace>[1]): Promise<import("../common.js").UpdateWorkspaceOutput>;
|
|
250
184
|
}
|
|
251
|
-
export {};
|