@gitpod/gitpod-protocol 0.1.5-wth-test.80 → 0.1.5-wv-add-image-builds-to-dashboard.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 (408) hide show
  1. package/data/gitpod-schema.json +132 -5
  2. package/lib/accounting-protocol.d.ts +19 -11
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +35 -33
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +19 -2
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +1 -1
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +1 -1
  11. package/lib/analytics.d.ts.map +1 -1
  12. package/lib/analytics.js +1 -1
  13. package/lib/analytics.js.map +1 -1
  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 +1 -1
  19. package/lib/auth.d.ts.map +1 -1
  20. package/lib/auth.js +1 -1
  21. package/lib/billing-mode.d.ts +45 -0
  22. package/lib/billing-mode.d.ts.map +1 -0
  23. package/lib/billing-mode.js +44 -0
  24. package/lib/billing-mode.js.map +1 -0
  25. package/lib/blocked-repositories-protocol.d.ts +13 -0
  26. package/lib/blocked-repositories-protocol.d.ts.map +1 -0
  27. package/lib/blocked-repositories-protocol.js +8 -0
  28. package/lib/blocked-repositories-protocol.js.map +1 -0
  29. package/lib/context-url.d.ts +1 -2
  30. package/lib/context-url.d.ts.map +1 -1
  31. package/lib/context-url.js +5 -7
  32. package/lib/context-url.js.map +1 -1
  33. package/lib/context-url.spec.d.ts +1 -3
  34. package/lib/context-url.spec.d.ts.map +1 -1
  35. package/lib/context-url.spec.js +13 -26
  36. package/lib/context-url.spec.js.map +1 -1
  37. package/lib/encryption/container-module.d.ts +1 -1
  38. package/lib/encryption/container-module.d.ts.map +1 -1
  39. package/lib/encryption/container-module.js +2 -2
  40. package/lib/encryption/container-module.js.map +1 -1
  41. package/lib/encryption/encryption-engine.d.ts +1 -1
  42. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  43. package/lib/encryption/encryption-engine.js +10 -10
  44. package/lib/encryption/encryption-engine.js.map +1 -1
  45. package/lib/encryption/encryption-engine.spec.d.ts +1 -1
  46. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  47. package/lib/encryption/encryption-engine.spec.js +3 -4
  48. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  49. package/lib/encryption/encryption-service.d.ts +1 -1
  50. package/lib/encryption/encryption-service.d.ts.map +1 -1
  51. package/lib/encryption/encryption-service.js +2 -2
  52. package/lib/encryption/encryption-service.js.map +1 -1
  53. package/lib/encryption/key-provider.d.ts +1 -1
  54. package/lib/encryption/key-provider.d.ts.map +1 -1
  55. package/lib/encryption/key-provider.js +8 -10
  56. package/lib/encryption/key-provider.js.map +1 -1
  57. package/lib/env.d.ts +1 -6
  58. package/lib/env.d.ts.map +1 -1
  59. package/lib/env.js +2 -21
  60. package/lib/env.js.map +1 -1
  61. package/lib/experiments/always-default.d.ts +8 -0
  62. package/lib/experiments/always-default.d.ts.map +1 -0
  63. package/lib/experiments/always-default.js +20 -0
  64. package/lib/experiments/always-default.js.map +1 -0
  65. package/lib/experiments/configcat-server.d.ts +10 -0
  66. package/lib/experiments/configcat-server.d.ts.map +1 -0
  67. package/lib/experiments/configcat-server.js +37 -0
  68. package/lib/experiments/configcat-server.js.map +1 -0
  69. package/lib/experiments/configcat.d.ts +21 -0
  70. package/lib/experiments/configcat.d.ts.map +1 -0
  71. package/lib/experiments/configcat.js +51 -0
  72. package/lib/experiments/configcat.js.map +1 -0
  73. package/lib/experiments/types.d.ts +22 -0
  74. package/lib/experiments/types.d.ts.map +1 -0
  75. package/lib/experiments/types.js +10 -0
  76. package/lib/experiments/types.js.map +1 -0
  77. package/lib/gitpod-file-parser.d.ts +1 -1
  78. package/lib/gitpod-file-parser.d.ts.map +1 -1
  79. package/lib/gitpod-file-parser.js +7 -7
  80. package/lib/gitpod-file-parser.js.map +1 -1
  81. package/lib/gitpod-file-parser.spec.d.ts +1 -1
  82. package/lib/gitpod-file-parser.spec.js +43 -40
  83. package/lib/gitpod-file-parser.spec.js.map +1 -1
  84. package/lib/gitpod-service.d.ts +70 -52
  85. package/lib/gitpod-service.d.ts.map +1 -1
  86. package/lib/gitpod-service.js +53 -34
  87. package/lib/gitpod-service.js.map +1 -1
  88. package/lib/headless-workspace-log.d.ts +2 -1
  89. package/lib/headless-workspace-log.d.ts.map +1 -1
  90. package/lib/headless-workspace-log.js +3 -2
  91. package/lib/headless-workspace-log.js.map +1 -1
  92. package/lib/ide-frontend-service.d.ts +2 -2
  93. package/lib/ide-frontend-service.js +1 -1
  94. package/lib/ide-protocol.d.ts +29 -8
  95. package/lib/ide-protocol.d.ts.map +1 -1
  96. package/lib/ide-protocol.js +11 -1
  97. package/lib/ide-protocol.js.map +1 -1
  98. package/lib/index.d.ts +17 -17
  99. package/lib/index.d.ts.map +1 -1
  100. package/lib/index.js +2 -2
  101. package/lib/index.js.map +1 -1
  102. package/lib/installation-admin-protocol.d.ts +4 -1
  103. package/lib/installation-admin-protocol.d.ts.map +1 -1
  104. package/lib/installation-admin-protocol.js +4 -3
  105. package/lib/installation-admin-protocol.js.map +1 -1
  106. package/lib/license-protocol.d.ts +8 -1
  107. package/lib/license-protocol.d.ts.map +1 -1
  108. package/lib/license-protocol.js +1 -1
  109. package/lib/license-protocol.js.map +1 -1
  110. package/lib/messaging/browser/connection.d.ts +1 -1
  111. package/lib/messaging/browser/connection.d.ts.map +1 -1
  112. package/lib/messaging/browser/connection.js +19 -19
  113. package/lib/messaging/browser/connection.js.map +1 -1
  114. package/lib/messaging/browser/window-connection.d.ts +5 -5
  115. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  116. package/lib/messaging/browser/window-connection.js +10 -7
  117. package/lib/messaging/browser/window-connection.js.map +1 -1
  118. package/lib/messaging/client-call-metrics.d.ts +5 -19
  119. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  120. package/lib/messaging/client-call-metrics.js +35 -23
  121. package/lib/messaging/client-call-metrics.js.map +1 -1
  122. package/lib/messaging/error.d.ts +10 -2
  123. package/lib/messaging/error.d.ts.map +1 -1
  124. package/lib/messaging/error.js +20 -4
  125. package/lib/messaging/error.js.map +1 -1
  126. package/lib/messaging/handler.d.ts.map +1 -1
  127. package/lib/messaging/handler.js +1 -1
  128. package/lib/messaging/node/connection.js +8 -8
  129. package/lib/messaging/node/connection.js.map +1 -1
  130. package/lib/messaging/proxy-factory.d.ts +1 -1
  131. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  132. package/lib/messaging/proxy-factory.js +7 -9
  133. package/lib/messaging/proxy-factory.js.map +1 -1
  134. package/lib/oss-allowlist.d.ts +1 -1
  135. package/lib/oss-allowlist.js +1 -1
  136. package/lib/payment-protocol.d.ts +1 -1
  137. package/lib/payment-protocol.d.ts.map +1 -1
  138. package/lib/payment-protocol.js +2 -2
  139. package/lib/payment-protocol.js.map +1 -1
  140. package/lib/permission.d.ts +3 -3
  141. package/lib/permission.d.ts.map +1 -1
  142. package/lib/permission.js +13 -24
  143. package/lib/permission.js.map +1 -1
  144. package/lib/plans.d.ts +5 -4
  145. package/lib/plans.d.ts.map +1 -1
  146. package/lib/plans.js +211 -172
  147. package/lib/plans.js.map +1 -1
  148. package/lib/protocol.d.ts +166 -61
  149. package/lib/protocol.d.ts.map +1 -1
  150. package/lib/protocol.js +282 -106
  151. package/lib/protocol.js.map +1 -1
  152. package/lib/protocol.spec.d.ts +7 -0
  153. package/lib/protocol.spec.d.ts.map +1 -0
  154. package/lib/protocol.spec.js +127 -0
  155. package/lib/protocol.spec.js.map +1 -0
  156. package/lib/snapshot-url.d.ts +1 -1
  157. package/lib/snapshot-url.js +1 -1
  158. package/lib/snapshot-url.spec.d.ts +1 -1
  159. package/lib/snapshot-url.spec.js +1 -1
  160. package/lib/snapshot-url.spec.js.map +1 -1
  161. package/lib/team-subscription-protocol.d.ts +23 -4
  162. package/lib/team-subscription-protocol.d.ts.map +1 -1
  163. package/lib/team-subscription-protocol.js +21 -6
  164. package/lib/team-subscription-protocol.js.map +1 -1
  165. package/lib/teams-projects-protocol.d.ts +26 -6
  166. package/lib/teams-projects-protocol.d.ts.map +1 -1
  167. package/lib/teams-projects-protocol.js +2 -2
  168. package/lib/teams-projects-protocol.js.map +1 -1
  169. package/lib/typings/globals.d.ts +3 -3
  170. package/lib/typings/globals.d.ts.map +1 -1
  171. package/lib/typings/globals.js +1 -1
  172. package/lib/usage.d.ts +73 -0
  173. package/lib/usage.d.ts.map +1 -0
  174. package/lib/usage.js +20 -0
  175. package/lib/usage.js.map +1 -0
  176. package/lib/util/analytics.d.ts +1 -1
  177. package/lib/util/analytics.d.ts.map +1 -1
  178. package/lib/util/analytics.js +7 -7
  179. package/lib/util/analytics.js.map +1 -1
  180. package/lib/util/async-iterator.d.ts +1 -1
  181. package/lib/util/async-iterator.d.ts.map +1 -1
  182. package/lib/util/async-iterator.js +4 -4
  183. package/lib/util/async-iterator.js.map +1 -1
  184. package/lib/util/cancelable.d.ts +1 -1
  185. package/lib/util/cancelable.js +1 -1
  186. package/lib/util/cancelable.js.map +1 -1
  187. package/lib/util/date-time.d.ts +1 -1
  188. package/lib/util/date-time.js +7 -7
  189. package/lib/util/date-time.js.map +1 -1
  190. package/lib/util/debug-app.d.ts +25 -0
  191. package/lib/util/debug-app.d.ts.map +1 -0
  192. package/lib/util/debug-app.js +100 -0
  193. package/lib/util/debug-app.js.map +1 -0
  194. package/lib/util/deep-partial.d.ts +1 -1
  195. package/lib/util/deep-partial.js +1 -1
  196. package/lib/util/deferred.d.ts +1 -1
  197. package/lib/util/deferred.js +1 -1
  198. package/lib/util/deferred.js.map +1 -1
  199. package/lib/util/disposable.d.ts.map +1 -1
  200. package/lib/util/disposable.js +2 -2
  201. package/lib/util/disposable.js.map +1 -1
  202. package/lib/util/event.d.ts.map +1 -1
  203. package/lib/util/event.js +5 -3
  204. package/lib/util/event.js.map +1 -1
  205. package/lib/util/garbage-collected-cache.d.ts +1 -1
  206. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  207. package/lib/util/garbage-collected-cache.js +7 -2
  208. package/lib/util/garbage-collected-cache.js.map +1 -1
  209. package/lib/util/generate-workspace-id.d.ts +5 -0
  210. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  211. package/lib/util/generate-workspace-id.js +446 -442
  212. package/lib/util/generate-workspace-id.js.map +1 -1
  213. package/lib/util/generate-workspace-id.spec.d.ts +1 -1
  214. package/lib/util/generate-workspace-id.spec.js +19 -8
  215. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  216. package/lib/util/gitpod-cookie.d.ts +2 -2
  217. package/lib/util/gitpod-cookie.d.ts.map +1 -1
  218. package/lib/util/gitpod-cookie.js +1 -4
  219. package/lib/util/gitpod-cookie.js.map +1 -1
  220. package/lib/util/gitpod-host-url.d.ts +6 -1
  221. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  222. package/lib/util/gitpod-host-url.js +60 -33
  223. package/lib/util/gitpod-host-url.js.map +1 -1
  224. package/lib/util/gitpod-host-url.spec.d.ts +1 -1
  225. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  226. package/lib/util/gitpod-host-url.spec.js +16 -6
  227. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  228. package/lib/util/grpc.d.ts +21 -1
  229. package/lib/util/grpc.d.ts.map +1 -1
  230. package/lib/util/grpc.js +74 -2
  231. package/lib/util/grpc.js.map +1 -1
  232. package/lib/util/jaeger-client-types.d.ts +1 -1
  233. package/lib/util/jaeger-client-types.d.ts.map +1 -1
  234. package/lib/util/jaeger-client-types.js +1 -1
  235. package/lib/util/logging.d.ts +2 -2
  236. package/lib/util/logging.d.ts.map +1 -1
  237. package/lib/util/logging.js +32 -26
  238. package/lib/util/logging.js.map +1 -1
  239. package/lib/util/logging.spec.d.ts +7 -0
  240. package/lib/util/logging.spec.d.ts.map +1 -0
  241. package/lib/util/logging.spec.js +52 -0
  242. package/lib/util/logging.spec.js.map +1 -0
  243. package/lib/util/make-link.d.ts +1 -1
  244. package/lib/util/make-link.js +6 -6
  245. package/lib/util/make-link.js.map +1 -1
  246. package/lib/util/nice-grpc.d.ts +9 -0
  247. package/lib/util/nice-grpc.d.ts.map +1 -0
  248. package/lib/util/nice-grpc.js +121 -0
  249. package/lib/util/nice-grpc.js.map +1 -0
  250. package/lib/util/parse-workspace-id.d.ts +1 -1
  251. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  252. package/lib/util/parse-workspace-id.js +2 -3
  253. package/lib/util/parse-workspace-id.js.map +1 -1
  254. package/lib/util/parse-workspace-id.spec.d.ts +1 -1
  255. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  256. package/lib/util/parse-workspace-id.spec.js +1 -1
  257. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  258. package/lib/util/queue.d.ts +1 -1
  259. package/lib/util/queue.js +1 -1
  260. package/lib/util/queue.spec.d.ts +1 -1
  261. package/lib/util/queue.spec.js +10 -7
  262. package/lib/util/queue.spec.js.map +1 -1
  263. package/lib/util/repeat.d.ts +1 -1
  264. package/lib/util/repeat.js +1 -1
  265. package/lib/util/semaphore.d.ts +1 -1
  266. package/lib/util/semaphore.d.ts.map +1 -1
  267. package/lib/util/semaphore.js +1 -1
  268. package/lib/util/semaphore.js.map +1 -1
  269. package/lib/util/skip-if.d.ts +1 -1
  270. package/lib/util/skip-if.d.ts.map +1 -1
  271. package/lib/util/skip-if.js +1 -1
  272. package/lib/util/skip-if.js.map +1 -1
  273. package/lib/util/timeutil.d.ts +3 -1
  274. package/lib/util/timeutil.d.ts.map +1 -1
  275. package/lib/util/timeutil.js +16 -4
  276. package/lib/util/timeutil.js.map +1 -1
  277. package/lib/util/timeutil.spec.d.ts +3 -1
  278. package/lib/util/timeutil.spec.d.ts.map +1 -1
  279. package/lib/util/timeutil.spec.js +35 -1
  280. package/lib/util/timeutil.spec.js.map +1 -1
  281. package/lib/util/tracing.d.ts +7 -7
  282. package/lib/util/tracing.d.ts.map +1 -1
  283. package/lib/util/tracing.js +15 -17
  284. package/lib/util/tracing.js.map +1 -1
  285. package/lib/util/tracing.spec.d.ts +1 -1
  286. package/lib/util/tracing.spec.js +4 -4
  287. package/lib/util/tracing.spec.js.map +1 -1
  288. package/lib/util/workspace-port-authentication.d.ts +8 -8
  289. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  290. package/lib/util/workspace-port-authentication.js +9 -12
  291. package/lib/util/workspace-port-authentication.js.map +1 -1
  292. package/lib/webhook-event.d.ts +44 -0
  293. package/lib/webhook-event.d.ts.map +1 -0
  294. package/lib/webhook-event.js +8 -0
  295. package/lib/webhook-event.js.map +1 -0
  296. package/lib/workspace-class.d.ts +14 -0
  297. package/lib/workspace-class.d.ts.map +1 -0
  298. package/lib/workspace-class.js +8 -0
  299. package/lib/workspace-class.js.map +1 -0
  300. package/lib/workspace-cluster.d.ts +13 -14
  301. package/lib/workspace-cluster.d.ts.map +1 -1
  302. package/lib/workspace-cluster.js +3 -5
  303. package/lib/workspace-cluster.js.map +1 -1
  304. package/lib/workspace-instance.d.ts +22 -4
  305. package/lib/workspace-instance.d.ts.map +1 -1
  306. package/lib/workspace-instance.js +1 -1
  307. package/lib/wsready.d.ts +8 -2
  308. package/lib/wsready.d.ts.map +1 -1
  309. package/lib/wsready.js +3 -3
  310. package/package.json +14 -6
  311. package/pkg-yarn.lock +10 -5
  312. package/provenance-bundle.jsonl +1 -1
  313. package/src/accounting-protocol.ts +67 -52
  314. package/src/admin-protocol.ts +48 -22
  315. package/src/analytics.ts +22 -22
  316. package/src/attribution.ts +63 -0
  317. package/src/auth.ts +3 -3
  318. package/src/billing-mode.ts +84 -0
  319. package/src/blocked-repositories-protocol.ts +13 -0
  320. package/src/context-url.spec.ts +18 -22
  321. package/src/context-url.ts +79 -79
  322. package/src/encryption/container-module.ts +3 -4
  323. package/src/encryption/encryption-engine.spec.ts +10 -9
  324. package/src/encryption/encryption-engine.ts +21 -17
  325. package/src/encryption/encryption-service.ts +5 -6
  326. package/src/encryption/key-provider.ts +17 -20
  327. package/src/env.ts +2 -25
  328. package/src/experiments/always-default.ts +24 -0
  329. package/src/experiments/configcat-server.ts +42 -0
  330. package/src/experiments/configcat.ts +56 -0
  331. package/src/experiments/types.ts +34 -0
  332. package/src/gitpod-file-parser.spec.ts +56 -62
  333. package/src/gitpod-file-parser.ts +17 -18
  334. package/src/gitpod-service.ts +216 -140
  335. package/src/headless-workspace-log.ts +7 -5
  336. package/src/ide-frontend-service.ts +3 -3
  337. package/src/ide-protocol.ts +38 -10
  338. package/src/index.ts +17 -17
  339. package/src/installation-admin-protocol.ts +12 -9
  340. package/src/license-protocol.ts +13 -7
  341. package/src/messaging/browser/connection.ts +45 -47
  342. package/src/messaging/browser/window-connection.ts +40 -30
  343. package/src/messaging/client-call-metrics.ts +79 -82
  344. package/src/messaging/error.ts +30 -8
  345. package/src/messaging/handler.ts +6 -6
  346. package/src/messaging/node/connection.ts +8 -8
  347. package/src/messaging/proxy-factory.ts +23 -30
  348. package/src/oss-allowlist.ts +4 -4
  349. package/src/payment-protocol.ts +3 -3
  350. package/src/permission.ts +21 -32
  351. package/src/plans.ts +241 -190
  352. package/src/protocol.spec.ts +97 -0
  353. package/src/protocol.ts +524 -265
  354. package/src/snapshot-url.spec.ts +10 -8
  355. package/src/snapshot-url.ts +1 -1
  356. package/src/team-subscription-protocol.ts +60 -23
  357. package/src/teams-projects-protocol.ts +36 -12
  358. package/src/typings/globals.ts +5 -5
  359. package/src/usage.ts +85 -0
  360. package/src/util/analytics.ts +47 -43
  361. package/src/util/async-iterator.ts +5 -6
  362. package/src/util/cancelable.ts +4 -4
  363. package/src/util/date-time.ts +9 -9
  364. package/src/util/debug-app.ts +81 -0
  365. package/src/util/deep-partial.ts +1 -1
  366. package/src/util/deferred.ts +7 -7
  367. package/src/util/disposable.ts +3 -6
  368. package/src/util/event.ts +9 -11
  369. package/src/util/garbage-collected-cache.ts +9 -7
  370. package/src/util/generate-workspace-id.spec.ts +27 -17
  371. package/src/util/generate-workspace-id.ts +461 -455
  372. package/src/util/gitpod-cookie.ts +9 -10
  373. package/src/util/gitpod-host-url.spec.ts +41 -14
  374. package/src/util/gitpod-host-url.ts +69 -37
  375. package/src/util/grpc.ts +94 -2
  376. package/src/util/jaeger-client-types.ts +3 -3
  377. package/src/util/logging.spec.ts +23 -0
  378. package/src/util/logging.ts +61 -43
  379. package/src/util/make-link.ts +7 -8
  380. package/src/util/nice-grpc.ts +96 -0
  381. package/src/util/parse-workspace-id.spec.ts +18 -9
  382. package/src/util/parse-workspace-id.ts +6 -7
  383. package/src/util/queue.spec.ts +28 -26
  384. package/src/util/queue.ts +1 -1
  385. package/src/util/repeat.ts +2 -2
  386. package/src/util/semaphore.ts +5 -7
  387. package/src/util/skip-if.ts +10 -7
  388. package/src/util/timeutil.spec.ts +41 -15
  389. package/src/util/timeutil.ts +28 -12
  390. package/src/util/tracing.spec.ts +29 -24
  391. package/src/util/tracing.ts +55 -52
  392. package/src/util/workspace-port-authentication.ts +11 -14
  393. package/src/webhook-event.ts +55 -0
  394. package/src/workspace-class.ts +14 -0
  395. package/src/workspace-cluster.ts +25 -19
  396. package/src/workspace-instance.ts +67 -25
  397. package/src/wsready.ts +11 -4
  398. package/data/builtin-theia-plugins.json +0 -372
  399. package/lib/email-protocol.d.ts +0 -49
  400. package/lib/email-protocol.d.ts.map +0 -1
  401. package/lib/email-protocol.js +0 -28
  402. package/lib/email-protocol.js.map +0 -1
  403. package/lib/theia-plugins.d.ts +0 -11
  404. package/lib/theia-plugins.d.ts.map +0 -1
  405. package/lib/theia-plugins.js +0 -8
  406. package/lib/theia-plugins.js.map +0 -1
  407. package/src/email-protocol.ts +0 -66
  408. package/src/theia-plugins.ts +0 -11
