@gitpod/gitpod-protocol 0.1.5-private-repos-after-cancellation.0 → 0.1.5-protected-secrets.0
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 +145 -7
- package/lib/accounting-protocol.d.ts +18 -12
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +43 -42
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +28 -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 +12 -2
- package/lib/analytics.d.ts.map +1 -1
- package/lib/analytics.js.map +1 -1
- package/lib/attribution.d.ts +23 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +50 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts.map +1 -1
- package/lib/billing-mode.d.ts +43 -0
- package/lib/billing-mode.d.ts.map +1 -0
- package/lib/billing-mode.js +44 -0
- package/lib/billing-mode.js.map +1 -0
- package/lib/blocked-repositories-protocol.d.ts +13 -0
- package/lib/blocked-repositories-protocol.d.ts.map +1 -0
- package/lib/blocked-repositories-protocol.js +8 -0
- package/lib/blocked-repositories-protocol.js.map +1 -0
- package/lib/context-url.d.ts +18 -5
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +63 -10
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +2 -0
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +81 -48
- package/lib/context-url.spec.js.map +1 -1
- package/lib/encryption/container-module.d.ts.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.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/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +10 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +36 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +51 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +22 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +10 -0
- package/lib/experiments/types.js.map +1 -0
- 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 +127 -52
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +190 -315
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +3 -13
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +3 -8
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +1 -1
- package/lib/ide-protocol.d.ts +113 -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 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +30 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +31 -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 +3 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +173 -36
- 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 +19 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +82 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +10 -2
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +20 -4
- 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.map +1 -1
- package/lib/payment-protocol.js +1 -1
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +9 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +39 -31
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +5 -4
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +229 -209
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +234 -143
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +339 -193
- package/lib/protocol.js.map +1 -1
- package/{src/util/without.ts → lib/protocol.spec.d.ts} +2 -3
- package/lib/protocol.spec.d.ts.map +1 -0
- package/lib/protocol.spec.js +127 -0
- package/lib/protocol.spec.js.map +1 -0
- 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/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
- 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 +22 -4
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +33 -18
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +130 -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/usage.d.ts +61 -0
- package/lib/usage.d.ts.map +1 -0
- package/lib/usage.js +14 -0
- package/lib/usage.js.map +1 -0
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +44 -26
- package/lib/util/analytics.js.map +1 -1
- 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/debug-app.d.ts +25 -0
- package/lib/util/debug-app.d.ts.map +1 -0
- package/lib/util/debug-app.js +100 -0
- package/lib/util/debug-app.js.map +1 -0
- 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 +32 -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 -504
- 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 +4 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +124 -114
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +97 -135
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +34 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +90 -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 +132 -129
- package/lib/util/logging.js.map +1 -1
- package/lib/util/logging.spec.d.ts +7 -0
- package/lib/util/logging.spec.d.ts.map +1 -0
- package/lib/util/logging.spec.js +52 -0
- package/lib/util/logging.spec.js.map +1 -0
- package/lib/util/make-link.js +5 -5
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/nice-grpc.d.ts +9 -0
- package/lib/util/nice-grpc.d.ts.map +1 -0
- package/lib/util/nice-grpc.js +119 -0
- package/lib/util/nice-grpc.js.map +1 -0
- 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 +30 -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 +2 -0
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +29 -17
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +2 -0
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +54 -23
- 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 +9 -12
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/webhook-event.d.ts +44 -0
- package/lib/webhook-event.d.ts.map +1 -0
- package/lib/webhook-event.js +8 -0
- package/lib/webhook-event.js.map +1 -0
- package/lib/workspace-class.d.ts +14 -0
- package/lib/workspace-class.d.ts.map +1 -0
- package/lib/workspace-class.js +8 -0
- package/lib/workspace-class.js.map +1 -0
- package/lib/workspace-cluster.d.ts +15 -5
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +19 -4
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +44 -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 +34 -15
- package/pkg-yarn.lock +21 -9
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +66 -54
- package/src/admin-protocol.ts +53 -21
- package/src/analytics.ts +28 -16
- package/src/attribution.ts +59 -0
- package/src/auth.ts +2 -2
- package/src/billing-mode.ts +81 -0
- package/src/blocked-repositories-protocol.ts +13 -0
- package/src/context-url.spec.ts +37 -9
- package/src/context-url.ts +94 -36
- package/src/encryption/container-module.ts +2 -3
- package/src/encryption/encryption-engine.spec.ts +9 -8
- package/src/encryption/encryption-engine.ts +20 -16
- package/src/encryption/encryption-service.ts +4 -5
- package/src/encryption/key-provider.ts +16 -19
- package/src/env.ts +0 -22
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +41 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +286 -143
- package/src/headless-workspace-log.ts +8 -19
- package/src/ide-frontend-service.ts +2 -2
- package/src/ide-protocol.ts +129 -0
- package/src/index.ts +16 -12
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +12 -6
- package/src/messaging/browser/connection.ts +185 -21
- package/src/messaging/browser/window-connection.ts +39 -29
- package/src/messaging/client-call-metrics.ts +77 -0
- package/src/messaging/error.ts +29 -7
- 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 +2 -2
- package/src/permission.ts +40 -33
- package/src/plans.ts +240 -189
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +612 -340
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +59 -23
- package/src/teams-projects-protocol.ts +166 -0
- package/src/typings/globals.ts +4 -4
- package/src/usage.ts +71 -0
- package/src/util/analytics.ts +56 -18
- 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/debug-app.ts +81 -0
- 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 +14 -6
- package/src/util/generate-workspace-id.spec.ts +34 -7
- package/src/util/generate-workspace-id.ts +464 -440
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +40 -13
- package/src/util/gitpod-host-url.ts +61 -37
- package/src/util/grpc.ts +104 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +156 -74
- package/src/util/make-link.ts +6 -7
- package/src/util/nice-grpc.ts +93 -0
- 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 +27 -25
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +4 -6
- package/src/util/skip-if.ts +9 -6
- package/src/util/timeutil.spec.ts +40 -14
- package/src/util/timeutil.ts +27 -11
- 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/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +29 -10
- package/src/workspace-instance.ts +89 -24
- package/src/wsready.ts +3 -3
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/email-protocol.d.ts +0 -50
- package/lib/email-protocol.d.ts.map +0 -1
- package/lib/email-protocol.js +0 -28
- package/lib/email-protocol.js.map +0 -1
- 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/email-protocol.ts +0 -67
- 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/analytics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAE3D,aAAK,QAAQ,GACP;IAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAC1D;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEjE,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,oBAAY,eAAe,GAAG,OAAO,GACjC,QAAQ,GAAG;IACP,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEN,oBAAY,YAAY,GAAG,OAAO,GAC9B,QAAQ,GAAG;IACP,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEN,oBAAY,WAAW,GAAG,OAAO,GAC7B,QAAQ,GAAG;IACP,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEN,oBAAY,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;AAC5E,oBAAY,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,QAAQ,CAAC,GAAG;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;AAElF,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CAAC;IAErC,KAAK,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;IAE/B,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC"}
|
package/lib/analytics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 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 { User } from "./protocol";
|
|
7
|
+
import { Team } from "./teams-projects-protocol";
|
|
8
|
+
export declare type AttributionId = UserAttributionId | TeamAttributionId;
|
|
9
|
+
export declare type AttributionTarget = "user" | "team";
|
|
10
|
+
export interface UserAttributionId {
|
|
11
|
+
kind: "user";
|
|
12
|
+
userId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TeamAttributionId {
|
|
15
|
+
kind: "team";
|
|
16
|
+
teamId: string;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace AttributionId {
|
|
19
|
+
function create(userOrTeam: User | Team): AttributionId;
|
|
20
|
+
function parse(s: string): UserAttributionId | TeamAttributionId | undefined;
|
|
21
|
+
function render(id: AttributionId): string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,oBAAY,aAAa,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAClE,oBAAY,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,aAAa,CAAC;IAG3B,SAAgB,MAAM,CAAC,UAAU,EAAE,IAAI,GAAG,IAAI,GAAG,aAAa,CAM7D;IAED,SAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,SAAS,CAgBlF;IAED,SAAgB,MAAM,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,CAOhD;CACJ"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2022 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.AttributionId = void 0;
|
|
9
|
+
const protocol_1 = require("./protocol");
|
|
10
|
+
var AttributionId;
|
|
11
|
+
(function (AttributionId) {
|
|
12
|
+
const SEPARATOR = ":";
|
|
13
|
+
function create(userOrTeam) {
|
|
14
|
+
if (protocol_1.User.is(userOrTeam)) {
|
|
15
|
+
return { kind: "user", userId: userOrTeam.id };
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return { kind: "team", teamId: userOrTeam.id };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
AttributionId.create = create;
|
|
22
|
+
function parse(s) {
|
|
23
|
+
if (!s) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const parts = s.split(":");
|
|
27
|
+
if (parts.length !== 2) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
switch (parts[0]) {
|
|
31
|
+
case "user":
|
|
32
|
+
return { kind: "user", userId: parts[1] };
|
|
33
|
+
case "team":
|
|
34
|
+
return { kind: "team", teamId: parts[1] };
|
|
35
|
+
default:
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
AttributionId.parse = parse;
|
|
40
|
+
function render(id) {
|
|
41
|
+
switch (id.kind) {
|
|
42
|
+
case "user":
|
|
43
|
+
return `user${SEPARATOR}${id.userId}`;
|
|
44
|
+
case "team":
|
|
45
|
+
return `team${SEPARATOR}${id.teamId}`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
AttributionId.render = render;
|
|
49
|
+
})(AttributionId = exports.AttributionId || (exports.AttributionId = {}));
|
|
50
|
+
//# sourceMappingURL=attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AO,SAAS,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;SAC7C;IACL,CAAC;IAPe,oBAAM,SAOrB,CAAA;AACL,CAAC,EArCgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAqC7B"}
|
package/lib/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,SAAS,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,SAAS,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACL;AACD,yBAAiB,oBAAoB,CAAC;IAClC,SAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,oBAAoB,CAE1D;CACJ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 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
|
+
* BillingMode is used to answer the following questions:
|
|
8
|
+
* - Should UI piece x be displayed for this user/team? (getBillingModeForUser/Team)
|
|
9
|
+
* - What model should be used to limit this workspace's capabilities (mayStartWorkspace, setTimeout, workspace class, etc...) (getBillingMode(workspaceInstance.attributionId))
|
|
10
|
+
* - How is a workspace session charged for? (getBillingMode(workspaceInstance.attributionId))
|
|
11
|
+
*/
|
|
12
|
+
export declare type BillingMode = None | Chargebee | UsageBased;
|
|
13
|
+
export declare namespace BillingMode {
|
|
14
|
+
const NONE: None;
|
|
15
|
+
/** Incl. upgrade and status */
|
|
16
|
+
function showUsageBasedBilling(billingMode?: BillingMode): boolean;
|
|
17
|
+
function showTeamSubscriptionUI(billingMode?: BillingMode): boolean;
|
|
18
|
+
function canSetWorkspaceClass(billingMode?: BillingMode): boolean;
|
|
19
|
+
function canSetCostCenter(billingMode: BillingMode): boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Payment is disabled */
|
|
22
|
+
interface None {
|
|
23
|
+
mode: "none";
|
|
24
|
+
}
|
|
25
|
+
/** Sessions is handled with old subscription logic based on Chargebee */
|
|
26
|
+
interface Chargebee {
|
|
27
|
+
mode: "chargebee";
|
|
28
|
+
/** True iff this is a team, and is based on a paid plan. Currently only set for teams! */
|
|
29
|
+
paid?: boolean;
|
|
30
|
+
canUpgradeToUBB?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Session is handld with new usage-based logic */
|
|
33
|
+
interface UsageBased {
|
|
34
|
+
mode: "usage-based";
|
|
35
|
+
/** True iff this is a team, and is based on a paid plan. Currently only set for teams! */
|
|
36
|
+
paid?: boolean;
|
|
37
|
+
/** User is already converted, but is member with at least one Chargebee-based "Team Plan" */
|
|
38
|
+
hasChargebeeTeamPlan?: boolean;
|
|
39
|
+
/** User is already converted, but is member or owner in at least one Chargebee-based "Team Subscription" */
|
|
40
|
+
hasChargebeeTeamSubscription?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=billing-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-mode.d.ts","sourceRoot":"","sources":["../src/billing-mode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,oBAAY,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;AACxD,yBAAiB,WAAW,CAAC;IAClB,MAAM,IAAI,EAAE,IAElB,CAAC;IAEF,+BAA+B;IAC/B,SAAgB,qBAAqB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAOxE;IAED,SAAgB,sBAAsB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAQzE;IAED,SAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAOvE;IAED,SAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGlE;CACJ;AAED,0BAA0B;AAC1B,UAAU,IAAI;IACV,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,yEAAyE;AACzE,UAAU,SAAS;IACf,IAAI,EAAE,WAAW,CAAC;IAElB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,mDAAmD;AACnD,UAAU,UAAU;IAChB,IAAI,EAAE,aAAa,CAAC;IAEpB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,6FAA6F;IAC7F,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,4GAA4G;IAC5G,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2022 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.BillingMode = void 0;
|
|
9
|
+
var BillingMode;
|
|
10
|
+
(function (BillingMode) {
|
|
11
|
+
BillingMode.NONE = {
|
|
12
|
+
mode: "none",
|
|
13
|
+
};
|
|
14
|
+
/** Incl. upgrade and status */
|
|
15
|
+
function showUsageBasedBilling(billingMode) {
|
|
16
|
+
if (!billingMode) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return (billingMode.mode === "usage-based" || (billingMode.mode === "chargebee" && !!billingMode.canUpgradeToUBB));
|
|
20
|
+
}
|
|
21
|
+
BillingMode.showUsageBasedBilling = showUsageBasedBilling;
|
|
22
|
+
function showTeamSubscriptionUI(billingMode) {
|
|
23
|
+
if (!billingMode) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return (billingMode.mode === "chargebee" ||
|
|
27
|
+
(billingMode.mode === "usage-based" && !!billingMode.hasChargebeeTeamSubscription));
|
|
28
|
+
}
|
|
29
|
+
BillingMode.showTeamSubscriptionUI = showTeamSubscriptionUI;
|
|
30
|
+
function canSetWorkspaceClass(billingMode) {
|
|
31
|
+
if (!billingMode) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
// if has any Stripe subscription, either directly or per team
|
|
35
|
+
return billingMode.mode === "usage-based";
|
|
36
|
+
}
|
|
37
|
+
BillingMode.canSetWorkspaceClass = canSetWorkspaceClass;
|
|
38
|
+
function canSetCostCenter(billingMode) {
|
|
39
|
+
// if has any Stripe Subscription, either directly or per team
|
|
40
|
+
return billingMode.mode === "usage-based";
|
|
41
|
+
}
|
|
42
|
+
BillingMode.canSetCostCenter = canSetCostCenter;
|
|
43
|
+
})(BillingMode = exports.BillingMode || (exports.BillingMode = {}));
|
|
44
|
+
//# sourceMappingURL=billing-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-mode.js","sourceRoot":"","sources":["../src/billing-mode.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AASH,IAAiB,WAAW,CAsC3B;AAtCD,WAAiB,WAAW;IACX,gBAAI,GAAS;QACtB,IAAI,EAAE,MAAM;KACf,CAAC;IAEF,+BAA+B;IAC/B,SAAgB,qBAAqB,CAAC,WAAyB;QAC3D,IAAI,CAAC,WAAW,EAAE;YACd,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,CACH,WAAW,CAAC,IAAI,KAAK,aAAa,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAC5G,CAAC;IACN,CAAC;IAPe,iCAAqB,wBAOpC,CAAA;IAED,SAAgB,sBAAsB,CAAC,WAAyB;QAC5D,IAAI,CAAC,WAAW,EAAE;YACd,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,CACH,WAAW,CAAC,IAAI,KAAK,WAAW;YAChC,CAAC,WAAW,CAAC,IAAI,KAAK,aAAa,IAAI,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CACrF,CAAC;IACN,CAAC;IARe,kCAAsB,yBAQrC,CAAA;IAED,SAAgB,oBAAoB,CAAC,WAAyB;QAC1D,IAAI,CAAC,WAAW,EAAE;YACd,OAAO,KAAK,CAAC;SAChB;QAED,8DAA8D;QAC9D,OAAO,WAAW,CAAC,IAAI,KAAK,aAAa,CAAC;IAC9C,CAAC;IAPe,gCAAoB,uBAOnC,CAAA;IAED,SAAgB,gBAAgB,CAAC,WAAwB;QACrD,8DAA8D;QAC9D,OAAO,WAAW,CAAC,IAAI,KAAK,aAAa,CAAC;IAC9C,CAAC;IAHe,4BAAgB,mBAG/B,CAAA;AACL,CAAC,EAtCgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAsC3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 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 interface BlockedRepository {
|
|
7
|
+
id: number;
|
|
8
|
+
urlRegexp: string;
|
|
9
|
+
blockUser: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=blocked-repositories-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocked-repositories-protocol.d.ts","sourceRoot":"","sources":["../src/blocked-repositories-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
4
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
+
* See License-AGPL.txt in the project root for license information.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=blocked-repositories-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocked-repositories-protocol.js","sourceRoot":"","sources":["../src/blocked-repositories-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
package/lib/context-url.d.ts
CHANGED
|
@@ -3,16 +3,29 @@
|
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
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
|
+
*/
|
|
6
15
|
export declare namespace ContextURL {
|
|
7
16
|
const INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
|
|
8
17
|
const PREBUILD_PREFIX = "prebuild";
|
|
9
18
|
const IMAGEBUILD_PREFIX = "imagebuild";
|
|
19
|
+
const SNAPSHOT_PREFIX = "snapshot";
|
|
20
|
+
const REFERRER_PREFIX = "referrer:";
|
|
10
21
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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
|
|
15
28
|
*/
|
|
16
|
-
function
|
|
29
|
+
function getNormalizedURL(ws: Pick<Workspace, "context" | "contextURL"> | undefined): URL | undefined;
|
|
17
30
|
}
|
|
18
31
|
//# sourceMappingURL=context-url.d.ts.map
|
package/lib/context-url.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.d.ts","sourceRoot":"","sources":["../src/context-url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,yBAAiB,UAAU,CAAC;
|
|
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"}
|
package/lib/context-url.js
CHANGED
|
@@ -6,36 +6,90 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
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
|
+
*/
|
|
9
17
|
var ContextURL;
|
|
10
18
|
(function (ContextURL) {
|
|
11
19
|
ContextURL.INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
|
|
12
20
|
ContextURL.PREBUILD_PREFIX = "prebuild";
|
|
13
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.debug(`unable to parse URL from normalized contextURL: '${normalized}'`);
|
|
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
|
+
}
|
|
14
63
|
/**
|
|
15
64
|
* The field "contextUrl" might contain prefixes like:
|
|
16
65
|
* - envvar1=value1/...
|
|
17
66
|
* - prebuild/...
|
|
18
67
|
* This is the analogon to the (Prefix)ContextParser structure in "server".
|
|
19
68
|
*/
|
|
20
|
-
function
|
|
69
|
+
function removePrefixes(contextUrl) {
|
|
21
70
|
if (contextUrl === undefined) {
|
|
22
71
|
return undefined;
|
|
23
72
|
}
|
|
24
|
-
|
|
73
|
+
const segments = contextUrl.split("/");
|
|
25
74
|
if (segments.length === 1) {
|
|
26
|
-
return
|
|
75
|
+
return segments[0]; // this might be something, we just try
|
|
27
76
|
}
|
|
28
|
-
|
|
29
|
-
|
|
77
|
+
const segmentsToURL = (offset) => {
|
|
78
|
+
let rest = segments.slice(offset).join("/");
|
|
79
|
+
if (/^git@[^:\/]+:/.test(rest)) {
|
|
80
|
+
rest = rest.replace(/^git@([^:\/]+):/, "https://$1/");
|
|
81
|
+
}
|
|
30
82
|
if (!rest.startsWith("http")) {
|
|
31
|
-
rest =
|
|
83
|
+
rest = "https://" + rest;
|
|
32
84
|
}
|
|
33
|
-
return
|
|
85
|
+
return rest;
|
|
34
86
|
};
|
|
35
|
-
|
|
87
|
+
const firstSegment = segments[0];
|
|
36
88
|
if (firstSegment === ContextURL.PREBUILD_PREFIX ||
|
|
37
89
|
firstSegment === ContextURL.INCREMENTAL_PREBUILD_PREFIX ||
|
|
38
|
-
firstSegment === ContextURL.IMAGEBUILD_PREFIX
|
|
90
|
+
firstSegment === ContextURL.IMAGEBUILD_PREFIX ||
|
|
91
|
+
firstSegment === ContextURL.SNAPSHOT_PREFIX ||
|
|
92
|
+
firstSegment.startsWith(ContextURL.REFERRER_PREFIX)) {
|
|
39
93
|
return segmentsToURL(1);
|
|
40
94
|
}
|
|
41
95
|
// check for env vars
|
|
@@ -44,6 +98,5 @@ var ContextURL;
|
|
|
44
98
|
}
|
|
45
99
|
return segmentsToURL(0);
|
|
46
100
|
}
|
|
47
|
-
ContextURL.parseToURL = parseToURL;
|
|
48
101
|
})(ContextURL = exports.ContextURL || (exports.ContextURL = {}));
|
|
49
102
|
//# sourceMappingURL=context-url.js.map
|
package/lib/context-url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.js","sourceRoot":"","sources":["../src/context-url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"context-url.js","sourceRoot":"","sources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lTest {
|
|
7
7
|
parseContextUrl_withEnvVar(): void;
|
|
8
8
|
parseContextUrl_withEnvVar_withoutSchema(): void;
|
|
9
|
+
parseContextUrl_withEnvVar_sshUrl(): void;
|
|
9
10
|
parseContextUrl_withPrebuild(): void;
|
|
10
11
|
parseContextUrl_withPrebuild_withoutSchema(): void;
|
|
12
|
+
parseContextUrl_badUrl(): void;
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=context-url.spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.spec.d.ts","sourceRoot":"","sources":["../src/context-url.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
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"}
|
package/lib/context-url.spec.js
CHANGED
|
@@ -15,62 +15,95 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ContextUrlTest = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
});
|
|
27
28
|
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
28
29
|
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
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
|
+
});
|
|
32
36
|
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
33
37
|
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
});
|
|
37
52
|
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
38
53
|
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
});
|
|
42
60
|
expect(actual === null || actual === void 0 ? void 0 : actual.host).to.equal("github.com");
|
|
43
61
|
expect(actual === null || actual === void 0 ? void 0 : actual.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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);
|
|
74
107
|
exports.ContextUrlTest = ContextUrlTest;
|
|
75
108
|
module.exports = new ContextUrlTest();
|
|
76
109
|
//# sourceMappingURL=context-url.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-url.spec.js","sourceRoot":"","sources":["../src/context-url.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,
|
|
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;AAC3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AlDY,wCAAc;AAmD3B,MAAM,CAAC,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -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,7 +19,7 @@ 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();
|
|
@@ -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;CAU7D"}
|