@gitpod/gitpod-protocol 0.1.5-sefftinge-create-feature-flag-for-4354.0 → 0.1.5-server-vscode-oauth2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/gitpod-schema.json +4 -22
- package/lib/accounting-protocol.d.ts +3 -5
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +6 -11
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +9 -4
- 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 +44 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/{util/without.js → analytics.js} +4 -2
- package/lib/analytics.js.map +1 -0
- package/lib/context-url.d.ts +18 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +49 -0
- package/lib/context-url.js.map +1 -0
- package/lib/{util/context-url.spec.d.ts → context-url.spec.d.ts} +2 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +73 -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 +3 -3
- 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 +74 -5
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +149 -294
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +8 -11
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +4 -7
- package/lib/headless-workspace-log.js.map +1 -1
- 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.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 +34 -54
- 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 +1 -0
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +2 -0
- 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.js +21 -21
- 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/permission.d.ts +1 -2
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +12 -13
- package/lib/permission.js.map +1 -1
- package/lib/plans.js +38 -57
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +52 -22
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +68 -115
- package/lib/protocol.js.map +1 -1
- package/lib/team-subscription-protocol.d.ts +3 -3
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +13 -10
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +102 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +23 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/util/analytics.d.ts +1 -26
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +36 -28
- 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.js +22 -46
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +12 -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.js +93 -103
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +5 -0
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +92 -70
- 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/logging.d.ts +17 -1
- 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/repeater.js +35 -88
- package/lib/util/repeater.js.map +1 -1
- 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.js +43 -47
- package/lib/util/tracing.js.map +1 -1
- 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 +12 -3
- 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 -0
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/lib/wsready.js.map +1 -1
- package/package.json +11 -6
- package/pkg-yarn.lock +7 -4
- package/src/accounting-protocol.ts +3 -7
- package/src/admin-protocol.ts +10 -5
- package/src/analytics.ts +52 -0
- package/src/context-url.spec.ts +39 -0
- package/src/context-url.ts +51 -0
- package/src/email-protocol.ts +1 -2
- package/src/env.ts +10 -10
- package/src/gitpod-service.ts +90 -12
- package/src/headless-workspace-log.ts +7 -11
- package/src/index.ts +2 -0
- package/src/messaging/browser/connection.ts +176 -10
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +3 -0
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +2 -2
- package/src/messaging/proxy-factory.ts +13 -5
- package/src/permission.ts +0 -1
- package/src/protocol.ts +73 -28
- package/src/team-subscription-protocol.ts +5 -3
- package/src/teams-projects-protocol.ts +131 -0
- package/src/util/analytics.ts +17 -30
- package/src/util/generate-workspace-id.ts +1 -0
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.spec.ts +20 -0
- package/src/util/gitpod-host-url.ts +1 -1
- package/src/util/grpc.ts +15 -0
- package/src/util/logging.ts +70 -6
- package/src/util/parse-workspace-id.spec.ts +21 -1
- package/src/util/parse-workspace-id.ts +32 -6
- package/src/workspace-cluster.ts +9 -3
- package/src/workspace-instance.ts +19 -7
- package/src/wsready.ts +1 -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.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/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
- package/src/util/without.ts +0 -8
package/lib/util/context-url.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License-AGPL.txt in the project root for license information.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.contextUrlToUrl = void 0;
|
|
9
|
-
/**
|
|
10
|
-
* The field "contextUrl" might contain prefixes like:
|
|
11
|
-
* - envvar1=value1/...
|
|
12
|
-
* - prebuild/...
|
|
13
|
-
* This is the analogon to the (Prefix)ContextParser structure in "server".
|
|
14
|
-
*/
|
|
15
|
-
function contextUrlToUrl(contextUrl) {
|
|
16
|
-
if (contextUrl === undefined) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
if (contextUrl.startsWith("http")) {
|
|
20
|
-
return new URL(contextUrl);
|
|
21
|
-
}
|
|
22
|
-
var finding = contextUrl.search("/http");
|
|
23
|
-
return new URL(contextUrl.substr(finding + 1));
|
|
24
|
-
}
|
|
25
|
-
exports.contextUrlToUrl = contextUrlToUrl;
|
|
26
|
-
//# sourceMappingURL=context-url.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.js","sourceRoot":"","sources":["../../src/util/context-url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,UAA8B;IAC5D,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;KAC5B;IACD,IAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AAVD,0CAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.spec.d.ts","sourceRoot":"","sources":["../../src/util/context-url.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,qBACa,cAAc;IAEV,0BAA0B;IAK1B,4BAA4B;CAI5C"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License-AGPL.txt in the project root for license information.
|
|
6
|
-
*/
|
|
7
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
-
};
|
|
13
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ContextUrlTest = void 0;
|
|
18
|
-
var chai = require("chai");
|
|
19
|
-
var mocha_typescript_1 = require("mocha-typescript");
|
|
20
|
-
var context_url_1 = require("./context-url");
|
|
21
|
-
var expect = chai.expect;
|
|
22
|
-
var ContextUrlTest = /** @class */ (function () {
|
|
23
|
-
function ContextUrlTest() {
|
|
24
|
-
}
|
|
25
|
-
ContextUrlTest.prototype.parseContextUrl_withEnvVar = function () {
|
|
26
|
-
var actual = context_url_1.contextUrlToUrl("passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo");
|
|
27
|
-
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
28
|
-
};
|
|
29
|
-
ContextUrlTest.prototype.parseContextUrl_withPrebuild = function () {
|
|
30
|
-
var actual = context_url_1.contextUrlToUrl("prebuild/https://github.com/gitpod-io/gitpod-test-repo");
|
|
31
|
-
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
32
|
-
};
|
|
33
|
-
__decorate([
|
|
34
|
-
mocha_typescript_1.test,
|
|
35
|
-
__metadata("design:type", Function),
|
|
36
|
-
__metadata("design:paramtypes", []),
|
|
37
|
-
__metadata("design:returntype", void 0)
|
|
38
|
-
], ContextUrlTest.prototype, "parseContextUrl_withEnvVar", null);
|
|
39
|
-
__decorate([
|
|
40
|
-
mocha_typescript_1.test,
|
|
41
|
-
__metadata("design:type", Function),
|
|
42
|
-
__metadata("design:paramtypes", []),
|
|
43
|
-
__metadata("design:returntype", void 0)
|
|
44
|
-
], ContextUrlTest.prototype, "parseContextUrl_withPrebuild", null);
|
|
45
|
-
ContextUrlTest = __decorate([
|
|
46
|
-
mocha_typescript_1.suite
|
|
47
|
-
], ContextUrlTest);
|
|
48
|
-
return ContextUrlTest;
|
|
49
|
-
}());
|
|
50
|
-
exports.ContextUrlTest = ContextUrlTest;
|
|
51
|
-
module.exports = new ContextUrlTest();
|
|
52
|
-
//# sourceMappingURL=context-url.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.spec.js","sourceRoot":"","sources":["../../src/util/context-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,2BAA6B;AAC7B,qDAA+C;AAC/C,6CAAgD;AAChD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAG3B;IAAA;IAWA,CAAC;IATgB,mDAA0B,GAAjC;QACF,IAAM,MAAM,GAAG,6BAAe,CAAC,qEAAqE,CAAC,CAAC;QACtG,MAAM,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACrE,CAAC;IAEY,qDAA4B,GAAnC;QACF,IAAM,MAAM,GAAG,6BAAe,CAAC,wDAAwD,CAAC,CAAC;QACzF,MAAM,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IARK;QAAL,uBAAI;;;;oEAGJ;IAEK;QAAL,uBAAI;;;;sEAGJ;IAVQ,cAAc;QAD1B,wBAAK;OACO,cAAc,CAW1B;IAAD,qBAAC;CAAA,AAXD,IAWC;AAXY,wCAAc;AAY3B,MAAM,CAAC,OAAO,GAAG,IAAI,cAAc,EAAE,CAAA"}
|
package/lib/util/without.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License-AGPL.txt in the project root for license information.
|
|
5
|
-
*/
|
|
6
|
-
export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
7
|
-
//# sourceMappingURL=without.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"without.d.ts","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,oBAAY,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
package/lib/util/without.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"without.js","sourceRoot":"","sources":["../../src/util/without.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License-AGPL.txt in the project root for license information.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as chai from 'chai';
|
|
8
|
-
import { suite, test } from 'mocha-typescript';
|
|
9
|
-
import { contextUrlToUrl } from './context-url';
|
|
10
|
-
const expect = chai.expect;
|
|
11
|
-
|
|
12
|
-
@suite
|
|
13
|
-
export class ContextUrlTest {
|
|
14
|
-
|
|
15
|
-
@test public parseContextUrl_withEnvVar() {
|
|
16
|
-
const actual = contextUrlToUrl("passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo");
|
|
17
|
-
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@test public parseContextUrl_withPrebuild() {
|
|
21
|
-
const actual = contextUrlToUrl("prebuild/https://github.com/gitpod-io/gitpod-test-repo");
|
|
22
|
-
expect(actual?.host).to.equal("github.com");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
module.exports = new ContextUrlTest()
|
package/src/util/context-url.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
-
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License-AGPL.txt in the project root for license information.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The field "contextUrl" might contain prefixes like:
|
|
9
|
-
* - envvar1=value1/...
|
|
10
|
-
* - prebuild/...
|
|
11
|
-
* This is the analogon to the (Prefix)ContextParser structure in "server".
|
|
12
|
-
*/
|
|
13
|
-
export function contextUrlToUrl(contextUrl: string | undefined): URL | undefined {
|
|
14
|
-
if (contextUrl === undefined) {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (contextUrl.startsWith("http")) {
|
|
19
|
-
return new URL(contextUrl);
|
|
20
|
-
}
|
|
21
|
-
const finding = contextUrl.search("/http");
|
|
22
|
-
return new URL(contextUrl.substr(finding + 1));
|
|
23
|
-
}
|
package/src/util/without.ts
DELETED