package/src/plans.ts CHANGED
@@ -1,46 +1,56 @@
1
1
  /**
2
2
  * Copyright (c) 2021 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
- export type Currency = 'USD' | 'EUR';
7
+ export type Currency = "USD" | "EUR";
8
8
  export namespace Currency {
9
9
  export const getAll = (): Currency[] => {
10
- return ['USD', 'EUR'];
11
- }
10
+ return ["USD", "EUR"];
11
+ };
12
12
  export const getSymbol = (c: Currency) => {
13
- return c === 'USD' ? '$' : '';
14
- }
13
+ return c === "USD" ? "$" : "";
14
+ };
15
15
  }
16
16
 
17
17
  /**
18
18
  * Different plans of the same type MAY have different prices ($/€, for example) but MUST have the same feature set.
19
19
  */
20
- export type PlanType = 'free' | 'free-50' | 'free-open-source' | 'student' | 'basic' | 'personal' | 'professional' | 'professional-new';
21
- export type HoursPerMonthType = number | 'unlimited';
20
+ export type PlanType =
21
+ | "free"
22
+ | "free-50"
23
+ | "free-open-source"
24
+ | "student"
25
+ | "basic"
26
+ | "personal"
27
+ | "professional"
28
+ | "professional-new";
29
+ export type HoursPerMonthType = number | "unlimited";
22
30
  export interface Plan {
23
- chargebeeId: string
24
- githubId?: number
25
- githubPlanNumber?: number
31
+ chargebeeId: string;
32
+ githubId?: number;
33
+ githubPlanNumber?: number;
26
34
 
27
- name: string
28
- currency: Currency
35
+ name: string;
36
+ currency: Currency;
29
37
  /** In full currencies (Euro, US Dollar, ...) */
30
- pricePerMonth: number
31
- hoursPerMonth: HoursPerMonthType
32
- type: PlanType
33
- team?: boolean
38
+ pricePerMonth: number;
39
+ hoursPerMonth: HoursPerMonthType;
40
+ type: PlanType;
41
+ team?: boolean;
34
42
  }
