@gitpod/gitpod-protocol 0.1.5-server-vscode-oauth2.11 → 0.1.5-server-vscode-oauth2.14

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 (319) hide show
  1. package/data/gitpod-schema.json +49 -4
  2. package/lib/accounting-protocol.d.ts +10 -11
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +26 -36
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +12 -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 +4 -4
  10. package/lib/analytics.d.ts.map +1 -1
  11. package/lib/analytics.js.map +1 -1
  12. package/lib/auth.d.ts.map +1 -1
  13. package/lib/context-url.d.ts +18 -5
  14. package/lib/context-url.d.ts.map +1 -1
  15. package/lib/context-url.js +59 -6
  16. package/lib/context-url.js.map +1 -1
  17. package/lib/context-url.spec.d.ts +2 -0
  18. package/lib/context-url.spec.d.ts.map +1 -1
  19. package/lib/context-url.spec.js +40 -4
  20. package/lib/context-url.spec.js.map +1 -1
  21. package/lib/email-protocol.d.ts +1 -1
  22. package/lib/email-protocol.d.ts.map +1 -1
  23. package/lib/email-protocol.js +2 -2
  24. package/lib/email-protocol.js.map +1 -1
  25. package/lib/encryption/container-module.d.ts.map +1 -1
  26. package/lib/encryption/container-module.js +1 -1
  27. package/lib/encryption/container-module.js.map +1 -1
  28. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  29. package/lib/encryption/encryption-engine.js +8 -8
  30. package/lib/encryption/encryption-engine.js.map +1 -1
  31. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  32. package/lib/encryption/encryption-engine.spec.js +2 -3
  33. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  34. package/lib/encryption/encryption-service.d.ts.map +1 -1
  35. package/lib/encryption/encryption-service.js +4 -4
  36. package/lib/encryption/encryption-service.js.map +1 -1
  37. package/lib/encryption/key-provider.d.ts.map +1 -1
  38. package/lib/encryption/key-provider.js +9 -11
  39. package/lib/encryption/key-provider.js.map +1 -1
  40. package/lib/env.d.ts +1 -1
  41. package/lib/env.d.ts.map +1 -1
  42. package/lib/env.js +6 -6
  43. package/lib/env.js.map +1 -1
  44. package/lib/gitpod-file-parser.d.ts.map +1 -1
  45. package/lib/gitpod-file-parser.js +7 -7
  46. package/lib/gitpod-file-parser.js.map +1 -1
  47. package/lib/gitpod-file-parser.spec.js +42 -39
  48. package/lib/gitpod-file-parser.spec.js.map +1 -1
  49. package/lib/gitpod-service.d.ts +57 -31
  50. package/lib/gitpod-service.d.ts.map +1 -1
  51. package/lib/gitpod-service.js +26 -27
  52. package/lib/gitpod-service.js.map +1 -1
  53. package/lib/headless-workspace-log.d.ts +1 -0
  54. package/lib/headless-workspace-log.d.ts.map +1 -1
  55. package/lib/headless-workspace-log.js +2 -1
  56. package/lib/headless-workspace-log.js.map +1 -1
  57. package/lib/ide-frontend-service.d.ts +1 -1
  58. package/lib/ide-protocol.d.ts +105 -0
  59. package/lib/ide-protocol.d.ts.map +1 -0
  60. package/lib/ide-protocol.js +8 -0
  61. package/lib/ide-protocol.js.map +1 -0
  62. package/lib/index.d.ts +16 -13
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/index.js +3 -0
  65. package/lib/index.js.map +1 -1
  66. package/lib/installation-admin-protocol.d.ts +27 -0
  67. package/lib/installation-admin-protocol.d.ts.map +1 -0
  68. package/lib/installation-admin-protocol.js +30 -0
  69. package/lib/installation-admin-protocol.js.map +1 -0
  70. package/lib/license-protocol.d.ts.map +1 -1
  71. package/lib/license-protocol.js.map +1 -1
  72. package/lib/messaging/browser/connection.d.ts +1 -1
  73. package/lib/messaging/browser/connection.d.ts.map +1 -1
  74. package/lib/messaging/browser/connection.js +21 -21
  75. package/lib/messaging/browser/connection.js.map +1 -1
  76. package/lib/messaging/browser/window-connection.d.ts +4 -4
  77. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  78. package/lib/messaging/browser/window-connection.js +10 -7
  79. package/lib/messaging/browser/window-connection.js.map +1 -1
  80. package/lib/messaging/client-call-metrics.d.ts +2 -2
  81. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  82. package/lib/messaging/client-call-metrics.js +21 -21
  83. package/lib/messaging/client-call-metrics.js.map +1 -1
  84. package/lib/messaging/error.d.ts +2 -1
  85. package/lib/messaging/error.d.ts.map +1 -1
  86. package/lib/messaging/error.js +4 -2
  87. package/lib/messaging/error.js.map +1 -1
  88. package/lib/messaging/handler.d.ts.map +1 -1
  89. package/lib/messaging/handler.js +1 -1
  90. package/lib/messaging/node/connection.d.ts +1 -17
  91. package/lib/messaging/node/connection.d.ts.map +1 -1
  92. package/lib/messaging/node/connection.js +23 -59
  93. package/lib/messaging/node/connection.js.map +1 -1
  94. package/lib/messaging/proxy-factory.d.ts +1 -1
  95. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  96. package/lib/messaging/proxy-factory.js +7 -9
  97. package/lib/messaging/proxy-factory.js.map +1 -1
  98. package/lib/oss-allowlist.d.ts +14 -0
  99. package/lib/oss-allowlist.d.ts.map +1 -0
  100. package/lib/oss-allowlist.js +8 -0
  101. package/lib/oss-allowlist.js.map +1 -0
  102. package/lib/payment-protocol.d.ts.map +1 -1
  103. package/lib/payment-protocol.js +1 -1
  104. package/lib/payment-protocol.js.map +1 -1
  105. package/lib/permission.d.ts +9 -3
  106. package/lib/permission.d.ts.map +1 -1
  107. package/lib/permission.js +34 -25
  108. package/lib/permission.js.map +1 -1
  109. package/lib/plans.d.ts +4 -4
  110. package/lib/plans.d.ts.map +1 -1
  111. package/lib/plans.js +206 -171
  112. package/lib/plans.js.map +1 -1
  113. package/lib/protocol.d.ts +83 -78
  114. package/lib/protocol.d.ts.map +1 -1
  115. package/lib/protocol.js +96 -85
  116. package/lib/protocol.js.map +1 -1
  117. package/lib/snapshot-url.d.ts +14 -0
  118. package/lib/snapshot-url.d.ts.map +1 -0
  119. package/lib/snapshot-url.js +26 -0
  120. package/lib/snapshot-url.js.map +1 -0
  121. package/{src/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
  122. package/lib/snapshot-url.spec.d.ts.map +1 -0
  123. package/lib/snapshot-url.spec.js +41 -0
  124. package/lib/snapshot-url.spec.js.map +1 -0
  125. package/lib/team-subscription-protocol.d.ts +5 -3
  126. package/lib/team-subscription-protocol.d.ts.map +1 -1
  127. package/lib/team-subscription-protocol.js +7 -7
  128. package/lib/team-subscription-protocol.js.map +1 -1
  129. package/lib/teams-projects-protocol.d.ts +13 -2
  130. package/lib/teams-projects-protocol.d.ts.map +1 -1
  131. package/lib/teams-projects-protocol.js +10 -3
  132. package/lib/teams-projects-protocol.js.map +1 -1
  133. package/lib/typings/globals.d.ts +2 -2
  134. package/lib/typings/globals.d.ts.map +1 -1
  135. package/lib/util/analytics.d.ts.map +1 -1
  136. package/lib/util/analytics.js +12 -3
  137. package/lib/util/analytics.js.map +1 -1
  138. package/lib/util/async-iterator.d.ts.map +1 -1
  139. package/lib/util/async-iterator.js +3 -3
  140. package/lib/util/async-iterator.js.map +1 -1
  141. package/lib/util/cancelable.js.map +1 -1
  142. package/lib/util/date-time.js +6 -6
  143. package/lib/util/date-time.js.map +1 -1
  144. package/lib/util/deferred.js.map +1 -1
  145. package/lib/util/disposable.d.ts.map +1 -1
  146. package/lib/util/disposable.js +2 -2
  147. package/lib/util/disposable.js.map +1 -1
  148. package/lib/util/event.d.ts.map +1 -1
  149. package/lib/util/event.js +5 -3
  150. package/lib/util/event.js.map +1 -1
  151. package/lib/util/garbage-collected-cache.d.ts +1 -0
  152. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  153. package/lib/util/garbage-collected-cache.js +6 -2
  154. package/lib/util/garbage-collected-cache.js.map +1 -1
  155. package/lib/util/generate-workspace-id.d.ts +1 -1
  156. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  157. package/lib/util/generate-workspace-id.js +452 -435
  158. package/lib/util/generate-workspace-id.js.map +1 -1
  159. package/lib/util/generate-workspace-id.spec.js +29 -1
  160. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  161. package/lib/util/gitpod-cookie.d.ts +1 -1
  162. package/lib/util/gitpod-cookie.d.ts.map +1 -1
  163. package/lib/util/gitpod-cookie.js +1 -4
  164. package/lib/util/gitpod-cookie.js.map +1 -1
  165. package/lib/util/gitpod-host-url.d.ts +1 -1
  166. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  167. package/lib/util/gitpod-host-url.js +35 -33
  168. package/lib/util/gitpod-host-url.js.map +1 -1
  169. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  170. package/lib/util/gitpod-host-url.spec.js +15 -5
  171. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  172. package/lib/util/grpc.d.ts.map +1 -1
  173. package/lib/util/grpc.js.map +1 -1
  174. package/lib/util/jaeger-client-types.d.ts +68 -0
  175. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  176. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  177. package/lib/util/jaeger-client-types.js.map +1 -0
  178. package/lib/util/logging.d.ts +33 -33
  179. package/lib/util/logging.d.ts.map +1 -1
  180. package/lib/util/logging.js +22 -23
  181. package/lib/util/logging.js.map +1 -1
  182. package/lib/util/make-link.js +5 -5
  183. package/lib/util/make-link.js.map +1 -1
  184. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  185. package/lib/util/parse-workspace-id.js +2 -3
  186. package/lib/util/parse-workspace-id.js.map +1 -1
  187. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  188. package/lib/util/parse-workspace-id.spec.js +12 -12
  189. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  190. package/lib/util/queue.spec.js +13 -10
  191. package/lib/util/queue.spec.js.map +1 -1
  192. package/lib/util/repeat.d.ts +15 -0
  193. package/lib/util/repeat.d.ts.map +1 -0
  194. package/lib/util/repeat.js +55 -0
  195. package/lib/util/repeat.js.map +1 -0
  196. package/lib/util/semaphore.d.ts.map +1 -1
  197. package/lib/util/semaphore.js.map +1 -1
  198. package/lib/util/skip-if.d.ts.map +1 -1
  199. package/lib/util/skip-if.js.map +1 -1
  200. package/lib/util/timeutil.d.ts.map +1 -1
  201. package/lib/util/timeutil.js +8 -8
  202. package/lib/util/timeutil.js.map +1 -1
  203. package/lib/util/timeutil.spec.d.ts.map +1 -1
  204. package/lib/util/timeutil.spec.js +2 -2
  205. package/lib/util/timeutil.spec.js.map +1 -1
  206. package/lib/util/tracing.d.ts +52 -6
  207. package/lib/util/tracing.d.ts.map +1 -1
  208. package/lib/util/tracing.js +161 -22
  209. package/lib/util/tracing.js.map +1 -1
  210. package/lib/util/tracing.spec.d.ts +7 -0
  211. package/lib/util/tracing.spec.d.ts.map +1 -0
  212. package/lib/util/tracing.spec.js +121 -0
  213. package/lib/util/tracing.spec.js.map +1 -0
  214. package/lib/util/workspace-port-authentication.d.ts +7 -7
  215. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  216. package/lib/util/workspace-port-authentication.js +8 -11
  217. package/lib/util/workspace-port-authentication.js.map +1 -1
  218. package/lib/workspace-cluster.d.ts +10 -8
  219. package/lib/workspace-cluster.d.ts.map +1 -1
  220. package/lib/workspace-cluster.js +17 -2
  221. package/lib/workspace-cluster.js.map +1 -1
  222. package/lib/workspace-instance.d.ts +23 -4
  223. package/lib/workspace-instance.d.ts.map +1 -1
  224. package/lib/wsready.d.ts +1 -1
  225. package/lib/wsready.d.ts.map +1 -1
  226. package/lib/wsready.js +2 -2
  227. package/package.json +21 -14
  228. package/pkg-yarn.lock +12 -8
  229. package/provenance-bundle.jsonl +2 -0
  230. package/src/accounting-protocol.ts +53 -53
  231. package/src/admin-protocol.ts +35 -18
  232. package/src/analytics.ts +27 -27
  233. package/src/auth.ts +2 -2
  234. package/src/context-url.spec.ts +37 -9
  235. package/src/context-url.ts +94 -36
  236. package/src/email-protocol.ts +5 -6
  237. package/src/encryption/container-module.ts +2 -3
  238. package/src/encryption/encryption-engine.spec.ts +9 -8
  239. package/src/encryption/encryption-engine.ts +14 -14
  240. package/src/encryption/encryption-service.ts +4 -5
  241. package/src/encryption/key-provider.ts +16 -19
  242. package/src/env.ts +9 -9
  243. package/src/gitpod-file-parser.spec.ts +55 -61
  244. package/src/gitpod-file-parser.ts +16 -17
  245. package/src/gitpod-service.ts +167 -113
  246. package/src/headless-workspace-log.ts +6 -4
  247. package/src/ide-frontend-service.ts +2 -2
  248. package/src/ide-protocol.ts +119 -0
  249. package/src/index.ts +16 -13
  250. package/src/installation-admin-protocol.ts +42 -0
  251. package/src/license-protocol.ts +5 -6
  252. package/src/messaging/browser/connection.ts +45 -47
  253. package/src/messaging/browser/window-connection.ts +39 -29
  254. package/src/messaging/client-call-metrics.ts +70 -71
  255. package/src/messaging/error.ts +6 -5
  256. package/src/messaging/handler.ts +6 -6
  257. package/src/messaging/node/connection.ts +23 -70
  258. package/src/messaging/proxy-factory.ts +23 -30
  259. package/src/oss-allowlist.ts +15 -0
  260. package/src/payment-protocol.ts +2 -2
  261. package/src/permission.ts +40 -32
  262. package/src/plans.ts +236 -189
  263. package/src/protocol.ts +280 -277
  264. package/src/snapshot-url.spec.ts +27 -0
  265. package/src/snapshot-url.ts +27 -0
  266. package/src/team-subscription-protocol.ts +33 -23
  267. package/src/teams-projects-protocol.ts +24 -8
  268. package/src/typings/globals.ts +4 -4
  269. package/src/util/analytics.ts +46 -24
  270. package/src/util/async-iterator.ts +4 -5
  271. package/src/util/cancelable.ts +3 -3
  272. package/src/util/date-time.ts +8 -8
  273. package/src/util/deferred.ts +6 -6
  274. package/src/util/disposable.ts +3 -6
  275. package/src/util/event.ts +9 -11
  276. package/src/util/garbage-collected-cache.ts +9 -6
  277. package/src/util/generate-workspace-id.spec.ts +26 -6
  278. package/src/util/generate-workspace-id.ts +458 -440
  279. package/src/util/gitpod-cookie.ts +8 -9
  280. package/src/util/gitpod-host-url.spec.ts +40 -13
  281. package/src/util/gitpod-host-url.ts +41 -38
  282. package/src/util/grpc.ts +1 -1
  283. package/src/util/jaeger-client-types.ts +102 -0
  284. package/src/util/logging.ts +81 -71
  285. package/src/util/make-link.ts +6 -7
  286. package/src/util/parse-workspace-id.spec.ts +17 -8
  287. package/src/util/parse-workspace-id.ts +6 -7
  288. package/src/util/queue.spec.ts +27 -25
  289. package/src/util/repeat.ts +45 -0
  290. package/src/util/semaphore.ts +4 -6
  291. package/src/util/skip-if.ts +9 -6
  292. package/src/util/timeutil.spec.ts +14 -15
  293. package/src/util/timeutil.ts +15 -11
  294. package/src/util/tracing.spec.ts +88 -0
  295. package/src/util/tracing.ts +202 -31
  296. package/src/util/workspace-port-authentication.ts +10 -13
  297. package/src/workspace-cluster.ts +26 -15
  298. package/src/workspace-instance.ts +48 -24
  299. package/src/wsready.ts +3 -3
  300. package/data/builtin-theia-plugins.json +0 -372
  301. package/lib/messaging/connection-error-handler.d.ts +0 -27
  302. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  303. package/lib/messaging/connection-error-handler.js +0 -34
  304. package/lib/messaging/connection-error-handler.js.map +0 -1
  305. package/lib/theia-plugins.d.ts +0 -11
  306. package/lib/theia-plugins.d.ts.map +0 -1
  307. package/lib/theia-plugins.js.map +0 -1
  308. package/lib/util/repeater.d.ts +0 -22
  309. package/lib/util/repeater.d.ts.map +0 -1
  310. package/lib/util/repeater.js +0 -65
  311. package/lib/util/repeater.js.map +0 -1
  312. package/lib/util/safe-promise.d.ts +0 -11
  313. package/lib/util/safe-promise.d.ts.map +0 -1
  314. package/lib/util/safe-promise.js +0 -31
  315. package/lib/util/safe-promise.js.map +0 -1
  316. package/src/messaging/connection-error-handler.ts +0 -62
  317. package/src/util/jaeger-client.d.ts +0 -105
  318. package/src/util/repeater.ts +0 -49
  319. package/src/util/safe-promise.ts +0 -26
@@ -5,30 +5,52 @@
5
5
  */
6
6
 
7
7
  import {
8
- User, WorkspaceInfo, WorkspaceCreationResult, WorkspaceInstanceUser,
9
- WhitelistedRepository, WorkspaceImageBuild, AuthProviderInfo, Branding, CreateWorkspaceMode,
10
- Token, UserEnvVarValue, ResolvePluginsParams, PreparePluginUploadParams, Terms,
11
- ResolvedPlugins, Configuration, InstallPluginsParams, UninstallPluginParams, UserInfo, GitpodTokenType,
12
- GitpodToken, AuthProviderEntry, GuessGitTokenScopesParams, GuessedGitTokenScopes
13
- } from './protocol';
8
+ User,
9
+ WorkspaceInfo,
10
+ WorkspaceCreationResult,
11
+ WorkspaceInstanceUser,
12
+ WhitelistedRepository,
13
+ WorkspaceImageBuild,
14
+ AuthProviderInfo,
15
+ CreateWorkspaceMode,
16
+ Token,
17
+ UserEnvVarValue,
18
+ Terms,
19
+ Configuration,
20
+ UserInfo,
21
+ GitpodTokenType,
22
+ GitpodToken,
23
+ AuthProviderEntry,
24
+ GuessGitTokenScopesParams,
25
+ GuessedGitTokenScopes,
26
+ ProjectEnvVar,
27
+ } from "./protocol";
14
28
  import {
15
- Team, TeamMemberInfo,
16
- TeamMembershipInvite, Project, TeamMemberRole, PrebuildWithStatus, StartPrebuildResult
17
- } from './teams-projects-protocol';
18
- import { JsonRpcProxy, JsonRpcServer } from './messaging/proxy-factory';
19
- import { Disposable, CancellationTokenSource } from 'vscode-jsonrpc';
20
- import { HeadlessLogUrls } from './headless-workspace-log';
21
- import { WorkspaceInstance, WorkspaceInstancePort, WorkspaceInstancePhase } from './workspace-instance';
22
- import { AdminServer } from './admin-protocol';
23
- import { GitpodHostUrl } from './util/gitpod-host-url';
24
- import { WebSocketConnectionProvider } from './messaging/browser/connection';
25
- import { PermissionName } from './permission';
26
- import { LicenseService } from './license-protocol';
27
- import { Emitter } from './util/event';
28
- import { AccountStatement, CreditAlert } from './accounting-protocol';
29
- import { GithubUpgradeURL, PlanCoupon } from './payment-protocol';
30
- import { TeamSubscription, TeamSubscriptionSlot, TeamSubscriptionSlotResolved } from './team-subscription-protocol';
31
- import { RemotePageMessage, RemoteTrackMessage } from './analytics';
29
+ Team,
30
+ TeamMemberInfo,
31
+ TeamMembershipInvite,
32
+ Project,
33
+ TeamMemberRole,
34
+ PrebuildWithStatus,
35
+ StartPrebuildResult,
36
+ PartialProject,
37
+ } from "./teams-projects-protocol";
38
+ import { JsonRpcProxy, JsonRpcServer } from "./messaging/proxy-factory";
39
+ import { Disposable, CancellationTokenSource } from "vscode-jsonrpc";
40
+ import { HeadlessLogUrls } from "./headless-workspace-log";
41
+ import { WorkspaceInstance, WorkspaceInstancePort, WorkspaceInstancePhase } from "./workspace-instance";
42
+ import { AdminServer } from "./admin-protocol";
43
+ import { GitpodHostUrl } from "./util/gitpod-host-url";
44
+ import { WebSocketConnectionProvider } from "./messaging/browser/connection";
45
+ import { PermissionName } from "./permission";
46
+ import { LicenseService } from "./license-protocol";
47
+ import { Emitter } from "./util/event";
48
+ import { AccountStatement, CreditAlert } from "./accounting-protocol";
49
+ import { GithubUpgradeURL, PlanCoupon } from "./payment-protocol";
50
+ import { TeamSubscription, TeamSubscriptionSlot, TeamSubscriptionSlotResolved } from "./team-subscription-protocol";
51
+ import { RemotePageMessage, RemoteTrackMessage, RemoteIdentifyMessage } from "./analytics";
52
+ import { IDEServer } from "./ide-protocol";
53
+ import { InstallationAdminSettings, TelemetryData } from "./installation-admin-protocol";
32
54
 
