@gitpod/gitpod-protocol 0.1.5-wth-test.41 → 0.1.5-yh-vmoptions-fork.3

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 (311) hide show
  1. package/data/gitpod-schema.json +199 -7
  2. package/lib/accounting-protocol.d.ts +17 -10
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +30 -32
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +12 -0
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js.map +1 -1
  9. package/lib/analytics.d.ts +4 -5
  10. package/lib/analytics.d.ts.map +1 -1
  11. package/lib/analytics.js.map +1 -1
  12. package/lib/auth.d.ts.map +1 -1
  13. package/lib/context-url.d.ts +18 -5
  14. package/lib/context-url.d.ts.map +1 -1
  15. package/lib/context-url.js +59 -6
  16. package/lib/context-url.js.map +1 -1
  17. package/lib/context-url.spec.d.ts +2 -0
  18. package/lib/context-url.spec.d.ts.map +1 -1
  19. package/lib/context-url.spec.js +40 -4
  20. package/lib/context-url.spec.js.map +1 -1
  21. package/lib/email-protocol.d.ts +1 -1
  22. package/lib/email-protocol.d.ts.map +1 -1
  23. package/lib/email-protocol.js.map +1 -1
  24. package/lib/encryption/container-module.d.ts.map +1 -1
  25. package/lib/encryption/container-module.js +1 -1
  26. package/lib/encryption/container-module.js.map +1 -1
  27. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  28. package/lib/encryption/encryption-engine.js +7 -7
  29. package/lib/encryption/encryption-engine.js.map +1 -1
  30. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  31. package/lib/encryption/encryption-engine.spec.js +2 -3
  32. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  33. package/lib/encryption/encryption-service.d.ts.map +1 -1
  34. package/lib/encryption/encryption-service.js +1 -1
  35. package/lib/encryption/encryption-service.js.map +1 -1
  36. package/lib/encryption/key-provider.d.ts.map +1 -1
  37. package/lib/encryption/key-provider.js +7 -9
  38. package/lib/encryption/key-provider.js.map +1 -1
  39. package/lib/env.d.ts +0 -5
  40. package/lib/env.d.ts.map +1 -1
  41. package/lib/env.js +1 -20
  42. package/lib/env.js.map +1 -1
  43. package/lib/gitpod-file-parser.d.ts.map +1 -1
  44. package/lib/gitpod-file-parser.js +6 -6
  45. package/lib/gitpod-file-parser.js.map +1 -1
  46. package/lib/gitpod-file-parser.spec.js +42 -39
  47. package/lib/gitpod-file-parser.spec.js.map +1 -1
  48. package/lib/gitpod-service.d.ts +61 -28
  49. package/lib/gitpod-service.d.ts.map +1 -1
  50. package/lib/gitpod-service.js +43 -34
  51. package/lib/gitpod-service.js.map +1 -1
  52. package/lib/headless-workspace-log.d.ts +1 -0
  53. package/lib/headless-workspace-log.d.ts.map +1 -1
  54. package/lib/headless-workspace-log.js +2 -1
  55. package/lib/headless-workspace-log.js.map +1 -1
  56. package/lib/ide-frontend-service.d.ts +1 -1
  57. package/lib/ide-protocol.d.ts +105 -0
  58. package/lib/ide-protocol.d.ts.map +1 -0
  59. package/lib/ide-protocol.js +8 -0
  60. package/lib/ide-protocol.js.map +1 -0
  61. package/lib/index.d.ts +16 -14
  62. package/lib/index.d.ts.map +1 -1
  63. package/lib/index.js +2 -0
  64. package/lib/index.js.map +1 -1
  65. package/lib/installation-admin-protocol.d.ts +27 -0
  66. package/lib/installation-admin-protocol.d.ts.map +1 -0
  67. package/lib/installation-admin-protocol.js +30 -0
  68. package/lib/installation-admin-protocol.js.map +1 -0
  69. package/lib/license-protocol.d.ts +7 -0
  70. package/lib/license-protocol.d.ts.map +1 -1
  71. package/lib/license-protocol.js.map +1 -1
  72. package/lib/messaging/browser/connection.d.ts +1 -1
  73. package/lib/messaging/browser/connection.d.ts.map +1 -1
  74. package/lib/messaging/browser/connection.js +19 -19
  75. package/lib/messaging/browser/connection.js.map +1 -1
  76. package/lib/messaging/browser/window-connection.d.ts +4 -4
  77. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  78. package/lib/messaging/browser/window-connection.js +9 -6
  79. package/lib/messaging/browser/window-connection.js.map +1 -1
  80. package/lib/messaging/client-call-metrics.d.ts +2 -2
  81. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  82. package/lib/messaging/client-call-metrics.js +20 -20
  83. package/lib/messaging/client-call-metrics.js.map +1 -1
  84. package/lib/messaging/error.d.ts +3 -0
  85. package/lib/messaging/error.d.ts.map +1 -1
  86. package/lib/messaging/error.js +6 -0
  87. package/lib/messaging/error.js.map +1 -1
  88. package/lib/messaging/handler.d.ts.map +1 -1
  89. package/lib/messaging/handler.js +1 -1
  90. package/lib/messaging/node/connection.d.ts +1 -17
  91. package/lib/messaging/node/connection.d.ts.map +1 -1
  92. package/lib/messaging/node/connection.js +23 -59
  93. package/lib/messaging/node/connection.js.map +1 -1
  94. package/lib/messaging/proxy-factory.d.ts +1 -1
  95. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  96. package/lib/messaging/proxy-factory.js +7 -9
  97. package/lib/messaging/proxy-factory.js.map +1 -1
  98. package/lib/oss-allowlist.d.ts +14 -0
  99. package/lib/oss-allowlist.d.ts.map +1 -0
  100. package/lib/oss-allowlist.js +8 -0
  101. package/lib/oss-allowlist.js.map +1 -0
  102. package/lib/payment-protocol.d.ts.map +1 -1
  103. package/lib/payment-protocol.js +1 -1
  104. package/lib/payment-protocol.js.map +1 -1
  105. package/lib/permission.d.ts +9 -3
  106. package/lib/permission.d.ts.map +1 -1
  107. package/lib/permission.js +34 -25
  108. package/lib/permission.js.map +1 -1
  109. package/lib/plans.d.ts +3 -3
  110. package/lib/plans.d.ts.map +1 -1
  111. package/lib/plans.js +206 -171
  112. package/lib/plans.js.map +1 -1
  113. package/lib/protocol.d.ts +109 -74
  114. package/lib/protocol.d.ts.map +1 -1
  115. package/lib/protocol.js +177 -87
  116. package/lib/protocol.js.map +1 -1
  117. package/lib/snapshot-url.spec.js.map +1 -1
  118. package/lib/team-subscription-protocol.d.ts +21 -3
  119. package/lib/team-subscription-protocol.d.ts.map +1 -1
  120. package/lib/team-subscription-protocol.js +16 -5
  121. package/lib/team-subscription-protocol.js.map +1 -1
  122. package/lib/teams-projects-protocol.d.ts +17 -2
  123. package/lib/teams-projects-protocol.d.ts.map +1 -1
  124. package/lib/teams-projects-protocol.js +8 -1
  125. package/lib/teams-projects-protocol.js.map +1 -1
  126. package/lib/typings/globals.d.ts +2 -2
  127. package/lib/typings/globals.d.ts.map +1 -1
  128. package/lib/util/analytics.d.ts.map +1 -1
  129. package/lib/util/analytics.js +12 -3
  130. package/lib/util/analytics.js.map +1 -1
  131. package/lib/util/async-iterator.d.ts.map +1 -1
  132. package/lib/util/async-iterator.js +3 -3
  133. package/lib/util/async-iterator.js.map +1 -1
  134. package/lib/util/cancelable.js.map +1 -1
  135. package/lib/util/date-time.js +6 -6
  136. package/lib/util/date-time.js.map +1 -1
  137. package/lib/util/deferred.js.map +1 -1
  138. package/lib/util/disposable.d.ts.map +1 -1
  139. package/lib/util/disposable.js +2 -2
  140. package/lib/util/disposable.js.map +1 -1
  141. package/lib/util/event.d.ts.map +1 -1
  142. package/lib/util/event.js +5 -3
  143. package/lib/util/event.js.map +1 -1
  144. package/lib/util/garbage-collected-cache.d.ts +1 -0
  145. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  146. package/lib/util/garbage-collected-cache.js +6 -2
  147. package/lib/util/garbage-collected-cache.js.map +1 -1
  148. package/lib/util/generate-workspace-id.d.ts +6 -1
  149. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  150. package/lib/util/generate-workspace-id.js +461 -440
  151. package/lib/util/generate-workspace-id.js.map +1 -1
  152. package/lib/util/generate-workspace-id.spec.js +36 -1
  153. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  154. package/lib/util/gitpod-cookie.d.ts +1 -1
  155. package/lib/util/gitpod-cookie.d.ts.map +1 -1
  156. package/lib/util/gitpod-cookie.js +0 -3
  157. package/lib/util/gitpod-cookie.js.map +1 -1
  158. package/lib/util/gitpod-host-url.d.ts +0 -1
  159. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  160. package/lib/util/gitpod-host-url.js +34 -35
  161. package/lib/util/gitpod-host-url.js.map +1 -1
  162. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  163. package/lib/util/gitpod-host-url.spec.js +15 -5
  164. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  165. package/lib/util/grpc.d.ts.map +1 -1
  166. package/lib/util/grpc.js.map +1 -1
  167. package/lib/util/jaeger-client-types.d.ts +68 -0
  168. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  169. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  170. package/lib/util/jaeger-client-types.js.map +1 -0
  171. package/lib/util/logging.d.ts +1 -1
  172. package/lib/util/logging.d.ts.map +1 -1
  173. package/lib/util/logging.js +23 -24
  174. package/lib/util/logging.js.map +1 -1
  175. package/lib/util/make-link.js +5 -5
  176. package/lib/util/make-link.js.map +1 -1
  177. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  178. package/lib/util/parse-workspace-id.js +2 -3
  179. package/lib/util/parse-workspace-id.js.map +1 -1
  180. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  181. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  182. package/lib/util/queue.spec.js +9 -6
  183. package/lib/util/queue.spec.js.map +1 -1
  184. package/lib/util/repeat.d.ts +15 -0
  185. package/lib/util/repeat.d.ts.map +1 -0
  186. package/lib/util/repeat.js +55 -0
  187. package/lib/util/repeat.js.map +1 -0
  188. package/lib/util/semaphore.d.ts.map +1 -1
  189. package/lib/util/semaphore.js.map +1 -1
  190. package/lib/util/skip-if.d.ts.map +1 -1
  191. package/lib/util/skip-if.js.map +1 -1
  192. package/lib/util/timeutil.d.ts +1 -0
  193. package/lib/util/timeutil.d.ts.map +1 -1
  194. package/lib/util/timeutil.js +9 -3
  195. package/lib/util/timeutil.js.map +1 -1
  196. package/lib/util/timeutil.spec.d.ts.map +1 -1
  197. package/lib/util/timeutil.spec.js.map +1 -1
  198. package/lib/util/tracing.d.ts +52 -6
  199. package/lib/util/tracing.d.ts.map +1 -1
  200. package/lib/util/tracing.js +156 -19
  201. package/lib/util/tracing.js.map +1 -1
  202. package/lib/util/tracing.spec.d.ts +7 -0
  203. package/lib/util/tracing.spec.d.ts.map +1 -0
  204. package/lib/util/tracing.spec.js +121 -0
  205. package/lib/util/tracing.spec.js.map +1 -0
  206. package/lib/util/workspace-port-authentication.d.ts +7 -7
  207. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  208. package/lib/util/workspace-port-authentication.js +8 -11
  209. package/lib/util/workspace-port-authentication.js.map +1 -1
  210. package/lib/workspace-cluster.d.ts +10 -8
  211. package/lib/workspace-cluster.d.ts.map +1 -1
  212. package/lib/workspace-cluster.js +16 -1
  213. package/lib/workspace-cluster.js.map +1 -1
  214. package/lib/workspace-instance.d.ts +38 -3
  215. package/lib/workspace-instance.d.ts.map +1 -1
  216. package/lib/wsready.d.ts +1 -1
  217. package/lib/wsready.d.ts.map +1 -1
  218. package/lib/wsready.js +2 -2
  219. package/package.json +10 -8
  220. package/pkg-yarn.lock +6 -6
  221. package/provenance-bundle.jsonl +2 -0
  222. package/src/accounting-protocol.ts +63 -51
  223. package/src/admin-protocol.ts +35 -18
  224. package/src/analytics.ts +26 -28
  225. package/src/auth.ts +2 -2
  226. package/src/context-url.spec.ts +37 -9
  227. package/src/context-url.ts +94 -36
  228. package/src/email-protocol.ts +5 -6
  229. package/src/encryption/container-module.ts +2 -3
  230. package/src/encryption/encryption-engine.spec.ts +9 -8
  231. package/src/encryption/encryption-engine.ts +14 -14
  232. package/src/encryption/encryption-service.ts +4 -5
  233. package/src/encryption/key-provider.ts +16 -19
  234. package/src/env.ts +0 -22
  235. package/src/gitpod-file-parser.spec.ts +55 -61
  236. package/src/gitpod-file-parser.ts +16 -17
  237. package/src/gitpod-service.ts +185 -112
  238. package/src/headless-workspace-log.ts +6 -4
  239. package/src/ide-frontend-service.ts +2 -2
  240. package/src/ide-protocol.ts +119 -0
  241. package/src/index.ts +16 -14
  242. package/src/installation-admin-protocol.ts +42 -0
  243. package/src/license-protocol.ts +12 -6
  244. package/src/messaging/browser/connection.ts +45 -47
  245. package/src/messaging/browser/window-connection.ts +39 -29
  246. package/src/messaging/client-call-metrics.ts +70 -71
  247. package/src/messaging/error.ts +10 -3
  248. package/src/messaging/handler.ts +6 -6
  249. package/src/messaging/node/connection.ts +23 -70
  250. package/src/messaging/proxy-factory.ts +23 -30
  251. package/src/oss-allowlist.ts +15 -0
  252. package/src/payment-protocol.ts +2 -2
  253. package/src/permission.ts +40 -32
  254. package/src/plans.ts +236 -189
  255. package/src/protocol.ts +383 -275
  256. package/src/snapshot-url.spec.ts +9 -7
  257. package/src/team-subscription-protocol.ts +57 -23
  258. package/src/teams-projects-protocol.ts +29 -8
  259. package/src/typings/globals.ts +4 -4
  260. package/src/util/analytics.ts +46 -24
  261. package/src/util/async-iterator.ts +4 -5
  262. package/src/util/cancelable.ts +3 -3
  263. package/src/util/date-time.ts +8 -8
  264. package/src/util/deferred.ts +6 -6
  265. package/src/util/disposable.ts +3 -6
  266. package/src/util/event.ts +9 -11
  267. package/src/util/garbage-collected-cache.ts +9 -6
  268. package/src/util/generate-workspace-id.spec.ts +34 -7
  269. package/src/util/generate-workspace-id.ts +464 -440
  270. package/src/util/gitpod-cookie.ts +8 -9
  271. package/src/util/gitpod-host-url.spec.ts +40 -13
  272. package/src/util/gitpod-host-url.ts +40 -41
  273. package/src/util/grpc.ts +1 -1
  274. package/src/util/jaeger-client-types.ts +102 -0
  275. package/src/util/logging.ts +49 -40
  276. package/src/util/make-link.ts +6 -7
  277. package/src/util/parse-workspace-id.spec.ts +17 -8
  278. package/src/util/parse-workspace-id.ts +6 -7
  279. package/src/util/queue.spec.ts +27 -25
  280. package/src/util/repeat.ts +45 -0
  281. package/src/util/semaphore.ts +4 -6
  282. package/src/util/skip-if.ts +9 -6
  283. package/src/util/timeutil.spec.ts +14 -15
  284. package/src/util/timeutil.ts +21 -11
  285. package/src/util/tracing.spec.ts +88 -0
  286. package/src/util/tracing.ts +200 -31
  287. package/src/util/workspace-port-authentication.ts +10 -13
  288. package/src/workspace-cluster.ts +26 -15
  289. package/src/workspace-instance.ts +69 -20
  290. package/src/wsready.ts +3 -3
  291. package/data/builtin-theia-plugins.json +0 -372
  292. package/lib/messaging/connection-error-handler.d.ts +0 -27
  293. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  294. package/lib/messaging/connection-error-handler.js +0 -34
  295. package/lib/messaging/connection-error-handler.js.map +0 -1
  296. package/lib/theia-plugins.d.ts +0 -11
  297. package/lib/theia-plugins.d.ts.map +0 -1
  298. package/lib/theia-plugins.js.map +0 -1
  299. package/lib/util/repeater.d.ts +0 -22
  300. package/lib/util/repeater.d.ts.map +0 -1
  301. package/lib/util/repeater.js +0 -65
  302. package/lib/util/repeater.js.map +0 -1
  303. package/lib/util/safe-promise.d.ts +0 -11
  304. package/lib/util/safe-promise.d.ts.map +0 -1
  305. package/lib/util/safe-promise.js +0 -31
  306. package/lib/util/safe-promise.js.map +0 -1
  307. package/src/messaging/connection-error-handler.ts +0 -62
  308. package/src/theia-plugins.ts +0 -11
  309. package/src/util/jaeger-client.d.ts +0 -105
  310. package/src/util/repeater.ts +0 -49
  311. package/src/util/safe-promise.ts +0 -26