35
43
  export namespace Plan {
36
44
  export const is = (o: any): o is Plan => {
37
- return 'chargebeeId' in o
38
- && 'name' in o
39
- && 'currency' in o
40
- && 'pricePerMonth' in o
41
- && 'hoursPerMonth' in o
42
- && 'type' in o;
43
- }
45
+ return (
46
+ "chargebeeId" in o &&
47
+ "name" in o &&
48
+ "currency" in o &&
49
+ "pricePerMonth" in o &&
50
+ "hoursPerMonth" in o &&
51
+ "type" in o
52
+ );
53
+ };
44
54
  }
45
55
 
46
56
  export const MAX_PARALLEL_WORKSPACES = 16;
@@ -51,24 +61,24 @@ export interface Coupon {
51
61
  }
52
62
  export namespace Coupon {
53
63
  export const is = (o: any): o is Coupon => {
54
- return 'id' in o;
55
- }
64
+ return "id" in o;
65
+ };
56
66
  }
57
67
  export namespace Coupons {
58
68
  export const INTERNAL_GITPOD_GHSP: Coupon = {
59
69
  id: "INTERNAL_GITPOD_GHSP",
60
- isGithubStudentCoupon: true
70
+ isGithubStudentCoupon: true,
61
71
  };
62
72
  export const INTERNAL_GITPOD_GHSP_2: Coupon = {
63
73
  id: "INTERNAL_GITPOD_GHSP_2",
64
- isGithubStudentCoupon: true
74
+ isGithubStudentCoupon: true,
65
75
  };
66
76
  export const GITHUBSTUDENTPACKFORFACULTY: Coupon = {
67
77
  id: "GITHUBSTUDENTPACKFORFACULTY",
68
- isGithubStudentCoupon: true
78
+ isGithubStudentCoupon: true,
69
79
  };
70
80
  export const isGithubStudentCoupon = (id: string): boolean | undefined => {
71
- const c = getAllCoupons().find(ic => ic.id === id);
81
+ const c = getAllCoupons().find((ic) => ic.id === id);
72
82
  if (!c) {
73
83
  return undefined;
74
84
  }
@@ -76,8 +86,8 @@ export namespace Coupons {
76
86
  };
77
87
  export const getAllCoupons = (): Coupon[] => {
78
88
  return Object.keys(Coupons)
79
- .map(k => (Coupons as any)[k])
80
- .filter(a => typeof a === 'object' && Coupon.is(a));
89
+ .map((k) => (Coupons as any)[k])
90
+ .filter((a) => typeof a === "object" && Coupon.is(a));
81
91
  };
82
92
  }
83
93
 
@@ -116,151 +126,151 @@ export namespace Plans {
116
126
  * The old default plan (v1): 100h hours for public repos
117
127
  */
118
128
  export const FREE: Plan = {
119
- chargebeeId: 'free',
129
+ chargebeeId: "free",
120
130
  githubId: 2034,
121
131
  githubPlanNumber: 1,
122
132
 
123
- type: 'free',
124
- name: 'Open Source',
125
- currency: 'USD',
133
+ type: "free",
134
+ name: "Free",
135
+ currency: "USD",
126
136
  pricePerMonth: 0,
127
- hoursPerMonth: 100
137
+ hoursPerMonth: 100,
128
138
  };
129
139
 
130
140
  /**
131
141
  * The new default plan (v3): 50h hours for public repos
132
142
  */
133
143
  export const FREE_50: Plan = {
134
- chargebeeId: 'free-50',
144
+ chargebeeId: "free-50",
135
145
  githubId: 4902,
136
146
  githubPlanNumber: 5,
137
147
 
138
- type: 'free-50',
139
- name: 'Open Source',
140
- currency: 'USD',
148
+ type: "free-50",
149
+ name: "Free",
150
+ currency: "USD",
141
151
  pricePerMonth: 0,
142
- hoursPerMonth: 50
152
+ hoursPerMonth: 50,
143
153
  };
144
154
 
145
155
  /**
146
156
  * Users created after this date get the FREE_50 plan (v3) instead of the (old) FREE plan (v1)
147
157
  */
148
- export const FREE_50_START_DATE = '2019-12-19T00:00:00.000Z';
158
+ export const FREE_50_START_DATE = "2019-12-19T00:00:00.000Z";
149
159
 
150
160
  /**
151
161
  * The 'Professional Open Source' plan was introduced to offer professional open-souce developers unlimited hours.
152
162
  */
153
163
  export const FREE_OPEN_SOURCE: Plan = {
154
- chargebeeId: 'free-open-source',
155
- type: 'free-open-source',
156
- name: 'Professional Open Source',
157
- currency: 'USD',
164
+ chargebeeId: "free-open-source",
165
+ type: "free-open-source",
166
+ name: "Professional Open Source",
167
+ currency: "USD",
158
168
  pricePerMonth: 0,
159
- hoursPerMonth: 'unlimited'
169
+ hoursPerMonth: "unlimited",
160
170
  };
161
171
 
162
172
  /**
163
173
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
164
174
  */
165
175
  export const PROFESSIONAL_STUDENT_EUR: Plan = {
166
- chargebeeId: 'professional-student-eur',
167
- type: 'student',
168
- name: 'Student Unleashed',
169
- currency: 'EUR',
176
+ chargebeeId: "professional-student-eur",
177
+ type: "student",
178
+ name: "Student Unleashed",
179
+ currency: "EUR",
170
180
  pricePerMonth: 8,
171
- hoursPerMonth: 'unlimited'
181
+ hoursPerMonth: "unlimited",
172
182
  };
173
183
 
174
184
  /**
175
185
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
176
186
  */
177
187
  export const PROFESSIONAL_STUDENT_USD: Plan = {
178
- chargebeeId: 'professional-student-usd',
179
- type: 'student',
180
- name: 'Student Unleashed',
181
- currency: 'USD',
188
+ chargebeeId: "professional-student-usd",
189
+ type: "student",
190
+ name: "Student Unleashed",
191
+ currency: "USD",
182
192
  pricePerMonth: 9,
183
- hoursPerMonth: 'unlimited'
193
+ hoursPerMonth: "unlimited",
184
194
  };
185
195
 
186
196
  /**
187
197
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
188
198
  */
189
199
  export const TEAM_PROFESSIONAL_STUDENT_EUR: Plan = {
190
- chargebeeId: 'team-professional-student-eur',
191
- type: 'student',
192
- name: 'Team Student Unleashed',
200
+ chargebeeId: "team-professional-student-eur",
201
+ type: "student",
202
+ name: "Team Student Unleashed",
193
203
  team: true,
194
- currency: 'EUR',
204
+ currency: "EUR",
195
205
  pricePerMonth: 8,
196
- hoursPerMonth: 'unlimited'
206
+ hoursPerMonth: "unlimited",
197
207
  };
198
208
 
199
209
  /**
200
210
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
201
211
  */
202
212
  export const TEAM_PROFESSIONAL_STUDENT_USD: Plan = {
203
- chargebeeId: 'team-professional-student-usd',
204
- type: 'student',
205
- name: 'Team Student Unleashed',
213
+ chargebeeId: "team-professional-student-usd",
214
+ type: "student",
215
+ name: "Team Student Unleashed",
206
216
  team: true,
207
- currency: 'USD',
217
+ currency: "USD",
208
218
  pricePerMonth: 9,
209
- hoursPerMonth: 'unlimited'
219
+ hoursPerMonth: "unlimited",
210
220
  };
211
221
 
212
222
  /**
213
223
  * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
214
224
  */
215
225
  export const BASIC_EUR: Plan = {
216
- chargebeeId: 'basic-eur',
217
- type: 'basic',
218
- name: 'Standard',
219
- currency: 'EUR',
226
+ chargebeeId: "basic-eur",
227
+ type: "basic",
228
+ name: "Standard",
229
+ currency: "EUR",
220
230
  pricePerMonth: 17,
221
- hoursPerMonth: 100
231
+ hoursPerMonth: 100,
222
232
  };
223
233
 
224
234
  /**
225
235
  * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
226
236
  */
227
237
  export const BASIC_USD: Plan = {
228
- chargebeeId: 'basic-usd',
238
+ chargebeeId: "basic-usd",
229
239
  githubId: 2035,
230
240
  githubPlanNumber: 2,
231
241
 
232
- type: 'basic',
233
- name: 'Standard',
234
- currency: 'USD',
242
+ type: "basic",
243
+ name: "Standard",
244
+ currency: "USD",
235
245
  pricePerMonth: 19,
236
- hoursPerMonth: 100
246
+ hoursPerMonth: 100,
237
247
  };
238
248
 
239
249
  /**
240
250
  * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
241
251
  */
242
252
  export const PERSONAL_EUR: Plan = {
243
- chargebeeId: 'personal-eur',
244
- type: 'personal',
245
- name: 'Personal',
246
- currency: 'EUR',
253
+ chargebeeId: "personal-eur",
254
+ type: "personal",
255
+ name: "Personal",
256
+ currency: "EUR",
247
257
  pricePerMonth: 8,
248
- hoursPerMonth: 100
258
+ hoursPerMonth: 100,
249
259
  };
250
260
 
251
261
  /**
252
262
  * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
253
263
  */
254
264
  export const PERSONAL_USD: Plan = {
255
- chargebeeId: 'personal-usd',
265
+ chargebeeId: "personal-usd",
256
266
  githubId: 2274,
257
267
  githubPlanNumber: 4,
258
268
 
259
- type: 'personal',
260
- name: 'Personal',
261
- currency: 'USD',
269
+ type: "personal",
270
+ name: "Personal",
271
+ currency: "USD",
262
272
  pricePerMonth: 9,
263
- hoursPerMonth: 100
273
+ hoursPerMonth: 100,
264
274
  };
265
275
 
266
276
  /**
@@ -268,12 +278,12 @@ export namespace Plans {
268
278
  * Unleashed (39$/35€) on the right.
269
279
  */
270
280
  export const PROFESSIONAL_NEW_EUR: Plan = {
271
- chargebeeId: 'professional-new-eur',
272
- type: 'professional-new',
273
- name: 'Professional',
274
- currency: 'EUR',
281
+ chargebeeId: "professional-new-eur",
282
+ type: "professional-new",
283
+ name: "Professional",
284
+ currency: "EUR",
275
285
  pricePerMonth: 23,
276
- hoursPerMonth: 'unlimited'
286
+ hoursPerMonth: "unlimited",
277
287
  };
278
288
 
279
289
  /**
@@ -281,12 +291,12 @@ export namespace Plans {
281
291
  * Unleashed (39$/35€) on the right.
282
292
  */
283
293
  export const PROFESSIONAL_NEW_USD: Plan = {
284
- chargebeeId: 'professional-new-usd',
285
- type: 'professional-new',
286
- name: 'Professional',
287
- currency: 'USD',
294
+ chargebeeId: "professional-new-usd",
295
+ type: "professional-new",
296
+ name: "Professional",
297
+ currency: "USD",
288
298
  pricePerMonth: 25,
289
- hoursPerMonth: 'unlimited'
299
+ hoursPerMonth: "unlimited",
290
300
  };
291
301
 
292
302
  /**
@@ -294,13 +304,13 @@ export namespace Plans {
294
304
  * Unleashed (39$/35€) on the right.
295
305
  */
296
306
  export const TEAM_PROFESSIONAL_NEW_EUR: Plan = {
297
- chargebeeId: 'team-professional-new-eur',
298
- type: 'professional-new',
299
- name: 'Team Professional',
300
- currency: 'EUR',
307
+ chargebeeId: "team-professional-new-eur",
308
+ type: "professional-new",
309
+ name: "Team Professional",
310
+ currency: "EUR",
301
311
  team: true,
302
312
  pricePerMonth: 23,
303
- hoursPerMonth: 'unlimited'
313
+ hoursPerMonth: "unlimited",
304
314
  };
305
315
 
306
316
  /**
@@ -308,13 +318,13 @@ export namespace Plans {
308
318
  * Unleashed (39$/35€) on the right.
309
319
  */
310
320
  export const TEAM_PROFESSIONAL_NEW_USD: Plan = {
311
- chargebeeId: 'team-professional-new-usd',
312
- type: 'professional-new',
313
- name: 'Team Professional',
314
- currency: 'USD',
321
+ chargebeeId: "team-professional-new-usd",
322
+ type: "professional-new",
323
+ name: "Team Professional",
324
+ currency: "USD",
315
325
  team: true,
316
326
  pricePerMonth: 25,
317
- hoursPerMonth: 'unlimited'
327
+ hoursPerMonth: "unlimited",
318
328
  };
319
329
 
320
330
  /**
@@ -322,12 +332,12 @@ export namespace Plans {
322
332
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
323
333
  */
324
334
  export const PROFESSIONAL_EUR: Plan = {
325
- chargebeeId: 'professional-eur',
326
- type: 'professional',
327
- name: 'Unleashed',
328
- currency: 'EUR',
335
+ chargebeeId: "professional-eur",
336
+ type: "professional",
337
+ name: "Unleashed",
338
+ currency: "EUR",
329
339
  pricePerMonth: 35,
330
- hoursPerMonth: 'unlimited'
340
+ hoursPerMonth: "unlimited",
331
341
  };
332
342
 
333
343
  /**
@@ -335,15 +345,15 @@ export namespace Plans {
335
345
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
336
346
  */
337
347
  export const PROFESSIONAL_USD: Plan = {
338
- chargebeeId: 'professional-usd',
348
+ chargebeeId: "professional-usd",
339
349
  githubId: 2036,
340
350
  githubPlanNumber: 3,
341
351
 
342
- type: 'professional',
343
- name: 'Unleashed',
344
- currency: 'USD',
352
+ type: "professional",
353
+ name: "Unleashed",
354
+ currency: "USD",
345
355
  pricePerMonth: 39,
346
- hoursPerMonth: 'unlimited'
356
+ hoursPerMonth: "unlimited",
347
357
  };
348
358
 
349
359
  /**
@@ -351,13 +361,13 @@ export namespace Plans {
351
361
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
352
362
  */
353
363
  export const TEAM_PROFESSIONAL_USD: Plan = {
354
- chargebeeId: 'team-professional-usd',
355
- type: 'professional',
356
- name: 'Team Unleashed',
357
- currency: 'USD',
364
+ chargebeeId: "team-professional-usd",
365
+ type: "professional",
366
+ name: "Team Unleashed",
367
+ currency: "USD",
358
368
  team: true,
359
369
  pricePerMonth: 39,
360
- hoursPerMonth: 'unlimited'
370
+ hoursPerMonth: "unlimited",
361
371
  };
362
372
 
363
373
  /**
@@ -365,22 +375,21 @@ export namespace Plans {
365
375
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
366
376
  */
367
377
  export const TEAM_PROFESSIONAL_EUR: Plan = {
368
- chargebeeId: 'team-professional-eur',
369
- type: 'professional',
370
- name: 'Team Unleashed',
371
- currency: 'EUR',
378
+ chargebeeId: "team-professional-eur",
379
+ type: "professional",
380
+ name: "Team Unleashed",
381
+ currency: "EUR",
372
382
  team: true,
373
383
  pricePerMonth: 35,
374
- hoursPerMonth: 'unlimited'
384
+ hoursPerMonth: "unlimited",
375
385
  };
376
386
 
377
387
  const getAllPlans = (): Plan[] => {
378
388
  return Object.keys(Plans)
379
- .map(k => (Plans as any)[k])
380
- .filter(a => typeof a === 'object' && Plan.is(a));
389
+ .map((k) => (Plans as any)[k])
390
+ .filter((a) => typeof a === "object" && Plan.is(a));
381
391
  };
382
392
 
383
-
384
393
  /**
385
394
  * This function returns all individual plans that might be active (= we have subscriptions for) at the moment
386
395
  */
@@ -393,67 +402,71 @@ export namespace Plans {
393
402
  Plans.PROFESSIONAL_NEW_EUR,
394
403
  Plans.PROFESSIONAL_NEW_USD,
395
404
  Plans.PROFESSIONAL_EUR,
396
- Plans.PROFESSIONAL_USD
405
+ Plans.PROFESSIONAL_USD,
397
406
  ];
398
- return [
399
- Plans.FREE,
400
- Plans.FREE_50,
401
- Plans.FREE_OPEN_SOURCE,
402
- ...availablePaidPlans.filter(p => p.currency)
403
- ]
404
- };
407
+ return [Plans.FREE, Plans.FREE_50, Plans.FREE_OPEN_SOURCE, ...availablePaidPlans.filter((p) => p.currency)];
408
+ }
405
409
 