33
55
  export interface GitpodClient {
34
56
  onInstanceUpdate(instance: WorkspaceInstance): void;
@@ -44,8 +66,8 @@ export interface GitpodClient {
44
66
  //#endregion
45
67
  }
46
68
 
47
- export const GitpodServer = Symbol('GitpodServer');
48
- export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer, LicenseService {
69
+ export const GitpodServer = Symbol("GitpodServer");
70
+ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer, LicenseService, IDEServer {
49
71
  // User related API
50
72
  getLoggedInUser(): Promise<User>;
51
73
  getTerms(): Promise<Terms>;
@@ -54,7 +76,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
54
76
  getOwnAuthProviders(): Promise<AuthProviderEntry[]>;
55
77
  updateOwnAuthProvider(params: GitpodServer.UpdateOwnAuthProviderParams): Promise<AuthProviderEntry>;
56
78
  deleteOwnAuthProvider(params: GitpodServer.DeleteOwnAuthProviderParams): Promise<void>;
57
- getBranding(): Promise<Branding>;
58
79
  getConfiguration(): Promise<Configuration>;
59
80
  getToken(query: GitpodServer.GetTokenSearchOptions): Promise<Token | undefined>;
60
81
  getGitpodTokenScopes(tokenHash: string): Promise<string[]>;
@@ -71,8 +92,15 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
71
92
  getWorkspaceOwner(workspaceId: string): Promise<UserInfo | undefined>;
72
93
  getWorkspaceUsers(workspaceId: string): Promise<WorkspaceInstanceUser[]>;
73
94
  getFeaturedRepositories(): Promise<WhitelistedRepository[]>;
95
+ getSuggestedContextURLs(): Promise<string[]>;
96
+ /**
97
+ * **Security:**
98
+ * Sensitive information like an owner token is erased, since it allows access for all team members.
99
+ * If you need to access an owner token use `getOwnerToken` instead.
100
+ */
74
101
  getWorkspace(id: string): Promise<WorkspaceInfo>;
75
102
  isWorkspaceOwner(workspaceId: string): Promise<boolean>;
103
+ getOwnerToken(workspaceId: string): Promise<string>;
76
104
 
77
105
  /**
78
106
  * Creates and starts a workspace for the given context URL.
@@ -125,6 +153,11 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
125
153
  resetGenericInvite(inviteId: string): Promise<TeamMembershipInvite>;
126
154
  deleteTeam(teamId: string, userId: string): Promise<void>;
127
155
 
156
+ // Admin Settings
157
+ adminGetSettings(): Promise<InstallationAdminSettings>;
158
+ adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
159
+ adminGetTelemetryData(): Promise<TelemetryData>;
160
+
128
161
  // Projects
129
162
  getProviderRepositoriesForUser(params: GetProviderRepositoriesParams): Promise<ProviderRepository[]>;
130
163
  createProject(params: CreateProjectParams): Promise<Project>;
@@ -135,13 +168,19 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
135
168
  findPrebuilds(params: FindPrebuildsParams): Promise<PrebuildWithStatus[]>;
136
169
  triggerPrebuild(projectId: string, branchName: string | null): Promise<StartPrebuildResult>;
137
170
  cancelPrebuild(projectId: string, prebuildId: string): Promise<void>;
138
- setProjectConfiguration(projectId: string, configString: string): Promise<void>;
139
171
  fetchProjectRepositoryConfiguration(projectId: string): Promise<string | undefined>;
140
172
  guessProjectConfiguration(projectId: string): Promise<string | undefined>;
173
+ fetchRepositoryConfiguration(cloneUrl: string): Promise<string | undefined>;
174
+ guessRepositoryConfiguration(cloneUrl: string): Promise<string | undefined>;
175
+ setProjectConfiguration(projectId: string, configString: string): Promise<void>;
176
+ updateProjectPartial(partialProject: PartialProject): Promise<void>;
177
+ setProjectEnvironmentVariable(projectId: string, name: string, value: string, censored: boolean): Promise<void>;
178
+ getProjectEnvironmentVariables(projectId: string): Promise<ProjectEnvVar[]>;
179
+ deleteProjectEnvironmentVariable(variableId: string): Promise<void>;
141
180
 
142
181
  // content service
143
- getContentBlobUploadUrl(name: string): Promise<string>
144
- getContentBlobDownloadUrl(name: string): Promise<string>
182
+ getContentBlobUploadUrl(name: string): Promise<string>;
183
+ getContentBlobDownloadUrl(name: string): Promise<string>;
145
184
 
146
185
  // Gitpod token
147
186
  getGitpodTokens(): Promise<GitpodToken[]>;
@@ -153,10 +192,15 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
153
192
  registerGithubApp(installationId: string): Promise<void>;
154
193
 
155
194
  /**
156
- * Stores a new snapshot for the given workspace and bucketId
195
+ * Stores a new snapshot for the given workspace and bucketId. Returns _before_ the actual snapshot is done. To wait for that, use `waitForSnapshot`.
157
196
  * @return the snapshot id
158
197
  */
159
198
  takeSnapshot(options: GitpodServer.TakeSnapshotOptions): Promise<string>;
199
+ /**
200
+ *
201
+ * @param snapshotId
202
+ */
203
+ waitForSnapshot(snapshotId: string): Promise<void>;
160
204
 
161
205
  /**
162
206
  * Returns the list of snapshots that exist for a workspace.
@@ -173,23 +217,12 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
173
217
  */
174
218
  getLayout(workspaceId: string): Promise<string | undefined>;
175
219
 
176
- /**
177
- * @param params
178
- * @returns promise resolves to an URL to be used for the upload
179
- */
180
- preparePluginUpload(params: PreparePluginUploadParams): Promise<string>
181
- resolvePlugins(workspaceId: string, params: ResolvePluginsParams): Promise<ResolvedPlugins>;
182
- installUserPlugins(params: InstallPluginsParams): Promise<boolean>;
183
- uninstallUserPlugin(params: UninstallPluginParams): Promise<boolean>;
184
-
185
220
  guessGitTokenScopes(params: GuessGitTokenScopesParams): Promise<GuessedGitTokenScopes>;
186
221
 
187
222
  /**
188
223
  * gitpod.io concerns
189
224
  */
190
225
  isStudent(): Promise<boolean>;
191
- getPrivateRepoTrialEndDate(): Promise<string | undefined>;
192
-
193
226
  /**
194
227
  *
195
228
  */
@@ -207,7 +240,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
207
240
 
208
241
  getShowPaymentUI(): Promise<boolean>;
209
242
  isChargebeeCustomer(): Promise<boolean>;
210
- mayAccessPrivateRepo(): Promise<boolean>;
211
243
 
212
244
  subscriptionUpgradeTo(subscriptionId: string, chargebeePlanId: string): Promise<void>;
213
245
  subscriptionDowngradeTo(subscriptionId: string, chargebeePlanId: string): Promise<void>;
@@ -216,9 +248,13 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
216
248
 
217
249
  tsGet(): Promise<TeamSubscription[]>;
218
250
  tsGetSlots(): Promise<TeamSubscriptionSlotResolved[]>;
219
- tsGetUnassignedSlot(teamSubscriptionId: string): Promise<TeamSubscriptionSlot | undefined>
251
+ tsGetUnassignedSlot(teamSubscriptionId: string): Promise<TeamSubscriptionSlot | undefined>;
220
252
  tsAddSlots(teamSubscriptionId: string, quantity: number): Promise<void>;
221
- tsAssignSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string, identityStr: string | undefined): Promise<void>
253
+ tsAssignSlot(
254
+ teamSubscriptionId: string,
255
+ teamSubscriptionSlotId: string,
256
+ identityStr: string | undefined,
257
+ ): Promise<void>;
222
258
  tsReassignSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string, newIdentityStr: string): Promise<void>;
223
259
  tsDeactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
224
260
  tsReactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
@@ -230,10 +266,22 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
230
266
  */
231
267
  trackEvent(event: RemoteTrackMessage): Promise<void>;
232
268
  trackLocation(event: RemotePageMessage): Promise<void>;
269
+ identifyUser(event: RemoteIdentifyMessage): Promise<void>;
270
+ }
271
+
272
+ export interface RateLimiterError {
273
+ method?: string;
274
+
275
+ /**
276
+ * Retry after this many seconds, earliest.
277
+ * cmp.: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
278
+ */
279
+ retryAfter: number;
233
280
  }
