@gitpod/gitpod-protocol 0.1.5-update-ovsx.0 → 0.1.5-update-yarnlock.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 (455) hide show
  1. package/data/gitpod-schema.json +159 -25
  2. package/lib/accounting-protocol.d.ts +165 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -0
  4. package/lib/accounting-protocol.js +120 -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 +25 -0
  15. package/lib/attribution.d.ts.map +1 -0
  16. package/lib/attribution.js +58 -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 +99 -0
  79. package/lib/frontend-dashboard-service.d.ts.map +1 -0
  80. package/lib/frontend-dashboard-service.js +55 -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 +290 -50
  90. package/lib/gitpod-service.d.ts.map +1 -1
  91. package/lib/gitpod-service.js +288 -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 +18 -4
  130. package/lib/messaging/error.d.ts.map +1 -1
  131. package/lib/messaging/error.js +38 -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 +213 -0
  158. package/lib/plans.d.ts.map +1 -0
  159. package/lib/plans.js +625 -0
  160. package/lib/plans.js.map +1 -0
  161. package/lib/protocol.d.ts +338 -111
  162. package/lib/protocol.d.ts.map +1 -1
  163. package/lib/protocol.js +422 -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 +93 -0
  178. package/lib/team-subscription-protocol.d.ts.map +1 -0
  179. package/lib/team-subscription-protocol.js +82 -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 +41 -0
  184. package/lib/teams-projects-protocol.js.map +1 -0
  185. package/lib/typings/globals.d.ts +8 -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 -8
  240. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  241. package/lib/util/gitpod-host-url.js +143 -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 +55 -8
  305. package/lib/util/tracing.d.ts.map +1 -1
  306. package/lib/util/tracing.js +210 -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 +80 -0
  325. package/lib/workspace-cluster.d.ts.map +1 -0
  326. package/lib/workspace-cluster.js +36 -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 +253 -0
  339. package/src/admin-protocol.ts +96 -21
  340. package/src/analytics.ts +52 -0
  341. package/src/attribution.ts +67 -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 +148 -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 +602 -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 +51 -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 +699 -0
  378. package/src/protocol.spec.ts +97 -0
  379. package/src/protocol.ts +790 -302
  380. package/src/snapshot-url.spec.ts +27 -0
  381. package/src/snapshot-url.ts +27 -0
  382. package/src/team-subscription-protocol.ts +153 -0
  383. package/src/teams-projects-protocol.ts +180 -0
  384. package/src/typings/globals.ts +13 -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 +119 -40
  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 +211 -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 +121 -0
  422. package/src/workspace-instance.ts +120 -36
  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,8 +1,8 @@
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
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8
8
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -11,55 +11,201 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- var opentracing = require("opentracing");
15
- var jaeger_client_1 = require("jaeger-client");
16
- var opentracing_1 = require("opentracing");
17
- var inversify_1 = require("inversify");
14
+ exports.PerOperationSampler = exports.TracingManager = exports.TraceContext = void 0;
15
+ const opentracing = require("opentracing");
16
+ const jaeger_client_1 = require("jaeger-client");
17
+ const opentracing_1 = require("opentracing");
18
+ const inversify_1 = require("inversify");
19
+ const logging_1 = require("./logging");
18
20
  var TraceContext;