406
410
  export const getAvailableTeamPlans = (currency?: Currency): Plan[] => {
407
- const teamPlans = getAllPlans().filter(p => !!p.team);
408
- return currency ? teamPlans.filter(p => p.currency === currency) : teamPlans;
411
+ const teamPlans = getAllPlans().filter((p) => !!p.team);
412
+ return currency ? teamPlans.filter((p) => p.currency === currency) : teamPlans;
409
413
  };
410
414
 
411
415
  export function getById(id: string | undefined): Plan | undefined {
412
416
  if (id === undefined) {
413
417
  return undefined;
414
418
  }
415
- return getAllPlans()
416
- .find(p => p.chargebeeId === id) || undefined;
417
- };
419
+ return getAllPlans().find((p) => p.chargebeeId === id) || undefined;
420
+ }
418
421
 
419
422
  export function getByTypeAndCurrency(type: PlanType, currency: Currency): Plan | undefined {
420
423
  return getAllPlans()
421
- .filter(p => p.type)
422
- .find(p => p.currency === currency);
424
+ .filter((p) => p.type)
425
+ .find((p) => p.currency === currency);
423
426
  }
424
427
 
425
428
  export function getProPlan(currency: Currency): Plan {
426
429
  switch (currency) {
427
- case "EUR": return Plans.PROFESSIONAL_EUR;
428
- case "USD": return Plans.PROFESSIONAL_USD;
430
+ case "EUR":
431
+ return Plans.PROFESSIONAL_EUR;
432
+ case "USD":
433
+ return Plans.PROFESSIONAL_USD;
429
434
  }
430
435
  }
