@gitpod/gitpod-protocol 0.1.5-server-vscode-ouath2.18 → 0.1.5-server-vscode-oauth2.24

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 (330) hide show
  1. package/data/gitpod-schema.json +49 -4
  2. package/lib/accounting-protocol.d.ts +10 -11
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +31 -41
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +20 -2
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js +2 -13
  9. package/lib/admin-protocol.js.map +1 -1
  10. package/lib/analytics.d.ts +12 -1
  11. package/lib/analytics.d.ts.map +1 -1
  12. package/lib/analytics.js.map +1 -1
  13. package/lib/auth.d.ts.map +1 -1
  14. package/lib/context-url.d.ts +18 -5
  15. package/lib/context-url.d.ts.map +1 -1
  16. package/lib/context-url.js +63 -10
  17. package/lib/context-url.js.map +1 -1
  18. package/lib/context-url.spec.d.ts +2 -0
  19. package/lib/context-url.spec.d.ts.map +1 -1
  20. package/lib/context-url.spec.js +81 -48
  21. package/lib/context-url.spec.js.map +1 -1
  22. package/lib/email-protocol.d.ts +1 -1
  23. package/lib/email-protocol.d.ts.map +1 -1
  24. package/lib/email-protocol.js +4 -4
  25. package/lib/email-protocol.js.map +1 -1
  26. package/lib/encryption/container-module.d.ts.map +1 -1
  27. package/lib/encryption/container-module.js +4 -4
  28. package/lib/encryption/container-module.js.map +1 -1
  29. package/lib/encryption/encryption-engine.d.ts.map +1 -1
  30. package/lib/encryption/encryption-engine.js +25 -26
  31. package/lib/encryption/encryption-engine.js.map +1 -1
  32. package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
  33. package/lib/encryption/encryption-engine.spec.js +29 -37
  34. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  35. package/lib/encryption/encryption-service.d.ts.map +1 -1
  36. package/lib/encryption/encryption-service.js +30 -44
  37. package/lib/encryption/encryption-service.js.map +1 -1
  38. package/lib/encryption/key-provider.d.ts.map +1 -1
  39. package/lib/encryption/key-provider.js +31 -38
  40. package/lib/encryption/key-provider.js.map +1 -1
  41. package/lib/env.d.ts +1 -2
  42. package/lib/env.d.ts.map +1 -1
  43. package/lib/env.js +17 -19
  44. package/lib/env.js.map +1 -1
  45. package/lib/gitpod-file-parser.d.ts.map +1 -1
  46. package/lib/gitpod-file-parser.js +26 -42
  47. package/lib/gitpod-file-parser.js.map +1 -1
  48. package/lib/gitpod-file-parser.spec.js +145 -142
  49. package/lib/gitpod-file-parser.spec.js.map +1 -1
  50. package/lib/gitpod-service.d.ts +67 -31
  51. package/lib/gitpod-service.d.ts.map +1 -1
  52. package/lib/gitpod-service.js +162 -309
  53. package/lib/gitpod-service.js.map +1 -1
  54. package/lib/headless-workspace-log.d.ts +1 -0
  55. package/lib/headless-workspace-log.d.ts.map +1 -1
  56. package/lib/headless-workspace-log.js +2 -1
  57. package/lib/headless-workspace-log.js.map +1 -1
  58. package/lib/ide-frontend-service.d.ts +1 -1
  59. package/lib/ide-protocol.d.ts +105 -0
  60. package/lib/ide-protocol.d.ts.map +1 -0
  61. package/lib/ide-protocol.js +8 -0
  62. package/lib/ide-protocol.js.map +1 -0
  63. package/lib/index.d.ts +16 -13
  64. package/lib/index.d.ts.map +1 -1
  65. package/lib/index.js +3 -0
  66. package/lib/index.js.map +1 -1
  67. package/lib/installation-admin-protocol.d.ts +27 -0
  68. package/lib/installation-admin-protocol.d.ts.map +1 -0
  69. package/lib/installation-admin-protocol.js +30 -0
  70. package/lib/installation-admin-protocol.js.map +1 -0
  71. package/lib/license-protocol.d.ts.map +1 -1
  72. package/lib/license-protocol.js.map +1 -1
  73. package/lib/messaging/browser/connection.d.ts +3 -3
  74. package/lib/messaging/browser/connection.d.ts.map +1 -1
  75. package/lib/messaging/browser/connection.js +173 -36
  76. package/lib/messaging/browser/connection.js.map +1 -1
  77. package/lib/messaging/browser/window-connection.d.ts +4 -4
  78. package/lib/messaging/browser/window-connection.d.ts.map +1 -1
  79. package/lib/messaging/browser/window-connection.js +42 -59
  80. package/lib/messaging/browser/window-connection.js.map +1 -1
  81. package/lib/messaging/client-call-metrics.d.ts +2 -2
  82. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  83. package/lib/messaging/client-call-metrics.js +37 -38
  84. package/lib/messaging/client-call-metrics.js.map +1 -1
  85. package/lib/messaging/error.d.ts +2 -1
  86. package/lib/messaging/error.d.ts.map +1 -1
  87. package/lib/messaging/error.js +4 -2
  88. package/lib/messaging/error.js.map +1 -1
  89. package/lib/messaging/handler.d.ts +10 -0
  90. package/lib/messaging/handler.d.ts.map +1 -1
  91. package/lib/messaging/handler.js +1 -1
  92. package/lib/messaging/node/connection.d.ts +1 -17
  93. package/lib/messaging/node/connection.d.ts.map +1 -1
  94. package/lib/messaging/node/connection.js +24 -60
  95. package/lib/messaging/node/connection.js.map +1 -1
  96. package/lib/messaging/proxy-factory.d.ts +3 -1
  97. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  98. package/lib/messaging/proxy-factory.js +74 -163
  99. package/lib/messaging/proxy-factory.js.map +1 -1
  100. package/lib/oss-allowlist.d.ts +14 -0
  101. package/lib/oss-allowlist.d.ts.map +1 -0
  102. package/lib/oss-allowlist.js +8 -0
  103. package/lib/oss-allowlist.js.map +1 -0
  104. package/lib/payment-protocol.d.ts.map +1 -1
  105. package/lib/payment-protocol.js +1 -1
  106. package/lib/payment-protocol.js.map +1 -1
  107. package/lib/permission.d.ts +9 -4
  108. package/lib/permission.d.ts.map +1 -1
  109. package/lib/permission.js +39 -31
  110. package/lib/permission.js.map +1 -1
  111. package/lib/plans.d.ts +4 -4
  112. package/lib/plans.d.ts.map +1 -1
  113. package/lib/plans.js +225 -209
  114. package/lib/plans.js.map +1 -1
  115. package/lib/protocol.d.ts +83 -78
  116. package/lib/protocol.d.ts.map +1 -1
  117. package/lib/protocol.js +131 -190
  118. package/lib/protocol.js.map +1 -1
  119. package/lib/snapshot-url.d.ts +14 -0
  120. package/lib/snapshot-url.d.ts.map +1 -0
  121. package/lib/snapshot-url.js +26 -0
  122. package/lib/snapshot-url.js.map +1 -0
  123. package/{src/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
  124. package/lib/snapshot-url.spec.d.ts.map +1 -0
  125. package/lib/snapshot-url.spec.js +41 -0
  126. package/lib/snapshot-url.spec.js.map +1 -0
  127. package/lib/team-subscription-protocol.d.ts +5 -3
  128. package/lib/team-subscription-protocol.d.ts.map +1 -1
  129. package/lib/team-subscription-protocol.js +17 -17
  130. package/lib/team-subscription-protocol.js.map +1 -1
  131. package/lib/teams-projects-protocol.d.ts +16 -3
  132. package/lib/teams-projects-protocol.d.ts.map +1 -1
  133. package/lib/teams-projects-protocol.js +11 -15
  134. package/lib/teams-projects-protocol.js.map +1 -1
  135. package/lib/typings/globals.d.ts +2 -2
  136. package/lib/typings/globals.d.ts.map +1 -1
  137. package/lib/util/analytics.d.ts.map +1 -1
  138. package/lib/util/analytics.js +44 -26
  139. package/lib/util/analytics.js.map +1 -1
  140. package/lib/util/async-iterator.d.ts.map +1 -1
  141. package/lib/util/async-iterator.js +57 -135
  142. package/lib/util/async-iterator.js.map +1 -1
  143. package/lib/util/cancelable.js +17 -59
  144. package/lib/util/cancelable.js.map +1 -1
  145. package/lib/util/date-time.js +11 -11
  146. package/lib/util/date-time.js.map +1 -1
  147. package/lib/util/deferred.js +10 -12
  148. package/lib/util/deferred.js.map +1 -1
  149. package/lib/util/disposable.d.ts.map +1 -1
  150. package/lib/util/disposable.js +27 -40
  151. package/lib/util/disposable.js.map +1 -1
  152. package/lib/util/event.d.ts.map +1 -1
  153. package/lib/util/event.js +63 -77
  154. package/lib/util/event.js.map +1 -1
  155. package/lib/util/garbage-collected-cache.d.ts +1 -0
  156. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  157. package/lib/util/garbage-collected-cache.js +27 -47
  158. package/lib/util/garbage-collected-cache.js.map +1 -1
  159. package/lib/util/generate-workspace-id.d.ts +1 -1
  160. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  161. package/lib/util/generate-workspace-id.js +460 -499
  162. package/lib/util/generate-workspace-id.js.map +1 -1
  163. package/lib/util/generate-workspace-id.spec.js +61 -78
  164. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  165. package/lib/util/gitpod-cookie.d.ts +20 -0
  166. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  167. package/lib/util/gitpod-cookie.js +41 -0
  168. package/lib/util/gitpod-cookie.js.map +1 -0
  169. package/lib/util/gitpod-host-url.d.ts +1 -1
  170. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  171. package/lib/util/gitpod-host-url.js +106 -114
  172. package/lib/util/gitpod-host-url.js.map +1 -1
  173. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  174. package/lib/util/gitpod-host-url.spec.js +97 -135
  175. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  176. package/lib/util/grpc.d.ts.map +1 -1
  177. package/lib/util/grpc.js +3 -3
  178. package/lib/util/grpc.js.map +1 -1
  179. package/lib/util/jaeger-client-types.d.ts +68 -0
  180. package/lib/util/jaeger-client-types.d.ts.map +1 -0
  181. package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
  182. package/lib/util/jaeger-client-types.js.map +1 -0
  183. package/lib/util/logging.d.ts +33 -33
  184. package/lib/util/logging.d.ts.map +1 -1
  185. package/lib/util/logging.js +87 -129
  186. package/lib/util/logging.js.map +1 -1
  187. package/lib/util/make-link.js +5 -5
  188. package/lib/util/make-link.js.map +1 -1
  189. package/lib/util/parse-workspace-id.d.ts +10 -0
  190. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  191. package/lib/util/parse-workspace-id.js +30 -7
  192. package/lib/util/parse-workspace-id.js.map +1 -1
  193. package/lib/util/parse-workspace-id.spec.d.ts +4 -0
  194. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  195. package/lib/util/parse-workspace-id.spec.js +123 -84
  196. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  197. package/lib/util/queue.js +16 -55
  198. package/lib/util/queue.js.map +1 -1
  199. package/lib/util/queue.spec.js +147 -288
  200. package/lib/util/queue.spec.js.map +1 -1
  201. package/lib/util/repeat.d.ts +15 -0
  202. package/lib/util/repeat.d.ts.map +1 -0
  203. package/lib/util/repeat.js +55 -0
  204. package/lib/util/repeat.js.map +1 -0
  205. package/lib/util/semaphore.d.ts.map +1 -1
  206. package/lib/util/semaphore.js +15 -46
  207. package/lib/util/semaphore.js.map +1 -1
  208. package/lib/util/skip-if.d.ts.map +1 -1
  209. package/lib/util/skip-if.js +6 -6
  210. package/lib/util/skip-if.js.map +1 -1
  211. package/lib/util/timeutil.d.ts.map +1 -1
  212. package/lib/util/timeutil.js +16 -16
  213. package/lib/util/timeutil.js.map +1 -1
  214. package/lib/util/timeutil.spec.d.ts.map +1 -1
  215. package/lib/util/timeutil.spec.js +21 -24
  216. package/lib/util/timeutil.spec.js.map +1 -1
  217. package/lib/util/tracing.d.ts +52 -6
  218. package/lib/util/tracing.d.ts.map +1 -1
  219. package/lib/util/tracing.js +199 -64
  220. package/lib/util/tracing.js.map +1 -1
  221. package/lib/util/tracing.spec.d.ts +7 -0
  222. package/lib/util/tracing.spec.d.ts.map +1 -0
  223. package/lib/util/tracing.spec.js +121 -0
  224. package/lib/util/tracing.spec.js.map +1 -0
  225. package/lib/util/workspace-port-authentication.d.ts +7 -7
  226. package/lib/util/workspace-port-authentication.d.ts.map +1 -1
  227. package/lib/util/workspace-port-authentication.js +9 -12
  228. package/lib/util/workspace-port-authentication.js.map +1 -1
  229. package/lib/workspace-cluster.d.ts +15 -3
  230. package/lib/workspace-cluster.d.ts.map +1 -1
  231. package/lib/workspace-cluster.js +19 -4
  232. package/lib/workspace-cluster.js.map +1 -1
  233. package/lib/workspace-instance.d.ts +25 -4
  234. package/lib/workspace-instance.d.ts.map +1 -1
  235. package/lib/wsready.d.ts +1 -1
  236. package/lib/wsready.d.ts.map +1 -1
  237. package/lib/wsready.js +2 -2
  238. package/package.json +22 -13
  239. package/pkg-yarn.lock +12 -7
  240. package/provenance-bundle.jsonl +2 -0
  241. package/src/accounting-protocol.ts +53 -53
  242. package/src/admin-protocol.ts +43 -20
  243. package/src/analytics.ts +28 -15
  244. package/src/auth.ts +2 -2
  245. package/src/context-url.spec.ts +37 -9
  246. package/src/context-url.ts +94 -36
  247. package/src/email-protocol.ts +5 -6
  248. package/src/encryption/container-module.ts +2 -3
  249. package/src/encryption/encryption-engine.spec.ts +9 -8
  250. package/src/encryption/encryption-engine.ts +14 -14
  251. package/src/encryption/encryption-service.ts +4 -5
  252. package/src/encryption/key-provider.ts +16 -19
  253. package/src/env.ts +9 -10
  254. package/src/gitpod-file-parser.spec.ts +55 -61
  255. package/src/gitpod-file-parser.ts +16 -17
  256. package/src/gitpod-service.ts +174 -109
  257. package/src/headless-workspace-log.ts +6 -4
  258. package/src/ide-frontend-service.ts +2 -2
  259. package/src/ide-protocol.ts +119 -0
  260. package/src/index.ts +16 -13
  261. package/src/installation-admin-protocol.ts +42 -0
  262. package/src/license-protocol.ts +5 -6
  263. package/src/messaging/browser/connection.ts +185 -21
  264. package/src/messaging/browser/window-connection.ts +39 -29
  265. package/src/messaging/client-call-metrics.ts +70 -71
  266. package/src/messaging/error.ts +6 -5
  267. package/src/messaging/handler.ts +13 -1
  268. package/src/messaging/node/connection.ts +23 -70
  269. package/src/messaging/proxy-factory.ts +32 -33
  270. package/src/oss-allowlist.ts +15 -0
  271. package/src/payment-protocol.ts +2 -2
  272. package/src/permission.ts +40 -33
  273. package/src/plans.ts +236 -189
  274. package/src/protocol.ts +280 -277
  275. package/src/snapshot-url.spec.ts +27 -0
  276. package/src/snapshot-url.ts +27 -0
  277. package/src/team-subscription-protocol.ts +33 -23
  278. package/src/teams-projects-protocol.ts +27 -9
  279. package/src/typings/globals.ts +4 -4
  280. package/src/util/analytics.ts +56 -18
  281. package/src/util/async-iterator.ts +4 -5
  282. package/src/util/cancelable.ts +3 -3
  283. package/src/util/date-time.ts +8 -8
  284. package/src/util/deferred.ts +6 -6
  285. package/src/util/disposable.ts +3 -6
  286. package/src/util/event.ts +9 -11
  287. package/src/util/garbage-collected-cache.ts +9 -6
  288. package/src/util/generate-workspace-id.spec.ts +26 -6
  289. package/src/util/generate-workspace-id.ts +458 -440
  290. package/src/util/gitpod-cookie.ts +38 -0
  291. package/src/util/gitpod-host-url.spec.ts +40 -13
  292. package/src/util/gitpod-host-url.ts +41 -38
  293. package/src/util/grpc.ts +4 -4
  294. package/src/util/jaeger-client-types.ts +102 -0
  295. package/src/util/logging.ts +109 -86
  296. package/src/util/make-link.ts +6 -7
  297. package/src/util/parse-workspace-id.spec.ts +37 -8
  298. package/src/util/parse-workspace-id.ts +32 -7
  299. package/src/util/queue.spec.ts +27 -25
  300. package/src/util/repeat.ts +45 -0
  301. package/src/util/semaphore.ts +4 -6
  302. package/src/util/skip-if.ts +9 -6
  303. package/src/util/timeutil.spec.ts +14 -15
  304. package/src/util/timeutil.ts +15 -11
  305. package/src/util/tracing.spec.ts +88 -0
  306. package/src/util/tracing.ts +202 -31
  307. package/src/util/workspace-port-authentication.ts +10 -13
  308. package/src/workspace-cluster.ts +26 -8
  309. package/src/workspace-instance.ts +53 -23
  310. package/src/wsready.ts +3 -3
  311. package/data/builtin-theia-plugins.json +0 -372
  312. package/lib/messaging/connection-error-handler.d.ts +0 -27
  313. package/lib/messaging/connection-error-handler.d.ts.map +0 -1
  314. package/lib/messaging/connection-error-handler.js +0 -46
  315. package/lib/messaging/connection-error-handler.js.map +0 -1
  316. package/lib/theia-plugins.d.ts +0 -11
  317. package/lib/theia-plugins.d.ts.map +0 -1
  318. package/lib/theia-plugins.js.map +0 -1
  319. package/lib/util/repeater.d.ts +0 -22
  320. package/lib/util/repeater.d.ts.map +0 -1
  321. package/lib/util/repeater.js +0 -118
  322. package/lib/util/repeater.js.map +0 -1
  323. package/lib/util/safe-promise.d.ts +0 -11
  324. package/lib/util/safe-promise.d.ts.map +0 -1
  325. package/lib/util/safe-promise.js +0 -34
  326. package/lib/util/safe-promise.js.map +0 -1
  327. package/src/messaging/connection-error-handler.ts +0 -62
  328. package/src/util/jaeger-client.d.ts +0 -105
  329. package/src/util/repeater.ts +0 -49
  330. package/src/util/safe-promise.ts +0 -26
package/lib/protocol.js CHANGED
@@ -4,101 +4,51 @@
4
4
  * Licensed under the GNU Affero General Public License (AGPL).
5
5
  * See License-AGPL.txt in the project root for license information.
6
6
  */
7
- var __assign = (this && this.__assign) || function () {
8
- __assign = Object.assign || function(t) {
9
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10
- s = arguments[i];
11
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12
- t[p] = s[p];
13
- }
14
- return t;
15
- };
16
- return __assign.apply(this, arguments);
17
- };
18
- var __values = (this && this.__values) || function(o) {
19
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
20
- if (m) return m.call(o);
21
- if (o && typeof o.length === "number") return {
22
- next: function () {
23
- if (o && i >= o.length) o = void 0;
24
- return { value: o && o[i++], done: !o };
25
- }
26
- };
27
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
28
- };
29
- var __read = (this && this.__read) || function (o, n) {
30
- var m = typeof Symbol === "function" && o[Symbol.iterator];
31
- if (!m) return o;
32
- var i = m.call(o), r, ar = [], e;
33
- try {
34
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
35
- }
36
- catch (error) { e = { error: error }; }
37
- finally {
38
- try {
39
- if (r && !r.done && (m = i["return"])) m.call(i);
40
- }
41
- finally { if (e) throw e.error; }
42
- }
43
- return ar;
44
- };
45
7
  Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.TheiaPlugin = exports.AuthProviderEntry = exports.WorkspaceCreationResult = exports.CreateWorkspaceMode = exports.WorkspaceInfo = exports.WorkspaceInstancePortsChangedEvent = exports.Repository = exports.NavigatorContext = exports.IssueContext = exports.PullRequestContext = exports.CommitContext = exports.AdditionalContentContext = exports.RefType = exports.WorkspaceProbeContext = exports.WithEnvvarsContext = exports.PrebuiltWorkspaceContext = exports.StartPrebuildContext = exports.SnapshotContext = exports.WithDefaultConfig = exports.WithPrebuild = exports.WithSnapshot = exports.WorkspaceContext = exports.ExternalImageConfigFile = exports.ImageConfigFile = exports.ImageConfigString = exports.WorkspaceImageBuild = exports.TaskConfig = exports.PortRangeConfig = exports.PortConfig = exports.PrebuiltWorkspace = exports.WorkspaceImageSourceReference = exports.WorkspaceImageSourceDocker = exports.GithubAppPrebuildConfig = exports.Workspace = exports.Identity = exports.GitpodTokenType = exports.UserEnvVar = exports.WorkspaceFeatureFlags = exports.User = void 0;
