@gitpod/gitpod-protocol 0.1.5-sh-jupyter.0 → 0.1.5-siddhant-k-code-allow-github-prebuilds-10358.2
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 +163 -74
- package/lib/accounting-protocol.d.ts +163 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +111 -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 +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 +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 +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 +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 +241 -50
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +275 -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 +17 -4
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +34 -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 +211 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +609 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +300 -112
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +393 -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 +92 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +78 -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 +37 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +4 -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 -7
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +146 -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 +54 -8
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +200 -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 +75 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +31 -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 +244 -0
- package/src/admin-protocol.ts +96 -21
- package/src/analytics.ts +52 -0
- package/src/attribution.ts +63 -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 +125 -0
- package/src/gitpod-file-parser.spec.ts +57 -63
- package/src/gitpod-file-parser.ts +18 -19
- package/src/gitpod-service.ts +534 -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 +47 -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 +683 -0
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +706 -299
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +150 -0
- package/src/teams-projects-protocol.ts +177 -0
- package/src/typings/globals.ts +7 -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 +121 -38
- 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 +202 -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 +110 -0
- package/src/workspace-instance.ts +119 -35
- 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
package/lib/util/cancelable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020
|
|
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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
8
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -13,71 +13,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
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;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
|
|
45
|
-
|
|
17
|
+
exports.Cancelable = void 0;
|
|
18
|
+
class Cancelable {
|
|
19
|
+
constructor(activity) {
|
|
46
20
|
this.activity = activity;
|
|
47
21
|
}
|
|
48
|
-
|
|
49
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_a.label = 2;
|
|
57
|
-
case 2:
|
|
58
|
-
if (this.canceled) {
|
|
59
|
-
return [2 /*return*/];
|
|
60
|
-
}
|
|
61
|
-
else if (r !== undefined) {
|
|
62
|
-
return [2 /*return*/, r];
|
|
63
|
-
}
|
|
64
|
-
_a.label = 3;
|
|
65
|
-
case 3: return [4 /*yield*/, this.activity(this.canceled)];
|
|
66
|
-
case 4:
|
|
67
|
-
r = _a.sent();
|
|
68
|
-
return [3 /*break*/, 2];
|
|
69
|
-
case 5: return [2 /*return*/];
|
|
22
|
+
run() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
for (let r = yield this.activity(this.canceled);; r = yield this.activity(this.canceled)) {
|
|
25
|
+
if (this.canceled) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
else if (r !== undefined) {
|
|
29
|
+
return r;
|
|
70
30
|
}
|
|
71
|
-
}
|
|
31
|
+
}
|
|
72
32
|
});
|
|
73
|
-
}
|
|
74
|
-
|
|
33
|
+
}
|
|
34
|
+
cancel() {
|
|
75
35
|
this.canceled = true;
|
|
76
|
-
}
|
|
77
|
-
|
|
36
|
+
}
|
|
37
|
+
dispose() {
|
|
78
38
|
this.cancel();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
82
41
|
exports.Cancelable = Cancelable;
|
|
83
42
|
//# sourceMappingURL=cancelable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancelable.js","sourceRoot":"","sources":["../../src/util/cancelable.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"cancelable.js","sourceRoot":"","sources":["../../src/util/cancelable.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAIH,MAAa,UAAU;IAGnB,YAA+B,QAAqD;QAArD,aAAQ,GAAR,QAAQ,CAA6C;IAAG,CAAC;IAE3E,GAAG;;YACZ,KAAK,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAI,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBACvF,IAAI,IAAI,CAAC,QAAQ,EAAE;oBACf,OAAO;iBACV;qBAAM,IAAI,CAAC,KAAK,SAAS,EAAE;oBACxB,OAAO,CAAC,CAAC;iBACZ;aACJ;QACL,CAAC;KAAA;IAEM,MAAM;QACT,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;CACJ;AAtBD,gCAsBC"}
|
package/lib/util/date-time.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 function formatDate(date?: string): string;
|
|
7
7
|
export declare function formatHours(hours?: number): string;
|
package/lib/util/date-time.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020
|
|
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.formatHours = exports.formatDate = void 0;
|
|
8
9
|
function formatDate(date) {
|
|
9
|
-
return date ? new Date(date).toLocaleString() :
|
|
10
|
+
return date ? new Date(date).toLocaleString() : "";
|
|
10
11
|
}
|
|
11
12
|
exports.formatDate = formatDate;
|
|
12
13
|
function formatHours(hours) {
|
|
13
14
|
if (hours === undefined) {
|
|
14
|
-
return
|
|
15
|
+
return "";
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const h = Math.floor(Math.abs(hours));
|
|
18
|
+
const rm = (Math.abs(hours) - h) * 60;
|
|
19
|
+
const m = Math.floor(rm);
|
|
20
|
+
const rs = (rm - m) * 60;
|
|
21
|
+
const s = Math.floor(rs);
|
|
22
|
+
const result = h + ":" + pad2(m) + ":" + pad2(s);
|
|
22
23
|
if (hours < 0) {
|
|
23
|
-
return
|
|
24
|
+
return `-${result}`;
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
|
-
return
|
|
27
|
+
return `${result}`;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
exports.formatHours = formatHours;
|
|
30
31
|
function pad2(n) {
|
|
31
|
-
return n < 10 ?
|
|
32
|
+
return n < 10 ? "0" + n : "" + n;
|
|
32
33
|
}
|
|
33
34
|
//# sourceMappingURL=date-time.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time.js","sourceRoot":"","sources":["../../src/util/date-time.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"date-time.js","sourceRoot":"","sources":["../../src/util/date-time.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,SAAgB,UAAU,CAAC,IAAa;IACpC,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC;AAFD,gCAEC;AAED,SAAgB,WAAW,CAAC,KAAc;IACtC,IAAI,KAAK,KAAK,SAAS,EAAE;QACrB,OAAO,EAAE,CAAC;KACb;IACD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACtC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACtC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,MAAM,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,IAAI,KAAK,GAAG,CAAC,EAAE;QACX,OAAO,IAAI,MAAM,EAAE,CAAC;KACvB;SAAM;QACH,OAAO,GAAG,MAAM,EAAE,CAAC;KACtB;AACL,CAAC;AAfD,kCAeC;AAED,SAAS,IAAI,CAAC,CAAS;IACnB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
/// <reference types="node" />
|
|
7
|
+
import * as http from "http";
|
|
8
|
+
import * as express from "express";
|
|
9
|
+
import { LogrusLogLevel } from "./logging";
|
|
10
|
+
export interface SetLogLevelRequest {
|
|
11
|
+
level: LogrusLogLevel;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace SetLogLevelRequest {
|
|
14
|
+
function is(o: any): o is SetLogLevelRequest;
|
|
15
|
+
}
|
|
16
|
+
export declare class DebugApp {
|
|
17
|
+
protected _app: express.Application;
|
|
18
|
+
protected httpServer: http.Server | undefined;
|
|
19
|
+
ctor(): void;
|
|
20
|
+
create(): express.Application;
|
|
21
|
+
start(port?: number): void;
|
|
22
|
+
stop(): Promise<void>;
|
|
23
|
+
get app(): express.Application;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=debug-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-app.d.ts","sourceRoot":"","sources":["../../src/util/debug-app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAO,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,cAAc,CAAC;CACzB;AACD,yBAAiB,kBAAkB,CAAC;IAChC,SAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,kBAAkB,CAElD;CACJ;AAED,qBACa,QAAQ;IACjB,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC;IACpC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAa;IAGnD,IAAI;IAIX,MAAM,IAAI,OAAO,CAAC,WAAW;IAyBtB,KAAK,CAAC,IAAI,GAAE,MAAa;IAMnB,IAAI;IAgBjB,IAAW,GAAG,IAAI,OAAO,CAAC,WAAW,CAEpC;CACJ"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DebugApp = exports.SetLogLevelRequest = void 0;
|
|
27
|
+
const express = require("express");
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const logging_1 = require("./logging");
|
|
30
|
+
var SetLogLevelRequest;
|
|
31
|
+
(function (SetLogLevelRequest) {
|
|
32
|
+
function is(o) {
|
|
33
|
+
return typeof o === "object" && "level" in o;
|
|
34
|
+
}
|
|
35
|
+
SetLogLevelRequest.is = is;
|
|
36
|
+
})(SetLogLevelRequest = exports.SetLogLevelRequest || (exports.SetLogLevelRequest = {}));
|
|
37
|
+
let DebugApp = class DebugApp {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.httpServer = undefined;
|
|
40
|
+
}
|
|
41
|
+
ctor() {
|
|
42
|
+
this._app = this.create();
|
|
43
|
+
}
|
|
44
|
+
create() {
|
|
45
|
+
const app = express();
|
|
46
|
+
app.use(express.json());
|
|
47
|
+
app.use(express.urlencoded({ extended: true }));
|
|
48
|
+
app.post("/debug/logging", (req, res) => {
|
|
49
|
+
try {
|
|
50
|
+
const levelRequest = req.body;
|
|
51
|
+
if (!SetLogLevelRequest.is(levelRequest)) {
|
|
52
|
+
res.status(400).end("not a SetLogLevelRequest");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const newLogLevel = levelRequest.level;
|
|
56
|
+
logging_1.log.setLogLevel(newLogLevel);
|
|
57
|
+
logging_1.log.info("set log level", { newLogLevel });
|
|
58
|
+
res.status(200).end(JSON.stringify(levelRequest));
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
res.status(500).end(err);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return app;
|
|
65
|
+
}
|
|
66
|
+
start(port = 6060) {
|
|
67
|
+
this.httpServer = this._app.listen(port, "localhost", () => {
|
|
68
|
+
logging_1.log.info(`debug server listening on port: ${port}`);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
stop() {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const server = this.httpServer;
|
|
74
|
+
if (!server) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
return new Promise((resolve) => server.close((err) => {
|
|
78
|
+
if (err) {
|
|
79
|
+
logging_1.log.warn(`error while closing http server`, { err });
|
|
80
|
+
}
|
|
81
|
+
this.httpServer = undefined;
|
|
82
|
+
resolve();
|
|
83
|
+
}));
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
get app() {
|
|
87
|
+
return this._app;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, inversify_1.postConstruct)(),
|
|
92
|
+
__metadata("design:type", Function),
|
|
93
|
+
__metadata("design:paramtypes", []),
|
|
94
|
+
__metadata("design:returntype", void 0)
|
|
95
|
+
], DebugApp.prototype, "ctor", null);
|
|
96
|
+
DebugApp = __decorate([
|
|
97
|
+
(0, inversify_1.injectable)()
|
|
98
|
+
], DebugApp);
|
|
99
|
+
exports.DebugApp = DebugApp;
|
|
100
|
+
//# sourceMappingURL=debug-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-app.js","sourceRoot":"","sources":["../../src/util/debug-app.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAGH,mCAAmC;AACnC,yCAAsD;AACtD,uCAAgD;AAKhD,IAAiB,kBAAkB,CAIlC;AAJD,WAAiB,kBAAkB;IAC/B,SAAgB,EAAE,CAAC,CAAM;QACrB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,CAAC;IACjD,CAAC;IAFe,qBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAIlC;AAGD,IAAa,QAAQ,GAArB,MAAa,QAAQ;IAArB;QAEc,eAAU,GAA4B,SAAS,CAAC;IAyD9D,CAAC;IAtDU,IAAI;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;QAEtB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACxB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEhD,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACpC,IAAI;gBACA,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC;gBAC9B,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE;oBACtC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oBAChD,OAAO;iBACV;gBAED,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC;gBACvC,aAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBAC7B,aAAG,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBAC3C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;aACrD;YAAC,OAAO,GAAG,EAAE;gBACV,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aAC5B;QACL,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACf,CAAC;IAEM,KAAK,CAAC,OAAe,IAAI;QAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE;YACvD,aAAG,CAAC,IAAI,CAAC,mCAAmC,IAAI,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACP,CAAC;IAEY,IAAI;;YACb,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAC/B,IAAI,CAAC,MAAM,EAAE;gBACT,OAAO;aACV;YACD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CACjC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAQ,EAAE,EAAE;gBACtB,IAAI,GAAG,EAAE;oBACL,aAAG,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;iBACxD;gBACD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;gBAC5B,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CACL,CAAC;QACN,CAAC;KAAA;IAED,IAAW,GAAG;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ,CAAA;AAtDG;IADC,IAAA,yBAAa,GAAE;;;;oCAGf;AAPQ,QAAQ;IADpB,IAAA,sBAAU,GAAE;GACA,QAAQ,CA2DpB;AA3DY,4BAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
/**
|
|
7
7
|
* Takes the idea of Partial<T> and applies that recursively to all child objects
|
package/lib/util/deep-partial.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020
|
|
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
8
|
//# sourceMappingURL=deep-partial.js.map
|
package/lib/util/deferred.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
/// <reference types="node" />
|
|
7
7
|
export declare class Deferred<T> {
|
package/lib/util/deferred.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
exports.Deferred = void 0;
|
|
9
|
+
class Deferred {
|
|
10
|
+
constructor(timeout) {
|
|
11
11
|
this.isResolved = false;
|
|
12
|
-
this.promise = new Promise(
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
this.promise = new Promise((resolve, reject) => {
|
|
13
|
+
this.resolve = (o) => {
|
|
14
|
+
this.isResolved = true;
|
|
15
15
|
resolve(o);
|
|
16
|
-
clearTimeout(
|
|
16
|
+
clearTimeout(this.timer);
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
this.reject = (e) => {
|
|
19
19
|
reject(e);
|
|
20
|
-
clearTimeout(
|
|
20
|
+
clearTimeout(this.timer);
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
if (timeout) {
|
|
24
|
-
this.timer = setTimeout(
|
|
24
|
+
this.timer = setTimeout(() => this.reject(new Error(`Timeout of ${timeout} ms.`)), timeout);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
}());
|
|
27
|
+
}
|
|
29
28
|
exports.Deferred = Deferred;
|
|
30
29
|
//# sourceMappingURL=deferred.js.map
|
package/lib/util/deferred.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred.js","sourceRoot":"","sources":["../../src/util/deferred.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"deferred.js","sourceRoot":"","sources":["../../src/util/deferred.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,MAAa,QAAQ;IAMjB,YAAY,OAAgB;QAH5B,eAAU,GAAY,KAAK,CAAC;QAS5B,YAAO,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;gBACjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,OAAO,CAAC,CAAQ,CAAC,CAAC;gBAClB,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE;gBAChB,MAAM,CAAC,CAAC,CAAC,CAAC;gBACV,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;QAfC,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,OAAO,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;SAC/F;IACL,CAAC;CAaJ;AAvBD,4BAuBC"}
|
package/lib/util/disposable.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export declare namespace Disposable {
|
|
|
12
12
|
export declare class DisposableCollection implements Disposable {
|
|
13
13
|
protected readonly disposables: Disposable[];
|
|
14
14
|
protected readonly onDisposeEmitter: Emitter<void>;
|
|
15
|
-
|
|
15
|
+
get onDispose(): Event<void>;
|
|
16
16
|
protected checkDisposed(): void;
|
|
17
|
-
|
|
17
|
+
get disposed(): boolean;
|
|
18
18
|
dispose(): void;
|
|
19
19
|
push(disposable: Disposable): Disposable;
|
|
20
20
|
pushAll(disposables: Disposable[]): Disposable[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.d.ts","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,yBAAiB,UAAU,CAAC;IACxB,SAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,UAAU,CAInD;IACM,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"disposable.d.ts","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,yBAAiB,UAAU,CAAC;IACxB,SAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,UAAU,CAInD;IACM,MAAM,IAAI,YAAmB,CAAC;CACxC;AAED,qBAAa,oBAAqB,YAAW,UAAU;IACnD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,CAAM;IAClD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,gBAAuB;IAE1D,IAAI,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,CAE3B;IAED,SAAS,CAAC,aAAa,IAAI,IAAI;IAM/B,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,OAAO,IAAI,IAAI;IAUf,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;IAkBxC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE;CAGnD"}
|
package/lib/util/disposable.js
CHANGED
|
@@ -1,47 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DisposableCollection = exports.Disposable = void 0;
|
|
3
4
|
/*
|
|
4
5
|
* Copyright (C) 2017 TypeFox and others.
|
|
5
6
|
*
|
|
6
7
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
|
7
8
|
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
const event_1 = require("./event");
|
|
10
11
|
var Disposable;
|
|
11
12
|
(function (Disposable) {
|
|
12
13
|
function create(func) {
|
|
13
14
|
return {
|
|
14
|
-
dispose: func
|
|
15
|
+
dispose: func,
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
Disposable.create = create;
|
|
18
|
-
Disposable.NULL = create(
|
|
19
|
+
Disposable.NULL = create(() => { });
|
|
19
20
|
})(Disposable = exports.Disposable || (exports.Disposable = {}));
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
class DisposableCollection {
|
|
22
|
+
constructor() {
|
|
22
23
|
this.disposables = [];
|
|
23
24
|
this.onDisposeEmitter = new event_1.Emitter();
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
DisposableCollection.prototype.checkDisposed = function () {
|
|
26
|
+
get onDispose() {
|
|
27
|
+
return this.onDisposeEmitter.event;
|
|
28
|
+
}
|
|
29
|
+
checkDisposed() {
|
|
33
30
|
if (this.disposed) {
|
|
34
31
|
this.onDisposeEmitter.fire(undefined);
|
|
35
32
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
DisposableCollection.prototype.dispose = function () {
|
|
33
|
+
}
|
|
34
|
+
get disposed() {
|
|
35
|
+
return this.disposables.length === 0;
|
|
36
|
+
}
|
|
37
|
+
dispose() {
|
|
45
38
|
if (this.disposed) {
|
|
46
39
|
return;
|
|
47
40
|
}
|
|
@@ -49,32 +42,27 @@ var DisposableCollection = /** @class */ (function () {
|
|
|
49
42
|
this.disposables.pop().dispose();
|
|
50
43
|
}
|
|
51
44
|
this.checkDisposed();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var disposables = this.disposables;
|
|
45
|
+
}
|
|
46
|
+
push(disposable) {
|
|
47
|
+
const disposables = this.disposables;
|
|
56
48
|
disposables.push(disposable);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
const originalDispose = disposable.dispose.bind(disposable);
|
|
50
|
+
const toRemove = Disposable.create(() => {
|
|
51
|
+
const index = disposables.indexOf(disposable);
|
|
60
52
|
if (index !== -1) {
|
|
61
53
|
disposables.splice(index, 1);
|
|
62
54
|
}
|
|
63
|
-
|
|
55
|
+
this.checkDisposed();
|
|
64
56
|
});
|
|
65
|
-
disposable.dispose =
|
|
57
|
+
disposable.dispose = () => {
|
|
66
58
|
toRemove.dispose();
|
|
67
59
|
originalDispose();
|
|
68
60
|
};
|
|
69
61
|
return toRemove;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
return DisposableCollection;
|
|
78
|
-
}());
|
|
62
|
+
}
|
|
63
|
+
pushAll(disposables) {
|
|
64
|
+
return disposables.map((disposable) => this.push(disposable));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
79
67
|
exports.DisposableCollection = DisposableCollection;
|
|
80
68
|
//# sourceMappingURL=disposable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,mCAAyC;AASzC,IAAiB,UAAU,CAO1B;AAPD,WAAiB,UAAU;IACvB,SAAgB,MAAM,CAAC,IAAgB;QACnC,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAC;IACN,CAAC;IAJe,iBAAM,SAIrB,CAAA;IACY,eAAI,GAAG,MAAM,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACzC,CAAC,EAPgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAO1B;AAED,MAAa,oBAAoB;IAAjC;QACuB,gBAAW,GAAiB,EAAE,CAAC;QAC/B,qBAAgB,GAAG,IAAI,eAAO,EAAQ,CAAC;IA+C9D,CAAC;IA7CG,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACvC,CAAC;IAES,aAAa;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;IACL,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,OAAO;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,OAAO;SACV;QACD,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,GAAG,EAAG,CAAC,OAAO,EAAE,CAAC;SACrC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,UAAsB;QACvB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7B,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YACpC,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC9C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACd,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAChC;YACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE;YACtB,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,eAAe,EAAE,CAAC;QACtB,CAAC,CAAC;QACF,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,CAAC,WAAyB;QAC7B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAClE,CAAC;CACJ;AAjDD,oDAiDC"}
|
package/lib/util/event.d.ts
CHANGED
package/lib/util/event.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/util/event.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/util/event.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC;IACpB;;;;;;OAMG;IACH,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;CACrF;AAED,yBAAiB,KAAK,CAAC;IAEZ,MAAM,IAAI,EAAE,KAAK,CAAC,GAAG,CAE3B,CAAC;CACL;AAwED,MAAM,WAAW,cAAc;IAC3B,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,oBAAoB,CAAC,EAAE,QAAQ,CAAC;CACnC;AAED,qBAAa,OAAO,CAAC,CAAC;IAMN,OAAO,CAAC,QAAQ,CAAC;IAL7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAkB;IAEtC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,UAAU,CAA2B;gBAEzB,QAAQ,CAAC,4BAAgB;IAE7C;;;OAGG;IACH,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CA6BpB;IAED;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,GAAG;IAMnB,OAAO;CAMV"}
|