@gitpod/gitpod-protocol 0.1.5-v0.6.0-beta4 → 0.1.5-vn-6525.75
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 +68 -26
- package/lib/accounting-protocol.d.ts +155 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +100 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +33 -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 +25 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +16 -0
- package/lib/auth.js.map +1 -0
- 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 +2 -3
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +24 -25
- 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 +172 -33
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +187 -267
- 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.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 +5 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +10 -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 -5
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +41 -35
- 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 +164 -88
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +184 -199
- 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 +75 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +63 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +113 -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 +4 -0
- package/lib/util/generate-workspace-id.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.js +487 -0
- package/lib/util/generate-workspace-id.js.map +1 -0
- package/{src/theia-plugins.ts → lib/util/generate-workspace-id.spec.d.ts} +2 -6
- package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.spec.js +91 -0
- package/lib/util/generate-workspace-id.spec.js.map +1 -0
- 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 +2 -2
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +109 -106
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +8 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +114 -22
- 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 +13 -3
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +37 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +8 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +127 -47
- 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.map +1 -1
- package/lib/util/timeutil.js +28 -16
- 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 +199 -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 +28 -4
- 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 +33 -17
- package/pkg-yarn.lock +18 -9
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +231 -0
- package/src/admin-protocol.ts +71 -19
- package/src/analytics.ts +52 -0
- package/src/auth.ts +27 -0
- 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 +18 -18
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +327 -102
- 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 +5 -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 +15 -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 -38
- package/src/plans.ts +679 -0
- package/src/protocol.ts +384 -279
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +123 -0
- package/src/teams-projects-protocol.ts +147 -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 +51 -0
- package/src/util/generate-workspace-id.ts +475 -0
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +63 -7
- package/src/util/gitpod-host-url.ts +55 -38
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +145 -71
- package/src/util/make-link.ts +6 -7
- package/src/util/parse-workspace-id.spec.ts +60 -10
- package/src/util/parse-workspace-id.ts +38 -8
- 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 +19 -15
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +202 -31
- package/src/util/workspace-port-authentication.ts +10 -13
- package/src/workspace-cluster.ts +107 -0
- package/src/workspace-instance.ts +72 -30
- 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/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/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
package/lib/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkBH,IAAiB,oBAAoB,CAIpC;AAJD,WAAiB,oBAAoB;IACjC,SAAgB,EAAE,CAAC,IAAS;QACxB,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,aAAa,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,CAAC;IACpF,CAAC;IAFe,uBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAIpC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { Workspace } from ".";
|
|
7
|
+
/**
|
|
8
|
+
* The whole point of these methods is to overcome inconsistencies in our data model.
|
|
9
|
+
* Ideally we remove it at some point once we fixed our model, as it:
|
|
10
|
+
* - duplicates logic
|
|
11
|
+
* - but additional burden on clients (using this, copying this to other languages!)
|
|
12
|
+
*
|
|
13
|
+
* TODO(gpl) See if we can get this into `server` code to remove the burden from clients
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace ContextURL {
|
|
16
|
+
const INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
|
|
17
|
+
const PREBUILD_PREFIX = "prebuild";
|
|
18
|
+
const IMAGEBUILD_PREFIX = "imagebuild";
|
|
19
|
+
const SNAPSHOT_PREFIX = "snapshot";
|
|
20
|
+
const REFERRER_PREFIX = "referrer:";
|
|
21
|
+
/**
|
|
22
|
+
* This function will (try to) return the HTTP(S) URL of the context the user originally created this workspace on.
|
|
23
|
+
* Especially it will not contain any modifiers or be of different scheme than HTTP(S).
|
|
24
|
+
*
|
|
25
|
+
* Use this function if you need to provided a _working_ URL to the original context.
|
|
26
|
+
* @param ws
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
function getNormalizedURL(ws: Pick<Workspace, "context" | "contextURL"> | undefined): URL | undefined;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=context-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-url.d.ts","sourceRoot":"","sources":["../src/context-url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE9B;;;;;;;GAOG;AACH,yBAAiB,UAAU,CAAC;IACjB,MAAM,2BAA2B,yBAAyB,CAAC;IAC3D,MAAM,eAAe,aAAa,CAAC;IACnC,MAAM,iBAAiB,eAAe,CAAC;IACvC,MAAM,eAAe,aAAa,CAAC;IACnC,MAAM,eAAe,cAAc,CAAC;IAE3C;;;;;;;OAOG;IACH,SAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,YAAY,CAAC,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS,CAY3G;CAiEJ"}
|
|
@@ -0,0 +1,102 @@
|
|
|
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.ContextURL = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* The whole point of these methods is to overcome inconsistencies in our data model.
|
|
11
|
+
* Ideally we remove it at some point once we fixed our model, as it:
|
|
12
|
+
* - duplicates logic
|
|
13
|
+
* - but additional burden on clients (using this, copying this to other languages!)
|
|
14
|
+
*
|
|
15
|
+
* TODO(gpl) See if we can get this into `server` code to remove the burden from clients
|
|
16
|
+
*/
|
|
17
|
+
var ContextURL;
|
|
18
|
+
(function (ContextURL) {
|
|
19
|
+
ContextURL.INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
|
|
20
|
+
ContextURL.PREBUILD_PREFIX = "prebuild";
|
|
21
|
+
ContextURL.IMAGEBUILD_PREFIX = "imagebuild";
|
|
22
|
+
ContextURL.SNAPSHOT_PREFIX = "snapshot";
|
|
23
|
+
ContextURL.REFERRER_PREFIX = "referrer:";
|
|
24
|
+
/**
|
|
25
|
+
* This function will (try to) return the HTTP(S) URL of the context the user originally created this workspace on.
|
|
26
|
+
* Especially it will not contain any modifiers or be of different scheme than HTTP(S).
|
|
27
|
+
*
|
|
28
|
+
* Use this function if you need to provided a _working_ URL to the original context.
|
|
29
|
+
* @param ws
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
function getNormalizedURL(ws) {
|
|
33
|
+
const normalized = normalize(ws);
|
|
34
|
+
if (!normalized) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
return new URL(normalized);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
console.error(`unable to parse URL from normalized contextURL: '${normalized}'`, err);
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
ContextURL.getNormalizedURL = getNormalizedURL;
|
|
46
|
+
function normalize(ws) {
|
|
47
|
+
if (!ws) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
if (ws.context.normalizedContextURL) {
|
|
51
|
+
return ws.context.normalizedContextURL;
|
|
52
|
+
}
|
|
53
|
+
// fallback: we do not yet set normalizedContextURL on all workspaces, yet, let alone older existing workspaces
|
|
54
|
+
let fallback = undefined;
|
|
55
|
+
try {
|
|
56
|
+
fallback = removePrefixes(ws.contextURL);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
console.error(`unable to remove prefixes from contextURL: '${ws.contextURL}'`, err);
|
|
60
|
+
}
|
|
61
|
+
return fallback;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The field "contextUrl" might contain prefixes like:
|
|
65
|
+
* - envvar1=value1/...
|
|
66
|
+
* - prebuild/...
|
|
67
|
+
* This is the analogon to the (Prefix)ContextParser structure in "server".
|
|
68
|
+
*/
|
|
69
|
+
function removePrefixes(contextUrl) {
|
|
70
|
+
if (contextUrl === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
const segments = contextUrl.split("/");
|
|
74
|
+
if (segments.length === 1) {
|
|
75
|
+
return segments[0]; // this might be something, we just try
|
|
76
|
+
}
|
|
77
|
+
const segmentsToURL = (offset) => {
|
|
78
|
+
let rest = segments.slice(offset).join("/");
|
|
79
|
+
if (/^git@[^:\/]+:/.test(rest)) {
|
|
80
|
+
rest = rest.replace(/^git@([^:\/]+):/, "https://$1/");
|
|
81
|
+
}
|
|
82
|
+
if (!rest.startsWith("http")) {
|
|
83
|
+
rest = "https://" + rest;
|
|
84
|
+
}
|
|
85
|
+
return rest;
|
|
86
|
+
};
|
|
87
|
+
const firstSegment = segments[0];
|
|
88
|
+
if (firstSegment === ContextURL.PREBUILD_PREFIX ||
|
|
89
|
+
firstSegment === ContextURL.INCREMENTAL_PREBUILD_PREFIX ||
|
|
90
|
+
firstSegment === ContextURL.IMAGEBUILD_PREFIX ||
|
|
91
|
+
firstSegment === ContextURL.SNAPSHOT_PREFIX ||
|
|
92
|
+
firstSegment.startsWith(ContextURL.REFERRER_PREFIX)) {
|
|
93
|
+
return segmentsToURL(1);
|
|
94
|
+
}
|
|
95
|
+
// check for env vars
|
|
96
|
+
if (firstSegment.indexOf("=") !== -1) {
|
|
97
|
+
return segmentsToURL(1);
|
|
98
|
+
}
|
|
99
|
+
return segmentsToURL(0);
|
|
100
|
+
}
|
|
101
|
+
})(ContextURL = exports.ContextURL || (exports.ContextURL = {}));
|
|
102
|
+
//# sourceMappingURL=context-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-url.js","sourceRoot":"","sources":["../src/context-url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH;;;;;;;GAOG;AACH,IAAiB,UAAU,CA4F1B;AA5FD,WAAiB,UAAU;IAC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.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContextUrlTest {
|
|
7
|
+
parseContextUrl_withEnvVar(): void;
|
|
8
|
+
parseContextUrl_withEnvVar_withoutSchema(): void;
|
|
9
|
+
parseContextUrl_withEnvVar_sshUrl(): void;
|
|
10
|
+
parseContextUrl_withPrebuild(): void;
|
|
11
|
+
parseContextUrl_withPrebuild_withoutSchema(): void;
|
|
12
|
+
parseContextUrl_badUrl(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=context-url.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-url.spec.d.ts","sourceRoot":"","sources":["../src/context-url.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,qBACa,cAAc;IACV,0BAA0B;IAS1B,wCAAwC;IASxC,iCAAiC;IASjC,4BAA4B;IAS5B,0CAA0C;IAS1C,sBAAsB;CAItC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
const chai = require("chai");
|
|
19
|
+
const mocha_typescript_1 = require("mocha-typescript");
|
|
20
|
+
const context_url_1 = require("./context-url");
|
|
21
|
+
const expect = chai.expect;
|
|
22
|
+
let ContextUrlTest = class ContextUrlTest {
|
|
23
|
+
parseContextUrl_withEnvVar() {
|
|
24
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({
|
|
25
|
+
contextURL: "passedin=test%20value/https://github.com/gitpod-io/gitpod-test-repo",
|
|
26
|
+
context: {},
|
|
27
|
+
});
|
|
28
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
29
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
30
|
+
}
|
|
31
|
+
parseContextUrl_withEnvVar_withoutSchema() {
|
|
32
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({
|
|
33
|
+
contextURL: "passedin=test%20value/github.com/gitpod-io/gitpod-test-repo",
|
|
34
|
+
context: {},
|
|
35
|
+
});
|
|
36
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
37
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
38
|
+
}
|
|
39
|
+
parseContextUrl_withEnvVar_sshUrl() {
|
|
40
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({
|
|
41
|
+
contextURL: "passedin=test%20value/git@github.com:gitpod-io/gitpod-test-repo.git",
|
|
42
|
+
context: {},
|
|
43
|
+
});
|
|
44
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
45
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo.git");
|
|
46
|
+
}
|
|
47
|
+
parseContextUrl_withPrebuild() {
|
|
48
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({
|
|
49
|
+
contextURL: "prebuild/https://github.com/gitpod-io/gitpod-test-repo",
|
|
50
|
+
context: {},
|
|
51
|
+
});
|
|
52
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
53
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
54
|
+
}
|
|
55
|
+
parseContextUrl_withPrebuild_withoutSchema() {
|
|
56
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({
|
|
57
|
+
contextURL: "prebuild/github.com/gitpod-io/gitpod-test-repo",
|
|
58
|
+
context: {},
|
|
59
|
+
});
|
|
60
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
61
|
+
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
62
|
+
}
|
|
63
|
+
parseContextUrl_badUrl() {
|
|
64
|
+
const actual = context_url_1.ContextURL.getNormalizedURL({ contextURL: "[Object object]", context: {} });
|
|
65
|
+
expect(actual).to.be.undefined;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
__decorate([
|
|
69
|
+
mocha_typescript_1.test,
|
|
70
|
+
__metadata("design:type", Function),
|
|
71
|
+
__metadata("design:paramtypes", []),
|
|
72
|
+
__metadata("design:returntype", void 0)
|
|
73
|
+
], ContextUrlTest.prototype, "parseContextUrl_withEnvVar", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
mocha_typescript_1.test,
|
|
76
|
+
__metadata("design:type", Function),
|
|
77
|
+
__metadata("design:paramtypes", []),
|
|
78
|
+
__metadata("design:returntype", void 0)
|
|
79
|
+
], ContextUrlTest.prototype, "parseContextUrl_withEnvVar_withoutSchema", null);
|
|
80
|
+
__decorate([
|
|
81
|
+
mocha_typescript_1.test,
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", []),
|
|
84
|
+
__metadata("design:returntype", void 0)
|
|
85
|
+
], ContextUrlTest.prototype, "parseContextUrl_withEnvVar_sshUrl", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
mocha_typescript_1.test,
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", []),
|
|
90
|
+
__metadata("design:returntype", void 0)
|
|
91
|
+
], ContextUrlTest.prototype, "parseContextUrl_withPrebuild", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
mocha_typescript_1.test,
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", []),
|
|
96
|
+
__metadata("design:returntype", void 0)
|
|
97
|
+
], ContextUrlTest.prototype, "parseContextUrl_withPrebuild_withoutSchema", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
mocha_typescript_1.test,
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", []),
|
|
102
|
+
__metadata("design:returntype", void 0)
|
|
103
|
+
], ContextUrlTest.prototype, "parseContextUrl_badUrl", null);
|
|
104
|
+
ContextUrlTest = __decorate([
|
|
105
|
+
mocha_typescript_1.suite
|
|
106
|
+
], ContextUrlTest);
|
|
107
|
+
exports.ContextUrlTest = ContextUrlTest;
|
|
108
|
+
module.exports = new ContextUrlTest();
|
|
109
|
+
//# sourceMappingURL=context-url.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-url.spec.js","sourceRoot":"","sources":["../src/context-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,6BAA6B;AAC7B,uDAA+C;AAE/C,+CAA2C;AAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAK3B,IAAa,cAAc,GAA3B,MAAa,cAAc;IACV,0BAA0B;QACnC,MAAM,MAAM,GAAG,wBAAU,CAAC,gBAAgB,CAAC;Y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Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
|
-
import { Without } from "./util/without";
|
|
7
6
|
export declare type EMailState = "scheduledInternal" | "scheduledSendgrid";
|
|
8
7
|
export interface EMailStatus {
|
|
9
8
|
/** The time the email entry was inserted into the DB */
|
|
@@ -45,6 +44,6 @@ export declare type EMail = {
|
|
|
45
44
|
params: EMailParameters;
|
|
46
45
|
} & EMailStatus;
|
|
47
46
|
export declare namespace EMail {
|
|
48
|
-
const create: (ts:
|
|
47
|
+
const create: (ts: Omit<EMail, "uid">) => EMail;
|
|
49
48
|
}
|
|
50
49
|
//# sourceMappingURL=email-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-protocol.d.ts","sourceRoot":"","sources":["../src/email-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"email-protocol.d.ts","sourceRoot":"","sources":["../src/email-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,oBAAY,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEnE,MAAM,WAAW,WAAW;IACxB,wDAAwD;IACxD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,yBAAiB,WAAW,CAAC;IACzB,SAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAKxD;CACJ;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC5B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,aAAa,EAAE,MAAM,GAAG,YAAY,CAAC;IACrC,0BAA0B;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACvC,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,cAAc,EAAE,EAAE,CAAC;CACtB;AAED,oBAAY,KAAK,GAAG;IAChB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,MAAM,EAAE,eAAe,CAAC;CAC3B,GAAG,WAAW,CAAC;AAEhB,yBAAiB,KAAK,CAAC;IACZ,MAAM,MAAM,OAAQ,KAAK,KAAK,EAAE,KAAK,CAAC,KAAG,KAI/C,CAAC;CACL"}
|
package/lib/email-protocol.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.EMail = exports.EMailStatus = void 0;
|
|
9
|
-
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
10
|
var EMailStatus;
|
|
11
11
|
(function (EMailStatus) {
|
|
12
12
|
function getState(status) {
|
|
@@ -19,9 +19,9 @@ var EMailStatus;
|
|
|
19
19
|
})(EMailStatus = exports.EMailStatus || (exports.EMailStatus = {}));
|
|
20
20
|
var EMail;
|
|
21
21
|
(function (EMail) {
|
|
22
|
-
EMail.create =
|
|
23
|
-
|
|
24
|
-
withId.uid =
|
|
22
|
+
EMail.create = (ts) => {
|
|
23
|
+
const withId = ts;
|
|
24
|
+
withId.uid = (0, uuid_1.v4)();
|
|
25
25
|
return withId;
|
|
26
26
|
};
|
|
27
27
|
})(EMail = exports.EMail || (exports.EMail = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-protocol.js","sourceRoot":"","sources":["../src/email-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"email-protocol.js","sourceRoot":"","sources":["../src/email-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,+BAAoC;AAYpC,IAAiB,WAAW,CAO3B;AAPD,WAAiB,WAAW;IACxB,SAAgB,QAAQ,CAAC,MAAmB;QACxC,IAAI,MAAM,CAAC,qBAAqB,EAAE;YAC9B,OAAO,mBAAmB,CAAC;SAC9B;QACD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IALe,oBAAQ,WAKvB,CAAA;AACL,CAAC,EAPgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAO3B;AAiCD,IAAiB,KAAK,CAMrB;AAND,WAAiB,KAAK;IACL,YAAM,GAAG,CAAC,EAAsB,EAAS,EAAE;QACpD,MAAM,MAAM,GAAG,EAAW,CAAC;QAC3B,MAAM,CAAC,GAAG,GAAG,IAAA,SAAM,GAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC,EANgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAMrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-module.d.ts","sourceRoot":"","sources":["../../src/encryption/container-module.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvC;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"container-module.d.ts","sourceRoot":"","sources":["../../src/encryption/container-module.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvC;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,uBAKzC,CAAC"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.encryptionModule = void 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const key_provider_1 = require("./key-provider");
|
|
10
|
+
const encryption_engine_1 = require("./encryption-engine");
|
|
11
|
+
const encryption_service_1 = require("./encryption-service");
|
|
12
12
|
/**
|
|
13
13
|
* User have to provide a binding for KeyProviderConfig!!!
|
|
14
14
|
* Example:
|
|
@@ -19,9 +19,10 @@ var encryption_service_1 = require("./encryption-service");
|
|
|
19
19
|
* };
|
|
20
20
|
* }).inSingletonScope();
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
const encryptionModule = (bind) => {
|
|
23
23
|
bind(key_provider_1.KeyProvider).to(key_provider_1.KeyProviderImpl).inSingletonScope();
|
|
24
24
|
bind(encryption_engine_1.EncryptionEngine).to(encryption_engine_1.EncryptionEngineImpl).inSingletonScope();
|
|
25
25
|
bind(encryption_service_1.EncryptionService).to(encryption_service_1.EncryptionServiceImpl).inSingletonScope();
|
|
26
26
|
};
|
|
27
|
+
exports.encryptionModule = encryptionModule;
|
|
27
28
|
//# sourceMappingURL=container-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-module.js","sourceRoot":"","sources":["../../src/encryption/container-module.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH
|
|
1
|
+
{"version":3,"file":"container-module.js","sourceRoot":"","sources":["../../src/encryption/container-module.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,iDAA8D;AAC9D,2DAA6E;AAC7E,6DAAgF;AAEhF;;;;;;;;;GASG;AACI,MAAM,gBAAgB,GAAuC,CAAC,IAAI,EAAE,EAAE;IACzE,IAAI,CAAC,0BAAW,CAAC,CAAC,EAAE,CAAC,8BAAe,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEzD,IAAI,CAAC,oCAAgB,CAAC,CAAC,EAAE,CAAC,wCAAoB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACnE,IAAI,CAAC,sCAAiB,CAAC,CAAC,EAAE,CAAC,0CAAqB,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACzE,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-engine.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAKH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"encryption-engine.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAKH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC1B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;IAClD,OAAO,CAAC,aAAa,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9D;AAED;;;;;GAKG;AACH,qBACa,oBAAoB;IAC7B,QAAQ,CAAC,SAAS,iBAAiB;IACnC,QAAQ,CAAC,GAAG,YAAY;IAExB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa;IAajD,OAAO,CAAC,aAAa,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;CAM7D"}
|
|
@@ -12,42 +12,41 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.EncryptionEngineImpl = exports.EncryptionEngine = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.EncryptionEngine = Symbol(
|
|
15
|
+
const crypto = require("crypto");
|
|
16
|
+
const inversify_1 = require("inversify");
|
|
17
|
+
exports.EncryptionEngine = Symbol("EncryptionEngine");
|
|
18
18
|
/**
|
|
19
19
|
* For starters, let's use aes-cbc-256 with:
|
|
20
20
|
* - 16 bytes/128 bits IV (the size of an aes-256-cbc block)
|
|
21
21
|
* - no salt, as we pass in a real key (no salting needed to turn a password into a key)
|
|
22
22
|
* The implementation closely follows the exampes in https://nodejs.org/api/crypto.html.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.algorithm =
|
|
27
|
-
this.enc =
|
|
24
|
+
let EncryptionEngineImpl = class EncryptionEngineImpl {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.algorithm = "aes-256-cbc";
|
|
27
|
+
this.enc = "base64";
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
encrypt(data, key) {
|
|
30
|
+
const iv = crypto.randomBytes(16);
|
|
31
|
+
const cipher = crypto.createCipheriv(this.algorithm, key, iv);
|
|
32
|
+
const encrypted = cipher.update(new Buffer(data, "utf8"));
|
|
33
|
+
const finalEncrypted = Buffer.concat([encrypted, cipher.final()]);
|
|
34
34
|
return {
|
|
35
35
|
data: finalEncrypted.toString(this.enc),
|
|
36
36
|
keyParams: {
|
|
37
|
-
iv: iv.toString(this.enc)
|
|
38
|
-
}
|
|
37
|
+
iv: iv.toString(this.enc),
|
|
38
|
+
},
|
|
39
39
|
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return finalDecrypted.toString(
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}());
|
|
40
|
+
}
|
|
41
|
+
decrypt(encryptedData, key) {
|
|
42
|
+
const decipher = crypto.createDecipheriv(this.algorithm, key, new Buffer(encryptedData.keyParams.iv, this.enc));
|
|
43
|
+
let decrypted = decipher.update(new Buffer(encryptedData.data, this.enc));
|
|
44
|
+
const finalDecrypted = Buffer.concat([decrypted, decipher.final()]);
|
|
45
|
+
return finalDecrypted.toString("utf8");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
EncryptionEngineImpl = __decorate([
|
|
49
|
+
(0, inversify_1.injectable)()
|
|
50
|
+
], EncryptionEngineImpl);
|
|
52
51
|
exports.EncryptionEngineImpl = EncryptionEngineImpl;
|
|
53
52
|
//# sourceMappingURL=encryption-engine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-engine.js","sourceRoot":"","sources":["../../src/encryption/encryption-engine.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;AAEH
|
|
1
|
+
{"version":3,"file":"encryption-engine.js","sourceRoot":"","sources":["../../src/encryption/encryption-engine.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;AAEH,iCAAiC;AACjC,yCAAuC;AAY1B,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAS3D;;;;;GAKG;AAEH,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAAjC;QACa,cAAS,GAAG,aAAa,CAAC;QAC1B,QAAG,GAAG,QAAQ,CAAC;IAqB5B,CAAC;IAnBG,OAAO,CAAC,IAAY,EAAE,GAAW;QAC7B,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC9D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAC1D,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClE,OAAO;YACH,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;YACvC,SAAS,EAAE;gBACP,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;aAC5B;SACJ,CAAC;IACN,CAAC;IAED,OAAO,CAAC,aAA4B,EAAE,GAAW;QAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAChH,IAAI,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1E,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACpE,OAAO,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACJ,CAAA;AAvBY,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAuBhC;AAvBY,oDAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-engine.spec.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-engine.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,
|
|
1
|
+
{"version":3,"file":"encryption-engine.spec.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-engine.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,cACM,wBAAwB;IAE1B,SAAS,KAAK,OAAO,WAIpB;IAEK,aAAa;CAWtB;AACD,eAAO,MAAM,CAAC,0BAAiC,CAAC"}
|
|
@@ -15,45 +15,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.t = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const mocha_typescript_1 = require("mocha-typescript");
|
|
19
|
+
const chai = require("chai");
|
|
20
|
+
const path = require("path");
|
|
21
|
+
const fs = require("fs");
|
|
22
|
+
const encryption_engine_1 = require("./encryption-engine");
|
|
23
|
+
const expect = chai.expect;
|
|
24
|
+
let TestEncryptionEngineImpl = class TestEncryptionEngineImpl {
|
|
25
|
+
// Created with openssl rand -rand /dev/urandom -out key -base64 32
|
|
26
|
+
get testkey() {
|
|
27
|
+
const keyFilePath = path.resolve(__dirname, "../../test/fixtures/encryption/testkey");
|
|
28
|
+
const keyBuffer = fs.readFileSync(keyFilePath);
|
|
29
|
+
return keyBuffer.toString().trim();
|
|
26
30
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return keyBuffer.toString().trim();
|
|
33
|
-
},
|
|
34
|
-
enumerable: false,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
;
|
|
38
|
-
TestEncryptionEngineImpl.prototype.basicSymmetry = function () {
|
|
39
|
-
var plaintext = "12345678901234567890";
|
|
40
|
-
var key = new Buffer(this.testkey, 'base64');
|
|
41
|
-
var cut = new encryption_engine_1.EncryptionEngineImpl();
|
|
42
|
-
var encryptedData = cut.encrypt(plaintext, key);
|
|
31
|
+
basicSymmetry() {
|
|
32
|
+
const plaintext = "12345678901234567890";
|
|
33
|
+
const key = new Buffer(this.testkey, "base64");
|
|
34
|
+
const cut = new encryption_engine_1.EncryptionEngineImpl();
|
|
35
|
+
const encryptedData = cut.encrypt(plaintext, key);
|
|
43
36
|
expect(encryptedData).to.be.not.undefined;
|
|
44
|
-
|
|
37
|
+
const decryptedPlaintext = cut.decrypt(encryptedData, key);
|
|
45
38
|
expect(decryptedPlaintext).equals(plaintext);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}());
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
mocha_typescript_1.test,
|
|
43
|
+
__metadata("design:type", Function),
|
|
44
|
+
__metadata("design:paramtypes", []),
|
|
45
|
+
__metadata("design:returntype", void 0)
|
|
46
|
+
], TestEncryptionEngineImpl.prototype, "basicSymmetry", null);
|
|
47
|
+
TestEncryptionEngineImpl = __decorate([
|
|
48
|
+
mocha_typescript_1.suite
|
|
49
|
+
], TestEncryptionEngineImpl);
|
|
58
50
|
exports.t = new TestEncryptionEngineImpl();
|
|
59
51
|
//# sourceMappingURL=encryption-engine.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-engine.spec.js","sourceRoot":"","sources":["../../src/encryption/encryption-engine.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"encryption-engine.spec.js","sourceRoot":"","sources":["../../src/encryption/encryption-engine.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,uDAA+C;AAC/C,6BAA6B;AAC7B,6BAA6B;AAC7B,yBAAyB;AAEzB,2DAA2D;AAE3D,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAG3B,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC1B,mEAAmE;IACnE,IAAc,OAAO;QACjB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC;QACtF,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAEK,aAAa;QACf,MAAM,SAAS,GAAG,sBAAsB,CAAC;QACzC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAE/C,MAAM,GAAG,GAAG,IAAI,wCAAoB,EAAE,CAAC;QACvC,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAClD,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC;QAE1C,MAAM,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;QAC3D,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AAXS;IAAL,uBAAI;;;;6DAUJ;AAlBC,wBAAwB;IAD7B,wBAAK;GACA,wBAAwB,CAmB7B;AACY,QAAA,CAAC,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-service.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"encryption-service.d.ts","sourceRoot":"","sources":["../../src/encryption/encryption-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,WAAW,SAAS,CAAC,EAAE,CAAE,SAAQ,aAAa;IAChD,WAAW,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,qBACa,qBAAsB,YAAW,iBAAiB;IACjC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACjD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAEjE,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAWjC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;IAMtC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAItC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAG5C"}
|