@gitpod/gitpod-protocol 0.1.5-sh-ace-test.0 → 0.1.5-siddhant-k-code-allow-github-prebuilds-10358.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 (455) hide show
  1. package/data/gitpod-schema.json +163 -74
  2. package/lib/accounting-protocol.d.ts +163 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -0
  4. package/lib/accounting-protocol.js +111 -0
  5. package/lib/accounting-protocol.js.map +1 -0
  6. package/lib/admin-protocol.d.ts +51 -6
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +17 -2
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +44 -0
  11. package/lib/analytics.d.ts.map +1 -0
  12. package/lib/analytics.js +10 -0
  13. package/lib/analytics.js.map +1 -0
  14. package/lib/attribution.d.ts +24 -0
  15. package/lib/attribution.d.ts.map +1 -0
  16. package/lib/attribution.js +54 -0
  17. package/lib/attribution.js.map +1 -0
  18. package/lib/auth.d.ts +25 -0
  19. package/lib/auth.d.ts.map +1 -0
  20. package/lib/auth.js +16 -0
  21. package/lib/auth.js.map +1 -0
  22. package/lib/billing-mode.d.ts +45 -0
  23. package/lib/billing-mode.d.ts.map +1 -0
  24. package/lib/billing-mode.js +44 -0
  25. package/lib/billing-mode.js.map +1 -0
  26. package/lib/blocked-repositories-protocol.d.ts +13 -0
  27. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  28. package/lib/blocked-repositories-protocol.js +8 -0
  29. package/lib/blocked-repositories-protocol.js.map +1 -0
  30. package/lib/context-url.d.ts +30 -0
  31. package/lib/context-url.d.ts.map +1 -0
  32. package/lib/context-url.js +100 -0
  33. package/lib/context-url.js.map +1 -0
  34. package/lib/context-url.spec.d.ts +12 -0
  35. package/lib/context-url.spec.d.ts.map +1 -0
  36. package/lib/context-url.spec.js +81 -0
  37. package/lib/context-url.spec.js.map +1 -0
  38. package/lib/encryption/container-module.d.ts +2 -2
  39. package/lib/encryption/container-module.d.ts.map +1 -1
  40. package/lib/encryption/container-module.js +8 -6
  41. package/lib/encryption/container-module.js.map +1 -1
  42. package/lib/encryption/encryption-engine.d.ts +2 -2
  43. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  44. package/lib/encryption/encryption-engine.js +28 -28
  45. package/lib/encryption/encryption-engine.js.map +1 -1
  46. package/lib/encryption/encryption-engine.spec.d.ts +3 -3
  47. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  48. package/lib/encryption/encryption-engine.spec.js +32 -39
  49. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  50. package/lib/encryption/encryption-service.d.ts +2 -2
  51. package/lib/encryption/encryption-service.d.ts.map +1 -1
  52. package/lib/encryption/encryption-service.js +33 -46
  53. package/lib/encryption/encryption-service.js.map +1 -1
  54. package/lib/encryption/key-provider.d.ts +3 -3
  55. package/lib/encryption/key-provider.d.ts.map +1 -1
  56. package/lib/encryption/key-provider.js +34 -40
  57. package/lib/encryption/key-provider.js.map +1 -1
  58. package/lib/env.d.ts +2 -8
  59. package/lib/env.d.ts.map +1 -1
  60. package/lib/env.js +10 -29
  61. package/lib/env.js.map +1 -1
  62. package/lib/experiments/always-default.d.ts +8 -0
  63. package/lib/experiments/always-default.d.ts.map +1 -0
  64. package/lib/experiments/always-default.js +20 -0
  65. package/lib/experiments/always-default.js.map +1 -0
  66. package/lib/experiments/configcat-server.d.ts +10 -0
  67. package/lib/experiments/configcat-server.d.ts.map +1 -0
  68. package/lib/experiments/configcat-server.js +37 -0
  69. package/lib/experiments/configcat-server.js.map +1 -0
  70. package/lib/experiments/configcat.d.ts +21 -0
  71. package/lib/experiments/configcat.d.ts.map +1 -0
  72. package/lib/experiments/configcat.js +51 -0
  73. package/lib/experiments/configcat.js.map +1 -0
  74. package/lib/experiments/types.d.ts +22 -0
  75. package/lib/experiments/types.d.ts.map +1 -0
  76. package/lib/experiments/types.js +10 -0
  77. package/lib/experiments/types.js.map +1 -0
  78. package/lib/frontend-dashboard-service.d.ts +90 -0
  79. package/lib/frontend-dashboard-service.d.ts.map +1 -0
  80. package/lib/frontend-dashboard-service.js +49 -0
  81. package/lib/frontend-dashboard-service.js.map +1 -0
  82. package/lib/gitpod-file-parser.d.ts +2 -2
  83. package/lib/gitpod-file-parser.d.ts.map +1 -1
  84. package/lib/gitpod-file-parser.js +29 -44
  85. package/lib/gitpod-file-parser.js.map +1 -1
  86. package/lib/gitpod-file-parser.spec.d.ts +2 -2
  87. package/lib/gitpod-file-parser.spec.js +147 -144
  88. package/lib/gitpod-file-parser.spec.js.map +1 -1
  89. package/lib/gitpod-service.d.ts +241 -50
  90. package/lib/gitpod-service.d.ts.map +1 -1
  91. package/lib/gitpod-service.js +275 -123
  92. package/lib/gitpod-service.js.map +1 -1
  93. package/lib/headless-workspace-log.d.ts +11 -13
  94. package/lib/headless-workspace-log.d.ts.map +1 -1
  95. package/lib/headless-workspace-log.js +8 -9
  96. package/lib/headless-workspace-log.js.map +1 -1
  97. package/lib/ide-frontend-service.d.ts +26 -0
  98. package/lib/ide-frontend-service.d.ts.map +1 -0
  99. package/lib/ide-frontend-service.js +8 -0
  100. package/lib/ide-frontend-service.js.map +1 -0
  101. package/lib/ide-protocol.d.ts +126 -0
  102. package/lib/ide-protocol.d.ts.map +1 -0
  103. package/lib/ide-protocol.js +18 -0
  104. package/lib/ide-protocol.js.map +1 -0
  105. package/lib/index.d.ts +18 -12
  106. package/lib/index.d.ts.map +1 -1
  107. package/lib/index.js +28 -13
  108. package/lib/index.js.map +1 -1
  109. package/lib/installation-admin-protocol.d.ts +30 -0
  110. package/lib/installation-admin-protocol.d.ts.map +1 -0
  111. package/lib/installation-admin-protocol.js +31 -0
  112. package/lib/installation-admin-protocol.js.map +1 -0
  113. package/lib/license-protocol.d.ts +9 -2
  114. package/lib/license-protocol.d.ts.map +1 -1
  115. package/lib/license-protocol.js +3 -2
  116. package/lib/license-protocol.js.map +1 -1
  117. package/lib/messaging/browser/connection.d.ts +6 -4
  118. package/lib/messaging/browser/connection.d.ts.map +1 -1
  119. package/lib/messaging/browser/connection.js +188 -48
  120. package/lib/messaging/browser/connection.js.map +1 -1
  121. package/lib/messaging/browser/window-connection.d.ts +9 -4
  122. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  123. package/lib/messaging/browser/window-connection.js +48 -59
  124. package/lib/messaging/browser/window-connection.js.map +1 -1
  125. package/lib/messaging/client-call-metrics.d.ts +21 -0
  126. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  127. package/lib/messaging/client-call-metrics.js +95 -0
  128. package/lib/messaging/client-call-metrics.js.map +1 -0
  129. package/lib/messaging/error.d.ts +17 -4
  130. package/lib/messaging/error.d.ts.map +1 -1
  131. package/lib/messaging/error.js +34 -7
  132. package/lib/messaging/error.js.map +1 -1
  133. package/lib/messaging/handler.d.ts +10 -0
  134. package/lib/messaging/handler.d.ts.map +1 -1
  135. package/lib/messaging/handler.js +2 -1
  136. package/lib/messaging/handler.js.map +1 -1
  137. package/lib/messaging/node/connection.d.ts +1 -17
  138. package/lib/messaging/node/connection.d.ts.map +1 -1
  139. package/lib/messaging/node/connection.js +24 -59
  140. package/lib/messaging/node/connection.js.map +1 -1
  141. package/lib/messaging/proxy-factory.d.ts +3 -1
  142. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  143. package/lib/messaging/proxy-factory.js +76 -162
  144. package/lib/messaging/proxy-factory.js.map +1 -1
  145. package/lib/oss-allowlist.d.ts +14 -0
  146. package/lib/oss-allowlist.d.ts.map +1 -0
  147. package/lib/oss-allowlist.js +8 -0
  148. package/lib/oss-allowlist.js.map +1 -0
  149. package/lib/payment-protocol.d.ts +18 -0
  150. package/lib/payment-protocol.d.ts.map +1 -0
  151. package/lib/payment-protocol.js +13 -0
  152. package/lib/payment-protocol.js.map +1 -0
  153. package/lib/permission.d.ts +26 -15
  154. package/lib/permission.d.ts.map +1 -1
  155. package/lib/permission.js +50 -36
  156. package/lib/permission.js.map +1 -1
  157. package/lib/plans.d.ts +211 -0
  158. package/lib/plans.d.ts.map +1 -0
  159. package/lib/plans.js +609 -0
  160. package/lib/plans.js.map +1 -0
  161. package/lib/protocol.d.ts +300 -112
  162. package/lib/protocol.d.ts.map +1 -1
  163. package/lib/protocol.js +393 -201
  164. package/lib/protocol.js.map +1 -1
  165. package/lib/protocol.spec.d.ts +7 -0
  166. package/lib/protocol.spec.d.ts.map +1 -0
  167. package/lib/protocol.spec.js +127 -0
  168. package/lib/protocol.spec.js.map +1 -0
  169. package/lib/snapshot-url.d.ts +14 -0
  170. package/lib/snapshot-url.d.ts.map +1 -0
  171. package/lib/snapshot-url.js +26 -0
  172. package/lib/snapshot-url.js.map +1 -0
  173. package/lib/snapshot-url.spec.d.ts +7 -0
  174. package/lib/snapshot-url.spec.d.ts.map +1 -0
  175. package/lib/snapshot-url.spec.js +41 -0
  176. package/lib/snapshot-url.spec.js.map +1 -0
  177. package/lib/team-subscription-protocol.d.ts +92 -0
  178. package/lib/team-subscription-protocol.d.ts.map +1 -0
  179. package/lib/team-subscription-protocol.js +78 -0
  180. package/lib/team-subscription-protocol.js.map +1 -0
  181. package/lib/teams-projects-protocol.d.ts +136 -0
  182. package/lib/teams-projects-protocol.d.ts.map +1 -0
  183. package/lib/teams-projects-protocol.js +37 -0
  184. package/lib/teams-projects-protocol.js.map +1 -0
  185. package/lib/typings/globals.d.ts +4 -3
  186. package/lib/typings/globals.d.ts.map +1 -1
  187. package/lib/typings/globals.js +2 -2
  188. package/lib/usage.d.ts +73 -0
  189. package/lib/usage.d.ts.map +1 -0
  190. package/lib/usage.js +20 -0
  191. package/lib/usage.js.map +1 -0
  192. package/lib/util/analytics.d.ts +8 -0
  193. package/lib/util/analytics.d.ts.map +1 -0
  194. package/lib/util/analytics.js +88 -0
  195. package/lib/util/analytics.js.map +1 -0
  196. package/lib/util/async-iterator.d.ts +2 -2
  197. package/lib/util/async-iterator.d.ts.map +1 -1
  198. package/lib/util/async-iterator.js +60 -137
  199. package/lib/util/async-iterator.js.map +1 -1
  200. package/lib/util/cancelable.d.ts +2 -2
  201. package/lib/util/cancelable.js +20 -61
  202. package/lib/util/cancelable.js.map +1 -1
  203. package/lib/util/date-time.d.ts +2 -2
  204. package/lib/util/date-time.js +14 -13
  205. package/lib/util/date-time.js.map +1 -1
  206. package/lib/util/debug-app.d.ts +25 -0
  207. package/lib/util/debug-app.d.ts.map +1 -0
  208. package/lib/util/debug-app.js +100 -0
  209. package/lib/util/debug-app.js.map +1 -0
  210. package/lib/util/deep-partial.d.ts +2 -2
  211. package/lib/util/deep-partial.js +2 -2
  212. package/lib/util/deferred.d.ts +2 -2
  213. package/lib/util/deferred.js +13 -14
  214. package/lib/util/deferred.js.map +1 -1
  215. package/lib/util/disposable.d.ts +2 -2
  216. package/lib/util/disposable.d.ts.map +1 -1
  217. package/lib/util/disposable.js +28 -40
  218. package/lib/util/disposable.js.map +1 -1
  219. package/lib/util/event.d.ts +1 -1
  220. package/lib/util/event.d.ts.map +1 -1
  221. package/lib/util/event.js +64 -77
  222. package/lib/util/event.js.map +1 -1
  223. package/lib/util/garbage-collected-cache.d.ts +3 -2
  224. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  225. package/lib/util/garbage-collected-cache.js +35 -49
  226. package/lib/util/garbage-collected-cache.js.map +1 -1
  227. package/lib/util/generate-workspace-id.d.ts +9 -0
  228. package/lib/util/generate-workspace-id.d.ts.map +1 -0
  229. package/lib/util/generate-workspace-id.js +491 -0
  230. package/lib/util/generate-workspace-id.js.map +1 -0
  231. package/lib/util/generate-workspace-id.spec.d.ts +7 -0
  232. package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
  233. package/lib/util/generate-workspace-id.spec.js +98 -0
  234. package/lib/util/generate-workspace-id.spec.js.map +1 -0
  235. package/lib/util/gitpod-cookie.d.ts +20 -0
  236. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  237. package/lib/util/gitpod-cookie.js +41 -0
  238. package/lib/util/gitpod-cookie.js.map +1 -0
  239. package/lib/util/gitpod-host-url.d.ts +20 -7
  240. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  241. package/lib/util/gitpod-host-url.js +146 -85
  242. package/lib/util/gitpod-host-url.js.map +1 -1
  243. package/lib/util/gitpod-host-url.spec.d.ts +16 -0
  244. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
  245. package/lib/util/gitpod-host-url.spec.js +134 -0
  246. package/lib/util/gitpod-host-url.spec.js.map +1 -0
  247. package/lib/util/grpc.d.ts +35 -0
  248. package/lib/util/grpc.d.ts.map +1 -0
  249. package/lib/util/grpc.js +90 -0
  250. package/lib/util/grpc.js.map +1 -0
  251. package/lib/util/jaeger-client-types.d.ts +68 -0
  252. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  253. package/lib/util/jaeger-client-types.js +8 -0
  254. package/lib/util/jaeger-client-types.js.map +1 -0
  255. package/lib/util/logging.d.ts +58 -35
  256. package/lib/util/logging.d.ts.map +1 -1
  257. package/lib/util/logging.js +144 -129
  258. package/lib/util/logging.js.map +1 -1
  259. package/lib/util/logging.spec.d.ts +7 -0
  260. package/lib/util/logging.spec.d.ts.map +1 -0
  261. package/lib/util/logging.spec.js +52 -0
  262. package/lib/util/logging.spec.js.map +1 -0
  263. package/lib/util/make-link.d.ts +2 -2
  264. package/lib/util/make-link.js +8 -7
  265. package/lib/util/make-link.js.map +1 -1
  266. package/lib/util/nice-grpc.d.ts +9 -0
  267. package/lib/util/nice-grpc.d.ts.map +1 -0
  268. package/lib/util/nice-grpc.js +121 -0
  269. package/lib/util/nice-grpc.js.map +1 -0
  270. package/lib/util/parse-workspace-id.d.ts +15 -5
  271. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  272. package/lib/util/parse-workspace-id.js +39 -9
  273. package/lib/util/parse-workspace-id.js.map +1 -1
  274. package/lib/util/parse-workspace-id.spec.d.ts +10 -2
  275. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  276. package/lib/util/parse-workspace-id.spec.js +130 -49
  277. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  278. package/lib/util/queue.d.ts +2 -2
  279. package/lib/util/queue.js +19 -57
  280. package/lib/util/queue.js.map +1 -1
  281. package/lib/util/queue.spec.d.ts +2 -2
  282. package/lib/util/queue.spec.js +149 -288
  283. package/lib/util/queue.spec.js.map +1 -1
  284. package/lib/util/repeat.d.ts +15 -0
  285. package/lib/util/repeat.d.ts.map +1 -0
  286. package/lib/util/repeat.js +55 -0
  287. package/lib/util/repeat.js.map +1 -0
  288. package/lib/util/semaphore.d.ts +2 -2
  289. package/lib/util/semaphore.d.ts.map +1 -1
  290. package/lib/util/semaphore.js +18 -48
  291. package/lib/util/semaphore.js.map +1 -1
  292. package/lib/util/skip-if.d.ts +2 -2
  293. package/lib/util/skip-if.d.ts.map +1 -1
  294. package/lib/util/skip-if.js +9 -8
  295. package/lib/util/skip-if.js.map +1 -1
  296. package/lib/util/timeutil.d.ts +4 -2
  297. package/lib/util/timeutil.d.ts.map +1 -1
  298. package/lib/util/timeutil.js +43 -18
  299. package/lib/util/timeutil.js.map +1 -1
  300. package/lib/util/timeutil.spec.d.ts +4 -2
  301. package/lib/util/timeutil.spec.d.ts.map +1 -1
  302. package/lib/util/timeutil.spec.js +57 -25
  303. package/lib/util/timeutil.spec.js.map +1 -1
  304. package/lib/util/tracing.d.ts +54 -8
  305. package/lib/util/tracing.d.ts.map +1 -1
  306. package/lib/util/tracing.js +200 -66
  307. package/lib/util/tracing.js.map +1 -1
  308. package/lib/util/tracing.spec.d.ts +7 -0
  309. package/lib/util/tracing.spec.d.ts.map +1 -0
  310. package/lib/util/tracing.spec.js +121 -0
  311. package/lib/util/tracing.spec.js.map +1 -0
  312. package/lib/util/workspace-port-authentication.d.ts +9 -9
  313. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  314. package/lib/util/workspace-port-authentication.js +13 -14
  315. package/lib/util/workspace-port-authentication.js.map +1 -1
  316. package/lib/webhook-event.d.ts +44 -0
  317. package/lib/webhook-event.d.ts.map +1 -0
  318. package/lib/webhook-event.js +8 -0
  319. package/lib/webhook-event.js.map +1 -0
  320. package/lib/workspace-class.d.ts +14 -0
  321. package/lib/workspace-class.d.ts.map +1 -0
  322. package/lib/workspace-class.js +8 -0
  323. package/lib/workspace-class.js.map +1 -0
  324. package/lib/workspace-cluster.d.ts +75 -0
  325. package/lib/workspace-cluster.d.ts.map +1 -0
  326. package/lib/workspace-cluster.js +31 -0
  327. package/lib/workspace-cluster.js.map +1 -0
  328. package/lib/workspace-instance.d.ts +51 -8
  329. package/lib/workspace-instance.d.ts.map +1 -1
  330. package/lib/workspace-instance.js +2 -2
  331. package/lib/wsready.d.ts +8 -2
  332. package/lib/wsready.d.ts.map +1 -1
  333. package/lib/wsready.js +4 -3
  334. package/lib/wsready.js.map +1 -1
  335. package/package.json +42 -18
  336. package/pkg-yarn.lock +24 -10
  337. package/provenance-bundle.jsonl +2 -0
  338. package/src/accounting-protocol.ts +244 -0
  339. package/src/admin-protocol.ts +96 -21
  340. package/src/analytics.ts +52 -0
  341. package/src/attribution.ts +63 -0
  342. package/src/auth.ts +27 -0
  343. package/src/billing-mode.ts +84 -0
  344. package/src/blocked-repositories-protocol.ts +13 -0
  345. package/src/context-url.spec.ts +49 -0
  346. package/src/context-url.ts +107 -0
  347. package/src/encryption/container-module.ts +4 -5
  348. package/src/encryption/encryption-engine.spec.ts +11 -10
  349. package/src/encryption/encryption-engine.ts +22 -18
  350. package/src/encryption/encryption-service.ts +6 -7
  351. package/src/encryption/key-provider.ts +18 -21
  352. package/src/env.ts +3 -26
  353. package/src/experiments/always-default.ts +24 -0
  354. package/src/experiments/configcat-server.ts +42 -0
  355. package/src/experiments/configcat.ts +56 -0
  356. package/src/experiments/types.ts +34 -0
  357. package/src/frontend-dashboard-service.ts +125 -0
  358. package/src/gitpod-file-parser.spec.ts +57 -63
  359. package/src/gitpod-file-parser.ts +18 -19
  360. package/src/gitpod-service.ts +534 -99
  361. package/src/headless-workspace-log.ts +14 -16
  362. package/src/ide-frontend-service.ts +28 -0
  363. package/src/ide-protocol.ts +147 -0
  364. package/src/index.ts +18 -12
  365. package/src/installation-admin-protocol.ts +45 -0
  366. package/src/license-protocol.ts +14 -8
  367. package/src/messaging/browser/connection.ts +202 -26
  368. package/src/messaging/browser/window-connection.ts +45 -29
  369. package/src/messaging/client-call-metrics.ts +94 -0
  370. package/src/messaging/error.ts +47 -10
  371. package/src/messaging/handler.ts +13 -1
  372. package/src/messaging/node/connection.ts +23 -70
  373. package/src/messaging/proxy-factory.ts +35 -34
  374. package/src/oss-allowlist.ts +15 -0
  375. package/src/payment-protocol.ts +20 -0
  376. package/src/permission.ts +53 -40
  377. package/src/plans.ts +683 -0
  378. package/src/protocol.spec.ts +97 -0
  379. package/src/protocol.ts +706 -299
  380. package/src/snapshot-url.spec.ts +27 -0
  381. package/src/snapshot-url.ts +27 -0
  382. package/src/team-subscription-protocol.ts +150 -0
  383. package/src/teams-projects-protocol.ts +177 -0
  384. package/src/typings/globals.ts +7 -5
  385. package/src/usage.ts +85 -0
  386. package/src/util/analytics.ts +109 -0
  387. package/src/util/async-iterator.ts +6 -7
  388. package/src/util/cancelable.ts +5 -5
  389. package/src/util/date-time.ts +10 -10
  390. package/src/util/debug-app.ts +81 -0
  391. package/src/util/deep-partial.ts +2 -2
  392. package/src/util/deferred.ts +8 -8
  393. package/src/util/disposable.ts +3 -6
  394. package/src/util/event.ts +9 -11
  395. package/src/util/garbage-collected-cache.ts +18 -10
  396. package/src/util/generate-workspace-id.spec.ts +58 -0
  397. package/src/util/generate-workspace-id.ts +481 -0
  398. package/src/util/gitpod-cookie.ts +38 -0
  399. package/src/util/gitpod-host-url.spec.ts +76 -0
  400. package/src/util/gitpod-host-url.ts +121 -38
  401. package/src/util/grpc.ts +107 -0
  402. package/src/util/jaeger-client-types.ts +102 -0
  403. package/src/util/logging.spec.ts +23 -0
  404. package/src/util/logging.ts +163 -73
  405. package/src/util/make-link.ts +8 -9
  406. package/src/util/nice-grpc.ts +96 -0
  407. package/src/util/parse-workspace-id.spec.ts +62 -12
  408. package/src/util/parse-workspace-id.ts +40 -10
  409. package/src/util/queue.spec.ts +30 -28
  410. package/src/util/queue.ts +2 -2
  411. package/src/util/repeat.ts +45 -0
  412. package/src/util/semaphore.ts +8 -10
  413. package/src/util/skip-if.ts +12 -9
  414. package/src/util/timeutil.spec.ts +42 -16
  415. package/src/util/timeutil.ts +33 -17
  416. package/src/util/tracing.spec.ts +88 -0
  417. package/src/util/tracing.ts +202 -33
  418. package/src/util/workspace-port-authentication.ts +12 -15
  419. package/src/webhook-event.ts +55 -0
  420. package/src/workspace-class.ts +14 -0
  421. package/src/workspace-cluster.ts +110 -0
  422. package/src/workspace-instance.ts +119 -35
  423. package/src/wsready.ts +11 -4
  424. package/data/builtin-theia-plugins.json +0 -362
  425. package/lib/email-protocol.d.ts +0 -49
  426. package/lib/email-protocol.d.ts.map +0 -1
  427. package/lib/email-protocol.js +0 -27
  428. package/lib/email-protocol.js.map +0 -1
  429. package/lib/messaging/connection-error-handler.d.ts +0 -27
  430. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  431. package/lib/messaging/connection-error-handler.js +0 -45
  432. package/lib/messaging/connection-error-handler.js.map +0 -1
  433. package/lib/theia-plugins.d.ts +0 -11
  434. package/lib/theia-plugins.d.ts.map +0 -1
  435. package/lib/theia-plugins.js +0 -8
  436. package/lib/theia-plugins.js.map +0 -1
  437. package/lib/util/repeater.d.ts +0 -22
  438. package/lib/util/repeater.d.ts.map +0 -1
  439. package/lib/util/repeater.js +0 -117
  440. package/lib/util/repeater.js.map +0 -1
  441. package/lib/util/safe-promise.d.ts +0 -11
  442. package/lib/util/safe-promise.d.ts.map +0 -1
  443. package/lib/util/safe-promise.js +0 -33
  444. package/lib/util/safe-promise.js.map +0 -1
  445. package/lib/util/without.d.ts +0 -7
  446. package/lib/util/without.d.ts.map +0 -1
  447. package/lib/util/without.js +0 -8
  448. package/lib/util/without.js.map +0 -1
  449. package/src/email-protocol.ts +0 -67
  450. package/src/messaging/connection-error-handler.ts +0 -62
  451. package/src/theia-plugins.ts +0 -11
  452. package/src/util/jaeger-client.d.ts +0 -105
  453. package/src/util/repeater.ts +0 -49
  454. package/src/util/safe-promise.ts +0 -26
  455. package/src/util/without.ts +0 -8
