@gitpod/gitpod-protocol 0.1.5-tweak-workspaceconfig-origin-docs-fork.0 → 0.1.5-update-yarnlock.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 +150 -8
- package/lib/accounting-protocol.d.ts +21 -11
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +44 -33
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +29 -1
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +1 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +5 -6
- package/lib/analytics.d.ts.map +1 -1
- package/lib/analytics.js +1 -1
- package/lib/analytics.js.map +1 -1
- package/lib/attribution.d.ts +25 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +58 -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 +19 -7
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +60 -9
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +3 -3
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +20 -12
- package/lib/context-url.spec.js.map +1 -1
- 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 +2 -2
- 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 +10 -10
- 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 +3 -4
- 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 +2 -2
- 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 +8 -10
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -6
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +2 -21
- 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 +99 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +55 -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 +7 -7
- 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 +43 -40
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +143 -51
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +78 -36
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +2 -1
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +3 -2
- 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 +53 -8
- package/lib/ide-protocol.d.ts.map +1 -1
- package/lib/ide-protocol.js +11 -1
- package/lib/ide-protocol.js.map +1 -1
- package/lib/index.d.ts +17 -15
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -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 +1 -1
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +19 -19
- 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 +10 -7
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +5 -19
- package/lib/messaging/client-call-metrics.d.ts.map +1 -1
- package/lib/messaging/client-call-metrics.js +35 -23
- package/lib/messaging/client-call-metrics.js.map +1 -1
- package/lib/messaging/error.d.ts +12 -2
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +26 -4
- package/lib/messaging/error.js.map +1 -1
- 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 +23 -59
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +1 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +7 -9
- 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 +13 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +38 -26
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +8 -5
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +227 -172
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +238 -104
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +322 -105
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.spec.d.ts +7 -0
- 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 +1 -1
- package/lib/snapshot-url.js +1 -1
- package/lib/snapshot-url.spec.d.ts +1 -1
- package/lib/snapshot-url.spec.js +1 -1
- package/lib/snapshot-url.spec.js.map +1 -1
- package/lib/team-subscription-protocol.d.ts +24 -4
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +25 -6
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +39 -6
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +21 -3
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/typings/globals.d.ts +7 -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 +1 -1
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +13 -4
- package/lib/util/analytics.js.map +1 -1
- 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 +4 -4
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +1 -1
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +7 -7
- 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 +1 -1
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +2 -2
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +5 -3
- 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 +12 -3
- 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 +461 -440
- 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 +37 -2
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +2 -2
- package/lib/util/gitpod-cookie.d.ts.map +1 -1
- package/lib/util/gitpod-cookie.js +1 -4
- package/lib/util/gitpod-cookie.js.map +1 -1
- package/lib/util/gitpod-host-url.d.ts +12 -5
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +69 -41
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +16 -6
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +21 -1
- package/lib/util/grpc.d.ts.map +1 -1
- package/lib/util/grpc.js +74 -2
- package/lib/util/grpc.js.map +1 -1
- 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 +2 -2
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +32 -26
- 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 +1 -1
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +3 -4
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +1 -1
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +10 -7
- 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 +1 -1
- 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 +1 -1
- 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 +16 -4
- 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 +35 -1
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +47 -13
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +141 -32
- 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 +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 +24 -18
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +22 -2
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +41 -4
- 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 +18 -8
- package/pkg-yarn.lock +11 -6
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +76 -52
- package/src/admin-protocol.ts +59 -19
- package/src/analytics.ts +27 -29
- package/src/attribution.ts +67 -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 +25 -15
- package/src/context-url.ts +93 -37
- 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 +148 -0
- package/src/gitpod-file-parser.spec.ts +56 -62
- package/src/gitpod-file-parser.ts +17 -18
- package/src/gitpod-service.ts +315 -136
- package/src/headless-workspace-log.ts +7 -5
- package/src/ide-frontend-service.ts +3 -3
- package/src/ide-protocol.ts +63 -8
- package/src/index.ts +17 -15
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +13 -7
- package/src/messaging/browser/connection.ts +45 -47
- package/src/messaging/browser/window-connection.ts +40 -30
- package/src/messaging/client-call-metrics.ts +79 -82
- package/src/messaging/error.ts +37 -8
- package/src/messaging/handler.ts +6 -6
- package/src/messaging/node/connection.ts +23 -70
- package/src/messaging/proxy-factory.ts +23 -30
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +3 -3
- package/src/permission.ts +45 -33
- package/src/plans.ts +257 -190
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +650 -305
- package/src/snapshot-url.spec.ts +10 -8
- package/src/snapshot-url.ts +1 -1
- package/src/team-subscription-protocol.ts +63 -23
- package/src/teams-projects-protocol.ts +60 -12
- package/src/typings/globals.ts +12 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +47 -25
- 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 +15 -7
- package/src/util/generate-workspace-id.spec.ts +35 -8
- package/src/util/generate-workspace-id.ts +465 -441
- package/src/util/gitpod-cookie.ts +9 -10
- package/src/util/gitpod-host-url.spec.ts +41 -14
- package/src/util/gitpod-host-url.ts +81 -46
- package/src/util/grpc.ts +94 -2
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +61 -43
- package/src/util/make-link.ts +7 -8
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +18 -9
- package/src/util/parse-workspace-id.ts +7 -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 +5 -7
- package/src/util/skip-if.ts +10 -7
- package/src/util/timeutil.spec.ts +41 -15
- package/src/util/timeutil.ts +28 -12
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +175 -59
- 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 +46 -21
- package/src/workspace-instance.ts +84 -22
- package/src/wsready.ts +11 -4
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/email-protocol.d.ts +0 -49
- 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 -34
- 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 -65
- 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 -31
- package/lib/util/safe-promise.js.map +0 -1
- package/src/email-protocol.ts +0 -66
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/theia-plugins.ts +0 -11
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
|
@@ -1,20 +1,17 @@
|
|
|
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
|
|
|
7
7
|
/**
|
|
8
|
-
* These cookies are set in the Theia frontend. This pattern is relied upon in:
|
|
9
|
-
* - proxy:
|
|
10
|
-
* - to filter it out on port locations
|
|
11
|
-
* - to forward it to the server for authentication
|
|
12
|
-
* - server:
|
|
13
|
-
* - to authenticate access to port locations
|
|
14
|
-
*/
|
|
15
|
-
export const worspacePortAuthCookieName = function(host: string, workspaceId: string): string {
|
|
16
|
-
return host
|
|
17
|
-
|
|
18
|
-
.replace(/[\W_]+/g, "_")
|
|
19
|
-
+ `_ws_${workspaceId}_port_auth_`;
|
|
20
|
-
};
|
|
8
|
+
* These cookies are set in the Theia frontend. This pattern is relied upon in:
|
|
9
|
+
* - proxy:
|
|
10
|
+
* - to filter it out on port locations
|
|
11
|
+
* - to forward it to the server for authentication
|
|
12
|
+
* - server:
|
|
13
|
+
* - to authenticate access to port locations
|
|
14
|
+
*/
|
|
15
|
+
export const worspacePortAuthCookieName = function (host: string, workspaceId: string): string {
|
|
16
|
+
return host.replace(/https?/, "").replace(/[\W_]+/g, "_") + `_ws_${workspaceId}_port_auth_`;
|
|
17
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
export interface WebhookEvent {
|
|
8
|
+
id: string;
|
|
9
|
+
creationTime: string;
|
|
10
|
+
type: "push" | string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Typically the webhook installer is referenced here.
|
|
14
|
+
*/
|
|
15
|
+
authorizedUserId?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* webhook event's payload
|
|
19
|
+
*/
|
|
20
|
+
rawEvent: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The general status of the received webhook event.
|
|
24
|
+
*/
|
|
25
|
+
status: WebhookEvent.Status;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Optional message to help understand errors with handling events.
|
|
29
|
+
*/
|
|
30
|
+
message?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* If the webhook event is considered to trigger a prebuild, the `prebuildStatus`
|
|
34
|
+
* contains a more specific status.
|
|
35
|
+
*/
|
|
36
|
+
prebuildStatus?: WebhookEvent.PrebuildStatus;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* If `prebuildStatus` is `prebuild_triggered` this points to a prebuild.
|
|
40
|
+
*/
|
|
41
|
+
prebuildId?: string;
|
|
42
|
+
|
|
43
|
+
projectId?: string;
|
|
44
|
+
|
|
45
|
+
cloneUrl?: string;
|
|
46
|
+
|
|
47
|
+
branch?: string;
|
|
48
|
+
|
|
49
|
+
commit?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace WebhookEvent {
|
|
53
|
+
export type Status = "received" | "dismissed_unauthorized" | "ignored" | "processed";
|
|
54
|
+
export type PrebuildStatus = "ignored_unconfigured" | "prebuild_trigger_failed" | "prebuild_triggered";
|
|
55
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export interface SupportedWorkspaceClass {
|
|
8
|
+
id: string;
|
|
9
|
+
category: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
description: string;
|
|
12
|
+
powerups: number;
|
|
13
|
+
isDefault: boolean;
|
|
14
|
+
}
|
package/src/workspace-cluster.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
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
|
|
|
7
|
-
import * as fs from
|
|
8
|
-
import { filePathTelepresenceAware } from
|
|
7
|
+
import * as fs from "fs";
|
|
8
|
+
import { filePathTelepresenceAware } from "./env";
|
|
9
9
|
import { DeepPartial } from "./util/deep-partial";
|
|
10
|
-
import { PermissionName } from
|
|
10
|
+
import { PermissionName } from "./permission";
|
|
11
|
+
|
|
12
|
+
const workspaceRegions = ["europe", "north-america", "south-america", "africa", "asia", ""] as const;
|
|
13
|
+
export type WorkspaceRegion = typeof workspaceRegions[number];
|
|
14
|
+
|
|
15
|
+
export function isWorkspaceRegion(s: string): s is WorkspaceRegion {
|
|
16
|
+
return workspaceRegions.indexOf(s as any) !== -1;
|
|
17
|
+
}
|
|
11
18
|
|
|
12
19
|
export interface WorkspaceCluster {
|
|
13
20
|
// Name of the workspace cluster.
|
|
@@ -15,6 +22,14 @@ export interface WorkspaceCluster {
|
|
|
15
22
|
// Must be identical to the installationShortname of the cluster it represents!
|
|
16
23
|
name: string;
|
|
17
24
|
|
|
25
|
+
// The name of the application cluster to which this cluster should be registered.
|
|
26
|
+
// The name can be at most 60 characters.
|
|
27
|
+
applicationCluster: string;
|
|
28
|
+
|
|
29
|
+
// The name of the region this cluster belongs to. E.g. europe or north-america
|
|
30
|
+
// The name can be at most 60 characters.
|
|
31
|
+
region: WorkspaceRegion;
|
|
32
|
+
|
|
18
33
|
// URL of the cluster's ws-manager API
|
|
19
34
|
url: string;
|
|
20
35
|
|
|
@@ -35,9 +50,6 @@ export interface WorkspaceCluster {
|
|
|
35
50
|
|
|
36
51
|
// An optional set of constraints that limit who can start workspaces on the cluster
|
|
37
52
|
admissionConstraints?: AdmissionConstraint[];
|
|
38
|
-
|
|
39
|
-
// An optional set of admission preferences that guide cluster selection
|
|
40
|
-
admissionPreferences?: AdmissionPreference[];
|
|
41
53
|
}
|
|
42
54
|
|
|
43
55
|
export type WorkspaceClusterState = "available" | "cordoned" | "draining";
|
|
@@ -50,19 +62,31 @@ export interface TLSConfig {
|
|
|
50
62
|
crt: string;
|
|
51
63
|
}
|
|
52
64
|
export namespace TLSConfig {
|
|
53
|
-
export const loadFromBase64File = (path: string): string =>
|
|
65
|
+
export const loadFromBase64File = (path: string): string =>
|
|
66
|
+
fs.readFileSync(filePathTelepresenceAware(path)).toString("base64");
|
|
54
67
|
}
|
|
55
68
|
export type WorkspaceClusterWoTLS = Omit<WorkspaceCluster, "tls">;
|
|
56
69
|
export type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "url" | "tls">;
|
|
57
70
|
|
|
58
|
-
export type AdmissionConstraint =
|
|
71
|
+
export type AdmissionConstraint =
|
|
72
|
+
| AdmissionConstraintFeaturePreview
|
|
73
|
+
| AdmissionConstraintHasPermission
|
|
74
|
+
| AdmissionConstraintHasClass;
|
|
59
75
|
export type AdmissionConstraintFeaturePreview = { type: "has-feature-preview" };
|
|
60
|
-
export type
|
|
61
|
-
export type
|
|
62
|
-
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
|
|
76
|
+
export type AdmissionConstraintHasPermission = { type: "has-permission"; permission: PermissionName };
|
|
77
|
+
export type AdmissionConstraintHasClass = { type: "has-class"; id: string; displayName: string };
|
|
78
|
+
|
|
79
|
+
export namespace AdmissionConstraint {
|
|
80
|
+
export function is(o: any): o is AdmissionConstraint {
|
|
81
|
+
return !!o && "type" in o;
|
|
82
|
+
}
|
|
83
|
+
export function isHasPermissionConstraint(o: any): o is AdmissionConstraintHasPermission {
|
|
84
|
+
return is(o) && o.type === "has-permission";
|
|
85
|
+
}
|
|
86
|
+
export function hasPermission(ac: AdmissionConstraint, permission: PermissionName): boolean {
|
|
87
|
+
return isHasPermissionConstraint(ac) && ac.permission === permission;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
66
90
|
|
|
67
91
|
export const WorkspaceClusterDB = Symbol("WorkspaceClusterDB");
|
|
68
92
|
export interface WorkspaceClusterDB {
|
|
@@ -77,20 +101,21 @@ export interface WorkspaceClusterDB {
|
|
|
77
101
|
* Deletes the cluster identified by this name, if any.
|
|
78
102
|
* @param name
|
|
79
103
|
*/
|
|
80
|
-
deleteByName(name: string): Promise<void>;
|
|
104
|
+
deleteByName(name: string, applicationCluster: string): Promise<void>;
|
|
81
105
|
|
|
82
106
|
/**
|
|
83
107
|
* Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
|
|
84
108
|
* @param name
|
|
85
109
|
*/
|
|
86
|
-
findByName(name: string): Promise<WorkspaceCluster | undefined>;
|
|
110
|
+
findByName(name: string, applicationCluster: string): Promise<WorkspaceCluster | undefined>;
|
|
87
111
|
|
|
88
112
|
/**
|
|
89
113
|
* Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
|
|
90
114
|
* @param predicate
|
|
91
115
|
*/
|
|
92
|
-
findFiltered(predicate:
|
|
116
|
+
findFiltered(predicate: WorkspaceClusterFilter): Promise<WorkspaceClusterWoTLS[]>;
|
|
93
117
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
118
|
+
|
|
119
|
+
export type WorkspaceClusterFilter = Pick<WorkspaceCluster, "applicationCluster"> &
|
|
120
|
+
DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url" | "region">> &
|
|
121
|
+
Partial<{ minScore: number }>;
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
|
7
7
|
import { NamedWorkspaceFeatureFlag } from "./protocol";
|
|
@@ -49,12 +49,34 @@ export interface WorkspaceInstance {
|
|
|
49
49
|
// values here.
|
|
50
50
|
configuration?: WorkspaceInstanceConfiguration;
|
|
51
51
|
|
|
52
|
-
// instance is hard-deleted on the database and about to be collected by
|
|
52
|
+
// instance is hard-deleted on the database and about to be collected by periodic deleter
|
|
53
53
|
readonly deleted?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Contains information about the image build, if there was any
|
|
57
|
+
*/
|
|
58
|
+
imageBuildInfo?: ImageBuildInfo;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* workspace class, also known as workspace size, determines the type of
|
|
62
|
+
* resources that are provided to the workspace.
|
|
63
|
+
*/
|
|
64
|
+
workspaceClass?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Identifies the team or user to which this instance's runtime should be attributed to
|
|
68
|
+
* (e.g. for usage analytics or billing purposes).
|
|
69
|
+
*/
|
|
70
|
+
usageAttributionId?: string;
|
|
54
71
|
}
|
|
55
72
|
|
|
56
73
|
// WorkspaceInstanceStatus describes the current state of a workspace instance
|
|
57
74
|
export interface WorkspaceInstanceStatus {
|
|
75
|
+
// version is the current version of the workspace instance status
|
|
76
|
+
// Note: consider this value opague. The only guarantee given is that it imposes
|
|
77
|
+
// a partial order on status updates, i.e. a.version > b.version -> a newer than b.
|
|
78
|
+
version?: number;
|
|
79
|
+
|
|
58
80
|
// phase describes a high-level state of the workspace instance
|
|
59
81
|
phase: WorkspaceInstancePhase;
|
|
60
82
|
|
|
@@ -90,49 +112,54 @@ export interface WorkspaceInstanceStatus {
|
|
|
90
112
|
export type WorkspaceInstancePhase =
|
|
91
113
|
// unknown indicates an issue within the system in that it cannot determine the actual phase of
|
|
92
114
|
// a workspace. This phase is usually accompanied by an error.
|
|
93
|
-
"unknown"
|
|
115
|
+
| "unknown"
|
|
94
116
|
|
|
95
117
|
// Preparing means that we haven't actually started the workspace instance just yet, but rather
|
|
96
|
-
// are still preparing for launch.
|
|
97
|
-
"preparing"
|
|
118
|
+
// are still preparing for launch.
|
|
119
|
+
| "preparing"
|
|
120
|
+
|
|
121
|
+
// Building means that we are building the Docker image for the workspace. A workspace will enter this phase only
|
|
122
|
+
// if an image build is required for that workspace.
|
|
123
|
+
| "building"
|
|
98
124
|
|
|
99
125
|
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
|
|
100
126
|
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
|
|
101
127
|
// workspace, the workspace will be in Pending state until that happened.
|
|
102
|
-
"pending"
|
|
128
|
+
| "pending"
|
|
103
129
|
|
|
104
130
|
// Creating means the workspace is currently being created. Thati includes downloading the images required
|
|
105
131
|
// to run the workspace over the network. The time spent in this phase varies widely and depends on the current
|
|
106
132
|
// network speed, image size and cache states.
|
|
107
|
-
"creating"
|
|
133
|
+
| "creating"
|
|
108
134
|
|
|
109
135
|
// Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git
|
|
110
136
|
// clone or backup download). After this phase one can expect the workspace to either be Running or Failed.
|
|
111
|
-
"initializing"
|
|
137
|
+
| "initializing"
|
|
112
138
|
|
|
113
139
|
// Running means the workspace is able to actively perform work, either by serving a user through Theia,
|
|
114
140
|
// or as a headless workspace.
|
|
115
|
-
"running"
|
|
141
|
+
| "running"
|
|
116
142
|
|
|
117
143
|
// Interrupted is an exceptional state where the container should be running but is temporarily unavailable.
|
|
118
144
|
// When in this state, we expect it to become running or stopping anytime soon.
|
|
119
|
-
"interrupted"
|
|
145
|
+
| "interrupted"
|
|
120
146
|
|
|
121
147
|
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
|
|
122
|
-
"stopping"
|
|
148
|
+
| "stopping"
|
|
123
149
|
|
|
124
150
|
// Stopped means the workspace ended regularly because it was shut down.
|
|
125
|
-
"stopped";
|
|
151
|
+
| "stopped";
|
|
126
152
|
|
|
127
153
|
export interface WorkspaceInstanceConditions {
|
|
128
154
|
// Failed contains the reason the workspace failed to operate. If this field is empty, the workspace has not failed.
|
|
129
|
-
failed
|
|
155
|
+
// failed contains technical details for the failure of the workspace.
|
|
156
|
+
failed?: string;
|
|
130
157
|
|
|
131
158
|
// timeout contains the reason the workspace has timed out. If this field is empty, the workspace has not timed out.
|
|
132
|
-
timeout?: string
|
|
159
|
+
timeout?: string;
|
|
133
160
|
|
|
134
161
|
// PullingImages marks if the workspace is currently pulling its images. This condition can only be set during PhaseCreating
|
|
135
|
-
pullingImages?: boolean
|
|
162
|
+
pullingImages?: boolean;
|
|
136
163
|
|
|
137
164
|
// deployed marks that a workspace instance was sent/deployed at a workspace manager
|
|
138
165
|
deployed?: boolean;
|
|
@@ -143,7 +170,10 @@ export interface WorkspaceInstanceConditions {
|
|
|
143
170
|
// ISO8601 timestamp when the first user activity was registered in the frontend. Only set if the workspace is running.
|
|
144
171
|
firstUserActivity?: string;
|
|
145
172
|
|
|
146
|
-
//
|
|
173
|
+
// headlessTaskFailed indicates that a headless workspace task failed
|
|
174
|
+
// headlessTaskFailed is only set if:
|
|
175
|
+
// * this workspace is headless
|
|
176
|
+
// * the task being run returned a non 0 exit status code
|
|
147
177
|
headlessTaskFailed?: string;
|
|
148
178
|
|
|
149
179
|
// stopped_by_request is true if the workspace was stopped using a StopWorkspace call
|
|
@@ -151,10 +181,10 @@ export interface WorkspaceInstanceConditions {
|
|
|
151
181
|
}
|
|
152
182
|
|
|
153
183
|
// AdmissionLevel describes who can access a workspace instance and its ports.
|
|
154
|
-
export type AdmissionLevel =
|
|
184
|
+
export type AdmissionLevel = "owner_only" | "everyone";
|
|
155
185
|
|
|
156
186
|
// PortVisibility describes how a port can be accessed
|
|
157
|
-
export type PortVisibility =
|
|
187
|
+
export type PortVisibility = "public" | "private";
|
|
158
188
|
|
|
159
189
|
// WorkspaceInstancePort describes a port exposed on a workspace instance
|
|
160
190
|
export interface WorkspaceInstancePort {
|
|
@@ -180,19 +210,25 @@ export interface WorkspaceInstanceRepoStatus {
|
|
|
180
210
|
uncommitedFiles?: string[];
|
|
181
211
|
|
|
182
212
|
// the total number of uncommited files
|
|
183
|
-
totalUncommitedFiles?: number
|
|
213
|
+
totalUncommitedFiles?: number;
|
|
184
214
|
|
|
185
215
|
// untrackedFiles is the list of untracked files in the workspace, possibly truncated
|
|
186
216
|
untrackedFiles?: string[];
|
|
187
217
|
|
|
188
218
|
// the total number of untracked files
|
|
189
|
-
totalUntrackedFiles?: number
|
|
219
|
+
totalUntrackedFiles?: number;
|
|
190
220
|
|
|
191
221
|
// unpushedCommits is the list of unpushed changes in the workspace, possibly truncated
|
|
192
222
|
unpushedCommits?: string[];
|
|
193
223
|
|
|
194
224
|
// the total number of unpushed changes
|
|
195
|
-
totalUnpushedCommits?: number
|
|
225
|
+
totalUnpushedCommits?: number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ConfigurationIdeConfig ide config of WorkspaceInstanceConfiguration
|
|
229
|
+
export interface ConfigurationIdeConfig {
|
|
230
|
+
useLatest?: boolean;
|
|
231
|
+
desktopIdeAlias?: string;
|
|
196
232
|
}
|
|
197
233
|
|
|
198
234
|
// WorkspaceInstanceConfiguration contains all per-instance configuration
|
|
@@ -207,9 +243,35 @@ export interface WorkspaceInstanceConfiguration {
|
|
|
207
243
|
// ideImage is the ref of the IDE image this instance uses.
|
|
208
244
|
ideImage: string;
|
|
209
245
|
|
|
246
|
+
// ideImageLayers are images needed for the ide to run,
|
|
247
|
+
// including ide-desktop, desktop-plugin and so on
|
|
248
|
+
ideImageLayers?: string[];
|
|
249
|
+
|
|
210
250
|
// desktopIdeImage is the ref of the desktop IDE image this instance uses.
|
|
211
|
-
|
|
251
|
+
// @deprected: replaced with the ideImageLayers field
|
|
252
|
+
desktopIdeImage?: string;
|
|
253
|
+
|
|
254
|
+
// desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
|
|
255
|
+
// @deprected: replaced with the desktopIdePluginImage field
|
|
256
|
+
desktopIdePluginImage?: string;
|
|
212
257
|
|
|
213
258
|
// supervisorImage is the ref of the supervisor image this instance uses.
|
|
214
259
|
supervisorImage?: string;
|
|
260
|
+
|
|
261
|
+
ideConfig?: ConfigurationIdeConfig;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Holds information about the image build (if there was one) for this WorkspaceInstance
|
|
266
|
+
*/
|
|
267
|
+
export interface ImageBuildInfo {
|
|
268
|
+
log?: ImageBuildLogInfo;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Holds information about how to access logs for this an image build
|
|
273
|
+
*/
|
|
274
|
+
export interface ImageBuildLogInfo {
|
|
275
|
+
url: string;
|
|
276
|
+
headers: { [key: string]: string };
|
|
215
277
|
}
|
package/src/wsready.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2023 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
|
|
|
7
|
-
// generated using github.com/32leaves/bel on
|
|
7
|
+
// generated using github.com/32leaves/bel on 2023-02-14 09:41:16.808994006 +0000 UTC m=+0.008933200
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
10
|
export enum WorkspaceInitSource {
|
|
@@ -13,5 +13,12 @@ export enum WorkspaceInitSource {
|
|
|
13
13
|
WorkspaceInitFromOther = "from-other",
|
|
14
14
|
}
|
|
15
15
|
export interface WorkspaceReadyMessage {
|
|
16
|
-
source: WorkspaceInitSource
|
|
16
|
+
source: WorkspaceInitSource;
|
|
17
|
+
metrics: InitializerMetric[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface InitializerMetric {
|
|
21
|
+
type: string;
|
|
22
|
+
duration: number;
|
|
23
|
+
size: number;
|
|
17
24
|
}
|