@gitpod/gitpod-protocol 0.1.5-private-repos-after-cancellation.0 → 0.1.5-protected-secrets.0

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 (407) hide show
  1. package/data/gitpod-schema.json +145 -7
  2. package/lib/accounting-protocol.d.ts +18 -12
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +43 -42
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +28 -4
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +2 -13
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +12 -2
  11. package/lib/analytics.d.ts.map +1 -1
  12. package/lib/analytics.js.map +1 -1
  13. package/lib/attribution.d.ts +23 -0
  14. package/lib/attribution.d.ts.map +1 -0
  15. package/lib/attribution.js +50 -0
  16. package/lib/attribution.js.map +1 -0
  17. package/lib/auth.d.ts.map +1 -1
  18. package/lib/billing-mode.d.ts +43 -0
  19. package/lib/billing-mode.d.ts.map +1 -0
  20. package/lib/billing-mode.js +44 -0
  21. package/lib/billing-mode.js.map +1 -0
  22. package/lib/blocked-repositories-protocol.d.ts +13 -0
  23. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  24. package/lib/blocked-repositories-protocol.js +8 -0
  25. package/lib/blocked-repositories-protocol.js.map +1 -0
  26. package/lib/context-url.d.ts +18 -5
  27. package/lib/context-url.d.ts.map +1 -1
  28. package/lib/context-url.js +63 -10
  29. package/lib/context-url.js.map +1 -1
  30. package/lib/context-url.spec.d.ts +2 -0
  31. package/lib/context-url.spec.d.ts.map +1 -1
  32. package/lib/context-url.spec.js +81 -48
  33. package/lib/context-url.spec.js.map +1 -1
  34. package/lib/encryption/container-module.d.ts.map +1 -1
  35. package/lib/encryption/container-module.js +4 -4
  36. package/lib/encryption/container-module.js.map +1 -1
  37. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  38. package/lib/encryption/encryption-engine.js +25 -26
  39. package/lib/encryption/encryption-engine.js.map +1 -1
  40. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  41. package/lib/encryption/encryption-engine.spec.js +29 -37
  42. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  43. package/lib/encryption/encryption-service.d.ts.map +1 -1
  44. package/lib/encryption/encryption-service.js +30 -44
  45. package/lib/encryption/encryption-service.js.map +1 -1
  46. package/lib/encryption/key-provider.d.ts.map +1 -1
  47. package/lib/encryption/key-provider.js +31 -38
  48. package/lib/encryption/key-provider.js.map +1 -1
  49. package/lib/env.d.ts +0 -6
  50. package/lib/env.d.ts.map +1 -1
  51. package/lib/env.js +7 -27
  52. package/lib/env.js.map +1 -1
  53. package/lib/experiments/always-default.d.ts +8 -0
  54. package/lib/experiments/always-default.d.ts.map +1 -0
  55. package/lib/experiments/always-default.js +20 -0
  56. package/lib/experiments/always-default.js.map +1 -0
  57. package/lib/experiments/configcat-server.d.ts +10 -0
  58. package/lib/experiments/configcat-server.d.ts.map +1 -0
  59. package/lib/experiments/configcat-server.js +36 -0
  60. package/lib/experiments/configcat-server.js.map +1 -0
  61. package/lib/experiments/configcat.d.ts +21 -0
  62. package/lib/experiments/configcat.d.ts.map +1 -0
  63. package/lib/experiments/configcat.js +51 -0
  64. package/lib/experiments/configcat.js.map +1 -0
  65. package/lib/experiments/types.d.ts +22 -0
  66. package/lib/experiments/types.d.ts.map +1 -0
  67. package/lib/experiments/types.js +10 -0
  68. package/lib/experiments/types.js.map +1 -0
  69. package/lib/gitpod-file-parser.d.ts.map +1 -1
  70. package/lib/gitpod-file-parser.js +26 -42
  71. package/lib/gitpod-file-parser.js.map +1 -1
  72. package/lib/gitpod-file-parser.spec.js +145 -142
  73. package/lib/gitpod-file-parser.spec.js.map +1 -1
  74. package/lib/gitpod-service.d.ts +127 -52
  75. package/lib/gitpod-service.d.ts.map +1 -1
  76. package/lib/gitpod-service.js +190 -315
  77. package/lib/gitpod-service.js.map +1 -1
  78. package/lib/headless-workspace-log.d.ts +3 -13
  79. package/lib/headless-workspace-log.d.ts.map +1 -1
  80. package/lib/headless-workspace-log.js +3 -8
  81. package/lib/headless-workspace-log.js.map +1 -1
  82. package/lib/ide-frontend-service.d.ts +1 -1
  83. package/lib/ide-protocol.d.ts +113 -0
  84. package/lib/ide-protocol.d.ts.map +1 -0
  85. package/lib/{util/without.js → ide-protocol.js} +2 -2
  86. package/lib/ide-protocol.js.map +1 -0
  87. package/lib/index.d.ts +16 -12
  88. package/lib/index.d.ts.map +1 -1
  89. package/lib/index.js +5 -1
  90. package/lib/index.js.map +1 -1
  91. package/lib/installation-admin-protocol.d.ts +30 -0
  92. package/lib/installation-admin-protocol.d.ts.map +1 -0
  93. package/lib/installation-admin-protocol.js +31 -0
  94. package/lib/installation-admin-protocol.js.map +1 -0
  95. package/lib/license-protocol.d.ts +7 -0
  96. package/lib/license-protocol.d.ts.map +1 -1
  97. package/lib/license-protocol.js.map +1 -1
  98. package/lib/messaging/browser/connection.d.ts +3 -3
  99. package/lib/messaging/browser/connection.d.ts.map +1 -1
  100. package/lib/messaging/browser/connection.js +173 -36
  101. package/lib/messaging/browser/connection.js.map +1 -1
  102. package/lib/messaging/browser/window-connection.d.ts +4 -4
  103. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  104. package/lib/messaging/browser/window-connection.js +42 -59
  105. package/lib/messaging/browser/window-connection.js.map +1 -1
  106. package/lib/messaging/client-call-metrics.d.ts +19 -0
  107. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  108. package/lib/messaging/client-call-metrics.js +82 -0
  109. package/lib/messaging/client-call-metrics.js.map +1 -0
  110. package/lib/messaging/error.d.ts +10 -2
  111. package/lib/messaging/error.d.ts.map +1 -1
  112. package/lib/messaging/error.js +20 -4
  113. package/lib/messaging/error.js.map +1 -1
  114. package/lib/messaging/handler.d.ts +10 -0
  115. package/lib/messaging/handler.d.ts.map +1 -1
  116. package/lib/messaging/handler.js +1 -1
  117. package/lib/messaging/node/connection.d.ts +1 -17
  118. package/lib/messaging/node/connection.d.ts.map +1 -1
  119. package/lib/messaging/node/connection.js +24 -60
  120. package/lib/messaging/node/connection.js.map +1 -1
  121. package/lib/messaging/proxy-factory.d.ts +3 -1
  122. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  123. package/lib/messaging/proxy-factory.js +75 -162
  124. package/lib/messaging/proxy-factory.js.map +1 -1
  125. package/lib/oss-allowlist.d.ts +14 -0
  126. package/lib/oss-allowlist.d.ts.map +1 -0
  127. package/lib/oss-allowlist.js +8 -0
  128. package/lib/oss-allowlist.js.map +1 -0
  129. package/lib/payment-protocol.d.ts.map +1 -1
  130. package/lib/payment-protocol.js +1 -1
  131. package/lib/payment-protocol.js.map +1 -1
  132. package/lib/permission.d.ts +9 -4
  133. package/lib/permission.d.ts.map +1 -1
  134. package/lib/permission.js +39 -31
  135. package/lib/permission.js.map +1 -1
  136. package/lib/plans.d.ts +5 -4
  137. package/lib/plans.d.ts.map +1 -1
  138. package/lib/plans.js +229 -209
  139. package/lib/plans.js.map +1 -1
  140. package/lib/protocol.d.ts +234 -143
  141. package/lib/protocol.d.ts.map +1 -1
  142. package/lib/protocol.js +339 -193
  143. package/lib/protocol.js.map +1 -1
  144. package/{src/util/without.ts → lib/protocol.spec.d.ts} +2 -3
  145. package/lib/protocol.spec.d.ts.map +1 -0
  146. package/lib/protocol.spec.js +127 -0
  147. package/lib/protocol.spec.js.map +1 -0
  148. package/lib/snapshot-url.d.ts +14 -0
  149. package/lib/snapshot-url.d.ts.map +1 -0
  150. package/lib/snapshot-url.js +26 -0
  151. package/lib/snapshot-url.js.map +1 -0
  152. package/{src/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
  153. package/lib/snapshot-url.spec.d.ts.map +1 -0
  154. package/lib/snapshot-url.spec.js +41 -0
  155. package/lib/snapshot-url.spec.js.map +1 -0
  156. package/lib/team-subscription-protocol.d.ts +22 -4
  157. package/lib/team-subscription-protocol.d.ts.map +1 -1
  158. package/lib/team-subscription-protocol.js +33 -18
  159. package/lib/team-subscription-protocol.js.map +1 -1
  160. package/lib/teams-projects-protocol.d.ts +130 -0
  161. package/lib/teams-projects-protocol.d.ts.map +1 -0
  162. package/lib/teams-projects-protocol.js +30 -0
  163. package/lib/teams-projects-protocol.js.map +1 -0
  164. package/lib/typings/globals.d.ts +2 -2
  165. package/lib/typings/globals.d.ts.map +1 -1
  166. package/lib/usage.d.ts +61 -0
  167. package/lib/usage.d.ts.map +1 -0
  168. package/lib/usage.js +14 -0
  169. package/lib/usage.js.map +1 -0
  170. package/lib/util/analytics.d.ts.map +1 -1
  171. package/lib/util/analytics.js +44 -26
  172. package/lib/util/analytics.js.map +1 -1
  173. package/lib/util/async-iterator.d.ts.map +1 -1
  174. package/lib/util/async-iterator.js +57 -135
  175. package/lib/util/async-iterator.js.map +1 -1
  176. package/lib/util/cancelable.js +17 -59
  177. package/lib/util/cancelable.js.map +1 -1
  178. package/lib/util/date-time.js +11 -11
  179. package/lib/util/date-time.js.map +1 -1
  180. package/lib/util/debug-app.d.ts +25 -0
  181. package/lib/util/debug-app.d.ts.map +1 -0
  182. package/lib/util/debug-app.js +100 -0
  183. package/lib/util/debug-app.js.map +1 -0
  184. package/lib/util/deferred.js +10 -12
  185. package/lib/util/deferred.js.map +1 -1
  186. package/lib/util/disposable.d.ts.map +1 -1
  187. package/lib/util/disposable.js +27 -40
  188. package/lib/util/disposable.js.map +1 -1
  189. package/lib/util/event.d.ts.map +1 -1
  190. package/lib/util/event.js +63 -77
  191. package/lib/util/event.js.map +1 -1
  192. package/lib/util/garbage-collected-cache.d.ts +1 -0
  193. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  194. package/lib/util/garbage-collected-cache.js +32 -47
  195. package/lib/util/garbage-collected-cache.js.map +1 -1
  196. package/lib/util/generate-workspace-id.d.ts +6 -1
  197. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  198. package/lib/util/generate-workspace-id.js +469 -504
  199. package/lib/util/generate-workspace-id.js.map +1 -1
  200. package/lib/util/generate-workspace-id.spec.js +68 -78
  201. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  202. package/lib/util/gitpod-cookie.d.ts +20 -0
  203. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  204. package/lib/util/gitpod-cookie.js +41 -0
  205. package/lib/util/gitpod-cookie.js.map +1 -0
  206. package/lib/util/gitpod-host-url.d.ts +4 -1
  207. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  208. package/lib/util/gitpod-host-url.js +124 -114
  209. package/lib/util/gitpod-host-url.js.map +1 -1
  210. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  211. package/lib/util/gitpod-host-url.spec.js +97 -135
  212. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  213. package/lib/util/grpc.d.ts +34 -0
  214. package/lib/util/grpc.d.ts.map +1 -0
  215. package/lib/util/grpc.js +90 -0
  216. package/lib/util/grpc.js.map +1 -0
  217. package/lib/util/jaeger-client-types.d.ts +68 -0
  218. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  219. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  220. package/lib/util/jaeger-client-types.js.map +1 -0
  221. package/lib/util/logging.d.ts +49 -33
  222. package/lib/util/logging.d.ts.map +1 -1
  223. package/lib/util/logging.js +132 -129
  224. package/lib/util/logging.js.map +1 -1
  225. package/lib/util/logging.spec.d.ts +7 -0
  226. package/lib/util/logging.spec.d.ts.map +1 -0
  227. package/lib/util/logging.spec.js +52 -0
  228. package/lib/util/logging.spec.js.map +1 -0
  229. package/lib/util/make-link.js +5 -5
  230. package/lib/util/make-link.js.map +1 -1
  231. package/lib/util/nice-grpc.d.ts +9 -0
  232. package/lib/util/nice-grpc.d.ts.map +1 -0
  233. package/lib/util/nice-grpc.js +119 -0
  234. package/lib/util/nice-grpc.js.map +1 -0
  235. package/lib/util/parse-workspace-id.d.ts +10 -0
  236. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  237. package/lib/util/parse-workspace-id.js +30 -7
  238. package/lib/util/parse-workspace-id.js.map +1 -1
  239. package/lib/util/parse-workspace-id.spec.d.ts +4 -0
  240. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  241. package/lib/util/parse-workspace-id.spec.js +123 -84
  242. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  243. package/lib/util/queue.js +16 -55
  244. package/lib/util/queue.js.map +1 -1
  245. package/lib/util/queue.spec.js +147 -288
  246. package/lib/util/queue.spec.js.map +1 -1
  247. package/lib/util/repeat.d.ts +15 -0
  248. package/lib/util/repeat.d.ts.map +1 -0
  249. package/lib/util/repeat.js +55 -0
  250. package/lib/util/repeat.js.map +1 -0
  251. package/lib/util/semaphore.d.ts.map +1 -1
  252. package/lib/util/semaphore.js +15 -46
  253. package/lib/util/semaphore.js.map +1 -1
  254. package/lib/util/skip-if.d.ts.map +1 -1
  255. package/lib/util/skip-if.js +6 -6
  256. package/lib/util/skip-if.js.map +1 -1
  257. package/lib/util/timeutil.d.ts +2 -0
  258. package/lib/util/timeutil.d.ts.map +1 -1
  259. package/lib/util/timeutil.js +29 -17
  260. package/lib/util/timeutil.js.map +1 -1
  261. package/lib/util/timeutil.spec.d.ts +2 -0
  262. package/lib/util/timeutil.spec.d.ts.map +1 -1
  263. package/lib/util/timeutil.spec.js +54 -23
  264. package/lib/util/timeutil.spec.js.map +1 -1
  265. package/lib/util/tracing.d.ts +52 -6
  266. package/lib/util/tracing.d.ts.map +1 -1
  267. package/lib/util/tracing.js +197 -64
  268. package/lib/util/tracing.js.map +1 -1
  269. package/lib/util/tracing.spec.d.ts +7 -0
  270. package/lib/util/tracing.spec.d.ts.map +1 -0
  271. package/lib/util/tracing.spec.js +121 -0
  272. package/lib/util/tracing.spec.js.map +1 -0
  273. package/lib/util/workspace-port-authentication.d.ts +7 -7
  274. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  275. package/lib/util/workspace-port-authentication.js +9 -12
  276. package/lib/util/workspace-port-authentication.js.map +1 -1
  277. package/lib/webhook-event.d.ts +44 -0
  278. package/lib/webhook-event.d.ts.map +1 -0
  279. package/lib/webhook-event.js +8 -0
  280. package/lib/webhook-event.js.map +1 -0
  281. package/lib/workspace-class.d.ts +14 -0
  282. package/lib/workspace-class.d.ts.map +1 -0
  283. package/lib/workspace-class.js +8 -0
  284. package/lib/workspace-class.js.map +1 -0
  285. package/lib/workspace-cluster.d.ts +15 -5
  286. package/lib/workspace-cluster.d.ts.map +1 -1
  287. package/lib/workspace-cluster.js +19 -4
  288. package/lib/workspace-cluster.js.map +1 -1
  289. package/lib/workspace-instance.d.ts +44 -5
  290. package/lib/workspace-instance.d.ts.map +1 -1
  291. package/lib/wsready.d.ts +1 -1
  292. package/lib/wsready.d.ts.map +1 -1
  293. package/lib/wsready.js +2 -2
  294. package/package.json +34 -15
  295. package/pkg-yarn.lock +21 -9
  296. package/provenance-bundle.jsonl +2 -0
  297. package/src/accounting-protocol.ts +66 -54
  298. package/src/admin-protocol.ts +53 -21
  299. package/src/analytics.ts +28 -16
  300. package/src/attribution.ts +59 -0
  301. package/src/auth.ts +2 -2
  302. package/src/billing-mode.ts +81 -0
  303. package/src/blocked-repositories-protocol.ts +13 -0
  304. package/src/context-url.spec.ts +37 -9
  305. package/src/context-url.ts +94 -36
  306. package/src/encryption/container-module.ts +2 -3
  307. package/src/encryption/encryption-engine.spec.ts +9 -8
  308. package/src/encryption/encryption-engine.ts +20 -16
  309. package/src/encryption/encryption-service.ts +4 -5
  310. package/src/encryption/key-provider.ts +16 -19
  311. package/src/env.ts +0 -22
  312. package/src/experiments/always-default.ts +24 -0
  313. package/src/experiments/configcat-server.ts +41 -0
  314. package/src/experiments/configcat.ts +56 -0
  315. package/src/experiments/types.ts +34 -0
  316. package/src/gitpod-file-parser.spec.ts +55 -61
  317. package/src/gitpod-file-parser.ts +16 -17
  318. package/src/gitpod-service.ts +286 -143
  319. package/src/headless-workspace-log.ts +8 -19
  320. package/src/ide-frontend-service.ts +2 -2
  321. package/src/ide-protocol.ts +129 -0
  322. package/src/index.ts +16 -12
  323. package/src/installation-admin-protocol.ts +45 -0
  324. package/src/license-protocol.ts +12 -6
  325. package/src/messaging/browser/connection.ts +185 -21
  326. package/src/messaging/browser/window-connection.ts +39 -29
  327. package/src/messaging/client-call-metrics.ts +77 -0
  328. package/src/messaging/error.ts +29 -7
  329. package/src/messaging/handler.ts +13 -1
  330. package/src/messaging/node/connection.ts +23 -70
  331. package/src/messaging/proxy-factory.ts +35 -34
  332. package/src/oss-allowlist.ts +15 -0
  333. package/src/payment-protocol.ts +2 -2
  334. package/src/permission.ts +40 -33
  335. package/src/plans.ts +240 -189
  336. package/src/protocol.spec.ts +97 -0
  337. package/src/protocol.ts +612 -340
  338. package/src/snapshot-url.spec.ts +27 -0
  339. package/src/snapshot-url.ts +27 -0
  340. package/src/team-subscription-protocol.ts +59 -23
  341. package/src/teams-projects-protocol.ts +166 -0
  342. package/src/typings/globals.ts +4 -4
  343. package/src/usage.ts +71 -0
  344. package/src/util/analytics.ts +56 -18
  345. package/src/util/async-iterator.ts +4 -5
  346. package/src/util/cancelable.ts +3 -3
  347. package/src/util/date-time.ts +8 -8
  348. package/src/util/debug-app.ts +81 -0
  349. package/src/util/deferred.ts +6 -6
  350. package/src/util/disposable.ts +3 -6
  351. package/src/util/event.ts +9 -11
  352. package/src/util/garbage-collected-cache.ts +14 -6
  353. package/src/util/generate-workspace-id.spec.ts +34 -7
  354. package/src/util/generate-workspace-id.ts +464 -440
  355. package/src/util/gitpod-cookie.ts +38 -0
  356. package/src/util/gitpod-host-url.spec.ts +40 -13
  357. package/src/util/gitpod-host-url.ts +61 -37
  358. package/src/util/grpc.ts +104 -0
  359. package/src/util/jaeger-client-types.ts +102 -0
  360. package/src/util/logging.spec.ts +23 -0
  361. package/src/util/logging.ts +156 -74
  362. package/src/util/make-link.ts +6 -7
  363. package/src/util/nice-grpc.ts +93 -0
  364. package/src/util/parse-workspace-id.spec.ts +37 -8
  365. package/src/util/parse-workspace-id.ts +32 -7
  366. package/src/util/queue.spec.ts +27 -25
  367. package/src/util/repeat.ts +45 -0
  368. package/src/util/semaphore.ts +4 -6
  369. package/src/util/skip-if.ts +9 -6
  370. package/src/util/timeutil.spec.ts +40 -14
  371. package/src/util/timeutil.ts +27 -11
  372. package/src/util/tracing.spec.ts +88 -0
  373. package/src/util/tracing.ts +200 -31
  374. package/src/util/workspace-port-authentication.ts +10 -13
  375. package/src/webhook-event.ts +55 -0
  376. package/src/workspace-class.ts +14 -0
  377. package/src/workspace-cluster.ts +29 -10
  378. package/src/workspace-instance.ts +89 -24
  379. package/src/wsready.ts +3 -3
  380. package/data/builtin-theia-plugins.json +0 -372
  381. package/lib/email-protocol.d.ts +0 -50
  382. package/lib/email-protocol.d.ts.map +0 -1
  383. package/lib/email-protocol.js +0 -28
  384. package/lib/email-protocol.js.map +0 -1
  385. package/lib/messaging/connection-error-handler.d.ts +0 -27
  386. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  387. package/lib/messaging/connection-error-handler.js +0 -46
  388. package/lib/messaging/connection-error-handler.js.map +0 -1
  389. package/lib/theia-plugins.d.ts +0 -11
  390. package/lib/theia-plugins.d.ts.map +0 -1
  391. package/lib/theia-plugins.js.map +0 -1
  392. package/lib/util/repeater.d.ts +0 -22
  393. package/lib/util/repeater.d.ts.map +0 -1
  394. package/lib/util/repeater.js +0 -118
  395. package/lib/util/repeater.js.map +0 -1
  396. package/lib/util/safe-promise.d.ts +0 -11
  397. package/lib/util/safe-promise.d.ts.map +0 -1
  398. package/lib/util/safe-promise.js +0 -34
  399. package/lib/util/safe-promise.js.map +0 -1
  400. package/lib/util/without.d.ts +0 -7
  401. package/lib/util/without.d.ts.map +0 -1
  402. package/lib/util/without.js.map +0 -1
  403. package/src/email-protocol.ts +0 -67
  404. package/src/messaging/connection-error-handler.ts +0 -62
  405. package/src/util/jaeger-client.d.ts +0 -105
  406. package/src/util/repeater.ts +0 -49
  407. package/src/util/safe-promise.ts +0 -26
@@ -13,424 +13,299 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
13
13
  step((generator = generator.apply(thisArg, _arguments || [])).next());
14
14
  });