431
436
 
432
437
  export function getNewProPlan(currency: Currency): Plan {
433
438
  switch (currency) {
434
- case "EUR": return Plans.PROFESSIONAL_NEW_EUR;
435
- case "USD": return Plans.PROFESSIONAL_NEW_USD;
439
+ case "EUR":
440
+ return Plans.PROFESSIONAL_NEW_EUR;
441
+ case "USD":
442
+ return Plans.PROFESSIONAL_NEW_USD;
436
443
  }
437
444
  }
438
445
 
439
446
  export function getStudentProPlan(currency: Currency): Plan {
440
447
  switch (currency) {
441
- case "EUR": return Plans.PROFESSIONAL_STUDENT_EUR;
442
- case "USD": return Plans.PROFESSIONAL_STUDENT_USD;
448
+ case "EUR":
449
+ return Plans.PROFESSIONAL_STUDENT_EUR;
450
+ case "USD":
451
+ return Plans.PROFESSIONAL_STUDENT_USD;
443
452
  }
444
453
  }
445
454
 
446
455
  export function getBasicPlan(currency: Currency): Plan {
447
456
  switch (currency) {
448
- case "EUR": return Plans.BASIC_EUR;
449
- case "USD": return Plans.BASIC_USD;
457
+ case "EUR":
458
+ return Plans.BASIC_EUR;
459
+ case "USD":
460
+ return Plans.BASIC_USD;
450
461
  }
451
462
  }
