4
4
* See License.AGPL.txt in the project root for license information.
5
5
*/
6
6
7
+ import "reflect-metadata" ;
8
+
7
9
import { Timestamp , toPlainMessage , PartialMessage , Duration } from "@bufbuild/protobuf" ;
8
10
import { Code , ConnectError } from "@connectrpc/connect" ;
9
11
import {
@@ -135,6 +137,7 @@ import type { DeepPartial } from "@gitpod/gitpod-protocol/lib/util/deep-partial"
135
137
import { BlockedRepository as ProtocolBlockedRepository } from "@gitpod/gitpod-protocol/lib/blocked-repositories-protocol" ;
136
138
import { RoleOrPermission } from "@gitpod/gitpod-protocol/lib/permission" ;
137
139
import { parseGoDurationToMs } from "@gitpod/gitpod-protocol/lib/util/timeutil" ;
140
+ import { isWorkspaceRegion } from "@gitpod/gitpod-protocol/lib/workspace-cluster" ;
138
141
139
142
export type PartialConfiguration = DeepPartial < Configuration > & Pick < Configuration , "id" > ;
140
143
@@ -1228,7 +1231,7 @@ export class PublicAPIConverter {
1228
1231
if ( ! e ) {
1229
1232
return undefined ;
1230
1233
}
1231
- return < IDESettings > {
1234
+ return {
1232
1235
defaultIde : e . name ,
1233
1236
useLatestVersion : e . version === "latest" ,
1234
1237
} ;
@@ -1245,11 +1248,12 @@ export class PublicAPIConverter {
1245
1248
}
1246
1249
1247
1250
fromWorkspaceAutostartOption ( o : User_WorkspaceAutostartOption ) : WorkspaceAutostartOption {
1248
- return < WorkspaceAutostartOption > {
1251
+ const region = isWorkspaceRegion ( o . region ) ? o . region : "" ;
1252
+ return {
1249
1253
cloneURL : o . cloneUrl ,
1250
- editorSettings : this . fromEditorReference ( o . editorSettings ) ,
1254
+ ideSettings : this . fromEditorReference ( o . editorSettings ) ,
1251
1255
organizationId : o . organizationId ,
1252
- region : o . region ,
1256
+ region,
1253
1257
workspaceClass : o . workspaceClass ,
1254
1258
} ;
1255
1259
}
0 commit comments