@gitpod/gitpod-protocol 0.1.5-sje-installer-helm.3 → 0.1.5-sje-installer-namespace-docs.1
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.
- package/data/gitpod-schema.json +4 -0
- package/lib/accounting-protocol.d.ts +0 -1
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +10 -11
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +8 -2
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +2 -13
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +1 -0
- package/lib/analytics.d.ts.map +1 -1
- package/lib/context-url.js +4 -4
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.js +45 -48
- package/lib/context-url.spec.js.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.js +4 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.js +19 -20
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -36
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.js +29 -43
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.js +25 -30
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.js +12 -13
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.js +25 -41
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +116 -116
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +20 -8
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +149 -295
- package/lib/gitpod-service.js.map +1 -1
- package/lib/ide-protocol.d.ts +81 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +8 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/messaging/browser/connection.js +91 -156
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.js +35 -55
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.js +17 -18
- package/lib/messaging/client-call-metrics.js.map +1 -1
- package/lib/messaging/connection-error-handler.js +11 -23
- package/lib/messaging/connection-error-handler.js.map +1 -1
- package/lib/messaging/error.d.ts +1 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +2 -2
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/node/connection.d.ts +0 -10
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +11 -49
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.js +71 -162
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/permission.js +12 -12
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +1 -1
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +38 -57
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +9 -7
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +44 -114
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/lib/snapshot-url.spec.d.ts +7 -0
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.js +13 -13
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +9 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +4 -15
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/util/analytics.js +25 -32
- package/lib/util/analytics.js.map +1 -1
- package/lib/util/async-iterator.js +55 -133
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +8 -8
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js +10 -12
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.js +26 -39
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.js +58 -74
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -0
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +26 -46
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.js +11 -67
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +34 -79
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +44 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +1 -0
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +96 -103
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +87 -135
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.js +3 -3
- package/lib/util/grpc.js.map +1 -1
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/util/jaeger-client-types.js +8 -0
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +32 -32
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +50 -113
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +2 -2
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +10 -0
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -7
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +4 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +123 -84
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +144 -288
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/safe-promise.js +9 -12
- package/lib/util/safe-promise.js.map +1 -1
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.js +16 -16
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.js +21 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +50 -5
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +169 -63
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.js +2 -2
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +11 -1
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +3 -3
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +3 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/package.json +20 -12
- package/pkg-yarn.lock +12 -7
- package/src/accounting-protocol.ts +1 -3
- package/src/admin-protocol.ts +9 -3
- package/src/analytics.ts +2 -0
- package/src/email-protocol.ts +1 -1
- package/src/gitpod-service.ts +25 -13
- package/src/ide-protocol.ts +92 -0
- package/src/index.ts +2 -0
- package/src/messaging/error.ts +2 -2
- package/src/messaging/node/connection.ts +1 -45
- package/src/oss-allowlist.ts +15 -0
- package/src/protocol.ts +11 -8
- package/src/snapshot-url.spec.ts +25 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +1 -1
- package/src/teams-projects-protocol.ts +12 -1
- package/src/util/garbage-collected-cache.ts +7 -1
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.ts +9 -5
- package/src/util/grpc.ts +3 -3
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +32 -32
- package/src/util/parse-workspace-id.spec.ts +21 -1
- package/src/util/parse-workspace-id.ts +32 -6
- package/src/util/repeat.ts +45 -0
- package/src/util/tracing.spec.ts +83 -0
- package/src/util/tracing.ts +153 -17
- package/src/workspace-cluster.ts +8 -1
- package/src/workspace-instance.ts +9 -6
- package/src/wsready.ts +1 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 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
|
+
* `IDEServer` provides a list of available IDEs.
|
|
8
|
+
*/
|
|
9
|
+
export interface IDEServer {
|
|
10
|
+
/**
|
|
11
|
+
* Returns the IDE preferences.
|
|
12
|
+
*/
|
|
13
|
+
getIDEOptions(): Promise<IDEOptions>;
|
|
14
|
+
}
|
|
15
|
+
export interface IDEOptions {
|
|
16
|
+
/**
|
|
17
|
+
* A list of available IDEs.
|
|
18
|
+
*/
|
|
19
|
+
options: {
|
|
20
|
+
[key: string]: IDEOption;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The default (browser) IDE when the user has not specified one.
|
|
24
|
+
*/
|
|
25
|
+
defaultIde: string;
|
|
26
|
+
/**
|
|
27
|
+
* The default desktop IDE when the user has not specified one.
|
|
28
|
+
*/
|
|
29
|
+
defaultDesktopIde: string;
|
|
30
|
+
}
|
|
31
|
+
export interface IDEOption {
|
|
32
|
+
/**
|
|
33
|
+
* To ensure a stable order one can set an `orderKey`.
|
|
34
|
+
*/
|
|
35
|
+
orderKey?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human readable title text of the IDE (plain text only).
|
|
38
|
+
*/
|
|
39
|
+
title: string;
|
|
40
|
+
/**
|
|
41
|
+
* The type of the IDE, currently 'browser' or 'desktop'.
|
|
42
|
+
*/
|
|
43
|
+
type: 'browser' | 'desktop';
|
|
44
|
+
/**
|
|
45
|
+
* The logo for the IDE. That could be a key in (see
|
|
46
|
+
* components/dashboard/src/images/ideLogos.ts) or a URL.
|
|
47
|
+
*/
|
|
48
|
+
logo: string;
|
|
49
|
+
/**
|
|
50
|
+
* Text of an optional tooltip (plain text only).
|
|
51
|
+
*/
|
|
52
|
+
tooltip?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Text of an optional label next to the IDE option like “Insiders” (plain
|
|
55
|
+
* text only).
|
|
56
|
+
*/
|
|
57
|
+
label?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Notes to the IDE option that are renderd in the preferences when a user
|
|
60
|
+
* chooses this IDE.
|
|
61
|
+
*/
|
|
62
|
+
notes?: string[];
|
|
63
|
+
/**
|
|
64
|
+
* If `true` this IDE option is not visible in the IDE preferences.
|
|
65
|
+
*/
|
|
66
|
+
hidden?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The image ref to the IDE image.
|
|
69
|
+
*/
|
|
70
|
+
image: string;
|
|
71
|
+
/**
|
|
72
|
+
* When this is `true`, the tag of this image is resolved to the latest
|
|
73
|
+
* image digest regularly.
|
|
74
|
+
*
|
|
75
|
+
* This is useful if this image points to a tag like `nightly` that will be
|
|
76
|
+
* updated regularly. When `resolveImageDigest` is `true`, we make sure that
|
|
77
|
+
* we resolve the tag regularly to the most recent image version.
|
|
78
|
+
*/
|
|
79
|
+
resolveImageDigest?: boolean;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ide-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ide-protocol.d.ts","sourceRoot":"","sources":["../src/ide-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAEtC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAE5B;;;MAGE;IACF,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB;;MAEE;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
//# sourceMappingURL=ide-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ide-protocol.js","sourceRoot":"","sources":["../src/ide-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export * from './email-protocol';
|
|
|
16
16
|
export * from './headless-workspace-log';
|
|
17
17
|
export * from './context-url';
|
|
18
18
|
export * from './teams-projects-protocol';
|
|
19
|
+
export * from './snapshot-url';
|
|
20
|
+
export * from './oss-allowlist';
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -28,4 +28,6 @@ __exportStar(require("./email-protocol"), exports);
|
|
|
28
28
|
__exportStar(require("./headless-workspace-log"), exports);
|
|
29
29
|
__exportStar(require("./context-url"), exports);
|
|
30
30
|
__exportStar(require("./teams-projects-protocol"), exports);
|
|
31
|
+
__exportStar(require("./snapshot-url"), exports);
|
|
32
|
+
__exportStar(require("./oss-allowlist"), exports);
|
|
31
33
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,mDAAiC;AACjC,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,gDAA8B;AAC9B,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,mDAAiC;AACjC,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,mDAAiC;AACjC,2DAAyC;AACzC,gDAA8B;AAC9B,4DAA0C;AAC1C,iDAA+B;AAC/B,kDAAgC"}
|
|
@@ -5,61 +5,15 @@
|
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
7
|
*/
|
|
8
|
-
var __extends = (this && this.__extends) || (function () {
|
|
9
|
-
var extendStatics = function (d, b) {
|
|
10
|
-
extendStatics = Object.setPrototypeOf ||
|
|
11
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
12
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
13
|
-
return extendStatics(d, b);
|
|
14
|
-
};
|
|
15
|
-
return function (d, b) {
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() { this.constructor = d; }
|
|
18
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __spread = (this && this.__spread) || function () {
|
|
38
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
39
|
-
return ar;
|
|
40
|
-
};
|
|
41
|
-
var __values = (this && this.__values) || function(o) {
|
|
42
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
43
|
-
if (m) return m.call(o);
|
|
44
|
-
if (o && typeof o.length === "number") return {
|
|
45
|
-
next: function () {
|
|
46
|
-
if (o && i >= o.length) o = void 0;
|
|
47
|
-
return { value: o && o[i++], done: !o };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51
|
-
};
|
|
52
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
9
|
exports.WebSocketConnectionProvider = void 0;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
function WebSocketConnectionProvider() {
|
|
62
|
-
}
|
|
10
|
+
const vscode_ws_jsonrpc_1 = require("vscode-ws-jsonrpc");
|
|
11
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
12
|
+
const messageWriter_1 = require("vscode-jsonrpc/lib/messageWriter");
|
|
13
|
+
const messageReader_1 = require("vscode-jsonrpc/lib/messageReader");
|
|
14
|
+
const proxy_factory_1 = require("../proxy-factory");
|
|
15
|
+
const reconnecting_websocket_1 = require("reconnecting-websocket");
|
|
16
|
+
class WebSocketConnectionProvider {
|
|
63
17
|
/**
|
|
64
18
|
* Create a proxy object to remote interface of T type
|
|
65
19
|
* over a web socket connection for the given path.
|
|
@@ -67,16 +21,15 @@ var WebSocketConnectionProvider = /** @class */ (function () {
|
|
|
67
21
|
* An optional target can be provided to handle
|
|
68
22
|
* notifications and requests from a remote side.
|
|
69
23
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
onConnection: function (c) { return factory.listen(c); },
|
|
24
|
+
createProxy(path, target, options) {
|
|
25
|
+
const factory = new proxy_factory_1.JsonRpcProxyFactory(target);
|
|
26
|
+
const startListening = (path) => {
|
|
27
|
+
const socket = this.listen({
|
|
28
|
+
path,
|
|
29
|
+
onConnection: c => factory.listen(c),
|
|
77
30
|
}, {
|
|
78
|
-
onTransportDidClose:
|
|
79
|
-
onTransportDidOpen:
|
|
31
|
+
onTransportDidClose: () => factory.fireConnectionClosed(),
|
|
32
|
+
onTransportDidOpen: () => factory.fireConnectionOpened(),
|
|
80
33
|
}, options);
|
|
81
34
|
if (options === null || options === void 0 ? void 0 : options.onListening) {
|
|
82
35
|
options.onListening(socket);
|
|
@@ -86,38 +39,38 @@ var WebSocketConnectionProvider = /** @class */ (function () {
|
|
|
86
39
|
startListening(path);
|
|
87
40
|
}
|
|
88
41
|
else {
|
|
89
|
-
path.then(
|
|
42
|
+
path.then(path => startListening(path));
|
|
90
43
|
}
|
|
91
44
|
return factory.createProxy();
|
|
92
|
-
}
|
|
45
|
+
}
|
|
93
46
|
/**
|
|
94
47
|
* Install a connection handler for the given path.
|
|
95
48
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
49
|
+
listen(handler, eventHandler, options) {
|
|
50
|
+
const url = handler.path;
|
|
51
|
+
const webSocket = this.createWebSocket(url);
|
|
52
|
+
const logger = this.createLogger();
|
|
100
53
|
if (options && options.onerror) {
|
|
101
|
-
|
|
102
|
-
webSocket.addEventListener('error',
|
|
103
|
-
|
|
54
|
+
const onerror = options.onerror;
|
|
55
|
+
webSocket.addEventListener('error', (event) => {
|
|
56
|
+
onerror(event);
|
|
104
57
|
});
|
|
105
58
|
}
|
|
106
59
|
else {
|
|
107
|
-
webSocket.addEventListener('error',
|
|
60
|
+
webSocket.addEventListener('error', (error) => {
|
|
108
61
|
logger.error(JSON.stringify(error));
|
|
109
62
|
});
|
|
110
63
|
}
|
|
111
64
|
doListen(webSocket, handler, eventHandler, logger);
|
|
112
65
|
return webSocket;
|
|
113
|
-
}
|
|
114
|
-
|
|
66
|
+
}
|
|
67
|
+
createLogger() {
|
|
115
68
|
return new vscode_ws_jsonrpc_1.ConsoleLogger();
|
|
116
|
-
}
|
|
69
|
+
}
|
|
117
70
|
/**
|
|
118
71
|
* Creates a web socket for the given url
|
|
119
72
|
*/
|
|
120
|
-
|
|
73
|
+
createWebSocket(url) {
|
|
121
74
|
return new reconnecting_websocket_1.default(url, undefined, {
|
|
122
75
|
maxReconnectionDelay: 10000,
|
|
123
76
|
minReconnectionDelay: 1000,
|
|
@@ -126,9 +79,8 @@ var WebSocketConnectionProvider = /** @class */ (function () {
|
|
|
126
79
|
debug: false,
|
|
127
80
|
WebSocket: WebSocket
|
|
128
81
|
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
}());
|
|
82
|
+
}
|
|
83
|
+
}
|
|
132
84
|
exports.WebSocketConnectionProvider = WebSocketConnectionProvider;
|
|
133
85
|
// The following was extracted from vscode-ws-jsonrpc to make these changes:
|
|
134
86
|
// - switch from WebSocket to ReconnectingWebSocket
|
|
@@ -136,9 +88,9 @@ exports.WebSocketConnectionProvider = WebSocketConnectionProvider;
|
|
|
136
88
|
// - WebSocketMessageWriter: buffer and re-try messages instead of throwing an error immidiately
|
|
137
89
|
// - WebSocketMessageReader: don't close MessageConnection on 'socket.onclose'
|
|
138
90
|
function doListen(resocket, handler, eventHandler, logger) {
|
|
139
|
-
resocket.addEventListener("close",
|
|
140
|
-
|
|
141
|
-
resocket.onopen =
|
|
91
|
+
resocket.addEventListener("close", () => eventHandler.onTransportDidClose());
|
|
92
|
+
let alreadyOpened = false;
|
|
93
|
+
resocket.onopen = () => {
|
|
142
94
|
// trigerr "open" every time we re-open the underlying websocket
|
|
143
95
|
eventHandler.onTransportDidOpen();
|
|
144
96
|
// make sure we're only ever creating one MessageConnection, irregardless of how many times we have to re-open the underlying (reconnecting) websocket
|
|
@@ -146,39 +98,37 @@ function doListen(resocket, handler, eventHandler, logger) {
|
|
|
146
98
|
return;
|
|
147
99
|
}
|
|
148
100
|
alreadyOpened = true;
|
|
149
|
-
|
|
101
|
+
const connection = createWebSocketConnection(resocket, logger);
|
|
150
102
|
handler.onConnection(connection);
|
|
151
103
|
};
|
|
152
104
|
}
|
|
153
105
|
function createWebSocketConnection(resocket, logger) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
connection.onClose(
|
|
106
|
+
const socket = (0, vscode_ws_jsonrpc_1.toSocket)(resocket);
|
|
107
|
+
const messageReader = new NonClosingWebSocketMessageReader(socket);
|
|
108
|
+
const messageWriter = new BufferingWebSocketMessageWriter(resocket, logger);
|
|
109
|
+
const connection = (0, vscode_jsonrpc_1.createMessageConnection)(messageReader, messageWriter, logger);
|
|
110
|
+
connection.onClose(() => connection.dispose());
|
|
159
111
|
return connection;
|
|
160
112
|
}
|
|
161
113
|
/**
|
|
162
114
|
* This takes vscode-ws-jsonrpc/lib/socket/writer/WebSocketMessageWriter and adds a buffer
|
|
163
115
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
socket.addEventListener("open", function (event) { return _this.flushBuffer(); });
|
|
173
|
-
return _this;
|
|
116
|
+
class BufferingWebSocketMessageWriter extends messageWriter_1.AbstractMessageWriter {
|
|
117
|
+
constructor(socket, logger) {
|
|
118
|
+
super();
|
|
119
|
+
this.errorCount = 0;
|
|
120
|
+
this.buffer = [];
|
|
121
|
+
this.socket = socket;
|
|
122
|
+
this.logger = logger;
|
|
123
|
+
socket.addEventListener("open", (event) => this.flushBuffer());
|
|
174
124
|
}
|
|
175
|
-
|
|
125
|
+
write(msg) {
|
|
176
126
|
if (this.socket.readyState !== reconnecting_websocket_1.default.OPEN) {
|
|
177
127
|
this.bufferMsg(msg);
|
|
178
128
|
return;
|
|
179
129
|
}
|
|
180
130
|
try {
|
|
181
|
-
|
|
131
|
+
const content = JSON.stringify(msg);
|
|
182
132
|
this.socket.send(content);
|
|
183
133
|
}
|
|
184
134
|
catch (e) {
|
|
@@ -186,104 +136,89 @@ var BufferingWebSocketMessageWriter = /** @class */ (function (_super) {
|
|
|
186
136
|
this.fireError(e, msg, this.errorCount);
|
|
187
137
|
this.bufferMsg(msg);
|
|
188
138
|
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
var e_1, _a;
|
|
139
|
+
}
|
|
140
|
+
flushBuffer() {
|
|
192
141
|
if (this.buffer.length === 0) {
|
|
193
142
|
return;
|
|
194
143
|
}
|
|
195
|
-
|
|
144
|
+
const buffer = [...this.buffer];
|
|
196
145
|
this.buffer = [];
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var msg = buffer_1_1.value;
|
|
200
|
-
this.write(msg);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
204
|
-
finally {
|
|
205
|
-
try {
|
|
206
|
-
if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);
|
|
207
|
-
}
|
|
208
|
-
finally { if (e_1) throw e_1.error; }
|
|
146
|
+
for (const msg of buffer) {
|
|
147
|
+
this.write(msg);
|
|
209
148
|
}
|
|
210
149
|
//this.logger.info(`flushed buffer (${this.buffer.length})`)
|
|
211
|
-
}
|
|
212
|
-
|
|
150
|
+
}
|
|
151
|
+
bufferMsg(msg) {
|
|
213
152
|
this.buffer.push(msg);
|
|
214
153
|
//this.logger.info(`buffered message (${this.buffer.length})`);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
}(messageWriter_1.AbstractMessageWriter));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
218
156
|
/**
|
|
219
157
|
* This takes vscode-ws-jsonrpc/lib/socket/reader/WebSocketMessageReader and removes the "onClose -> fireClose" connection
|
|
220
158
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
_this.socket.onClose(function (code, reason) {
|
|
159
|
+
class NonClosingWebSocketMessageReader extends messageReader_1.AbstractMessageReader {
|
|
160
|
+
constructor(socket) {
|
|
161
|
+
super();
|
|
162
|
+
this.events = [];
|
|
163
|
+
this.state = 'initial';
|
|
164
|
+
this.callback = () => { };
|
|
165
|
+
this.socket = socket;
|
|
166
|
+
this.socket.onMessage(message => this.readMessage(message));
|
|
167
|
+
this.socket.onError(error => this.fireError(error));
|
|
168
|
+
this.socket.onClose((code, reason) => {
|
|
232
169
|
if (code !== 1000) {
|
|
233
|
-
|
|
170
|
+
const error = {
|
|
234
171
|
name: '' + code,
|
|
235
|
-
message:
|
|
172
|
+
message: `Error during socket reconnect: code = ${code}, reason = ${reason}`
|
|
236
173
|
};
|
|
237
|
-
|
|
174
|
+
this.fireError(error);
|
|
238
175
|
}
|
|
239
176
|
// this.fireClose(); // <-- reason for this class to be copied over
|
|
240
177
|
});
|
|
241
|
-
return _this;
|
|
242
178
|
}
|
|
243
|
-
|
|
179
|
+
listen(callback) {
|
|
244
180
|
if (this.state === 'initial') {
|
|
245
181
|
this.state = 'listening';
|
|
246
182
|
this.callback = callback;
|
|
247
183
|
while (this.events.length !== 0) {
|
|
248
|
-
|
|
249
|
-
if (
|
|
250
|
-
this.readMessage(
|
|
184
|
+
const event = this.events.pop();
|
|
185
|
+
if (event.message) {
|
|
186
|
+
this.readMessage(event.message);
|
|
251
187
|
}
|
|
252
|
-
else if (
|
|
253
|
-
this.fireError(
|
|
188
|
+
else if (event.error) {
|
|
189
|
+
this.fireError(event.error);
|
|
254
190
|
}
|
|
255
191
|
else {
|
|
256
192
|
this.fireClose();
|
|
257
193
|
}
|
|
258
194
|
}
|
|
259
195
|
}
|
|
260
|
-
}
|
|
261
|
-
|
|
196
|
+
}
|
|
197
|
+
readMessage(message) {
|
|
262
198
|
if (this.state === 'initial') {
|
|
263
|
-
this.events.splice(0, 0, { message
|
|
199
|
+
this.events.splice(0, 0, { message });
|
|
264
200
|
}
|
|
265
201
|
else if (this.state === 'listening') {
|
|
266
|
-
|
|
202
|
+
const data = JSON.parse(message);
|
|
267
203
|
this.callback(data);
|
|
268
204
|
}
|
|
269
|
-
}
|
|
270
|
-
|
|
205
|
+
}
|
|
206
|
+
fireError(error) {
|
|
271
207
|
if (this.state === 'initial') {
|
|
272
|
-
this.events.splice(0, 0, { error
|
|
208
|
+
this.events.splice(0, 0, { error });
|
|
273
209
|
}
|
|
274
210
|
else if (this.state === 'listening') {
|
|
275
|
-
|
|
211
|
+
super.fireError(error);
|
|
276
212
|
}
|
|
277
|
-
}
|
|
278
|
-
|
|
213
|
+
}
|
|
214
|
+
fireClose() {
|
|
279
215
|
if (this.state === 'initial') {
|
|
280
216
|
this.events.splice(0, 0, {});
|
|
281
217
|
}
|
|
282
218
|
else if (this.state === 'listening') {
|
|
283
|
-
|
|
219
|
+
super.fireClose();
|
|
284
220
|
}
|
|
285
221
|
this.state = 'closed';
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
}(messageReader_1.AbstractMessageReader));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
289
224
|
//# sourceMappingURL=connection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/messaging/browser/connection.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/messaging/browser/connection.ts"],"names":[],"mappings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