234
281
 
235
282
  export interface CreateProjectParams {
236
283
  name: string;
284
+ slug?: string;
237
285
  account: string;
238
286
  provider: string;
239
287
  cloneUrl: string;
@@ -255,32 +303,37 @@ export interface GetProviderRepositoriesParams {
255
303
  }
256
304
  export interface ProviderRepository {
257
305
  name: string;
306
+ path?: string;
258
307
  account: string;
259
308
  accountAvatarUrl: string;
260
309
  cloneUrl: string;
261
- updatedAt: string;
310
+ updatedAt?: string;
262
311
  installationId?: number;
263
312
  installationUpdatedAt?: string;
264
313
 
265
- inUse?: boolean;
314
+ inUse?: { userName: string };
266
315
  }
267
316
 
268
- export interface ClientHeaderFields{
269
- ip?:string;
270
- userAgent?:string;
271
- dnt?:number;
272
- clientRegion?:string;
317
+ export interface ClientHeaderFields {
318
+ ip?: string;
319
+ userAgent?: string;
320
+ dnt?: string;
321
+ clientRegion?: string;
273
322
  }
274
323
 
275
324
  export const WorkspaceTimeoutValues = ["30m", "60m", "180m"] as const;
276
325
 
277
- export const createServiceMock = function <C extends GitpodClient, S extends GitpodServer>(methods: Partial<JsonRpcProxy<S>>): GitpodServiceImpl<C, S> {
326
+ export const createServiceMock = function <C extends GitpodClient, S extends GitpodServer>(
327
+ methods: Partial<JsonRpcProxy<S>>,
328
+ ): GitpodServiceImpl<C, S> {
278
329
  return new GitpodServiceImpl<C, S>(createServerMock(methods));
279
- }
330
+ };
280
331
 
281
- export const createServerMock = function <C extends GitpodClient, S extends GitpodServer>(methods: Partial<JsonRpcProxy<S>>): JsonRpcProxy<S> {
282
- methods.setClient = methods.setClient || (() => { });
283
- methods.dispose = methods.dispose || (() => { });
332
+ export const createServerMock = function <C extends GitpodClient, S extends GitpodServer>(
333
+ methods: Partial<JsonRpcProxy<S>>,
334
+ ): JsonRpcProxy<S> {
335
+ methods.setClient = methods.setClient || (() => {});
336
+ methods.dispose = methods.dispose || (() => {});
284
337
  return new Proxy<JsonRpcProxy<S>>(methods as any as JsonRpcProxy<S>, {
285
338
  // @ts-ignore
286
339
  get: (target: S, property: keyof S) => {
@@ -289,25 +342,25 @@ export const createServerMock = function <C extends GitpodClient, S extends Gitp
289
342
  throw new Error(`Method ${property} not implemented`);
290
343
  }
291
344
  return result;
292
- }
345
+ },
293
346
  });
294
- }
347
+ };
295
348
 
