@gitpod/gitpod-protocol 0.1.5-main.648 → 0.1.5-main.6480
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/gitpod-schema.json +157 -29
- package/lib/accounting-protocol.d.ts +19 -14
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +44 -48
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +44 -5
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +16 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +44 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/analytics.js +10 -0
- package/lib/analytics.js.map +1 -0
- package/lib/attribution.d.ts +24 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +54 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts +1 -1
- package/lib/auth.d.ts.map +1 -1
- package/lib/auth.js +1 -1
- package/lib/billing-mode.d.ts +45 -0
- package/lib/billing-mode.d.ts.map +1 -0
- package/lib/billing-mode.js +44 -0
- package/lib/billing-mode.js.map +1 -0
- package/lib/blocked-repositories-protocol.d.ts +13 -0
- package/lib/blocked-repositories-protocol.d.ts.map +1 -0
- package/lib/blocked-repositories-protocol.js +8 -0
- package/lib/blocked-repositories-protocol.js.map +1 -0
- package/lib/context-url.d.ts +30 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +100 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +12 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +81 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/encryption/container-module.d.ts +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +5 -5
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +26 -27
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +30 -38
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +31 -45
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +32 -39
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -7
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +8 -28
- package/lib/env.js.map +1 -1
- package/lib/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +10 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +37 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +51 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +22 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +10 -0
- package/lib/experiments/types.js.map +1 -0
- package/lib/frontend-dashboard-service.d.ts +90 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +49 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +27 -43
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +1 -1
- package/lib/gitpod-file-parser.spec.js +146 -143
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +191 -55
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +204 -298
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +10 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +7 -9
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +2 -2
- package/lib/ide-frontend-service.js +1 -1
- package/lib/ide-protocol.d.ts +126 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +18 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +17 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +30 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +31 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/license-protocol.d.ts +8 -1
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +4 -6
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +176 -45
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +5 -5
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +43 -60
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +21 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +95 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +13 -3
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +25 -5
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/handler.js +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +24 -60
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +3 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +75 -162
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/payment-protocol.d.ts +1 -1
- package/lib/payment-protocol.d.ts.map +1 -1
- package/lib/payment-protocol.js +2 -2
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +14 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +45 -32
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +6 -5
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +230 -210
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +261 -105
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +346 -205
- package/lib/protocol.js.map +1 -1
- package/{src/util/without.ts → lib/protocol.spec.d.ts} +3 -4
- package/lib/protocol.spec.d.ts.map +1 -0
- package/lib/protocol.spec.js +127 -0
- package/lib/protocol.spec.js.map +1 -0
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/lib/snapshot-url.spec.d.ts +7 -0
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +24 -5
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +36 -18
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +137 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +41 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +3 -3
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/typings/globals.js +1 -1
- package/lib/usage.d.ts +73 -0
- package/lib/usage.d.ts.map +1 -0
- package/lib/usage.js +20 -0
- package/lib/usage.js.map +1 -0
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +88 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.d.ts +1 -1
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +58 -136
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +18 -60
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +12 -12
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/debug-app.d.ts +25 -0
- package/lib/util/debug-app.d.ts.map +1 -0
- package/lib/util/debug-app.js +100 -0
- package/lib/util/debug-app.js.map +1 -0
- package/lib/util/deep-partial.d.ts +1 -1
- package/lib/util/deep-partial.js +1 -1
- package/lib/util/deferred.d.ts +1 -1
- package/lib/util/deferred.js +11 -13
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +27 -40
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +63 -77
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +2 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +33 -48
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +6 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +469 -502
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.d.ts +1 -1
- package/lib/util/generate-workspace-id.spec.js +69 -79
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +41 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +12 -7
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +132 -110
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +7 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +113 -31
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +35 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +90 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/{theia-plugins.js → util/jaeger-client-types.js} +2 -2
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +50 -34
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +133 -130
- package/lib/util/logging.js.map +1 -1
- package/lib/util/logging.spec.d.ts +7 -0
- package/lib/util/logging.spec.d.ts.map +1 -0
- package/lib/util/logging.spec.js +52 -0
- package/lib/util/logging.spec.js.map +1 -0
- package/lib/util/make-link.d.ts +1 -1
- package/lib/util/make-link.js +6 -6
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/nice-grpc.d.ts +9 -0
- package/lib/util/nice-grpc.d.ts.map +1 -0
- package/lib/util/nice-grpc.js +121 -0
- package/lib/util/nice-grpc.js.map +1 -0
- package/lib/util/parse-workspace-id.d.ts +11 -1
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +5 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +124 -85
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +17 -56
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +148 -289
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/semaphore.d.ts +1 -1
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js +16 -47
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +7 -7
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +3 -1
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +30 -18
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +3 -1
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +55 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +53 -7
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +198 -65
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.d.ts +8 -8
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +10 -13
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/webhook-event.d.ts +44 -0
- package/lib/webhook-event.d.ts.map +1 -0
- package/lib/webhook-event.js +8 -0
- package/lib/webhook-event.js.map +1 -0
- package/lib/workspace-class.d.ts +14 -0
- package/lib/workspace-class.d.ts.map +1 -0
- package/lib/workspace-class.js +8 -0
- package/lib/workspace-class.js.map +1 -0
- package/lib/workspace-cluster.d.ts +28 -8
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +20 -5
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +46 -6
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +1 -1
- package/lib/wsready.d.ts +8 -2
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +3 -3
- package/package.json +40 -18
- package/pkg-yarn.lock +23 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +67 -58
- package/src/admin-protocol.ts +88 -20
- package/src/analytics.ts +52 -0
- package/src/attribution.ts +63 -0
- package/src/auth.ts +3 -3
- package/src/billing-mode.ts +84 -0
- package/src/blocked-repositories-protocol.ts +13 -0
- package/src/context-url.spec.ts +49 -0
- package/src/context-url.ts +107 -0
- package/src/encryption/container-module.ts +3 -4
- package/src/encryption/encryption-engine.spec.ts +10 -9
- package/src/encryption/encryption-engine.ts +21 -17
- package/src/encryption/encryption-service.ts +5 -6
- package/src/encryption/key-provider.ts +17 -20
- package/src/env.ts +2 -25
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +42 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/frontend-dashboard-service.ts +125 -0
- package/src/gitpod-file-parser.spec.ts +56 -62
- package/src/gitpod-file-parser.ts +17 -18
- package/src/gitpod-service.ts +369 -146
- package/src/headless-workspace-log.ts +13 -15
- package/src/ide-frontend-service.ts +3 -3
- package/src/ide-protocol.ts +147 -0
- package/src/index.ts +17 -11
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +13 -7
- package/src/messaging/browser/connection.ts +187 -28
- package/src/messaging/browser/window-connection.ts +40 -30
- package/src/messaging/client-call-metrics.ts +94 -0
- package/src/messaging/error.ts +36 -8
- package/src/messaging/handler.ts +13 -1
- package/src/messaging/node/connection.ts +23 -70
- package/src/messaging/proxy-factory.ts +35 -34
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +3 -3
- package/src/permission.ts +47 -34
- package/src/plans.ts +250 -199
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +636 -293
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +62 -23
- package/src/teams-projects-protocol.ts +181 -0
- package/src/typings/globals.ts +6 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +5 -6
- package/src/util/cancelable.ts +4 -4
- package/src/util/date-time.ts +9 -9
- package/src/util/debug-app.ts +81 -0
- package/src/util/deep-partial.ts +1 -1
- package/src/util/deferred.ts +7 -7
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +17 -9
- package/src/util/generate-workspace-id.spec.ts +38 -11
- package/src/util/generate-workspace-id.ts +465 -439
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +59 -8
- package/src/util/gitpod-host-url.ts +88 -48
- package/src/util/grpc.ts +107 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +157 -75
- package/src/util/make-link.ts +7 -8
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +38 -9
- package/src/util/parse-workspace-id.ts +33 -8
- package/src/util/queue.spec.ts +28 -26
- package/src/util/queue.ts +1 -1
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +7 -9
- package/src/util/skip-if.ts +11 -8
- package/src/util/timeutil.spec.ts +41 -15
- package/src/util/timeutil.ts +32 -16
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +201 -32
- package/src/util/workspace-port-authentication.ts +11 -14
- package/src/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +47 -17
- package/src/workspace-instance.ts +106 -32
- package/src/wsready.ts +11 -4
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/email-protocol.d.ts +0 -50
- package/lib/email-protocol.d.ts.map +0 -1
- package/lib/email-protocol.js +0 -28
- package/lib/email-protocol.js.map +0 -1
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js.map +0 -1
- package/lib/util/context-url.d.ts +0 -13
- package/lib/util/context-url.d.ts.map +0 -1
- package/lib/util/context-url.js +0 -26
- package/lib/util/context-url.js.map +0 -1
- package/lib/util/context-url.spec.d.ts +0 -10
- package/lib/util/context-url.spec.d.ts.map +0 -1
- package/lib/util/context-url.spec.js +0 -52
- package/lib/util/context-url.spec.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js +0 -8
- package/lib/util/without.js.map +0 -1
- package/src/email-protocol.ts +0 -67
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/theia-plugins.ts +0 -11
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
export interface OssAllowList {
|
|
7
|
+
/**
|
|
8
|
+
* A string that identifies a GitHub/GitLab/Bitbucket identity of the form "<host>/<profilename>"
|
|
9
|
+
* E.g., "github.com/geropl"
|
|
10
|
+
*/
|
|
11
|
+
identity: string;
|
|
12
|
+
deleted?: boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=oss-allowlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oss-allowlist.d.ts","sourceRoot":"","sources":["../src/oss-allowlist.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
4
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=oss-allowlist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oss-allowlist.js","sourceRoot":"","sources":["../src/oss-allowlist.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
export declare namespace PaymentProtocol {
|
|
7
7
|
const UPDATE_GITPOD_SUBSCRIPTION_PATH = "/payment/chargebee";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-protocol.d.ts","sourceRoot":"","sources":["../src/payment-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"payment-protocol.d.ts","sourceRoot":"","sources":["../src/payment-protocol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,yBAAiB,eAAe,CAAC;IACtB,MAAM,+BAA+B,uBAAuB,CAAC;CACvE;AAED,MAAM,WAAW,UAAU;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
package/lib/payment-protocol.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
4
4
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.PaymentProtocol = void 0;
|
|
9
9
|
var PaymentProtocol;
|
|
10
10
|
(function (PaymentProtocol) {
|
|
11
|
-
PaymentProtocol.UPDATE_GITPOD_SUBSCRIPTION_PATH =
|
|
11
|
+
PaymentProtocol.UPDATE_GITPOD_SUBSCRIPTION_PATH = "/payment/chargebee";
|
|
12
12
|
})(PaymentProtocol = exports.PaymentProtocol || (exports.PaymentProtocol = {}));
|
|
13
13
|
//# sourceMappingURL=payment-protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-protocol.js","sourceRoot":"","sources":["../src/payment-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"payment-protocol.js","sourceRoot":"","sources":["../src/payment-protocol.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,IAAiB,eAAe,CAE/B;AAFD,WAAiB,eAAe;IACf,+CAA+B,GAAG,oBAAoB,CAAC;AACxE,CAAC,EAFgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE/B"}
|
package/lib/permission.d.ts
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
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
|
export declare const Permissions: {
|
|
7
7
|
monitor: undefined;
|
|
8
|
+
developer: undefined;
|
|
8
9
|
enforcement: undefined;
|
|
9
10
|
"privileged-ws": undefined;
|
|
10
11
|
"registry-access": undefined;
|
|
11
12
|
"admin-users": undefined;
|
|
12
13
|
"admin-workspaces": undefined;
|
|
14
|
+
"admin-projects": undefined;
|
|
13
15
|
"admin-api": undefined;
|
|
14
16
|
"ide-settings": undefined;
|
|
17
|
+
"new-workspace-cluster": undefined;
|
|
15
18
|
};
|
|
16
|
-
export declare type PermissionName = keyof
|
|
19
|
+
export declare type PermissionName = keyof typeof Permissions;
|
|
17
20
|
export declare const Roles: {
|
|
18
21
|
devops: undefined;
|
|
19
22
|
viewer: undefined;
|
|
20
23
|
admin: undefined;
|
|
21
24
|
};
|
|
22
|
-
export declare type RoleName = keyof
|
|
25
|
+
export declare type RoleName = keyof typeof Roles;
|
|
23
26
|
export declare type RoleOrPermission = RoleName | PermissionName;
|
|
24
27
|
export declare namespace RoleName {
|
|
25
28
|
const is: (o: any) => o is "devops" | "viewer" | "admin";
|
|
@@ -28,9 +31,14 @@ export interface Role {
|
|
|
28
31
|
name: RoleName;
|
|
29
32
|
permissions: PermissionName[];
|
|
30
33
|
}
|
|
34
|
+
export declare namespace RolesOrPermissions {
|
|
35
|
+
function toPermissionSet(rolesOrPermissions: RoleOrPermission[] | undefined): Set<PermissionName>;
|
|
36
|
+
}
|
|
31
37
|
export declare namespace Permission {
|
|
32
38
|
/** The permission to monitor the (live) state of a Gitpod installation */
|
|
33
39
|
const MONITOR: PermissionName;
|
|
40
|
+
/** The permission to develop on this running Gitpod installation */
|
|
41
|
+
const DEVELOPER: PermissionName;
|
|
34
42
|
/** The permission for actions like block user, stop workspace, etc. */
|
|
35
43
|
const ENFORCEMENT: PermissionName;
|
|
36
44
|
/** The permission for registry access (start workspaces referencing gitpod-internal Docker images) */
|
|
@@ -39,11 +47,13 @@ export declare namespace Permission {
|
|
|
39
47
|
const ADMIN_USERS: PermissionName;
|
|
40
48
|
/** The permission for accessing all workspace data */
|
|
41
49
|
const ADMIN_WORKSPACES: PermissionName;
|
|
50
|
+
/** The permission for accessing all projects data */
|
|
51
|
+
const ADMIN_PROJECTS: PermissionName;
|
|
42
52
|
/** The permission to access the admin API */
|
|
43
53
|
const ADMIN_API: PermissionName;
|
|
44
54
|
/** The permission to access the IDE settings */
|
|
45
55
|
const IDE_SETTINGS: PermissionName;
|
|
46
|
-
const is: (o: any) => o is "monitor" | "enforcement" | "privileged-ws" | "registry-access" | "admin-users" | "admin-workspaces" | "admin-api" | "ide-settings";
|
|
56
|
+
const is: (o: any) => o is "monitor" | "developer" | "enforcement" | "privileged-ws" | "registry-access" | "admin-users" | "admin-workspaces" | "admin-projects" | "admin-api" | "ide-settings" | "new-workspace-cluster";
|
|
47
57
|
const all: () => PermissionName[];
|
|
48
58
|
}
|
|
49
59
|
export declare namespace Role {
|
package/lib/permission.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAYvB,CAAC;AACF,oBAAY,cAAc,GAAG,MAAM,OAAO,WAAW,CAAC;AACtD,eAAO,MAAM,KAAK;;;;CAA6D,CAAC;AAChF,oBAAY,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAC1C,oBAAY,gBAAgB,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEzD,yBAAiB,QAAQ,CAAC;IACf,MAAM,EAAE,MAAO,GAAG,uCAExB,CAAC;CACL;AAED,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,cAAc,EAAE,CAAC;CACjC;AAED,yBAAiB,kBAAkB,CAAC;IAChC,SAAgB,eAAe,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,SAAS,GAAG,GAAG,CAAC,cAAc,CAAC,CAYvG;CACJ;AAED,yBAAiB,UAAU,CAAC;IACxB,0EAA0E;IACnE,MAAM,OAAO,EAAE,cAA0B,CAAC;IAEjD,oEAAoE;IAC7D,MAAM,SAAS,EAAE,cAA4B,CAAC;IAErD,uEAAuE;IAChE,MAAM,WAAW,EAAE,cAA8B,CAAC;IAEzD,sGAAsG;IAC/F,MAAM,eAAe,EAAE,cAAkC,CAAC;IAEjE,iDAAiD;IAC1C,MAAM,WAAW,EAAE,cAA8B,CAAC;IAEzD,sDAAsD;IAC/C,MAAM,gBAAgB,EAAE,cAAmC,CAAC;IAEnE,qDAAqD;IAC9C,MAAM,cAAc,EAAE,cAAiC,CAAC;IAE/D,6CAA6C;IACtC,MAAM,SAAS,EAAE,cAA4B,CAAC;IAErD,gDAAgD;IACzC,MAAM,YAAY,EAAE,cAA+B,CAAC;IAEpD,MAAM,EAAE,MAAO,GAAG,wMAExB,CAAC;IAEK,MAAM,GAAG,QAAO,cAAc,EAEpC,CAAC;CACL;AAED,yBAAiB,IAAI,CAAC;IAClB,iDAAiD;IAC1C,MAAM,MAAM,EAAE,IAGpB,CAAC;IAEF,kEAAkE;IAC3D,MAAM,MAAM,EAAE,IAGpB,CAAC;IAEK,MAAM,KAAK,EAAE,IASnB,CAAC;IAEK,MAAM,SAAS,SAAU,QAAQ,KAAG,IAM1C,CAAC;IAEK,MAAM,GAAG,QAAO,IAAI,EAI1B,CAAC;CACL"}
|
package/lib/permission.js
CHANGED
|
@@ -2,33 +2,54 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
4
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Role = exports.Permission = exports.RoleName = exports.Roles = exports.Permissions = void 0;
|
|
8
|
+
exports.Role = exports.Permission = exports.RolesOrPermissions = exports.RoleName = exports.Roles = exports.Permissions = void 0;
|
|
9
9
|
// see below for explanation
|
|
10
10
|
exports.Permissions = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
monitor: undefined,
|
|
12
|
+
developer: undefined,
|
|
13
|
+
enforcement: undefined,
|
|
13
14
|
"privileged-ws": undefined,
|
|
14
15
|
"registry-access": undefined,
|
|
15
16
|
"admin-users": undefined,
|
|
16
17
|
"admin-workspaces": undefined,
|
|
18
|
+
"admin-projects": undefined,
|
|
17
19
|
"admin-api": undefined,
|
|
18
|
-
"ide-settings": undefined
|
|
20
|
+
"ide-settings": undefined,
|
|
21
|
+
"new-workspace-cluster": undefined,
|
|
19
22
|
};
|
|
20
|
-
exports.Roles = {
|
|
23
|
+
exports.Roles = { devops: undefined, viewer: undefined, admin: undefined };
|
|
21
24
|
var RoleName;
|
|
22
25
|
(function (RoleName) {
|
|
23
|
-
RoleName.is =
|
|
24
|
-
return typeof (
|
|
25
|
-
&& Role.all().some(function (r) { return r.name === o; });
|
|
26
|
+
RoleName.is = (o) => {
|
|
27
|
+
return typeof o === "string" && Role.all().some((r) => r.name === o);
|
|
26
28
|
};
|
|
27
29
|
})(RoleName = exports.RoleName || (exports.RoleName = {}));
|
|
30
|
+
var RolesOrPermissions;
|
|
31
|
+
(function (RolesOrPermissions) {
|
|
32
|
+
function toPermissionSet(rolesOrPermissions) {
|
|
33
|
+
rolesOrPermissions = rolesOrPermissions || [];
|
|
34
|
+
const permissions = new Set();
|
|
35
|
+
for (const rop of rolesOrPermissions) {
|
|
36
|
+
if (Permission.is(rop)) {
|
|
37
|
+
permissions.add(rop);
|
|
38
|
+
}
|
|
39
|
+
else if (RoleName.is(rop)) {
|
|
40
|
+
Role.getByName(rop).permissions.forEach((p) => permissions.add(p));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return permissions;
|
|
44
|
+
}
|
|
45
|
+
RolesOrPermissions.toPermissionSet = toPermissionSet;
|
|
46
|
+
})(RolesOrPermissions = exports.RolesOrPermissions || (exports.RolesOrPermissions = {}));
|
|
28
47
|
var Permission;
|
|
29
48
|
(function (Permission) {
|
|
30
49
|
/** The permission to monitor the (live) state of a Gitpod installation */
|
|
31
50
|
Permission.MONITOR = "monitor";
|
|
51
|
+
/** The permission to develop on this running Gitpod installation */
|
|
52
|
+
Permission.DEVELOPER = "developer";
|
|
32
53
|
/** The permission for actions like block user, stop workspace, etc. */
|
|
33
54
|
Permission.ENFORCEMENT = "enforcement";
|
|
34
55
|
/** The permission for registry access (start workspaces referencing gitpod-internal Docker images) */
|
|
@@ -37,18 +58,17 @@ var Permission;
|
|
|
37
58
|
Permission.ADMIN_USERS = "admin-users";
|
|
38
59
|
/** The permission for accessing all workspace data */
|
|
39
60
|
Permission.ADMIN_WORKSPACES = "admin-workspaces";
|
|
61
|
+
/** The permission for accessing all projects data */
|
|
62
|
+
Permission.ADMIN_PROJECTS = "admin-projects";
|
|
40
63
|
/** The permission to access the admin API */
|
|
41
64
|
Permission.ADMIN_API = "admin-api";
|
|
42
65
|
/** The permission to access the IDE settings */
|
|
43
66
|
Permission.IDE_SETTINGS = "ide-settings";
|
|
44
|
-
Permission.is =
|
|
45
|
-
return typeof (
|
|
46
|
-
&& Permission.all().some(function (p) { return p === o; });
|
|
67
|
+
Permission.is = (o) => {
|
|
68
|
+
return typeof o === "string" && Permission.all().some((p) => p === o);
|
|
47
69
|
};
|
|
48
|
-
Permission.all =
|
|
49
|
-
return Object.keys(
|
|
50
|
-
.map(function (k) { return Permission[k]; })
|
|
51
|
-
.filter(function (k) { return typeof (k) === 'string'; });
|
|
70
|
+
Permission.all = () => {
|
|
71
|
+
return Object.keys(exports.Permissions);
|
|
52
72
|
};
|
|
53
73
|
})(Permission = exports.Permission || (exports.Permission = {}));
|
|
54
74
|
var Role;
|
|
@@ -56,41 +76,34 @@ var Role;
|
|
|
56
76
|
/** The default role for all Gitpod developers */
|
|
57
77
|
Role.DEVOPS = {
|
|
58
78
|
name: "devops",
|
|
59
|
-
permissions: [
|
|
60
|
-
Permission.MONITOR,
|
|
61
|
-
Permission.ENFORCEMENT,
|
|
62
|
-
Permission.REGISTRY_ACCESS,
|
|
63
|
-
Permission.IDE_SETTINGS
|
|
64
|
-
]
|
|
79
|
+
permissions: [Permission.MONITOR, Permission.ENFORCEMENT, Permission.REGISTRY_ACCESS, Permission.IDE_SETTINGS],
|
|
65
80
|
};
|
|
66
81
|
/** A role for people that are allowed to view Gitpod internals */
|
|
67
82
|
Role.VIEWER = {
|
|
68
83
|
name: "viewer",
|
|
69
|
-
permissions: [
|
|
70
|
-
Permission.MONITOR,
|
|
71
|
-
Permission.REGISTRY_ACCESS,
|
|
72
|
-
]
|
|
84
|
+
permissions: [Permission.MONITOR, Permission.REGISTRY_ACCESS],
|
|
73
85
|
};
|
|
74
86
|
Role.ADMIN = {
|
|
75
87
|
name: "admin",
|
|
76
88
|
permissions: [
|
|
77
89
|
Permission.ADMIN_USERS,
|
|
78
90
|
Permission.ADMIN_WORKSPACES,
|
|
91
|
+
Permission.ADMIN_PROJECTS,
|
|
79
92
|
Permission.ADMIN_API,
|
|
80
93
|
Permission.ENFORCEMENT,
|
|
81
|
-
]
|
|
94
|
+
],
|
|
82
95
|
};
|
|
83
|
-
Role.getByName =
|
|
84
|
-
|
|
96
|
+
Role.getByName = (name) => {
|
|
97
|
+
const result = Role.all().find((r) => r.name === name);
|
|
85
98
|
if (!result) {
|
|
86
99
|
throw Error("Unknown RoleName: " + name);
|
|
87
100
|
}
|
|
88
101
|
return result;
|
|
89
102
|
};
|
|
90
|
-
Role.all =
|
|
103
|
+
Role.all = () => {
|
|
91
104
|
return Object.keys(Role)
|
|
92
|
-
.map(
|
|
93
|
-
.filter(
|
|
105
|
+
.map((k) => Role[k])
|
|
106
|
+
.filter((k) => typeof k === "object");
|
|
94
107
|
};
|
|
95
108
|
})(Role = exports.Role || (exports.Role = {}));
|
|
96
109
|
//# sourceMappingURL=permission.js.map
|
package/lib/permission.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4BAA4B;AACf,QAAA,WAAW,GAAG;IACvB,OAAO,EAAE,SA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C,YAAY,CAAC;KACjH,CAAC;IAEF,kEAAkE;IACrD,WAAM,GAAS;QACxB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC;KAChE,CAAC;IAEW,UAAK,GAAS;QACvB,IAAI,EAAE,OAAO;QACb,WAAW,EAAE;YACT,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,gBAAgB;YAC3B,UAAU,CAAC,cAAc;YACzB,UAAU,CAAC,SAAS;YACpB,UAAU,CAAC,WAAW;SACzB;KACJ,CAAC;IAEW,cAAS,GAAG,CAAC,IAAc,EAAQ,EAAE;QAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,EAAE;YACT,MAAM,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;SAC5C;QACD,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;IAEW,QAAG,GAAG,GAAW,EAAE;QAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;aACnB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAE,IAAY,CAAC,CAAC,CAAC,CAAC;aAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IAC9C,CAAC,CAAC;AACN,CAAC,EArCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAqCpB"}
|
package/lib/plans.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
|
-
export declare type Currency =
|
|
6
|
+
export declare type Currency = "USD" | "EUR";
|
|
7
7
|
export declare namespace Currency {
|
|
8
8
|
const getAll: () => Currency[];
|
|
9
9
|
const getSymbol: (c: Currency) => "$" | "€";
|
|
@@ -11,8 +11,8 @@ export declare namespace Currency {
|
|
|
11
11
|
/**
|
|
12
12
|
* Different plans of the same type MAY have different prices ($/€, for example) but MUST have the same feature set.
|
|
13
13
|
*/
|
|
14
|
-
export declare type PlanType =
|
|
15
|
-
export declare type HoursPerMonthType = number |
|
|
14
|
+
export declare type PlanType = "free" | "free-50" | "free-open-source" | "student" | "basic" | "personal" | "professional" | "professional-new";
|
|
15
|
+
export declare type HoursPerMonthType = number | "unlimited";
|
|
16
16
|
export interface Plan {
|
|
17
17
|
chargebeeId: string;
|
|
18
18
|
githubId?: number;
|
|
@@ -163,7 +163,7 @@ export declare namespace Plans {
|
|
|
163
163
|
* This function returns all individual plans that might be active (= we have subscriptions for) at the moment
|
|
164
164
|
*/
|
|
165
165
|
function getAvailablePlans(currency: Currency): Plan[];
|
|
166
|
-
const getAvailableTeamPlans: (currency?:
|
|
166
|
+
const getAvailableTeamPlans: (currency?: Currency | undefined) => Plan[];
|
|
167
167
|
function getById(id: string | undefined): Plan | undefined;
|
|
168
168
|
function getByTypeAndCurrency(type: PlanType, currency: Currency): Plan | undefined;
|
|
169
169
|
function getProPlan(currency: Currency): Plan;
|
|
@@ -173,6 +173,7 @@ export declare namespace Plans {
|
|
|
173
173
|
function getPersonalPlan(currency: Currency): Plan;
|
|
174
174
|
function getFreePlan(userCreationDate: string): Plan;
|
|
175
175
|
function isFreePlan(chargebeeId: string | undefined): boolean;
|
|
176
|
+
function isFreeTier(chargebeeId: string | undefined): boolean;
|
|
176
177
|
function isFreeNonTransientPlan(chargebeeId: string | undefined): boolean;
|
|
177
178
|
function getHoursPerMonth(plan: Plan): number;
|
|
178
179
|
/**
|
package/lib/plans.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;AACrC,yBAAiB,QAAQ,CAAC;IACf,MAAM,MAAM,QAAO,QAAQ,EAEjC,
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;AACrC,yBAAiB,QAAQ,CAAC;IACf,MAAM,MAAM,QAAO,QAAQ,EAEjC,CAAC;IACK,MAAM,SAAS,MAAO,QAAQ,cAEpC,CAAC;CACL;AAED;;GAEG;AACH,oBAAY,QAAQ,GACd,MAAM,GACN,SAAS,GACT,kBAAkB,GAClB,SAAS,GACT,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,CAAC;AACzB,oBAAY,iBAAiB,GAAG,MAAM,GAAG,WAAW,CAAC;AACrD,MAAM,WAAW,IAAI;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,iBAAiB,CAAC;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AACD,yBAAiB,IAAI,CAAC;IACX,MAAM,EAAE,MAAO,GAAG,cASxB,CAAC;CACL;AAED,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC;AACD,yBAAiB,MAAM,CAAC;IACb,MAAM,EAAE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