@gitpod/gitpod-protocol 0.1.5-v0.6.0-beta4 → 0.1.5-vn-6525.75

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 (344) hide show
  1. package/data/gitpod-schema.json +68 -26
  2. package/lib/accounting-protocol.d.ts +155 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -0
  4. package/lib/accounting-protocol.js +100 -0
  5. package/lib/accounting-protocol.js.map +1 -0
  6. package/lib/admin-protocol.d.ts +33 -4
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +15 -0
  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/auth.d.ts +25 -0
  15. package/lib/auth.d.ts.map +1 -0
  16. package/lib/auth.js +16 -0
  17. package/lib/auth.js.map +1 -0
  18. package/lib/context-url.d.ts +31 -0
  19. package/lib/context-url.d.ts.map +1 -0
  20. package/lib/context-url.js +102 -0
  21. package/lib/context-url.js.map +1 -0
  22. package/lib/context-url.spec.d.ts +14 -0
  23. package/lib/context-url.spec.d.ts.map +1 -0
  24. package/lib/context-url.spec.js +109 -0
  25. package/lib/context-url.spec.js.map +1 -0
  26. package/lib/email-protocol.d.ts +1 -2
  27. package/lib/email-protocol.d.ts.map +1 -1
  28. package/lib/email-protocol.js +4 -4
  29. package/lib/email-protocol.js.map +1 -1
  30. package/lib/encryption/container-module.d.ts.map +1 -1
  31. package/lib/encryption/container-module.js +5 -4
  32. package/lib/encryption/container-module.js.map +1 -1
  33. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  34. package/lib/encryption/encryption-engine.js +25 -26
  35. package/lib/encryption/encryption-engine.js.map +1 -1
  36. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  37. package/lib/encryption/encryption-engine.spec.js +29 -37
  38. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  39. package/lib/encryption/encryption-service.d.ts.map +1 -1
  40. package/lib/encryption/encryption-service.js +30 -44
  41. package/lib/encryption/encryption-service.js.map +1 -1
  42. package/lib/encryption/key-provider.d.ts.map +1 -1
  43. package/lib/encryption/key-provider.js +31 -38
  44. package/lib/encryption/key-provider.js.map +1 -1
  45. package/lib/env.d.ts +2 -3
  46. package/lib/env.d.ts.map +1 -1
  47. package/lib/env.js +24 -25
  48. package/lib/env.js.map +1 -1
  49. package/lib/gitpod-file-parser.d.ts.map +1 -1
  50. package/lib/gitpod-file-parser.js +26 -42
  51. package/lib/gitpod-file-parser.js.map +1 -1
  52. package/lib/gitpod-file-parser.spec.js +145 -142
  53. package/lib/gitpod-file-parser.spec.js.map +1 -1
  54. package/lib/gitpod-service.d.ts +172 -33
  55. package/lib/gitpod-service.d.ts.map +1 -1
  56. package/lib/gitpod-service.js +187 -267
  57. package/lib/gitpod-service.js.map +1 -1
  58. package/lib/headless-workspace-log.d.ts +9 -11
  59. package/lib/headless-workspace-log.d.ts.map +1 -1
  60. package/lib/headless-workspace-log.js +6 -8
  61. package/lib/headless-workspace-log.js.map +1 -1
  62. package/lib/ide-frontend-service.d.ts +5 -1
  63. package/lib/ide-frontend-service.d.ts.map +1 -1
  64. package/lib/ide-protocol.d.ts +105 -0
  65. package/lib/ide-protocol.d.ts.map +1 -0
  66. package/lib/{util/without.js → ide-protocol.js} +2 -2
  67. package/lib/ide-protocol.js.map +1 -0
  68. package/lib/index.d.ts +16 -10
  69. package/lib/index.d.ts.map +1 -1
  70. package/lib/index.js +7 -1
  71. package/lib/index.js.map +1 -1
  72. package/lib/installation-admin-protocol.d.ts +27 -0
  73. package/lib/installation-admin-protocol.d.ts.map +1 -0
  74. package/lib/installation-admin-protocol.js +30 -0
  75. package/lib/installation-admin-protocol.js.map +1 -0
  76. package/lib/license-protocol.d.ts.map +1 -1
  77. package/lib/license-protocol.js.map +1 -1
  78. package/lib/messaging/browser/connection.d.ts +5 -3
  79. package/lib/messaging/browser/connection.d.ts.map +1 -1
  80. package/lib/messaging/browser/connection.js +184 -34
  81. package/lib/messaging/browser/connection.js.map +1 -1
  82. package/lib/messaging/browser/window-connection.d.ts +4 -4
  83. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  84. package/lib/messaging/browser/window-connection.js +42 -59
  85. package/lib/messaging/browser/window-connection.js.map +1 -1
  86. package/lib/messaging/client-call-metrics.d.ts +35 -0
  87. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  88. package/lib/messaging/client-call-metrics.js +83 -0
  89. package/lib/messaging/client-call-metrics.js.map +1 -0
  90. package/lib/messaging/error.d.ts +5 -1
  91. package/lib/messaging/error.d.ts.map +1 -1
  92. package/lib/messaging/error.js +10 -2
  93. package/lib/messaging/error.js.map +1 -1
  94. package/lib/messaging/handler.d.ts +10 -0
  95. package/lib/messaging/handler.d.ts.map +1 -1
  96. package/lib/messaging/handler.js +1 -1
  97. package/lib/messaging/node/connection.d.ts +1 -17
  98. package/lib/messaging/node/connection.d.ts.map +1 -1
  99. package/lib/messaging/node/connection.js +24 -60
  100. package/lib/messaging/node/connection.js.map +1 -1
  101. package/lib/messaging/proxy-factory.d.ts +3 -1
  102. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  103. package/lib/messaging/proxy-factory.js +75 -162
  104. package/lib/messaging/proxy-factory.js.map +1 -1
  105. package/lib/oss-allowlist.d.ts +14 -0
  106. package/lib/oss-allowlist.d.ts.map +1 -0
  107. package/lib/oss-allowlist.js +8 -0
  108. package/lib/oss-allowlist.js.map +1 -0
  109. package/lib/payment-protocol.d.ts +18 -0
  110. package/lib/payment-protocol.d.ts.map +1 -0
  111. package/lib/payment-protocol.js +13 -0
  112. package/lib/payment-protocol.js.map +1 -0
  113. package/lib/permission.d.ts +10 -5
  114. package/lib/permission.d.ts.map +1 -1
  115. package/lib/permission.js +41 -35
  116. package/lib/permission.js.map +1 -1
  117. package/lib/plans.d.ts +210 -0
  118. package/lib/plans.d.ts.map +1 -0
  119. package/lib/plans.js +605 -0
  120. package/lib/plans.js.map +1 -0
  121. package/lib/protocol.d.ts +164 -88
  122. package/lib/protocol.d.ts.map +1 -1
  123. package/lib/protocol.js +184 -199
  124. package/lib/protocol.js.map +1 -1
  125. package/lib/snapshot-url.d.ts +14 -0
  126. package/lib/snapshot-url.d.ts.map +1 -0
  127. package/lib/snapshot-url.js +26 -0
  128. package/lib/snapshot-url.js.map +1 -0
  129. package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +2 -3
  130. package/lib/snapshot-url.spec.d.ts.map +1 -0
  131. package/lib/snapshot-url.spec.js +41 -0
  132. package/lib/snapshot-url.spec.js.map +1 -0
  133. package/lib/team-subscription-protocol.d.ts +75 -0
  134. package/lib/team-subscription-protocol.d.ts.map +1 -0
  135. package/lib/team-subscription-protocol.js +63 -0
  136. package/lib/team-subscription-protocol.js.map +1 -0
  137. package/lib/teams-projects-protocol.d.ts +113 -0
  138. package/lib/teams-projects-protocol.d.ts.map +1 -0
  139. package/lib/teams-projects-protocol.js +30 -0
  140. package/lib/teams-projects-protocol.js.map +1 -0
  141. package/lib/typings/globals.d.ts +2 -2
  142. package/lib/typings/globals.d.ts.map +1 -1
  143. package/lib/util/analytics.d.ts +8 -0
  144. package/lib/util/analytics.d.ts.map +1 -0
  145. package/lib/util/analytics.js +88 -0
  146. package/lib/util/analytics.js.map +1 -0
  147. package/lib/util/async-iterator.d.ts.map +1 -1
  148. package/lib/util/async-iterator.js +57 -135
  149. package/lib/util/async-iterator.js.map +1 -1
  150. package/lib/util/cancelable.js +17 -59
  151. package/lib/util/cancelable.js.map +1 -1
  152. package/lib/util/date-time.js +11 -11
  153. package/lib/util/date-time.js.map +1 -1
  154. package/lib/util/deferred.js +10 -12
  155. package/lib/util/deferred.js.map +1 -1
  156. package/lib/util/disposable.d.ts.map +1 -1
  157. package/lib/util/disposable.js +27 -40
  158. package/lib/util/disposable.js.map +1 -1
  159. package/lib/util/event.d.ts.map +1 -1
  160. package/lib/util/event.js +63 -77
  161. package/lib/util/event.js.map +1 -1
  162. package/lib/util/garbage-collected-cache.d.ts +1 -0
  163. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  164. package/lib/util/garbage-collected-cache.js +27 -47
  165. package/lib/util/garbage-collected-cache.js.map +1 -1
  166. package/lib/util/generate-workspace-id.d.ts +4 -0
  167. package/lib/util/generate-workspace-id.d.ts.map +1 -0
  168. package/lib/util/generate-workspace-id.js +487 -0
  169. package/lib/util/generate-workspace-id.js.map +1 -0
  170. package/{src/theia-plugins.ts → lib/util/generate-workspace-id.spec.d.ts} +2 -6
  171. package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
  172. package/lib/util/generate-workspace-id.spec.js +91 -0
  173. package/lib/util/generate-workspace-id.spec.js.map +1 -0
  174. package/lib/util/gitpod-cookie.d.ts +20 -0
  175. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  176. package/lib/util/gitpod-cookie.js +41 -0
  177. package/lib/util/gitpod-cookie.js.map +1 -0
  178. package/lib/util/gitpod-host-url.d.ts +2 -2
  179. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  180. package/lib/util/gitpod-host-url.js +109 -106
  181. package/lib/util/gitpod-host-url.js.map +1 -1
  182. package/lib/util/gitpod-host-url.spec.d.ts +8 -1
  183. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  184. package/lib/util/gitpod-host-url.spec.js +114 -22
  185. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  186. package/lib/util/grpc.d.ts +15 -0
  187. package/lib/util/grpc.d.ts.map +1 -0
  188. package/lib/util/grpc.js +18 -0
  189. package/lib/util/grpc.js.map +1 -0
  190. package/lib/util/jaeger-client-types.d.ts +68 -0
  191. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  192. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  193. package/lib/util/jaeger-client-types.js.map +1 -0
  194. package/lib/util/logging.d.ts +49 -33
  195. package/lib/util/logging.d.ts.map +1 -1
  196. package/lib/util/logging.js +125 -129
  197. package/lib/util/logging.js.map +1 -1
  198. package/lib/util/make-link.js +5 -5
  199. package/lib/util/make-link.js.map +1 -1
  200. package/lib/util/parse-workspace-id.d.ts +13 -3
  201. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  202. package/lib/util/parse-workspace-id.js +37 -8
  203. package/lib/util/parse-workspace-id.js.map +1 -1
  204. package/lib/util/parse-workspace-id.spec.d.ts +8 -0
  205. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  206. package/lib/util/parse-workspace-id.spec.js +127 -47
  207. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  208. package/lib/util/queue.js +16 -55
  209. package/lib/util/queue.js.map +1 -1
  210. package/lib/util/queue.spec.js +147 -288
  211. package/lib/util/queue.spec.js.map +1 -1
  212. package/lib/util/repeat.d.ts +15 -0
  213. package/lib/util/repeat.d.ts.map +1 -0
  214. package/lib/util/repeat.js +55 -0
  215. package/lib/util/repeat.js.map +1 -0
  216. package/lib/util/semaphore.d.ts.map +1 -1
  217. package/lib/util/semaphore.js +15 -46
  218. package/lib/util/semaphore.js.map +1 -1
  219. package/lib/util/skip-if.d.ts.map +1 -1
  220. package/lib/util/skip-if.js +6 -6
  221. package/lib/util/skip-if.js.map +1 -1
  222. package/lib/util/timeutil.d.ts.map +1 -1
  223. package/lib/util/timeutil.js +28 -16
  224. package/lib/util/timeutil.js.map +1 -1
  225. package/lib/util/timeutil.spec.d.ts.map +1 -1
  226. package/lib/util/timeutil.spec.js +21 -24
  227. package/lib/util/timeutil.spec.js.map +1 -1
  228. package/lib/util/tracing.d.ts +52 -6
  229. package/lib/util/tracing.d.ts.map +1 -1
  230. package/lib/util/tracing.js +199 -64
  231. package/lib/util/tracing.js.map +1 -1
  232. package/lib/util/tracing.spec.d.ts +7 -0
  233. package/lib/util/tracing.spec.d.ts.map +1 -0
  234. package/lib/util/tracing.spec.js +121 -0
  235. package/lib/util/tracing.spec.js.map +1 -0
  236. package/lib/util/workspace-port-authentication.d.ts +7 -7
  237. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  238. package/lib/util/workspace-port-authentication.js +10 -12
  239. package/lib/util/workspace-port-authentication.js.map +1 -1
  240. package/lib/workspace-cluster.d.ts +76 -0
  241. package/lib/workspace-cluster.d.ts.map +1 -0
  242. package/lib/workspace-cluster.js +31 -0
  243. package/lib/workspace-cluster.js.map +1 -0
  244. package/lib/workspace-instance.d.ts +28 -4
  245. package/lib/workspace-instance.d.ts.map +1 -1
  246. package/lib/wsready.d.ts +1 -1
  247. package/lib/wsready.d.ts.map +1 -1
  248. package/lib/wsready.js +2 -2
  249. package/package.json +33 -17
  250. package/pkg-yarn.lock +18 -9
  251. package/provenance-bundle.jsonl +2 -0
  252. package/src/accounting-protocol.ts +231 -0
  253. package/src/admin-protocol.ts +71 -19
  254. package/src/analytics.ts +52 -0
  255. package/src/auth.ts +27 -0
  256. package/src/context-url.spec.ts +67 -0
  257. package/src/context-url.ts +109 -0
  258. package/src/email-protocol.ts +5 -7
  259. package/src/encryption/container-module.ts +2 -3
  260. package/src/encryption/encryption-engine.spec.ts +9 -8
  261. package/src/encryption/encryption-engine.ts +14 -14
  262. package/src/encryption/encryption-service.ts +4 -5
  263. package/src/encryption/key-provider.ts +16 -19
  264. package/src/env.ts +18 -18
  265. package/src/gitpod-file-parser.spec.ts +55 -61
  266. package/src/gitpod-file-parser.ts +16 -17
  267. package/src/gitpod-service.ts +327 -102
  268. package/src/headless-workspace-log.ts +12 -14
  269. package/src/ide-frontend-service.ts +6 -2
  270. package/src/ide-protocol.ts +119 -0
  271. package/src/index.ts +16 -10
  272. package/src/installation-admin-protocol.ts +42 -0
  273. package/src/license-protocol.ts +5 -6
  274. package/src/messaging/browser/connection.ts +197 -18
  275. package/src/messaging/browser/window-connection.ts +39 -29
  276. package/src/messaging/client-call-metrics.ts +96 -0
  277. package/src/messaging/error.ts +15 -5
  278. package/src/messaging/handler.ts +13 -1
  279. package/src/messaging/node/connection.ts +23 -70
  280. package/src/messaging/proxy-factory.ts +35 -34
  281. package/src/oss-allowlist.ts +15 -0
  282. package/src/payment-protocol.ts +20 -0
  283. package/src/permission.ts +42 -38
  284. package/src/plans.ts +679 -0
  285. package/src/protocol.ts +384 -279
  286. package/src/snapshot-url.spec.ts +27 -0
  287. package/src/snapshot-url.ts +27 -0
  288. package/src/team-subscription-protocol.ts +123 -0
  289. package/src/teams-projects-protocol.ts +147 -0
  290. package/src/typings/globals.ts +4 -4
  291. package/src/util/analytics.ts +109 -0
  292. package/src/util/async-iterator.ts +4 -5
  293. package/src/util/cancelable.ts +3 -3
  294. package/src/util/date-time.ts +8 -8
  295. package/src/util/deferred.ts +6 -6
  296. package/src/util/disposable.ts +3 -6
  297. package/src/util/event.ts +9 -11
  298. package/src/util/garbage-collected-cache.ts +11 -8
  299. package/src/util/generate-workspace-id.spec.ts +51 -0
  300. package/src/util/generate-workspace-id.ts +475 -0
  301. package/src/util/gitpod-cookie.ts +38 -0
  302. package/src/util/gitpod-host-url.spec.ts +63 -7
  303. package/src/util/gitpod-host-url.ts +55 -38
  304. package/src/util/grpc.ts +15 -0
  305. package/src/util/jaeger-client-types.ts +102 -0
  306. package/src/util/logging.ts +145 -71
  307. package/src/util/make-link.ts +6 -7
  308. package/src/util/parse-workspace-id.spec.ts +60 -10
  309. package/src/util/parse-workspace-id.ts +38 -8
  310. package/src/util/queue.spec.ts +28 -26
  311. package/src/util/repeat.ts +45 -0
  312. package/src/util/semaphore.ts +6 -8
  313. package/src/util/skip-if.ts +10 -7
  314. package/src/util/timeutil.spec.ts +14 -15
  315. package/src/util/timeutil.ts +19 -15
  316. package/src/util/tracing.spec.ts +88 -0
  317. package/src/util/tracing.ts +202 -31
  318. package/src/util/workspace-port-authentication.ts +10 -13
  319. package/src/workspace-cluster.ts +107 -0
  320. package/src/workspace-instance.ts +72 -30
  321. package/src/wsready.ts +3 -3
  322. package/data/builtin-theia-plugins.json +0 -372
  323. package/lib/messaging/connection-error-handler.d.ts +0 -27
  324. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  325. package/lib/messaging/connection-error-handler.js +0 -46
  326. package/lib/messaging/connection-error-handler.js.map +0 -1
  327. package/lib/theia-plugins.d.ts +0 -11
  328. package/lib/theia-plugins.d.ts.map +0 -1
  329. package/lib/theia-plugins.js.map +0 -1
  330. package/lib/util/repeater.d.ts +0 -22
  331. package/lib/util/repeater.d.ts.map +0 -1
  332. package/lib/util/repeater.js +0 -118
  333. package/lib/util/repeater.js.map +0 -1
  334. package/lib/util/safe-promise.d.ts +0 -11
  335. package/lib/util/safe-promise.d.ts.map +0 -1
  336. package/lib/util/safe-promise.js +0 -34
  337. package/lib/util/safe-promise.js.map +0 -1
  338. package/lib/util/without.d.ts +0 -7
  339. package/lib/util/without.d.ts.map +0 -1
  340. package/lib/util/without.js.map +0 -1
  341. package/src/messaging/connection-error-handler.ts +0 -62
  342. package/src/util/jaeger-client.d.ts +0 -105
  343. package/src/util/repeater.ts +0 -49
  344. package/src/util/safe-promise.ts +0 -26