8
+ exports.TheiaPlugin = exports.AuthProviderEntry = exports.AuthProviderInfo = exports.WorkspaceCreationResult = exports.CreateWorkspaceMode = exports.WorkspaceInfo = exports.WorkspaceInstancePortsChangedEvent = exports.Repository = exports.NavigatorContext = exports.IssueContext = exports.PullRequestContext = exports.CommitContext = exports.AdditionalContentContext = exports.RefType = exports.WorkspaceProbeContext = exports.WithEnvvarsContext = exports.WithReferrerContext = exports.PrebuiltWorkspaceContext = exports.StartPrebuildContext = exports.SnapshotContext = exports.WithDefaultConfig = exports.WithPrebuild = exports.WithSnapshot = exports.WorkspaceContext = exports.ExternalImageConfigFile = exports.ImageConfigFile = exports.ImageConfigString = exports.WorkspaceImageBuild = exports.TaskConfig = exports.PortRangeConfig = exports.PortConfig = exports.PrebuiltWorkspace = exports.WorkspaceImageSourceReference = exports.WorkspaceImageSourceDocker = exports.GithubAppPrebuildConfig = exports.Workspace = exports.Identity = exports.GitpodTokenType = exports.UserEnvVar = exports.WorkspaceFeatureFlags = exports.User = void 0;
9
+ const crypto_1 = require("crypto");
47
10
  var User;
