@gitpod/gitpod-protocol 0.1.5-svenefftinge-patch-1.3 → 0.1.5-tarun-telemetry-users.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 +21 -2
- 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 +18 -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 +13 -1
- package/lib/analytics.d.ts.map +1 -1
- package/lib/context-url.d.ts +1 -0
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +7 -5
- 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.d.ts +1 -2
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +20 -21
- 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 +68 -20
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +151 -295
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +1 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +1 -7
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-protocol.d.ts +101 -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 +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +25 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +30 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/messaging/browser/connection.d.ts +3 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +172 -35
- 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.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- 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 +2 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +4 -2
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +23 -59
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +2 -0
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +74 -159
- 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.d.ts +4 -2
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +16 -13
- 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 +51 -49
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +57 -115
- 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 +59 -6
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +18 -15
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +35 -26
- 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.d.ts +1 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +29 -68
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +57 -78
- 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 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +93 -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.d.ts +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -0
- package/lib/util/grpc.js.map +1 -0
- 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 +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +107 -110
- 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/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 +51 -5
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +196 -62
- 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 +8 -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 +24 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/package.json +24 -13
- package/pkg-yarn.lock +14 -7
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +1 -3
- package/src/admin-protocol.ts +25 -6
- package/src/analytics.ts +16 -1
- package/src/context-url.ts +3 -1
- package/src/email-protocol.ts +1 -1
- package/src/env.ts +10 -10
- package/src/gitpod-service.ts +88 -33
- package/src/headless-workspace-log.ts +1 -14
- package/src/ide-frontend-service.ts +1 -1
- package/src/ide-protocol.ts +114 -0
- package/src/index.ts +3 -0
- package/src/installation-admin-protocol.ts +40 -0
- package/src/messaging/browser/connection.ts +176 -10
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +5 -2
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +21 -68
- package/src/messaging/proxy-factory.ts +13 -5
- package/src/oss-allowlist.ts +15 -0
- package/src/permission.ts +5 -1
- package/src/protocol.ts +70 -54
- 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 +78 -7
- package/src/util/analytics.ts +17 -1
- package/src/util/garbage-collected-cache.ts +7 -1
- package/src/util/generate-workspace-id.spec.ts +17 -0
- package/src/util/generate-workspace-id.ts +20 -2
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.ts +11 -11
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +102 -38
- 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 +183 -18
- package/src/workspace-cluster.ts +3 -1
- package/src/workspace-instance.ts +35 -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/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
|
@@ -22,151 +22,103 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
-
function step(op) {
|
|
30
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
32
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
-
switch (op[0]) {
|
|
35
|
-
case 0: case 1: t = op; break;
|
|
36
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
-
default:
|
|
40
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
-
if (t[2]) _.ops.pop();
|
|
45
|
-
_.trys.pop(); continue;
|
|
46
|
-
}
|
|
47
|
-
op = body.call(thisArg, _);
|
|
48
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
26
|
exports.GitpodHostUrlTest = void 0;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
GitpodHostUrlTest.prototype.parseWorkspaceId_pathBased = function () {
|
|
62
|
-
var actual = gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("http://35.223.201.195/workspace/bc77e03d-c781-4235-bca0-e24087f5e472/").workspaceId;
|
|
27
|
+
const chai = require("chai");
|
|
28
|
+
const mocha_typescript_1 = require("mocha-typescript");
|
|
29
|
+
const gitpod_host_url_1 = require("./gitpod-host-url");
|
|
30
|
+
const expect = chai.expect;
|
|
31
|
+
let GitpodHostUrlTest = class GitpodHostUrlTest {
|
|
32
|
+
parseWorkspaceId_pathBased() {
|
|
33
|
+
const actual = gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("http://35.223.201.195/workspace/bc77e03d-c781-4235-bca0-e24087f5e472/").workspaceId;
|
|
63
34
|
expect(actual).to.equal("bc77e03d-c781-4235-bca0-e24087f5e472");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
35
|
+
}
|
|
36
|
+
parseWorkspaceId_hosts_withEnvVarsInjected() {
|
|
37
|
+
const actual = gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-grasshopper-nfbitfia.ws-eu02.gitpod-staging.com/#passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo").workspaceId;
|
|
67
38
|
expect(actual).to.equal("gray-grasshopper-nfbitfia");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
|
|
72
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://3000-moccasin-ferret-155799b3.ws-eu02.gitpod-staging.com/").withoutWorkspacePrefix().toString()).to.equal("https://gitpod-staging.com/");
|
|
73
|
-
return [2 /*return*/];
|
|
74
|
-
});
|
|
39
|
+
}
|
|
40
|
+
testWithoutWorkspacePrefix() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://3000-moccasin-ferret-155799b3.ws-eu02.gitpod-staging.com/").withoutWorkspacePrefix().toString()).to.equal("https://gitpod-staging.com/");
|
|
75
43
|
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
-
|
|
80
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gitpod-staging.com/").withoutWorkspacePrefix().toString()).to.equal("https://gitpod-staging.com/");
|
|
81
|
-
return [2 /*return*/];
|
|
82
|
-
});
|
|
44
|
+
}
|
|
45
|
+
testWithoutWorkspacePrefix2() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gitpod-staging.com/").withoutWorkspacePrefix().toString()).to.equal("https://gitpod-staging.com/");
|
|
83
48
|
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
|
|
88
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.my-branch-1234.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
89
|
-
return [2 /*return*/];
|
|
90
|
-
});
|
|
49
|
+
}
|
|
50
|
+
testWithoutWorkspacePrefix3() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.my-branch-1234.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
91
53
|
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
|
|
96
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://my-branch-1234.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
97
|
-
return [2 /*return*/];
|
|
98
|
-
});
|
|
54
|
+
}
|
|
55
|
+
testWithoutWorkspacePrefix4() {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://my-branch-1234.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
99
58
|
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
|
|
104
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://abc-nice-brunch-4224.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
105
|
-
return [2 /*return*/];
|
|
106
|
-
});
|
|
59
|
+
}
|
|
60
|
+
testWithoutWorkspacePrefix5() {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://abc-nice-brunch-4224.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
107
63
|
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
-
|
|
112
|
-
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.abc-nice-brunch-4224.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
113
|
-
return [2 /*return*/];
|
|
114
|
-
});
|
|
64
|
+
}
|
|
65
|
+
testWithoutWorkspacePrefix6() {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.abc-nice-brunch-4224.staging.gitpod-dev.com/").withoutWorkspacePrefix().toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
115
68
|
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}());
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
__decorate([
|
|
72
|
+
mocha_typescript_1.test,
|
|
73
|
+
__metadata("design:type", Function),
|
|
74
|
+
__metadata("design:paramtypes", []),
|
|
75
|
+
__metadata("design:returntype", void 0)
|
|
76
|
+
], GitpodHostUrlTest.prototype, "parseWorkspaceId_pathBased", null);
|
|
77
|
+
__decorate([
|
|
78
|
+
mocha_typescript_1.test,
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", []),
|
|
81
|
+
__metadata("design:returntype", void 0)
|
|
82
|
+
], GitpodHostUrlTest.prototype, "parseWorkspaceId_hosts_withEnvVarsInjected", null);
|
|
83
|
+
__decorate([
|
|
84
|
+
mocha_typescript_1.test,
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", []),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
mocha_typescript_1.test,
|
|
91
|
+
__metadata("design:type", Function),
|
|
92
|
+
__metadata("design:paramtypes", []),
|
|
93
|
+
__metadata("design:returntype", Promise)
|
|
94
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix2", null);
|
|
95
|
+
__decorate([
|
|
96
|
+
mocha_typescript_1.test,
|
|
97
|
+
__metadata("design:type", Function),
|
|
98
|
+
__metadata("design:paramtypes", []),
|
|
99
|
+
__metadata("design:returntype", Promise)
|
|
100
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix3", null);
|
|
101
|
+
__decorate([
|
|
102
|
+
mocha_typescript_1.test,
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", []),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix4", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
mocha_typescript_1.test,
|
|
109
|
+
__metadata("design:type", Function),
|
|
110
|
+
__metadata("design:paramtypes", []),
|
|
111
|
+
__metadata("design:returntype", Promise)
|
|
112
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix5", null);
|
|
113
|
+
__decorate([
|
|
114
|
+
mocha_typescript_1.test,
|
|
115
|
+
__metadata("design:type", Function),
|
|
116
|
+
__metadata("design:paramtypes", []),
|
|
117
|
+
__metadata("design:returntype", Promise)
|
|
118
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix6", null);
|
|
119
|
+
GitpodHostUrlTest = __decorate([
|
|
120
|
+
mocha_typescript_1.suite
|
|
121
|
+
], GitpodHostUrlTest);
|
|
170
122
|
exports.GitpodHostUrlTest = GitpodHostUrlTest;
|
|
171
123
|
module.exports = new GitpodHostUrlTest();
|
|
172
124
|
//# sourceMappingURL=gitpod-host-url.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitpod-host-url.spec.js","sourceRoot":"","sources":["../../src/util/gitpod-host-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"gitpod-host-url.spec.js","sourceRoot":"","sources":["../../src/util/gitpod-host-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAEH,6BAA6B;AAC7B,uDAA+C;AAC/C,uDAAkD;AAClD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAG3B,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAEb,0BAA0B;QACnC,MAAM,MAAM,GAAG,+BAAa,CAAC,gBAAgB,CAAC,uEAAuE,CAAC,CAAC,WAAW,CAAC;QACnI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACpE,CAAC;IAEY,0CAA0C;QACnD,MAAM,MAAM,GAAG,+BAAa,CAAC,gBAAgB,CAAC,mIAAmI,CAAC,CAAC,WAAW,CAAC;QAC/L,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzD,CAAC;IAEkB,0BAA0B;;YACzC,MAAM,CAAC,+BAAa,CAAC,gBAAgB,CAAC,mEAAmE,CAAC,CAAC,sBAAsB,EAAE,CAA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IAAL,uBAAI;;;;oEAEJ;AAEK;IAAL,uBAAI;;;;oEAEJ;AAEK;IAAL,uBAAI;;;;oEAEJ;AAlCQ,iBAAiB;IAD7B,wBAAK;GACO,iBAAiB,CAmC7B;AAnCY,8CAAiB;AAoC9B,MAAM,CAAC,OAAO,GAAG,IAAI,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export declare const defaultGRPCOptions: {
|
|
7
|
+
"grpc.keepalive_timeout_ms": number;
|
|
8
|
+
"grpc.keepalive_time_ms": number;
|
|
9
|
+
"grpc.http2.min_time_between_pings_ms": number;
|
|
10
|
+
"grpc.keepalive_permit_without_calls": number;
|
|
11
|
+
"grpc-node.max_session_memory": number;
|
|
12
|
+
"grpc.max_reconnect_backoff_ms": number;
|
|
13
|
+
"grpc.max_receive_message_length": number;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=grpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.d.ts","sourceRoot":"","sources":["../../src/util/grpc.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;CAQ/B,CAAC"}
|
package/lib/util/grpc.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
4
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
+
* See License-AGPL.txt in the project root for license information.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.defaultGRPCOptions = void 0;
|
|
9
|
+
exports.defaultGRPCOptions = {
|
|
10
|
+
"grpc.keepalive_timeout_ms": 10000,
|
|
11
|
+
"grpc.keepalive_time_ms": 60000,
|
|
12
|
+
"grpc.http2.min_time_between_pings_ms": 10000,
|
|
13
|
+
"grpc.keepalive_permit_without_calls": 1,
|
|
14
|
+
"grpc-node.max_session_memory": 50,
|
|
15
|
+
"grpc.max_reconnect_backoff_ms": 5000,
|
|
16
|
+
"grpc.max_receive_message_length": 1024 * 1024 * 16,
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=grpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc.js","sourceRoot":"","sources":["../../src/util/grpc.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEW,QAAA,kBAAkB,GAAG;IAC/B,2BAA2B,EAAE,KAAK;IAClC,wBAAwB,EAAE,KAAK;IAC/B,sCAAsC,EAAE,KAAK;IAC7C,qCAAqC,EAAE,CAAC;IACxC,8BAA8B,EAAE,EAAE;IAClC,+BAA+B,EAAE,IAAI;IACrC,iCAAiC,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;CACtD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
import { opentracing } from "jaeger-client";
|
|
7
|
+
export interface TracingConfig {
|
|
8
|
+
serviceName?: string;
|
|
9
|
+
disable?: boolean;
|
|
10
|
+
sampler?: SamplerConfig;
|
|
11
|
+
reporter?: ReporterConfig;
|
|
12
|
+
}
|
|
13
|
+
export interface TracingOptions {
|
|
14
|
+
reporter?: Reporter;
|
|
15
|
+
metrics?: MetricsFactory;
|
|
16
|
+
logger?: Logger;
|
|
17
|
+
tags?: any;
|
|
18
|
+
}
|
|
19
|
+
export interface ReporterConfig {
|
|
20
|
+
logSpans?: boolean;
|
|
21
|
+
agentHost?: string;
|
|
22
|
+
agentPort?: number;
|
|
23
|
+
flushIntervalMs?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface SamplerConfig {
|
|
26
|
+
type: string;
|
|
27
|
+
param: number;
|
|
28
|
+
host?: string;
|
|
29
|
+
port?: number;
|
|
30
|
+
refreshIntervalMs?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface Logger {
|
|
33
|
+
info(msg: string): void;
|
|
34
|
+
error(msg: string): void;
|
|
35
|
+
}
|
|
36
|
+
export interface Reporter {
|
|
37
|
+
report(span: opentracing.Span): void;
|
|
38
|
+
close(callback?: () => void): void;
|
|
39
|
+
setProcess(serviceName: string, tags: any): void;
|
|
40
|
+
}
|
|
41
|
+
export interface MetricsFactory {
|
|
42
|
+
createCounter(name: string, tags: any): Counter;
|
|
43
|
+
createTimer(name: string, tags: any): Timer;
|
|
44
|
+
createGauge(name: string, tags: any): Gauge;
|
|
45
|
+
}
|
|
46
|
+
export interface Counter {
|
|
47
|
+
increment(delta: number): void;
|
|
48
|
+
}
|
|
49
|
+
export interface Timer {
|
|
50
|
+
record(value: number): void;
|
|
51
|
+
}
|
|
52
|
+
export interface Gauge {
|
|
53
|
+
update(value: number): void;
|
|
54
|
+
}
|
|
55
|
+
export interface SamplingDecision {
|
|
56
|
+
sample: boolean;
|
|
57
|
+
retryable: boolean;
|
|
58
|
+
tags: any;
|
|
59
|
+
}
|
|
60
|
+
export interface Sampler {
|
|
61
|
+
name(): string;
|
|
62
|
+
isSampled(operation: string, tags: any): boolean;
|
|
63
|
+
onCreateSpan(span: opentracing.Span): SamplingDecision;
|
|
64
|
+
onSetOperationName(span: opentracing.Span, operationName: string): SamplingDecision;
|
|
65
|
+
onSetTag(span: opentracing.Span, key: string, value: any): SamplingDecision;
|
|
66
|
+
close(callback: () => void): void;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=jaeger-client-types.d.ts.map
|
|
@@ -0,0 +1 @@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
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
|
+
//# sourceMappingURL=jaeger-client-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jaeger-client-types.js","sourceRoot":"","sources":["../../src/util/jaeger-client-types.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
package/lib/util/logging.d.ts
CHANGED
|
@@ -19,58 +19,74 @@ export declare namespace LogContext {
|
|
|
19
19
|
export interface LogPayload {
|
|
20
20
|
}
|
|
21
21
|
export declare namespace log {
|
|
22
|
-
function error(context: LogContext, message: string, error:
|
|
23
|
-
function error(context: LogContext, message: string, error:
|
|
22
|
+
function error(context: LogContext, message: string, error: any, payload: LogPayload): void;
|
|
23
|
+
function error(context: LogContext, message: string, error: any): void;
|
|
24
24
|
function error(context: LogContext, message: string, payload: LogPayload): void;
|
|
25
25
|
function error(context: LogContext, message: string): void;
|
|
26
|
-
function error(context: LogContext, error:
|
|
27
|
-
function error(context: LogContext, error:
|
|
28
|
-
function error(message: string, error:
|
|
29
|
-
function error(message: string, error:
|
|
26
|
+
function error(context: LogContext, error: any, payload: LogPayload): void;
|
|
27
|
+
function error(context: LogContext, error: any): void;
|
|
28
|
+
function error(message: string, error: any, payload: LogPayload): void;
|
|
29
|
+
function error(message: string, error: any): void;
|
|
30
30
|
function error(message: string, payload: LogPayload): void;
|
|
31
31
|
function error(message: string): void;
|
|
32
|
-
function error(error:
|
|
33
|
-
function error(error:
|
|
34
|
-
function warn(context: LogContext, message: string, error:
|
|
35
|
-
function warn(context: LogContext, message: string, error:
|
|
32
|
+
function error(error: any, payload: LogPayload): void;
|
|
33
|
+
function error(error: any): void;
|
|
34
|
+
function warn(context: LogContext, message: string, error: any, payload: LogPayload): void;
|
|
35
|
+
function warn(context: LogContext, message: string, error: any): void;
|
|
36
36
|
function warn(context: LogContext, message: string, payload: LogPayload): void;
|
|
37
37
|
function warn(context: LogContext, message: string): void;
|
|
38
|
-
function warn(context: LogContext, error:
|
|
39
|
-
function warn(context: LogContext, error:
|
|
40
|
-
function warn(message: string, error:
|
|
41
|
-
function warn(message: string, error:
|
|
38
|
+
function warn(context: LogContext, error: any, payload: LogPayload): void;
|
|
39
|
+
function warn(context: LogContext, error: any): void;
|
|
40
|
+
function warn(message: string, error: any, payload: LogPayload): void;
|
|
41
|
+
function warn(message: string, error: any): void;
|
|
42
42
|
function warn(message: string, payload: LogPayload): void;
|
|
43
43
|
function warn(message: string): void;
|
|
44
|
-
function warn(error:
|
|
45
|
-
function warn(error:
|
|
46
|
-
function info(context: LogContext, message: string, error:
|
|
47
|
-
function info(context: LogContext, message: string, error:
|
|
44
|
+
function warn(error: any, payload: LogPayload): void;
|
|
45
|
+
function warn(error: any): void;
|
|
46
|
+
function info(context: LogContext, message: string, error: any, payload: LogPayload): void;
|
|
47
|
+
function info(context: LogContext, message: string, error: any): void;
|
|
48
48
|
function info(context: LogContext, message: string, payload: LogPayload): void;
|
|
49
49
|
function info(context: LogContext, message: string): void;
|
|
50
|
-
function info(context: LogContext, error:
|
|
51
|
-
function info(context: LogContext, error:
|
|
52
|
-
function info(message: string, error:
|
|
53
|
-
function info(message: string, error:
|
|
50
|
+
function info(context: LogContext, error: any, payload: LogPayload): void;
|
|
51
|
+
function info(context: LogContext, error: any): void;
|
|
52
|
+
function info(message: string, error: any, payload: LogPayload): void;
|
|
53
|
+
function info(message: string, error: any): void;
|
|
54
54
|
function info(message: string, payload: LogPayload): void;
|
|
55
55
|
function info(message: string): void;
|
|
56
|
-
function info(error:
|
|
57
|
-
function info(error:
|
|
58
|
-
function debug(context: LogContext, message: string, error:
|
|
59
|
-
function debug(context: LogContext, message: string, error:
|
|
56
|
+
function info(error: any, payload: LogPayload): void;
|
|
57
|
+
function info(error: any): void;
|
|
58
|
+
function debug(context: LogContext, message: string, error: any, payload: LogPayload): void;
|
|
59
|
+
function debug(context: LogContext, message: string, error: any): void;
|
|
60
60
|
function debug(context: LogContext, message: string, payload: LogPayload): void;
|
|
61
61
|
function debug(context: LogContext, message: string): void;
|
|
62
|
-
function debug(context: LogContext, error:
|
|
63
|
-
function debug(context: LogContext, error:
|
|
64
|
-
function debug(message: string, error:
|
|
65
|
-
function debug(message: string, error:
|
|
62
|
+
function debug(context: LogContext, error: any, payload: LogPayload): void;
|
|
63
|
+
function debug(context: LogContext, error: any): void;
|
|
64
|
+
function debug(message: string, error: any, payload: LogPayload): void;
|
|
65
|
+
function debug(message: string, error: any): void;
|
|
66
66
|
function debug(message: string, payload: LogPayload): void;
|
|
67
67
|
function debug(message: string): void;
|
|
68
|
-
function debug(error:
|
|
69
|
-
function debug(error:
|
|
68
|
+
function debug(error: any, payload: LogPayload): void;
|
|
69
|
+
function debug(error: any): void;
|
|
70
70
|
/**
|
|
71
71
|
* Do not use in frontend.
|
|
72
72
|
*/
|
|
73
|
-
function enableJSONLogging(componentArg: string, versionArg: string | undefined): void;
|
|
73
|
+
function enableJSONLogging(componentArg: string, versionArg: string | undefined, logLevel?: LogrusLogLevel): void;
|
|
74
|
+
function setLogLevel(logLevel: LogrusLogLevel | undefined): void;
|
|
74
75
|
function resetToDefaultLogging(): void;
|
|
76
|
+
function setVersion(versionArg: string): void;
|
|
77
|
+
}
|
|
78
|
+
export declare type LogrusLogLevel = keyof (typeof LogrusLogLevels);
|
|
79
|
+
export declare const LogrusLogLevels: {
|
|
80
|
+
trace: boolean;
|
|
81
|
+
debug: boolean;
|
|
82
|
+
info: boolean;
|
|
83
|
+
warning: boolean;
|
|
84
|
+
error: boolean;
|
|
85
|
+
fatal: boolean;
|
|
86
|
+
panic: boolean;
|
|
87
|
+
};
|
|
88
|
+
export declare namespace LogrusLogLevel {
|
|
89
|
+
function isGreatherOrEqual(lvl: LogrusLogLevel | undefined, ref: LogrusLogLevel | undefined): boolean;
|
|
90
|
+
function getFromEnv(): LogrusLogLevel | undefined;
|
|
75
91
|
}
|
|
76
92
|
//# sourceMappingURL=logging.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/util/logging.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,WAAW,UAAU;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,yBAAiB,UAAU,CAAC;IACxB,SAAgB,IAAI,CAAC,MAAM,EAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAA;KAAE,cAK3E;CACJ;AAED,MAAM,WAAW,UAAU;CAE1B;AAED,yBAAiB,GAAG,CAAC;IACjB,SAAgB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/util/logging.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,WAAW,UAAU;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,yBAAiB,UAAU,CAAC;IACxB,SAAgB,IAAI,CAAC,MAAM,EAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAA;KAAE,cAK3E;CACJ;AAED,MAAM,WAAW,UAAU;CAE1B;AAED,yBAAiB,GAAG,CAAC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