296
349
  type WorkspaceTimeoutDurationTuple = typeof WorkspaceTimeoutValues;
297
350
  export type WorkspaceTimeoutDuration = WorkspaceTimeoutDurationTuple[number];
298
351
 
299
352
  export interface SetWorkspaceTimeoutResult {
300
- resetTimeoutOnWorkspaces: string[]
353
+ resetTimeoutOnWorkspaces: string[];
301
354
  }
302
355
 
303
356
  export interface GetWorkspaceTimeoutResult {
304
- duration: WorkspaceTimeoutDuration
305
- canChange: boolean
357
+ duration: WorkspaceTimeoutDuration;
358
+ canChange: boolean;
306
359
  }
307
360
 
308
361
  export interface StartWorkspaceResult {
309
- instanceID: string
310
- workspaceURL?: string
362
+ instanceID: string;
363
+ workspaceURL?: string;
311
364
  }
312
365
 
313
366
  export namespace GitpodServer {
@@ -332,6 +385,8 @@ export namespace GitpodServer {
332
385
  export interface TakeSnapshotOptions {
333
386
  workspaceId: string;
334
387
  layoutData?: string;
388
+ /* this is here to enable backwards-compatibility and untangling rollout between workspace, IDE and meta */
389
+ dontWait?: boolean;
335
390
  }
336
391
  export interface GetUserStorageResourceOptions {
337
392
  readonly uri: string;
@@ -349,23 +404,23 @@ export namespace GitpodServer {
349
404
  readonly roundTripTime?: number;
350
405
  }
351
406
  export interface UpdateOwnAuthProviderParams {
352
- readonly entry: AuthProviderEntry.UpdateEntry | AuthProviderEntry.NewEntry
407
+ readonly entry: AuthProviderEntry.UpdateEntry | AuthProviderEntry.NewEntry;
353
408
  }
354
409
  export interface DeleteOwnAuthProviderParams {
355
- readonly id: string
410
+ readonly id: string;
356
411
  }
357
412
  export type AdmissionLevel = "owner" | "everyone";
358
413
  export type PinAction = "pin" | "unpin" | "toggle";
359
414
  export interface GenerateNewGitpodTokenOptions {
360
- name?: string
361
- type: GitpodTokenType
362
- scopes?: string[]
415
+ name?: string;
416
+ type: GitpodTokenType;
417
+ scopes?: string[];
363
418
  }
364
419
  }
365
420
 
366
- export const GitpodServerPath = '/gitpod';
421
+ export const GitpodServerPath = "/gitpod";
367
422
 
368
- export const GitpodServerProxy = Symbol('GitpodServerProxy');
423
+ export const GitpodServerProxy = Symbol("GitpodServerProxy");
369
424
  export type GitpodServerProxy<S extends GitpodServer> = JsonRpcProxy<S>;
370
425
 
371
426
  export class GitpodCompositeClient<Client extends GitpodClient> implements GitpodClient {
@@ -373,12 +428,14 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
373
428
 
374
429
  public registerClient(client: Partial<Client>): Disposable {
375
430
  this.clients.push(client);
376
- const index = this.clients.length;
377
431
  return {
378
432
  dispose: () => {
379
- this.clients.slice(index, 1);
380
- }
381
- }
433
+ const index = this.clients.indexOf(client);
434
+ if (index > -1) {
435
+ this.clients.splice(index, 1);
436
+ }
437
+ },
438
+ };
382
439
  }
383
440
 
384
441
  onInstanceUpdate(instance: WorkspaceInstance): void {
@@ -387,7 +444,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
387
444
  try {
388
445
  client.onInstanceUpdate(instance);
389
446
  } catch (error) {
390
- console.error(error)
447
+ console.error(error);
391
448
  }
392
449
  }
393
450
  }