package/lib/plans.js CHANGED
@@ -9,46 +9,46 @@ exports.Plans = exports.ABSOLUTE_MAX_USAGE = exports.Coupons = exports.Coupon =
9
9
  var Currency;
10
10
  (function (Currency) {
11
11
  Currency.getAll = () => {
12
- return ['USD', 'EUR'];
12
+ return ["USD", "EUR"];
13
13
  };
14
14
  Currency.getSymbol = (c) => {
15
- return c === 'USD' ? '$' : '';
15
+ return c === "USD" ? "$" : "";
16
16
  };
17
17
  })(Currency = exports.Currency || (exports.Currency = {}));
18
18
  var Plan;
19
19
  (function (Plan) {
20
20
  Plan.is = (o) => {
21
- return 'chargebeeId' in o
22
- && 'name' in o
23
- && 'currency' in o
24
- && 'pricePerMonth' in o
25
- && 'hoursPerMonth' in o
26
- && 'type' in o;
21
+ return ("chargebeeId" in o &&
22
+ "name" in o &&
23
+ "currency" in o &&
24
+ "pricePerMonth" in o &&
25
+ "hoursPerMonth" in o &&
26
+ "type" in o);
27
27
  };
28
28
  })(Plan = exports.Plan || (exports.Plan = {}));
