@gitpod/gitpod-protocol 0.1.5-pd-proto-ide.0 → 0.1.5-pd-timeout-16089.2
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/lib/attribution.d.ts +1 -0
- package/lib/attribution.d.ts.map +1 -1
- package/lib/attribution.js +4 -0
- package/lib/attribution.js.map +1 -1
- package/lib/frontend-dashboard-service.d.ts +13 -4
- package/lib/frontend-dashboard-service.d.ts.map +1 -1
- package/lib/frontend-dashboard-service.js +6 -0
- package/lib/frontend-dashboard-service.js.map +1 -1
- package/lib/gitpod-service.d.ts +4 -1
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js.map +1 -1
- package/lib/protocol.d.ts +6 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +12 -0
- package/lib/protocol.js.map +1 -1
- package/lib/typings/globals.d.ts +3 -0
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/workspace-cluster.d.ts +6 -2
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +6 -1
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +1 -1
- package/pkg-yarn.lock +1 -1
- package/provenance-bundle.jsonl +1 -1
- package/src/attribution.ts +4 -0
- package/src/frontend-dashboard-service.ts +27 -4
- package/src/gitpod-service.ts +4 -1
- package/src/protocol.ts +17 -0
- package/src/typings/globals.ts +4 -0
- package/src/workspace-cluster.ts +10 -3
- package/src/wsready.ts +2 -2
package/src/gitpod-service.ts
CHANGED
|
@@ -62,6 +62,7 @@ import { IDEServer } from "./ide-protocol";
|
|
|
62
62
|
import { ListUsageRequest, ListUsageResponse, CostCenterJSON } from "./usage";
|
|
63
63
|
import { SupportedWorkspaceClass } from "./workspace-class";
|
|
64
64
|
import { BillingMode } from "./billing-mode";
|
|
65
|
+
import { WorkspaceRegion } from "./workspace-cluster";
|
|
65
66
|
|
|
66
67
|
export interface GitpodClient {
|
|
67
68
|
onInstanceUpdate(instance: WorkspaceInstance): void;
|
|
@@ -116,6 +117,7 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
116
117
|
getWorkspace(id: string): Promise<WorkspaceInfo>;
|
|
117
118
|
isWorkspaceOwner(workspaceId: string): Promise<boolean>;
|
|
118
119
|
getOwnerToken(workspaceId: string): Promise<string>;
|
|
120
|
+
getIDECredentials(workspaceId: string): Promise<string>;
|
|
119
121
|
|
|
120
122
|
/**
|
|
121
123
|
* Creates and starts a workspace for the given context URL.
|
|
@@ -438,6 +440,7 @@ export namespace GitpodServer {
|
|
|
438
440
|
}
|
|
439
441
|
export interface CreateWorkspaceOptions extends StartWorkspaceOptions {
|
|
440
442
|
contextUrl: string;
|
|
443
|
+
organizationId?: string;
|
|
441
444
|
|
|
442
445
|
// whether running workspaces on the same context should be ignored. If false (default) users will be asked.
|
|
443
446
|
ignoreRunningWorkspaceOnSameCommit?: boolean;
|
|
@@ -450,7 +453,7 @@ export namespace GitpodServer {
|
|
|
450
453
|
forceDefaultImage?: boolean;
|
|
451
454
|
workspaceClass?: string;
|
|
452
455
|
ideSettings?: IDESettings;
|
|
453
|
-
region?:
|
|
456
|
+
region?: WorkspaceRegion;
|
|
454
457
|
}
|
|
455
458
|
export interface TakeSnapshotOptions {
|
|
456
459
|
workspaceId: string;
|
package/src/protocol.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { WorkspaceInstance, PortVisibility } from "./workspace-instance";
|
|
|
8
8
|
import { RoleOrPermission } from "./permission";
|
|
9
9
|
import { Project } from "./teams-projects-protocol";
|
|
10
10
|
import { createHash } from "crypto";
|
|
11
|
+
import { AttributionId } from "./attribution";
|
|
11
12
|
|
|
12
13
|
export interface UserInfo {
|
|
13
14
|
name?: string;
|
|
@@ -178,6 +179,17 @@ export namespace User {
|
|
|
178
179
|
return user;
|
|
179
180
|
}
|
|
180
181
|
|
|
182
|
+
export function getDefaultAttributionId(user: User): AttributionId {
|
|
183
|
+
if (user.usageAttributionId) {
|
|
184
|
+
const result = AttributionId.parse(user.usageAttributionId);
|
|
185
|
+
if (!result) {
|
|
186
|
+
throw new Error("Invalid attribution ID: " + user.usageAttributionId);
|
|
187
|
+
}
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
return AttributionId.create(user);
|
|
191
|
+
}
|
|
192
|
+
|
|
181
193
|
// The actual Profile of a User
|
|
182
194
|
export interface Profile {
|
|
183
195
|
name: string;
|
|
@@ -218,6 +230,9 @@ export interface AdditionalUserData {
|
|
|
218
230
|
// whether the user has been migrated to team attribution.
|
|
219
231
|
// a corresponding feature flag (team_only_attribution) triggers the migration.
|
|
220
232
|
isMigratedToTeamOnlyAttribution?: boolean;
|
|
233
|
+
// user globol workspace timeout
|
|
234
|
+
workspaceTimeout?: string;
|
|
235
|
+
disabledClosedTimeout?: boolean;
|
|
221
236
|
}
|
|
222
237
|
export namespace AdditionalUserData {
|
|
223
238
|
export function set(user: User, partialData: Partial<AdditionalUserData>): User {
|
|
@@ -830,6 +845,7 @@ export interface WorkspaceConfig {
|
|
|
830
845
|
vscode?: VSCodeConfig;
|
|
831
846
|
jetbrains?: JetBrainsConfig;
|
|
832
847
|
coreDump?: CoreDumpConfig;
|
|
848
|
+
ideCredentials?: string;
|
|
833
849
|
|
|
834
850
|
/** deprecated. Enabled by default **/
|
|
835
851
|
experimentalNetwork?: boolean;
|
|
@@ -1404,6 +1420,7 @@ export interface AuthProviderInfo {
|
|
|
1404
1420
|
readonly authProviderType: string;
|
|
1405
1421
|
readonly host: string;
|
|
1406
1422
|
readonly ownerId?: string;
|
|
1423
|
+
readonly organizationId?: string;
|
|
1407
1424
|
readonly verified: boolean;
|
|
1408
1425
|
readonly isReadonly?: boolean;
|
|
1409
1426
|
readonly hiddenOnDashboard?: boolean;
|
package/src/typings/globals.ts
CHANGED
package/src/workspace-cluster.ts
CHANGED
|
@@ -9,6 +9,13 @@ import { filePathTelepresenceAware } from "./env";
|
|
|
9
9
|
import { DeepPartial } from "./util/deep-partial";
|
|
10
10
|
import { PermissionName } from "./permission";
|
|
11
11
|
|
|
12
|
+
const workspaceRegions = ["europe", "north-america", "south-america", "africa", "asia", ""] as const;
|
|
13
|
+
export type WorkspaceRegion = typeof workspaceRegions[number];
|
|
14
|
+
|
|
15
|
+
export function isWorkspaceRegion(s: string): s is WorkspaceRegion {
|
|
16
|
+
return workspaceRegions.indexOf(s as any) !== -1;
|
|
17
|
+
}
|
|
18
|
+
|
|
12
19
|
export interface WorkspaceCluster {
|
|
13
20
|
// Name of the workspace cluster.
|
|
14
21
|
// This is the string set in each
|
|
@@ -19,9 +26,9 @@ export interface WorkspaceCluster {
|
|
|
19
26
|
// The name can be at most 60 characters.
|
|
20
27
|
applicationCluster: string;
|
|
21
28
|
|
|
22
|
-
// The name of the region this cluster belongs to. E.g.
|
|
29
|
+
// The name of the region this cluster belongs to. E.g. europe or north-america
|
|
23
30
|
// The name can be at most 60 characters.
|
|
24
|
-
region:
|
|
31
|
+
region: WorkspaceRegion;
|
|
25
32
|
|
|
26
33
|
// URL of the cluster's ws-manager API
|
|
27
34
|
url: string;
|
|
@@ -110,5 +117,5 @@ export interface WorkspaceClusterDB {
|
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
export type WorkspaceClusterFilter = Pick<WorkspaceCluster, "applicationCluster"> &
|
|
113
|
-
DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url">> &
|
|
120
|
+
DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url" | "region">> &
|
|
114
121
|
Partial<{ minScore: number }>;
|
package/src/wsready.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// generated using github.com/32leaves/bel on
|
|
7
|
+
// generated using github.com/32leaves/bel on 2023-02-14 09:41:16.808994006 +0000 UTC m=+0.008933200
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
10
|
export enum WorkspaceInitSource {
|