@gitpod/gitpod-protocol 0.1.5-sefftinge-create-feature-flag-for-4354.0 → 0.1.5-server-vscode-oauth2.11

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 (223) hide show
  1. package/data/gitpod-schema.json +4 -22
  2. package/lib/accounting-protocol.d.ts +3 -5
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +6 -11
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +9 -4
  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 +44 -0
  11. package/lib/analytics.d.ts.map +1 -0
  12. package/lib/{util/without.js → analytics.js} +4 -2
  13. package/lib/analytics.js.map +1 -0
  14. package/lib/context-url.d.ts +18 -0
  15. package/lib/context-url.d.ts.map +1 -0
  16. package/lib/context-url.js +49 -0
  17. package/lib/context-url.js.map +1 -0
  18. package/lib/{util/context-url.spec.d.ts → context-url.spec.d.ts} +2 -0
  19. package/lib/context-url.spec.d.ts.map +1 -0
  20. package/lib/context-url.spec.js +73 -0
  21. package/lib/context-url.spec.js.map +1 -0
  22. package/lib/email-protocol.d.ts +1 -2
  23. package/lib/email-protocol.d.ts.map +1 -1
  24. package/lib/email-protocol.js +3 -3
  25. package/lib/email-protocol.js.map +1 -1
  26. package/lib/encryption/container-module.js +4 -4
  27. package/lib/encryption/container-module.js.map +1 -1
  28. package/lib/encryption/encryption-engine.js +19 -20
  29. package/lib/encryption/encryption-engine.js.map +1 -1
  30. package/lib/encryption/encryption-engine.spec.js +29 -36
  31. package/lib/encryption/encryption-engine.spec.js.map +1 -1
  32. package/lib/encryption/encryption-service.js +29 -43
  33. package/lib/encryption/encryption-service.js.map +1 -1
  34. package/lib/encryption/key-provider.js +25 -30
  35. package/lib/encryption/key-provider.js.map +1 -1
  36. package/lib/env.d.ts +1 -2
  37. package/lib/env.d.ts.map +1 -1
  38. package/lib/env.js +20 -21
  39. package/lib/env.js.map +1 -1
  40. package/lib/gitpod-file-parser.js +25 -41
  41. package/lib/gitpod-file-parser.js.map +1 -1
  42. package/lib/gitpod-file-parser.spec.js +116 -116
  43. package/lib/gitpod-file-parser.spec.js.map +1 -1
  44. package/lib/gitpod-service.d.ts +74 -5
  45. package/lib/gitpod-service.d.ts.map +1 -1
  46. package/lib/gitpod-service.js +149 -294
  47. package/lib/gitpod-service.js.map +1 -1
  48. package/lib/headless-workspace-log.d.ts +8 -11
  49. package/lib/headless-workspace-log.d.ts.map +1 -1
  50. package/lib/headless-workspace-log.js +4 -7
  51. package/lib/headless-workspace-log.js.map +1 -1
  52. package/lib/index.d.ts +2 -0
  53. package/lib/index.d.ts.map +1 -1
  54. package/lib/index.js +2 -0
  55. package/lib/index.js.map +1 -1
  56. package/lib/messaging/browser/connection.d.ts +3 -3
  57. package/lib/messaging/browser/connection.d.ts.map +1 -1
  58. package/lib/messaging/browser/connection.js +172 -35
  59. package/lib/messaging/browser/connection.js.map +1 -1
  60. package/lib/messaging/browser/window-connection.js +34 -54
  61. package/lib/messaging/browser/window-connection.js.map +1 -1
  62. package/lib/messaging/client-call-metrics.d.ts +35 -0
  63. package/lib/messaging/client-call-metrics.d.ts.map +1 -0
  64. package/lib/messaging/client-call-metrics.js +83 -0
  65. package/lib/messaging/client-call-metrics.js.map +1 -0
  66. package/lib/messaging/connection-error-handler.js +11 -23
  67. package/lib/messaging/connection-error-handler.js.map +1 -1
  68. package/lib/messaging/error.d.ts +1 -0
  69. package/lib/messaging/error.d.ts.map +1 -1
  70. package/lib/messaging/error.js +2 -0
  71. package/lib/messaging/error.js.map +1 -1
  72. package/lib/messaging/handler.d.ts +10 -0
  73. package/lib/messaging/handler.d.ts.map +1 -1
  74. package/lib/messaging/node/connection.js +21 -21
  75. package/lib/messaging/node/connection.js.map +1 -1
  76. package/lib/messaging/proxy-factory.d.ts +2 -0
  77. package/lib/messaging/proxy-factory.d.ts.map +1 -1
  78. package/lib/messaging/proxy-factory.js +74 -159
  79. package/lib/messaging/proxy-factory.js.map +1 -1
  80. package/lib/permission.d.ts +1 -2
  81. package/lib/permission.d.ts.map +1 -1
  82. package/lib/permission.js +12 -13
  83. package/lib/permission.js.map +1 -1
  84. package/lib/plans.js +38 -57
  85. package/lib/plans.js.map +1 -1
  86. package/lib/protocol.d.ts +52 -22
  87. package/lib/protocol.d.ts.map +1 -1
  88. package/lib/protocol.js +68 -115
  89. package/lib/protocol.js.map +1 -1
  90. package/lib/team-subscription-protocol.d.ts +3 -3
  91. package/lib/team-subscription-protocol.d.ts.map +1 -1
  92. package/lib/team-subscription-protocol.js +13 -10
  93. package/lib/team-subscription-protocol.js.map +1 -1
  94. package/lib/teams-projects-protocol.d.ts +102 -0
  95. package/lib/teams-projects-protocol.d.ts.map +1 -0
  96. package/lib/teams-projects-protocol.js +23 -0
  97. package/lib/teams-projects-protocol.js.map +1 -0
  98. package/lib/util/analytics.d.ts +1 -26
  99. package/lib/util/analytics.d.ts.map +1 -1
  100. package/lib/util/analytics.js +36 -28
  101. package/lib/util/analytics.js.map +1 -1
  102. package/lib/util/async-iterator.js +55 -133
  103. package/lib/util/async-iterator.js.map +1 -1
  104. package/lib/util/cancelable.js +17 -59
  105. package/lib/util/cancelable.js.map +1 -1
  106. package/lib/util/date-time.js +8 -8
  107. package/lib/util/date-time.js.map +1 -1
  108. package/lib/util/deferred.js +10 -12
  109. package/lib/util/deferred.js.map +1 -1
  110. package/lib/util/disposable.js +26 -39
  111. package/lib/util/disposable.js.map +1 -1
  112. package/lib/util/event.js +58 -74
  113. package/lib/util/event.js.map +1 -1
  114. package/lib/util/garbage-collected-cache.js +22 -46
  115. package/lib/util/garbage-collected-cache.js.map +1 -1
  116. package/lib/util/generate-workspace-id.d.ts.map +1 -1
  117. package/lib/util/generate-workspace-id.js +12 -67
  118. package/lib/util/generate-workspace-id.js.map +1 -1
  119. package/lib/util/generate-workspace-id.spec.js +34 -79
  120. package/lib/util/generate-workspace-id.spec.js.map +1 -1
  121. package/lib/util/gitpod-cookie.d.ts +20 -0
  122. package/lib/util/gitpod-cookie.d.ts.map +1 -0
  123. package/lib/util/gitpod-cookie.js +44 -0
  124. package/lib/util/gitpod-cookie.js.map +1 -0
  125. package/lib/util/gitpod-host-url.js +93 -103
  126. package/lib/util/gitpod-host-url.js.map +1 -1
  127. package/lib/util/gitpod-host-url.spec.d.ts +5 -0
  128. package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
  129. package/lib/util/gitpod-host-url.spec.js +92 -70
  130. package/lib/util/gitpod-host-url.spec.js.map +1 -1
  131. package/lib/util/grpc.d.ts +15 -0
  132. package/lib/util/grpc.d.ts.map +1 -0
  133. package/lib/util/grpc.js +18 -0
  134. package/lib/util/grpc.js.map +1 -0
  135. package/lib/util/logging.d.ts +17 -1
  136. package/lib/util/logging.d.ts.map +1 -1
  137. package/lib/util/logging.js +107 -110
  138. package/lib/util/logging.js.map +1 -1
  139. package/lib/util/make-link.js +2 -2
  140. package/lib/util/make-link.js.map +1 -1
  141. package/lib/util/parse-workspace-id.d.ts +10 -0
  142. package/lib/util/parse-workspace-id.d.ts.map +1 -1
  143. package/lib/util/parse-workspace-id.js +31 -7
  144. package/lib/util/parse-workspace-id.js.map +1 -1
  145. package/lib/util/parse-workspace-id.spec.d.ts +4 -0
  146. package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
  147. package/lib/util/parse-workspace-id.spec.js +123 -84
  148. package/lib/util/parse-workspace-id.spec.js.map +1 -1
  149. package/lib/util/queue.js +16 -55
  150. package/lib/util/queue.js.map +1 -1
  151. package/lib/util/queue.spec.js +144 -288
  152. package/lib/util/queue.spec.js.map +1 -1
  153. package/lib/util/repeater.js +35 -88
  154. package/lib/util/repeater.js.map +1 -1
  155. package/lib/util/safe-promise.js +9 -12
  156. package/lib/util/safe-promise.js.map +1 -1
  157. package/lib/util/semaphore.js +15 -46
  158. package/lib/util/semaphore.js.map +1 -1
  159. package/lib/util/skip-if.js +6 -6
  160. package/lib/util/skip-if.js.map +1 -1
  161. package/lib/util/timeutil.js +16 -16
  162. package/lib/util/timeutil.js.map +1 -1
  163. package/lib/util/timeutil.spec.js +21 -24
  164. package/lib/util/timeutil.spec.js.map +1 -1
  165. package/lib/util/tracing.js +43 -47
  166. package/lib/util/tracing.js.map +1 -1
  167. package/lib/util/workspace-port-authentication.js +2 -2
  168. package/lib/util/workspace-port-authentication.js.map +1 -1
  169. package/lib/workspace-cluster.d.ts +12 -3
  170. package/lib/workspace-cluster.d.ts.map +1 -1
  171. package/lib/workspace-cluster.js +3 -3
  172. package/lib/workspace-cluster.js.map +1 -1
  173. package/lib/workspace-instance.d.ts +3 -0
  174. package/lib/workspace-instance.d.ts.map +1 -1
  175. package/lib/wsready.js +1 -1
  176. package/lib/wsready.js.map +1 -1
  177. package/package.json +11 -6
  178. package/pkg-yarn.lock +7 -4
  179. package/src/accounting-protocol.ts +3 -7
  180. package/src/admin-protocol.ts +10 -5
  181. package/src/analytics.ts +52 -0
  182. package/src/context-url.spec.ts +39 -0
  183. package/src/context-url.ts +51 -0
  184. package/src/email-protocol.ts +1 -2
  185. package/src/env.ts +10 -10
  186. package/src/gitpod-service.ts +90 -12
  187. package/src/headless-workspace-log.ts +7 -11
  188. package/src/index.ts +2 -0
  189. package/src/messaging/browser/connection.ts +176 -10
  190. package/src/messaging/client-call-metrics.ts +97 -0
  191. package/src/messaging/error.ts +3 -0
  192. package/src/messaging/handler.ts +12 -0
  193. package/src/messaging/node/connection.ts +2 -2
  194. package/src/messaging/proxy-factory.ts +13 -5
  195. package/src/permission.ts +0 -1
  196. package/src/protocol.ts +73 -28
  197. package/src/team-subscription-protocol.ts +5 -3
  198. package/src/teams-projects-protocol.ts +131 -0
  199. package/src/util/analytics.ts +17 -30
  200. package/src/util/generate-workspace-id.ts +1 -0
  201. package/src/util/gitpod-cookie.ts +39 -0
  202. package/src/util/gitpod-host-url.spec.ts +20 -0
  203. package/src/util/gitpod-host-url.ts +1 -1
  204. package/src/util/grpc.ts +15 -0
  205. package/src/util/logging.ts +70 -6
  206. package/src/util/parse-workspace-id.spec.ts +21 -1
  207. package/src/util/parse-workspace-id.ts +32 -6
  208. package/src/workspace-cluster.ts +9 -3
  209. package/src/workspace-instance.ts +19 -7
  210. package/src/wsready.ts +1 -1
  211. package/lib/util/context-url.d.ts +0 -13
  212. package/lib/util/context-url.d.ts.map +0 -1
  213. package/lib/util/context-url.js +0 -26
  214. package/lib/util/context-url.js.map +0 -1
  215. package/lib/util/context-url.spec.d.ts.map +0 -1
  216. package/lib/util/context-url.spec.js +0 -52
  217. package/lib/util/context-url.spec.js.map +0 -1
  218. package/lib/util/without.d.ts +0 -7
  219. package/lib/util/without.d.ts.map +0 -1
  220. package/lib/util/without.js.map +0 -1
  221. package/src/util/context-url.spec.ts +0 -25
  222. package/src/util/context-url.ts +0 -23
  223. package/src/util/without.ts +0 -8
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2020 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.contextUrlToUrl = void 0;
9
- /**
10
- * The field "contextUrl" might contain prefixes like:
11
- * - envvar1=value1/...
12
- * - prebuild/...
13
- * This is the analogon to the (Prefix)ContextParser structure in "server".
14
- */
15
- function contextUrlToUrl(contextUrl) {
16
- if (contextUrl === undefined) {
17
- return undefined;
18
- }
19
- if (contextUrl.startsWith("http")) {
20
- return new URL(contextUrl);
21
- }
22
- var finding = contextUrl.search("/http");
23
- return new URL(contextUrl.substr(finding + 1));
24
- }
25
- exports.contextUrlToUrl = contextUrlToUrl;
26
- //# sourceMappingURL=context-url.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-url.js","sourceRoot":"","sources":["../../src/util/context-url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,UAA8B;IAC5D,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;KAC5B;IACD,IAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AAVD,0CAUC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-url.spec.d.ts","sourceRoot":"","sources":["../../src/util/context-url.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,qBACa,cAAc;IAEV,0BAA0B;IAK1B,4BAA4B;CAI5C"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2020 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
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11
- return c > 3 && r && Object.defineProperty(target, key, r), r;
12
- };
13
- var __metadata = (this && this.__metadata) || function (k, v) {
14
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ContextUrlTest = void 0;
18
- var chai = require("chai");
19
- var mocha_typescript_1 = require("mocha-typescript");
20
- var context_url_1 = require("./context-url");
21
- var expect = chai.expect;
22
- var ContextUrlTest = /** @class */ (function () {
23
- function ContextUrlTest() {
24
- }
25
- ContextUrlTest.prototype.parseContextUrl_withEnvVar = function () {
26
- var actual = context_url_1.contextUrlToUrl("passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo");
27
- expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
28
- };
29
- ContextUrlTest.prototype.parseContextUrl_withPrebuild = function () {
30
- var actual = context_url_1.contextUrlToUrl("prebuild/https://github.com/gitpod-io/gitpod-test-repo");
31
- expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
32
- };
33
- __decorate([
34
- mocha_typescript_1.test,
35
- __metadata("design:type", Function),
36
- __metadata("design:paramtypes", []),
37
- __metadata("design:returntype", void 0)
38
- ], ContextUrlTest.prototype, "parseContextUrl_withEnvVar", null);
39
- __decorate([
40
- mocha_typescript_1.test,
41
- __metadata("design:type", Function),
42
- __metadata("design:paramtypes", []),
43
- __metadata("design:returntype", void 0)
44
- ], ContextUrlTest.prototype, "parseContextUrl_withPrebuild", null);
45
- ContextUrlTest = __decorate([
46
- mocha_typescript_1.suite
47
- ], ContextUrlTest);
48
- return ContextUrlTest;
49
- }());
50
- exports.ContextUrlTest = ContextUrlTest;
51
- module.exports = new ContextUrlTest();
52
- //# sourceMappingURL=context-url.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-url.spec.js","sourceRoot":"","sources":["../../src/util/context-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,2BAA6B;AAC7B,qDAA+C;AAC/C,6CAAgD;AAChD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAG3B;IAAA;IAWA,CAAC;IATgB,mDAA0B,GAAjC;QACF,IAAM,MAAM,GAAG,6BAAe,CAAC,qEAAqE,CAAC,CAAC;QACtG,MAAM,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACrE,CAAC;IAEY,qDAA4B,GAAnC;QACF,IAAM,MAAM,GAAG,6BAAe,CAAC,wDAAwD,CAAC,CAAC;QACzF,MAAM,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IARK;QAAL,uBAAI;;;;oEAGJ;IAEK;QAAL,uBAAI;;;;sEAGJ;IAVQ,cAAc;QAD1B,wBAAK;OACO,cAAc,CAW1B;IAAD,qBAAC;CAAA,AAXD,IAWC;AAXY,wCAAc;AAY3B,MAAM,CAAC,OAAO,GAAG,IAAI,cAAc,EAAE,CAAA"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
- export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
7
- //# sourceMappingURL=without.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"without.d.ts","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,oBAAY,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"without.js","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
-
7
- import * as chai from 'chai';
8
- import { suite, test } from 'mocha-typescript';
9
- import { contextUrlToUrl } from './context-url';
10
- const expect = chai.expect;
11
-
12
- @suite
13
- export class ContextUrlTest {
14
-
15
- @test public parseContextUrl_withEnvVar() {
16
- const actual = contextUrlToUrl("passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo");
17
- expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
18
- }
19
-
20
- @test public parseContextUrl_withPrebuild() {
21
- const actual = contextUrlToUrl("prebuild/https://github.com/gitpod-io/gitpod-test-repo");
22
- expect(actual?.host).to.equal("github.com");
23
- }
24
- }
25
- module.exports = new ContextUrlTest()
@@ -1,23 +0,0 @@
1
- /**
2
- * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
-
7
- /**
8
- * The field "contextUrl" might contain prefixes like:
9
- * - envvar1=value1/...
10
- * - prebuild/...
11
- * This is the analogon to the (Prefix)ContextParser structure in "server".
12
- */
13
- export function contextUrlToUrl(contextUrl: string | undefined): URL | undefined {
14
- if (contextUrl === undefined) {
15
- return undefined;
16
- }
17
-
18
- if (contextUrl.startsWith("http")) {
19
- return new URL(contextUrl);
20
- }
21
- const finding = contextUrl.search("/http");
22
- return new URL(contextUrl.substr(finding + 1));
23
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
-
7
-
8
- export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;