15
15
  };
16
- var __generator = (this && this.__generator) || function (thisArg, body) {
17
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
18
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
19
- function verb(n) { return function (v) { return step([n, v]); }; }
20
- function step(op) {
21
- if (f) throw new TypeError("Generator is already executing.");
22
- while (_) try {
23
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
24
- if (y = 0, t) op = [op[0] & 2, t.value];
25
- switch (op[0]) {
26
- case 0: case 1: t = op; break;
27
- case 4: _.label++; return { value: op[1], done: false };
28
- case 5: _.label++; y = op[1]; op = [0]; continue;
29
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
30
- default:
31
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
32
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
33
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
34
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
35
- if (t[2]) _.ops.pop();
36
- _.trys.pop(); continue;
37
- }
38
- op = body.call(thisArg, _);
39
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
40
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
41
- }
42
- };
43
- var __values = (this && this.__values) || function(o) {
44
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
45
- if (m) return m.call(o);
46
- if (o && typeof o.length === "number") return {
47
- next: function () {
48
- if (o && i >= o.length) o = void 0;
49
- return { value: o && o[i++], done: !o };
50
- }
51
- };
52
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
53
- };
54
16
  Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.createGitpodService = exports.GitpodServiceImpl = exports.WorkspaceInstanceUpdateListener = exports.GitpodCompositeClient = exports.GitpodServerProxy = exports.GitpodServerPath = exports.createServerMock = exports.createServiceMock = exports.WorkspaceTimeoutValues = exports.GitpodServer = void 0;
56
- var vscode_jsonrpc_1 = require("vscode-jsonrpc");
57
- var gitpod_host_url_1 = require("./util/gitpod-host-url");
58
- var connection_1 = require("./messaging/browser/connection");
59
- var event_1 = require("./util/event");
60
- exports.GitpodServer = Symbol('GitpodServer');
61
- exports.WorkspaceTimeoutValues = ["30m", "60m", "180m"];
62
- var createServiceMock = function (methods) {
63
- return new GitpodServiceImpl(exports.createServerMock(methods));
17
+ exports.createGitpodService = exports.GitpodServiceImpl = exports.WorkspaceInstanceUpdateListener = exports.GitpodCompositeClient = exports.GitpodServerProxy = exports.GitpodServerPath = exports.createServerMock = exports.createServiceMock = exports.WorkspaceTimeoutValues = exports.WORKSPACE_TIMEOUT_EXTENDED_ALT = exports.WORKSPACE_TIMEOUT_EXTENDED = exports.WORKSPACE_TIMEOUT_DEFAULT_LONG = exports.WORKSPACE_TIMEOUT_DEFAULT_SHORT = 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");
22
+ exports.GitpodServer = Symbol("GitpodServer");
23
+ exports.WORKSPACE_TIMEOUT_DEFAULT_SHORT = "short";
24
+ exports.WORKSPACE_TIMEOUT_DEFAULT_LONG = "long";
25
+ exports.WORKSPACE_TIMEOUT_EXTENDED = "extended";
26
+ exports.WORKSPACE_TIMEOUT_EXTENDED_ALT = "180m"; // for backwards compatibility since the IDE uses this
27
+ exports.WorkspaceTimeoutValues = [
28
+ exports.WORKSPACE_TIMEOUT_DEFAULT_SHORT,
29
+ exports.WORKSPACE_TIMEOUT_DEFAULT_LONG,
30
+ exports.WORKSPACE_TIMEOUT_EXTENDED,
31
+ exports.WORKSPACE_TIMEOUT_EXTENDED_ALT,
32
+ ];
33
+ const createServiceMock = function (methods) {
34
+ return new GitpodServiceImpl((0, exports.createServerMock)(methods));
64
35
  };
65
36
  exports.createServiceMock = createServiceMock;
66
- var createServerMock = function (methods) {
67
- methods.setClient = methods.setClient || (function () { });
68
- methods.dispose = methods.dispose || (function () { });
37
+ const createServerMock = function (methods) {
38
+ methods.setClient = methods.setClient || (() => { });
39
+ methods.dispose = methods.dispose || (() => { });
69
40
  return new Proxy(methods, {
70
41
  // @ts-ignore
71
- get: function (target, property) {
72
- var result = target[property];
42
+ get: (target, property) => {
43
+ const result = target[property];
73
44
  if (!result) {
74
- throw new Error("Method " + property + " not implemented");
45
+ throw new Error(`Method ${String(property)} not implemented`);
75
46
  }
76
47
  return result;
77
- }
48
+ },
78
49
  });
79
50
  };
80
51
  exports.createServerMock = createServerMock;
81
- exports.GitpodServerPath = '/gitpod';
82
- exports.GitpodServerProxy = Symbol('GitpodServerProxy');
83
- var GitpodCompositeClient = /** @class */ (function () {
84
- function GitpodCompositeClient() {
52
+ exports.GitpodServerPath = "/gitpod";
53
+ exports.GitpodServerProxy = Symbol("GitpodServerProxy");
54
+ class GitpodCompositeClient {
55
+ constructor() {
85
56
  this.clients = [];
86
57
  }
87
- GitpodCompositeClient.prototype.registerClient = function (client) {
88
- var _this = this;
58
+ registerClient(client) {
89
59
  this.clients.push(client);
90
- var index = this.clients.length;
91
60
  return {
92
- dispose: function () {
93
- _this.clients.slice(index, 1);
94
- }
61
+ dispose: () => {
62
+ const index = this.clients.indexOf(client);
63
+ if (index > -1) {
64
+ this.clients.splice(index, 1);
65
+ }
66
+ },
95
67
  };
96
- };
97
- GitpodCompositeClient.prototype.onInstanceUpdate = function (instance) {
98
- var e_1, _a;
99
- try {
100
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
101
- var client = _c.value;
102
- if (client.onInstanceUpdate) {
103
- try {
104
- client.onInstanceUpdate(instance);
105
- }
106
- catch (error) {
107
- console.error(error);
108
- }
68
+ }
69
+ onInstanceUpdate(instance) {
70
+ for (const client of this.clients) {
71
+ if (client.onInstanceUpdate) {
72
+ try {
73
+ client.onInstanceUpdate(instance);
109
74
  }
110
- }
111
- }
112
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
113
- finally {
114
- try {
115
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
116
- }
117
- finally { if (e_1) throw e_1.error; }
118
- }
119
- };
120
- GitpodCompositeClient.prototype.onWorkspaceImageBuildLogs = function (info, content) {
121
- var e_2, _a;
122
- try {
123
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
124
- var client = _c.value;
125
- if (client.onWorkspaceImageBuildLogs) {
126
- try {
127
- client.onWorkspaceImageBuildLogs(info, content);
128
- }
129
- catch (error) {
130
- console.error(error);
131
- }
75
+ catch (error) {
76
+ console.error(error);
132
77
  }
133
78
  }
134
79
  }
135
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
136
- finally {
137
- try {
138
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
139
- }
140
- finally { if (e_2) throw e_2.error; }
141
- }
142
- };
143
- GitpodCompositeClient.prototype.onHeadlessWorkspaceLogs = function (evt) {
144
- var e_3, _a;
145
- try {
146
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
147
- var client = _c.value;
148
- if (client.onHeadlessWorkspaceLogs) {
149
- try {
150
- client.onHeadlessWorkspaceLogs(evt);
151
- }
152
- catch (error) {
153
- console.error(error);
154
- }
80
+ }
81
+ onPrebuildUpdate(update) {
82
+ for (const client of this.clients) {
83
+ if (client.onPrebuildUpdate) {
84
+ try {
85
+ client.onPrebuildUpdate(update);
155
86
  }
156
- }
157
- }
158
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
159
- finally {
160
- try {
161
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
162
- }
163
- finally { if (e_3) throw e_3.error; }
164
- }
165
- };
166
- GitpodCompositeClient.prototype.notifyDidOpenConnection = function () {
167
- var e_4, _a;
168
- try {
169
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
170
- var client = _c.value;
171
- if (client.notifyDidOpenConnection) {
172
- try {
173
- client.notifyDidOpenConnection();
174
- }
175
- catch (error) {
176
- console.error(error);
177
- }
87
+ catch (error) {
88
+ console.error(error);
178
89
  }
179
90
  }
180
91
  }
181
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
182
- finally {
183
- try {
184
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
92
+ }
93
+ onWorkspaceImageBuildLogs(info, content) {
94
+ for (const client of this.clients) {
95
+ if (client.onWorkspaceImageBuildLogs) {
96
+ try {
97
+ client.onWorkspaceImageBuildLogs(info, content);
98
+ }
99
+ catch (error) {
100
+ console.error(error);
101
+ }
185
102
  }
186
- finally { if (e_4) throw e_4.error; }
187
103
  }
188
- };
189
- GitpodCompositeClient.prototype.notifyDidCloseConnection = function () {
190
- var e_5, _a;
191
- try {
192
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
193
- var client = _c.value;
194
- if (client.notifyDidCloseConnection) {
195
- try {
196
- client.notifyDidCloseConnection();
197
- }
198
- catch (error) {
199
- console.error(error);
200
- }
104
+ }
105
+ notifyDidOpenConnection() {
106
+ for (const client of this.clients) {
107
+ if (client.notifyDidOpenConnection) {
108
+ try {
109
+ client.notifyDidOpenConnection();
110
+ }
111
+ catch (error) {
112
+ console.error(error);
201
113
  }
202
114
  }
203
115
  }
204
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
205
- finally {
206
- try {
207
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
116
+ }
117
+ notifyDidCloseConnection() {
118
+ for (const client of this.clients) {
119
+ if (client.notifyDidCloseConnection) {
120
+ try {
121
+ client.notifyDidCloseConnection();
122
+ }
123
+ catch (error) {
124
+ console.error(error);
125
+ }
208
126
  }
209
- finally { if (e_5) throw e_5.error; }
210
127
  }
211
- };
212
- GitpodCompositeClient.prototype.onCreditAlert = function (creditAlert) {
213
- var e_6, _a;
214
- try {
215
- for (var _b = __values(this.clients), _c = _b.next(); !_c.done; _c = _b.next()) {
216
- var client = _c.value;
217
- if (client.onCreditAlert) {
218
- try {
219
- client.onCreditAlert(creditAlert);
220
- }
221
- catch (error) {
222
- console.error(error);
223
- }
128
+ }
129
+ onCreditAlert(creditAlert) {
130
+ for (const client of this.clients) {
131
+ if (client.onCreditAlert) {
132
+ try {
133
+ client.onCreditAlert(creditAlert);
134
+ }
135
+ catch (error) {
136
+ console.error(error);
224
137
  }
225
138
  }
226
139
  }
227
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
228
- finally {
229
- try {
230
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
140
+ }
141
+ onNotificationUpdated() {
142
+ for (const client of this.clients) {
143
+ if (client.onNotificationUpdated) {
144
+ try {
145
+ client.onNotificationUpdated();
146
+ }
147
+ catch (error) {
148
+ console.error(error);
149
+ }
231
150
  }
232
- finally { if (e_6) throw e_6.error; }
233
151
  }
234
- };
235
- return GitpodCompositeClient;
236
- }());
152
+ }
153
+ }
237
154
  exports.GitpodCompositeClient = GitpodCompositeClient;
238
- var hasWindow = (typeof window !== 'undefined');
239
- var phasesOrder = {
155
+ const hasWindow = typeof window !== "undefined";
156
+ const phasesOrder = {
240
157
  unknown: 0,
241
158
  preparing: 1,
242
- pending: 2,
243
- creating: 3,
244
- initializing: 4,
245
- running: 5,
246
- interrupted: 6,
247
- stopping: 7,
248
- stopped: 8
159
+ building: 2,
160
+ pending: 3,
161
+ creating: 4,
162
+ initializing: 5,
163
+ running: 6,
164
+ interrupted: 7,
165
+ stopping: 8,
166
+ stopped: 9,
249
167
  };
250
- var WorkspaceInstanceUpdateListener = /** @class */ (function () {
251
- function WorkspaceInstanceUpdateListener(service, _info) {
252
- var _this = this;
168
+ class WorkspaceInstanceUpdateListener {
169
+ constructor(service, _info) {
253
170
  this.service = service;
254
171
  this._info = _info;
255
172
  this.onDidChangeEmitter = new event_1.Emitter();
256
173
  this.onDidChange = this.onDidChangeEmitter.event;
257
- this.source = 'sync';
174
+ this.source = "sync";
258
175
  this.syncQueue = Promise.resolve();
259
176
  service.registerClient({
260
- onInstanceUpdate: function (instance) {
261
- if (_this.isOutOfOrder(instance)) {
177
+ onInstanceUpdate: (instance) => {
178
+ if (this.isOutOfOrder(instance)) {
262
179
  return;
263
180
  }
264
- _this.cancelSync();
265
- _this._info.latestInstance = instance;
266
- _this.source = 'update';
267
- _this.onDidChangeEmitter.fire(undefined);
181
+ this.cancelSync();
182
+ this._info.latestInstance = instance;
183
+ this.source = "update";
184
+ this.onDidChangeEmitter.fire(undefined);
185
+ },
186
+ notifyDidOpenConnection: () => {
187
+ this.sync();
268
188
  },
269
- notifyDidOpenConnection: function () {
270
- _this.sync();
271
- }
272
189
  });
273
190
  if (hasWindow) {
274
191
  // learn about page lifecycle here: https://developers.google.com/web/updates/2018/07/page-lifecycle-api
275
- window.document.addEventListener('visibilitychange', function () { return __awaiter(_this, void 0, void 0, function () {
276
- return __generator(this, function (_a) {
277
- if (window.document.visibilityState === 'visible') {
278
- this.sync();
279
- }
280
- return [2 /*return*/];
281
- });
282
- }); });
283
- window.addEventListener('pageshow', function (e) {
192
+ window.document.addEventListener("visibilitychange", () => __awaiter(this, void 0, void 0, function* () {
193
+ if (window.document.visibilityState === "visible") {
194
+ this.sync();
195
+ }
196
+ }));
197
+ window.addEventListener("pageshow", (e) => {
284
198
  if (e.persisted) {
285
- _this.sync();
199
+ this.sync();
286
200
  }
287
201
  });
288
202
  }
289
203
  }
290
- Object.defineProperty(WorkspaceInstanceUpdateListener.prototype, "info", {
291
- get: function () {
292
- return this._info;
293
- },
294
- enumerable: false,
295
- configurable: true
296
- });
204
+ get info() {
205
+ return this._info;
206
+ }
297
207
  /**
298
208
  * Only one sync can be performed at the same time.
299
209
  * Any new sync request or instance update cancels all previously scheduled sync requests.
300
210
  */
301
- WorkspaceInstanceUpdateListener.prototype.sync = function () {
302
- var _this = this;
211
+ sync() {
303
212
  this.cancelSync();
304
213
  this.syncTokenSource = new vscode_jsonrpc_1.CancellationTokenSource();
305
- var token = this.syncTokenSource.token;
306
- this.syncQueue = this.syncQueue.then(function () { return __awaiter(_this, void 0, void 0, function () {
307
- var info, e_7;
308
- return __generator(this, function (_a) {
309
- switch (_a.label) {
310
- case 0:
311
- if (token.isCancellationRequested) {
312
- return [2 /*return*/];
313
- }
314
- _a.label = 1;
315
- case 1:
316
- _a.trys.push([1, 3, , 4]);
317
- return [4 /*yield*/, this.service.server.getWorkspace(this._info.workspace.id)];
318
- case 2:
319
- info = _a.sent();
320
- if (token.isCancellationRequested) {
321
- return [2 /*return*/];
322
- }
323
- this._info = info;
324
- this.source = 'sync';
325
- this.onDidChangeEmitter.fire(undefined);
326
- return [3 /*break*/, 4];
327
- case 3:
328
- e_7 = _a.sent();
329
- console.error('failed to sync workspace instance:', e_7);
330
- return [3 /*break*/, 4];
331
- case 4: return [2 /*return*/];
214
+ const token = this.syncTokenSource.token;
215
+ this.syncQueue = this.syncQueue.then(() => __awaiter(this, void 0, void 0, function* () {
216
+ if (token.isCancellationRequested) {
217
+ return;
218
+ }
219
+ try {
220
+ const info = yield this.service.server.getWorkspace(this._info.workspace.id);
221
+ if (token.isCancellationRequested) {
222
+ return;
332
223
  }
333
- });
334
- }); });
335
- };
336
- WorkspaceInstanceUpdateListener.prototype.cancelSync = function () {
224
+ this._info = info;
225
+ this.source = "sync";
226
+ this.onDidChangeEmitter.fire(undefined);
227
+ }
228
+ catch (e) {
229
+ console.error("failed to sync workspace instance:", e);
230
+ }
231
+ }));
232
+ }
233
+ cancelSync() {
337
234
  if (this.syncTokenSource) {
338
235
  this.syncTokenSource.cancel();
339
236
  this.syncTokenSource = undefined;
340
237
  }
341
- };
238
+ }
342
239
  /**
343
240
  * If sync seen more recent update then ignore all updates with previous phases.
344
241
  * Within the same phase still the race can occur but which should be eventually consistent.
345
242
  */
346
- WorkspaceInstanceUpdateListener.prototype.isOutOfOrder = function (instance) {
243
+ isOutOfOrder(instance) {
347
244
  var _a;
348
245
  if (instance.workspaceId !== this._info.workspace.id) {
349
246
  return true;
350
247
  }
351
- if (this.source === 'update') {
248
+ if (this.source === "update") {
352
249
  return false;
353
250
  }
354
251
  if (instance.id !== ((_a = this.info.latestInstance) === null || _a === void 0 ? void 0 : _a.id)) {
355
252
  return false;
356
253
  }
357
254
  return phasesOrder[instance.status.phase] < phasesOrder[this.info.latestInstance.status.phase];
358
- };
359
- return WorkspaceInstanceUpdateListener;
360
- }());
255
+ }
256
+ }
361
257
  exports.WorkspaceInstanceUpdateListener = WorkspaceInstanceUpdateListener;
362
- var GitpodServiceImpl = /** @class */ (function () {
363
- function GitpodServiceImpl(server, options) {
364
- var _this = this;
258
+ class GitpodServiceImpl {
259
+ constructor(server, options) {
365
260
  this.server = server;
366
261
  this.options = options;
367
262
  this.compositeClient = new GitpodCompositeClient();
368
263
  this.instanceListeners = new Map();
369
264
  server.setClient(this.compositeClient);
370
- server.onDidOpenConnection(function () { return _this.compositeClient.notifyDidOpenConnection(); });
371
- server.onDidCloseConnection(function () { return _this.compositeClient.notifyDidCloseConnection(); });
265
+ server.onDidOpenConnection(() => this.compositeClient.notifyDidOpenConnection());
266
+ server.onDidCloseConnection(() => this.compositeClient.notifyDidCloseConnection());
372
267
  }
373
- GitpodServiceImpl.prototype.registerClient = function (client) {
268
+ registerClient(client) {
374
269
  return this.compositeClient.registerClient(client);
375
- };
376
- GitpodServiceImpl.prototype.listenToInstance = function (workspaceId) {
377
- var _this = this;
378
- var listener = this.instanceListeners.get(workspaceId) ||
379
- (function () { return __awaiter(_this, void 0, void 0, function () {
380
- var info;
381
- return __generator(this, function (_a) {
382
- switch (_a.label) {
383
- case 0: return [4 /*yield*/, this.server.getWorkspace(workspaceId)];
384
- case 1:
385
- info = _a.sent();
386
- return [2 /*return*/, new WorkspaceInstanceUpdateListener(this, info)];
387
- }
388
- });
389
- }); })();
270
+ }
271
+ listenToInstance(workspaceId) {
272
+ const listener = this.instanceListeners.get(workspaceId) ||
273
+ (() => __awaiter(this, void 0, void 0, function* () {
274
+ const info = yield this.server.getWorkspace(workspaceId);
275
+ return new WorkspaceInstanceUpdateListener(this, info);
276
+ }))();
390
277
  this.instanceListeners.set(workspaceId, listener);
391
278
  return listener;
392
- };
393
- GitpodServiceImpl.prototype.reconnect = function () {
279
+ }
280
+ reconnect() {
394
281
  var _a;
395
- return __awaiter(this, void 0, void 0, function () {
396
- return __generator(this, function (_b) {
397
- switch (_b.label) {
398
- case 0:
399
- if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.onReconnect)) return [3 /*break*/, 2];
400
- return [4 /*yield*/, this.options.onReconnect()];
401
- case 1:
402
- _b.sent();
403
- _b.label = 2;
404
- case 2: return [2 /*return*/];
405
- }
406
- });
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.onReconnect) {
284
+ yield this.options.onReconnect();
285
+ }
407
286
  });
408
- };
409
- return GitpodServiceImpl;
410
- }());
287
+ }
288
+ }
411
289
  exports.GitpodServiceImpl = GitpodServiceImpl;
412
290
  function createGitpodService(serverUrl) {
413
- var toWsUrl = function (serverUrl) {
414
- return new gitpod_host_url_1.GitpodHostUrl(serverUrl)
415
- .asWebsocket()
416
- .withApi({ pathname: exports.GitpodServerPath })
417
- .toString();
291
+ const toWsUrl = (serverUrl) => {
292
+ return new gitpod_host_url_1.GitpodHostUrl(serverUrl).asWebsocket().withApi({ pathname: exports.GitpodServerPath }).toString();
418
293
  };
419
- var url;
294
+ let url;
420
295
  if (typeof serverUrl === "string") {
421
296
  url = toWsUrl(serverUrl);
422
297
  }
423
298
  else {
424
- url = serverUrl.then(function (url) { return toWsUrl(url); });
299
+ url = serverUrl.then((url) => toWsUrl(url));
425
300
  }
426
- var connectionProvider = new connection_1.WebSocketConnectionProvider();
427
- var onReconnect = function () { };
428
- var gitpodServer = connectionProvider.createProxy(url, undefined, {
429
- onListening: function (socket) {
430
- onReconnect = function () { return socket.reconnect(); };
431
- }
301
+ const connectionProvider = new connection_1.WebSocketConnectionProvider();
302
+ let onReconnect = () => { };
303
+ const gitpodServer = connectionProvider.createProxy(url, undefined, {
304
+ onListening: (socket) => {
305
+ onReconnect = () => socket.reconnect();
306
+ },
432
307
  });
433
- return new GitpodServiceImpl(gitpodServer, { onReconnect: onReconnect });
308
+ return new GitpodServiceImpl(gitpodServer, { onReconnect });
434
309
  }
435
310
  exports.createGitpodService = createGitpodService;
436
311
  //# sourceMappingURL=gitpod-service.js.map