@gitpod/gitpod-protocol 0.1.5-test.8 → 0.1.5-to-new-image.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.
Files changed (365) hide show
  1. package/data/builtin-theia-plugins.json +28 -18
  2. package/data/gitpod-schema.json +34 -19
  3. package/lib/accounting-protocol.d.ts +155 -0
  4. package/lib/accounting-protocol.d.ts.map +1 -0
  5. package/lib/accounting-protocol.js +109 -0
  6. package/lib/accounting-protocol.js.map +1 -0
  7. package/lib/admin-protocol.d.ts +34 -5
  8. package/lib/admin-protocol.d.ts.map +1 -1
  9. package/lib/admin-protocol.js +16 -1
  10. package/lib/admin-protocol.js.map +1 -1
  11. package/lib/analytics.d.ts +44 -0
  12. package/lib/analytics.d.ts.map +1 -0
  13. package/lib/analytics.js +10 -0
  14. package/lib/analytics.js.map +1 -0
  15. package/lib/auth.d.ts +25 -0
  16. package/lib/auth.d.ts.map +1 -0
  17. package/lib/auth.js +16 -0
  18. package/lib/auth.js.map +1 -0
  19. package/lib/context-url.d.ts +31 -0
  20. package/lib/context-url.d.ts.map +1 -0
  21. package/lib/context-url.js +102 -0
  22. package/lib/context-url.js.map +1 -0
  23. package/lib/context-url.spec.d.ts +14 -0
  24. package/lib/context-url.spec.d.ts.map +1 -0
  25. package/lib/context-url.spec.js +94 -0
  26. package/lib/context-url.spec.js.map +1 -0
  27. package/lib/email-protocol.d.ts +2 -2
  28. package/lib/email-protocol.d.ts.map +1 -1
  29. package/lib/email-protocol.js +6 -5
  30. package/lib/email-protocol.js.map +1 -1
  31. package/lib/encryption/container-module.d.ts +1 -1
  32. package/lib/encryption/container-module.js +7 -5
  33. package/lib/encryption/container-module.js.map +1 -1
  34. package/lib/encryption/encryption-engine.d.ts +1 -1
  35. package/lib/encryption/encryption-engine.js +21 -21
  36. package/lib/encryption/encryption-engine.js.map +1 -1
  37. package/lib/encryption/encryption-engine.spec.d.ts +2 -2
  38. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  39. package/lib/encryption/encryption-engine.spec.js +31 -37
  40. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  41. package/lib/encryption/encryption-service.d.ts +1 -1
  42. package/lib/encryption/encryption-service.js +31 -44
  43. package/lib/encryption/encryption-service.js.map +1 -1
  44. package/lib/encryption/key-provider.d.ts +2 -2
  45. package/lib/encryption/key-provider.d.ts.map +1 -1
  46. package/lib/encryption/key-provider.js +27 -31
  47. package/lib/encryption/key-provider.js.map +1 -1
  48. package/lib/env.d.ts +2 -3
  49. package/lib/env.d.ts.map +1 -1
  50. package/lib/env.js +21 -21
  51. package/lib/env.js.map +1 -1
  52. package/lib/gitpod-file-parser.d.ts +1 -1
  53. package/lib/gitpod-file-parser.js +27 -42
  54. package/lib/gitpod-file-parser.js.map +1 -1
  55. package/lib/gitpod-file-parser.spec.d.ts +1 -1
  56. package/lib/gitpod-file-parser.spec.js +117 -117
  57. package/lib/gitpod-file-parser.spec.js.map +1 -1
  58. package/lib/gitpod-service.d.ts +213 -35
  59. package/lib/gitpod-service.d.ts.map +1 -1
  60. package/lib/gitpod-service.js +241 -116
  61. package/lib/gitpod-service.js.map +1 -1
  62. package/lib/headless-workspace-log.d.ts +9 -12
  63. package/lib/headless-workspace-log.d.ts.map +1 -1
  64. package/lib/headless-workspace-log.js +5 -7
  65. package/lib/headless-workspace-log.js.map +1 -1
  66. package/lib/ide-frontend-service.d.ts +26 -0
  67. package/lib/ide-frontend-service.d.ts.map +1 -0
  68. package/lib/ide-frontend-service.js +8 -0
  69. package/lib/ide-frontend-service.js.map +1 -0
  70. package/lib/ide-protocol.d.ts +105 -0
  71. package/lib/ide-protocol.d.ts.map +1 -0
  72. package/lib/{util/without.js → ide-protocol.js} +2 -2
  73. package/lib/ide-protocol.js.map +1 -0
  74. package/lib/index.d.ts +7 -1
  75. package/lib/index.d.ts.map +1 -1
  76. package/lib/index.js +27 -12
  77. package/lib/index.js.map +1 -1
  78. package/lib/installation-admin-protocol.d.ts +27 -0
  79. package/lib/installation-admin-protocol.d.ts.map +1 -0
  80. package/lib/installation-admin-protocol.js +30 -0
  81. package/lib/installation-admin-protocol.js.map +1 -0
  82. package/lib/license-protocol.d.ts +1 -1
  83. package/lib/license-protocol.js +2 -1
  84. package/lib/license-protocol.js.map +1 -1
  85. package/lib/messaging/browser/connection.d.ts +6 -4
  86. package/lib/messaging/browser/connection.d.ts.map +1 -1
  87. package/lib/messaging/browser/connection.js +188 -48
  88. package/lib/messaging/browser/connection.js.map +1 -1
  89. package/lib/messaging/browser/window-connection.d.ts +26 -0
  90. package/lib/messaging/browser/window-connection.d.ts.map +1 -0
  91. package/lib/messaging/browser/window-connection.js +68 -0
  92. package/lib/messaging/browser/window-connection.js.map +1 -0
  93. package/lib/messaging/client-call-metrics.d.ts +35 -0
  94. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  95. package/lib/messaging/client-call-metrics.js +83 -0
  96. package/lib/messaging/client-call-metrics.js.map +1 -0
  97. package/lib/messaging/error.d.ts +7 -2
  98. package/lib/messaging/error.d.ts.map +1 -1
  99. package/lib/messaging/error.js +15 -4
  100. package/lib/messaging/error.js.map +1 -1
  101. package/lib/messaging/handler.d.ts +10 -0
  102. package/lib/messaging/handler.d.ts.map +1 -1
  103. package/lib/messaging/handler.js +1 -0
  104. package/lib/messaging/handler.js.map +1 -1
  105. package/lib/messaging/node/connection.d.ts +1 -17
  106. package/lib/messaging/node/connection.d.ts.map +1 -1
  107. package/lib/messaging/node/connection.js +23 -58
  108. package/lib/messaging/node/connection.js.map +1 -1
  109. package/lib/messaging/proxy-factory.d.ts +2 -0
  110. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  111. package/lib/messaging/proxy-factory.js +75 -169
  112. package/lib/messaging/proxy-factory.js.map +1 -1
  113. package/lib/oss-allowlist.d.ts +14 -0
  114. package/lib/oss-allowlist.d.ts.map +1 -0
  115. package/lib/oss-allowlist.js +8 -0
  116. package/lib/oss-allowlist.js.map +1 -0
  117. package/lib/payment-protocol.d.ts +18 -0
  118. package/lib/payment-protocol.d.ts.map +1 -0
  119. package/lib/payment-protocol.js +13 -0
  120. package/lib/payment-protocol.js.map +1 -0
  121. package/lib/permission.d.ts +20 -12
  122. package/lib/permission.d.ts.map +1 -1
  123. package/lib/permission.js +42 -20
  124. package/lib/permission.js.map +1 -1
  125. package/lib/plans.d.ts +210 -0
  126. package/lib/plans.d.ts.map +1 -0
  127. package/lib/plans.js +570 -0
  128. package/lib/plans.js.map +1 -0
  129. package/lib/protocol.d.ts +146 -65
  130. package/lib/protocol.d.ts.map +1 -1
  131. package/lib/protocol.js +134 -118
  132. package/lib/protocol.js.map +1 -1
  133. package/lib/snapshot-url.d.ts +14 -0
  134. package/lib/snapshot-url.d.ts.map +1 -0
  135. package/lib/snapshot-url.js +26 -0
  136. package/lib/snapshot-url.js.map +1 -0
  137. package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +3 -4
  138. package/lib/snapshot-url.spec.d.ts.map +1 -0
  139. package/lib/snapshot-url.spec.js +41 -0
  140. package/lib/snapshot-url.spec.js.map +1 -0
  141. package/lib/team-subscription-protocol.d.ts +73 -0
  142. package/lib/team-subscription-protocol.d.ts.map +1 -0
  143. package/lib/team-subscription-protocol.js +63 -0
  144. package/lib/team-subscription-protocol.js.map +1 -0
  145. package/lib/teams-projects-protocol.d.ts +113 -0
  146. package/lib/teams-projects-protocol.d.ts.map +1 -0
  147. package/lib/teams-projects-protocol.js +30 -0
  148. package/lib/teams-projects-protocol.js.map +1 -0
  149. package/lib/theia-plugins.d.ts +1 -1
  150. package/lib/theia-plugins.js +1 -1
  151. package/lib/typings/globals.d.ts +12 -0
  152. package/lib/typings/globals.d.ts.map +1 -0
  153. package/lib/typings/globals.js +7 -0
  154. package/lib/typings/globals.js.map +1 -0
  155. package/lib/util/analytics.d.ts +8 -0
  156. package/lib/util/analytics.d.ts.map +1 -0
  157. package/lib/util/analytics.js +79 -0
  158. package/lib/util/analytics.js.map +1 -0
  159. package/lib/util/async-iterator.d.ts +1 -1
  160. package/lib/util/async-iterator.js +57 -134
  161. package/lib/util/async-iterator.js.map +1 -1
  162. package/lib/util/cancelable.d.ts +1 -1
  163. package/lib/util/cancelable.js +19 -60
  164. package/lib/util/cancelable.js.map +1 -1
  165. package/lib/util/date-time.d.ts +1 -1
  166. package/lib/util/date-time.js +10 -9
  167. package/lib/util/date-time.js.map +1 -1
  168. package/lib/util/deep-partial.d.ts +1 -1
  169. package/lib/util/deep-partial.js +1 -1
  170. package/lib/util/deferred.d.ts +1 -1
  171. package/lib/util/deferred.js +12 -13
  172. package/lib/util/deferred.js.map +1 -1
  173. package/lib/util/disposable.d.ts +2 -2
  174. package/lib/util/disposable.d.ts.map +1 -1
  175. package/lib/util/disposable.js +27 -39
  176. package/lib/util/disposable.js.map +1 -1
  177. package/lib/util/event.d.ts +1 -1
  178. package/lib/util/event.d.ts.map +1 -1
  179. package/lib/util/event.js +59 -74
  180. package/lib/util/event.js.map +1 -1
  181. package/lib/util/garbage-collected-cache.d.ts +2 -1
  182. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  183. package/lib/util/garbage-collected-cache.js +28 -47
  184. package/lib/util/garbage-collected-cache.js.map +1 -1
  185. package/lib/util/generate-workspace-id.d.ts +4 -0
  186. package/lib/util/generate-workspace-id.d.ts.map +1 -0
  187. package/lib/util/generate-workspace-id.js +487 -0
  188. package/lib/util/generate-workspace-id.js.map +1 -0
  189. package/lib/util/generate-workspace-id.spec.d.ts +7 -0
  190. package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
  191. package/lib/util/generate-workspace-id.spec.js +87 -0
  192. package/lib/util/generate-workspace-id.spec.js.map +1 -0
  193. package/lib/util/gitpod-cookie.d.ts +20 -0
  194. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  195. package/lib/util/gitpod-cookie.js +44 -0
  196. package/lib/util/gitpod-cookie.js.map +1 -0
  197. package/lib/util/gitpod-host-url.d.ts +8 -4
  198. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  199. package/lib/util/gitpod-host-url.js +103 -76
  200. package/lib/util/gitpod-host-url.js.map +1 -1
  201. package/lib/util/gitpod-host-url.spec.d.ts +16 -0
  202. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
  203. package/lib/util/gitpod-host-url.spec.js +124 -0
  204. package/lib/util/gitpod-host-url.spec.js.map +1 -0
  205. package/lib/util/grpc.d.ts +15 -0
  206. package/lib/util/grpc.d.ts.map +1 -0
  207. package/lib/util/grpc.js +18 -0
  208. package/lib/util/grpc.js.map +1 -0
  209. package/lib/util/jaeger-client-types.d.ts +68 -0
  210. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  211. package/lib/util/jaeger-client-types.js +8 -0
  212. package/lib/util/jaeger-client-types.js.map +1 -0
  213. package/lib/util/logging.d.ts +57 -34
  214. package/lib/util/logging.d.ts.map +1 -1
  215. package/lib/util/logging.js +119 -110
  216. package/lib/util/logging.js.map +1 -1
  217. package/lib/util/make-link.d.ts +1 -1
  218. package/lib/util/make-link.js +4 -3
  219. package/lib/util/make-link.js.map +1 -1
  220. package/lib/util/parse-workspace-id.d.ts +14 -4
  221. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  222. package/lib/util/parse-workspace-id.js +39 -8
  223. package/lib/util/parse-workspace-id.js.map +1 -1
  224. package/lib/util/parse-workspace-id.spec.d.ts +9 -1
  225. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  226. package/lib/util/parse-workspace-id.spec.js +129 -48
  227. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  228. package/lib/util/queue.d.ts +1 -1
  229. package/lib/util/queue.js +18 -56
  230. package/lib/util/queue.js.map +1 -1
  231. package/lib/util/queue.spec.d.ts +1 -1
  232. package/lib/util/queue.spec.js +145 -287
  233. package/lib/util/queue.spec.js.map +1 -1
  234. package/lib/util/repeat.d.ts +15 -0
  235. package/lib/util/repeat.d.ts.map +1 -0
  236. package/lib/util/repeat.js +55 -0
  237. package/lib/util/repeat.js.map +1 -0
  238. package/lib/util/semaphore.d.ts +1 -1
  239. package/lib/util/semaphore.js +17 -47
  240. package/lib/util/semaphore.js.map +1 -1
  241. package/lib/util/skip-if.d.ts +1 -1
  242. package/lib/util/skip-if.js +8 -7
  243. package/lib/util/skip-if.js.map +1 -1
  244. package/lib/util/timeutil.d.ts +1 -1
  245. package/lib/util/timeutil.d.ts.map +1 -1
  246. package/lib/util/timeutil.js +30 -17
  247. package/lib/util/timeutil.js.map +1 -1
  248. package/lib/util/timeutil.spec.d.ts +1 -1
  249. package/lib/util/timeutil.spec.js +23 -25
  250. package/lib/util/timeutil.spec.js.map +1 -1
  251. package/lib/util/tracing.d.ts +52 -6
  252. package/lib/util/tracing.d.ts.map +1 -1
  253. package/lib/util/tracing.js +199 -63
  254. package/lib/util/tracing.js.map +1 -1
  255. package/lib/util/tracing.spec.d.ts +7 -0
  256. package/lib/util/tracing.spec.d.ts.map +1 -0
  257. package/lib/util/tracing.spec.js +121 -0
  258. package/lib/util/tracing.spec.js.map +1 -0
  259. package/lib/util/workspace-port-authentication.d.ts +1 -1
  260. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  261. package/lib/util/workspace-port-authentication.js +5 -3
  262. package/lib/util/workspace-port-authentication.js.map +1 -1
  263. package/lib/workspace-cluster.d.ts +76 -0
  264. package/lib/workspace-cluster.d.ts.map +1 -0
  265. package/lib/workspace-cluster.js +33 -0
  266. package/lib/workspace-cluster.js.map +1 -0
  267. package/lib/workspace-instance.d.ts +29 -4
  268. package/lib/workspace-instance.d.ts.map +1 -1
  269. package/lib/workspace-instance.js +1 -1
  270. package/lib/wsready.d.ts +1 -1
  271. package/lib/wsready.js +3 -2
  272. package/lib/wsready.js.map +1 -1
  273. package/package.json +35 -17
  274. package/pkg-yarn.lock +18 -9
  275. package/provenance-bundle.jsonl +2 -0
  276. package/src/accounting-protocol.ts +229 -0
  277. package/src/admin-protocol.ts +56 -6
  278. package/src/analytics.ts +52 -0
  279. package/src/auth.ts +27 -0
  280. package/src/context-url.spec.ts +53 -0
  281. package/src/context-url.ts +107 -0
  282. package/src/email-protocol.ts +3 -4
  283. package/src/encryption/container-module.ts +1 -1
  284. package/src/encryption/encryption-engine.spec.ts +1 -1
  285. package/src/encryption/encryption-engine.ts +1 -1
  286. package/src/encryption/encryption-service.ts +1 -1
  287. package/src/encryption/key-provider.ts +1 -1
  288. package/src/env.ts +11 -11
  289. package/src/gitpod-file-parser.spec.ts +1 -1
  290. package/src/gitpod-file-parser.ts +1 -1
  291. package/src/gitpod-service.ts +420 -56
  292. package/src/headless-workspace-log.ts +8 -12
  293. package/src/ide-frontend-service.ts +28 -0
  294. package/src/ide-protocol.ts +119 -0
  295. package/src/index.ts +8 -2
  296. package/src/installation-admin-protocol.ts +42 -0
  297. package/src/license-protocol.ts +1 -1
  298. package/src/messaging/browser/connection.ts +201 -23
  299. package/src/messaging/browser/window-connection.ts +72 -0
  300. package/src/messaging/client-call-metrics.ts +97 -0
  301. package/src/messaging/error.ts +19 -4
  302. package/src/messaging/handler.ts +12 -0
  303. package/src/messaging/node/connection.ts +21 -68
  304. package/src/messaging/proxy-factory.ts +16 -14
  305. package/src/oss-allowlist.ts +15 -0
  306. package/src/payment-protocol.ts +20 -0
  307. package/src/permission.ts +31 -11
  308. package/src/plans.ts +632 -0
  309. package/src/protocol.ts +243 -99
  310. package/src/snapshot-url.spec.ts +25 -0
  311. package/src/snapshot-url.ts +27 -0
  312. package/src/team-subscription-protocol.ts +113 -0
  313. package/src/teams-projects-protocol.ts +147 -0
  314. package/src/theia-plugins.ts +1 -1
  315. package/src/typings/globals.ts +12 -0
  316. package/src/util/analytics.ts +87 -0
  317. package/src/util/async-iterator.ts +1 -1
  318. package/src/util/cancelable.ts +1 -1
  319. package/src/util/date-time.ts +1 -1
  320. package/src/util/deep-partial.ts +1 -1
  321. package/src/util/deferred.ts +2 -2
  322. package/src/util/garbage-collected-cache.ts +10 -4
  323. package/src/util/generate-workspace-id.spec.ts +48 -0
  324. package/src/util/generate-workspace-id.ts +475 -0
  325. package/src/util/gitpod-cookie.ts +39 -0
  326. package/src/util/gitpod-host-url.spec.ts +49 -0
  327. package/src/util/gitpod-host-url.ts +56 -16
  328. package/src/util/grpc.ts +15 -0
  329. package/src/util/jaeger-client-types.ts +102 -0
  330. package/src/util/logging.ts +111 -39
  331. package/src/util/make-link.ts +1 -1
  332. package/src/util/parse-workspace-id.spec.ts +46 -5
  333. package/src/util/parse-workspace-id.ts +39 -8
  334. package/src/util/queue.spec.ts +2 -2
  335. package/src/util/queue.ts +1 -1
  336. package/src/util/repeat.ts +45 -0
  337. package/src/util/semaphore.ts +3 -3
  338. package/src/util/skip-if.ts +2 -2
  339. package/src/util/timeutil.spec.ts +1 -1
  340. package/src/util/timeutil.ts +5 -5
  341. package/src/util/tracing.spec.ts +83 -0
  342. package/src/util/tracing.ts +184 -18
  343. package/src/util/workspace-port-authentication.ts +1 -1
  344. package/src/workspace-cluster.ts +104 -0
  345. package/src/workspace-instance.ts +58 -16
  346. package/src/wsready.ts +2 -2
  347. package/lib/messaging/connection-error-handler.d.ts +0 -27
  348. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  349. package/lib/messaging/connection-error-handler.js +0 -45
  350. package/lib/messaging/connection-error-handler.js.map +0 -1
  351. package/lib/util/repeater.d.ts +0 -22
  352. package/lib/util/repeater.d.ts.map +0 -1
  353. package/lib/util/repeater.js +0 -117
  354. package/lib/util/repeater.js.map +0 -1
  355. package/lib/util/safe-promise.d.ts +0 -11
  356. package/lib/util/safe-promise.d.ts.map +0 -1
  357. package/lib/util/safe-promise.js +0 -33
  358. package/lib/util/safe-promise.js.map +0 -1
  359. package/lib/util/without.d.ts +0 -7
  360. package/lib/util/without.d.ts.map +0 -1
  361. package/lib/util/without.js.map +0 -1
  362. package/src/messaging/connection-error-handler.ts +0 -62
  363. package/src/util/jaeger-client.d.ts +0 -105
  364. package/src/util/repeater.ts +0 -49
  365. package/src/util/safe-promise.ts +0 -26
