@gitpod/gitpod-protocol 0.1.5-wth-argo.0 → 0.1.5-yh-vmoptions-fork.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 +206 -28
- package/lib/accounting-protocol.d.ts +162 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +107 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +32 -4
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +15 -0
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +44 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/analytics.js +10 -0
- package/lib/analytics.js.map +1 -0
- package/lib/auth.d.ts.map +1 -1
- package/lib/context-url.d.ts +31 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +102 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +14 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +109 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/email-protocol.d.ts +1 -2
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +5 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +25 -26
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -37
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +30 -44
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +31 -38
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +0 -6
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +7 -27
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +26 -42
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +145 -142
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +180 -33
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +194 -273
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +9 -11
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +6 -8
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +5 -1
- package/lib/ide-frontend-service.d.ts.map +1 -1
- package/lib/ide-protocol.d.ts +105 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/{util/without.js → ide-protocol.js} +2 -2
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +16 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +27 -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/license-protocol.d.ts +7 -0
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +5 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +184 -34
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +4 -4
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +42 -59
- 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/error.d.ts +6 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +12 -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/handler.js +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 +24 -60
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +3 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +75 -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/payment-protocol.d.ts +18 -0
- package/lib/payment-protocol.d.ts.map +1 -0
- package/lib/payment-protocol.js +13 -0
- package/lib/payment-protocol.js.map +1 -0
- package/lib/permission.d.ts +10 -3
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +41 -31
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +210 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +605 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +196 -83
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +264 -200
- 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/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +2 -3
- 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.d.ts +91 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +74 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +118 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +30 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +2 -2
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +88 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +57 -135
- 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 +11 -11
- 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.d.ts.map +1 -1
- package/lib/util/disposable.js +27 -40
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +63 -77
- 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 +27 -47
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +6 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +469 -502
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +68 -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 +41 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +1 -2
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +108 -109
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +7 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +113 -31
- 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/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
- 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 +125 -129
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +5 -5
- 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 +147 -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.d.ts.map +1 -1
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +1 -0
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +35 -17
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts.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 +52 -6
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +197 -64
- 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.d.ts +7 -7
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +10 -12
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +76 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +31 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +45 -5
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +32 -18
- package/pkg-yarn.lock +18 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +241 -0
- package/src/admin-protocol.ts +70 -19
- package/src/analytics.ts +52 -0
- package/src/auth.ts +2 -2
- package/src/context-url.spec.ts +67 -0
- package/src/context-url.ts +109 -0
- package/src/email-protocol.ts +5 -7
- package/src/encryption/container-module.ts +2 -3
- package/src/encryption/encryption-engine.spec.ts +9 -8
- package/src/encryption/encryption-engine.ts +14 -14
- package/src/encryption/encryption-service.ts +4 -5
- package/src/encryption/key-provider.ts +16 -19
- package/src/env.ts +0 -22
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +348 -110
- package/src/headless-workspace-log.ts +12 -14
- package/src/ide-frontend-service.ts +6 -2
- package/src/ide-protocol.ts +119 -0
- package/src/index.ts +16 -10
- package/src/installation-admin-protocol.ts +42 -0
- package/src/license-protocol.ts +12 -6
- package/src/messaging/browser/connection.ts +197 -18
- package/src/messaging/browser/window-connection.ts +39 -29
- package/src/messaging/client-call-metrics.ts +96 -0
- package/src/messaging/error.ts +18 -5
- package/src/messaging/handler.ts +13 -1
- package/src/messaging/node/connection.ts +23 -70
- package/src/messaging/proxy-factory.ts +35 -34
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +20 -0
- package/src/permission.ts +42 -33
- package/src/plans.ts +679 -0
- package/src/protocol.ts +493 -275
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +147 -0
- package/src/teams-projects-protocol.ts +153 -0
- package/src/typings/globals.ts +4 -4
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +4 -5
- package/src/util/cancelable.ts +3 -3
- package/src/util/date-time.ts +8 -8
- package/src/util/deferred.ts +6 -6
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +11 -8
- package/src/util/generate-workspace-id.spec.ts +37 -10
- package/src/util/generate-workspace-id.ts +464 -438
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +59 -8
- package/src/util/gitpod-host-url.ts +52 -40
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +145 -72
- package/src/util/make-link.ts +6 -7
- package/src/util/parse-workspace-id.spec.ts +37 -8
- package/src/util/parse-workspace-id.ts +32 -7
- package/src/util/queue.spec.ts +28 -26
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +6 -8
- package/src/util/skip-if.ts +10 -7
- package/src/util/timeutil.spec.ts +14 -15
- package/src/util/timeutil.ts +25 -15
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +200 -31
- package/src/util/workspace-port-authentication.ts +10 -13
- package/src/workspace-cluster.ts +107 -0
- package/src/workspace-instance.ts +98 -31
- package/src/wsready.ts +3 -3
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js.map +0 -1
- package/lib/util/context-url.d.ts +0 -13
- package/lib/util/context-url.d.ts.map +0 -1
- package/lib/util/context-url.js +0 -26
- package/lib/util/context-url.js.map +0 -1
- package/lib/util/context-url.spec.d.ts +0 -10
- package/lib/util/context-url.spec.d.ts.map +0 -1
- package/lib/util/context-url.spec.js +0 -52
- package/lib/util/context-url.spec.js.map +0 -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/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/theia-plugins.ts +0 -11
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020
|
|
3
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
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
|
*/
|
|
@@ -13,40 +13,122 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
14
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
15
|
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
16
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
26
|
exports.GitpodHostUrlTest = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
GitpodHostUrlTest.prototype.parseWorkspaceId_pathBased = function () {
|
|
26
|
-
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;
|
|
27
34
|
expect(actual).to.equal("bc77e03d-c781-4235-bca0-e24087f5e472");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
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;
|
|
31
38
|
expect(actual).to.equal("gray-grasshopper-nfbitfia");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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/")
|
|
43
|
+
.withoutWorkspacePrefix()
|
|
44
|
+
.toString()).to.equal("https://gitpod-staging.com/");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
testWithoutWorkspacePrefix2() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gitpod-staging.com/").withoutWorkspacePrefix().toString()).to.equal("https://gitpod-staging.com/");
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
testWithoutWorkspacePrefix3() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.my-branch-1234.staging.gitpod-dev.com/")
|
|
55
|
+
.withoutWorkspacePrefix()
|
|
56
|
+
.toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
testWithoutWorkspacePrefix4() {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://my-branch-1234.staging.gitpod-dev.com/")
|
|
62
|
+
.withoutWorkspacePrefix()
|
|
63
|
+
.toString()).to.equal("https://my-branch-1234.staging.gitpod-dev.com/");
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
testWithoutWorkspacePrefix5() {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://abc-nice-brunch-4224.staging.gitpod-dev.com/")
|
|
69
|
+
.withoutWorkspacePrefix()
|
|
70
|
+
.toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
testWithoutWorkspacePrefix6() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
expect(gitpod_host_url_1.GitpodHostUrl.fromWorkspaceUrl("https://gray-rook-5523v5d8.ws-dev.abc-nice-brunch-4224.staging.gitpod-dev.com/")
|
|
76
|
+
.withoutWorkspacePrefix()
|
|
77
|
+
.toString()).to.equal("https://abc-nice-brunch-4224.staging.gitpod-dev.com/");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
__decorate([
|
|
82
|
+
mocha_typescript_1.test,
|
|
83
|
+
__metadata("design:type", Function),
|
|
84
|
+
__metadata("design:paramtypes", []),
|
|
85
|
+
__metadata("design:returntype", void 0)
|
|
86
|
+
], GitpodHostUrlTest.prototype, "parseWorkspaceId_pathBased", null);
|
|
87
|
+
__decorate([
|
|
88
|
+
mocha_typescript_1.test,
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", []),
|
|
91
|
+
__metadata("design:returntype", void 0)
|
|
92
|
+
], GitpodHostUrlTest.prototype, "parseWorkspaceId_hosts_withEnvVarsInjected", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
mocha_typescript_1.test,
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", []),
|
|
97
|
+
__metadata("design:returntype", Promise)
|
|
98
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
mocha_typescript_1.test,
|
|
101
|
+
__metadata("design:type", Function),
|
|
102
|
+
__metadata("design:paramtypes", []),
|
|
103
|
+
__metadata("design:returntype", Promise)
|
|
104
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix2", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
mocha_typescript_1.test,
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", []),
|
|
109
|
+
__metadata("design:returntype", Promise)
|
|
110
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix3", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
mocha_typescript_1.test,
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", []),
|
|
115
|
+
__metadata("design:returntype", Promise)
|
|
116
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix4", null);
|
|
117
|
+
__decorate([
|
|
118
|
+
mocha_typescript_1.test,
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", []),
|
|
121
|
+
__metadata("design:returntype", Promise)
|
|
122
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix5", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
mocha_typescript_1.test,
|
|
125
|
+
__metadata("design:type", Function),
|
|
126
|
+
__metadata("design:paramtypes", []),
|
|
127
|
+
__metadata("design:returntype", Promise)
|
|
128
|
+
], GitpodHostUrlTest.prototype, "testWithoutWorkspacePrefix6", null);
|
|
129
|
+
GitpodHostUrlTest = __decorate([
|
|
130
|
+
mocha_typescript_1.suite
|
|
131
|
+
], GitpodHostUrlTest);
|
|
50
132
|
exports.GitpodHostUrlTest = GitpodHostUrlTest;
|
|
51
133
|
module.exports = new GitpodHostUrlTest();
|
|
52
134
|
//# 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;IACb,0BAA0B;QACnC,MAAM,MAAM,GAAG,+BAAa,CAAC,gBAAgB,CACzC,uEAAuE,CAC1E,CAAC,WAAW,CAAC;QACd,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACpE,CAAC;IAEY,0CAA0C;QACnD,MAAM,MAAM,GAAG,+BAAa,CAAC,gBAAgB,CACzC,mIAAmI,CACtI,CA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sDAAsD,CAAC,CAAC;QACvE,CAAC;KAAA;CACJ,CAAA;AA7DS;IAAL,uBAAI;;;;mEAKJ;AAEK;IAAL,uBAAI;;;;mFAKJ;AAEK;IAAL,uBAAI;;;;mEAMJ;AAEK;IAAL,uBAAI;;;;oEAIJ;AAEK;IAAL,uBAAI;;;;oEAMJ;AAEK;IAAL,uBAAI;;;;oEAMJ;AAEK;IAAL,uBAAI;;;;oEAMJ;AAEK;IAAL,uBAAI;;;;oEAQJ;AA7DQ,iBAAiB;IAD7B,wBAAK;GACO,iBAAiB,CA8D7B;AA9DY,8CAAiB;AA+D9B,MAAM,CAAC,OAAO,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -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;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;CAQ9B,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;;;AAEU,QAAA,kBAAkB,GAAG;IAC9B,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 @@
|
|
|
1
|
+
{"version":3,"file":"jaeger-client-types.d.ts","sourceRoot":"","sources":["../../src/util/jaeger-client-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAO5C,MAAM,WAAW,aAAa;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,MAAM;IACnB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAA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AC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,gBAAgB,CAAC;IAC5E,KAAK,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACrC"}
|
|
@@ -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,
|
|
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,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAA;KAAE,cAK1E;CACJ;AAED,MAAM,WAAW,UAAU;CAE1B;AAED,yBAAiB,GAAG,CAAC;IACjB,SAAgB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IACnG,SAAgB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;IAC9E,SAAgB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IA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