@gitpod/gitpod-protocol 0.1.5-update-ovsx.0 → 0.1.5-update-yarnlock.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/gitpod-schema.json +159 -25
- package/lib/accounting-protocol.d.ts +165 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +120 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +51 -6
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +17 -2
- 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 +25 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +58 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts +25 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +16 -0
- package/lib/auth.js.map +1 -0
- 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 +2 -2
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +8 -6
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts +2 -2
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +28 -28
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +3 -3
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +32 -39
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts +2 -2
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +33 -46
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts +3 -3
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +34 -40
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +2 -8
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +10 -29
- package/lib/env.js.map +1 -1
- package/lib/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +10 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +37 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +51 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +22 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +10 -0
- package/lib/experiments/types.js.map +1 -0
- package/lib/frontend-dashboard-service.d.ts +99 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +55 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts +2 -2
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +29 -44
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +2 -2
- package/lib/gitpod-file-parser.spec.js +147 -144
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +290 -50
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +288 -123
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +11 -13
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +8 -9
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +26 -0
- package/lib/ide-frontend-service.d.ts.map +1 -0
- package/lib/ide-frontend-service.js +8 -0
- package/lib/ide-frontend-service.js.map +1 -0
- 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 +18 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +28 -13
- 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 +9 -2
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js +3 -2
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +6 -4
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +188 -48
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +9 -4
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +48 -59
- 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 +18 -4
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +38 -7
- 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 +2 -1
- package/lib/messaging/handler.js.map +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 -59
- 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 +76 -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 +18 -0
- package/lib/payment-protocol.d.ts.map +1 -0
- package/lib/payment-protocol.js +13 -0
- package/lib/payment-protocol.js.map +1 -0
- package/lib/permission.d.ts +26 -15
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +50 -36
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +213 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +625 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +338 -111
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +422 -201
- 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 +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 +93 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +82 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +136 -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 +8 -3
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/typings/globals.js +2 -2
- 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 +2 -2
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +60 -137
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +2 -2
- package/lib/util/cancelable.js +20 -61
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +2 -2
- package/lib/util/date-time.js +14 -13
- 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 +2 -2
- package/lib/util/deep-partial.js +2 -2
- package/lib/util/deferred.d.ts +2 -2
- package/lib/util/deferred.js +13 -14
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts +2 -2
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +28 -40
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +64 -77
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +3 -2
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +35 -49
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +9 -0
- package/lib/util/generate-workspace-id.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.js +491 -0
- package/lib/util/generate-workspace-id.js.map +1 -0
- package/lib/util/generate-workspace-id.spec.d.ts +7 -0
- package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.spec.js +98 -0
- package/lib/util/generate-workspace-id.spec.js.map +1 -0
- 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 +20 -8
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +143 -85
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +16 -0
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -0
- package/lib/util/gitpod-host-url.spec.js +134 -0
- package/lib/util/gitpod-host-url.spec.js.map +1 -0
- 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/util/jaeger-client-types.js +8 -0
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +58 -35
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +144 -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.d.ts +2 -2
- package/lib/util/make-link.js +8 -7
- 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 +15 -5
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +39 -9
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +10 -2
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +130 -49
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +2 -2
- package/lib/util/queue.js +19 -57
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.d.ts +2 -2
- package/lib/util/queue.spec.js +149 -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 +2 -2
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js +18 -48
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts +2 -2
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +9 -8
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +4 -2
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +43 -18
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +4 -2
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +57 -25
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +55 -8
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +210 -66
- 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 +9 -9
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +13 -14
- 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 +80 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +36 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +51 -8
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +2 -2
- package/lib/wsready.d.ts +8 -2
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +4 -3
- package/lib/wsready.js.map +1 -1
- package/package.json +42 -18
- package/pkg-yarn.lock +24 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +253 -0
- package/src/admin-protocol.ts +96 -21
- package/src/analytics.ts +52 -0
- package/src/attribution.ts +67 -0
- package/src/auth.ts +27 -0
- 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 +4 -5
- package/src/encryption/encryption-engine.spec.ts +11 -10
- package/src/encryption/encryption-engine.ts +22 -18
- package/src/encryption/encryption-service.ts +6 -7
- package/src/encryption/key-provider.ts +18 -21
- package/src/env.ts +3 -26
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +42 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/frontend-dashboard-service.ts +148 -0
- package/src/gitpod-file-parser.spec.ts +57 -63
- package/src/gitpod-file-parser.ts +18 -19
- package/src/gitpod-service.ts +602 -99
- package/src/headless-workspace-log.ts +14 -16
- package/src/ide-frontend-service.ts +28 -0
- package/src/ide-protocol.ts +147 -0
- package/src/index.ts +18 -12
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +14 -8
- package/src/messaging/browser/connection.ts +202 -26
- package/src/messaging/browser/window-connection.ts +45 -29
- package/src/messaging/client-call-metrics.ts +94 -0
- package/src/messaging/error.ts +51 -10
- 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 +20 -0
- package/src/permission.ts +53 -40
- package/src/plans.ts +699 -0
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +790 -302
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +153 -0
- package/src/teams-projects-protocol.ts +180 -0
- package/src/typings/globals.ts +13 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +6 -7
- package/src/util/cancelable.ts +5 -5
- package/src/util/date-time.ts +10 -10
- package/src/util/debug-app.ts +81 -0
- package/src/util/deep-partial.ts +2 -2
- package/src/util/deferred.ts +8 -8
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +18 -10
- package/src/util/generate-workspace-id.spec.ts +58 -0
- package/src/util/generate-workspace-id.ts +481 -0
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +76 -0
- package/src/util/gitpod-host-url.ts +119 -40
- 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 +163 -73
- package/src/util/make-link.ts +8 -9
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +62 -12
- package/src/util/parse-workspace-id.ts +40 -10
- package/src/util/queue.spec.ts +30 -28
- package/src/util/queue.ts +2 -2
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +8 -10
- package/src/util/skip-if.ts +12 -9
- package/src/util/timeutil.spec.ts +42 -16
- package/src/util/timeutil.ts +33 -17
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +211 -33
- package/src/util/workspace-port-authentication.ts +12 -15
- package/src/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +121 -0
- package/src/workspace-instance.ts +120 -36
- package/src/wsready.ts +11 -4
- package/data/builtin-theia-plugins.json +0 -362
- package/lib/email-protocol.d.ts +0 -49
- package/lib/email-protocol.d.ts.map +0 -1
- package/lib/email-protocol.js +0 -27
- 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 -45
- 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 +0 -8
- 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 -117
- 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 -33
- 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/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
- package/src/util/without.ts +0 -8
|
@@ -14,70 +14,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
14
14
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
18
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
19
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
21
|
-
function step(op) {
|
|
22
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
23
|
-
while (_) try {
|
|
24
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
25
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
26
|
-
switch (op[0]) {
|
|
27
|
-
case 0: case 1: t = op; break;
|
|
28
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
29
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
30
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
31
|
-
default:
|
|
32
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
33
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
34
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
35
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
36
|
-
if (t[2]) _.ops.pop();
|
|
37
|
-
_.trys.pop(); continue;
|
|
38
|
-
}
|
|
39
|
-
op = body.call(thisArg, _);
|
|
40
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
41
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
45
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
46
|
-
if (!m) return o;
|
|
47
|
-
var i = m.call(o), r, ar = [], e;
|
|
48
|
-
try {
|
|
49
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
50
|
-
}
|
|
51
|
-
catch (error) { e = { error: error }; }
|
|
52
|
-
finally {
|
|
53
|
-
try {
|
|
54
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
55
|
-
}
|
|
56
|
-
finally { if (e) throw e.error; }
|
|
57
|
-
}
|
|
58
|
-
return ar;
|
|
59
|
-
};
|
|
60
|
-
var __spread = (this && this.__spread) || function () {
|
|
61
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
62
|
-
return ar;
|
|
63
|
-
};
|
|
64
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
18
|
+
exports.JsonRpcProxyFactory = exports.JsonRpcConnectionHandler = void 0;
|
|
19
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
20
|
+
const event_1 = require("../util/event");
|
|
21
|
+
const logging_1 = require("../util/logging");
|
|
22
|
+
class JsonRpcConnectionHandler {
|
|
23
|
+
constructor(path, targetFactory) {
|
|
70
24
|
this.path = path;
|
|
71
25
|
this.targetFactory = targetFactory;
|
|
72
26
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
27
|
+
onConnection(connection, request) {
|
|
28
|
+
const factory = new JsonRpcProxyFactory();
|
|
29
|
+
const proxy = factory.createProxy();
|
|
76
30
|
factory.target = this.targetFactory(proxy, request);
|
|
77
31
|
factory.listen(connection);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
}());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
81
34
|
exports.JsonRpcConnectionHandler = JsonRpcConnectionHandler;
|
|
82
35
|
/**
|
|
83
36
|
* Factory for JSON-RPC proxy objects.
|
|
@@ -121,57 +74,45 @@ exports.JsonRpcConnectionHandler = JsonRpcConnectionHandler;
|
|
|
121
74
|
*
|
|
122
75
|
* @param <T> - The type of the object to expose to JSON-RPC.
|
|
123
76
|
*/
|
|
124
|
-
|
|
77
|
+
class JsonRpcProxyFactory {
|
|
125
78
|
/**
|
|
126
79
|
* Build a new JsonRpcProxyFactory.
|
|
127
80
|
*
|
|
128
81
|
* @param target - The object to expose to JSON-RPC methods calls. If this
|
|
129
82
|
* is omitted, the proxy won't be able to handle requests, only send them.
|
|
130
83
|
*/
|
|
131
|
-
|
|
84
|
+
constructor(target) {
|
|
132
85
|
this.target = target;
|
|
133
86
|
this.onDidOpenConnectionEmitter = new event_1.Emitter();
|
|
134
87
|
this.onDidCloseConnectionEmitter = new event_1.Emitter();
|
|
135
88
|
this.waitForConnection();
|
|
136
89
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
this.connectionPromise
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.connectionPromise.then(function (connection) {
|
|
143
|
-
connection.onClose(function () {
|
|
144
|
-
return _this.onDidCloseConnectionEmitter.fire(undefined);
|
|
145
|
-
});
|
|
146
|
-
_this.onDidOpenConnectionEmitter.fire(undefined);
|
|
90
|
+
waitForConnection() {
|
|
91
|
+
this.connectionPromise = new Promise((resolve) => (this.connectionPromiseResolve = resolve));
|
|
92
|
+
this.connectionPromise.then((connection) => {
|
|
93
|
+
connection.onClose(() => this.fireConnectionClosed());
|
|
94
|
+
this.fireConnectionOpened();
|
|
147
95
|
});
|
|
148
|
-
}
|
|
96
|
+
}
|
|
97
|
+
fireConnectionClosed() {
|
|
98
|
+
this.onDidCloseConnectionEmitter.fire(undefined);
|
|
99
|
+
}
|
|
100
|
+
fireConnectionOpened() {
|
|
101
|
+
this.onDidOpenConnectionEmitter.fire(undefined);
|
|
102
|
+
}
|
|
149
103
|
/**
|
|
150
104
|
* Connect a MessageConnection to the factory.
|
|
151
105
|
*
|
|
152
106
|
* This connection will be used to send/receive JSON-RPC requests and
|
|
153
107
|
* response.
|
|
154
108
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
connection.
|
|
158
|
-
|
|
159
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
160
|
-
params[_i - 1] = arguments[_i];
|
|
161
|
-
}
|
|
162
|
-
return _this.onRequest.apply(_this, __spread([method], params));
|
|
163
|
-
});
|
|
164
|
-
connection.onNotification(function (method) {
|
|
165
|
-
var params = [];
|
|
166
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
167
|
-
params[_i - 1] = arguments[_i];
|
|
168
|
-
}
|
|
169
|
-
return _this.onNotification.apply(_this, __spread([method], params));
|
|
170
|
-
});
|
|
171
|
-
connection.onDispose(function () { return _this.waitForConnection(); });
|
|
109
|
+
listen(connection) {
|
|
110
|
+
connection.onRequest((method, ...params) => this.onRequest(method, ...params));
|
|
111
|
+
connection.onNotification((method, ...params) => this.onNotification(method, ...params));
|
|
112
|
+
connection.onDispose(() => this.waitForConnection());
|
|
172
113
|
connection.listen();
|
|
173
114
|
this.connectionPromiseResolve(connection);
|
|
174
|
-
}
|
|
115
|
+
}
|
|
175
116
|
/**
|
|
176
117
|
* Process an incoming JSON-RPC method call.
|
|
177
118
|
*
|
|
@@ -184,48 +125,33 @@ var JsonRpcProxyFactory = /** @class */ (function () {
|
|
|
184
125
|
*
|
|
185
126
|
* @returns A promise of the method call completion.
|
|
186
127
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
_b.trys.push([0, 2, , 3]);
|
|
199
|
-
return [4 /*yield*/, (_a = this.target)[method].apply(_a, __spread(args))];
|
|
200
|
-
case 1: return [2 /*return*/, _b.sent()];
|
|
201
|
-
case 2:
|
|
202
|
-
e_1 = _b.sent();
|
|
203
|
-
if (e_1 instanceof vscode_jsonrpc_1.ResponseError) {
|
|
204
|
-
logging_1.log.info("Request " + method + " unsuccessful: " + e_1.code + "/\"" + e_1.message + "\"", { method: method, args: args });
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
logging_1.log.error("Request " + method + " failed with internal server error", e_1, { method: method, args: args });
|
|
208
|
-
}
|
|
209
|
-
throw e_1;
|
|
210
|
-
case 3: return [2 /*return*/];
|
|
128
|
+
onRequest(method, ...args) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
try {
|
|
131
|
+
return yield this.target[method](...args);
|
|
132
|
+
}
|
|
133
|
+
catch (e) {
|
|
134
|
+
if (e instanceof vscode_jsonrpc_1.ResponseError) {
|
|
135
|
+
logging_1.log.info(`Request ${method} unsuccessful: ${e.code}/"${e.message}"`, { method, args });
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
logging_1.log.error(`Request ${method} failed with internal server error`, e, { method, args });
|
|
211
139
|
}
|
|
212
|
-
|
|
140
|
+
throw e;
|
|
141
|
+
}
|
|
213
142
|
});
|
|
214
|
-
}
|
|
143
|
+
}
|
|
215
144
|
/**
|
|
216
145
|
* Process an incoming JSON-RPC notification.
|
|
217
146
|
*
|
|
218
147
|
* Same as [[onRequest]], but called on incoming notifications rather than
|
|
219
148
|
* methods calls.
|
|
220
149
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
225
|
-
args[_i - 1] = arguments[_i];
|
|
150
|
+
onNotification(method, ...args) {
|
|
151
|
+
if (this.target[method]) {
|
|
152
|
+
this.target[method](...args);
|
|
226
153
|
}
|
|
227
|
-
|
|
228
|
-
};
|
|
154
|
+
}
|
|
229
155
|
/**
|
|
230
156
|
* Create a Proxy exposing the interface of an object of type T. This Proxy
|
|
231
157
|
* can be used to do JSON-RPC method calls on the remote target object as
|
|
@@ -233,10 +159,10 @@ var JsonRpcProxyFactory = /** @class */ (function () {
|
|
|
233
159
|
*
|
|
234
160
|
* If `T` implements `JsonRpcServer` then a client is used as a target object for a remote target object.
|
|
235
161
|
*/
|
|
236
|
-
|
|
237
|
-
|
|
162
|
+
createProxy() {
|
|
163
|
+
const result = new Proxy(this, this);
|
|
238
164
|
return result;
|
|
239
|
-
}
|
|
165
|
+
}
|
|
240
166
|
/**
|
|
241
167
|
* Get a callable object that executes a JSON-RPC method call.
|
|
242
168
|
*
|
|
@@ -259,46 +185,35 @@ var JsonRpcProxyFactory = /** @class */ (function () {
|
|
|
259
185
|
* @param receiver - unused.
|
|
260
186
|
* @returns A callable that executes the JSON-RPC call.
|
|
261
187
|
*/
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
_this.target = client;
|
|
188
|
+
get(target, p, receiver) {
|
|
189
|
+
if (p === "setClient") {
|
|
190
|
+
return (client) => {
|
|
191
|
+
this.target = client;
|
|
267
192
|
};
|
|
268
193
|
}
|
|
269
|
-
if (p ===
|
|
194
|
+
if (p === "onDidOpenConnection") {
|
|
270
195
|
return this.onDidOpenConnectionEmitter.event;
|
|
271
196
|
}
|
|
272
|
-
if (p ===
|
|
197
|
+
if (p === "onDidCloseConnection") {
|
|
273
198
|
return this.onDidCloseConnectionEmitter.event;
|
|
274
199
|
}
|
|
275
|
-
|
|
276
|
-
return
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
200
|
+
const isNotify = this.isNotification(p);
|
|
201
|
+
return (...args) => this.connectionPromise.then((connection) => new Promise((resolve, reject) => {
|
|
202
|
+
try {
|
|
203
|
+
if (isNotify) {
|
|
204
|
+
connection.sendNotification(p.toString(), ...args);
|
|
205
|
+
resolve(undefined);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
const resultPromise = connection.sendRequest(p.toString(), ...args);
|
|
209
|
+
resultPromise.catch((err) => reject(err)).then((result) => resolve(result));
|
|
210
|
+
}
|
|
280
211
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
resolve();
|
|
287
|
-
}
|
|
288
|
-
else {
|
|
289
|
-
var resultPromise = connection.sendRequest.apply(connection, __spread([p.toString()], args));
|
|
290
|
-
resultPromise
|
|
291
|
-
.catch(function (err) { return reject(err); })
|
|
292
|
-
.then(function (result) { return resolve(result); });
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
catch (err) {
|
|
296
|
-
reject(err);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
};
|
|
212
|
+
catch (err) {
|
|
213
|
+
reject(err);
|
|
214
|
+
}
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
302
217
|
/**
|
|
303
218
|
* Return whether the given property represents a notification.
|
|
304
219
|
*
|
|
@@ -308,10 +223,9 @@ var JsonRpcProxyFactory = /** @class */ (function () {
|
|
|
308
223
|
* @param p - The property being called on the proxy.
|
|
309
224
|
* @return Whether `p` represents a notification.
|
|
310
225
|
*/
|
|
311
|
-
|
|
226
|
+
isNotification(p) {
|
|
312
227
|
return p.toString().startsWith("notify") || p.toString().startsWith("on");
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
}());
|
|
228
|
+
}
|
|
229
|
+
}
|
|
316
230
|
exports.JsonRpcProxyFactory = JsonRpcProxyFactory;
|
|
317
231
|
//# sourceMappingURL=proxy-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-factory.js","sourceRoot":"","sources":["../../src/messaging/proxy-factory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"proxy-factory.js","sourceRoot":"","sources":["../../src/messaging/proxy-factory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;AAEH,mDAAkE;AAClE,yCAA+C;AAG/C,6CAAsC;AAiBtC,MAAa,wBAAwB;IACjC,YAAqB,IAAY,EAAW,aAAgE;QAAvF,SAAI,GAAJ,IAAI,CAAQ;QAAW,kBAAa,GAAb,aAAa,CAAmD;IAAG,CAAC;IAEhH,YAAY,CAAC,UAA6B,EAAE,OAAgB;QACxD,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAK,CAAC;QAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QACpC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACpD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC;CACJ;AATD,4DASC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,mBAAmB;IAO5B;;;;;OAKG;IACH,YAAmB,MAAY;QAAZ,WAAM,GAAN,MAAM,CAAM;QAZZ,+BAA0B,GAAG,IAAI,eAAO,EAAQ,CAAC;QACjD,gCAA2B,GAAG,IAAI,eAAO,EAAQ,CAAC;QAYjE,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAES,iBAAiB;QACvB,IAAI,CAAC,iBAAiB,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,CAAC,CAAC;QAC7F,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YACvC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;YACtD,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,oBAAoB;QAChB,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IAED,oBAAoB;QAChB,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAA6B;QAChC,UAAU,CAAC,SAAS,CAAC,CAAC,MAAc,EAAE,GAAG,MAAa,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;QAC9F,UAAU,CAAC,cAAc,CAAC,CAAC,MAAc,EAAE,GAAG,MAAa,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;QACxG,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACrD,UAAU,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;;;;;;OAWG;IACa,SAAS,CAAC,MAAc,EAAE,GAAG,IAAW;;YACpD,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;aAC7C;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,YAAY,8BAAa,EAAE;oBAC5B,aAAG,CAAC,IAAI,CAAC,WAAW,MAAM,kBAAkB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC1F;qBAAM;oBACH,aAAG,CAAC,KAAK,CAAC,WAAW,MAAM,oCAAoC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACzF;gBACD,MAAM,CAAC,CAAC;aACX;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACO,cAAc,CAAC,MAAc,EAAE,GAAG,IAAW;QACnD,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;SAChC;IACL,CAAC;IAED;;;;;;OAMG;IACH,WAAW;QACP,MAAM,MAAM,GAAG,IAAI,KAAK,CAAI,IAAW,EAAE,IAAI,CAAC,CAAC;QAC/C,OAAO,MAAa,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,GAAG,CAAC,MAAS,EAAE,CAAc,EAAE,QAAa;QACxC,IAAI,CAAC,KAAK,WAAW,EAAE;YACnB,OAAO,CAAC,MAAW,EAAE,EAAE;gBACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACzB,CAAC,CAAC;SACL;QACD,IAAI,CAAC,KAAK,qBAAqB,EAAE;YAC7B,OAAO,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC;SAChD;QACD,IAAI,CAAC,KAAK,sBAAsB,EAAE;YAC9B,OAAO,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC;SACjD;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE,CACtB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CACvB,CAAC,UAAU,EAAE,EAAE,CACX,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5B,IAAI;gBACA,IAAI,QAAQ,EAAE;oBACV,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;oBACnD,OAAO,CAAC,SAAS,CAAC,CAAC;iBACtB;qBAAM;oBACH,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAiB,CAAC;oBACpF,aAAa,CAAC,KAAK,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;iBACzF;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;QACL,CAAC,CAAC,CACT,CAAC;IACV,CAAC;IAED;;;;;;;;OAQG;IACO,cAAc,CAAC,CAAc;QACnC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9E,CAAC;CACJ;AAlKD,kDAkKC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 declare namespace PaymentProtocol {
|
|
7
|
+
const UPDATE_GITPOD_SUBSCRIPTION_PATH = "/payment/chargebee";
|
|
8
|
+
}
|
|
9
|
+
export interface PlanCoupon {
|
|
10
|
+
chargebeePlanID: string;
|
|
11
|
+
newPrice: number;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GithubUpgradeURL {
|
|
15
|
+
url: string;
|
|
16
|
+
planID: number;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=payment-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
exports.PaymentProtocol = void 0;
|
|
9
|
+
var PaymentProtocol;
|
|
10
|
+
(function (PaymentProtocol) {
|
|
11
|
+
PaymentProtocol.UPDATE_GITPOD_SUBSCRIPTION_PATH = "/payment/chargebee";
|
|
12
|
+
})(PaymentProtocol = exports.PaymentProtocol || (exports.PaymentProtocol = {}));
|
|
13
|
+
//# sourceMappingURL=payment-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,24 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020
|
|
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
|
-
|
|
8
|
-
|
|
7
|
+
monitor: undefined;
|
|
8
|
+
developer: undefined;
|
|
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;
|
|
16
|
+
"ide-settings": undefined;
|
|
17
|
+
"new-workspace-cluster": undefined;
|
|
14
18
|
};
|
|
15
|
-
export declare type PermissionName = keyof
|
|
19
|
+
export declare type PermissionName = keyof typeof Permissions;
|
|
16
20
|
export declare const Roles: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
devops: undefined;
|
|
22
|
+
viewer: undefined;
|
|
23
|
+
admin: undefined;
|
|
20
24
|
};
|
|
21
|
-
export declare type RoleName = keyof
|
|
25
|
+
export declare type RoleName = keyof typeof Roles;
|
|
22
26
|
export declare type RoleOrPermission = RoleName | PermissionName;
|
|
23
27
|
export declare namespace RoleName {
|
|
24
28
|
const is: (o: any) => o is "devops" | "viewer" | "admin";
|
|
@@ -27,31 +31,38 @@ export interface Role {
|
|
|
27
31
|
name: RoleName;
|
|
28
32
|
permissions: PermissionName[];
|
|
29
33
|
}
|
|
34
|
+
export declare namespace RolesOrPermissions {
|
|
35
|
+
function toPermissionSet(rolesOrPermissions: RoleOrPermission[] | undefined): Set<PermissionName>;
|
|
36
|
+
}
|
|
30
37
|
export declare namespace Permission {
|
|
31
38
|
/** The permission to monitor the (live) state of a Gitpod installation */
|
|
32
39
|
const MONITOR: PermissionName;
|
|
40
|
+
/** The permission to develop on this running Gitpod installation */
|
|
41
|
+
const DEVELOPER: PermissionName;
|
|
33
42
|
/** The permission for actions like block user, stop workspace, etc. */
|
|
34
43
|
const ENFORCEMENT: PermissionName;
|
|
35
|
-
/** The permission to start privileged workspaces */
|
|
36
|
-
const PRIVILEGED_WORKSPACE: PermissionName;
|
|
37
44
|
/** The permission for registry access (start workspaces referencing gitpod-internal Docker images) */
|
|
38
45
|
const REGISTRY_ACCESS: PermissionName;
|
|
39
46
|
/** The permission for accessing all user data */
|
|
40
47
|
const ADMIN_USERS: PermissionName;
|
|
41
48
|
/** The permission for accessing all workspace data */
|
|
42
49
|
const ADMIN_WORKSPACES: PermissionName;
|
|
50
|
+
/** The permission for accessing all projects data */
|
|
51
|
+
const ADMIN_PROJECTS: PermissionName;
|
|
43
52
|
/** The permission to access the admin API */
|
|
44
53
|
const ADMIN_API: PermissionName;
|
|
45
|
-
|
|
46
|
-
const
|
|
54
|
+
/** The permission to access the IDE settings */
|
|
55
|
+
const IDE_SETTINGS: PermissionName;
|
|
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";
|
|
57
|
+
const all: () => PermissionName[];
|
|
47
58
|
}
|
|
48
59
|
export declare namespace Role {
|
|
49
|
-
/** The default role for all
|
|
60
|
+
/** The default role for all Gitpod developers */
|
|
50
61
|
const DEVOPS: Role;
|
|
51
62
|
/** A role for people that are allowed to view Gitpod internals */
|
|
52
63
|
const VIEWER: Role;
|
|
53
64
|
const ADMIN: Role;
|
|
54
|
-
const getByName: (name:
|
|
65
|
+
const getByName: (name: RoleName) => Role;
|
|
55
66
|
const all: () => Role[];
|
|
56
67
|
}
|
|
57
68
|
//# sourceMappingURL=permission.d.ts.map
|
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"}
|