19
21
  (function (TraceContext) {
20
- function startSpan(operation, ctx) {
21
- var options = {
22
- childOf: ctx.span
23
- };
22
+ function startSpan(operation, parentCtx) {
23
+ var _a;
24
+ const options = {};
25
+ // references should contain span id.
26
+ // cf. https://github.com/jaegertracing/jaeger-client-node/issues/432
27
+ if (!!(parentCtx === null || parentCtx === void 0 ? void 0 : parentCtx.span)) {
28
+ const ctx = (_a = parentCtx === null || parentCtx === void 0 ? void 0 : parentCtx.span) === null || _a === void 0 ? void 0 : _a.context();
29
+ if (ctx && !!ctx.toTraceId() && !!ctx.toSpanId()) {
30
+ options.references = [opentracing.followsFrom(ctx)];
31
+ }
32
+ }
24
33
  return opentracing.globalTracer().startSpan(operation, options);
25
34
  }
26
35
  TraceContext.startSpan = startSpan;
27
- function startAsyncSpan(operation, ctx) {
28
- var options = {};
29
- if (!!ctx.span) {
30
- options.references = [opentracing.followsFrom(ctx.span.context())];
36
+ function childContext(operation, parentCtx) {
37
+ const span = startSpan(operation, parentCtx);
38
+ return { span };
39
+ }
40
+ TraceContext.childContext = childContext;
41
+ function withSpan(operation, callback, ctx) {
42
+ // if we don't have a parent span, don't create a trace here as those <trace-without-root-spans> are not useful.
43
+ if (!ctx || !ctx.span || !ctx.span.context()) {
44
+ callback({});
45
+ return;
46
+ }
47
+ const span = TraceContext.startSpan(operation, ctx);
48
+ try {
49
+ callback({ span });
50
+ }
51
+ catch (e) {
52
+ TraceContext.setError({ span }, e);
53
+ throw e;
54
+ }
55
+ finally {
56
+ span.finish();
31
57
  }
32
- return opentracing.globalTracer().startSpan(operation, options);
33
58
  }
34
- TraceContext.startAsyncSpan = startAsyncSpan;
35
- function logError(ctx, err) {
59
+ TraceContext.withSpan = withSpan;
60
+ function setError(ctx, err) {
36
61
  if (!ctx.span) {
37
62
  return;
38
63
  }
39
- ctx.span.log({
40
- "error": err.message,
41
- "stacktrace": err.stack
64
+ TraceContext.addNestedTags(ctx, {
65
+ error: {
66
+ message: err.message,
67
+ stacktrace: err.stack,
68
+ },
42
69
  });
43
70
  ctx.span.setTag("error", true);
44
71
  }
45
- TraceContext.logError = logError;
72
+ TraceContext.setError = setError;
73
+ function setJsonRPCMetadata(ctx, method) {
74
+ if (!ctx.span) {
75
+ return;
76
+ }
77
+ const tags = {
78
+ rpc: {
79
+ system: "jsonrpc",
80
+ // version,
81
+ },
82
+ };
83
+ if (method) {
84
+ tags.rpc.method = method;
85
+ }
86
+ addNestedTags(ctx, tags);
87
+ }
88
+ TraceContext.setJsonRPCMetadata = setJsonRPCMetadata;
89
+ function setJsonRPCError(ctx, method, err, withStatusCode = false) {
90
+ if (!ctx.span) {
91
+ return;
92
+ }
93
+ // not use setError bc this is (most likely) a working operation
94
+ setJsonRPCMetadata(ctx, method);
95
+ // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md#json-rpc
96
+ addNestedTags(ctx, {
97
+ rpc: {
98
+ jsonrpc: {
99
+ error_code: err.code,
100
+ error_message: err.message,
101
+ },
102
+ },
103
+ });
104
+ // the field "status_code" is used by honeycomb to derive insights like success rate, etc. Defaults to "0".
105
+ if (withStatusCode) {
106
+ ctx.span.setTag("status_code", err.code);
107
+ }
108
+ }
109
+ TraceContext.setJsonRPCError = setJsonRPCError;
110
+ function addJsonRPCParameters(ctx, params) {
111
+ if (!ctx.span) {
112
+ return;
113
+ }
114
+ setJsonRPCMetadata(ctx);
115
+ addNestedTags(ctx, {
116
+ rpc: {
117
+ jsonrpc: {
118
+ parameters: params,
119
+ },
120
+ },
121
+ });
122
+ }
123
+ TraceContext.addJsonRPCParameters = addJsonRPCParameters;
124
+ /**
125
+ * Does what one would expect from `span.addTags`: Calls `span.addTag` for all keys in map, recursively for objects.
126
+ * Example:
127
+ * ```
128
+ * TraceContext.addNestedTags(ctx, {
129
+ * rpc: {
130
+ * system: "jsonrpc",
131
+ * jsonrpc: {
132
+ * version: "1.0",
133
+ * method: "test",
134
+ * parameters: ["abc", "def"],
135
+ * },
136
+ * },
137
+ * });
138
+ * ```
139
+ * gives
140
+ * rpc.system = "jsonrpc"
141
+ * rpc.jsonrpc.version = "1.0"
142
+ * rpc.jsonrpc.method = "test"
143
+ * rpc.jsonrpc.parameters.0 = "abc"
144
+ * rpc.jsonrpc.parameters.1 = "def"
145
+ * @param ctx
146
+ * @param keyValueMap
147
+ * @returns
148
+ */
149
+ function addNestedTags(ctx, keyValueMap, _namespace) {
150
+ if (!ctx.span) {
151
+ return;
152
+ }
153
+ const namespace = _namespace ? `${_namespace}.` : "";
154
+ try {
155
+ for (const k of Object.keys(keyValueMap)) {
156
+ const v = keyValueMap[k];
157
+ if (v instanceof Object) {
158
+ addNestedTags(ctx, v, `${namespace}${k}`);
159
+ }
160
+ else {
161
+ ctx.span.setTag(`${namespace}${k}`, v);
162
+ }
163
+ }
164
+ }
165
+ catch (err) {
166
+ // general resilience against odd shapes/parameters
167
+ logging_1.log.error("Tracing.addNestedTags", err, { namespace });
168
+ }
169
+ }
170
+ TraceContext.addNestedTags = addNestedTags;
171
+ function setOWI(ctx, owi) {
172
+ if (!ctx.span) {
173
+ return;
174
+ }
175
+ addNestedTags(ctx, {
176
+ context: owi,
177
+ });
178
+ }
179
+ TraceContext.setOWI = setOWI;
180
+ function finishOnce(span) {
181
+ let done = false;
182
+ return () => {
183
+ if (done)
184
+ return;
185
+ span.finish();
186
+ done = true;
187
+ };
188
+ }
189
+ TraceContext.finishOnce = finishOnce;
46
190
  })(TraceContext = exports.TraceContext || (exports.TraceContext = {}));
47
- var TracingManager = /** @class */ (function () {
48
- function TracingManager() {
49
- }
50
- TracingManager.prototype.setup = function (serviceName, opts) {
51
- opentracing_1.initGlobalTracer(this.getTracerForService(serviceName, opts));
52
- };
53
- TracingManager.prototype.getTracerForService = function (serviceName, opts) {
54
- var config = {
191
+ let TracingManager = class TracingManager {
192
+ setup(serviceName, opts) {
193
+ (0, opentracing_1.initGlobalTracer)(this.getTracerForService(serviceName, opts));
194
+ }
195
+ getTracerForService(serviceName, opts) {
196
+ const config = {
55
197
  disable: false,
56
198
  reporter: {
57
- logSpans: false
199
+ logSpans: false,
58
200
  },
59
- serviceName: serviceName
201
+ serviceName,
60
202
  };
61
- var t = jaeger_client_1.initTracerFromEnv(config, {
62
- logger: console
203
+ const t = (0, jaeger_client_1.initTracerFromEnv)(config, {
204
+ logger: console,
205
+ tags: {
206
+ "service.build.commit": process.env.GITPOD_BUILD_GIT_COMMIT,
207
+ "service.build.version": process.env.GITPOD_BUILD_VERSION,
208
+ },
63
209
  });
64
210
  if (opts) {
65
211
  if (opts.perOpSampling) {
@@ -67,26 +213,25 @@ var TracingManager = /** @class */ (function () {
67
213
  }
68
214
  }
69
215
  return t;
70
- };
71
- TracingManager = __decorate([
72
- inversify_1.injectable()
73
- ], TracingManager);
74
- return TracingManager;
75
- }());
216
+ }
217
+ };
218
+ TracingManager = __decorate([
219
+ (0, inversify_1.injectable)()
220
+ ], TracingManager);
76
221
  exports.TracingManager = TracingManager;
77
- var PerOperationSampler = /** @class */ (function () {
78
- function PerOperationSampler(fallback, strategies) {
222
+ class PerOperationSampler {
223
+ constructor(fallback, strategies) {
79
224
  this.fallback = fallback;
80
225
  this.strategies = strategies;
81
226
  }
82
- PerOperationSampler.prototype.name = function () {
83
- return 'PerOperationSampler';
84
- };
85
- PerOperationSampler.prototype.toString = function () {
86
- return "" + this.name();
87
- };
88
- PerOperationSampler.prototype.isSampled = function (operation, tags) {
89
- var shouldSample = this.strategies[operation];
227
+ name() {
228
+ return "PerOperationSampler";
229
+ }
230
+ toString() {
231
+ return `${this.name()}`;
232
+ }
233
+ isSampled(operation, tags) {
234
+ let shouldSample = this.strategies[operation];
90
235
  if (shouldSample === undefined) {
91
236
  if (!this.fallback.isSampled) {
92
237
  return false;
@@ -94,31 +239,30 @@ var PerOperationSampler = /** @class */ (function () {
94
239
  return this.fallback.isSampled(operation, tags);
95
240
  }
96
241
  return shouldSample;
97
- };
98
- PerOperationSampler.prototype.onCreateSpan = function (span) {
99
- var outTags = {};
100
- var isSampled = this.isSampled(span.operationName, outTags);
242
+ }
243
+ onCreateSpan(span) {
244
+ const outTags = {};
245
+ const isSampled = this.isSampled(span.operationName, outTags);
101
246
  // NB: return retryable=true here since we can change decision after setOperationName().
102
247
  return { sample: isSampled, retryable: true, tags: outTags };
103
- };
104
- PerOperationSampler.prototype.onSetOperationName = function (span, operationName) {
105
- var outTags = {};
106
- var isSampled = this.isSampled(span.operationName, outTags);
248
+ }
249
+ onSetOperationName(span, operationName) {
250
+ const outTags = {};
251
+ const isSampled = this.isSampled(span.operationName, outTags);
107
252
  return { sample: isSampled, retryable: false, tags: outTags };
108
- };
109
- PerOperationSampler.prototype.onSetTag = function (span, key, value) {
253
+ }
254
+ onSetTag(span, key, value) {
110
255
  return { sample: false, retryable: true, tags: null };
111
- };
112
- PerOperationSampler.prototype.equal = function (other) {
256
+ }
257
+ equal(other) {
113
258
  return false; // TODO equal should be removed
114
- };
115
- PerOperationSampler.prototype.close = function (callback) {
259
+ }
260
+ close(callback) {
116
261
  // all nested samplers are of simple types, so we do not need to Close them
117
262
  if (callback) {
118
263
  callback();
119
264
  }
120
- };
121
- return PerOperationSampler;
122
- }());
265
+ }
266
+ }
123
267
  exports.PerOperationSampler = PerOperationSampler;
124
268
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/util/tracing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;AAGH,yCAA2C;AAC3C,+CAA4F;AAC5F,2CAA+C;AAC/C,uCAAuC;AAMvC,IAAiB,YAAY,CA2B5B;AA3BD,WAAiB,YAAY;IACzB,SAAgB,SAAS,CAAC,SAAiB,EAAE,GAAiB;QAC1D,IAAM,OAAO,GAA4B;YACrC,OAAO,EAAE,GAAG,CAAC,IAAI;SACpB,CAAA;QACD,OAAO,WAAW,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IALe,sBAAS,YAKxB,CAAA;IAED,SAAgB,cAAc,CAAC,SAAiB,EAAE,GAAiB;QAC/D,IAAM,OAAO,GAA4B,EAAE,CAAC;QAC5C,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE;YACZ,OAAO,CAAC,UAAU,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;SACtE;QACD,OAAO,WAAW,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,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the GNU Affero General Public License (AGPL).
4
+ * See License.AGPL.txt in the project root for license information.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=tracing.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.spec.d.ts","sourceRoot":"","sources":["../../src/util/tracing.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2021 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
+ 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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const mocha_typescript_1 = require("mocha-typescript");
27
+ const chai = require("chai");
28
+ const tracing_1 = require("./tracing");
29
+ const opentracing_1 = require("opentracing");
30
+ const expect = chai.expect;
31
+ let TestTracing = class TestTracing {
32
+ testTracingContext_addNestedTags() {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const tracer = new opentracing_1.MockTracer();
35
+ const span = tracer.startSpan("testTracingContext_addNestedTags");
36
+ tracing_1.TraceContext.addNestedTags({ span }, {
37
+ rpc: {
38
+ system: "jsonrpc",
39
+ jsonrpc: {
40
+ version: "1.0",
41
+ method: "test",
42
+ parameters: ["abc", "def"],
43
+ },
44
+ },
45
+ });
46
+ const mockSpan = tracer.report().spans[0];
47
+ expect(mockSpan.tags()).to.deep.equal({
48
+ "rpc.system": "jsonrpc",
49
+ "rpc.jsonrpc.version": "1.0",
50
+ "rpc.jsonrpc.method": "test",
51
+ "rpc.jsonrpc.parameters.0": "abc",
52
+ "rpc.jsonrpc.parameters.1": "def",
53
+ });
54
+ });
55
+ }
56
+ testTracingContext_addNestedTags_null() {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const tracer = new opentracing_1.MockTracer();
59
+ const span = tracer.startSpan("testTracingContext_addNestedTags_null");
60
+ tracing_1.TraceContext.addNestedTags({ span }, {
61
+ someShape: {
62
+ thisIsNull: null,
63
+ thisIsUndefined: undefined,
64
+ },
65
+ });
66
+ const mockSpan = tracer.report().spans[0];
67
+ expect(mockSpan.tags()).to.deep.equal({
68
+ "someShape.thisIsNull": null,
69
+ "someShape.thisIsUndefined": undefined,
70
+ });
71
+ });
72
+ }
73
+ testTracingContext_addJsonRPCParameters() {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const tracer = new opentracing_1.MockTracer();
76
+ const span = tracer.startSpan("testTracingContext_addJsonRPCParameters");
77
+ const ctx = { span };
78
+ tracing_1.TraceContext.addJsonRPCParameters(ctx, {
79
+ one: "one",
80
+ two: {
81
+ name: "two",
82
+ some: "shape",
83
+ containing: "PII",
84
+ },
85
+ three: "three",
86
+ });
87
+ const mockSpan = tracer.report().spans[0];
88
+ expect(mockSpan.tags()).to.deep.equal({
89
+ "rpc.jsonrpc.parameters.one": "one",
90
+ "rpc.jsonrpc.parameters.two.containing": "PII",
91
+ "rpc.jsonrpc.parameters.two.name": "two",
92
+ "rpc.jsonrpc.parameters.two.some": "shape",
93
+ "rpc.jsonrpc.parameters.three": "three",
94
+ "rpc.system": "jsonrpc",
95
+ });
96
+ });
97
+ }
98
+ };
99
+ __decorate([
100
+ mocha_typescript_1.test,
101
+ __metadata("design:type", Function),
102
+ __metadata("design:paramtypes", []),
103
+ __metadata("design:returntype", Promise)
104
+ ], TestTracing.prototype, "testTracingContext_addNestedTags", null);
105
+ __decorate([
106
+ mocha_typescript_1.test,
107
+ __metadata("design:type", Function),
108
+ __metadata("design:paramtypes", []),
109
+ __metadata("design:returntype", Promise)
110
+ ], TestTracing.prototype, "testTracingContext_addNestedTags_null", null);
111
+ __decorate([
112
+ mocha_typescript_1.test,
113
+ __metadata("design:type", Function),
114
+ __metadata("design:paramtypes", []),
115
+ __metadata("design:returntype", Promise)
116
+ ], TestTracing.prototype, "testTracingContext_addJsonRPCParameters", null);
117
+ TestTracing = __decorate([
118
+ mocha_typescript_1.suite
119
+ ], TestTracing);
120
+ module.exports = new TestTracing();
121
+ //# sourceMappingURL=tracing.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.spec.js","sourceRoot":"","sources":["../../src/util/tracing.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;AAEH,uDAA+C;AAC/C,6BAA6B;AAC7B,uCAAyC;AACzC,6CAAyC;AAEzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAG3B,IAAM,WAAW,GAAjB,MAAM,WAAW;IACM,gCAAgC;;YAC/C,MAAM,MAAM,GAAG,IAAI,wBAAU,EAAE,CAAC;YAChC,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,kCAAkC,CAAC,CAAC;YAClE,sBAAY,CAAC,aAAa,C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AAC,yCAAyC,CAAC,CAAC;YACzE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC;YACrB,sBAAY,CAAC,oBAAoB,CAAC,GAAG,EAAE;gBACnC,GAAG,EAAE,KAAK;gBACV,GAAG,EAAE;oBACD,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,OAAO;oBACb,UAAU,EAAE,KAAK;iBACpB;gBACD,KAAK,EAAE,OAAO;aACjB,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;gBAClC,4BAA4B,EAAE,KAAK;gBACnC,uCAAuC,EAAE,KAAK;gBAC9C,iCAAiC,EAAE,KAAK;gBACxC,iCAAiC,EAAE,OAAO;gBAC1C,8BAA8B,EAAE,OAAO;gBACvC,YAAY,EAAE,SAAS;aAC1B,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAA;AAvES;IAAL,uBAAI;;;;mEAyBJ;AAEK;IAAL,uBAAI;;;;wEAkBJ;AAEK;IAAL,uBAAI;;;;0EAuBJ;AAvEC,WAAW;IADhB,wBAAK;GACA,WAAW,CAwEhB;AACD,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC"}
@@ -1,15 +1,15 @@
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
  /**
7
- * These cookies are set in the Theia frontend. This pattern is relied upon in:
8
- * - proxy:
9
- * - to filter it out on port locations
10
- * - to forward it to the server for authentication
11
- * - server:
12
- * - to authenticate access to port locations
13
- */
7
+ * These cookies are set in the Theia frontend. This pattern is relied upon in:
8
+ * - proxy:
9
+ * - to filter it out on port locations
10
+ * - to forward it to the server for authentication
11
+ * - server:
12
+ * - to authenticate access to port locations
13
+ */
14
14
  export declare const worspacePortAuthCookieName: (host: string, workspaceId: string) => string;
15
15
  //# sourceMappingURL=workspace-port-authentication.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-port-authentication.d.ts","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;EAOE;AACF,eAAO,MAAM,0BAA0B,+CAKtC,CAAC"}
1
+ {"version":3,"file":"workspace-port-authentication.d.ts","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,SAAmB,MAAM,eAAe,MAAM,KAAG,MAEvF,CAAC"}
@@ -1,22 +1,21 @@
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.worspacePortAuthCookieName = void 0;
8
9
  /**
9
- * These cookies are set in the Theia frontend. This pattern is relied upon in:
10
- * - proxy:
11
- * - to filter it out on port locations
12
- * - to forward it to the server for authentication
13
- * - server:
14
- * - to authenticate access to port locations
15
- */
16
- exports.worspacePortAuthCookieName = function (host, workspaceId) {
17
- return host
18
- .replace(/https?/, '')
19
- .replace(/[\W_]+/g, "_")
20
- + ("_ws_" + workspaceId + "_port_auth_");
10
+ * These cookies are set in the Theia frontend. This pattern is relied upon in:
11
+ * - proxy:
12
+ * - to filter it out on port locations
13
+ * - to forward it to the server for authentication
14
+ * - server:
15
+ * - to authenticate access to port locations
16
+ */
17
+ const worspacePortAuthCookieName = function (host, workspaceId) {
18
+ return host.replace(/https?/, "").replace(/[\W_]+/g, "_") + `_ws_${workspaceId}_port_auth_`;
21
19
  };
20
+ exports.worspacePortAuthCookieName = worspacePortAuthCookieName;
22
21
  //# sourceMappingURL=workspace-port-authentication.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-port-authentication.js","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH;;;;;;;EAOE;AACW,QAAA,0BAA0B,GAAG,UAAS,IAAY,EAAE,WAAmB;IAChF,OAAO,IAAI;SACN,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;WACtB,SAAO,WAAW,gBAAa,CAAA,CAAC;AAC1C,CAAC,CAAC"}
1
+ {"version":3,"file":"workspace-port-authentication.js","sourceRoot":"","sources":["../../src/util/workspace-port-authentication.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;;;GAOG;AACI,MAAM,0BAA0B,GAAG,UAAU,IAAY,EAAE,WAAmB;IACjF,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,OAAO,WAAW,aAAa,CAAC;AAChG,CAAC,CAAC;AAFW,QAAA,0BAA0B,8BAErC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) 2022 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
+ export interface WebhookEvent {
7
+ id: string;
8
+ creationTime: string;
9
+ type: "push" | string;
10
+ /**
11
+ * Typically the webhook installer is referenced here.
12
+ */
13
+ authorizedUserId?: string;
14
+ /**
15
+ * webhook event's payload
16
+ */
17
+ rawEvent: string;
18
+ /**
19
+ * The general status of the received webhook event.
20
+ */
21
+ status: WebhookEvent.Status;
22
+ /**
23
+ * Optional message to help understand errors with handling events.
24
+ */
25
+ message?: string;
26
+ /**
27
+ * If the webhook event is considered to trigger a prebuild, the `prebuildStatus`
28
+ * contains a more specific status.
29
+ */
30
+ prebuildStatus?: WebhookEvent.PrebuildStatus;
31
+ /**
32
+ * If `prebuildStatus` is `prebuild_triggered` this points to a prebuild.
33
+ */
34
+ prebuildId?: string;
35
+ projectId?: string;
36
+ cloneUrl?: string;
37
+ branch?: string;
38
+ commit?: string;
39
+ }
40
+ export declare namespace WebhookEvent {
41
+ type Status = "received" | "dismissed_unauthorized" | "ignored" | "processed";
42
+ type PrebuildStatus = "ignored_unconfigured" | "prebuild_trigger_failed" | "prebuild_triggered";
43
+ }
44
+ //# sourceMappingURL=webhook-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-event.d.ts","sourceRoot":"","sources":["../src/webhook-event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,cAAc,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC;IAE7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,YAAY,CAAC;IAC1B,KAAY,MAAM,GAAG,UAAU,GAAG,wBAAwB,GAAG,SAAS,GAAG,WAAW,CAAC;IACrF,KAAY,cAAc,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,oBAAoB,CAAC;CAC1G"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2022 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=webhook-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-event.js","sourceRoot":"","sources":["../src/webhook-event.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) 2022 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
+ export interface SupportedWorkspaceClass {
7
+ id: string;
8
+ category: string;
9
+ displayName: string;
10
+ description: string;
11
+ powerups: number;
12
+ isDefault: boolean;
13
+ }
14
+ //# sourceMappingURL=workspace-class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-class.d.ts","sourceRoot":"","sources":["../src/workspace-class.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACtB"}