29
29
  exports.MAX_PARALLEL_WORKSPACES = 16;
30
30
  var Coupon;
31
31
  (function (Coupon) {
32
32
  Coupon.is = (o) => {
33
- return 'id' in o;
33
+ return "id" in o;
34
34
  };
35
35
  })(Coupon = exports.Coupon || (exports.Coupon = {}));
36
36
  var Coupons;
37
37
  (function (Coupons) {
38
38
  Coupons.INTERNAL_GITPOD_GHSP = {
39
39
  id: "INTERNAL_GITPOD_GHSP",
40
- isGithubStudentCoupon: true
40
+ isGithubStudentCoupon: true,
41
41
  };
42
42
  Coupons.INTERNAL_GITPOD_GHSP_2 = {
43
43
  id: "INTERNAL_GITPOD_GHSP_2",
44
- isGithubStudentCoupon: true
44
+ isGithubStudentCoupon: true,
45
45
  };
46
46
  Coupons.GITHUBSTUDENTPACKFORFACULTY = {
47
47
  id: "GITHUBSTUDENTPACKFORFACULTY",
48
- isGithubStudentCoupon: true
48
+ isGithubStudentCoupon: true,
49
49
  };
50
50
  Coupons.isGithubStudentCoupon = (id) => {
51
- const c = Coupons.getAllCoupons().find(ic => ic.id === id);
51
+ const c = Coupons.getAllCoupons().find((ic) => ic.id === id);
52
52
  if (!c) {
53
53
  return undefined;
54
54
  }
@@ -56,8 +56,8 @@ var Coupons;
56
56
  };
57
57
  Coupons.getAllCoupons = () => {
58
58
  return Object.keys(Coupons)
59
- .map(k => Coupons[k])
60
- .filter(a => typeof a === 'object' && Coupon.is(a));
59
+ .map((k) => Coupons[k])
60
+ .filter((a) => typeof a === "object" && Coupon.is(a));
61
61
  };
62
62
  })(Coupons = exports.Coupons || (exports.Coupons = {}));
