@gitpod/gitpod-protocol 0.1.5-wth-test.80 → 0.1.5-yh-vmoptions-fork.1

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.
Files changed (270) hide show
  1. package/data/gitpod-schema.json +181 -4
  2. package/lib/accounting-protocol.d.ts +17 -10
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +30 -32
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +1 -0
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js.map +1 -1
  9. package/lib/analytics.d.ts.map +1 -1
  10. package/lib/analytics.js.map +1 -1
  11. package/lib/auth.d.ts.map +1 -1
  12. package/lib/context-url.d.ts.map +1 -1
  13. package/lib/context-url.js +3 -3
  14. package/lib/context-url.js.map +1 -1
  15. package/lib/context-url.spec.d.ts.map +1 -1
  16. package/lib/context-url.spec.js +20 -5
  17. package/lib/context-url.spec.js.map +1 -1
  18. package/lib/email-protocol.d.ts +1 -1
  19. package/lib/email-protocol.d.ts.map +1 -1
  20. package/lib/email-protocol.js.map +1 -1
  21. package/lib/encryption/container-module.d.ts.map +1 -1
  22. package/lib/encryption/container-module.js +1 -1
  23. package/lib/encryption/container-module.js.map +1 -1
  24. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  25. package/lib/encryption/encryption-engine.js +7 -7
  26. package/lib/encryption/encryption-engine.js.map +1 -1
  27. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  28. package/lib/encryption/encryption-engine.spec.js +2 -3
  29. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  30. package/lib/encryption/encryption-service.d.ts.map +1 -1
  31. package/lib/encryption/encryption-service.js +1 -1
  32. package/lib/encryption/encryption-service.js.map +1 -1
  33. package/lib/encryption/key-provider.d.ts.map +1 -1
  34. package/lib/encryption/key-provider.js +7 -9
  35. package/lib/encryption/key-provider.js.map +1 -1
  36. package/lib/env.d.ts +0 -5
  37. package/lib/env.d.ts.map +1 -1
  38. package/lib/env.js +1 -20
  39. package/lib/env.js.map +1 -1
  40. package/lib/gitpod-file-parser.d.ts.map +1 -1
  41. package/lib/gitpod-file-parser.js +6 -6
  42. package/lib/gitpod-file-parser.js.map +1 -1
  43. package/lib/gitpod-file-parser.spec.js +42 -39
  44. package/lib/gitpod-file-parser.spec.js.map +1 -1
  45. package/lib/gitpod-service.d.ts +32 -26
  46. package/lib/gitpod-service.d.ts.map +1 -1
  47. package/lib/gitpod-service.js +39 -32
  48. package/lib/gitpod-service.js.map +1 -1
  49. package/lib/headless-workspace-log.d.ts +1 -0
  50. package/lib/headless-workspace-log.d.ts.map +1 -1
  51. package/lib/headless-workspace-log.js +2 -1
  52. package/lib/headless-workspace-log.js.map +1 -1
  53. package/lib/ide-frontend-service.d.ts +1 -1
  54. package/lib/ide-protocol.d.ts +6 -6
  55. package/lib/ide-protocol.d.ts.map +1 -1
  56. package/lib/index.d.ts +16 -16
  57. package/lib/installation-admin-protocol.d.ts.map +1 -1
  58. package/lib/installation-admin-protocol.js +2 -2
  59. package/lib/installation-admin-protocol.js.map +1 -1
  60. package/lib/license-protocol.d.ts +7 -0
  61. package/lib/license-protocol.d.ts.map +1 -1
  62. package/lib/license-protocol.js.map +1 -1
  63. package/lib/messaging/browser/connection.d.ts +1 -1
  64. package/lib/messaging/browser/connection.d.ts.map +1 -1
  65. package/lib/messaging/browser/connection.js +19 -19
  66. package/lib/messaging/browser/connection.js.map +1 -1
  67. package/lib/messaging/browser/window-connection.d.ts +4 -4
  68. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  69. package/lib/messaging/browser/window-connection.js +9 -6
  70. package/lib/messaging/browser/window-connection.js.map +1 -1
  71. package/lib/messaging/client-call-metrics.d.ts +2 -2
  72. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  73. package/lib/messaging/client-call-metrics.js +20 -20
  74. package/lib/messaging/client-call-metrics.js.map +1 -1
  75. package/lib/messaging/error.d.ts +2 -0
  76. package/lib/messaging/error.d.ts.map +1 -1
  77. package/lib/messaging/error.js +4 -0
  78. package/lib/messaging/error.js.map +1 -1
  79. package/lib/messaging/handler.d.ts.map +1 -1
  80. package/lib/messaging/handler.js +1 -1
  81. package/lib/messaging/node/connection.js +8 -8
  82. package/lib/messaging/node/connection.js.map +1 -1
  83. package/lib/messaging/proxy-factory.d.ts +1 -1
  84. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  85. package/lib/messaging/proxy-factory.js +7 -9
  86. package/lib/messaging/proxy-factory.js.map +1 -1
  87. package/lib/payment-protocol.d.ts.map +1 -1
  88. package/lib/payment-protocol.js +1 -1
  89. package/lib/payment-protocol.js.map +1 -1
  90. package/lib/permission.d.ts +2 -2
  91. package/lib/permission.d.ts.map +1 -1
  92. package/lib/permission.js +12 -23
  93. package/lib/permission.js.map +1 -1
  94. package/lib/plans.d.ts +3 -3
  95. package/lib/plans.d.ts.map +1 -1
  96. package/lib/plans.js +206 -171
  97. package/lib/plans.js.map +1 -1
  98. package/lib/protocol.d.ts +83 -36
  99. package/lib/protocol.d.ts.map +1 -1
  100. package/lib/protocol.js +165 -87
  101. package/lib/protocol.js.map +1 -1
  102. package/lib/snapshot-url.spec.js.map +1 -1
  103. package/lib/team-subscription-protocol.d.ts +21 -3
  104. package/lib/team-subscription-protocol.d.ts.map +1 -1
  105. package/lib/team-subscription-protocol.js +16 -5
  106. package/lib/team-subscription-protocol.js.map +1 -1
  107. package/lib/teams-projects-protocol.d.ts +8 -3
  108. package/lib/teams-projects-protocol.d.ts.map +1 -1
  109. package/lib/teams-projects-protocol.js +1 -1
  110. package/lib/teams-projects-protocol.js.map +1 -1
  111. package/lib/typings/globals.d.ts +2 -2
  112. package/lib/typings/globals.d.ts.map +1 -1
  113. package/lib/util/analytics.d.ts.map +1 -1
  114. package/lib/util/analytics.js +6 -6
  115. package/lib/util/analytics.js.map +1 -1
  116. package/lib/util/async-iterator.d.ts.map +1 -1
  117. package/lib/util/async-iterator.js +3 -3
  118. package/lib/util/async-iterator.js.map +1 -1
  119. package/lib/util/cancelable.js.map +1 -1
  120. package/lib/util/date-time.js +6 -6
  121. package/lib/util/date-time.js.map +1 -1
  122. package/lib/util/deferred.js.map +1 -1
  123. package/lib/util/disposable.d.ts.map +1 -1
  124. package/lib/util/disposable.js +2 -2
  125. package/lib/util/disposable.js.map +1 -1
  126. package/lib/util/event.d.ts.map +1 -1
  127. package/lib/util/event.js +5 -3
  128. package/lib/util/event.js.map +1 -1
  129. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  130. package/lib/util/garbage-collected-cache.js +1 -1
  131. package/lib/util/garbage-collected-cache.js.map +1 -1
  132. package/lib/util/generate-workspace-id.d.ts +5 -0
  133. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  134. package/lib/util/generate-workspace-id.js +446 -442
  135. package/lib/util/generate-workspace-id.js.map +1 -1
  136. package/lib/util/generate-workspace-id.spec.js +18 -7
  137. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  138. package/lib/util/gitpod-cookie.d.ts +1 -1
  139. package/lib/util/gitpod-cookie.d.ts.map +1 -1
  140. package/lib/util/gitpod-cookie.js +0 -3
  141. package/lib/util/gitpod-cookie.js.map +1 -1
  142. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  143. package/lib/util/gitpod-host-url.js +31 -29
  144. package/lib/util/gitpod-host-url.js.map +1 -1
  145. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  146. package/lib/util/gitpod-host-url.spec.js +15 -5
  147. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  148. package/lib/util/grpc.d.ts.map +1 -1
  149. package/lib/util/grpc.js.map +1 -1
  150. package/lib/util/jaeger-client-types.d.ts.map +1 -1
  151. package/lib/util/logging.d.ts +1 -1
  152. package/lib/util/logging.d.ts.map +1 -1
  153. package/lib/util/logging.js +23 -24
  154. package/lib/util/logging.js.map +1 -1
  155. package/lib/util/make-link.js +5 -5
  156. package/lib/util/make-link.js.map +1 -1
  157. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  158. package/lib/util/parse-workspace-id.js +1 -2
  159. package/lib/util/parse-workspace-id.js.map +1 -1
  160. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  161. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  162. package/lib/util/queue.spec.js +9 -6
  163. package/lib/util/queue.spec.js.map +1 -1
  164. package/lib/util/semaphore.d.ts.map +1 -1
  165. package/lib/util/semaphore.js.map +1 -1
  166. package/lib/util/skip-if.d.ts.map +1 -1
  167. package/lib/util/skip-if.js.map +1 -1
  168. package/lib/util/timeutil.d.ts +1 -0
  169. package/lib/util/timeutil.d.ts.map +1 -1
  170. package/lib/util/timeutil.js +9 -3
  171. package/lib/util/timeutil.js.map +1 -1
  172. package/lib/util/timeutil.spec.d.ts.map +1 -1
  173. package/lib/util/timeutil.spec.js.map +1 -1
  174. package/lib/util/tracing.d.ts +6 -6
  175. package/lib/util/tracing.d.ts.map +1 -1
  176. package/lib/util/tracing.js +14 -16
  177. package/lib/util/tracing.js.map +1 -1
  178. package/lib/util/tracing.spec.js +3 -3
  179. package/lib/util/tracing.spec.js.map +1 -1
  180. package/lib/util/workspace-port-authentication.d.ts +7 -7
  181. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  182. package/lib/util/workspace-port-authentication.js +8 -11
  183. package/lib/util/workspace-port-authentication.js.map +1 -1
  184. package/lib/workspace-cluster.d.ts +1 -1
  185. package/lib/workspace-cluster.d.ts.map +1 -1
  186. package/lib/workspace-cluster.js +2 -4
  187. package/lib/workspace-cluster.js.map +1 -1
  188. package/lib/workspace-instance.d.ts +19 -3
  189. package/lib/workspace-instance.d.ts.map +1 -1
  190. package/lib/wsready.d.ts +1 -1
  191. package/lib/wsready.d.ts.map +1 -1
  192. package/lib/wsready.js +2 -2
  193. package/package.json +6 -6
  194. package/pkg-yarn.lock +5 -5
  195. package/provenance-bundle.jsonl +1 -1
  196. package/src/accounting-protocol.ts +63 -51
  197. package/src/admin-protocol.ts +23 -20
  198. package/src/analytics.ts +21 -21
  199. package/src/auth.ts +2 -2
  200. package/src/context-url.spec.ts +25 -11
  201. package/src/context-url.ts +80 -78
  202. package/src/email-protocol.ts +5 -6
  203. package/src/encryption/container-module.ts +2 -3
  204. package/src/encryption/encryption-engine.spec.ts +9 -8
  205. package/src/encryption/encryption-engine.ts +14 -14
  206. package/src/encryption/encryption-service.ts +4 -5
  207. package/src/encryption/key-provider.ts +16 -19
  208. package/src/env.ts +0 -22
  209. package/src/gitpod-file-parser.spec.ts +55 -61
  210. package/src/gitpod-file-parser.ts +16 -17
  211. package/src/gitpod-service.ts +152 -110
  212. package/src/headless-workspace-log.ts +6 -4
  213. package/src/ide-frontend-service.ts +2 -2
  214. package/src/ide-protocol.ts +8 -8
  215. package/src/index.ts +16 -16
  216. package/src/installation-admin-protocol.ts +8 -8
  217. package/src/license-protocol.ts +12 -6
  218. package/src/messaging/browser/connection.ts +45 -47
  219. package/src/messaging/browser/window-connection.ts +39 -29
  220. package/src/messaging/client-call-metrics.ts +70 -71
  221. package/src/messaging/error.ts +7 -3
  222. package/src/messaging/handler.ts +6 -6
  223. package/src/messaging/node/connection.ts +8 -8
  224. package/src/messaging/proxy-factory.ts +23 -30
  225. package/src/oss-allowlist.ts +3 -3
  226. package/src/payment-protocol.ts +2 -2
  227. package/src/permission.ts +20 -31
  228. package/src/plans.ts +236 -189
  229. package/src/protocol.ts +346 -239
  230. package/src/snapshot-url.spec.ts +9 -7
  231. package/src/team-subscription-protocol.ts +57 -23
  232. package/src/teams-projects-protocol.ts +14 -8
  233. package/src/typings/globals.ts +4 -4
  234. package/src/util/analytics.ts +46 -42
  235. package/src/util/async-iterator.ts +4 -5
  236. package/src/util/cancelable.ts +3 -3
  237. package/src/util/date-time.ts +8 -8
  238. package/src/util/deferred.ts +6 -6
  239. package/src/util/disposable.ts +3 -6
  240. package/src/util/event.ts +9 -11
  241. package/src/util/garbage-collected-cache.ts +3 -6
  242. package/src/util/generate-workspace-id.spec.ts +26 -16
  243. package/src/util/generate-workspace-id.ts +460 -454
  244. package/src/util/gitpod-cookie.ts +8 -9
  245. package/src/util/gitpod-host-url.spec.ts +40 -13
  246. package/src/util/gitpod-host-url.ts +37 -34
  247. package/src/util/grpc.ts +1 -1
  248. package/src/util/jaeger-client-types.ts +2 -2
  249. package/src/util/logging.ts +49 -40
  250. package/src/util/make-link.ts +6 -7
  251. package/src/util/parse-workspace-id.spec.ts +17 -8
  252. package/src/util/parse-workspace-id.ts +5 -6
  253. package/src/util/queue.spec.ts +27 -25
  254. package/src/util/repeat.ts +1 -1
  255. package/src/util/semaphore.ts +4 -6
  256. package/src/util/skip-if.ts +9 -6
  257. package/src/util/timeutil.spec.ts +14 -15
  258. package/src/util/timeutil.ts +21 -11
  259. package/src/util/tracing.spec.ts +28 -23
  260. package/src/util/tracing.ts +54 -51
  261. package/src/util/workspace-port-authentication.ts +10 -13
  262. package/src/workspace-cluster.ts +15 -12
  263. package/src/workspace-instance.ts +53 -24
  264. package/src/wsready.ts +3 -3
  265. package/data/builtin-theia-plugins.json +0 -372
  266. package/lib/theia-plugins.d.ts +0 -11
  267. package/lib/theia-plugins.d.ts.map +0 -1
  268. package/lib/theia-plugins.js +0 -8
  269. package/lib/theia-plugins.js.map +0 -1
  270. package/src/theia-plugins.ts +0 -11