@@ -1,167 +1,292 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
5
  * See License-AGPL.txt in the project root for license information.
6
6
  */
7
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11
- return c > 3 && r && Object.defineProperty(target, key, r), r;
12
- };
13
- var __metadata = (this && this.__metadata) || function (k, v) {
14
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
- };
16
- var __param = (this && this.__param) || function (paramIndex, decorator) {
17
- return function (target, key) { decorator(target, key, paramIndex); }
18
- };
19
- var __values = (this && this.__values) || function(o) {
20
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
21
- if (m) return m.call(o);
22
- if (o && typeof o.length === "number") return {
23
- next: function () {
24
- if (o && i >= o.length) o = void 0;
25
- return { value: o && o[i++], done: !o };
26
- }
27
- };
28
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
7
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
14
+ });
29
15
  };
30
16
  Object.defineProperty(exports, "__esModule", { value: true });
31
- var inversify_1 = require("inversify");
32
- var gitpod_host_url_1 = require("./util/gitpod-host-url");
33
- var connection_1 = require("./messaging/browser/connection");
17
+ exports.createGitpodService = exports.GitpodServiceImpl = exports.WorkspaceInstanceUpdateListener = exports.GitpodCompositeClient = exports.GitpodServerProxy = exports.GitpodServerPath = exports.createServerMock = exports.createServiceMock = exports.WorkspaceTimeoutValues = exports.GitpodServer = void 0;
18
+ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
19
+ const gitpod_host_url_1 = require("./util/gitpod-host-url");
20
+ const connection_1 = require("./messaging/browser/connection");
21
+ const event_1 = require("./util/event");
34
22
  exports.GitpodServer = Symbol('GitpodServer');