63
63
  // Theoretical maximum of workspace hours: 16 workspaces for 24h a day for 31 days as permitted by the v3 unlimited plan
@@ -95,243 +95,243 @@ var Plans;
95
95
  * The old default plan (v1): 100h hours for public repos
96
96
  */
97
97
  Plans.FREE = {
98
- chargebeeId: 'free',
98
+ chargebeeId: "free",
99
99
  githubId: 2034,
100
100
  githubPlanNumber: 1,
101
- type: 'free',
102
- name: 'Open Source',
103
- currency: 'USD',
101
+ type: "free",
102
+ name: "Open Source",
103
+ currency: "USD",
104
104
  pricePerMonth: 0,
105
- hoursPerMonth: 100
105
+ hoursPerMonth: 100,
106
106
  };
107
107
  /**
108
108
  * The new default plan (v3): 50h hours for public repos
109
109
  */
110
110
  Plans.FREE_50 = {
111
- chargebeeId: 'free-50',
111
+ chargebeeId: "free-50",
112
112
  githubId: 4902,
113
113
  githubPlanNumber: 5,
114
- type: 'free-50',
115
- name: 'Open Source',
116
- currency: 'USD',
114
+ type: "free-50",
115
+ name: "Open Source",
116
+ currency: "USD",
117
117
  pricePerMonth: 0,
118
- hoursPerMonth: 50
118
+ hoursPerMonth: 50,
119
119
  };