@@ -399,19 +456,22 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
399
456
  try {
400
457
  client.onPrebuildUpdate(update);
401
458
  } catch (error) {
402
- console.error(error)
459
+ console.error(error);
403
460
  }
404
461
  }
405
462
  }
406
463
  }
407
464
 
408
- onWorkspaceImageBuildLogs(info: WorkspaceImageBuild.StateInfo, content: WorkspaceImageBuild.LogContent | undefined): void {
465
+ onWorkspaceImageBuildLogs(
466
+ info: WorkspaceImageBuild.StateInfo,
467
+ content: WorkspaceImageBuild.LogContent | undefined,
468
+ ): void {
409
469
  for (const client of this.clients) {
410
470
  if (client.onWorkspaceImageBuildLogs) {
411
471
  try {
412
472
  client.onWorkspaceImageBuildLogs(info, content);
413
473
  } catch (error) {
414
- console.error(error)
474
+ console.error(error);
415
475
  }
416
476
  }
417
477
  }
@@ -423,7 +483,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
423
483
  try {
424
484
  client.notifyDidOpenConnection();
425
485
  } catch (error) {
426
- console.error(error)
486
+ console.error(error);
427
487
  }
428
488
  }
429
489
  }
@@ -435,7 +495,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
435
495
  try {
436
496
  client.notifyDidCloseConnection();
437
497
  } catch (error) {
438
- console.error(error)
498
+ console.error(error);
439
499
  }