35
23
  exports.WorkspaceTimeoutValues = ["30m", "60m", "180m"];
36
- exports.createServiceMock = function (methods) {
37
- return new GitpodServiceImpl(exports.createServerMock(methods));
24
+ const createServiceMock = function (methods) {
25
+ return new GitpodServiceImpl((0, exports.createServerMock)(methods));
38
26
  };
39
- exports.createServerMock = function (methods) {
40
- methods.setClient = methods.setClient || (function () { });
41
- methods.dispose = methods.dispose || (function () { });
27
+ exports.createServiceMock = createServiceMock;
28
+ const createServerMock = function (methods) {
29
+ methods.setClient = methods.setClient || (() => { });
30
+ methods.dispose = methods.dispose || (() => { });
42
31
  return new Proxy(methods, {
43
- get: function (target, property) {
44
- var result = target[property];
32
+ // @ts-ignore
33
+ get: (target, property) => {
34
+ const result = target[property];
45
35
  if (!result) {
46
- throw new Error("Method " + property + " not implemented");
36
+ throw new Error(`Method ${property} not implemented`);
47
37
  }
48
38
  return result;
49
39
  }
50
40
  });
51
41
  };
42
+ exports.createServerMock = createServerMock;
52
43
  exports.GitpodServerPath = '/gitpod';
53
44
  exports.GitpodServerProxy = Symbol('GitpodServerProxy');
54
- var GitpodCompositeClient = /** @class */ (function () {
55
- function GitpodCompositeClient() {
45
+ class GitpodCompositeClient {
46
+ constructor() {
56
47
  this.clients = [];
57
48
  }
58
- GitpodCompositeClient.prototype.registerClient = function (client) {
59
- var _this = this;
49
+ registerClient(client) {
60
50
  this.clients.push(client);
61
- var index = this.clients.length;
62
51
  return {
63
- dispose: function () {
64
- _this.clients.slice(index, 1);
52
+ dispose: () => {
53
+ const index = this.clients.indexOf(client);
54
+ if (index > -1) {
55
+ this.clients.splice(index, 1);
56
+ }
65
57
  }
66
58
  };
67
- };
68
- GitpodCompositeClient.prototype.onInstanceUpdate = function (instance) {
69
- var e_1, _a;
70
- try {
71
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
72
- var client = _c.value;
73
- if (client.onInstanceUpdate) {
74
- try {
75
- client.onInstanceUpdate(instance);
76
- }
77
- catch (error) {
78
- console.error(error);
79
- }
59
+ }
60
+ onInstanceUpdate(instance) {
61
+ for (const client of this.clients) {
62
+ if (client.onInstanceUpdate) {
63
+ try {
64
+ client.onInstanceUpdate(instance);
65
+ }
66
+ catch (error) {
67
+ console.error(error);
80
68
  }
81
69
  }
82
70
  }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
71
+ }
72
+ onPrebuildUpdate(update) {
73
+ for (const client of this.clients) {
74
+ if (client.onPrebuildUpdate) {
75
+ try {
76
+ client.onPrebuildUpdate(update);
77
+ }
78
+ catch (error) {
79
+ console.error(error);
80
+ }
87
81
  }
88
- finally { if (e_1) throw e_1.error; }
89
82
  }
90
- };
91
- GitpodCompositeClient.prototype.onWorkspaceImageBuildLogs = function (info, content) {
92
- var e_2, _a;
93
- try {
94
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
95
- var client = _c.value;
96
- if (client.onWorkspaceImageBuildLogs) {
97
- try {
98
- client.onWorkspaceImageBuildLogs(info, content);
99
- }
100
- catch (error) {
101
- console.error(error);
102
- }
83
+ }
84
+ onWorkspaceImageBuildLogs(info, content) {
85
+ for (const client of this.clients) {
86
+ if (client.onWorkspaceImageBuildLogs) {
87
+ try {
88
+ client.onWorkspaceImageBuildLogs(info, content);
89
+ }
90
+ catch (error) {
91
+ console.error(error);
103
92
  }
104
93
  }
105
94
  }
106
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
107
- finally {
108
- try {
109
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
95
+ }
96
+ notifyDidOpenConnection() {
97
+ for (const client of this.clients) {
98
+ if (client.notifyDidOpenConnection) {
99
+ try {
100
+ client.notifyDidOpenConnection();
101
+ }
102
+ catch (error) {
103
+ console.error(error);
104
+ }
110
105
  }
111
- finally { if (e_2) throw e_2.error; }
112
106
  }
113
- };
114
- GitpodCompositeClient.prototype.onHeadlessWorkspaceLogs = function (evt) {
115
- var e_3, _a;
116
- try {
117
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
118
- var client = _c.value;
119
- if (client.onHeadlessWorkspaceLogs) {
120
- try {
121
- client.onHeadlessWorkspaceLogs(evt);
122
- }
123
- catch (error) {
124
- console.error(error);
125
- }
107
+ }
108
+ notifyDidCloseConnection() {
109
+ for (const client of this.clients) {
110
+ if (client.notifyDidCloseConnection) {
111
+ try {
112
+ client.notifyDidCloseConnection();
113
+ }
114
+ catch (error) {
115
+ console.error(error);
126
116
  }
127
117
  }
128
118
  }
129
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
130
- finally {
131
- try {
132
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
119
+ }
120
+ onCreditAlert(creditAlert) {
121
+ for (const client of this.clients) {
122
+ if (client.onCreditAlert) {
123
+ try {
124
+ client.onCreditAlert(creditAlert);
125
+ }
126
+ catch (error) {
127
+ console.error(error);
128
+ }
133
129
  }
134
- finally { if (e_3) throw e_3.error; }
135
130
  }
136
- };
137
- return GitpodCompositeClient;
138
- }());
131
+ }
132
+ }
139
133
  exports.GitpodCompositeClient = GitpodCompositeClient;
140
- exports.GitpodService = Symbol('GitpodService');
141
- var GitpodServiceImpl = /** @class */ (function () {
142
- function GitpodServiceImpl(server) {
134
+ const hasWindow = (typeof window !== 'undefined');
135
+ const phasesOrder = {
136
+ unknown: 0,
137
+ preparing: 1,
138
+ pending: 2,
139
+ creating: 3,
140
+ initializing: 4,
141
+ running: 5,
142
+ interrupted: 6,
143
+ stopping: 7,
144
+ stopped: 8
145
+ };
146
+ class WorkspaceInstanceUpdateListener {
147
+ constructor(service, _info) {
148
+ this.service = service;
149
+ this._info = _info;
150
+ this.onDidChangeEmitter = new event_1.Emitter();
151
+ this.onDidChange = this.onDidChangeEmitter.event;
152
+ this.source = 'sync';
153
+ this.syncQueue = Promise.resolve();
154
+ service.registerClient({
155
+ onInstanceUpdate: instance => {
156
+ if (this.isOutOfOrder(instance)) {
157
+ return;
158
+ }
159
+ this.cancelSync();
160
+ this._info.latestInstance = instance;
161
+ this.source = 'update';
162
+ this.onDidChangeEmitter.fire(undefined);
163
+ },
164
+ notifyDidOpenConnection: () => {
165
+ this.sync();
166
+ }
167
+ });
168
+ if (hasWindow) {
169
+ // learn about page lifecycle here: https://developers.google.com/web/updates/2018/07/page-lifecycle-api
170
+ window.document.addEventListener('visibilitychange', () => __awaiter(this, void 0, void 0, function* () {
171
+ if (window.document.visibilityState === 'visible') {
172
+ this.sync();
173
+ }
174
+ }));
175
+ window.addEventListener('pageshow', e => {
176
+ if (e.persisted) {
177
+ this.sync();
178
+ }
179
+ });
180
+ }
181
+ }
182
+ get info() {
183
+ return this._info;
184
+ }
185
+ /**
186
+ * Only one sync can be performed at the same time.
187
+ * Any new sync request or instance update cancels all previously scheduled sync requests.
188
+ */
189
+ sync() {
190
+ this.cancelSync();
191
+ this.syncTokenSource = new vscode_jsonrpc_1.CancellationTokenSource();
192
+ const token = this.syncTokenSource.token;
193
+ this.syncQueue = this.syncQueue.then(() => __awaiter(this, void 0, void 0, function* () {
194
+ if (token.isCancellationRequested) {
195
+ return;
196
+ }
197
+ try {
198
+ const info = yield this.service.server.getWorkspace(this._info.workspace.id);
199
+ if (token.isCancellationRequested) {
200
+ return;
201
+ }
202
+ this._info = info;
203
+ this.source = 'sync';
204
+ this.onDidChangeEmitter.fire(undefined);
205
+ }
206
+ catch (e) {
207
+ console.error('failed to sync workspace instance:', e);
208
+ }
209
+ }));
210
+ }
211
+ cancelSync() {
212
+ if (this.syncTokenSource) {
213
+ this.syncTokenSource.cancel();
214
+ this.syncTokenSource = undefined;
215
+ }
216
+ }
217
+ /**
218
+ * If sync seen more recent update then ignore all updates with previous phases.
219
+ * Within the same phase still the race can occur but which should be eventually consistent.
220
+ */
221
+ isOutOfOrder(instance) {
222
+ var _a;
223
+ if (instance.workspaceId !== this._info.workspace.id) {
224
+ return true;
225
+ }
226
+ if (this.source === 'update') {
227
+ return false;
228
+ }
229
+ if (instance.id !== ((_a = this.info.latestInstance) === null || _a === void 0 ? void 0 : _a.id)) {
230
+ return false;
231
+ }
232
+ return phasesOrder[instance.status.phase] < phasesOrder[this.info.latestInstance.status.phase];
233
+ }
234
+ }
235
+ exports.WorkspaceInstanceUpdateListener = WorkspaceInstanceUpdateListener;
236
+ class GitpodServiceImpl {
237
+ constructor(server, options) {
143
238
  this.server = server;
239
+ this.options = options;
144
240
  this.compositeClient = new GitpodCompositeClient();
241
+ this.instanceListeners = new Map();
145
242
  server.setClient(this.compositeClient);
243
+ server.onDidOpenConnection(() => this.compositeClient.notifyDidOpenConnection());
244
+ server.onDidCloseConnection(() => this.compositeClient.notifyDidCloseConnection());
146
245
  }
147
- GitpodServiceImpl.prototype.registerClient = function (client) {
246
+ registerClient(client) {
148
247
  return this.compositeClient.registerClient(client);
149
- };
150
- GitpodServiceImpl = __decorate([
151
- inversify_1.injectable(),
152
- __param(0, inversify_1.inject(exports.GitpodServer)),
153
- __metadata("design:paramtypes", [Object])
154
- ], GitpodServiceImpl);
155
- return GitpodServiceImpl;
156
- }());
248
+ }
249
+ listenToInstance(workspaceId) {
250
+ const listener = this.instanceListeners.get(workspaceId) ||
251
+ (() => __awaiter(this, void 0, void 0, function* () {
252
+ const info = yield this.server.getWorkspace(workspaceId);
253
+ return new WorkspaceInstanceUpdateListener(this, info);
254
+ }))();
255
+ this.instanceListeners.set(workspaceId, listener);
256
+ return listener;
257
+ }
258
+ reconnect() {
259
+ var _a;
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.onReconnect) {
262
+ yield this.options.onReconnect();
263
+ }
264
+ });
265
+ }
266
+ }
157
267
  exports.GitpodServiceImpl = GitpodServiceImpl;
158
268
  function createGitpodService(serverUrl) {
159
- var url = new gitpod_host_url_1.GitpodHostUrl(serverUrl)
160
- .asWebsocket()
161
- .withApi({ pathname: exports.GitpodServerPath });
162
- var connectionProvider = new connection_1.WebSocketConnectionProvider();
163
- var gitpodServer = connectionProvider.createProxy(url.toString());
164
- return new GitpodServiceImpl(gitpodServer);
269
+ const toWsUrl = (serverUrl) => {
270
+ return new gitpod_host_url_1.GitpodHostUrl(serverUrl)
271
+ .asWebsocket()
272
+ .withApi({ pathname: exports.GitpodServerPath })
273
+ .toString();
274
+ };
275
+ let url;
276
+ if (typeof serverUrl === "string") {
277
+ url = toWsUrl(serverUrl);
278
+ }
279
+ else {
280
+ url = serverUrl.then(url => toWsUrl(url));
281
+ }
282
+ const connectionProvider = new connection_1.WebSocketConnectionProvider();
283
+ let onReconnect = () => { };
284
+ const gitpodServer = connectionProvider.createProxy(url, undefined, {
285
+ onListening: socket => {
286
+ onReconnect = () => socket.reconnect();
287
+ }
288
+ });
289
+ return new GitpodServiceImpl(gitpodServer, { onReconnect });
165
290
  }
166
291
  exports.createGitpodService = createGitpodService;
167
292
  //# sourceMappingURL=gitpod-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gitpod-service.js","sourceRoot":"","sources":["../src/gitpod-service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,uCAA+C;AAK/C,0DAAuD;AACvD,6DAA6E;AAUhE,QAAA,YAAY,G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,EAAE,CAAC;aACvC,QAAQ,EAAE,CAAC;IACpB,CAAC,CAAC;IACF,IAAI,GAA6B,CAAC;IAClC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QAC/B,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;KAC5B;SAAM;QACH,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;KAC7C;IAED,MAAM,kBAAkB,GAAG,IAAI,wCAA2B,EAAE,CAAC;IAC7D,IAAI,WAAW,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAI,GAAG,EAAE,SAAS,EAAE;QACnE,WAAW,EAAE,MAAM,CAAC,EAAE;YAClB,WAAW,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QAC3C,CAAC;KACJ,CAAC,CAAC;IACH,OAAO,IAAI,iBAAiB,CAAO,YAAY,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC;AAtBD,kDAsBC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
2
+ * Copyright (c) 2020 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
  */
@@ -15,20 +15,17 @@ export declare namespace HeadlessWorkspaceEventType {
15
15
  function isRunning(t: HeadlessWorkspaceEventType): boolean;
16
16
  function didFinish(t: HeadlessWorkspaceEventType): boolean;
17
17
  }
18
- export interface HeadlessLogEvent {
18
+ export interface HeadlessWorkspaceEvent {
19
19
  workspaceID: string;
20
20
  text: string;
21
21
  type: HeadlessWorkspaceEventType;
22
22
  }
23
- export declare enum TheiaHeadlessLogType {
24
- TaskLogLabel = "workspaceTaskOutput",
25
- TaskFailedLabel = "workspaceTaskFailed",
26
- TaskSuccessfulLabel = "workspaceTaskDone"
27
- }
28
- export interface TheiaHeadlessLogMessage {
29
- type: TheiaHeadlessLogType;
30
- data?: string;
31
- error?: string;
32
- snapshotURL?: string;
23
+ export interface HeadlessLogUrls {
24
+ streams: {
25
+ [streamID: string]: string;
26
+ };
33
27
  }
28
+ /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
29
+ export declare const HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
30
+ export declare const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX: RegExp;
34
31
  //# sourceMappingURL=headless-workspace-log.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"headless-workspace-log.d.ts","sourceRoot":"","sources":["../src/headless-workspace-log.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,oBAAY,0BAA0B;IAClC,SAAS,eAAe;IACxB,oBAAoB,mBAAmB;IACvC,iBAAiB,gBAAgB;IACjC,eAAe,oBAAoB;IACnC,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AACD,yBAAiB,0BAA0B,CAAC;IACxC,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAEtD;IACD,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAEtD;CACJ;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,0BAA0B,CAAC;CACpC;AAED,oBAAY,oBAAoB;IAC5B,YAAY,wBAAwB;IACpC,eAAe,wBAAwB;IACvC,mBAAmB,sBAAsB;CAC5C;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"headless-workspace-log.d.ts","sourceRoot":"","sources":["../src/headless-workspace-log.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,oBAAY,0BAA0B;IAClC,SAAS,eAAe;IACxB,oBAAoB,mBAAmB;IACvC,iBAAiB,gBAAgB;IACjC,eAAe,oBAAoB;IACnC,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AACD,yBAAiB,0BAA0B,CAAC;IACxC,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAEtD;IACD,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAEtD;CACJ;AAED,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,0BAA0B,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAE5B,OAAO,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,wDAAwD;AACxD,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AACxE,eAAO,MAAM,qCAAqC,QAAuC,CAAC"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020 TypeFox GmbH. All rights reserved.
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
5
  * See License-AGPL.txt in the project root for license information.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = exports.HEADLESS_LOG_STREAM_STATUS_CODE = exports.HeadlessWorkspaceEventType = void 0;
8
9
  var HeadlessWorkspaceEventType;
9
10
  (function (HeadlessWorkspaceEventType) {
10
11
  HeadlessWorkspaceEventType["LogOutput"] = "log-output";
@@ -24,10 +25,7 @@ var HeadlessWorkspaceEventType;
24
25
  }
25
26
  HeadlessWorkspaceEventType.didFinish = didFinish;
26
27
  })(HeadlessWorkspaceEventType = exports.HeadlessWorkspaceEventType || (exports.HeadlessWorkspaceEventType = {}));
27
- var TheiaHeadlessLogType;
28
- (function (TheiaHeadlessLogType) {
29
- TheiaHeadlessLogType["TaskLogLabel"] = "workspaceTaskOutput";
30
- TheiaHeadlessLogType["TaskFailedLabel"] = "workspaceTaskFailed";
31
- TheiaHeadlessLogType["TaskSuccessfulLabel"] = "workspaceTaskDone";
32
- })(TheiaHeadlessLogType = exports.TheiaHeadlessLogType || (exports.TheiaHeadlessLogType = {}));
28
+ /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
29
+ exports.HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
30
+ exports.HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
33
31
  //# sourceMappingURL=headless-workspace-log.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"headless-workspace-log.js","sourceRoot":"","sources":["../src/headless-workspace-log.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAGH,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IAClC,sDAAwB,CAAA;IACxB,qEAAuC,CAAA;IACvC,+DAAiC,CAAA;IACjC,iEAAmC,CAAA;IACnC,iDAAmB,CAAA;IACnB,iDAAmB,CAAA;AACvB,CAAC,EAPW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAOrC;AACD,WAAiB,0BAA0B;IACvC,SAAgB,SAAS,CAAC,CAA6B;QACnD,OAAO,CAAC,KAAK,0BAA0B,CAAC,SAAS,CAAC;IACtD,CAAC;IAFe,oCAAS,YAExB,CAAA;IACD,SAAgB,SAAS,CAAC,CAA6B;QACnD,OAAO,CAAC,KAAK,0BAA0B,CAAC,iBAAiB,IAAI,CAAC,KAAK,0BAA0B,CAAC,oBAAoB,CAAC;IACvH,CAAC;IAFe,oCAAS,YAExB,CAAA;AACL,CAAC,EAPgB,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAO1C;AAQD,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,4DAAoC,CAAA;IACpC,+DAAuC,CAAA;IACvC,iEAAyC,CAAA;AAC7C,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"}
1
+ {"version":3,"file":"headless-workspace-log.js","sourceRoot":"","sources":["../src/headless-workspace-log.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IAClC,sDAAwB,CAAA;IACxB,qEAAuC,CAAA;IACvC,+DAAiC,CAAA;IACjC,iEAAmC,CAAA;IACnC,iDAAmB,CAAA;IACnB,iDAAmB,CAAA;AACvB,CAAC,EAPW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAOrC;AACD,WAAiB,0BAA0B;IACvC,SAAgB,SAAS,CAAC,CAA6B;QACnD,OAAO,CAAC,KAAK,0BAA0B,CAAC,SAAS,CAAC;IACtD,CAAC;IAFe,oCAAS,YAExB,CAAA;IACD,SAAgB,SAAS,CAAC,CAA6B;QACnD,OAAO,CAAC,KAAK,0BAA0B,CAAC,iBAAiB,IAAI,CAAC,KAAK,0BAA0B,CAAC,oBAAoB,CAAC;IACvH,CAAC;IAFe,oCAAS,YAExB,CAAA;AACL,CAAC,EAPgB,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAO1C;AAaD,wDAAwD;AAC3C,QAAA,+BAA+B,GAAG,wBAAwB,CAAC;AAC3D,QAAA,qCAAqC,GAAG,oCAAoC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
+ * Licensed under the GNU Affero General Public License (AGPL).
4
+ * See License-AGPL.txt in the project root for license information.
5
+ */
6
+ import { Event } from "./util/event";
7
+ import { Disposable } from "./util/disposable";
8
+ export declare type IDEFrontendState = 'init' | 'ready' | 'terminated';
9
+ export interface IDEFrontendService {
10
+ readonly state: IDEFrontendState;
11
+ /**
12
+ * A cause of the ide frontend application failure when state is terminated.
13
+ */
14
+ readonly failureCause?: Error;
15
+ readonly onDidChange: Event<void>;
16
+ /**
17
+ * Starts the ide frontend application.
18
+ * Returns the disposable object which is triggered when the ide application should be stopped.
19
+ *
20
+ * On stop the application should store the unsaved changes.
21
+ * It won't receive any `beforeunload` events from window anymore to prevent
22
+ * confirmation dialogs for stopped workspaces.
23
+ */
24
+ start(): Disposable;
25
+ }
26
+ //# sourceMappingURL=ide-frontend-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ide-frontend-service.d.ts","sourceRoot":"","sources":["../src/ide-frontend-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,oBAAY,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC;;;;;;;OAOG;IACH,KAAK,IAAI,UAAU,CAAC;CACvB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
4
+ * Licensed under the GNU Affero General Public License (AGPL).
5
+ * See License-AGPL.txt in the project root for license information.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=ide-frontend-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ide-frontend-service.js","sourceRoot":"","sources":["../src/ide-frontend-service.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}