120
120
  /**
121
121
  * Users created after this date get the FREE_50 plan (v3) instead of the (old) FREE plan (v1)
122
122
  */
123
- Plans.FREE_50_START_DATE = '2019-12-19T00:00:00.000Z';
123
+ Plans.FREE_50_START_DATE = "2019-12-19T00:00:00.000Z";
124
124
  /**
125
125
  * The 'Professional Open Source' plan was introduced to offer professional open-souce developers unlimited hours.
126
126
  */
127
127
  Plans.FREE_OPEN_SOURCE = {
128
- chargebeeId: 'free-open-source',
129
- type: 'free-open-source',
130
- name: 'Professional Open Source',
131
- currency: 'USD',
128
+ chargebeeId: "free-open-source",
129
+ type: "free-open-source",
130
+ name: "Professional Open Source",
131
+ currency: "USD",
132
132
  pricePerMonth: 0,
133
- hoursPerMonth: 'unlimited'
133
+ hoursPerMonth: "unlimited",
134
134
  };
135
135
  /**
136
136
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
137
137
  */
138
138
  Plans.PROFESSIONAL_STUDENT_EUR = {
139
- chargebeeId: 'professional-student-eur',
140
- type: 'student',
141
- name: 'Student Unleashed',
142
- currency: 'EUR',
139
+ chargebeeId: "professional-student-eur",
140
+ type: "student",
141
+ name: "Student Unleashed",
142
+ currency: "EUR",
143
143
  pricePerMonth: 8,
144
- hoursPerMonth: 'unlimited'
144
+ hoursPerMonth: "unlimited",
145
145
  };
146
146
  /**
147
147
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
148
148
  */
149
149
  Plans.PROFESSIONAL_STUDENT_USD = {
150
- chargebeeId: 'professional-student-usd',
151
- type: 'student',
152
- name: 'Student Unleashed',
153
- currency: 'USD',
150
+ chargebeeId: "professional-student-usd",
151
+ type: "student",
152
+ name: "Student Unleashed",
153
+ currency: "USD",
154
154
  pricePerMonth: 9,
155
- hoursPerMonth: 'unlimited'
155
+ hoursPerMonth: "unlimited",
156
156
  };
157
157
  /**
158
158
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
159
159
  */
160
160
  Plans.TEAM_PROFESSIONAL_STUDENT_EUR = {
161
- chargebeeId: 'team-professional-student-eur',
162
- type: 'student',
163
- name: 'Team Student Unleashed',
161
+ chargebeeId: "team-professional-student-eur",
162
+ type: "student",
163
+ name: "Team Student Unleashed",
164
164
  team: true,
165
- currency: 'EUR',
165
+ currency: "EUR",
166
166
  pricePerMonth: 8,
167
- hoursPerMonth: 'unlimited'
167
+ hoursPerMonth: "unlimited",
168
168
  };
169
169
  /**
170
170
  * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
171
171
  */
172
172
  Plans.TEAM_PROFESSIONAL_STUDENT_USD = {
173
- chargebeeId: 'team-professional-student-usd',
174
- type: 'student',
175
- name: 'Team Student Unleashed',
173
+ chargebeeId: "team-professional-student-usd",
174
+ type: "student",
175
+ name: "Team Student Unleashed",
176
176
  team: true,
177
- currency: 'USD',
177
+ currency: "USD",
178
178
  pricePerMonth: 9,
179
- hoursPerMonth: 'unlimited'
179
+ hoursPerMonth: "unlimited",
180
180
  };
181
181
  /**
182
182
  * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
183
183
  */
184
184
  Plans.BASIC_EUR = {
185
- chargebeeId: 'basic-eur',
186
- type: 'basic',
187
- name: 'Standard',
188
- currency: 'EUR',
185
+ chargebeeId: "basic-eur",
186
+ type: "basic",
187
+ name: "Standard",
188
+ currency: "EUR",
189
189
  pricePerMonth: 17,
190
- hoursPerMonth: 100
190
+ hoursPerMonth: 100,
191
191
  };
192
192
  /**
193
193
  * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
194
194
  */
195
195
  Plans.BASIC_USD = {
196
- chargebeeId: 'basic-usd',
196
+ chargebeeId: "basic-usd",
197
197
  githubId: 2035,
198
198
  githubPlanNumber: 2,
199
- type: 'basic',
200
- name: 'Standard',
201
- currency: 'USD',
199
+ type: "basic",
200
+ name: "Standard",
201
+ currency: "USD",
202
202
  pricePerMonth: 19,
203
- hoursPerMonth: 100
203
+ hoursPerMonth: 100,
204
204
  };
205
205
  /**
206
206
  * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
207
207
  */
208
208
  Plans.PERSONAL_EUR = {
209
- chargebeeId: 'personal-eur',
210
- type: 'personal',
211
- name: 'Personal',
212
- currency: 'EUR',
209
+ chargebeeId: "personal-eur",
210
+ type: "personal",
211
+ name: "Personal",
212
+ currency: "EUR",
213
213
  pricePerMonth: 8,
214
- hoursPerMonth: 100
214
+ hoursPerMonth: 100,
215
215
  };
216
216
  /**
217
217
  * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
218
218
  */