452
463
 
453
464
  export function getPersonalPlan(currency: Currency): Plan {
454
465
  switch (currency) {
455
- case "EUR": return Plans.PERSONAL_EUR;
456
- case "USD": return Plans.PERSONAL_USD;
466
+ case "EUR":
467
+ return Plans.PERSONAL_EUR;
468
+ case "USD":
469
+ return Plans.PERSONAL_USD;
457
470
  }
458
471
  }
459
472
 
@@ -462,9 +475,15 @@ export namespace Plans {
462
475
  }
463
476
 
464
477
  export function isFreePlan(chargebeeId: string | undefined): boolean {
465
- return chargebeeId === Plans.FREE.chargebeeId
466
- || chargebeeId === Plans.FREE_50.chargebeeId
467
- || chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId;
478
+ return (
479
+ chargebeeId === Plans.FREE.chargebeeId ||
480
+ chargebeeId === Plans.FREE_50.chargebeeId ||
481
+ chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId
482
+ );
483
+ }
484
+
485
+ export function isFreeTier(chargebeeId: string | undefined): boolean {
486
+ return chargebeeId === Plans.FREE.chargebeeId || chargebeeId === Plans.FREE_50.chargebeeId;
468
487
  }
469
488
 
470
489
  export function isFreeNonTransientPlan(chargebeeId: string | undefined): boolean {
@@ -472,7 +491,7 @@ export namespace Plans {
472
491
  }
473
492
 
474
493
  export function getHoursPerMonth(plan: Plan): number {
475
- return plan.hoursPerMonth == 'unlimited' ? ABSOLUTE_MAX_USAGE : plan.hoursPerMonth;
494
+ return plan.hoursPerMonth == "unlimited" ? ABSOLUTE_MAX_USAGE : plan.hoursPerMonth;
476
495
  }
477
496
 
478
497
  /**
@@ -504,7 +523,6 @@ export namespace Plans {
504
523
  return DEFAULT;
505
524
  }
506
525
 
507
-
508
526
  /**
509
527
  * This declares the plan structure we have in Gitpod: All entries in a sub-array have the same arity in this structure.
510
528
  * This is used to impose a partial order on plan types (cmp. compareTypes(...)).
@@ -515,7 +533,7 @@ export namespace Plans {
515
533
  ["free-50", "free", "free-open-source"],
516
534
  ["personal", "basic"],
517
535
  ["professional-new"],
518
- ["professional", "student"]
536
+ ["professional", "student"],
519
537
  ];
520
538
 
521
539
  function getPlanTypeArity(type: PlanType) {
@@ -571,60 +589,93 @@ export namespace Plans {
571
589
  export const getFeaturesFor = (p: Plan): Feature[] => {
572
590
  switch (p.type) {
573
591
  case "free":
574
- return [
575
- { title: 'Public repositories' }
576
- ];
592
+ return [{ title: "Public repositories" }];
577
593
 
578
594
  case "free-50":
579
- return [
580
- { title: 'Public repositories' }
581
- ];
595
+ return [{ title: "Public repositories" }];
582
596
 
583
597
  case "free-open-source":
584
- return [
585
- { title: 'Public repositories' },
586
- ];
598
+ return [{ title: "Public repositories" }];
587
599
 
588
600
  case "student":
589
601
  return [
590
- { title: 'Private & Public repos' },
591
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
592
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
593
- { title: '1h Timeout', tooltip: 'Workspaces without user activity are stopped after 1 hour' },
594
- { title: '3h Timeout Boost', tooltip: 'You can manually boost the timeout to 3 hours within a running workspace' }
602
+ { title: "Private & Public repos" },
603
+ {
604
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
605
+ tooltip: "The number of workspaces running at the same time",
606
+ },
607
+ {
608
+ title: "Team Manageable",
609
+ link: "/teams/",
610
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
611
+ },
612
+ { title: "1h Timeout", tooltip: "Workspaces without user activity are stopped after 1 hour" },
613
+ {
614
+ title: "3h Timeout Boost",
615
+ tooltip: "You can manually boost the timeout to 3 hours within a running workspace",
616
+ },
595
617
  ];
596
618
 
597
619
  case "basic":
598
620
  return [
599
- { title: 'Private & Public repos' },
600
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time.' },
621
+ { title: "Private & Public repos" },
622
+ {
623
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
624
+ tooltip: "The number of workspaces running at the same time.",
625
+ },
601
626
  ];
602
627
 
603
628
  // Personal
604
629
  case "personal":
605
630
  return [
606
- { title: 'Private & Public repos' },
607
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
608
- { title: '30min Timeout', tooltip: 'Workspaces without user activity are stopped after 30 minutes' }
631
+ { title: "Private & Public repos" },
632
+ {
633
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
634
+ tooltip: "The number of workspaces running at the same time",
635
+ },
636
+ {
637
+ title: "30min Timeout",
638
+ tooltip: "Workspaces without user activity are stopped after 30 minutes",
639
+ },
609
640
  ];
610
641
 
611
642
  // Professional
612
643
  case "professional-new":
613
644
  return [
614
- { title: 'Private & Public repos' },
615
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
616
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
617
- { title: '30min Timeout', tooltip: 'Workspaces without user activity are stopped after 30 minutes' }
645
+ { title: "Private & Public repos" },
646
+ {
647
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
648
+ tooltip: "The number of workspaces running at the same time",
649
+ },
650
+ {
651
+ title: "Team Manageable",
652
+ link: "/teams/",
653
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
654
+ },
655
+ {
656
+ title: "30min Timeout",
657
+ tooltip: "Workspaces without user activity are stopped after 30 minutes",
658
+ },
618
659
  ];
619
660
 
620
661
  // Unleashed
621
662
  case "professional":
622
663
  return [
623
- { title: 'Private & Public repos' },
624
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
625
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
626
- { title: '1h Timeout', tooltip: 'Workspaces without user activity are stopped after 1 hour' },
627
- { title: '3h Timeout Boost', tooltip: 'You can manually boost the timeout to 3 hours within a running workspace' }
664
+ { title: "Private & Public repos" },
665
+ {
666
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
667
+ tooltip: "The number of workspaces running at the same time",
668
+ },
669
+ {
670
+ title: "Team Manageable",
671
+ link: "/teams/",
672
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
673
+ },
674
+ { title: "1h Timeout", tooltip: "Workspaces without user activity are stopped after 1 hour" },
675
+ {
676
+ title: "3h Timeout Boost",
677
+ tooltip: "You can manually boost the timeout to 3 hours within a running workspace",
678
+ },
628
679
  ];
629
680
  }
630
681
  };