@gitpod/gitpod-protocol 0.1.5-private-repos-after-cancellation.0 → 0.1.5-protected-secrets.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/gitpod-schema.json +145 -7
- package/lib/accounting-protocol.d.ts +18 -12
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +43 -42
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +28 -4
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +2 -13
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +12 -2
- package/lib/analytics.d.ts.map +1 -1
- package/lib/analytics.js.map +1 -1
- package/lib/attribution.d.ts +23 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +50 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts.map +1 -1
- package/lib/billing-mode.d.ts +43 -0
- package/lib/billing-mode.d.ts.map +1 -0
- package/lib/billing-mode.js +44 -0
- package/lib/billing-mode.js.map +1 -0
- package/lib/blocked-repositories-protocol.d.ts +13 -0
- package/lib/blocked-repositories-protocol.d.ts.map +1 -0
- package/lib/blocked-repositories-protocol.js +8 -0
- package/lib/blocked-repositories-protocol.js.map +1 -0
- package/lib/context-url.d.ts +18 -5
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +63 -10
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +2 -0
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +81 -48
- package/lib/context-url.spec.js.map +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +4 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +25 -26
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -37
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +30 -44
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +31 -38
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +0 -6
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +7 -27
- package/lib/env.js.map +1 -1
- package/lib/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +10 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +36 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +51 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +22 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +10 -0
- package/lib/experiments/types.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +26 -42
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +145 -142
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +127 -52
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +190 -315
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +3 -13
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +3 -8
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +1 -1
- package/lib/ide-protocol.d.ts +113 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/{util/without.js → ide-protocol.js} +2 -2
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +16 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +30 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +31 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/license-protocol.d.ts +7 -0
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +3 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +173 -36
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +4 -4
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +42 -59
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +19 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +82 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +10 -2
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +20 -4
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/handler.js +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +24 -60
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +3 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +75 -162
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/payment-protocol.d.ts.map +1 -1
- package/lib/payment-protocol.js +1 -1
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +9 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +39 -31
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +5 -4
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +229 -209
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +234 -143
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +339 -193
- package/lib/protocol.js.map +1 -1
- package/{src/util/without.ts → lib/protocol.spec.d.ts} +2 -3
- package/lib/protocol.spec.d.ts.map +1 -0
- package/lib/protocol.spec.js +127 -0
- package/lib/protocol.spec.js.map +1 -0
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/{src/theia-plugins.ts → lib/snapshot-url.spec.d.ts} +2 -6
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +22 -4
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +33 -18
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +130 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +30 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +2 -2
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/usage.d.ts +61 -0
- package/lib/usage.d.ts.map +1 -0
- package/lib/usage.js +14 -0
- package/lib/usage.js.map +1 -0
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +44 -26
- package/lib/util/analytics.js.map +1 -1
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +57 -135
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +11 -11
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/debug-app.d.ts +25 -0
- package/lib/util/debug-app.d.ts.map +1 -0
- package/lib/util/debug-app.js +100 -0
- package/lib/util/debug-app.js.map +1 -0
- package/lib/util/deferred.js +10 -12
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +27 -40
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +63 -77
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -0
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +32 -47
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +6 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +469 -504
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +68 -78
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +41 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +4 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +124 -114
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +97 -135
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +34 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +90 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/{theia-plugins.js → util/jaeger-client-types.js} +1 -1
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +132 -129
- package/lib/util/logging.js.map +1 -1
- package/lib/util/logging.spec.d.ts +7 -0
- package/lib/util/logging.spec.d.ts.map +1 -0
- package/lib/util/logging.spec.js +52 -0
- package/lib/util/logging.spec.js.map +1 -0
- package/lib/util/make-link.js +5 -5
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/nice-grpc.d.ts +9 -0
- package/lib/util/nice-grpc.d.ts.map +1 -0
- package/lib/util/nice-grpc.js +119 -0
- package/lib/util/nice-grpc.js.map +1 -0
- package/lib/util/parse-workspace-id.d.ts +10 -0
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +30 -7
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +4 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +123 -84
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +147 -288
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +2 -0
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +29 -17
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +2 -0
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +54 -23
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +52 -6
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +197 -64
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.d.ts +7 -7
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +9 -12
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/webhook-event.d.ts +44 -0
- package/lib/webhook-event.d.ts.map +1 -0
- package/lib/webhook-event.js +8 -0
- package/lib/webhook-event.js.map +1 -0
- package/lib/workspace-class.d.ts +14 -0
- package/lib/workspace-class.d.ts.map +1 -0
- package/lib/workspace-class.js +8 -0
- package/lib/workspace-class.js.map +1 -0
- package/lib/workspace-cluster.d.ts +15 -5
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +19 -4
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +44 -5
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +34 -15
- package/pkg-yarn.lock +21 -9
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +66 -54
- package/src/admin-protocol.ts +53 -21
- package/src/analytics.ts +28 -16
- package/src/attribution.ts +59 -0
- package/src/auth.ts +2 -2
- package/src/billing-mode.ts +81 -0
- package/src/blocked-repositories-protocol.ts +13 -0
- package/src/context-url.spec.ts +37 -9
- package/src/context-url.ts +94 -36
- package/src/encryption/container-module.ts +2 -3
- package/src/encryption/encryption-engine.spec.ts +9 -8
- package/src/encryption/encryption-engine.ts +20 -16
- package/src/encryption/encryption-service.ts +4 -5
- package/src/encryption/key-provider.ts +16 -19
- package/src/env.ts +0 -22
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +41 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +286 -143
- package/src/headless-workspace-log.ts +8 -19
- package/src/ide-frontend-service.ts +2 -2
- package/src/ide-protocol.ts +129 -0
- package/src/index.ts +16 -12
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +12 -6
- package/src/messaging/browser/connection.ts +185 -21
- package/src/messaging/browser/window-connection.ts +39 -29
- package/src/messaging/client-call-metrics.ts +77 -0
- package/src/messaging/error.ts +29 -7
- package/src/messaging/handler.ts +13 -1
- package/src/messaging/node/connection.ts +23 -70
- package/src/messaging/proxy-factory.ts +35 -34
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +2 -2
- package/src/permission.ts +40 -33
- package/src/plans.ts +240 -189
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +612 -340
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +59 -23
- package/src/teams-projects-protocol.ts +166 -0
- package/src/typings/globals.ts +4 -4
- package/src/usage.ts +71 -0
- package/src/util/analytics.ts +56 -18
- package/src/util/async-iterator.ts +4 -5
- package/src/util/cancelable.ts +3 -3
- package/src/util/date-time.ts +8 -8
- package/src/util/debug-app.ts +81 -0
- package/src/util/deferred.ts +6 -6
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +14 -6
- package/src/util/generate-workspace-id.spec.ts +34 -7
- package/src/util/generate-workspace-id.ts +464 -440
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +40 -13
- package/src/util/gitpod-host-url.ts +61 -37
- package/src/util/grpc.ts +104 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +156 -74
- package/src/util/make-link.ts +6 -7
- package/src/util/nice-grpc.ts +93 -0
- package/src/util/parse-workspace-id.spec.ts +37 -8
- package/src/util/parse-workspace-id.ts +32 -7
- package/src/util/queue.spec.ts +27 -25
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +4 -6
- package/src/util/skip-if.ts +9 -6
- package/src/util/timeutil.spec.ts +40 -14
- package/src/util/timeutil.ts +27 -11
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +200 -31
- package/src/util/workspace-port-authentication.ts +10 -13
- package/src/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +29 -10
- package/src/workspace-instance.ts +89 -24
- package/src/wsready.ts +3 -3
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/email-protocol.d.ts +0 -50
- package/lib/email-protocol.d.ts.map +0 -1
- package/lib/email-protocol.js +0 -28
- package/lib/email-protocol.js.map +0 -1
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
- package/src/email-protocol.ts +0 -67
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
package/data/gitpod-schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"name": {
|
|
41
41
|
"type": "string",
|
|
42
|
-
"
|
|
43
|
-
"description": "Port name (deprecated)."
|
|
42
|
+
"description": "Port name."
|
|
44
43
|
},
|
|
45
44
|
"protocol": {
|
|
46
45
|
"type": "string",
|
|
@@ -51,6 +50,10 @@
|
|
|
51
50
|
],
|
|
52
51
|
"deprecationMessage": "The 'protocol' property is deprecated.",
|
|
53
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."
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
59
|
"additionalProperties": false
|
|
@@ -133,13 +136,38 @@
|
|
|
133
136
|
},
|
|
134
137
|
"additionalProperties": false
|
|
135
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
|
+
},
|
|
136
164
|
"checkoutLocation": {
|
|
137
165
|
"type": "string",
|
|
138
|
-
"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."
|
|
139
167
|
},
|
|
140
168
|
"workspaceLocation": {
|
|
141
169
|
"type": "string",
|
|
142
|
-
"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."
|
|
143
171
|
},
|
|
144
172
|
"gitConfig": {
|
|
145
173
|
"type": [
|
|
@@ -181,6 +209,18 @@
|
|
|
181
209
|
"type": "boolean",
|
|
182
210
|
"description": "Add a Review in Gitpod badge to pull requests. Defaults to true."
|
|
183
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
|
+
},
|
|
184
224
|
"addLabel": {
|
|
185
225
|
"type": [
|
|
186
226
|
"boolean",
|
|
@@ -206,7 +246,105 @@
|
|
|
206
246
|
}
|
|
207
247
|
}
|
|
208
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
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"experimentalNetwork": {
|
|
290
|
+
"type": "boolean",
|
|
291
|
+
"deprecationMessage": "The 'experimentalNetwork' property is deprecated.",
|
|
292
|
+
"description": "Experimental network configuration in workspaces (deprecated). Enabled by default"
|
|
293
|
+
},
|
|
294
|
+
"coreDump": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"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.",
|
|
297
|
+
"deprecationMessage": "The 'coreDump' property is experimental.",
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"properties": {
|
|
300
|
+
"enabled": {
|
|
301
|
+
"type": "boolean"
|
|
302
|
+
},
|
|
303
|
+
"softLimit": {
|
|
304
|
+
"type": "number",
|
|
305
|
+
"description": "upper limit on the size of the core dump file that will be produced if it receives a core dump signal"
|
|
306
|
+
},
|
|
307
|
+
"hardLimit": {
|
|
308
|
+
"type": "number",
|
|
309
|
+
"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"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
209
312
|
}
|
|
210
313
|
},
|
|
211
|
-
"additionalProperties": false
|
|
212
|
-
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"definitions": {
|
|
316
|
+
"jetbrainsProduct": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": false,
|
|
319
|
+
"properties": {
|
|
320
|
+
"plugins": {
|
|
321
|
+
"type": "array",
|
|
322
|
+
"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.",
|
|
323
|
+
"items": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"prebuilds": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"description": "Enable warming up of JetBrains backend in prebuilds.",
|
|
330
|
+
"additionalProperties": false,
|
|
331
|
+
"properties": {
|
|
332
|
+
"version": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"enum": [
|
|
335
|
+
"stable",
|
|
336
|
+
"latest",
|
|
337
|
+
"both"
|
|
338
|
+
],
|
|
339
|
+
"description": "Whether only stable, latest or both versions should be warmed up. Default is stable only."
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"vmoptions": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "Configure JVM options, for instance '-Xmx=4096m'."
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
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,11 +117,18 @@ 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
133
|
function calculateCurrentPeriod(startDate: string, now: Date): {
|
|
128
134
|
startDate: string;
|
|
@@ -135,7 +141,7 @@ export interface Period {
|
|
|
135
141
|
endDate: string;
|
|
136
142
|
}
|
|
137
143
|
export declare type MaybePeriod = Period | undefined;
|
|
138
|
-
export declare type AccountEntryFixedPeriod =
|
|
144
|
+
export declare type AccountEntryFixedPeriod = Omit<AccountEntry, "uid"> & {
|
|
139
145
|
expiryDate: string;
|
|
140
146
|
};
|
|
141
147
|
export interface AccountStatement extends Period {
|
|
@@ -149,7 +155,7 @@ export interface AccountStatement extends Period {
|
|
|
149
155
|
/** Remaining valid hours (accumulated from credits) */
|
|
150
156
|
remainingHours: RemainingHours;
|
|
151
157
|
}
|
|
152
|
-
export declare type RemainingHours = number |
|
|
158
|
+
export declare type RemainingHours = number | "unlimited";
|
|
153
159
|
export interface CreditAlert {
|
|
154
160
|
userId: string;
|
|
155
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,MAAM,CAAC;IAEf,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,yBAAiB,YAAY,CAAC;IAC1B,SAAgB,MAAM,CAAC,CAAC,SAAS,YAAY,EAAE,KA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AAK,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"}
|
|
@@ -5,106 +5,107 @@
|
|
|
5
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
101
|
function calculateCurrentPeriod(startDate, now) {
|
|
100
|
-
|
|
102
|
+
let nextStartDate = startDate;
|
|
101
103
|
do {
|
|
102
104
|
startDate = nextStartDate;
|
|
103
|
-
nextStartDate = timeutil_1.oneMonthLater(startDate, new Date(startDate).getDate());
|
|
105
|
+
nextStartDate = (0, timeutil_1.oneMonthLater)(startDate, new Date(startDate).getDate());
|
|
104
106
|
} while (nextStartDate < now.toISOString());
|
|
105
|
-
return { startDate
|
|
107
|
+
return { startDate, endDate: nextStartDate };
|
|
106
108
|
}
|
|
107
109
|
Subscription.calculateCurrentPeriod = calculateCurrentPeriod;
|
|
108
|
-
;
|
|
109
110
|
})(Subscription = exports.Subscription || (exports.Subscription = {}));
|
|
110
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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AAa,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
|
@@ -4,27 +4,45 @@
|
|
|
4
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 { InstallationAdminSettings } from "./installation-admin-protocol";
|
|
14
|
+
import { BillingMode } from "./billing-mode";
|
|
11
15
|
export interface AdminServer {
|
|
12
16
|
adminGetUsers(req: AdminGetListRequest<User>): Promise<AdminGetListResult<User>>;
|
|
13
17
|
adminGetUser(id: string): Promise<User>;
|
|
14
18
|
adminBlockUser(req: AdminBlockUserRequest): Promise<User>;
|
|
15
19
|
adminDeleteUser(id: string): Promise<void>;
|
|
20
|
+
adminVerifyUser(id: string): Promise<User>;
|
|
16
21
|
adminModifyRoleOrPermission(req: AdminModifyRoleOrPermissionRequest): Promise<User>;
|
|
17
22
|
adminModifyPermanentWorkspaceFeatureFlag(req: AdminModifyPermanentWorkspaceFeatureFlagRequest): Promise<User>;
|
|
23
|
+
adminCreateBlockedRepository(urlRegexp: string, blockUser: boolean): Promise<BlockedRepository>;
|
|
24
|
+
adminDeleteBlockedRepository(id: number): Promise<void>;
|
|
25
|
+
adminGetBlockedRepositories(req: AdminGetListRequest<BlockedRepository>): Promise<AdminGetListResult<BlockedRepository>>;
|
|
26
|
+
adminGetTeamMembers(teamId: string): Promise<TeamMemberInfo[]>;
|
|
27
|
+
adminGetTeams(req: AdminGetListRequest<Team>): Promise<AdminGetListResult<Team>>;
|
|
28
|
+
adminGetTeamById(id: string): Promise<Team | undefined>;
|
|
29
|
+
adminSetTeamMemberRole(teamId: string, userId: string, role: TeamMemberRole): Promise<void>;
|
|
18
30
|
adminGetWorkspaces(req: AdminGetWorkspacesRequest): Promise<AdminGetListResult<WorkspaceAndInstance>>;
|
|
19
31
|
adminGetWorkspace(id: string): Promise<WorkspaceAndInstance>;
|
|
20
32
|
adminForceStopWorkspace(id: string): Promise<void>;
|
|
21
33
|
adminRestoreSoftDeletedWorkspace(id: string): Promise<void>;
|
|
34
|
+
adminGetProjectsBySearchTerm(req: AdminGetListRequest<Project>): Promise<AdminGetListResult<Project>>;
|
|
35
|
+
adminGetProjectById(id: string): Promise<Project | undefined>;
|
|
36
|
+
adminFindPrebuilds(params: FindPrebuildsParams): Promise<PrebuildWithStatus[]>;
|
|
22
37
|
adminSetLicense(key: string): Promise<void>;
|
|
23
38
|
adminGetAccountStatement(userId: string): Promise<AccountStatement>;
|
|
24
39
|
adminSetProfessionalOpenSource(userId: string, shouldGetProfOSS: boolean): Promise<void>;
|
|
25
40
|
adminIsStudent(userId: string): Promise<boolean>;
|
|
26
41
|
adminAddStudentEmailDomain(userId: string, domain: string): Promise<void>;
|
|
27
42
|
adminGrantExtraHours(userId: string, extraHours: number): Promise<void>;
|
|
43
|
+
adminGetBillingMode(attributionId: string): Promise<BillingMode>;
|
|
44
|
+
adminGetSettings(): Promise<InstallationAdminSettings>;
|
|
45
|
+
adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
|
|
28
46
|
}
|
|
29
47
|
export interface AdminGetListRequest<T> {
|
|
30
48
|
offset: number;
|
|
@@ -55,7 +73,7 @@ export interface AdminModifyPermanentWorkspaceFeatureFlagRequest {
|
|
|
55
73
|
add: boolean;
|
|
56
74
|
}[];
|
|
57
75
|
}
|
|
58
|
-
export interface WorkspaceAndInstance extends
|
|
76
|
+
export interface WorkspaceAndInstance extends Omit<Workspace, "id" | "creationTime">, Omit<WorkspaceInstance, "id" | "creationTime"> {
|
|
59
77
|
workspaceId: string;
|
|
60
78
|
workspaceCreationTime: string;
|
|
61
79
|
instanceId: string;
|
|
@@ -66,7 +84,13 @@ export declare namespace WorkspaceAndInstance {
|
|
|
66
84
|
function toWorkspace(wai: WorkspaceAndInstance): Workspace;
|
|
67
85
|
function toInstance(wai: WorkspaceAndInstance): WorkspaceInstance | undefined;
|
|
68
86
|
}
|
|
69
|
-
export
|
|
87
|
+
export declare type AdminGetWorkspacesRequest = AdminGetListRequest<WorkspaceAndInstance> & AdminGetWorkspacesQuery;
|
|
88
|
+
/** The fields are meant to be used either OR (not combined) */
|
|
89
|
+
export declare type AdminGetWorkspacesQuery = {
|
|
90
|
+
/** we use this field in case we have a UUIDv4 and don't know whether it's an (old) workspace or instance id */
|
|
91
|
+
instanceIdOrWorkspaceId?: string;
|
|
92
|
+
instanceId?: string;
|
|
93
|
+
workspaceId?: string;
|
|
70
94
|
ownerId?: string;
|
|
71
|
-
}
|
|
95
|
+
};
|
|
72
96
|
//# sourceMappingURL=admin-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-protocol.d.ts","sourceRoot":"","sources":["../src/admin-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,yBAAyB,EAAE,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licensed under the GNU Affero General Public License (AGPL).
|
|
5
5
|
* See License-AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
|
-
var __assign = (this && this.__assign) || function () {
|
|
8
|
-
__assign = Object.assign || function(t) {
|
|
9
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
-
s = arguments[i];
|
|
11
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12
|
-
t[p] = s[p];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
return __assign.apply(this, arguments);
|
|
17
|
-
};
|
|
18
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
8
|
exports.WorkspaceAndInstance = void 0;
|
|
20
9
|
var WorkspaceAndInstance;
|
|
21
10
|
(function (WorkspaceAndInstance) {
|
|
22
11
|
function toWorkspace(wai) {
|
|
23
|
-
return
|
|
12
|
+
return Object.assign({ id: wai.workspaceId, creationTime: wai.workspaceCreationTime }, wai);
|
|
24
13
|
}
|
|
25
14
|
WorkspaceAndInstance.toWorkspace = toWorkspace;
|
|
26
15
|
function toInstance(wai) {
|
|
27
16
|
if (!wai.instanceId) {
|
|
28
17
|
return undefined;
|
|
29
18
|
}
|
|
30
|
-
return
|
|
19
|
+
return Object.assign({ id: wai.instanceId, creationTime: wai.instanceCreationTime }, wai);
|
|
31
20
|
}
|
|
32
21
|
WorkspaceAndInstance.toInstance = toInstance;
|
|
33
22
|
})(WorkspaceAndInstance = exports.WorkspaceAndInstance || (exports.WorkspaceAndInstance = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-protocol.js","sourceRoot":"","sources":["../src/admin-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"admin-protocol.js","sourceRoot":"","sources":["../src/admin-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkGH,IAAiB,oBAAoB,CAmBpC;AAnBD,WAAiB,oBAAoB;IACjC,SAAgB,WAAW,CAAC,GAAyB;QACjD,uBACI,EAAE,EAAE,GAAG,CAAC,WAAW,EACnB,YAAY,EAAE,GAAG,CAAC,qBAAqB,IACpC,GAAG,EACR;IACN,CAAC;IANe,gCAAW,cAM1B,CAAA;IAED,SAAgB,UAAU,CAAC,GAAyB;QAChD,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;YACjB,OAAO,SAAS,CAAC;SACpB;QACD,uBACI,EAAE,EAAE,GAAG,CAAC,UAAU,EAClB,YAAY,EAAE,GAAG,CAAC,oBAAoB,IACnC,GAAG,EACR;IACN,CAAC;IATe,+BAAU,aASzB,CAAA;AACL,CAAC,EAnBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAmBpC"}
|
package/lib/analytics.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
|
-
import { Without } from "./util/without";
|
|
7
6
|
export declare const IAnalyticsWriter: unique symbol;
|
|
8
7
|
declare type Identity = {
|
|
9
8
|
userId: string | number;
|
|
9
|
+
anonymousId?: string | number;
|
|
10
10
|
} | {
|
|
11
11
|
userId?: string | number;
|
|
12
12
|
anonymousId: string | number;
|
|
@@ -25,10 +25,20 @@ export declare type TrackMessage = Message & Identity & {
|
|
|
25
25
|
timestamp?: Date;
|
|
26
26
|
context?: any;
|
|
27
27
|
};
|
|
28
|
-
export declare type
|
|
28
|
+
export declare type PageMessage = Message & Identity & {
|
|
29
|
+
properties?: any;
|
|
30
|
+
timestamp?: Date;
|
|
31
|
+
context?: any;
|
|
32
|
+
};
|
|
33
|
+
export declare type RemoteTrackMessage = Omit<TrackMessage, "timestamp" | "userId">;
|
|
34
|
+
export declare type RemotePageMessage = Omit<PageMessage, "timestamp" | "userId"> & {
|
|
35
|
+
includePII?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare type RemoteIdentifyMessage = Omit<IdentifyMessage, "timestamp" | "userId">;
|
|
29
38
|
export interface IAnalyticsWriter {
|
|
30
39
|
identify(msg: IdentifyMessage): void;
|
|
31
40
|
track(msg: TrackMessage): void;
|
|
41
|
+
page(msg: PageMessage): void;
|
|
32
42
|
}
|
|
33
43
|
export {};
|
|
34
44
|
//# sourceMappingURL=analytics.d.ts.map
|