219
219
  Plans.PERSONAL_USD = {
220
- chargebeeId: 'personal-usd',
220
+ chargebeeId: "personal-usd",
221
221
  githubId: 2274,
222
222
  githubPlanNumber: 4,
223
- type: 'personal',
224
- name: 'Personal',
225
- currency: 'USD',
223
+ type: "personal",
224
+ name: "Personal",
225
+ currency: "USD",
226
226
  pricePerMonth: 9,
227
- hoursPerMonth: 100
227
+ hoursPerMonth: 100,
228
228
  };
229
229
  /**
230
230
  * This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
231
231
  * Unleashed (39$/35€) on the right.
232
232
  */
233
233
  Plans.PROFESSIONAL_NEW_EUR = {
234
- chargebeeId: 'professional-new-eur',
235
- type: 'professional-new',
236
- name: 'Professional',
237
- currency: 'EUR',
234
+ chargebeeId: "professional-new-eur",
235
+ type: "professional-new",
236
+ name: "Professional",
237
+ currency: "EUR",
238
238
  pricePerMonth: 23,
239
- hoursPerMonth: 'unlimited'
239
+ hoursPerMonth: "unlimited",
240
240
  };
241
241
  /**
242
242
  * This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
243
243
  * Unleashed (39$/35€) on the right.
244
244
  */
245
245
  Plans.PROFESSIONAL_NEW_USD = {
246
- chargebeeId: 'professional-new-usd',
247
- type: 'professional-new',
248
- name: 'Professional',
249
- currency: 'USD',
246
+ chargebeeId: "professional-new-usd",
247
+ type: "professional-new",
248
+ name: "Professional",
249
+ currency: "USD",
250
250
  pricePerMonth: 25,
251
- hoursPerMonth: 'unlimited'
251
+ hoursPerMonth: "unlimited",
252
252
  };
253
253
  /**
254
254
  * This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
255
255
  * Unleashed (39$/35€) on the right.
256
256
  */
257
257
  Plans.TEAM_PROFESSIONAL_NEW_EUR = {
258
- chargebeeId: 'team-professional-new-eur',
259
- type: 'professional-new',
260
- name: 'Team Professional',
261
- currency: 'EUR',
258
+ chargebeeId: "team-professional-new-eur",
259
+ type: "professional-new",
260
+ name: "Team Professional",
261
+ currency: "EUR",
262
262
  team: true,
263
263
  pricePerMonth: 23,
264
- hoursPerMonth: 'unlimited'
264
+ hoursPerMonth: "unlimited",
265
265
  };
266
266
  /**
267
267
  * This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
268
268
  * Unleashed (39$/35€) on the right.
269
269
  */
270
270
  Plans.TEAM_PROFESSIONAL_NEW_USD = {
271
- chargebeeId: 'team-professional-new-usd',
272
- type: 'professional-new',
273
- name: 'Team Professional',
274
- currency: 'USD',
271
+ chargebeeId: "team-professional-new-usd",
272
+ type: "professional-new",
273
+ name: "Team Professional",
274
+ currency: "USD",
275
275
  team: true,
276
276
  pricePerMonth: 25,
277
- hoursPerMonth: 'unlimited'
277
+ hoursPerMonth: "unlimited",
278
278
  };
279
279
  /**
280
280
  * This is the 'Unleashed' plan (v1, rebranded v2, v5)
281
281
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
282
282
  */
283
283
  Plans.PROFESSIONAL_EUR = {
284
- chargebeeId: 'professional-eur',
285
- type: 'professional',
286
- name: 'Unleashed',
287
- currency: 'EUR',
284
+ chargebeeId: "professional-eur",
285
+ type: "professional",
286
+ name: "Unleashed",
287
+ currency: "EUR",
288
288
  pricePerMonth: 35,
289
- hoursPerMonth: 'unlimited'
289
+ hoursPerMonth: "unlimited",
290
290
  };
291
291
  /**
292
292
  * This is the 'Unleashed' plan (v1, rebranded v2, v5)
293
293
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
294
294
  */
295
295
  Plans.PROFESSIONAL_USD = {
296
- chargebeeId: 'professional-usd',
296
+ chargebeeId: "professional-usd",
297
297
  githubId: 2036,
298
298
  githubPlanNumber: 3,
299
- type: 'professional',
300
- name: 'Unleashed',
301
- currency: 'USD',
299
+ type: "professional",
300
+ name: "Unleashed",
301
+ currency: "USD",
302
302
  pricePerMonth: 39,
303
- hoursPerMonth: 'unlimited'
303
+ hoursPerMonth: "unlimited",
304
304
  };
305
305
  /**
306
306
  * This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
307
307
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
308
308
  */
309
309
  Plans.TEAM_PROFESSIONAL_USD = {
310
- chargebeeId: 'team-professional-usd',
311
- type: 'professional',
312
- name: 'Team Unleashed',
313
- currency: 'USD',
310
+ chargebeeId: "team-professional-usd",
311
+ type: "professional",
312
+ name: "Team Unleashed",
313
+ currency: "USD",
314
314
  team: true,
315
315
  pricePerMonth: 39,
316
- hoursPerMonth: 'unlimited'
316
+ hoursPerMonth: "unlimited",
317
317
  };
318
318
  /**
319
319
  * This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
320
320
  * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
321
321
  */
322
322
  Plans.TEAM_PROFESSIONAL_EUR = {
323
- chargebeeId: 'team-professional-eur',
324
- type: 'professional',
325
- name: 'Team Unleashed',
326
- currency: 'EUR',
323
+ chargebeeId: "team-professional-eur",
324
+ type: "professional",
325
+ name: "Team Unleashed",
326
+ currency: "EUR",
327
327
  team: true,
328
328
  pricePerMonth: 35,
329
- hoursPerMonth: 'unlimited'
329
+ hoursPerMonth: "unlimited",
330
330
  };
