@gitpod/gitpod-protocol 0.1.5-main.648 → 0.1.5-main.6480
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 +157 -29
- package/lib/accounting-protocol.d.ts +19 -14
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +44 -48
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +44 -5
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +16 -1
- 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/attribution.d.ts +24 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +54 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts +1 -1
- package/lib/auth.d.ts.map +1 -1
- package/lib/auth.js +1 -1
- package/lib/billing-mode.d.ts +45 -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 +30 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +100 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +12 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +81 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/encryption/container-module.d.ts +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +5 -5
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +26 -27
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +30 -38
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +31 -45
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +32 -39
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -7
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +8 -28
- 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 +37 -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/frontend-dashboard-service.d.ts +90 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +49 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +27 -43
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +1 -1
- package/lib/gitpod-file-parser.spec.js +146 -143
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +191 -55
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +204 -298
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +10 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +7 -9
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +2 -2
- package/lib/ide-frontend-service.js +1 -1
- package/lib/ide-protocol.d.ts +126 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +18 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +17 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -2
- 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 +8 -1
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +4 -6
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +176 -45
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +5 -5
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +43 -60
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +21 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +95 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +13 -3
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +25 -5
- 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 +1 -1
- package/lib/payment-protocol.d.ts.map +1 -1
- package/lib/payment-protocol.js +2 -2
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +14 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +45 -32
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +6 -5
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +230 -210
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +261 -105
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +346 -205
- package/lib/protocol.js.map +1 -1
- package/{src/util/without.ts → lib/protocol.spec.d.ts} +3 -4
- 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/lib/snapshot-url.spec.d.ts +7 -0
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +24 -5
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +36 -18
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +137 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +41 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +3 -3
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/typings/globals.js +1 -1
- package/lib/usage.d.ts +73 -0
- package/lib/usage.d.ts.map +1 -0
- package/lib/usage.js +20 -0
- package/lib/usage.js.map +1 -0
- 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 +1 -1
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +58 -136
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +18 -60
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +12 -12
- 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/deep-partial.d.ts +1 -1
- package/lib/util/deep-partial.js +1 -1
- package/lib/util/deferred.d.ts +1 -1
- package/lib/util/deferred.js +11 -13
- 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 +2 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +33 -48
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +6 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +469 -502
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.d.ts +1 -1
- package/lib/util/generate-workspace-id.spec.js +69 -79
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +41 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +12 -7
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +132 -110
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +7 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +113 -31
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +35 -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} +2 -2
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +50 -34
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +133 -130
- 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.d.ts +1 -1
- package/lib/util/make-link.js +6 -6
- 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 +121 -0
- package/lib/util/nice-grpc.js.map +1 -0
- package/lib/util/parse-workspace-id.d.ts +11 -1
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +5 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +124 -85
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +17 -56
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +148 -289
- 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 +1 -1
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js +16 -47
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +7 -7
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +3 -1
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +30 -18
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +3 -1
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +55 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +53 -7
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +198 -65
- 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 +8 -8
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +10 -13
- 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 +28 -8
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +20 -5
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +46 -6
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +1 -1
- package/lib/wsready.d.ts +8 -2
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +3 -3
- package/package.json +40 -18
- package/pkg-yarn.lock +23 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +67 -58
- package/src/admin-protocol.ts +88 -20
- package/src/analytics.ts +52 -0
- package/src/attribution.ts +63 -0
- package/src/auth.ts +3 -3
- package/src/billing-mode.ts +84 -0
- package/src/blocked-repositories-protocol.ts +13 -0
- package/src/context-url.spec.ts +49 -0
- package/src/context-url.ts +107 -0
- package/src/encryption/container-module.ts +3 -4
- package/src/encryption/encryption-engine.spec.ts +10 -9
- package/src/encryption/encryption-engine.ts +21 -17
- package/src/encryption/encryption-service.ts +5 -6
- package/src/encryption/key-provider.ts +17 -20
- package/src/env.ts +2 -25
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +42 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/frontend-dashboard-service.ts +125 -0
- package/src/gitpod-file-parser.spec.ts +56 -62
- package/src/gitpod-file-parser.ts +17 -18
- package/src/gitpod-service.ts +369 -146
- package/src/headless-workspace-log.ts +13 -15
- package/src/ide-frontend-service.ts +3 -3
- package/src/ide-protocol.ts +147 -0
- package/src/index.ts +17 -11
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +13 -7
- package/src/messaging/browser/connection.ts +187 -28
- package/src/messaging/browser/window-connection.ts +40 -30
- package/src/messaging/client-call-metrics.ts +94 -0
- package/src/messaging/error.ts +36 -8
- 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 +3 -3
- package/src/permission.ts +47 -34
- package/src/plans.ts +250 -199
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +636 -293
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +62 -23
- package/src/teams-projects-protocol.ts +181 -0
- package/src/typings/globals.ts +6 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +5 -6
- package/src/util/cancelable.ts +4 -4
- package/src/util/date-time.ts +9 -9
- package/src/util/debug-app.ts +81 -0
- package/src/util/deep-partial.ts +1 -1
- package/src/util/deferred.ts +7 -7
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +17 -9
- package/src/util/generate-workspace-id.spec.ts +38 -11
- package/src/util/generate-workspace-id.ts +465 -439
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +59 -8
- package/src/util/gitpod-host-url.ts +88 -48
- package/src/util/grpc.ts +107 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +157 -75
- package/src/util/make-link.ts +7 -8
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +38 -9
- package/src/util/parse-workspace-id.ts +33 -8
- package/src/util/queue.spec.ts +28 -26
- package/src/util/queue.ts +1 -1
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +7 -9
- package/src/util/skip-if.ts +11 -8
- package/src/util/timeutil.spec.ts +41 -15
- package/src/util/timeutil.ts +32 -16
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +201 -32
- package/src/util/workspace-port-authentication.ts +11 -14
- package/src/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +47 -17
- package/src/workspace-instance.ts +106 -32
- package/src/wsready.ts +11 -4
- 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/context-url.d.ts +0 -13
- package/lib/util/context-url.d.ts.map +0 -1
- package/lib/util/context-url.js +0 -26
- package/lib/util/context-url.js.map +0 -1
- package/lib/util/context-url.spec.d.ts +0 -10
- package/lib/util/context-url.spec.d.ts.map +0 -1
- package/lib/util/context-url.spec.js +0 -52
- package/lib/util/context-url.spec.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js +0 -8
- 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/theia-plugins.ts +0 -11
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
package/data/gitpod-schema.json
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://gitpod.io/gitpod
|
|
2
|
+
"$id": "https://gitpod.io/schemas/gitpod-schema.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Gitpod Config",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"ide": {
|
|
8
|
-
"anyOf": [
|
|
9
|
-
{
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "string",
|
|
14
|
-
"enum": [
|
|
15
|
-
"theia",
|
|
16
|
-
"code"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"default": "theia",
|
|
21
|
-
"description": "Controls what ide should be used for a workspace.",
|
|
22
|
-
"deprecationMessage": "The 'ide' property is an experimental feature and enabled only for some users."
|
|
23
|
-
},
|
|
24
7
|
"ports": {
|
|
25
8
|
"type": "array",
|
|
26
9
|
"description": "List of exposed ports.",
|
|
@@ -51,13 +34,12 @@
|
|
|
51
34
|
"private",
|
|
52
35
|
"public"
|
|
53
36
|
],
|
|
54
|
-
"default": "
|
|
55
|
-
"description": "Whether the port visibility should be private or public. '
|
|
37
|
+
"default": "private",
|
|
38
|
+
"description": "Whether the port visibility should be private or public. 'private' (default) will only allow users with workspace access to access the port. 'public' will allow everyone with the port URL to access the port."
|
|
56
39
|
},
|
|
57
40
|
"name": {
|
|
58
41
|
"type": "string",
|
|
59
|
-
"
|
|
60
|
-
"description": "Port name (deprecated)."
|
|
42
|
+
"description": "Port name."
|
|
61
43
|
},
|
|
62
44
|
"protocol": {
|
|
63
45
|
"type": "string",
|
|
@@ -68,6 +50,10 @@
|
|
|
68
50
|
],
|
|
69
51
|
"deprecationMessage": "The 'protocol' property is deprecated.",
|
|
70
52
|
"description": "The protocol to be used. (deprecated)"
|
|
53
|
+
},
|
|
54
|
+
"description": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "A description to identify what is this port used for."
|
|
71
57
|
}
|
|
72
58
|
},
|
|
73
59
|
"additionalProperties": false
|
|
@@ -93,7 +79,8 @@
|
|
|
93
79
|
},
|
|
94
80
|
"prebuild": {
|
|
95
81
|
"type": "string",
|
|
96
|
-
"description": "A shell command to run after `before`. This command is executed only on during workspace prebuilds. This command is expected to terminate. If it fails, the workspace build fails."
|
|
82
|
+
"description": "A shell command to run after `before`. This command is executed only on during workspace prebuilds. This command is expected to terminate. If it fails, the workspace build fails.",
|
|
83
|
+
"deprecationMessage": "Deprecated. Please use `init` task instead. See https://www.gitpod.io/docs/config-start-tasks."
|
|
97
84
|
},
|
|
98
85
|
"command": {
|
|
99
86
|
"type": "string",
|
|
@@ -116,10 +103,8 @@
|
|
|
116
103
|
"openMode": {
|
|
117
104
|
"type": "string",
|
|
118
105
|
"enum": [
|
|
119
|
-
"split-top",
|
|
120
106
|
"split-left",
|
|
121
107
|
"split-right",
|
|
122
|
-
"split-bottom",
|
|
123
108
|
"tab-before",
|
|
124
109
|
"tab-after"
|
|
125
110
|
],
|
|
@@ -151,13 +136,38 @@
|
|
|
151
136
|
},
|
|
152
137
|
"additionalProperties": false
|
|
153
138
|
},
|
|
139
|
+
"additionalRepositories": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"description": "List of additional repositories that are part of this project.",
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": [
|
|
145
|
+
"url"
|
|
146
|
+
],
|
|
147
|
+
"properties": {
|
|
148
|
+
"url": {
|
|
149
|
+
"type": ["string"],
|
|
150
|
+
"description": "The url of the git repository to clone. Supports any context URLs."
|
|
151
|
+
},
|
|
152
|
+
"checkoutLocation": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Path to where the repository should be checked out relative to `/workspace`. Defaults to the simple repository name."
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"additionalProperties": false
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"mainConfiguration": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "The main repository, containing the dev environment configuration."
|
|
163
|
+
},
|
|
154
164
|
"checkoutLocation": {
|
|
155
165
|
"type": "string",
|
|
156
|
-
"description": "Path to where the repository should be checked out."
|
|
166
|
+
"description": "Path to where the repository should be checked out relative to `/workspace`. Defaults to the simple repository name."
|
|
157
167
|
},
|
|
158
168
|
"workspaceLocation": {
|
|
159
169
|
"type": "string",
|
|
160
|
-
"description": "Path to where the IDE's workspace should be opened."
|
|
170
|
+
"description": "Path to where the IDE's workspace should be opened. Supports vscode's `*.code-workspace` files."
|
|
161
171
|
},
|
|
162
172
|
"gitConfig": {
|
|
163
173
|
"type": [
|
|
@@ -199,6 +209,18 @@
|
|
|
199
209
|
"type": "boolean",
|
|
200
210
|
"description": "Add a Review in Gitpod badge to pull requests. Defaults to true."
|
|
201
211
|
},
|
|
212
|
+
"addCheck": {
|
|
213
|
+
"type": [
|
|
214
|
+
"boolean",
|
|
215
|
+
"string"
|
|
216
|
+
],
|
|
217
|
+
"enum": [
|
|
218
|
+
true,
|
|
219
|
+
false,
|
|
220
|
+
"prevent-merge-on-error"
|
|
221
|
+
],
|
|
222
|
+
"description": "Add a commit check to pull requests. Set to 'fail-on-error' if you want broken prebuilds to block merging. Defaults to true."
|
|
223
|
+
},
|
|
202
224
|
"addLabel": {
|
|
203
225
|
"type": [
|
|
204
226
|
"boolean",
|
|
@@ -224,7 +246,113 @@
|
|
|
224
246
|
}
|
|
225
247
|
}
|
|
226
248
|
}
|
|
249
|
+
},
|
|
250
|
+
"jetbrains": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"description": "Configure JetBrains integration",
|
|
253
|
+
"deprecationMessage": "The 'jetbrains' property is experimental.",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"properties": {
|
|
256
|
+
"plugins": {
|
|
257
|
+
"type": "array",
|
|
258
|
+
"description": "List of plugins which should be installed for all JetBrains product for users of this workspace. From the JetBrains Marketplace page, find a page of the required plugin, select 'Versions' tab, click any version to copy pluginId (short name such as org.rust.lang) of the plugin you want to install.",
|
|
259
|
+
"items": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"intellij": {
|
|
264
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
265
|
+
"description": "Configure IntelliJ integration"
|
|
266
|
+
},
|
|
267
|
+
"goland": {
|
|
268
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
269
|
+
"description": "Configure GoLand integration"
|
|
270
|
+
},
|
|
271
|
+
"pycharm": {
|
|
272
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
273
|
+
"description": "Configure PyCharm integration"
|
|
274
|
+
},
|
|
275
|
+
"phpstorm": {
|
|
276
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
277
|
+
"description": "Configure PhpStorm integration"
|
|
278
|
+
},
|
|
279
|
+
"rubymine": {
|
|
280
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
281
|
+
"description": "Configure RubyMine integration"
|
|
282
|
+
},
|
|
283
|
+
"webstorm": {
|
|
284
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
285
|
+
"description": "Configure WebStorm integration"
|
|
286
|
+
},
|
|
287
|
+
"rider": {
|
|
288
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
289
|
+
"description": "Configure Rider integration"
|
|
290
|
+
},
|
|
291
|
+
"clion": {
|
|
292
|
+
"$ref": "#/definitions/jetbrainsProduct",
|
|
293
|
+
"description": "Configure CLion integration"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"experimentalNetwork": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"deprecationMessage": "The 'experimentalNetwork' property is deprecated.",
|
|
300
|
+
"description": "Experimental network configuration in workspaces (deprecated). Enabled by default"
|
|
301
|
+
},
|
|
302
|
+
"coreDump": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"description": "Configure the default action of certain signals is to cause a process to terminate and produce a core dump file, a file containing an image of the process's memory at the time of termination. Disabled by default.",
|
|
305
|
+
"deprecationMessage": "The 'coreDump' property is experimental.",
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"properties": {
|
|
308
|
+
"enabled": {
|
|
309
|
+
"type": "boolean"
|
|
310
|
+
},
|
|
311
|
+
"softLimit": {
|
|
312
|
+
"type": "number",
|
|
313
|
+
"description": "upper limit on the size of the core dump file that will be produced if it receives a core dump signal"
|
|
314
|
+
},
|
|
315
|
+
"hardLimit": {
|
|
316
|
+
"type": "number",
|
|
317
|
+
"description": "the hard limit acts as a ceiling for the soft limit. For more details please check https://man7.org/linux/man-pages/man2/getrlimit.2.html"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
227
320
|
}
|
|
228
321
|
},
|
|
229
|
-
"additionalProperties": false
|
|
230
|
-
|
|
322
|
+
"additionalProperties": false,
|
|
323
|
+
"definitions": {
|
|
324
|
+
"jetbrainsProduct": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"additionalProperties": false,
|
|
327
|
+
"properties": {
|
|
328
|
+
"plugins": {
|
|
329
|
+
"type": "array",
|
|
330
|
+
"description": "List of plugins which should be installed for users of this workspace. From the JetBrains Marketplace page, find a page of the required plugin, select 'Versions' tab, click any version to copy pluginId (short name such as org.rust.lang) of the plugin you want to install.",
|
|
331
|
+
"items": {
|
|
332
|
+
"type": "string"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"prebuilds": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"description": "Enable warming up of JetBrains backend in prebuilds.",
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"properties": {
|
|
340
|
+
"version": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"enum": [
|
|
343
|
+
"stable",
|
|
344
|
+
"latest",
|
|
345
|
+
"both"
|
|
346
|
+
],
|
|
347
|
+
"description": "Whether only stable, latest or both versions should be warmed up. Default is stable only."
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"vmoptions": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Configure JVM options, for instance '-Xmx=4096m'."
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { User } from './protocol';
|
|
6
|
+
import { User } from "./protocol";
|
|
8
7
|
export interface AccountEntry {
|
|
9
8
|
uid: string;
|
|
10
9
|
userId: string;
|
|
@@ -32,20 +31,20 @@ export interface AccountEntry {
|
|
|
32
31
|
description?: object;
|
|
33
32
|
}
|
|
34
33
|
export declare namespace AccountEntry {
|
|
35
|
-
function create<T extends AccountEntry>(entry:
|
|
34
|
+
function create<T extends AccountEntry>(entry: Omit<T, "uid">): T;
|
|
36
35
|
}
|
|
37
|
-
export declare type DebitAccountEntryKind =
|
|
38
|
-
export declare type AccountEntryKind =
|
|
36
|
+
export declare type DebitAccountEntryKind = "session" | "expiry" | "loss";
|
|
37
|
+
export declare type AccountEntryKind = "credit" | DebitAccountEntryKind | "carry" | "open";
|
|
39
38
|
export interface Credit extends AccountEntry {
|
|
40
|
-
kind:
|
|
39
|
+
kind: "credit";
|
|
41
40
|
expiryDate: string;
|
|
42
41
|
}
|
|
43
42
|
export declare type Debit = LossDebit | ExpiryDebit | SessionDebit;
|
|
44
43
|
export interface LossDebit extends AccountEntry {
|
|
45
|
-
kind:
|
|
44
|
+
kind: "loss";
|
|
46
45
|
}
|
|
47
46
|
export interface ExpiryDebit extends AccountEntry {
|
|
48
|
-
kind:
|
|
47
|
+
kind: "expiry";
|
|
49
48
|
creditId: undefined;
|
|
50
49
|
}
|
|
51
50
|
export interface SessionDebit extends AccountEntry {
|
|
@@ -65,7 +64,6 @@ export interface SessionDescription {
|
|
|
65
64
|
contextUrl: string;
|
|
66
65
|
workspaceId: string;
|
|
67
66
|
workspaceInstanceId: string;
|
|
68
|
-
private: boolean;
|
|
69
67
|
}
|
|
70
68
|
export declare namespace SessionDescription {
|
|
71
69
|
function is(obj: any): obj is SessionDescription;
|
|
@@ -93,6 +91,7 @@ export interface Subscription {
|
|
|
93
91
|
paymentReference?: string;
|
|
94
92
|
paymentData?: PaymentData;
|
|
95
93
|
teamSubscriptionSlotId?: string;
|
|
94
|
+
teamMembershipId?: string;
|
|
96
95
|
/** marks the subscription as deleted */
|
|
97
96
|
deleted?: boolean;
|
|
98
97
|
}
|
|
@@ -118,13 +117,19 @@ export interface AssignedTeamSubscription extends Subscription {
|
|
|
118
117
|
export declare namespace AssignedTeamSubscription {
|
|
119
118
|
function is(data: any): data is AssignedTeamSubscription;
|
|
120
119
|
}
|
|
120
|
+
export interface AssignedTeamSubscription2 extends Subscription {
|
|
121
|
+
teamMembershipId: string;
|
|
122
|
+
}
|
|
123
|
+
export declare namespace AssignedTeamSubscription2 {
|
|
124
|
+
function is(data: any): data is AssignedTeamSubscription2;
|
|
125
|
+
}
|
|
121
126
|
export declare namespace Subscription {
|
|
122
|
-
function create(newSubscription:
|
|
127
|
+
function create(newSubscription: Omit<Subscription, "uid">): Subscription;
|
|
123
128
|
function cancelSubscription(s: Subscription, cancellationDate: string, endDate?: string): void;
|
|
124
129
|
function isSame(s1: Subscription | undefined, s2: Subscription | undefined): boolean;
|
|
125
130
|
function isActive(s: Subscription, date: string): boolean;
|
|
131
|
+
function isCancelled(s: Subscription, date: string): boolean;
|
|
126
132
|
function isDowngraded(s: Subscription): string | undefined;
|
|
127
|
-
function isCancelled(s: Subscription): boolean;
|
|
128
133
|
function calculateCurrentPeriod(startDate: string, now: Date): {
|
|
129
134
|
startDate: string;
|
|
130
135
|
endDate: string;
|
|
@@ -136,7 +141,7 @@ export interface Period {
|
|
|
136
141
|
endDate: string;
|
|
137
142
|
}
|
|
138
143
|
export declare type MaybePeriod = Period | undefined;
|
|
139
|
-
export declare type AccountEntryFixedPeriod =
|
|
144
|
+
export declare type AccountEntryFixedPeriod = Omit<AccountEntry, "uid"> & {
|
|
140
145
|
expiryDate: string;
|
|
141
146
|
};
|
|
142
147
|
export interface AccountStatement extends Period {
|
|
@@ -150,7 +155,7 @@ export interface AccountStatement extends Period {
|
|
|
150
155
|
/** Remaining valid hours (accumulated from credits) */
|
|
151
156
|
remainingHours: RemainingHours;
|
|
152
157
|
}
|
|
153
|
-
export declare type RemainingHours = number |
|
|
158
|
+
export declare type RemainingHours = number | "unlimited";
|
|
154
159
|
export interface CreditAlert {
|
|
155
160
|
userId: string;
|
|
156
161
|
remainingUsageHours: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-protocol.d.ts","sourceRoot":"","sources":["../src/accounting-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"accounting-protocol.d.ts","sourceRoot":"","sources":["../src/accounting-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMlC,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAA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SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7C,oBAAY,uBAAuB,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AACzF,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,uDAAuD;IACvD,cAAc,EAAE,cAAc,CAAC;CAClC;AACD,oBAAY,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC;AAElD,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -2,114 +2,110 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
4
4
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Subscription = exports.AssignedTeamSubscription = exports.UserPaidSubscription = exports.SessionDescription = exports.CreditDescription = exports.AccountEntry = void 0;
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
exports.Subscription = exports.AssignedTeamSubscription2 = exports.AssignedTeamSubscription = exports.UserPaidSubscription = exports.SessionDescription = exports.CreditDescription = exports.AccountEntry = void 0;
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
const timeutil_1 = require("./util/timeutil");
|
|
11
11
|
var AccountEntry;
|
|
12
12
|
(function (AccountEntry) {
|
|
13
13
|
function create(entry) {
|
|
14
|
-
|
|
15
|
-
result.uid =
|
|
14
|
+
const result = entry;
|
|
15
|
+
result.uid = (0, uuid_1.v4)();
|
|
16
16
|
return result;
|
|
17
17
|
}
|
|
18
18
|
AccountEntry.create = create;
|
|
19
|
-
;
|
|
20
19
|
})(AccountEntry = exports.AccountEntry || (exports.AccountEntry = {}));
|
|
21
20
|
var CreditDescription;
|
|
22
21
|
(function (CreditDescription) {
|
|
23
22
|
function is(obj) {
|
|
24
|
-
return !!obj
|
|
25
|
-
&& obj.hasOwnProperty('subscriptionId')
|
|
26
|
-
&& obj.hasOwnProperty('planId');
|
|
23
|
+
return !!obj && obj.hasOwnProperty("subscriptionId") && obj.hasOwnProperty("planId");
|
|
27
24
|
}
|
|
28
25
|
CreditDescription.is = is;
|
|
29
26
|
})(CreditDescription = exports.CreditDescription || (exports.CreditDescription = {}));
|
|
30
27
|
var SessionDescription;
|
|
31
28
|
(function (SessionDescription) {
|
|
32
29
|
function is(obj) {
|
|
33
|
-
return !!obj
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
&& obj.hasOwnProperty('private');
|
|
30
|
+
return (!!obj &&
|
|
31
|
+
obj.hasOwnProperty("contextTitle") &&
|
|
32
|
+
obj.hasOwnProperty("contextUrl") &&
|
|
33
|
+
obj.hasOwnProperty("workspaceId") &&
|
|
34
|
+
obj.hasOwnProperty("workspaceInstanceId"));
|
|
39
35
|
}
|
|
40
36
|
SessionDescription.is = is;
|
|
41
37
|
})(SessionDescription = exports.SessionDescription || (exports.SessionDescription = {}));
|
|
42
38
|
var UserPaidSubscription;
|
|
43
39
|
(function (UserPaidSubscription) {
|
|
44
40
|
function is(data) {
|
|
45
|
-
return !!data
|
|
46
|
-
&& data.hasOwnProperty('paymentReference');
|
|
41
|
+
return !!data && data.hasOwnProperty("paymentReference");
|
|
47
42
|
}
|
|
48
43
|
UserPaidSubscription.is = is;
|
|
49
44
|
})(UserPaidSubscription = exports.UserPaidSubscription || (exports.UserPaidSubscription = {}));
|
|
50
45
|
var AssignedTeamSubscription;
|
|
51
46
|
(function (AssignedTeamSubscription) {
|
|
52
47
|
function is(data) {
|
|
53
|
-
return !!data
|
|
54
|
-
&& data.hasOwnProperty('teamSubscriptionSlotId');
|
|
48
|
+
return !!data && data.hasOwnProperty("teamSubscriptionSlotId");
|
|
55
49
|
}
|
|
56
50
|
AssignedTeamSubscription.is = is;
|
|
57
51
|
})(AssignedTeamSubscription = exports.AssignedTeamSubscription || (exports.AssignedTeamSubscription = {}));
|
|
52
|
+
var AssignedTeamSubscription2;
|
|
53
|
+
(function (AssignedTeamSubscription2) {
|
|
54
|
+
function is(data) {
|
|
55
|
+
return typeof data === "object" && data.hasOwnProperty("teamMembershipId");
|
|
56
|
+
}
|
|
57
|
+
AssignedTeamSubscription2.is = is;
|
|
58
|
+
})(AssignedTeamSubscription2 = exports.AssignedTeamSubscription2 || (exports.AssignedTeamSubscription2 = {}));
|
|
58
59
|
var Subscription;
|
|
59
60
|
(function (Subscription) {
|
|
60
61
|
function create(newSubscription) {
|
|
61
|
-
|
|
62
|
-
subscription.uid =
|
|
62
|
+
const subscription = newSubscription;
|
|
63
|
+
subscription.uid = (0, uuid_1.v4)();
|
|
63
64
|
return subscription;
|
|
64
65
|
}
|
|
65
66
|
Subscription.create = create;
|
|
66
|
-
;
|
|
67
67
|
function cancelSubscription(s, cancellationDate, endDate) {
|
|
68
68
|
s.endDate = endDate || cancellationDate;
|
|
69
69
|
s.cancellationDate = cancellationDate;
|
|
70
70
|
}
|
|
71
71
|
Subscription.cancelSubscription = cancelSubscription;
|
|
72
|
-
;
|
|
73
72
|
function isSame(s1, s2) {
|
|
74
|
-
return !!s1 &&
|
|
75
|
-
&&
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
return (!!s1 &&
|
|
74
|
+
!!s2 &&
|
|
75
|
+
s1.userId === s2.userId &&
|
|
76
|
+
s1.planId === s2.planId &&
|
|
77
|
+
s1.startDate === s2.startDate &&
|
|
78
|
+
s1.endDate === s2.endDate &&
|
|
79
|
+
s1.amount === s2.amount &&
|
|
80
|
+
s1.cancellationDate === s2.cancellationDate &&
|
|
81
|
+
s1.deleted === s2.deleted &&
|
|
82
|
+
((s1.paymentData === undefined && s2.paymentData === undefined) ||
|
|
83
|
+
(!!s1.paymentData &&
|
|
84
|
+
!!s2.paymentData &&
|
|
85
|
+
s1.paymentData.downgradeDate === s2.paymentData.downgradeDate &&
|
|
86
|
+
s1.paymentData.newPlan === s2.paymentData.newPlan)));
|
|
86
87
|
}
|
|
87
88
|
Subscription.isSame = isSame;
|
|
88
|
-
;
|
|
89
89
|
function isActive(s, date) {
|
|
90
90
|
return s.startDate <= date && (s.endDate === undefined || date < s.endDate);
|
|
91
91
|
}
|
|
92
92
|
Subscription.isActive = isActive;
|
|
93
|
-
|
|
93
|
+
function isCancelled(s, date) {
|
|
94
|
+
return (!!s.cancellationDate && s.cancellationDate < date) || (!!s.endDate && s.endDate < date); // This edge case is meant to handle bad data: If for whatever reason cancellationDate has not been set: treat endDate as such
|
|
95
|
+
}
|
|
96
|
+
Subscription.isCancelled = isCancelled;
|
|
94
97
|
function isDowngraded(s) {
|
|
95
98
|
return s.paymentData && s.paymentData.downgradeDate;
|
|
96
99
|
}
|
|
97
100
|
Subscription.isDowngraded = isDowngraded;
|
|
98
|
-
;
|
|
99
|
-
function isCancelled(s) {
|
|
100
|
-
return !!s.cancellationDate;
|
|
101
|
-
}
|
|
102
|
-
Subscription.isCancelled = isCancelled;
|
|
103
|
-
;
|
|
104
101
|
function calculateCurrentPeriod(startDate, now) {
|
|
105
|
-
|
|
102
|
+
let nextStartDate = startDate;
|
|
106
103
|
do {
|
|
107
104
|
startDate = nextStartDate;
|
|
108
|
-
nextStartDate = timeutil_1.oneMonthLater(startDate, new Date(startDate).getDate());
|
|
105
|
+
nextStartDate = (0, timeutil_1.oneMonthLater)(startDate, new Date(startDate).getDate());
|
|
109
106
|
} while (nextStartDate < now.toISOString());
|
|
110
|
-
return { startDate
|
|
107
|
+
return { startDate, endDate: nextStartDate };
|
|
111
108
|
}
|
|
112
109
|
Subscription.calculateCurrentPeriod = calculateCurrentPeriod;
|
|
113
|
-
;
|
|
114
110
|
})(Subscription = exports.Subscription || (exports.Subscription = {}));
|
|
115
111
|
//# sourceMappingURL=accounting-protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-protocol.js","sourceRoot":"","sources":["../src/accounting-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"accounting-protocol.js","sourceRoot":"","sources":["../src/accounting-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,+BAAoC;AAEpC,8CAAgD;AAuChD,IAAiB,YAAY,CAM5B;AAND,WAAiB,YAAY;IACzB,SAAgB,MAAM,CAAyB,KAAqB;QAChE,MAAM,MAAM,GAAG,KAAU,CAAC;QAC1B,MAAM,CAAC,GAAG,GAAG,IAAA,SAAM,GAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAClB,CAAC;IAJe,mBAAM,SAIrB,CAAA;AACL,CAAC,EANgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAM5B;AA2BD,IAAiB,iBAAiB,CAIjC;AAJD,WAAiB,iBAAiB;IAC9B,SAAgB,EAAE,CAAC,GAAQ;QACvB,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACzF,CAAC;IAFe,oBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAIjC;AAOD,IAAiB,kBAAkB,CAUlC;AAVD,WAAiB,kBAAkB;IAC/B,SAAgB,EAAE,CAAC,GAAQ;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AC,SAAS,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;IAFe,qBAAQ,WAEvB,CAAA;IACD,SAAgB,WAAW,CAAC,CAAe,EAAE,IAAY;QACrD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,8HAA8H;IACnO,CAAC;IAFe,wBAAW,cAE1B,CAAA;IACD,SAAgB,YAAY,CAAC,CAAe;QACxC,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC;IACxD,CAAC;IAFe,yBAAY,eAE3B,CAAA;IACD,SAAgB,sBAAsB,CAAC,SAAiB,EAAE,GAAS;QAC/D,IAAI,aAAa,GAAG,SAAS,CAAC;QAC9B,GAAG;YACC,SAAS,GAAG,aAAa,CAAC;YAC1B,aAAa,GAAG,IAAA,wBAAa,EAAC,SAAS,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SAC3E,QAAQ,aAAa,GAAG,GAAG,CAAC,WAAW,EAAE,EAAE;QAC5C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IACjD,CAAC;IAPe,mCAAsB,yBAOrC,CAAA;AACL,CAAC,EA7CgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA6C5B"}
|
package/lib/admin-protocol.d.ts
CHANGED
|
@@ -1,28 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
import { User, Workspace, NamedWorkspaceFeatureFlag } from "./protocol";
|
|
7
|
-
import {
|
|
7
|
+
import { BlockedRepository } from "./blocked-repositories-protocol";
|
|
8
|
+
import { FindPrebuildsParams } from "./gitpod-service";
|
|
9
|
+
import { Project, Team, PrebuildWithStatus, TeamMemberInfo, TeamMemberRole } from "./teams-projects-protocol";
|
|
8
10
|
import { WorkspaceInstance, WorkspaceInstancePhase } from "./workspace-instance";
|
|
9
11
|
import { RoleOrPermission } from "./permission";
|
|
10
12
|
import { AccountStatement } from "./accounting-protocol";
|
|
13
|
+
import { BillingMode } from "./billing-mode";
|
|
14
|
+
import { CostCenterJSON, ListUsageRequest, ListUsageResponse } from "./usage";
|
|
15
|
+
import { InstallationAdminSettings, TelemetryData } from "./installation-admin-protocol";
|
|
11
16
|
export interface AdminServer {
|
|
12
17
|
adminGetUsers(req: AdminGetListRequest<User>): Promise<AdminGetListResult<User>>;
|
|
13
18
|
adminGetUser(id: string): Promise<User>;
|
|
14
19
|
adminBlockUser(req: AdminBlockUserRequest): Promise<User>;
|
|
15
20
|
adminDeleteUser(id: string): Promise<void>;
|
|
21
|
+
adminVerifyUser(id: string): Promise<User>;
|
|
16
22
|
adminModifyRoleOrPermission(req: AdminModifyRoleOrPermissionRequest): Promise<User>;
|
|
17
23
|
adminModifyPermanentWorkspaceFeatureFlag(req: AdminModifyPermanentWorkspaceFeatureFlagRequest): Promise<User>;
|
|
24
|
+
adminCreateBlockedRepository(urlRegexp: string, blockUser: boolean): Promise<BlockedRepository>;
|
|
25
|
+
adminDeleteBlockedRepository(id: number): Promise<void>;
|
|
26
|
+
adminGetBlockedRepositories(req: AdminGetListRequest<BlockedRepository>): Promise<AdminGetListResult<BlockedRepository>>;
|
|
27
|
+
adminGetTeamMembers(teamId: string): Promise<TeamMemberInfo[]>;
|
|
28
|
+
adminGetTeams(req: AdminGetListRequest<Team>): Promise<AdminGetListResult<Team>>;
|
|
29
|
+
adminGetTeamById(id: string): Promise<Team | undefined>;
|
|
30
|
+
adminSetTeamMemberRole(teamId: string, userId: string, role: TeamMemberRole): Promise<void>;
|
|
18
31
|
adminGetWorkspaces(req: AdminGetWorkspacesRequest): Promise<AdminGetListResult<WorkspaceAndInstance>>;
|
|
19
32
|
adminGetWorkspace(id: string): Promise<WorkspaceAndInstance>;
|
|
20
33
|
adminForceStopWorkspace(id: string): Promise<void>;
|
|
34
|
+
adminRestoreSoftDeletedWorkspace(id: string): Promise<void>;
|
|
35
|
+
adminGetProjectsBySearchTerm(req: AdminGetListRequest<Project>): Promise<AdminGetListResult<Project>>;
|
|
36
|
+
adminGetProjectById(id: string): Promise<Project | undefined>;
|
|
37
|
+
adminFindPrebuilds(params: FindPrebuildsParams): Promise<PrebuildWithStatus[]>;
|
|
21
38
|
adminSetLicense(key: string): Promise<void>;
|
|
22
39
|
adminGetAccountStatement(userId: string): Promise<AccountStatement>;
|
|
23
40
|
adminSetProfessionalOpenSource(userId: string, shouldGetProfOSS: boolean): Promise<void>;
|
|
24
41
|
adminIsStudent(userId: string): Promise<boolean>;
|
|
25
42
|
adminAddStudentEmailDomain(userId: string, domain: string): Promise<void>;
|
|
43
|
+
adminGrantExtraHours(userId: string, extraHours: number): Promise<void>;
|
|
44
|
+
adminGetBillingMode(attributionId: string): Promise<BillingMode>;
|
|
45
|
+
adminGetSettings(): Promise<InstallationAdminSettings>;
|
|
46
|
+
adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
|
|
47
|
+
adminGetCostCenter(attributionId: string): Promise<CostCenterJSON | undefined>;
|
|
48
|
+
adminSetUsageLimit(attributionId: string, usageLimit: number): Promise<void>;
|
|
49
|
+
adminListUsage(req: ListUsageRequest): Promise<ListUsageResponse>;
|
|
50
|
+
adminAddUsageCreditNote(attributionId: string, credits: number, note: string): Promise<void>;
|
|
51
|
+
adminGetUsageBalance(attributionId: string): Promise<number>;
|
|
52
|
+
adminGetSettings(): Promise<InstallationAdminSettings>;
|
|
53
|
+
adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
|
|
54
|
+
adminGetTelemetryData(): Promise<TelemetryData>;
|
|
26
55
|
}
|
|
27
56
|
export interface AdminGetListRequest<T> {
|
|
28
57
|
offset: number;
|
|
@@ -53,14 +82,24 @@ export interface AdminModifyPermanentWorkspaceFeatureFlagRequest {
|
|
|
53
82
|
add: boolean;
|
|
54
83
|
}[];
|
|
55
84
|
}
|
|
56
|
-
export interface WorkspaceAndInstance extends
|
|
85
|
+
export interface WorkspaceAndInstance extends Omit<Workspace, "id" | "creationTime">, Omit<WorkspaceInstance, "id" | "creationTime"> {
|
|
57
86
|
workspaceId: string;
|
|
58
87
|
workspaceCreationTime: string;
|
|
59
88
|
instanceId: string;
|
|
60
89
|
instanceCreationTime: string;
|
|
61
90
|
phase: WorkspaceInstancePhase;
|
|
62
91
|
}
|
|
63
|
-
export
|
|
64
|
-
|
|
92
|
+
export declare namespace WorkspaceAndInstance {
|
|
93
|
+
function toWorkspace(wai: WorkspaceAndInstance): Workspace;
|
|
94
|
+
function toInstance(wai: WorkspaceAndInstance): WorkspaceInstance | undefined;
|
|
65
95
|
}
|
|
96
|
+
export declare type AdminGetWorkspacesRequest = AdminGetListRequest<WorkspaceAndInstance> & AdminGetWorkspacesQuery;
|
|
97
|
+
/** The fields are meant to be used either OR (not combined) */
|
|
98
|
+
export declare type AdminGetWorkspacesQuery = {
|
|
99
|
+
/** we use this field in case we have a UUIDv4 and don't know whether it's an (old) workspace or instance id */
|
|
100
|
+
instanceIdOrWorkspaceId?: string;
|
|
101
|
+
instanceId?: string;
|
|
102
|
+
workspaceId?: string;
|
|
103
|
+
ownerId?: string;
|
|
104
|
+
};
|
|
66
105
|
//# sourceMappingURL=admin-protocol.d.ts.map
|