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 {
@@ -137,6 +139,7 @@ import { BlockedRepository as ProtocolBlockedRepository } from "@gitpod/gitpod-p
137
139
import { SupportedWorkspaceClass } from "@gitpod/gitpod-protocol/lib/workspace-class" ;
138
140
import { RoleOrPermission } from "@gitpod/gitpod-protocol/lib/permission" ;
139
141
import { parseGoDurationToMs } from "@gitpod/gitpod-protocol/lib/util/timeutil" ;
142
+ import { isWorkspaceRegion } from "@gitpod/gitpod-protocol/lib/workspace-cluster" ;
140
143
141
144
export type PartialConfiguration = DeepPartial < Configuration > & Pick < Configuration , "id" > ;
142
145
@@ -1239,7 +1242,7 @@ export class PublicAPIConverter {
1239
1242
if ( ! e ) {
1240
1243
return undefined ;
1241
1244
}
1242
- return < IDESettings > {
1245
+ return {
1243
1246
defaultIde : e . name ,
1244
1247
useLatestVersion : e . version === "latest" ,
1245
1248
} ;
@@ -1256,11 +1259,12 @@ export class PublicAPIConverter {
1256
1259
}
1257
1260
1258
1261
fromWorkspaceAutostartOption ( o : User_WorkspaceAutostartOption ) : WorkspaceAutostartOption {
1259
- return < WorkspaceAutostartOption > {
1262
+ const region = isWorkspaceRegion ( o . region ) ? o . region : "" ;
1263
+ return {
1260
1264
cloneURL : o . cloneUrl ,
1261
- editorSettings : this . fromEditorReference ( o . editorSettings ) ,
1265
+ ideSettings : this . fromEditorReference ( o . editorSettings ) ,
1262
1266
organizationId : o . organizationId ,
1263
- region : o . region ,
1267
+ region,
1264
1268
workspaceClass : o . workspaceClass ,
1265
1269
} ;
1266
1270
}
0 commit comments