@@ -1,167 +1,319 @@
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
- * See License-AGPL.txt in the project root for license information.
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");
34
- exports.GitpodServer = Symbol('GitpodServer');
35
- exports.WorkspaceTimeoutValues = ["30m", "60m", "180m"];
36
- exports.createServiceMock = function (methods) {
37
- return new GitpodServiceImpl(exports.createServerMock(methods));
17
+ exports.createGitpodService = exports.GitpodServiceImpl = exports.WorkspaceInstanceUpdateListener = exports.GitpodCompositeClient = exports.GitpodServerProxy = exports.GitpodServerPath = exports.createServerMock = exports.createServiceMock = exports.WORKSPACE_TIMEOUT_EXTENDED = exports.WORKSPACE_TIMEOUT_DEFAULT_LONG = exports.WORKSPACE_TIMEOUT_DEFAULT_SHORT = exports.WorkspaceTimeoutDuration = 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
+ var WorkspaceTimeoutDuration;
24
+ (function (WorkspaceTimeoutDuration) {
25
+ function validate(duration) {
26
+ const unit = duration.slice(-1);
27
+ if (!["m", "h", "d"].includes(unit)) {
28
+ throw new Error(`Invalid timeout unit: ${unit}`);
29
+ }
30
+ const value = parseInt(duration.slice(0, -1));
31
+ if (isNaN(value) || value <= 0) {
32
+ throw new Error(`Invalid timeout value: ${duration}`);
33
+ }
34
+ return duration;
35
+ }
36
+ WorkspaceTimeoutDuration.validate = validate;
37
+ })(WorkspaceTimeoutDuration = exports.WorkspaceTimeoutDuration || (exports.WorkspaceTimeoutDuration = {}));
38
+ exports.WORKSPACE_TIMEOUT_DEFAULT_SHORT = "30m";
39
+ exports.WORKSPACE_TIMEOUT_DEFAULT_LONG = "60m";
40
+ exports.WORKSPACE_TIMEOUT_EXTENDED = "180m";
41
+ const createServiceMock = function (methods) {
42
+ return new GitpodServiceImpl((0, exports.createServerMock)(methods));
38
43
  };
39
- exports.createServerMock = function (methods) {
40
- methods.setClient = methods.setClient || (function () { });
41
- methods.dispose = methods.dispose || (function () { });
44
+ exports.createServiceMock = createServiceMock;
45
+ const createServerMock = function (methods) {
46
+ methods.setClient = methods.setClient || (() => { });
47
+ methods.dispose = methods.dispose || (() => { });
42
48
  return new Proxy(methods, {
43
- get: function (target, property) {
44
- var result = target[property];
49
+ // @ts-ignore
50
+ get: (target, property) => {
51
+ const result = target[property];
45
52
  if (!result) {
46
- throw new Error("Method " + property + " not implemented");
53
+ throw new Error(`Method ${String(property)} not implemented`);
47
54
  }
48
55
  return result;
49
- }
56
+ },
50
57
  });
51
58
  };
52
- exports.GitpodServerPath = '/gitpod';
53
- exports.GitpodServerProxy = Symbol('GitpodServerProxy');
54
- var GitpodCompositeClient = /** @class */ (function () {
55
- function GitpodCompositeClient() {
59
+ exports.createServerMock = createServerMock;
60
+ exports.GitpodServerPath = "/gitpod";
61
+ exports.GitpodServerProxy = Symbol("GitpodServerProxy");
62
+ class GitpodCompositeClient {
63
+ constructor() {
56
64
  this.clients = [];
57
65
  }
58
- GitpodCompositeClient.prototype.registerClient = function (client) {
59
- var _this = this;
66
+ registerClient(client) {
60
67
  this.clients.push(client);
61
- var index = this.clients.length;
62
68
  return {
63
- dispose: function () {
64
- _this.clients.slice(index, 1);
65
- }
69
+ dispose: () => {
70
+ const index = this.clients.indexOf(client);
71
+ if (index > -1) {
72
+ this.clients.splice(index, 1);
73
+ }
74
+ },
66
75
  };
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
- }
76
+ }
77
+ onInstanceUpdate(instance) {
78
+ for (const client of this.clients) {
79
+ if (client.onInstanceUpdate) {
80
+ try {
81
+ client.onInstanceUpdate(instance);
82
+ }
83
+ catch (error) {
84
+ console.error(error);
80
85
  }
81
86
  }
82
87
  }
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);
88
+ }
89
+ onPrebuildUpdate(update) {
90
+ for (const client of this.clients) {
91
+ if (client.onPrebuildUpdate) {
92
+ try {
93
+ client.onPrebuildUpdate(update);
94
+ }
95
+ catch (error) {
96
+ console.error(error);
97
+ }
87
98
  }
88
- finally { if (e_1) throw e_1.error; }
89
99
  }
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
- }
100
+ }
101
+ onWorkspaceImageBuildLogs(info, content) {
102
+ for (const client of this.clients) {
103
+ if (client.onWorkspaceImageBuildLogs) {
104
+ try {
105
+ client.onWorkspaceImageBuildLogs(info, content);
106
+ }
107
+ catch (error) {
108
+ console.error(error);
103
109
  }
104
110
  }
105
111
  }
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);
112
+ }
113
+ notifyDidOpenConnection() {
114
+ for (const client of this.clients) {
115
+ if (client.notifyDidOpenConnection) {
116
+ try {
117
+ client.notifyDidOpenConnection();
118
+ }
119
+ catch (error) {
120
+ console.error(error);
121
+ }
110
122
  }
111
- finally { if (e_2) throw e_2.error; }
112
123
  }
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
- }
124
+ }
125
+ notifyDidCloseConnection() {
126
+ for (const client of this.clients) {
127
+ if (client.notifyDidCloseConnection) {
128
+ try {
129
+ client.notifyDidCloseConnection();
130
+ }
131
+ catch (error) {
132
+ console.error(error);
126
133
  }
127
134
  }
128
135
  }
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);
136
+ }
137
+ onCreditAlert(creditAlert) {
138
+ for (const client of this.clients) {
139
+ if (client.onCreditAlert) {
140
+ try {
141
+ client.onCreditAlert(creditAlert);
142
+ }
143
+ catch (error) {
144
+ console.error(error);
145
+ }
133
146
  }
134
- finally { if (e_3) throw e_3.error; }
135
147
  }
136
- };
137
- return GitpodCompositeClient;
138
- }());
148
+ }
149
+ onNotificationUpdated() {
150
+ for (const client of this.clients) {
151
+ if (client.onNotificationUpdated) {
152
+ try {
153
+ client.onNotificationUpdated();
154
+ }
155
+ catch (error) {
156
+ console.error(error);
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
139
162
  exports.GitpodCompositeClient = GitpodCompositeClient;
140
- exports.GitpodService = Symbol('GitpodService');
141
- var GitpodServiceImpl = /** @class */ (function () {
142
- function GitpodServiceImpl(server) {
163
+ const hasWindow = typeof window !== "undefined";
164
+ const phasesOrder = {
165
+ unknown: 0,
166
+ preparing: 1,
167
+ building: 2,
168
+ pending: 3,
169
+ creating: 4,
170
+ initializing: 5,
171
+ running: 6,
172
+ interrupted: 7,
173
+ stopping: 8,
174
+ stopped: 9,
175
+ };
176
+ class WorkspaceInstanceUpdateListener {
177
+ constructor(service, _info) {
178
+ this.service = service;
179
+ this._info = _info;
180
+ this.onDidChangeEmitter = new event_1.Emitter();
181
+ this.onDidChange = this.onDidChangeEmitter.event;
182
+ this.source = "sync";
183
+ this.syncQueue = Promise.resolve();
184
+ service.registerClient({
185
+ onInstanceUpdate: (instance) => {
186
+ if (this.isOutOfOrder(instance)) {
187
+ return;
188
+ }
189
+ this.cancelSync();
190
+ this._info.latestInstance = instance;
191
+ this.source = "update";
192
+ this.onDidChangeEmitter.fire(undefined);
193
+ },
194
+ notifyDidOpenConnection: () => {
195
+ this.sync();
196
+ },
197
+ });
198
+ if (hasWindow) {
199
+ // learn about page lifecycle here: https://developers.google.com/web/updates/2018/07/page-lifecycle-api
200
+ window.document.addEventListener("visibilitychange", () => __awaiter(this, void 0, void 0, function* () {
201
+ if (window.document.visibilityState === "visible") {
202
+ this.sync();
203
+ }
204
+ }));
205
+ window.addEventListener("pageshow", (e) => {
206
+ if (e.persisted) {
207
+ this.sync();
208
+ }
209
+ });
210
+ }
211
+ }
212
+ get info() {
213
+ return this._info;
214
+ }
215
+ /**
216
+ * Only one sync can be performed at the same time.
217
+ * Any new sync request or instance update cancels all previously scheduled sync requests.
218
+ */
219
+ sync() {
220
+ this.cancelSync();
221
+ this.syncTokenSource = new vscode_jsonrpc_1.CancellationTokenSource();
222
+ const token = this.syncTokenSource.token;
223
+ this.syncQueue = this.syncQueue.then(() => __awaiter(this, void 0, void 0, function* () {
224
+ if (token.isCancellationRequested) {
225
+ return;
226
+ }
227
+ try {
228
+ const info = yield this.service.server.getWorkspace(this._info.workspace.id);
229
+ if (token.isCancellationRequested) {
230
+ return;
231
+ }
232
+ this._info = info;
233
+ this.source = "sync";
234
+ this.onDidChangeEmitter.fire(undefined);
235
+ }
236
+ catch (e) {
237
+ console.error("failed to sync workspace instance:", e);
238
+ }
239
+ }));
240
+ }
241
+ cancelSync() {
242
+ if (this.syncTokenSource) {
243
+ this.syncTokenSource.cancel();
244
+ this.syncTokenSource = undefined;
245
+ }
246
+ }
247
+ /**
248
+ * If sync seen more recent update then ignore all updates with previous phases.
249
+ * Within the same phase still the race can occur but which should be eventually consistent.
250
+ */
251
+ isOutOfOrder(instance) {
252
+ var _a;
253
+ if (instance.workspaceId !== this._info.workspace.id) {
254
+ return true;
255
+ }
256
+ if (this.source === "update") {
257
+ return false;
258
+ }
259
+ if (instance.id !== ((_a = this.info.latestInstance) === null || _a === void 0 ? void 0 : _a.id)) {
260
+ return false;
261
+ }
262
+ return phasesOrder[instance.status.phase] < phasesOrder[this.info.latestInstance.status.phase];
263
+ }
264
+ }
265
+ exports.WorkspaceInstanceUpdateListener = WorkspaceInstanceUpdateListener;
266
+ class GitpodServiceImpl {
267
+ constructor(server, options) {
143
268
  this.server = server;
269
+ this.options = options;
144
270
  this.compositeClient = new GitpodCompositeClient();
271
+ this.instanceListeners = new Map();
145
272
  server.setClient(this.compositeClient);
273
+ server.onDidOpenConnection(() => this.compositeClient.notifyDidOpenConnection());
274
+ server.onDidCloseConnection(() => this.compositeClient.notifyDidCloseConnection());
146
275
  }
147
- GitpodServiceImpl.prototype.registerClient = function (client) {
276
+ registerClient(client) {
148
277
  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
- }());
278
+ }
279
+ listenToInstance(workspaceId) {
280
+ const listener = this.instanceListeners.get(workspaceId) ||
281
+ (() => __awaiter(this, void 0, void 0, function* () {
282
+ const info = yield this.server.getWorkspace(workspaceId);
283
+ return new WorkspaceInstanceUpdateListener(this, info);
284
+ }))();
285
+ this.instanceListeners.set(workspaceId, listener);
286
+ return listener;
287
+ }
288
+ reconnect() {
289
+ var _a;
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.onReconnect) {
292
+ yield this.options.onReconnect();
293
+ }
294
+ });
295
+ }
296
+ }
157
297
  exports.GitpodServiceImpl = GitpodServiceImpl;
158
298
  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);
299
+ const toWsUrl = (serverUrl) => {
300
+ return new gitpod_host_url_1.GitpodHostUrl(serverUrl).asWebsocket().withApi({ pathname: exports.GitpodServerPath }).toString();
301
+ };
302
+ let url;
303
+ if (typeof serverUrl === "string") {
304
+ url = toWsUrl(serverUrl);
305
+ }
306
+ else {
307
+ url = serverUrl.then((url) => toWsUrl(url));
308
+ }
309
+ const connectionProvider = new connection_1.WebSocketConnectionProvider();
310
+ let onReconnect = () => { };
311
+ const gitpodServer = connectionProvider.createProxy(url, undefined, {
312
+ onListening: (socket) => {
313
+ onReconnect = () => socket.reconnect();
314
+ },
315
+ });
316
+ return new GitpodServiceImpl(gitpodServer, { onReconnect });
165
317
  }
166
318
  exports.createGitpodService = createGitpodService;
167
319
  //# 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,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AA4GtC,QAAA,sBAAsB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC;AAEzD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KAC/C;IAED,MAAM,kBAAkB,GAAG,IAAI,wCAA2B,EAAE,CAAC;IAC7D,IAAI,WAAW,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IAC3B,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAI,GAAG,EAAE,SAAS,EAAE;QACnE,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE;YACpB,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;AArBD,kDAqBC"}
@@ -1,7 +1,7 @@
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
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
  export declare enum HeadlessWorkspaceEventType {
7
7
  LogOutput = "log-output",
@@ -9,26 +9,24 @@ export declare enum HeadlessWorkspaceEventType {
9
9
  FinishedButFailed = "finish-fail",
10
10
  AbortedTimedOut = "aborted-timeout",
11
11
  Aborted = "aborted",
12
+ Failed = "failed",
12
13
  Started = "started"
13
14
  }
14
15
  export declare namespace HeadlessWorkspaceEventType {
15
16
  function isRunning(t: HeadlessWorkspaceEventType): boolean;
16
17
  function didFinish(t: HeadlessWorkspaceEventType): boolean;
17
18
  }
18
- export interface HeadlessLogEvent {
19
+ export interface HeadlessWorkspaceEvent {
19
20
  workspaceID: string;
20
21
  text: string;
21
22
  type: HeadlessWorkspaceEventType;
22
23
  }
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;
24
+ export interface HeadlessLogUrls {
25
+ streams: {
26
+ [streamID: string]: string;
27
+ };
33
28
  }
29
+ /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
30
+ export declare const HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
31
+ export declare const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX: RegExp;
34
32
  //# 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;AAEH,oBAAY,0BAA0B;IAClC,SAAS,eAAe;IACxB,oBAAoB,mBAAmB;IACvC,iBAAiB,gBAAgB;IACjC,eAAe,oBAAoB;IACnC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB;AACD,yBAAiB,0BAA0B,CAAC;IACxC,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAEtD;IACD,SAAgB,SAAS,CAAC,CAAC,EAAE,0BAA0B,WAItD;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
- * See License-AGPL.txt in the project root for license information.
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";
@@ -12,6 +13,7 @@ var HeadlessWorkspaceEventType;
12
13
  HeadlessWorkspaceEventType["FinishedButFailed"] = "finish-fail";
13
14
  HeadlessWorkspaceEventType["AbortedTimedOut"] = "aborted-timeout";
14
15
  HeadlessWorkspaceEventType["Aborted"] = "aborted";
16
+ HeadlessWorkspaceEventType["Failed"] = "failed";
15
17
  HeadlessWorkspaceEventType["Started"] = "started";
16
18
  })(HeadlessWorkspaceEventType = exports.HeadlessWorkspaceEventType || (exports.HeadlessWorkspaceEventType = {}));
17
19
  (function (HeadlessWorkspaceEventType) {
@@ -20,14 +22,11 @@ var HeadlessWorkspaceEventType;
20
22
  }
21
23
  HeadlessWorkspaceEventType.isRunning = isRunning;
22
24
  function didFinish(t) {
23
- return t === HeadlessWorkspaceEventType.FinishedButFailed || t === HeadlessWorkspaceEventType.FinishedSuccessfully;
25
+ return (t === HeadlessWorkspaceEventType.FinishedButFailed || t === HeadlessWorkspaceEventType.FinishedSuccessfully);
24
26
  }
25
27
  HeadlessWorkspaceEventType.didFinish = didFinish;
26
28
  })(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 = {}));
29
+ /** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
30
+ exports.HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
31
+ exports.HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
33
32
  //# 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;;;AAEH,IAAY,0BAQX;AARD,WAAY,0BAA0B;IAClC,sDAAwB,CAAA;IACxB,qEAAuC,CAAA;IACvC,+DAAiC,CAAA;IACjC,iEAAmC,CAAA;IACnC,iDAAmB,CAAA;IACnB,+CAAiB,CAAA;IACjB,iDAAmB,CAAA;AACvB,CAAC,EARW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAQrC;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,CACH,CAAC,KAAK,0BAA0B,CAAC,iBAAiB,IAAI,CAAC,KAAK,0BAA0B,CAAC,oBAAoB,CAC9G,CAAC;IACN,CAAC;IAJe,oCAAS,YAIxB,CAAA;AACL,CAAC,EATgB,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAS1C;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"}