package/lib/plans.js ADDED
@@ -0,0 +1,605 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
4
+ * Licensed under the GNU Affero General Public License (AGPL).
5
+ * See License-AGPL.txt in the project root for license information.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Plans = exports.ABSOLUTE_MAX_USAGE = exports.Coupons = exports.Coupon = exports.MAX_PARALLEL_WORKSPACES = exports.Plan = exports.Currency = void 0;
9
+ var Currency;
10
+ (function (Currency) {
11
+ Currency.getAll = () => {
12
+ return ["USD", "EUR"];
13
+ };
14
+ Currency.getSymbol = (c) => {
15
+ return c === "USD" ? "$" : "€";
16
+ };
17
+ })(Currency = exports.Currency || (exports.Currency = {}));
18
+ var Plan;
19
+ (function (Plan) {
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);
27
+ };
28
+ })(Plan = exports.Plan || (exports.Plan = {}));
29
+ exports.MAX_PARALLEL_WORKSPACES = 16;
30
+ var Coupon;
31
+ (function (Coupon) {
32
+ Coupon.is = (o) => {
33
+ return "id" in o;
34
+ };
35
+ })(Coupon = exports.Coupon || (exports.Coupon = {}));
36
+ var Coupons;
37
+ (function (Coupons) {
38
+ Coupons.INTERNAL_GITPOD_GHSP = {
39
+ id: "INTERNAL_GITPOD_GHSP",
40
+ isGithubStudentCoupon: true,
41
+ };
42
+ Coupons.INTERNAL_GITPOD_GHSP_2 = {
43
+ id: "INTERNAL_GITPOD_GHSP_2",
44
+ isGithubStudentCoupon: true,
45
+ };
46
+ Coupons.GITHUBSTUDENTPACKFORFACULTY = {
47
+ id: "GITHUBSTUDENTPACKFORFACULTY",
48
+ isGithubStudentCoupon: true,
49
+ };
50
+ Coupons.isGithubStudentCoupon = (id) => {
51
+ const c = Coupons.getAllCoupons().find((ic) => ic.id === id);
52
+ if (!c) {
53
+ return undefined;
54
+ }
55
+ return !!c.isGithubStudentCoupon;
56
+ };
57
+ Coupons.getAllCoupons = () => {
58
+ return Object.keys(Coupons)
59
+ .map((k) => Coupons[k])
60
+ .filter((a) => typeof a === "object" && Coupon.is(a));
61
+ };
62
+ })(Coupons = exports.Coupons || (exports.Coupons = {}));
63
+ // Theoretical maximum of workspace hours: 16 workspaces for 24h a day for 31 days as permitted by the v3 unlimited plan
64
+ // Other unlimited hour plans are restricted by the number of Parallel Workspaces they can start.
65
+ exports.ABSOLUTE_MAX_USAGE = exports.MAX_PARALLEL_WORKSPACES * 24 * 31;
66
+ /**
67
+ * Version history:
68
+ * - v1:
69
+ * - Free
70
+ * - Basic
71
+ * - Professional
72
+ * - Team Professional
73
+ * - v2:
74
+ * - Free
75
+ * - Personal
76
+ * - Unlimited: rebranded professional with unlimited hours
77
+ * - Team Unlimited: rebranded professional with unlimited hours
78
+ * - dropped: Basic
79
+ * - v2.5:
80
+ * + Student Unlimited
81
+ * + Team Unlimited Student
82
+ * - V3:
83
+ * - Free: reduced to 50h (stays default, but not advertised directly anymore)
84
+ * - Personal (8/9)
85
+ * - Professional (23/25)
86
+ * - Unlimited (35/39)
87
+ * - v4:
88
+ * - Professional Open Source (free)
89
+ * - v5:
90
+ * - Unleashed: rebranded Unlimited
91
+ */
92
+ var Plans;
93
+ (function (Plans) {
94
+ /**
95
+ * The old default plan (v1): 100h hours for public repos
96
+ */
97
+ Plans.FREE = {
98
+ chargebeeId: "free",
99
+ githubId: 2034,
100
+ githubPlanNumber: 1,
101
+ type: "free",
102
+ name: "Open Source",
103
+ currency: "USD",
104
+ pricePerMonth: 0,
105
+ hoursPerMonth: 100,
106
+ };
107
+ /**
108
+ * The new default plan (v3): 50h hours for public repos
109
+ */
110
+ Plans.FREE_50 = {
111
+ chargebeeId: "free-50",
112
+ githubId: 4902,
113
+ githubPlanNumber: 5,
114
+ type: "free-50",
115
+ name: "Open Source",
116
+ currency: "USD",
117
+ pricePerMonth: 0,
118
+ hoursPerMonth: 50,
119
+ };
120
+ /**
121
+ * Users created after this date get the FREE_50 plan (v3) instead of the (old) FREE plan (v1)
122
+ */
123
+ Plans.FREE_50_START_DATE = "2019-12-19T00:00:00.000Z";
124
+ /**
125
+ * The 'Professional Open Source' plan was introduced to offer professional open-souce developers unlimited hours.
126
+ */
127
+ Plans.FREE_OPEN_SOURCE = {
128
+ chargebeeId: "free-open-source",
129
+ type: "free-open-source",
130
+ name: "Professional Open Source",
131
+ currency: "USD",
132
+ pricePerMonth: 0,
133
+ hoursPerMonth: "unlimited",
134
+ };
135
+ /**
136
+ * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
137
+ */
138
+ Plans.PROFESSIONAL_STUDENT_EUR = {
139
+ chargebeeId: "professional-student-eur",
140
+ type: "student",
141
+ name: "Student Unleashed",
142
+ currency: "EUR",
143
+ pricePerMonth: 8,
144
+ hoursPerMonth: "unlimited",
145
+ };
146
+ /**
147
+ * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
148
+ */
149
+ Plans.PROFESSIONAL_STUDENT_USD = {
150
+ chargebeeId: "professional-student-usd",
151
+ type: "student",
152
+ name: "Student Unleashed",
153
+ currency: "USD",
154
+ pricePerMonth: 9,
155
+ hoursPerMonth: "unlimited",
156
+ };
157
+ /**
158
+ * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
159
+ */
160
+ Plans.TEAM_PROFESSIONAL_STUDENT_EUR = {
161
+ chargebeeId: "team-professional-student-eur",
162
+ type: "student",
163
+ name: "Team Student Unleashed",
164
+ team: true,
165
+ currency: "EUR",
166
+ pricePerMonth: 8,
167
+ hoursPerMonth: "unlimited",
168
+ };
169
+ /**
170
+ * The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
171
+ */
172
+ Plans.TEAM_PROFESSIONAL_STUDENT_USD = {
173
+ chargebeeId: "team-professional-student-usd",
174
+ type: "student",
175
+ name: "Team Student Unleashed",
176
+ team: true,
177
+ currency: "USD",
178
+ pricePerMonth: 9,
179
+ hoursPerMonth: "unlimited",
180
+ };
181
+ /**
182
+ * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
183
+ */
184
+ Plans.BASIC_EUR = {
185
+ chargebeeId: "basic-eur",
186
+ type: "basic",
187
+ name: "Standard",
188
+ currency: "EUR",
189
+ pricePerMonth: 17,
190
+ hoursPerMonth: 100,
191
+ };
192
+ /**
193
+ * The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
194
+ */
195
+ Plans.BASIC_USD = {
196
+ chargebeeId: "basic-usd",
197
+ githubId: 2035,
198
+ githubPlanNumber: 2,
199
+ type: "basic",
200
+ name: "Standard",
201
+ currency: "USD",
202
+ pricePerMonth: 19,
203
+ hoursPerMonth: 100,
204
+ };
205
+ /**
206
+ * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
207
+ */
208
+ Plans.PERSONAL_EUR = {
209
+ chargebeeId: "personal-eur",
210
+ type: "personal",
211
+ name: "Personal",
212
+ currency: "EUR",
213
+ pricePerMonth: 8,
214
+ hoursPerMonth: 100,
215
+ };
216
+ /**
217
+ * The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
218
+ */
219
+ Plans.PERSONAL_USD = {
220
+ chargebeeId: "personal-usd",
221
+ githubId: 2274,
222
+ githubPlanNumber: 4,
223
+ type: "personal",
224
+ name: "Personal",
225
+ currency: "USD",
226
+ pricePerMonth: 9,
227
+ hoursPerMonth: 100,
228
+ };
229
+ /**
230
+ * This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
231
+ * Unleashed (39$/35€) on the right.
232
+ */
233
+ Plans.PROFESSIONAL_NEW_EUR = {
234
+ chargebeeId: "professional-new-eur",
235
+ type: "professional-new",
236
+ name: "Professional",
237
+ currency: "EUR",
238
+ pricePerMonth: 23,
239
+ hoursPerMonth: "unlimited",
240
+ };
241
+ /**
242
+ * This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
243
+ * Unleashed (39$/35€) on the right.
244
+ */
245
+ Plans.PROFESSIONAL_NEW_USD = {
246
+ chargebeeId: "professional-new-usd",
247
+ type: "professional-new",
248
+ name: "Professional",
249
+ currency: "USD",
250
+ pricePerMonth: 25,
251
+ hoursPerMonth: "unlimited",
252
+ };
253
+ /**
254
+ * This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
255
+ * Unleashed (39$/35€) on the right.
256
+ */
257
+ Plans.TEAM_PROFESSIONAL_NEW_EUR = {
258
+ chargebeeId: "team-professional-new-eur",
259
+ type: "professional-new",
260
+ name: "Team Professional",
261
+ currency: "EUR",
262
+ team: true,
263
+ pricePerMonth: 23,
264
+ hoursPerMonth: "unlimited",
265
+ };
266
+ /**
267
+ * This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
268
+ * Unleashed (39$/35€) on the right.
269
+ */
270
+ Plans.TEAM_PROFESSIONAL_NEW_USD = {
271
+ chargebeeId: "team-professional-new-usd",
272
+ type: "professional-new",
273
+ name: "Team Professional",
274
+ currency: "USD",
275
+ team: true,
276
+ pricePerMonth: 25,
277
+ hoursPerMonth: "unlimited",
278
+ };
279
+ /**
280
+ * This is the 'Unleashed' plan (v1, rebranded v2, v5)
281
+ * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
282
+ */
283
+ Plans.PROFESSIONAL_EUR = {
284
+ chargebeeId: "professional-eur",
285
+ type: "professional",
286
+ name: "Unleashed",
287
+ currency: "EUR",
288
+ pricePerMonth: 35,
289
+ hoursPerMonth: "unlimited",
290
+ };
291
+ /**
292
+ * This is the 'Unleashed' plan (v1, rebranded v2, v5)
293
+ * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
294
+ */
295
+ Plans.PROFESSIONAL_USD = {
296
+ chargebeeId: "professional-usd",
297
+ githubId: 2036,
298
+ githubPlanNumber: 3,
299
+ type: "professional",
300
+ name: "Unleashed",
301
+ currency: "USD",
302
+ pricePerMonth: 39,
303
+ hoursPerMonth: "unlimited",
304
+ };
305
+ /**
306
+ * This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
307
+ * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
308
+ */
309
+ Plans.TEAM_PROFESSIONAL_USD = {
310
+ chargebeeId: "team-professional-usd",
311
+ type: "professional",
312
+ name: "Team Unleashed",
313
+ currency: "USD",
314
+ team: true,
315
+ pricePerMonth: 39,
316
+ hoursPerMonth: "unlimited",
317
+ };
318
+ /**
319
+ * This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
320
+ * It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
321
+ */
322
+ Plans.TEAM_PROFESSIONAL_EUR = {
323
+ chargebeeId: "team-professional-eur",
324
+ type: "professional",
325
+ name: "Team Unleashed",
326
+ currency: "EUR",
327
+ team: true,
328
+ pricePerMonth: 35,
329
+ hoursPerMonth: "unlimited",
330
+ };
331
+ const getAllPlans = () => {
332
+ return Object.keys(Plans)
333
+ .map((k) => Plans[k])
334
+ .filter((a) => typeof a === "object" && Plan.is(a));
335
+ };
336
+ /**
337
+ * This function returns all individual plans that might be active (= we have subscriptions for) at the moment
338
+ */
339
+ function getAvailablePlans(currency) {
340
+ const availablePaidPlans = [
341
+ Plans.BASIC_EUR,
342
+ Plans.BASIC_USD,
343
+ Plans.PERSONAL_EUR,
344
+ Plans.PERSONAL_USD,
345
+ Plans.PROFESSIONAL_NEW_EUR,
346
+ Plans.PROFESSIONAL_NEW_USD,
347
+ Plans.PROFESSIONAL_EUR,
348
+ Plans.PROFESSIONAL_USD,
349
+ ];
350
+ return [Plans.FREE, Plans.FREE_50, Plans.FREE_OPEN_SOURCE, ...availablePaidPlans.filter((p) => p.currency)];
351
+ }
352
+ Plans.getAvailablePlans = getAvailablePlans;
353
+ Plans.getAvailableTeamPlans = (currency) => {
354
+ const teamPlans = getAllPlans().filter((p) => !!p.team);
355
+ return currency ? teamPlans.filter((p) => p.currency === currency) : teamPlans;
356
+ };
357
+ function getById(id) {
358
+ if (id === undefined) {
359
+ return undefined;
360
+ }
361
+ return getAllPlans().find((p) => p.chargebeeId === id) || undefined;
362
+ }
363
+ Plans.getById = getById;
364
+ function getByTypeAndCurrency(type, currency) {
365
+ return getAllPlans()
366
+ .filter((p) => p.type)
367
+ .find((p) => p.currency === currency);
368
+ }
369
+ Plans.getByTypeAndCurrency = getByTypeAndCurrency;
370
+ function getProPlan(currency) {
371
+ switch (currency) {
372
+ case "EUR":
373
+ return Plans.PROFESSIONAL_EUR;
374
+ case "USD":
375
+ return Plans.PROFESSIONAL_USD;
376
+ }
377
+ }
378
+ Plans.getProPlan = getProPlan;
379
+ function getNewProPlan(currency) {
380
+ switch (currency) {
381
+ case "EUR":
382
+ return Plans.PROFESSIONAL_NEW_EUR;
383
+ case "USD":
384
+ return Plans.PROFESSIONAL_NEW_USD;
385
+ }
386
+ }
387
+ Plans.getNewProPlan = getNewProPlan;
388
+ function getStudentProPlan(currency) {
389
+ switch (currency) {
390
+ case "EUR":
391
+ return Plans.PROFESSIONAL_STUDENT_EUR;
392
+ case "USD":
393
+ return Plans.PROFESSIONAL_STUDENT_USD;
394
+ }
395
+ }
396
+ Plans.getStudentProPlan = getStudentProPlan;
397
+ function getBasicPlan(currency) {
398
+ switch (currency) {
399
+ case "EUR":
400
+ return Plans.BASIC_EUR;
401
+ case "USD":
402
+ return Plans.BASIC_USD;
403
+ }
404
+ }
405
+ Plans.getBasicPlan = getBasicPlan;
406
+ function getPersonalPlan(currency) {
407
+ switch (currency) {
408
+ case "EUR":
409
+ return Plans.PERSONAL_EUR;
410
+ case "USD":
411
+ return Plans.PERSONAL_USD;
412
+ }
413
+ }
414
+ Plans.getPersonalPlan = getPersonalPlan;
415
+ function getFreePlan(userCreationDate) {
416
+ return userCreationDate < Plans.FREE_50_START_DATE ? Plans.FREE : Plans.FREE_50;
417
+ }
418
+ Plans.getFreePlan = getFreePlan;
419
+ function isFreePlan(chargebeeId) {
420
+ return (chargebeeId === Plans.FREE.chargebeeId ||
421
+ chargebeeId === Plans.FREE_50.chargebeeId ||
422
+ chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId);
423
+ }
424
+ Plans.isFreePlan = isFreePlan;
425
+ function isFreeNonTransientPlan(chargebeeId) {
426
+ return chargebeeId === Plans.FREE_OPEN_SOURCE.chargebeeId;
427
+ }
428
+ Plans.isFreeNonTransientPlan = isFreeNonTransientPlan;
429
+ function getHoursPerMonth(plan) {
430
+ return plan.hoursPerMonth == "unlimited" ? exports.ABSOLUTE_MAX_USAGE : plan.hoursPerMonth;
431
+ }
432
+ Plans.getHoursPerMonth = getHoursPerMonth;
433
+ /**
434
+ * Returns the maximum number of parallel workspaces for the given plan
435
+ * @param plan
436
+ */
437
+ function getParallelWorkspacesById(planId) {
438
+ return getParallelWorkspaces(Plans.getById(planId));
439
+ }
440
+ Plans.getParallelWorkspacesById = getParallelWorkspacesById;
441
+ /**
442
+ * Returns the maximum number of parallel workspaces for the given plan
443
+ * @param plan
444
+ */
445
+ function getParallelWorkspaces(plan) {
446
+ const DEFAULT = 4;
447
+ if (!plan) {
448
+ return DEFAULT;
449
+ }
450
+ switch (plan.type) {
451
+ case "professional-new":
452
+ return 8;
453
+ case "professional":
454
+ case "student":
455
+ return 16;
456
+ }
457
+ return DEFAULT;
458
+ }
459
+ Plans.getParallelWorkspaces = getParallelWorkspaces;
460
+ /**
461
+ * This declares the plan structure we have in Gitpod: All entries in a sub-array have the same arity in this structure.
462
+ * This is used to impose a partial order on plan types (cmp. compareTypes(...)).
463
+ * The order inside the sub-array carries meaning, too: The first one is the current, preferred plan (we advertise) for the given arity.
464
+ * This is used to be able to get the next "higher" plan (cmp. getNextHigherPlanType).
465
+ */
466
+ const planStructure = [
467
+ ["free-50", "free", "free-open-source"],
468
+ ["personal", "basic"],
469
+ ["professional-new"],
470
+ ["professional", "student"],
471
+ ];
472
+ function getPlanTypeArity(type) {
473
+ return planStructure.findIndex((types) => types.includes(type));
474
+ }
475
+ function getPlanTypeForArity(arity) {
476
+ if (arity >= planStructure.length) {
477
+ return undefined;
478
+ }
479
+ return planStructure[arity][0];
480
+ }
481
+ /**
482
+ * Returns the preferred plan type with the next higher arity
483
+ * @param type
484
+ */
485
+ function getNextHigherPlanType(type) {
486
+ const arity = getPlanTypeArity(type);
487
+ const nextHigherType = getPlanTypeForArity(arity + 1);
488
+ return nextHigherType || "professional";
489
+ }
490
+ Plans.getNextHigherPlanType = getNextHigherPlanType;
491
+ /**
492
+ * This imposes a partial order on the plan types
493
+ * @param planTypeA
494
+ * @param planTypeB
495
+ */
496
+ function compareTypes(planTypeA, planTypeB) {
497
+ const va = getPlanTypeArity(planTypeA);
498
+ const vb = getPlanTypeArity(planTypeB);
499
+ return va < vb ? -1 : va > vb ? 1 : 0;
500
+ }
501
+ Plans.compareTypes = compareTypes;
502
+ function subscriptionChange(fromType, toType) {
503
+ const cmp = Plans.compareTypes(fromType, toType);
504
+ if (cmp < 0) {
505
+ return "upgrade";
506
+ }
507
+ else if (cmp > 0) {
508
+ return "downgrade";
509
+ }
510
+ else {
511
+ return "none";
512
+ }
513
+ }
514
+ Plans.subscriptionChange = subscriptionChange;
515
+ let Feature;
516
+ (function (Feature) {
517
+ Feature.getFeaturesFor = (p) => {
518
+ switch (p.type) {
519
+ case "free":
520
+ return [{ title: "Public repositories" }];
521
+ case "free-50":
522
+ return [{ title: "Public repositories" }];
523
+ case "free-open-source":
524
+ return [{ title: "Public repositories" }];
525
+ case "student":
526
+ return [
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
+ },
542
+ ];
543
+ case "basic":
544
+ return [
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
+ },
550
+ ];
551
+ // Personal
552
+ case "personal":
553
+ return [
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
+ },
563
+ ];
564
+ // Professional
565
+ case "professional-new":
566
+ return [
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
+ },
581
+ ];
582
+ // Unleashed
583
+ case "professional":
584
+ return [
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
+ },
600
+ ];
601
+ }
602
+ };
603
+ })(Feature = Plans.Feature || (Plans.Feature = {}));
604
+ })(Plans = exports.Plans || (exports.Plans = {}));
605
+ //# sourceMappingURL=plans.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plans.js","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,IAAiB,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACR,eAAM,GAAG,GAAe,EAAE;QACnC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;IACW,kBAAS,GAAG,CAAC,CAAW,EAAE,EAAE;QACrC,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IACnC,CAAC,CAAC;AACN,CAAC,EAPgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOxB;AA4BD,IAAiB,IAAI,CAWpB;AAXD,WAAiB,IAAI;IACJ,OAAE,GAAG,CAAC,CAAM,EAAa,EAAE;QACpC,OAAO,CACH,aAAa,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