48
11
  (function (User) {
49
12
  function is(data) {
50
- return data
51
- && data.hasOwnProperty('id')
52
- && data.hasOwnProperty('identities');
13
+ return data && data.hasOwnProperty("id") && data.hasOwnProperty("identities");
53
14
  }
54
15
  User.is = is;
55
16
  function getIdentity(user, authProviderId) {
56
- return user.identities.find(function (id) { return id.authProviderId === authProviderId; });
17
+ return user.identities.find((id) => id.authProviderId === authProviderId);
57
18
  }
58
19
  User.getIdentity = getIdentity;
59
20
  function censor(user) {
60
- var res = __assign({}, user);
61
- delete (res.additionalData);
62
- res.identities = res.identities.map(function (i) {
63
- delete (i.tokens);
21
+ const res = Object.assign({}, user);
22
+ delete res.additionalData;
23
+ res.identities = res.identities.map((i) => {
24
+ delete i.tokens;
64
25
  // The user field is not in the Identity shape, but actually exists on DBIdentity.
65
26
  // Trying to push this object out via JSON RPC will fail because of the cyclic nature
66
27
  // of this field.
67
- delete (i.user);
28
+ delete i.user;
68
29
  return i;
69
30
  });
70
31
  return res;
71
32
  }
72
33
  User.censor = censor;
73
34
  function getPrimaryEmail(user) {
74
- var identities = user.identities.filter(function (i) { return !!i.primaryEmail; });
35
+ const identities = user.identities.filter((i) => !!i.primaryEmail);
75
36
  if (identities.length <= 0) {
76
- throw new Error("No identity with primary email for user: " + user.id + "!");
37
+ throw new Error(`No identity with primary email for user: ${user.id}!`);
77
38
  }
78
39
  return identities[0].primaryEmail;
79
40
  }
80
41
  User.getPrimaryEmail = getPrimaryEmail;
81
42
  function getName(user) {
82
- var e_1, _a;
83
- var name = user.fullName || user.name;
43
+ const name = user.fullName || user.name;
84
44
  if (name) {
85
45
  return name;
86
46
  }
87
- try {
88
- for (var _b = __values(user.identities), _c = _b.next(); !_c.done; _c = _b.next()) {
89
- var id = _c.value;
90
- if (id.authName !== "") {
91
- return id.authName;
92
- }
47
+ for (const id of user.identities) {
48
+ if (id.authName !== "") {
49
+ return id.authName;
93
50
  }
94
51
  }
95
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
96
- finally {
97
- try {
98
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
99
- }
100
- finally { if (e_1) throw e_1.error; }
101
- }
102
52
  return undefined;
103
53
  }
104
54
  User.getName = getName;
@@ -107,13 +57,19 @@ var User;
107
57
  * The values of this type MUST MATCH enum values in WorkspaceFeatureFlag from ws-manager/client/core_pb.d.ts
108
58
  * If they don't we'll break things during workspace startup.
109
59
  */
110
- exports.WorkspaceFeatureFlags = { "full_workspace_backup": undefined, "fixed_resources": undefined };
60
+ exports.WorkspaceFeatureFlags = {
61
+ full_workspace_backup: undefined,
62
+ fixed_resources: undefined,
63
+ persistent_volume_claim: undefined,
64
+ };
111
65
  var UserEnvVar;
112
66
  (function (UserEnvVar) {
67
+ // DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
113
68
  function normalizeRepoPattern(pattern) {
114
69
  return pattern.toLocaleLowerCase();
115
70
  }
116
71
  UserEnvVar.normalizeRepoPattern = normalizeRepoPattern;
72
+ // DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
117
73
  function score(value) {
118
74
  // We use a score to enforce precedence:
119
75
  // value/value = 0
@@ -122,12 +78,12 @@ var UserEnvVar;
122
78
  // */* = 3
123
79
  // #/# = 4 (used for env vars passed through the URL)
124
80
  // the lower the score, the higher the precedence.
125
- var _a = __read(splitRepositoryPattern(value.repositoryPattern), 2), ownerPattern = _a[0], repoPattern = _a[1];
126
- var score = 0;
81
+ const [ownerPattern, repoPattern] = splitRepositoryPattern(value.repositoryPattern);
82
+ let score = 0;
127
83
  if (repoPattern == "*") {
128
84
  score += 1;
129
85
  }
130
- if (ownerPattern == '*') {
86
+ if (ownerPattern == "*") {
131
87
  score += 2;
132
88
  }
133
89
  if (ownerPattern == "#" || repoPattern == "#") {
@@ -136,73 +92,54 @@ var UserEnvVar;
136
92
  return score;
137
93
  }
138
94
  UserEnvVar.score = score;
95
+ // DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
139
96
  function filter(vars, owner, repo) {
140
- var e_2, _a, e_3, _b;
141
- var result = vars.filter(function (e) {
142
- var _a = __read(splitRepositoryPattern(e.repositoryPattern), 2), ownerPattern = _a[0], repoPattern = _a[1];
143
- if (ownerPattern !== '*' && ownerPattern !== '#' && (!!owner && ownerPattern !== owner.toLocaleLowerCase())) {
97
+ let result = vars.filter((e) => {
98
+ const [ownerPattern, repoPattern] = splitRepositoryPattern(e.repositoryPattern);
99
+ if (ownerPattern !== "*" && ownerPattern !== "#" && !!owner && ownerPattern !== owner.toLocaleLowerCase()) {
144
100
  return false;
145
101
  }
146
- if (repoPattern !== '*' && repoPattern !== '#' && (!!repo && repoPattern !== repo.toLocaleLowerCase())) {
102
+ if (repoPattern !== "*" && repoPattern !== "#" && !!repo && repoPattern !== repo.toLocaleLowerCase()) {
147
103
  return false;
148
104
  }
149
105
  return true;
150
106
  });
151
- var resmap = new Map();
152
- result.forEach(function (e) {
153
- var l = (resmap.get(e.name) || []);
107
+ const resmap = new Map();
108
+ result.forEach((e) => {
109
+ const l = resmap.get(e.name) || [];
154
110
  l.push(e);
155
111
  resmap.set(e.name, l);
156
112
  });
157
113
  result = [];
158
- try {
159
- for (var _c = __values(resmap.keys()), _d = _c.next(); !_d.done; _d = _c.next()) {
160
- var name_1 = _d.value;
161
- var candidates = resmap.get(name_1);
162
- if (!candidates) {
163
- // not sure how this can happen, but so be it
164
- continue;
165
- }
166
- if (candidates.length == 1) {
167
- result.push(candidates[0]);
168
- continue;
169
- }
170
- var minscore = 10;
171
- var bestCandidate = void 0;
172
- try {
173
- for (var candidates_1 = (e_3 = void 0, __values(candidates)), candidates_1_1 = candidates_1.next(); !candidates_1_1.done; candidates_1_1 = candidates_1.next()) {
174
- var e = candidates_1_1.value;
175
- var score_1 = UserEnvVar.score(e);
176
- if (!bestCandidate || score_1 < minscore) {
177
- minscore = score_1;
178
- bestCandidate = e;
179
- }
180
- }
181
- }
182
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
183
- finally {
184
- try {
185
- if (candidates_1_1 && !candidates_1_1.done && (_b = candidates_1.return)) _b.call(candidates_1);
186
- }
187
- finally { if (e_3) throw e_3.error; }
188
- }
189
- result.push(bestCandidate);
114
+ for (const name of resmap.keys()) {
115
+ const candidates = resmap.get(name);
116
+ if (!candidates) {
117
+ // not sure how this can happen, but so be it
118
+ continue;
190
119
  }
191
- }
192
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
193
- finally {
194
- try {
195
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
120
+ if (candidates.length == 1) {
121
+ result.push(candidates[0]);
122
+ continue;
196
123
  }
197
- finally { if (e_2) throw e_2.error; }
124
+ let minscore = 10;
125
+ let bestCandidate;
126
+ for (const e of candidates) {
127
+ const score = UserEnvVar.score(e);
128
+ if (!bestCandidate || score < minscore) {
129
+ minscore = score;
130
+ bestCandidate = e;
131
+ }
132
+ }
133
+ result.push(bestCandidate);
198
134
  }
199
135
  return result;
200
136
  }
201
137
  UserEnvVar.filter = filter;
138
+ // DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
202
139
  function splitRepositoryPattern(repositoryPattern) {
203
- var patterns = repositoryPattern.split('/');
204
- var repoPattern = patterns.pop() || "";
205
- var ownerPattern = patterns.join('/');
140
+ const patterns = repositoryPattern.split("/");
141
+ const repoPattern = patterns.slice(1).join("/");
142
+ const ownerPattern = patterns[0];
206
143
  return [ownerPattern, repoPattern];
207
144
  }
208
145
  UserEnvVar.splitRepositoryPattern = splitRepositoryPattern;
@@ -215,14 +152,11 @@ var GitpodTokenType;
215
152
  var Identity;
216
153
  (function (Identity) {
217
154
  function is(data) {
218
- return data.hasOwnProperty('authProviderId')
219
- && data.hasOwnProperty('authId')
220
- && data.hasOwnProperty('authName');
155
+ return (data.hasOwnProperty("authProviderId") && data.hasOwnProperty("authId") && data.hasOwnProperty("authName"));
221
156
  }
222
157
  Identity.is = is;
223
158
  function equals(id1, id2) {
224
- return id1.authProviderId === id2.authProviderId
225
- && id1.authId === id2.authId;
159
+ return id1.authProviderId === id2.authProviderId && id1.authId === id2.authId;
226
160
  }
227
161
  Identity.equals = equals;
228
162
  })(Identity = exports.Identity || (exports.Identity = {}));
@@ -230,14 +164,14 @@ var Workspace;
230
164
  (function (Workspace) {
231
165
  function getFullRepositoryName(ws) {
232
166
  if (CommitContext.is(ws.context)) {
233
- return ws.context.repository.owner + '/' + ws.context.repository.name;
167
+ return ws.context.repository.owner + "/" + ws.context.repository.name;
234
168
  }
235
169
  return undefined;
236
170
  }
237
171
  Workspace.getFullRepositoryName = getFullRepositoryName;
238
172
  function getFullRepositoryUrl(ws) {
239
173
  if (CommitContext.is(ws.context)) {
240
- return "https://" + ws.context.repository.host + "/" + getFullRepositoryName(ws);
174
+ return `https://${ws.context.repository.host}/${getFullRepositoryName(ws)}`;
241
175
  }
242
176
  return undefined;
243
177
  }
@@ -274,29 +208,28 @@ var Workspace;
274
208
  var GithubAppPrebuildConfig;
275
209
  (function (GithubAppPrebuildConfig) {
276
210
  function is(obj) {
277
- return !(typeof obj === 'boolean');
211
+ return !(typeof obj === "boolean");
278
212
  }
279
213
  GithubAppPrebuildConfig.is = is;
280
214
  })(GithubAppPrebuildConfig = exports.GithubAppPrebuildConfig || (exports.GithubAppPrebuildConfig = {}));
281
215
  var WorkspaceImageSourceDocker;
282
216
  (function (WorkspaceImageSourceDocker) {
283
217
  function is(obj) {
284
- return 'dockerFileHash' in obj
285
- && 'dockerFilePath' in obj;
218
+ return "dockerFileHash" in obj && "dockerFilePath" in obj;
286
219
  }
287
220
  WorkspaceImageSourceDocker.is = is;
288
221
  })(WorkspaceImageSourceDocker = exports.WorkspaceImageSourceDocker || (exports.WorkspaceImageSourceDocker = {}));
289
222
  var WorkspaceImageSourceReference;
290
223
  (function (WorkspaceImageSourceReference) {
291
224
  function is(obj) {
292
- return 'baseImageResolved' in obj;
225
+ return "baseImageResolved" in obj;
293
226
  }
294
227
  WorkspaceImageSourceReference.is = is;
295
228
  })(WorkspaceImageSourceReference = exports.WorkspaceImageSourceReference || (exports.WorkspaceImageSourceReference = {}));
296
229
  var PrebuiltWorkspace;
297
230
  (function (PrebuiltWorkspace) {
298
231
  function isDone(pws) {
299
- return pws.state === "available" || pws.state === "timeout" || pws.state === 'aborted';
232
+ return pws.state === "available" || pws.state === "timeout" || pws.state === "aborted";
300
233
  }
301
234
  PrebuiltWorkspace.isDone = isDone;
302
235
  function isAvailable(pws) {
@@ -311,142 +244,130 @@ var PrebuiltWorkspace;
311
244
  var PortConfig;
312
245
  (function (PortConfig) {
313
246
  function is(config) {
314
- return config && ('port' in config) && (typeof config.port === 'number');
247
+ return config && "port" in config && typeof config.port === "number";
315
248
  }
316
249
  PortConfig.is = is;
317
250
  })(PortConfig = exports.PortConfig || (exports.PortConfig = {}));
318
251
  var PortRangeConfig;
319
252
  (function (PortRangeConfig) {
320
253
  function is(config) {
321
- return config && ('port' in config) && (typeof config.port === 'string' || config.port instanceof String);
254
+ return config && "port" in config && (typeof config.port === "string" || config.port instanceof String);
322
255
  }
323
256
  PortRangeConfig.is = is;
324
257
  })(PortRangeConfig = exports.PortRangeConfig || (exports.PortRangeConfig = {}));
325
258
  var TaskConfig;
326
259
  (function (TaskConfig) {
327
260
  function is(config) {
328
- return config
329
- && ('command' in config || 'init' in config || 'before' in config);
261
+ return config && ("command" in config || "init" in config || "before" in config);
330
262
  }
331
263
  TaskConfig.is = is;
332
264
  })(TaskConfig = exports.TaskConfig || (exports.TaskConfig = {}));
333
265
  var WorkspaceImageBuild;
334
266
  (function (WorkspaceImageBuild) {
335
- var LogLine;
267
+ let LogLine;
336
268
  (function (LogLine) {
337
- LogLine.DELIMITER = '\r\n';
269
+ LogLine.DELIMITER = "\r\n";
338
270
  LogLine.DELIMITER_REGEX = /\r?\n/;
339
271
  })(LogLine = WorkspaceImageBuild.LogLine || (WorkspaceImageBuild.LogLine = {}));
340
272
  })(WorkspaceImageBuild = exports.WorkspaceImageBuild || (exports.WorkspaceImageBuild = {}));
341
273
  var ImageConfigString;
342
274
  (function (ImageConfigString) {
343
275
  function is(config) {
344
- return typeof config === 'string';
276
+ return typeof config === "string";
345
277
  }
346
278
  ImageConfigString.is = is;
347
279
  })(ImageConfigString = exports.ImageConfigString || (exports.ImageConfigString = {}));
348
280
  var ImageConfigFile;
349
281
  (function (ImageConfigFile) {
350
282
  function is(config) {
351
- return typeof config === 'object'
352
- && 'file' in config;
283
+ return typeof config === "object" && "file" in config;
353
284
  }
354
285
  ImageConfigFile.is = is;
355
286
  })(ImageConfigFile = exports.ImageConfigFile || (exports.ImageConfigFile = {}));
356
287
  var ExternalImageConfigFile;
357
288
  (function (ExternalImageConfigFile) {
358
289
  function is(config) {
359
- return typeof config === 'object'
360
- && 'file' in config
361
- && 'externalSource' in config;
290
+ return typeof config === "object" && "file" in config && "externalSource" in config;
362
291
  }
363
292
  ExternalImageConfigFile.is = is;
364
293
  })(ExternalImageConfigFile = exports.ExternalImageConfigFile || (exports.ExternalImageConfigFile = {}));
365
294
  var WorkspaceContext;
366
295
  (function (WorkspaceContext) {
367
296
  function is(context) {
368
- return context
369
- && 'title' in context;
297
+ return context && "title" in context;
370
298
  }
371
299
  WorkspaceContext.is = is;
372
300
  })(WorkspaceContext = exports.WorkspaceContext || (exports.WorkspaceContext = {}));
373
301
  var WithSnapshot;
374
302
  (function (WithSnapshot) {
375
303
  function is(context) {
376
- return context
377
- && 'snapshotBucketId' in context;
304
+ return context && "snapshotBucketId" in context;
378
305
  }
379
306
  WithSnapshot.is = is;
380
307
  })(WithSnapshot = exports.WithSnapshot || (exports.WithSnapshot = {}));
381
308
  var WithPrebuild;
382
309
  (function (WithPrebuild) {
383
310
  function is(context) {
384
- return context
385
- && 'snapshotBucketId' in context
386
- && 'prebuildWorkspaceId' in context
387
- && 'wasPrebuilt' in context;
311
+ return context && WithSnapshot.is(context) && "prebuildWorkspaceId" in context && "wasPrebuilt" in context;
388
312
  }
389
313
  WithPrebuild.is = is;
390
314
  })(WithPrebuild = exports.WithPrebuild || (exports.WithPrebuild = {}));
391
315
  var WithDefaultConfig;
392
316
  (function (WithDefaultConfig) {
393
317
  function is(context) {
394
- return context
395
- && 'withDefaultConfig' in context
396
- && context.withDefaultConfig;
318
+ return context && "withDefaultConfig" in context && context.withDefaultConfig;
397
319
  }
398
320
  WithDefaultConfig.is = is;
399
321
  function mark(ctx) {
400
- return __assign(__assign({}, ctx), { withDefaultConfig: true });
322
+ return Object.assign(Object.assign({}, ctx), { withDefaultConfig: true });
401
323
  }
402
324
  WithDefaultConfig.mark = mark;
403
325
  })(WithDefaultConfig = exports.WithDefaultConfig || (exports.WithDefaultConfig = {}));
404
326
  var SnapshotContext;
405
327
  (function (SnapshotContext) {
406
328
  function is(context) {
407
- return context
408
- && WithSnapshot.is(context)
409
- && 'snapshotId' in context;
329
+ return context && WithSnapshot.is(context) && "snapshotId" in context;
410
330
  }
411
331
  SnapshotContext.is = is;
412
332
  })(SnapshotContext = exports.SnapshotContext || (exports.SnapshotContext = {}));
413
333
  var StartPrebuildContext;
414
334
  (function (StartPrebuildContext) {
415
335
  function is(context) {
416
- return context
417
- && 'actual' in context;
336
+ return context && "actual" in context;
418
337
  }
419
338
  StartPrebuildContext.is = is;
420
339
  })(StartPrebuildContext = exports.StartPrebuildContext || (exports.StartPrebuildContext = {}));
421
340
  var PrebuiltWorkspaceContext;
422
341
  (function (PrebuiltWorkspaceContext) {
423
342
  function is(context) {
424
- return context
425
- && 'originalContext' in context
426
- && 'prebuiltWorkspace' in context;
343
+ return context && "originalContext" in context && "prebuiltWorkspace" in context;
427
344
  }
428
345
  PrebuiltWorkspaceContext.is = is;
429
346
  })(PrebuiltWorkspaceContext = exports.PrebuiltWorkspaceContext || (exports.PrebuiltWorkspaceContext = {}));
347
+ var WithReferrerContext;
348
+ (function (WithReferrerContext) {
349
+ function is(context) {
350
+ return context && "referrer" in context;
351
+ }
352
+ WithReferrerContext.is = is;
353
+ })(WithReferrerContext = exports.WithReferrerContext || (exports.WithReferrerContext = {}));
430
354
  var WithEnvvarsContext;
431
355
  (function (WithEnvvarsContext) {
432
356
  function is(context) {
433
- return context
434
- && 'envvars' in context;
357
+ return context && "envvars" in context;
435
358
  }
436
359
  WithEnvvarsContext.is = is;
437
360
  })(WithEnvvarsContext = exports.WithEnvvarsContext || (exports.WithEnvvarsContext = {}));
438
361
  var WorkspaceProbeContext;
439
362
  (function (WorkspaceProbeContext) {
440
363
  function is(context) {
441
- return context
442
- && 'responseURL' in context
443
- && 'responseToken' in context;
364
+ return context && "responseURL" in context && "responseToken" in context;
444
365
  }
445
366
  WorkspaceProbeContext.is = is;
446
367
  })(WorkspaceProbeContext = exports.WorkspaceProbeContext || (exports.WorkspaceProbeContext = {}));
447
368
  var RefType;
448
369
  (function (RefType) {
449
- RefType.getRefType = function (commit) {
370
+ RefType.getRefType = (commit) => {
450
371
  if (!commit.ref) {
451
372
  return "revision";
452
373
  }
@@ -457,7 +378,7 @@ var RefType;
457
378
  var AdditionalContentContext;
458
379
  (function (AdditionalContentContext) {
459
380
  function is(ctx) {
460
- return 'additionalFiles' in ctx;
381
+ return "additionalFiles" in ctx;
461
382
  }
462
383
  AdditionalContentContext.is = is;
463
384
  function hasDockerConfig(ctx, config) {
@@ -466,47 +387,59 @@ var AdditionalContentContext;
466
387
  AdditionalContentContext.hasDockerConfig = hasDockerConfig;
467
388
  })(AdditionalContentContext = exports.AdditionalContentContext || (exports.AdditionalContentContext = {}));
468
389
  var CommitContext;
390
+ (function (CommitContext) {
391
+ /**
392
+ * Creates a hash for all the commits of the CommitContext and all sub-repo commit infos.
393
+ * The hash is max 255 chars long.
394
+ * @param commitContext
395
+ * @returns hash for commitcontext
396
+ */
397
+ function computeHash(commitContext) {
398
+ // for single commits we use the revision to be backward compatible.
399
+ if (!commitContext.additionalRepositoryCheckoutInfo ||
400
+ commitContext.additionalRepositoryCheckoutInfo.length === 0) {
401
+ return commitContext.revision;
402
+ }
403
+ const hasher = (0, crypto_1.createHash)("sha256");
404
+ hasher.update(commitContext.revision);
405
+ for (const info of commitContext.additionalRepositoryCheckoutInfo) {
406
+ hasher.update(info.revision);
407
+ }
408
+ return hasher.digest("hex");
409
+ }
410
+ CommitContext.computeHash = computeHash;
411
+ })(CommitContext = exports.CommitContext || (exports.CommitContext = {}));
469
412
  (function (CommitContext) {
470
413
  function is(commit) {
471
- return WorkspaceContext.is(commit)
472
- && 'repository' in commit
473
- && 'revision' in commit;
414
+ return WorkspaceContext.is(commit) && "repository" in commit && "revision" in commit;
474
415
  }
475
416
  CommitContext.is = is;
476
417
  })(CommitContext = exports.CommitContext || (exports.CommitContext = {}));
477
418
  var PullRequestContext;
478
419
  (function (PullRequestContext) {
479
420
  function is(ctx) {
480
- return CommitContext.is(ctx)
481
- && 'nr' in ctx
482
- && 'ref' in ctx
483
- && 'base' in ctx;
421
+ return CommitContext.is(ctx) && "nr" in ctx && "ref" in ctx && "base" in ctx;
484
422
  }
485
423
  PullRequestContext.is = is;
486
424
  })(PullRequestContext = exports.PullRequestContext || (exports.PullRequestContext = {}));
487
425
  var IssueContext;
488
426
  (function (IssueContext) {
489
427
  function is(ctx) {
490
- return CommitContext.is(ctx)
491
- && 'nr' in ctx
492
- && 'ref' in ctx
493
- && 'localBranch' in ctx;
428
+ return CommitContext.is(ctx) && "nr" in ctx && "ref" in ctx && "localBranch" in ctx;
494
429
  }
495
430
  IssueContext.is = is;
496
431
  })(IssueContext = exports.IssueContext || (exports.IssueContext = {}));
497
432
  var NavigatorContext;
498
433
  (function (NavigatorContext) {
499
434
  function is(ctx) {
500
- return CommitContext.is(ctx)
501
- && 'path' in ctx
502
- && 'isFile' in ctx;
435
+ return CommitContext.is(ctx) && "path" in ctx && "isFile" in ctx;
503
436
  }
504
437
  NavigatorContext.is = is;
505
438
  })(NavigatorContext = exports.NavigatorContext || (exports.NavigatorContext = {}));
506
439
  var Repository;
507
440
  (function (Repository) {
508
441
  function fullRepoName(repo) {
509
- return repo.host + "/" + repo.owner + "/" + repo.name;
442
+ return `${repo.host}/${repo.owner}/${repo.name}`;
510
443
  }
511
444
  Repository.fullRepoName = fullRepoName;
512
445
  })(Repository = exports.Repository || (exports.Repository = {}));
@@ -539,23 +472,31 @@ var CreateWorkspaceMode;
539
472
  var WorkspaceCreationResult;
540
473
  (function (WorkspaceCreationResult) {
541
474
  function is(data) {
542
- return data && ('createdWorkspaceId' in data
543
- || 'existingWorkspaces' in data
544
- || 'runningWorkspacePrebuild' in data
545
- || 'runningPrebuildWorkspaceID' in data);
475
+ return (data &&
476
+ ("createdWorkspaceId" in data ||
477
+ "existingWorkspaces" in data ||
478
+ "runningWorkspacePrebuild" in data ||
479
+ "runningPrebuildWorkspaceID" in data));
546
480
  }
547
481
  WorkspaceCreationResult.is = is;
548
482
  })(WorkspaceCreationResult = exports.WorkspaceCreationResult || (exports.WorkspaceCreationResult = {}));
483
+ var AuthProviderInfo;
484
+ (function (AuthProviderInfo) {
485
+ function isGitHubEnterprise(info) {
486
+ return !!info && info.authProviderType === "GitHub" && info.host !== "github.com";
487
+ }
488
+ AuthProviderInfo.isGitHubEnterprise = isGitHubEnterprise;
489
+ })(AuthProviderInfo = exports.AuthProviderInfo || (exports.AuthProviderInfo = {}));
549
490
  var AuthProviderEntry;
550
491
  (function (AuthProviderEntry) {
551
492
  function redact(entry) {
552
- return __assign(__assign({}, entry), { oauth: __assign(__assign({}, entry.oauth), { clientSecret: "redacted" }) });
493
+ return Object.assign(Object.assign({}, entry), { oauth: Object.assign(Object.assign({}, entry.oauth), { clientSecret: "redacted" }) });
553
494
  }
554
495
  AuthProviderEntry.redact = redact;
555
496
  })(AuthProviderEntry = exports.AuthProviderEntry || (exports.AuthProviderEntry = {}));
556
497
  var TheiaPlugin;
557
498
  (function (TheiaPlugin) {
558
- var State;
499
+ let State;
559
500
  (function (State) {
560
501
  State["Uploading"] = "uploading";
561
502
  State["Uploaded"] = "uploaded";