@gitpod/gitpod-protocol 0.1.5-wth-test.80 → 0.1.5-wv-remove-without-ws-flag.5
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 +132 -5
- package/lib/accounting-protocol.d.ts +19 -11
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +35 -33
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +19 -2
- 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 +1 -1
- 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 +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 +1 -2
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +5 -7
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +1 -3
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +13 -26
- 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 +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 +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 +73 -55
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +61 -34
- 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 +29 -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 -17
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +4 -1
- package/lib/installation-admin-protocol.d.ts.map +1 -1
- package/lib/installation-admin-protocol.js +4 -3
- package/lib/installation-admin-protocol.js.map +1 -1
- 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 +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.map +1 -1
- package/lib/messaging/handler.js +1 -1
- package/lib/messaging/node/connection.js +8 -8
- 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 +1 -1
- package/lib/oss-allowlist.js +1 -1
- 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 +7 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +16 -24
- 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 +211 -172
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +167 -61
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +282 -106
- 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 +23 -4
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +21 -6
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +29 -6
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +10 -3
- package/lib/teams-projects-protocol.js.map +1 -1
- 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 +1 -1
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +7 -7
- 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 +1 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +7 -2
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +5 -0
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +446 -442
- 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 +19 -8
- 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 -3
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +69 -35
- 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 +1 -1
- package/lib/util/jaeger-client-types.d.ts.map +1 -1
- package/lib/util/jaeger-client-types.js +1 -1
- 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 +2 -3
- 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 +1 -1
- package/lib/util/repeat.js +1 -1
- 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 +7 -7
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +15 -17
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +1 -1
- package/lib/util/tracing.spec.js +4 -4
- package/lib/util/tracing.spec.js.map +1 -1
- 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 +13 -14
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +3 -5
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +22 -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 +14 -6
- package/pkg-yarn.lock +10 -5
- package/provenance-bundle.jsonl +1 -1
- package/src/accounting-protocol.ts +67 -52
- package/src/admin-protocol.ts +48 -22
- package/src/analytics.ts +22 -22
- 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 +18 -22
- package/src/context-url.ts +79 -79
- 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 +224 -142
- package/src/headless-workspace-log.ts +7 -5
- package/src/ide-frontend-service.ts +3 -3
- package/src/ide-protocol.ts +38 -10
- package/src/index.ts +17 -17
- package/src/installation-admin-protocol.ts +12 -9
- 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 +30 -8
- package/src/messaging/handler.ts +6 -6
- package/src/messaging/node/connection.ts +8 -8
- package/src/messaging/proxy-factory.ts +23 -30
- package/src/oss-allowlist.ts +4 -4
- package/src/payment-protocol.ts +3 -3
- package/src/permission.ts +25 -32
- package/src/plans.ts +241 -190
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +527 -265
- package/src/snapshot-url.spec.ts +10 -8
- package/src/snapshot-url.ts +1 -1
- package/src/team-subscription-protocol.ts +60 -23
- package/src/teams-projects-protocol.ts +42 -12
- package/src/typings/globals.ts +6 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +47 -43
- 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 +9 -7
- package/src/util/generate-workspace-id.spec.ts +27 -17
- package/src/util/generate-workspace-id.ts +461 -455
- 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 +82 -39
- package/src/util/grpc.ts +94 -2
- package/src/util/jaeger-client-types.ts +3 -3
- 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 +6 -7
- package/src/util/queue.spec.ts +28 -26
- package/src/util/queue.ts +1 -1
- package/src/util/repeat.ts +2 -2
- 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 +29 -24
- package/src/util/tracing.ts +55 -52
- 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 +25 -19
- package/src/workspace-instance.ts +67 -25
- 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/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js +0 -8
- package/lib/theia-plugins.js.map +0 -1
- package/src/email-protocol.ts +0 -66
- package/src/theia-plugins.ts +0 -11
package/src/workspace-cluster.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
11
|
|
|
12
12
|
export interface WorkspaceCluster {
|
|
13
13
|
// Name of the workspace cluster.
|
|
@@ -15,6 +15,10 @@ export interface WorkspaceCluster {
|
|
|
15
15
|
// Must be identical to the installationShortname of the cluster it represents!
|
|
16
16
|
name: string;
|
|
17
17
|
|
|
18
|
+
// The name of the application cluster to which this cluster should be registered.
|
|
19
|
+
// The name can be at most 60 characters.
|
|
20
|
+
applicationCluster: string;
|
|
21
|
+
|
|
18
22
|
// URL of the cluster's ws-manager API
|
|
19
23
|
url: string;
|
|
20
24
|
|
|
@@ -47,25 +51,26 @@ export interface TLSConfig {
|
|
|
47
51
|
crt: string;
|
|
48
52
|
}
|
|
49
53
|
export namespace TLSConfig {
|
|
50
|
-
export const loadFromBase64File = (path: string): string =>
|
|
54
|
+
export const loadFromBase64File = (path: string): string =>
|
|
55
|
+
fs.readFileSync(filePathTelepresenceAware(path)).toString("base64");
|
|
51
56
|
}
|
|
52
57
|
export type WorkspaceClusterWoTLS = Omit<WorkspaceCluster, "tls">;
|
|
53
58
|
export type WorkspaceManagerConnectionInfo = Pick<WorkspaceCluster, "name" | "url" | "tls">;
|
|
54
59
|
|
|
55
|
-
export type AdmissionConstraint =
|
|
60
|
+
export type AdmissionConstraint =
|
|
61
|
+
| AdmissionConstraintFeaturePreview
|
|
62
|
+
| AdmissionConstraintHasPermission
|
|
63
|
+
| AdmissionConstraintHasClass;
|
|
56
64
|
export type AdmissionConstraintFeaturePreview = { type: "has-feature-preview" };
|
|
57
|
-
export type AdmissionConstraintHasPermission = { type: "has-permission"
|
|
58
|
-
export type
|
|
59
|
-
export type AdmissionConstraintHasMoreResources = { type: "has-more-resources" };
|
|
65
|
+
export type AdmissionConstraintHasPermission = { type: "has-permission"; permission: PermissionName };
|
|
66
|
+
export type AdmissionConstraintHasClass = { type: "has-class"; id: string; displayName: string };
|
|
60
67
|
|
|
61
68
|
export namespace AdmissionConstraint {
|
|
62
69
|
export function is(o: any): o is AdmissionConstraint {
|
|
63
|
-
return !!o
|
|
64
|
-
&& 'type' in o;
|
|
70
|
+
return !!o && "type" in o;
|
|
65
71
|
}
|
|
66
72
|
export function isHasPermissionConstraint(o: any): o is AdmissionConstraintHasPermission {
|
|
67
|
-
return is(o)
|
|
68
|
-
&& o.type === "has-permission";
|
|
73
|
+
return is(o) && o.type === "has-permission";
|
|
69
74
|
}
|
|
70
75
|
export function hasPermission(ac: AdmissionConstraint, permission: PermissionName): boolean {
|
|
71
76
|
return isHasPermissionConstraint(ac) && ac.permission === permission;
|
|
@@ -85,20 +90,21 @@ export interface WorkspaceClusterDB {
|
|
|
85
90
|
* Deletes the cluster identified by this name, if any.
|
|
86
91
|
* @param name
|
|
87
92
|
*/
|
|
88
|
-
deleteByName(name: string): Promise<void>;
|
|
93
|
+
deleteByName(name: string, applicationCluster: string): Promise<void>;
|
|
89
94
|
|
|
90
95
|
/**
|
|
91
96
|
* Finds a WorkspaceCluster with the given name. If there is none, `undefined` is returned.
|
|
92
97
|
* @param name
|
|
93
98
|
*/
|
|
94
|
-
findByName(name: string): Promise<WorkspaceCluster | undefined>;
|
|
99
|
+
findByName(name: string, applicationCluster: string): Promise<WorkspaceCluster | undefined>;
|
|
95
100
|
|
|
96
101
|
/**
|
|
97
102
|
* Lists all WorkspaceClusterWoTls for which the given predicate is true (does not return TLS for size/speed concerns)
|
|
98
103
|
* @param predicate
|
|
99
104
|
*/
|
|
100
|
-
findFiltered(predicate:
|
|
105
|
+
findFiltered(predicate: WorkspaceClusterFilter): Promise<WorkspaceClusterWoTLS[]>;
|
|
101
106
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
|
|
108
|
+
export type WorkspaceClusterFilter = Pick<WorkspaceCluster, "applicationCluster"> &
|
|
109
|
+
DeepPartial<Pick<WorkspaceCluster, "name" | "state" | "govern" | "url">> &
|
|
110
|
+
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";
|
|
@@ -55,11 +55,28 @@ export interface WorkspaceInstance {
|
|
|
55
55
|
/**
|
|
56
56
|
* Contains information about the image build, if there was any
|
|
57
57
|
*/
|
|
58
|
-
|
|
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;
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
// WorkspaceInstanceStatus describes the current state of a workspace instance
|
|
62
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
|
+
|
|
63
80
|
// phase describes a high-level state of the workspace instance
|
|
64
81
|
phase: WorkspaceInstancePhase;
|
|
65
82
|
|
|
@@ -95,49 +112,54 @@ export interface WorkspaceInstanceStatus {
|
|
|
95
112
|
export type WorkspaceInstancePhase =
|
|
96
113
|
// unknown indicates an issue within the system in that it cannot determine the actual phase of
|
|
97
114
|
// a workspace. This phase is usually accompanied by an error.
|
|
98
|
-
"unknown"
|
|
115
|
+
| "unknown"
|
|
99
116
|
|
|
100
117
|
// Preparing means that we haven't actually started the workspace instance just yet, but rather
|
|
101
|
-
// are still preparing for launch.
|
|
102
|
-
"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"
|
|
103
124
|
|
|
104
125
|
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
|
|
105
126
|
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
|
|
106
127
|
// workspace, the workspace will be in Pending state until that happened.
|
|
107
|
-
"pending"
|
|
128
|
+
| "pending"
|
|
108
129
|
|
|
109
130
|
// Creating means the workspace is currently being created. Thati includes downloading the images required
|
|
110
131
|
// to run the workspace over the network. The time spent in this phase varies widely and depends on the current
|
|
111
132
|
// network speed, image size and cache states.
|
|
112
|
-
"creating"
|
|
133
|
+
| "creating"
|
|
113
134
|
|
|
114
135
|
// Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git
|
|
115
136
|
// clone or backup download). After this phase one can expect the workspace to either be Running or Failed.
|
|
116
|
-
"initializing"
|
|
137
|
+
| "initializing"
|
|
117
138
|
|
|
118
139
|
// Running means the workspace is able to actively perform work, either by serving a user through Theia,
|
|
119
140
|
// or as a headless workspace.
|
|
120
|
-
"running"
|
|
141
|
+
| "running"
|
|
121
142
|
|
|
122
143
|
// Interrupted is an exceptional state where the container should be running but is temporarily unavailable.
|
|
123
144
|
// When in this state, we expect it to become running or stopping anytime soon.
|
|
124
|
-
"interrupted"
|
|
145
|
+
| "interrupted"
|
|
125
146
|
|
|
126
147
|
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
|
|
127
|
-
"stopping"
|
|
148
|
+
| "stopping"
|
|
128
149
|
|
|
129
150
|
// Stopped means the workspace ended regularly because it was shut down.
|
|
130
|
-
"stopped";
|
|
151
|
+
| "stopped";
|
|
131
152
|
|
|
132
153
|
export interface WorkspaceInstanceConditions {
|
|
133
154
|
// Failed contains the reason the workspace failed to operate. If this field is empty, the workspace has not failed.
|
|
134
|
-
failed
|
|
155
|
+
// failed contains technical details for the failure of the workspace.
|
|
156
|
+
failed?: string;
|
|
135
157
|
|
|
136
158
|
// timeout contains the reason the workspace has timed out. If this field is empty, the workspace has not timed out.
|
|
137
|
-
timeout?: string
|
|
159
|
+
timeout?: string;
|
|
138
160
|
|
|
139
161
|
// PullingImages marks if the workspace is currently pulling its images. This condition can only be set during PhaseCreating
|
|
140
|
-
pullingImages?: boolean
|
|
162
|
+
pullingImages?: boolean;
|
|
141
163
|
|
|
142
164
|
// deployed marks that a workspace instance was sent/deployed at a workspace manager
|
|
143
165
|
deployed?: boolean;
|
|
@@ -148,7 +170,10 @@ export interface WorkspaceInstanceConditions {
|
|
|
148
170
|
// ISO8601 timestamp when the first user activity was registered in the frontend. Only set if the workspace is running.
|
|
149
171
|
firstUserActivity?: string;
|
|
150
172
|
|
|
151
|
-
//
|
|
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
|
|
152
177
|
headlessTaskFailed?: string;
|
|
153
178
|
|
|
154
179
|
// stopped_by_request is true if the workspace was stopped using a StopWorkspace call
|
|
@@ -156,10 +181,10 @@ export interface WorkspaceInstanceConditions {
|
|
|
156
181
|
}
|
|
157
182
|
|
|
158
183
|
// AdmissionLevel describes who can access a workspace instance and its ports.
|
|
159
|
-
export type AdmissionLevel =
|
|
184
|
+
export type AdmissionLevel = "owner_only" | "everyone";
|
|
160
185
|
|
|
161
186
|
// PortVisibility describes how a port can be accessed
|
|
162
|
-
export type PortVisibility =
|
|
187
|
+
export type PortVisibility = "public" | "private";
|
|
163
188
|
|
|
164
189
|
// WorkspaceInstancePort describes a port exposed on a workspace instance
|
|
165
190
|
export interface WorkspaceInstancePort {
|
|
@@ -185,19 +210,25 @@ export interface WorkspaceInstanceRepoStatus {
|
|
|
185
210
|
uncommitedFiles?: string[];
|
|
186
211
|
|
|
187
212
|
// the total number of uncommited files
|
|
188
|
-
totalUncommitedFiles?: number
|
|
213
|
+
totalUncommitedFiles?: number;
|
|
189
214
|
|
|
190
215
|
// untrackedFiles is the list of untracked files in the workspace, possibly truncated
|
|
191
216
|
untrackedFiles?: string[];
|
|
192
217
|
|
|
193
218
|
// the total number of untracked files
|
|
194
|
-
totalUntrackedFiles?: number
|
|
219
|
+
totalUntrackedFiles?: number;
|
|
195
220
|
|
|
196
221
|
// unpushedCommits is the list of unpushed changes in the workspace, possibly truncated
|
|
197
222
|
unpushedCommits?: string[];
|
|
198
223
|
|
|
199
224
|
// the total number of unpushed changes
|
|
200
|
-
totalUnpushedCommits?: number
|
|
225
|
+
totalUnpushedCommits?: number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ConfigurationIdeConfig ide config of WorkspaceInstanceConfiguration
|
|
229
|
+
export interface ConfigurationIdeConfig {
|
|
230
|
+
useLatest?: boolean;
|
|
231
|
+
desktopIdeAlias?: string;
|
|
201
232
|
}
|
|
202
233
|
|
|
203
234
|
// WorkspaceInstanceConfiguration contains all per-instance configuration
|
|
@@ -212,24 +243,35 @@ export interface WorkspaceInstanceConfiguration {
|
|
|
212
243
|
// ideImage is the ref of the IDE image this instance uses.
|
|
213
244
|
ideImage: string;
|
|
214
245
|
|
|
246
|
+
// ideImageLayers are images needed for the ide to run,
|
|
247
|
+
// including ide-desktop, desktop-plugin and so on
|
|
248
|
+
ideImageLayers?: string[];
|
|
249
|
+
|
|
215
250
|
// desktopIdeImage is the ref of the desktop IDE image this instance uses.
|
|
216
|
-
|
|
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;
|
|
217
257
|
|
|
218
258
|
// supervisorImage is the ref of the supervisor image this instance uses.
|
|
219
259
|
supervisorImage?: string;
|
|
260
|
+
|
|
261
|
+
ideConfig?: ConfigurationIdeConfig;
|
|
220
262
|
}
|
|
221
263
|
|
|
222
264
|
/**
|
|
223
265
|
* Holds information about the image build (if there was one) for this WorkspaceInstance
|
|
224
266
|
*/
|
|
225
267
|
export interface ImageBuildInfo {
|
|
226
|
-
log?: ImageBuildLogInfo
|
|
268
|
+
log?: ImageBuildLogInfo;
|
|
227
269
|
}
|
|
228
270
|
|
|
229
271
|
/**
|
|
230
272
|
* Holds information about how to access logs for this an image build
|
|
231
273
|
*/
|
|
232
274
|
export interface ImageBuildLogInfo {
|
|
233
|
-
url: string
|
|
234
|
-
headers: { [key: string]: string }
|
|
275
|
+
url: string;
|
|
276
|
+
headers: { [key: string]: string };
|
|
235
277
|
}
|
package/src/wsready.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022 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 2022-11-25 13:39:08.995865257 +0000 UTC m=+0.015035221
|
|
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
|
}
|