@@ -8,8 +8,8 @@
8
8
  import { MessageConnection, ResponseError } from "vscode-jsonrpc";
9
9
  import { Event, Emitter } from "../util/event";
10
10
  import { Disposable } from "../util/disposable";
11
- import { ConnectionHandler } from './handler';
12
- import { log } from '../util/logging';
11
+ import { ConnectionHandler } from "./handler";
12
+ import { log } from "../util/logging";
13
13
 
14
14
  export type JsonRpcServer<Client> = Disposable & {
15
15
  /**
@@ -27,10 +27,7 @@ export interface JsonRpcConnectionEventEmitter {
27
27
  export type JsonRpcProxy<T> = T & JsonRpcConnectionEventEmitter;
28
28
 
29
29
  export class JsonRpcConnectionHandler<T extends object> implements ConnectionHandler {
30
- constructor(
31
- readonly path: string,
32
- readonly targetFactory: (proxy: JsonRpcProxy<T>, request?: object) => any
33
- ) { }
30
+ constructor(readonly path: string, readonly targetFactory: (proxy: JsonRpcProxy<T>, request?: object) => any) {}
34
31
 
35
32
  onConnection(connection: MessageConnection, request?: object): void {
36
33
  const factory = new JsonRpcProxyFactory<T>();
@@ -83,7 +80,6 @@ export class JsonRpcConnectionHandler<T extends object> implements ConnectionHan
83
80
  * @param <T> - The type of the object to expose to JSON-RPC.
84
81
  */
85
82
  export class JsonRpcProxyFactory<T extends object> implements ProxyHandler<T> {
86
-
87
83
  protected readonly onDidOpenConnectionEmitter = new Emitter<void>();
88
84
  protected readonly onDidCloseConnectionEmitter = new Emitter<void>();
89
85
 
@@ -101,17 +97,15 @@ export class JsonRpcProxyFactory<T extends object> implements ProxyHandler<T> {
101
97
  }
102
98
 
103
99
  protected waitForConnection(): void {
104
- this.connectionPromise = new Promise(resolve =>
105
- this.connectionPromiseResolve = resolve
106
- );
107
- this.connectionPromise.then(connection => {
100
+ this.connectionPromise = new Promise((resolve) => (this.connectionPromiseResolve = resolve));
101
+ this.connectionPromise.then((connection) => {
108
102
  connection.onClose(() => this.fireConnectionClosed());
109
103
  this.fireConnectionOpened();
110
104
  });
111
105
  }
112
106
 
113
107
  fireConnectionClosed() {
114
- this.onDidCloseConnectionEmitter.fire(undefined)
108
+ this.onDidCloseConnectionEmitter.fire(undefined);
115
109
  }
116
110
 
117
111
  fireConnectionOpened() {
@@ -204,35 +198,34 @@ export class JsonRpcProxyFactory<T extends object> implements ProxyHandler<T> {
204
198
  * @returns A callable that executes the JSON-RPC call.
205
199
  */
206
200
  get(target: T, p: PropertyKey, receiver: any): any {
207
- if (p === 'setClient') {
201
+ if (p === "setClient") {
208
202
  return (client: any) => {
209
203
  this.target = client;
210
204
  };
211
205
  }
212
- if (p === 'onDidOpenConnection') {
206
+ if (p === "onDidOpenConnection") {
213
207
  return this.onDidOpenConnectionEmitter.event;
214
208
  }
215
- if (p === 'onDidCloseConnection') {
209
+ if (p === "onDidCloseConnection") {
216
210
  return this.onDidCloseConnectionEmitter.event;
217
211
  }
218
212
  const isNotify = this.isNotification(p);
219
213
  return (...args: any[]) =>
220
- this.connectionPromise.then(connection =>
221
- new Promise((resolve, reject) => {
222
- try {
223
- if (isNotify) {
224
- connection.sendNotification(p.toString(), ...args);
225
- resolve(undefined);
226
- } else {
227
- const resultPromise = connection.sendRequest(p.toString(), ...args) as Promise<any>;
228
- resultPromise
229
- .catch((err: any) => reject(err))
230
- .then((result: any) => resolve(result));
214
+ this.connectionPromise.then(
215
+ (connection) =>
216
+ new Promise((resolve, reject) => {
217
+ try {
218
+ if (isNotify) {
219
+ connection.sendNotification(p.toString(), ...args);
220
+ resolve(undefined);
221
+ } else {
222
+ const resultPromise = connection.sendRequest(p.toString(), ...args) as Promise<any>;
223
+ resultPromise.catch((err: any) => reject(err)).then((result: any) => resolve(result));
224
+ }
225
+ } catch (err) {
226
+ reject(err);
231
227
  }
232
- } catch (err) {
233
- reject(err);
234
- }
235
- })
228
+ }),
236
229
  );
237
230
  }
238
231
 
@@ -9,7 +9,7 @@ export interface OssAllowList {
9
9
  * A string that identifies a GitHub/GitLab/Bitbucket identity of the form "<host>/<profilename>"
10
10
  * E.g., "github.com/geropl"
11
11
  */
12
- identity: string,
12
+ identity: string;
13
13
 
14
- deleted?: boolean,
15
- }
14
+ deleted?: boolean;
15
+ }
@@ -4,8 +4,8 @@
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
- export namespace PaymentProtocol {
8
- export const UPDATE_GITPOD_SUBSCRIPTION_PATH = '/payment/chargebee'
7
+ export namespace PaymentProtocol {
8
+ export const UPDATE_GITPOD_SUBSCRIPTION_PATH = "/payment/chargebee";
9
9
  }
10
10
 
11
11
  export interface PlanCoupon {
package/src/permission.ts CHANGED
@@ -4,11 +4,10 @@
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
-
8
7
  // see below for explanation
9
8
  export const Permissions = {
10
- "monitor": undefined,
11
- "enforcement": undefined,
9
+ monitor: undefined,
10
+ enforcement: undefined,
12
11
  "privileged-ws": undefined,
13
12
  "registry-access": undefined,
14
13
  "admin-users": undefined,
@@ -18,21 +17,20 @@ export const Permissions = {
18
17
  "ide-settings": undefined,
19
18
  "new-workspace-cluster": undefined,
20
19
  };
21
- export type PermissionName = keyof (typeof Permissions);
22
- export const Roles = {"devops": undefined, "viewer": undefined, "admin": undefined };
23
- export type RoleName = keyof (typeof Roles);
20
+ export type PermissionName = keyof typeof Permissions;
21
+ export const Roles = { devops: undefined, viewer: undefined, admin: undefined };
22
+ export type RoleName = keyof typeof Roles;
24
23
  export type RoleOrPermission = RoleName | PermissionName;
25
24
 
26
25
  export namespace RoleName {
27
26
  export const is = (o: any): o is RoleName => {
28
- return typeof(o) === 'string'
29
- && Role.all().some(r => r.name === o);
30
- }
27
+ return typeof o === "string" && Role.all().some((r) => r.name === o);
28
+ };
31
29
  }
32
30
 
33
31
  export interface Role {
34
- name: RoleName,
35
- permissions: PermissionName[],
32
+ name: RoleName;
33
+ permissions: PermissionName[];
36
34
  }
37
35
 
38
36
  export namespace RolesOrPermissions {
@@ -44,11 +42,11 @@ export namespace RolesOrPermissions {
44
42
  if (Permission.is(rop)) {
45
43
  permissions.add(rop);
46
44
  } else if (RoleName.is(rop)) {
47
- Role.getByName(rop).permissions.forEach(p => permissions.add(p));
45
+ Role.getByName(rop).permissions.forEach((p) => permissions.add(p));
48
46
  }
49
47
  }
50
48
  return permissions;
51
- };
49
+ }
52
50
  }
53
51
 
54
52
  export namespace Permission {
@@ -77,9 +75,8 @@ export namespace Permission {
77
75
  export const IDE_SETTINGS: PermissionName = "ide-settings";
78
76
 
79
77
  export const is = (o: any): o is PermissionName => {
80
- return typeof(o) === 'string'
81
- && Permission.all().some(p => p === o);
82
- }
78
+ return typeof o === "string" && Permission.all().some((p) => p === o);
79
+ };
83
80
 
84
81
  export const all = (): PermissionName[] => {
85
82
  return Object.keys(Permissions) as PermissionName[];
@@ -90,21 +87,13 @@ export namespace Role {
90
87
  /** The default role for all Gitpod developers */
91
88
  export const DEVOPS: Role = {
92
89
  name: "devops",
93
- permissions: [
94
- Permission.MONITOR,
95
- Permission.ENFORCEMENT,
96
- Permission.REGISTRY_ACCESS,
97
- Permission.IDE_SETTINGS
98
- ]
90
+ permissions: [Permission.MONITOR, Permission.ENFORCEMENT, Permission.REGISTRY_ACCESS, Permission.IDE_SETTINGS],
99
91
  };
100
92
 
101
93
  /** A role for people that are allowed to view Gitpod internals */
102
94
  export const VIEWER: Role = {
103
95
  name: "viewer",
104
- permissions: [
105
- Permission.MONITOR,
106
- Permission.REGISTRY_ACCESS,
107
- ]
96
+ permissions: [Permission.MONITOR, Permission.REGISTRY_ACCESS],
108
97
  };
109
98
 
110
99
  export const ADMIN: Role = {
@@ -115,11 +104,11 @@ export namespace Role {
115
104
  Permission.ADMIN_PROJECTS,
116
105
  Permission.ADMIN_API,
117
106
  Permission.ENFORCEMENT,
118
- ]
119
- }
107
+ ],
108
+ };
120
109
 
121
110
  export const getByName = (name: RoleName): Role => {
122
- const result = Role.all().find(r => r.name === name)
111
+ const result = Role.all().find((r) => r.name === name);
123
112
  if (!result) {
124
113
  throw Error("Unknown RoleName: " + name);
125
114
  }
@@ -128,7 +117,7 @@ export namespace Role {
128
117
 
129
118
  export const all = (): Role[] => {
130
119
  return Object.keys(Role)
131
- .map(k => (Role as any)[k])
132
- .filter(k => typeof(k) === 'object');
120
+ .map((k) => (Role as any)[k])
121
+ .filter((k) => typeof k === "object");
133
122
  };
134
123
  }