331
331
  const getAllPlans = () => {
332
332
  return Object.keys(Plans)
333
- .map(k => Plans[k])
334
- .filter(a => typeof a === 'object' && Plan.is(a));
333
+ .map((k) => Plans[k])
334
+ .filter((a) => typeof a === "object" && Plan.is(a));
335
335
  };
336
336
  /**
337
337
  * This function returns all individual plans that might be active (= we have subscriptions for) at the moment
@@ -345,68 +345,70 @@ var Plans;
345
345
  Plans.PROFESSIONAL_NEW_EUR,
346
346
  Plans.PROFESSIONAL_NEW_USD,
347
347
  Plans.PROFESSIONAL_EUR,
348
- Plans.PROFESSIONAL_USD
349
- ];
350
- return [
351
- Plans.FREE,
352
- Plans.FREE_50,
353
- Plans.FREE_OPEN_SOURCE,
354
- ...availablePaidPlans.filter(p => p.currency)
348
+ Plans.PROFESSIONAL_USD,
355
349
  ];
350
+ return [Plans.FREE, Plans.FREE_50, Plans.FREE_OPEN_SOURCE, ...availablePaidPlans.filter((p) => p.currency)];
356
351
  }
357
352
  Plans.getAvailablePlans = getAvailablePlans;
358
- ;
359
353
  Plans.getAvailableTeamPlans = (currency) => {
360
- const teamPlans = getAllPlans().filter(p => !!p.team);
361
- return currency ? teamPlans.filter(p => p.currency === currency) : teamPlans;
354
+ const teamPlans = getAllPlans().filter((p) => !!p.team);
355
+ return currency ? teamPlans.filter((p) => p.currency === currency) : teamPlans;
362
356
  };
363
357
  function getById(id) {
364
358
  if (id === undefined) {
365
359
  return undefined;
366
360
  }
367
- return getAllPlans()
368
- .find(p => p.chargebeeId === id) || undefined;
361
+ return getAllPlans().find((p) => p.chargebeeId === id) || undefined;
369
362
  }
370
363
  Plans.getById = getById;
371
- ;
372
364
  function getByTypeAndCurrency(type, currency) {
373
365
  return getAllPlans()
374
- .filter(p => p.type)
375
- .find(p => p.currency === currency);
366
+ .filter((p) => p.type)
367
+ .find((p) => p.currency === currency);
376
368
  }
377
369
  Plans.getByTypeAndCurrency = getByTypeAndCurrency;
378
370
  function getProPlan(currency) {
379
371
  switch (currency) {
380
- case "EUR": return Plans.PROFESSIONAL_EUR;
381
- case "USD": return Plans.PROFESSIONAL_USD;
372
+ case "EUR":
373
+ return Plans.PROFESSIONAL_EUR;
374
+ case "USD":
375
+ return Plans.PROFESSIONAL_USD;
382
376
  }
383
377
  }
384
378
  Plans.getProPlan = getProPlan;
385
379
  function getNewProPlan(currency) {
386
380
  switch (currency) {
387
- case "EUR": return Plans.PROFESSIONAL_NEW_EUR;
388
- case "USD": return Plans.PROFESSIONAL_NEW_USD;
381
+ case "EUR":
382
+ return Plans.PROFESSIONAL_NEW_EUR;
383
+ case "USD":
384
+ return Plans.PROFESSIONAL_NEW_USD;
389
385
  }
390
386
  }
391
387
  Plans.getNewProPlan = getNewProPlan;
392
388
  function getStudentProPlan(currency) {
393
389
  switch (currency) {
394
- case "EUR": return Plans.PROFESSIONAL_STUDENT_EUR;
395
- case "USD": return Plans.PROFESSIONAL_STUDENT_USD;
390
+ case "EUR":
391
+ return Plans.PROFESSIONAL_STUDENT_EUR;
392
+ case "USD":
393
+ return Plans.PROFESSIONAL_STUDENT_USD;
396
394
  }
397
395
  }
398
396
  Plans.getStudentProPlan = getStudentProPlan;
399
397
  function getBasicPlan(currency) {
400
398
  switch (currency) {
401
- case "EUR": return Plans.BASIC_EUR;
402
- case "USD": return Plans.BASIC_USD;
399
+ case "EUR":
400
+ return Plans.BASIC_EUR;
401
+ case "USD":
402
+ return Plans.BASIC_USD;
403
403
  }
404
404
  }
405
405
  Plans.getBasicPlan = getBasicPlan;
406
406
  function getPersonalPlan(currency) {
407
407
  switch (currency) {
408
- case "EUR": return Plans.PERSONAL_EUR;
409
- case "USD": return Plans.PERSONAL_USD;
408
+ case "EUR":
409
+ return Plans.PERSONAL_EUR;
410
+ case "USD":
411
+ return Plans.PERSONAL_USD;
410
412
  }
411
413
  }
412
414
  Plans.getPersonalPlan = getPersonalPlan;
@@ -415,9 +417,9 @@ var Plans;
415
417
  }
416
418
  Plans.getFreePlan = getFreePlan;
417
419
  function isFreePlan(chargebeeId) {
418
- return chargebeeId === Plans.FREE.chargebeeId
419
- || chargebeeId === Plans.FREE_50.chargebeeId
420
- || chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId;
420
+ return (chargebeeId === Plans.FREE.chargebeeId ||
421
+ chargebeeId === Plans.FREE_50.chargebeeId ||
422
+ chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId);
421
423
  }
422
424
  Plans.isFreePlan = isFreePlan;
423
425
  function isFreeNonTransientPlan(chargebeeId) {
@@ -425,7 +427,7 @@ var Plans;
425
427
  }
426
428
  Plans.isFreeNonTransientPlan = isFreeNonTransientPlan;
427
429
  function getHoursPerMonth(plan) {
428
- return plan.hoursPerMonth == 'unlimited' ? exports.ABSOLUTE_MAX_USAGE : plan.hoursPerMonth;
430
+ return plan.hoursPerMonth == "unlimited" ? exports.ABSOLUTE_MAX_USAGE : plan.hoursPerMonth;
429
431
  }
430
432
  Plans.getHoursPerMonth = getHoursPerMonth;
431
433
  /**
@@ -465,7 +467,7 @@ var Plans;
465
467
  ["free-50", "free", "free-open-source"],
466
468
  ["personal", "basic"],
467
469
  ["professional-new"],
468
- ["professional", "student"]
470
+ ["professional", "student"],
469
471
  ];
470
472
  function getPlanTypeArity(type) {
471
473
  return planStructure.findIndex((types) => types.includes(type));
@@ -515,53 +517,86 @@ var Plans;
515
517
  Feature.getFeaturesFor = (p) => {
516
518
  switch (p.type) {
517
519
  case "free":
518
- return [
519
- { title: 'Public repositories' }
520
- ];
520
+ return [{ title: "Public repositories" }];
521
521
  case "free-50":
522
- return [
523
- { title: 'Public repositories' }
524
- ];
522
+ return [{ title: "Public repositories" }];
525
523
  case "free-open-source":
526
- return [
527
- { title: 'Public repositories' },
528
- ];
524
+ return [{ title: "Public repositories" }];
529
525
  case "student":
530
526
  return [
531
- { title: 'Private & Public repos' },
532
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
533
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
534
- { title: '1h Timeout', tooltip: 'Workspaces without user activity are stopped after 1 hour' },
535
- { title: '3h Timeout Boost', tooltip: 'You can manually boost the timeout to 3 hours within a running workspace' }
527
+ { title: "Private & Public repos" },
528
+ {
529
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
530
+ tooltip: "The number of workspaces running at the same time",
531
+ },
532
+ {
533
+ title: "Team Manageable",
534
+ link: "/teams/",
535
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
536
+ },
537
+ { title: "1h Timeout", tooltip: "Workspaces without user activity are stopped after 1 hour" },
538
+ {
539
+ title: "3h Timeout Boost",
540
+ tooltip: "You can manually boost the timeout to 3 hours within a running workspace",
541
+ },
536
542
  ];
537
543
  case "basic":
538
544
  return [
539
- { title: 'Private & Public repos' },
540
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time.' },
545
+ { title: "Private & Public repos" },
546
+ {
547
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
548
+ tooltip: "The number of workspaces running at the same time.",
549
+ },
541
550
  ];
542
551
  // Personal
543
552
  case "personal":
544
553
  return [
545
- { title: 'Private & Public repos' },
546
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
547
- { title: '30min Timeout', tooltip: 'Workspaces without user activity are stopped after 30 minutes' }
554
+ { title: "Private & Public repos" },
555
+ {
556
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
557
+ tooltip: "The number of workspaces running at the same time",
558
+ },
559
+ {
560
+ title: "30min Timeout",
561
+ tooltip: "Workspaces without user activity are stopped after 30 minutes",
562
+ },
548
563
  ];
549
564
  // Professional
550
565
  case "professional-new":
551
566
  return [
552
- { title: 'Private & Public repos' },
553
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
554
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
555
- { title: '30min Timeout', tooltip: 'Workspaces without user activity are stopped after 30 minutes' }
567
+ { title: "Private & Public repos" },
568
+ {
569
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
570
+ tooltip: "The number of workspaces running at the same time",
571
+ },
572
+ {
573
+ title: "Team Manageable",
574
+ link: "/teams/",
575
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
576
+ },
577
+ {
578
+ title: "30min Timeout",
579
+ tooltip: "Workspaces without user activity are stopped after 30 minutes",
580
+ },
556
581
  ];
557
582
  // Unleashed
558
583
  case "professional":
559
584
  return [
560
- { title: 'Private & Public repos' },
561
- { title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`, tooltip: 'The number of workspaces running at the same time' },
562
- { title: 'Team Manageable', link: "/teams/", tooltip: 'Setup Gitpod for an entire Team with a single invoice and credit card' },
563
- { title: '1h Timeout', tooltip: 'Workspaces without user activity are stopped after 1 hour' },
564
- { title: '3h Timeout Boost', tooltip: 'You can manually boost the timeout to 3 hours within a running workspace' }
585
+ { title: "Private & Public repos" },
586
+ {
587
+ title: `${Plans.getParallelWorkspaces(p)} Parallel Workspaces`,
588
+ tooltip: "The number of workspaces running at the same time",
589
+ },
590
+ {
591
+ title: "Team Manageable",
592
+ link: "/teams/",
593
+ tooltip: "Setup Gitpod for an entire Team with a single invoice and credit card",
594
+ },
595
+ { title: "1h Timeout", tooltip: "Workspaces without user activity are stopped after 1 hour" },
596
+ {
597
+ title: "3h Timeout Boost",
598
+ tooltip: "You can manually boost the timeout to 3 hours within a running workspace",
599
+ },
565
600
  ];
566
601
  }
567
602
  };