@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
package/lib/protocol.d.ts CHANGED
@@ -1,10 +1,11 @@
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
  import { WorkspaceInstance, PortVisibility } from "./workspace-instance";
7
7
  import { RoleOrPermission } from "./permission";
8
+ import { Project } from "./teams-projects-protocol";
8
9
  export interface UserInfo {
9
10
  name?: string;
10
11
  }
@@ -18,16 +19,11 @@ export interface User {
18
19
  /** Optional for backwards compatibility */
19
20
  fullName?: string;
20
21
  identities: Identity[];
21
- allowsMarketingCommunication: boolean;
22
22
  /**
23
23
  * Whether the user has been blocked to use our service, because of TOS violation for example.
24
24
  * Optional for backwards compatibility.
25
25
  */
26
26
  blocked?: boolean;
27
- /**
28
- * whether this user can run workspaces in privileged mode
29
- */
30
- privileged?: boolean;
31
27
  /** A map of random settings that alter the behaviour of Gitpod on a per-user basis */
32
28
  featureFlags?: UserFeatureSettings;
33
29
  /** The permissions and/or roles the user has */
@@ -35,19 +31,76 @@ export interface User {
35
31
  /** Whether the user is logical deleted. This flag is respected by all queries in UserDB */
36
32
  markedDeleted?: boolean;
37
33
  additionalData?: AdditionalUserData;
34
+ usageAttributionId?: string;
35
+ lastVerificationTime?: string;
36
+ verificationPhoneNumber?: string;
38
37
  }
39
38
  export declare namespace User {
40
39
  function is(data: any): data is User;
41
40
  function getIdentity(user: User, authProviderId: string): Identity | undefined;
42
- function getPrimaryEmail(user: User): string;
41
+ function censor(user: User): User;
42
+ /**
43
+ * Returns the stored email or if it doesn't exist returns the primaryEmail of the first identity this user signed up with.
44
+ * @param user
45
+ * @returns A primaryEmail, or undefined if there is none.
46
+ */
47
+ function getPrimaryEmail(user: User): string | undefined;
43
48
  function getName(user: User): string | undefined;
49
+ function hasPreferredIde(user: User): boolean;
50
+ function isOnboardingUser(user: User): boolean;
51
+ function migrationIDESettings(user: User): void;
52
+ function getProfile(user: User): Profile;
53
+ function setProfile(user: User, profile: Profile): User;
54
+ interface Profile {
55
+ name: string;
56
+ email: string;
57
+ company?: string;
58
+ avatarURL?: string;
59
+ }
60
+ namespace Profile {
61
+ function hasChanges(before: Profile, after: Profile): boolean;
62
+ }
44
63
  }
45
64
  export interface AdditionalUserData {
46
65
  platforms?: UserPlatform[];
47
66
  emailNotificationSettings?: EmailNotificationSettings;
67
+ featurePreview?: boolean;
68
+ ideSettings?: IDESettings;
69
+ whatsNewSeen?: {
70
+ [key: string]: string;
71
+ };
72
+ oauthClientsApproved?: {
73
+ [key: string]: string;
74
+ };
75
+ knownGitHubOrgs?: string[];
76
+ dotfileRepo?: string;
77
+ workspaceClasses?: WorkspaceClasses;
78
+ profile?: ProfileDetails;
79
+ isMigratedToTeamOnlyAttribution?: boolean;
80
+ }
81
+ export declare namespace AdditionalUserData {
82
+ function set(user: User, partialData: Partial<AdditionalUserData>): User;
83
+ }
84
+ export interface ProfileDetails {
85
+ lastUpdatedDetailsNudge?: string;
86
+ companyName?: string;
87
+ emailAddress?: string;
48
88
  }
49
89
  export interface EmailNotificationSettings {
50
- disallowTransactionalEmails?: boolean;
90
+ allowsChangelogMail?: boolean;
91
+ allowsDevXMail?: boolean;
92
+ allowsOnboardingMail?: boolean;
93
+ }
94
+ export declare type IDESettings = {
95
+ settingVersion?: string;
96
+ defaultIde?: string;
97
+ useDesktopIde?: boolean;
98
+ defaultDesktopIde?: string;
99
+ useLatestVersion?: boolean;
100
+ };
101
+ export interface WorkspaceClasses {
102
+ regular?: string;
103
+ prebuild?: string;
51
104
  }
52
105
  export interface UserPlatform {
53
106
  uid: string;
@@ -66,44 +119,80 @@ export interface UserPlatform {
66
119
  browserExtensionUninstalledSince?: string;
67
120
  }
68
121
  export interface UserFeatureSettings {
69
- /**
70
- * This field is used as marker to grant users a free trial for using private repositories,
71
- * independent of any subscription or Chargebee.
72
- * - it is set when the user uses their first private repo
73
- * - whether the trial is expired or not is juged by the UserService
74
- */
75
- privateRepoTrialStartDate?: string;
76
122
  /**
77
123
  * Permanent feature flags are added to each and every workspace instance
78
124
  * this user starts.
79
125
  */
80
126
  permanentWSFeatureFlags?: NamedWorkspaceFeatureFlag[];
81
127
  }
128
+ export declare type BillingTier = "paid" | "free";
82
129
  /**
83
130
  * The values of this type MUST MATCH enum values in WorkspaceFeatureFlag from ws-manager/client/core_pb.d.ts
84
131
  * If they don't we'll break things during workspace startup.
85
132
  */
86
133
  export declare const WorkspaceFeatureFlags: {
87
- "privileged": undefined;
88
- "registry_facade": undefined;
89
- "full_workspace_backup": undefined;
90
- "fixed_resources": undefined;
134
+ full_workspace_backup: undefined;
135
+ workspace_class_limiting: undefined;
136
+ workspace_connection_limiting: undefined;
137
+ workspace_psi: undefined;
91
138
  };
92
- export declare type NamedWorkspaceFeatureFlag = keyof (typeof WorkspaceFeatureFlags);
93
- export interface UserEnvVarValue {
94
- id?: string;
139
+ export declare type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags;
140
+ export declare namespace NamedWorkspaceFeatureFlag {
141
+ const WORKSPACE_PERSISTED_FEATTURE_FLAGS: NamedWorkspaceFeatureFlag[];
142
+ function isWorkspacePersisted(ff: NamedWorkspaceFeatureFlag): boolean;
143
+ }
144
+ export interface EnvVarWithValue {
95
145
  name: string;
96
- repositoryPattern: string;
97
146
  value: string;
98
147
  }
148
+ export interface ProjectEnvVarWithValue extends EnvVarWithValue {
149
+ id: string;
150
+ projectId: string;
151
+ censored: boolean;
152
+ }
153
+ export declare type ProjectEnvVar = Omit<ProjectEnvVarWithValue, "value">;
154
+ export interface UserEnvVarValue extends EnvVarWithValue {
155
+ id?: string;
156
+ repositoryPattern: string;
157
+ }
99
158
  export interface UserEnvVar extends UserEnvVarValue {
100
159
  id: string;
101
160
  userId: string;
102
161
  deleted?: boolean;
103
162
  }
104
163
  export declare namespace UserEnvVar {
164
+ /**
165
+ * @param variable
166
+ * @returns Either a string containing an error message or undefined.
167
+ */
168
+ function validate(variable: UserEnvVarValue): string | undefined;
105
169
  function normalizeRepoPattern(pattern: string): string;
170
+ function score(value: UserEnvVarValue): number;
106
171
  function filter<T extends UserEnvVarValue>(vars: T[], owner: string, repo: string): T[];
172
+ function splitRepositoryPattern(repositoryPattern: string): string[];
173
+ }
174
+ export interface SSHPublicKeyValue {
175
+ name: string;
176
+ key: string;
177
+ }
178
+ export interface UserSSHPublicKey extends SSHPublicKeyValue {
179
+ id: string;
180
+ key: string;
181
+ userId: string;
182
+ fingerprint: string;
183
+ creationTime: string;
184
+ lastUsedTime?: string;
185
+ }
186
+ export declare type UserSSHPublicKeyValue = Omit<UserSSHPublicKey, "userId">;
187
+ export declare namespace SSHPublicKeyValue {
188
+ function validate(value: SSHPublicKeyValue): string | undefined;
189
+ function getData(value: SSHPublicKeyValue): {
190
+ type: string;
191
+ key: string;
192
+ email: string | undefined;
193
+ };
194
+ function getFingerprint(value: SSHPublicKeyValue): string;
195
+ const MAXIMUM_KEY_LENGTH = 5;
107
196
  }
108
197
  export interface GitpodToken {
109
198
  /** Hash value (SHA256) of the token (primary key). */
@@ -196,25 +285,25 @@ export interface PendingGithubEvent {
196
285
  creationDate: Date;
197
286
  type: string;
198
287
  event: string;
288
+ deleted: boolean;
199
289
  }
200
290
  export interface Snapshot {
201
291
  id: string;
202
292
  creationTime: string;
293
+ availableTime?: string;
203
294
  originalWorkspaceId: string;
204
295
  bucketId: string;
205
- layoutData?: string;
206
- }
207
- export interface LayoutData {
208
- workspaceId: string;
209
- lastUpdatedTime: string;
210
- layoutData: string;
296
+ state: SnapshotState;
297
+ message?: string;
211
298
  }
299
+ export declare type SnapshotState = "pending" | "available" | "error";
212
300
  export interface Workspace {
213
301
  id: string;
214
302
  creationTime: string;
215
303
  contextURL: string;
216
304
  description: string;
217
305
  ownerId: string;
306
+ projectId?: string;
218
307
  context: WorkspaceContext;
219
308
  config: WorkspaceConfig;
220
309
  /**
@@ -255,7 +344,7 @@ export interface Workspace {
255
344
  basedOnSnapshotId?: string;
256
345
  }
257
346
  export declare type WorkspaceSoftDeletion = "user" | "gc";
258
- export declare type WorkspaceType = "regular" | "prebuild" | "probe";
347
+ export declare type WorkspaceType = "regular" | "prebuild";
259
348
  export declare namespace Workspace {
260
349
  function getFullRepositoryName(ws: Workspace): string | undefined;
261
350
  function getFullRepositoryUrl(ws: Workspace): string | undefined;
@@ -264,53 +353,77 @@ export declare namespace Workspace {
264
353
  function getBranchName(ws: Workspace): string | undefined;
265
354
  function getCommit(ws: Workspace): string | undefined;
266
355
  }
267
- export interface PreparePluginUploadParams {
268
- fullPluginName: string;
356
+ export interface GuessGitTokenScopesParams {
357
+ host: string;
358
+ repoUrl: string;
359
+ gitCommand: string;
360
+ currentToken: GitToken;
361
+ }
362
+ export interface GitToken {
363
+ token: string;
364
+ user: string;
365
+ scopes: string[];
269
366
  }
270
- export interface ResolvePluginsParams {
271
- config?: WorkspaceConfig;
272
- builtins?: ResolvedPlugins;
367
+ export interface GuessedGitTokenScopes {
368
+ message?: string;
369
+ scopes?: string[];
370
+ }
371
+ export interface VSCodeConfig {
372
+ extensions?: string[];
273
373
  }
274
- export interface InstallPluginsParams {
275
- pluginIds: string[];
374
+ export interface JetBrainsConfig {
375
+ intellij?: JetBrainsProductConfig;
376
+ goland?: JetBrainsProductConfig;
377
+ pycharm?: JetBrainsProductConfig;
378
+ phpstorm?: JetBrainsProductConfig;
379
+ rubymine?: JetBrainsProductConfig;
380
+ webstorm?: JetBrainsProductConfig;
381
+ rider?: JetBrainsProductConfig;
382
+ clion?: JetBrainsProductConfig;
276
383
  }
277
- export interface UninstallPluginParams {
278
- pluginId: string;
384
+ export interface JetBrainsProductConfig {
385
+ prebuilds?: JetBrainsPrebuilds;
386
+ vmoptions?: string;
279
387
  }
280
- export declare type ResolvedPluginKind = 'user' | 'workspace' | 'builtin';
281
- export interface ResolvedPlugins {
282
- [pluginId: string]: ResolvedPlugin | undefined;
388
+ export interface JetBrainsPrebuilds {
389
+ version?: "stable" | "latest" | "both";
283
390
  }
284
- export interface ResolvedPlugin {
285
- fullPluginName: string;
391
+ export interface RepositoryCloneInformation {
286
392
  url: string;
287
- kind: ResolvedPluginKind;
393
+ checkoutLocation?: string;
288
394
  }
289
- export interface VSCodeConfig {
290
- extensions?: string[];
395
+ export interface CoreDumpConfig {
396
+ enabled?: boolean;
397
+ softLimit?: number;
398
+ hardLimit?: number;
291
399
  }
292
400
  export interface WorkspaceConfig {
401
+ mainConfiguration?: string;
402
+ additionalRepositories?: RepositoryCloneInformation[];
293
403
  image?: ImageConfig;
294
404
  ports?: PortConfig[];
295
405
  tasks?: TaskConfig[];
296
406
  checkoutLocation?: string;
297
407
  workspaceLocation?: string;
298
- privileged?: boolean;
299
408
  gitConfig?: {
300
409
  [config: string]: string;
301
410
  };
302
411
  github?: GithubAppConfig;
303
412
  vscode?: VSCodeConfig;
304
- ide?: 'theia' | 'code' | string;
413
+ jetbrains?: JetBrainsConfig;
414
+ coreDump?: CoreDumpConfig;
415
+ /** deprecated. Enabled by default **/
416
+ experimentalNetwork?: boolean;
305
417
  /**
306
418
  * Where the config object originates from.
307
419
  *
308
420
  * repo - from the repository
309
421
  * definitly-gp - from github.com/gitpod-io/definitely-gp
310
422
  * derived - computed based on analyzing the repository
423
+ * additional-content - config comes from additional content, usually provided through the project's configuration
311
424
  * default - our static catch-all default config
312
425
  */
313
- _origin?: 'repo' | 'definitely-gp' | 'derived' | 'default';
426
+ _origin?: "repo" | "definitely-gp" | "derived" | "additional-content" | "default";
314
427
  /**
315
428
  * Set of automatically infered feature flags. That's not something the user can set, but
316
429
  * that is set by gitpod at workspace creation time.
@@ -322,10 +435,11 @@ export interface GithubAppConfig {
322
435
  }
323
436
  export interface GithubAppPrebuildConfig {
324
437
  master?: boolean;
438
+ defaultBranch?: boolean;
325
439
  branches?: boolean;
326
440
  pullRequests?: boolean;
327
441
  pullRequestsFromForks?: boolean;
328
- addCheck?: boolean;
442
+ addCheck?: boolean | "prevent-merge-on-error";
329
443
  addBadge?: boolean;
330
444
  addLabel?: boolean | string;
331
445
  addComment?: boolean;
@@ -335,9 +449,9 @@ export declare namespace GithubAppPrebuildConfig {
335
449
  }
336
450
  export declare type WorkspaceImageSource = WorkspaceImageSourceDocker | WorkspaceImageSourceReference;
337
451
  export interface WorkspaceImageSourceDocker {
338
- dockerFileHash: string;
339
- dockerFileSource: Commit;
340
452
  dockerFilePath: string;
453
+ dockerFileHash: string;
454
+ dockerFileSource?: Commit;
341
455
  }
342
456
  export declare namespace WorkspaceImageSourceDocker {
343
457
  function is(obj: object): obj is WorkspaceImageSourceDocker;
@@ -349,18 +463,22 @@ export interface WorkspaceImageSourceReference {
349
463
  export declare namespace WorkspaceImageSourceReference {
350
464
  function is(obj: object): obj is WorkspaceImageSourceReference;
351
465
  }
352
- export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available";
466
+ export declare type PrebuiltWorkspaceState = "queued" | "building" | "aborted" | "timeout" | "available" | "failed";
353
467
  export interface PrebuiltWorkspace {
354
468
  id: string;
355
469
  cloneURL: string;
470
+ branch?: string;
471
+ projectId?: string;
356
472
  commit: string;
357
473
  buildWorkspaceId: string;
358
474
  creationTime: string;
359
475
  state: PrebuiltWorkspaceState;
476
+ statusVersion: number;
360
477
  error?: string;
361
478
  snapshot?: string;
362
479
  }
363
480
  export declare namespace PrebuiltWorkspace {
481
+ function isDone(pws: PrebuiltWorkspace): boolean;
364
482
  function isAvailable(pws: PrebuiltWorkspace): boolean;
365
483
  function buildDidSucceed(pws: PrebuiltWorkspace): boolean;
366
484
  }
@@ -371,6 +489,10 @@ export interface PrebuiltWorkspaceUpdatable {
371
489
  repo: string;
372
490
  isResolved: boolean;
373
491
  installationId: string;
492
+ /**
493
+ * the commitSHA of the commit that triggered the prebuild
494
+ */
495
+ commitSHA?: string;
374
496
  issue?: string;
375
497
  contextUrl?: string;
376
498
  }
@@ -380,11 +502,13 @@ export interface WhitelistedRepository {
380
502
  description?: string;
381
503
  avatar?: string;
382
504
  }
383
- export declare type PortOnOpen = 'open-browser' | 'open-preview' | 'notify' | 'ignore';
505
+ export declare type PortOnOpen = "open-browser" | "open-preview" | "notify" | "ignore";
384
506
  export interface PortConfig {
385
507
  port: number;
386
508
  onOpen?: PortOnOpen;
387
509
  visibility?: PortVisibility;
510
+ description?: string;
511
+ name?: string;
388
512
  }
389
513
  export declare namespace PortConfig {
390
514
  function is(config: any): config is PortConfig;
@@ -403,16 +527,16 @@ export interface TaskConfig {
403
527
  prebuild?: string;
404
528
  command?: string;
405
529
  env?: {
406
- [env: string]: string;
530
+ [env: string]: any;
407
531
  };
408
- openIn?: 'bottom' | 'main' | 'left' | 'right';
409
- openMode?: 'split-top' | 'split-left' | 'split-right' | 'split-bottom' | 'tab-before' | 'tab-after';
532
+ openIn?: "bottom" | "main" | "left" | "right";
533
+ openMode?: "split-top" | "split-left" | "split-right" | "split-bottom" | "tab-before" | "tab-after";
410
534
  }
411
535
  export declare namespace TaskConfig {
412
536
  function is(config: any): config is TaskConfig;
413
537
  }
414
538
  export declare namespace WorkspaceImageBuild {
415
- type Phase = 'BaseImage' | 'GitpodLayer' | 'Error' | 'Done';
539
+ type Phase = "BaseImage" | "GitpodLayer" | "Error" | "Done";
416
540
  interface StateInfo {
417
541
  phase: Phase;
418
542
  currentStep?: number;
@@ -449,8 +573,11 @@ export declare namespace ExternalImageConfigFile {
449
573
  }
450
574
  export interface WorkspaceContext {
451
575
  title: string;
576
+ ref?: string;
577
+ /** This contains the URL portion of the contextURL (which might contain other modifiers as well). It's optional because it's not set for older workspaces. */
452
578
  normalizedContextURL?: string;
453
579
  forceCreateNewWorkspace?: boolean;
580
+ forceImageBuild?: boolean;
454
581
  }
455
582
  export declare namespace WorkspaceContext {
456
583
  function is(context: any): context is WorkspaceContext;
@@ -461,22 +588,41 @@ export interface WithSnapshot {
461
588
  export declare namespace WithSnapshot {
462
589
  function is(context: any): context is WithSnapshot;
463
590
  }
464
- export interface WithPrebuild {
465
- snapshotBucketId: string;
591
+ export interface WithPrebuild extends WithSnapshot {
466
592
  prebuildWorkspaceId: string;
467
593
  wasPrebuilt: true;
468
594
  }
469
595
  export declare namespace WithPrebuild {
470
596
  function is(context: any): context is WithPrebuild;
471
597
  }
598
+ /**
599
+ * WithDefaultConfig contexts disable the download of the gitpod.yml from the repository
600
+ * and fall back to the built-in configuration.
601
+ */
602
+ export interface WithDefaultConfig {
603
+ withDefaultConfig: true;
604
+ }
605
+ export declare namespace WithDefaultConfig {
606
+ function is(context: any): context is WithDefaultConfig;
607
+ function mark(ctx: WorkspaceContext): WorkspaceContext & WithDefaultConfig;
608
+ }
472
609
  export interface SnapshotContext extends WorkspaceContext, WithSnapshot {
473
610
  snapshotId: string;
474
611
  }
475
612
  export declare namespace SnapshotContext {
476
613
  function is(context: any): context is SnapshotContext;
477
614
  }
478
- export interface StartPrebuildContext extends WorkspaceContext {
615
+ export interface WithCommitHistory {
616
+ commitHistory?: string[];
617
+ additionalRepositoryCommitHistories?: {
618
+ cloneUrl: string;
619
+ commitHistory: string[];
620
+ }[];
621
+ }
622
+ export interface StartPrebuildContext extends WorkspaceContext, WithCommitHistory {
479
623
  actual: WorkspaceContext;
624
+ project: Project;
625
+ branch?: string;
480
626
  }
481
627
  export declare namespace StartPrebuildContext {
482
628
  function is(context: any): context is StartPrebuildContext;
@@ -489,19 +635,19 @@ export interface PrebuiltWorkspaceContext extends WorkspaceContext {
489
635
  export declare namespace PrebuiltWorkspaceContext {
490
636
  function is(context: any): context is PrebuiltWorkspaceContext;
491
637
  }
638
+ export interface WithReferrerContext extends WorkspaceContext {
639
+ referrer: string;
640
+ referrerIde?: string;
641
+ }
642
+ export declare namespace WithReferrerContext {
643
+ function is(context: any): context is WithReferrerContext;
644
+ }
492
645
  export interface WithEnvvarsContext extends WorkspaceContext {
493
- envvars: UserEnvVarValue[];
646
+ envvars: EnvVarWithValue[];
494
647
  }
495
648
  export declare namespace WithEnvvarsContext {
496
649
  function is(context: any): context is WithEnvvarsContext;
497
650
  }
498
- export interface WorkspaceProbeContext extends WorkspaceContext {
499
- responseURL: string;
500
- responseToken: string;
501
- }
502
- export declare namespace WorkspaceProbeContext {
503
- function is(context: any): context is WorkspaceProbeContext;
504
- }
505
651
  export declare type RefType = "branch" | "tag" | "revision";
506
652
  export declare namespace RefType {
507
653
  const getRefType: (commit: Commit) => RefType;
@@ -512,9 +658,45 @@ export interface Commit {
512
658
  ref?: string;
513
659
  refType?: RefType;
514
660
  }
515
- export interface CommitContext extends WorkspaceContext, Commit {
661
+ export interface AdditionalContentContext extends WorkspaceContext {
662
+ /**
663
+ * utf-8 encoded contents that will be copied on top of the workspace's filesystem
664
+ */
665
+ additionalFiles: {
666
+ [filePath: string]: string;
667
+ };
668
+ }
669
+ export declare namespace AdditionalContentContext {
670
+ function is(ctx: any): ctx is AdditionalContentContext;
671
+ function hasDockerConfig(ctx: any, config: WorkspaceConfig): boolean;
672
+ }
673
+ export interface OpenPrebuildContext extends WorkspaceContext {
674
+ openPrebuildID: string;
675
+ }
676
+ export declare namespace OpenPrebuildContext {
677
+ function is(ctx: any): ctx is OpenPrebuildContext;
678
+ }
679
+ export interface CommitContext extends WorkspaceContext, GitCheckoutInfo {
516
680
  /** @deprecated Moved to .repository.cloneUrl, left here for backwards-compatibility for old workspace contextes in the DB */
517
681
  cloneUrl?: string;
682
+ /**
683
+ * The clone and checkout information for additional repositories in case of multi-repo projects.
684
+ */
685
+ additionalRepositoryCheckoutInfo?: GitCheckoutInfo[];
686
+ }
687
+ export declare namespace CommitContext {
688
+ /**
689
+ * Creates a hash for all the commits of the CommitContext and all sub-repo commit infos.
690
+ * The hash is max 255 chars long.
691
+ * @param commitContext
692
+ * @returns hash for commitcontext
693
+ */
694
+ function computeHash(commitContext: CommitContext): string;
695
+ }
696
+ export interface GitCheckoutInfo extends Commit {
697
+ checkoutLocation?: string;
698
+ upstreamRemoteURI?: string;
699
+ localBranch?: string;
518
700
  }
519
701
  export declare namespace CommitContext {
520
702
  function is(commit: any): commit is CommitContext;
@@ -550,6 +732,7 @@ export interface Repository {
550
732
  owner: string;
551
733
  name: string;
552
734
  cloneUrl: string;
735
+ repoKind?: string;
553
736
  description?: string;
554
737
  avatarUrl?: string;
555
738
  webUrl?: string;
@@ -560,6 +743,18 @@ export interface Repository {
560
743
  parent: Repository;
561
744
  };
562
745
  }
746
+ export interface Branch {
747
+ name: string;
748
+ commit: CommitInfo;
749
+ htmlUrl: string;
750
+ }
751
+ export interface CommitInfo {
752
+ author: string;
753
+ sha: string;
754
+ commitMessage: string;
755
+ authorAvatarUrl?: string;
756
+ authorDate?: string;
757
+ }
563
758
  export declare namespace Repository {
564
759
  function fullRepoName(repo: Repository): string;
565
760
  }
@@ -576,6 +771,9 @@ export interface WorkspaceInfo {
576
771
  workspace: Workspace;
577
772
  latestInstance?: WorkspaceInstance;
578
773
  }
774
+ export declare namespace WorkspaceInfo {
775
+ function lastActiveISODate(info: WorkspaceInfo): string;
776
+ }
579
777
  export declare type RunningWorkspaceInfo = WorkspaceInfo & {
580
778
  latestInstance: WorkspaceInstance;
581
779
  };
@@ -586,18 +784,13 @@ export interface WorkspaceCreationResult {
586
784
  runningWorkspacePrebuild?: {
587
785
  prebuildID: string;
588
786
  workspaceID: string;
787
+ instanceID: string;
589
788
  starting: RunningWorkspacePrebuildStarting;
590
789
  sameCluster: boolean;
591
790
  };
592
791
  runningPrebuildWorkspaceID?: string;
593
792
  }
594
- export declare type RunningWorkspacePrebuildStarting = 'queued' | 'starting' | 'running';
595
- export declare enum CreateWorkspaceMode {
596
- Default = "default",
597
- ForceNew = "force-new",
598
- UsePrebuild = "use-prebuild",
599
- SelectIfRunning = "select-if-running"
600
- }
793
+ export declare type RunningWorkspacePrebuildStarting = "queued" | "starting" | "running";
601
794
  export declare namespace WorkspaceCreationResult {
602
795
  function is(data: any): data is WorkspaceCreationResult;
603
796
  }
@@ -638,6 +831,8 @@ export interface AuthProviderEntry {
638
831
  readonly ownerId: string;
639
832
  readonly status: AuthProviderEntry.Status;
640
833
  readonly oauth: OAuth2Config;
834
+ /** A random string that is to change whenever oauth changes (enforced on DB level) */
835
+ readonly oauthRevision?: string;
641
836
  }
642
837
  export interface OAuth2Config {
643
838
  readonly clientId: string;
@@ -656,40 +851,12 @@ export interface OAuth2Config {
656
851
  export declare namespace AuthProviderEntry {
657
852
  type Type = "GitHub" | "GitLab" | string;
658
853
  type Status = "pending" | "verified";
659
- type NewEntry = Pick<AuthProviderEntry, "ownerId" | "host" | "type">;
660
- type UpdateEntry = Pick<AuthProviderEntry, "id" | "ownerId"> & Pick<OAuth2Config, "clientId" | "clientSecret">;
661
- }
662
- export interface Branding {
663
- readonly name: string;
664
- readonly favicon?: string;
665
- /** Either including domain OR absolute path (interpreted relative to host URL) */
666
- readonly logo: string;
667
- readonly startupLogo: string;
668
- readonly showProductivityTips: boolean;
669
- readonly redirectUrlIfNotAuthenticated?: string;
670
- readonly redirectUrlAfterLogout?: string;
671
- readonly homepage: string;
672
- readonly ide?: {
673
- readonly logo: string;
674
- readonly showReleaseNotes: boolean;
675
- readonly helpMenu: Branding.Link[];
854
+ type NewEntry = Pick<AuthProviderEntry, "ownerId" | "host" | "type"> & {
855
+ clientId?: string;
856
+ clientSecret?: string;
676
857
  };
677
- readonly links: {
678
- readonly header: Branding.Link[];
679
- readonly footer: Branding.Link[];
680
- readonly social: Branding.SocialLink[];
681
- readonly legal: Branding.Link[];
682
- };
683
- }
684
- export declare namespace Branding {
685
- interface Link {
686
- readonly name: string;
687
- readonly url: string;
688
- }
689
- interface SocialLink {
690
- readonly type: string;
691
- readonly url: string;
692
- }
858
+ type UpdateEntry = Pick<AuthProviderEntry, "id" | "ownerId"> & Pick<OAuth2Config, "clientId" | "clientSecret">;
859
+ function redact(entry: AuthProviderEntry): AuthProviderEntry;
693
860
  }
694
861
  export interface Configuration {
695
862
  readonly daysBeforeGarbageCollection: number;
@@ -715,4 +882,25 @@ export declare namespace TheiaPlugin {
715
882
  CheckinFailed = "checkin-failed"
716
883
  }
717
884
  }
885
+ export interface TermsAcceptanceEntry {
886
+ readonly userId: string;
887
+ readonly termsRevision: string;
888
+ readonly acceptionTime: string;
889
+ }
890
+ export interface Terms {
891
+ readonly revision: string;
892
+ readonly activeSince: string;
893
+ readonly adminOnlyTerms: boolean;
894
+ readonly updateMessage: string;
895
+ readonly content: string;
896
+ readonly formElements?: object;
897
+ }
898
+ export interface StripeConfig {
899
+ individualUsagePriceIds: {
900
+ [currency: string]: string;
901
+ };
902
+ teamUsagePriceIds: {
903
+ [currency: string]: string;
904
+ };
905
+ }
718
906
  //# sourceMappingURL=protocol.d.ts.map