440
500
  }
441
501
  }
@@ -447,17 +507,16 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
447
507
  try {
448
508
  client.onCreditAlert(creditAlert);
449
509
  } catch (error) {
450
- console.error(error)
510
+ console.error(error);
451
511
  }
452
512
  }
453
513
  }
454
514
  }
455
-
456
515
  }
457
516
 
458
517
  export type GitpodService = GitpodServiceImpl<GitpodClient, GitpodServer>;
459
518
 
460
- const hasWindow = (typeof window !== 'undefined');
519
+ const hasWindow = typeof window !== "undefined";
461
520
  const phasesOrder: Record<WorkspaceInstancePhase, number> = {
462
521
  unknown: 0,
463
522
  preparing: 1,
@@ -467,44 +526,41 @@ const phasesOrder: Record<WorkspaceInstancePhase, number> = {
467
526
  running: 5,
468
527
  interrupted: 6,
469
528
  stopping: 7,
470
- stopped: 8
529
+ stopped: 8,
471
530
  };
472
531
  export class WorkspaceInstanceUpdateListener {
473
532
  private readonly onDidChangeEmitter = new Emitter<void>();
474
533
  readonly onDidChange = this.onDidChangeEmitter.event;
475
534
 
476
- private source: 'sync' | 'update' = 'sync';
535
+ private source: "sync" | "update" = "sync";
477
536
 
478
537
  get info(): WorkspaceInfo {
479
538
  return this._info;
480
539
  }
481
540
 
482
- constructor(
483
- private readonly service: GitpodService,
484
- private _info: WorkspaceInfo
485
- ) {
541
+ constructor(private readonly service: GitpodService, private _info: WorkspaceInfo) {
486
542
  service.registerClient({
487
- onInstanceUpdate: instance => {
543
+ onInstanceUpdate: (instance) => {
488
544
  if (this.isOutOfOrder(instance)) {
489
545
  return;
490
546
  }
491
547
  this.cancelSync();
492
548
  this._info.latestInstance = instance;
493
- this.source = 'update';
549
+ this.source = "update";
494
550
  this.onDidChangeEmitter.fire(undefined);
495
551
  },
496
552
  notifyDidOpenConnection: () => {
497
553
  this.sync();
498
- }
554
+ },
499
555
  });
500
556
  if (hasWindow) {
501
557
  // learn about page lifecycle here: https://developers.google.com/web/updates/2018/07/page-lifecycle-api
502
- window.document.addEventListener('visibilitychange', async () => {
503
- if (window.document.visibilityState === 'visible') {
558
+ window.document.addEventListener("visibilitychange", async () => {
559
+ if (window.document.visibilityState === "visible") {
504
560
  this.sync();
505
561
  }
506
562
  });
507
- window.addEventListener('pageshow', e => {
563
+ window.addEventListener("pageshow", (e) => {
508
564
  if (e.persisted) {
509
565
  this.sync();
510
566
  }
@@ -532,12 +588,12 @@ export class WorkspaceInstanceUpdateListener {
532
588
  return;
533
589
  }
534
590
  this._info = info;
535
- this.source = 'sync';
591
+ this.source = "sync";
536
592
  this.onDidChangeEmitter.fire(undefined);
537
593
  } catch (e) {
538
- console.error('failed to sync workspace instance:', e)
594
+ console.error("failed to sync workspace instance:", e);
539
595
  }
540
- })
596
+ });
541
597
  }
542
598
  private cancelSync(): void {
543
599
  if (this.syncTokenSource) {
@@ -554,7 +610,7 @@ export class WorkspaceInstanceUpdateListener {
554
610
  if (instance.workspaceId !== this._info.workspace.id) {
555
611
  return true;
556
612
  }
557
- if (this.source === 'update') {
613
+ if (this.source === "update") {
558
614
  return false;
559
615
  }
560
616
  if (instance.id !== this.info.latestInstance?.id) {
@@ -562,15 +618,13 @@ export class WorkspaceInstanceUpdateListener {
562
618
  }
563
619
  return phasesOrder[instance.status.phase] < phasesOrder[this.info.latestInstance.status.phase];
564
620
  }
565
-
566
621
  }
567
622
 
568
623
  export interface GitpodServiceOptions {
569
- onReconnect?: () => (void | Promise<void>)
624
+ onReconnect?: () => void | Promise<void>;
570
625
  }
571
626
 
572
627
  export class GitpodServiceImpl<Client extends GitpodClient, Server extends GitpodServer> {
573
-
574
628
  private readonly compositeClient = new GitpodCompositeClient<Client>();
575
629
 
576
630
  constructor(public readonly server: JsonRpcProxy<Server>, private options?: GitpodServiceOptions) {
@@ -585,7 +639,8 @@ export class GitpodServiceImpl<Client extends GitpodClient, Server extends Gitpo
585
639
 
586
640
  private readonly instanceListeners = new Map<string, Promise<WorkspaceInstanceUpdateListener>>();
587
641
  listenToInstance(workspaceId: string): Promise<WorkspaceInstanceUpdateListener> {
588
- const listener = this.instanceListeners.get(workspaceId) ||
642
+ const listener =
643
+ this.instanceListeners.get(workspaceId) ||
589
644
  (async () => {
590
645
  const info = await this.server.getWorkspace(workspaceId);
591
646
  return new WorkspaceInstanceUpdateListener(this, info);
@@ -601,26 +656,25 @@ export class GitpodServiceImpl<Client extends GitpodClient, Server extends Gitpo
601
656
  }
602
657
  }
603
658
 
604
- export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(serverUrl: string | Promise<string>) {
659
+ export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(
660
+ serverUrl: string | Promise<string>,
661
+ ) {
605
662
  const toWsUrl = (serverUrl: string) => {
606
- return new GitpodHostUrl(serverUrl)
607
- .asWebsocket()
608
- .withApi({ pathname: GitpodServerPath })
609
- .toString();
663
+ return new GitpodHostUrl(serverUrl).asWebsocket().withApi({ pathname: GitpodServerPath }).toString();
610
664
  };
611
665
  let url: string | Promise<string>;
612
666
  if (typeof serverUrl === "string") {
613
667
  url = toWsUrl(serverUrl);
614
668
  } else {
615
- url = serverUrl.then(url => toWsUrl(url));
669
+ url = serverUrl.then((url) => toWsUrl(url));
616
670
  }
617
671
 
618
672
  const connectionProvider = new WebSocketConnectionProvider();
619
- let onReconnect = () => { };
673
+ let onReconnect = () => {};
620
674
  const gitpodServer = connectionProvider.createProxy<S>(url, undefined, {
621
- onListening: socket => {
675
+ onListening: (socket) => {
622
676
  onReconnect = () => socket.reconnect();
623
- }
677
+ },
624
678
  });
625
679
  return new GitpodServiceImpl<C, S>(gitpodServer, { onReconnect });
626
- }
680
+ }
@@ -4,21 +4,23 @@
4
4
  * See License-AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
-
8
7
  export enum HeadlessWorkspaceEventType {
9
8
  LogOutput = "log-output",
10
9
  FinishedSuccessfully = "finish-success",
11
10
  FinishedButFailed = "finish-fail",
12
11
  AbortedTimedOut = "aborted-timeout",
13
12
  Aborted = "aborted",
14
- Started = "started"
13
+ Failed = "failed",
14
+ Started = "started",
15
15
  }
16
16
  export namespace HeadlessWorkspaceEventType {
17
17
  export function isRunning(t: HeadlessWorkspaceEventType) {
18
18
  return t === HeadlessWorkspaceEventType.LogOutput;
19
19
  }
20
20
  export function didFinish(t: HeadlessWorkspaceEventType) {
21
- return t === HeadlessWorkspaceEventType.FinishedButFailed || t === HeadlessWorkspaceEventType.FinishedSuccessfully;
21
+ return (
22
+ t === HeadlessWorkspaceEventType.FinishedButFailed || t === HeadlessWorkspaceEventType.FinishedSuccessfully
23
+ );
22
24
  }
23
25
  }
24
26
 
@@ -35,4 +37,4 @@ export interface HeadlessLogUrls {
35
37
 
36
38
  /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
37
39
  export const HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
38
- export const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
40
+ export const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
@@ -7,7 +7,7 @@
7
7
  import { Event } from "./util/event";
8
8
  import { Disposable } from "./util/disposable";
9
9
 
10
- export type IDEFrontendState = 'init' | 'ready' | 'terminated';
10
+ export type IDEFrontendState = "init" | "ready" | "terminated";
11
11
 
12
12
  export interface IDEFrontendService {
13
13
  readonly state: IDEFrontendState;
@@ -25,4 +25,4 @@ export interface IDEFrontendService {
25
25
  * confirmation dialogs for stopped workspaces.
26
26
  */
27
27
  start(): Disposable;
28
- }
28
+ }