@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
|
@@ -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,33 +13,6 @@ 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
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
44
17
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
45
18
|
var m = o[Symbol.asyncIterator], i;
|
|
@@ -48,138 +21,88 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
48
21
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
49
22
|
};
|
|
50
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.AsyncCachingIteratorImpl = exports.filter = exports.find = void 0;
|
|
51
25
|
// Use asyncIterators with es2015
|
|
52
|
-
if (typeof Symbol.asyncIterator ===
|
|
53
|
-
Symbol.asyncIterator = Symbol.asyncIterator || Symbol(
|
|
26
|
+
if (typeof Symbol.asyncIterator === "undefined") {
|
|
27
|
+
Symbol.asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
|
|
54
28
|
}
|
|
55
29
|
function find(it, predicate) {
|
|
56
30
|
var it_1, it_1_1;
|
|
57
31
|
var e_1, _a;
|
|
58
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_b.label = 1;
|
|
66
|
-
case 1: return [4 /*yield*/, it_1.next()];
|
|
67
|
-
case 2:
|
|
68
|
-
if (!(it_1_1 = _b.sent(), !it_1_1.done)) return [3 /*break*/, 4];
|
|
69
|
-
t = it_1_1.value;
|
|
70
|
-
if (predicate(t)) {
|
|
71
|
-
return [2 /*return*/, t];
|
|
72
|
-
}
|
|
73
|
-
_b.label = 3;
|
|
74
|
-
case 3: return [3 /*break*/, 1];
|
|
75
|
-
case 4: return [3 /*break*/, 11];
|
|
76
|
-
case 5:
|
|
77
|
-
e_1_1 = _b.sent();
|
|
78
|
-
e_1 = { error: e_1_1 };
|
|
79
|
-
return [3 /*break*/, 11];
|
|
80
|
-
case 6:
|
|
81
|
-
_b.trys.push([6, , 9, 10]);
|
|
82
|
-
if (!(it_1_1 && !it_1_1.done && (_a = it_1.return))) return [3 /*break*/, 8];
|
|
83
|
-
return [4 /*yield*/, _a.call(it_1)];
|
|
84
|
-
case 7:
|
|
85
|
-
_b.sent();
|
|
86
|
-
_b.label = 8;
|
|
87
|
-
case 8: return [3 /*break*/, 10];
|
|
88
|
-
case 9:
|
|
89
|
-
if (e_1) throw e_1.error;
|
|
90
|
-
return [7 /*endfinally*/];
|
|
91
|
-
case 10: return [7 /*endfinally*/];
|
|
92
|
-
case 11: return [2 /*return*/, undefined];
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
try {
|
|
34
|
+
for (it_1 = __asyncValues(it); it_1_1 = yield it_1.next(), !it_1_1.done;) {
|
|
35
|
+
const t = it_1_1.value;
|
|
36
|
+
if (predicate(t)) {
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
93
39
|
}
|
|
94
|
-
}
|
|
40
|
+
}
|
|
41
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
42
|
+
finally {
|
|
43
|
+
try {
|
|
44
|
+
if (it_1_1 && !it_1_1.done && (_a = it_1.return)) yield _a.call(it_1);
|
|
45
|
+
}
|
|
46
|
+
finally { if (e_1) throw e_1.error; }
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
95
49
|
});
|
|
96
50
|
}
|
|
97
51
|
exports.find = find;
|
|
98
52
|
function filter(it, predicate) {
|
|
99
53
|
var it_2, it_2_1;
|
|
100
54
|
var e_2, _a;
|
|
101
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
_b.trys.push([1, 6, 7, 12]);
|
|
110
|
-
it_2 = __asyncValues(it);
|
|
111
|
-
_b.label = 2;
|
|
112
|
-
case 2: return [4 /*yield*/, it_2.next()];
|
|
113
|
-
case 3:
|
|
114
|
-
if (!(it_2_1 = _b.sent(), !it_2_1.done)) return [3 /*break*/, 5];
|
|
115
|
-
t = it_2_1.value;
|
|
116
|
-
if (predicate(t)) {
|
|
117
|
-
result.push(t);
|
|
118
|
-
}
|
|
119
|
-
_b.label = 4;
|
|
120
|
-
case 4: return [3 /*break*/, 2];
|
|
121
|
-
case 5: return [3 /*break*/, 12];
|
|
122
|
-
case 6:
|
|
123
|
-
e_2_1 = _b.sent();
|
|
124
|
-
e_2 = { error: e_2_1 };
|
|
125
|
-
return [3 /*break*/, 12];
|
|
126
|
-
case 7:
|
|
127
|
-
_b.trys.push([7, , 10, 11]);
|
|
128
|
-
if (!(it_2_1 && !it_2_1.done && (_a = it_2.return))) return [3 /*break*/, 9];
|
|
129
|
-
return [4 /*yield*/, _a.call(it_2)];
|
|
130
|
-
case 8:
|
|
131
|
-
_b.sent();
|
|
132
|
-
_b.label = 9;
|
|
133
|
-
case 9: return [3 /*break*/, 11];
|
|
134
|
-
case 10:
|
|
135
|
-
if (e_2) throw e_2.error;
|
|
136
|
-
return [7 /*endfinally*/];
|
|
137
|
-
case 11: return [7 /*endfinally*/];
|
|
138
|
-
case 12: return [2 /*return*/, result];
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const result = [];
|
|
57
|
+
try {
|
|
58
|
+
for (it_2 = __asyncValues(it); it_2_1 = yield it_2.next(), !it_2_1.done;) {
|
|
59
|
+
const t = it_2_1.value;
|
|
60
|
+
if (predicate(t)) {
|
|
61
|
+
result.push(t);
|
|
62
|
+
}
|
|
139
63
|
}
|
|
140
|
-
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (it_2_1 && !it_2_1.done && (_a = it_2.return)) yield _a.call(it_2);
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_2) throw e_2.error; }
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
141
73
|
});
|
|
142
74
|
}
|
|
143
75
|
exports.filter = filter;
|
|
144
|
-
|
|
145
|
-
|
|
76
|
+
class AsyncCachingIteratorImpl {
|
|
77
|
+
constructor(iterable) {
|
|
146
78
|
this.iterable = iterable;
|
|
147
79
|
this.cache = [];
|
|
148
80
|
this.cursor = 0;
|
|
149
81
|
this.cacheRead = false;
|
|
150
82
|
}
|
|
151
|
-
|
|
83
|
+
resetCursor() {
|
|
152
84
|
this.cursor = 0;
|
|
153
85
|
this.cacheRead = false;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
case 1:
|
|
170
|
-
result = _a.sent();
|
|
171
|
-
if (!result.done) {
|
|
172
|
-
this.cache.push(result.value);
|
|
173
|
-
}
|
|
174
|
-
return [2 /*return*/, result];
|
|
175
|
-
}
|
|
176
|
-
});
|
|
86
|
+
}
|
|
87
|
+
next(value) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (!this.cacheRead && this.cursor < this.cache.length) {
|
|
90
|
+
return {
|
|
91
|
+
done: false,
|
|
92
|
+
value: this.cache[this.cursor++],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
this.cacheRead = true;
|
|
96
|
+
const result = yield this.iterable.next(value);
|
|
97
|
+
if (!result.done) {
|
|
98
|
+
this.cache.push(result.value);
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
177
101
|
});
|
|
178
|
-
}
|
|
179
|
-
|
|
102
|
+
}
|
|
103
|
+
[Symbol.asyncIterator]() {
|
|
180
104
|
return this;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
}());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
184
107
|
exports.AsyncCachingIteratorImpl = AsyncCachingIteratorImpl;
|
|
185
108
|
//# sourceMappingURL=async-iterator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-iterator.js","sourceRoot":"","sources":["../../src/util/async-iterator.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"async-iterator.js","sourceRoot":"","sources":["../../src/util/async-iterator.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;AAEH,iCAAiC;AACjC,IAAI,OAAQ,MAAc,CAAC,aAAa,KAAK,WAAW,EAAE;IACrD,MAAc,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;CACnF;AAED,SAAsB,IAAI,CAAI,EAA4B,EAAE,SAAgC;;;;;YACxF,KAAsB,OAAA,cAAA,EAAE,CAAA;gBAAb,MAAM,CAAC,eAAA,CAAA;gBACd,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;oBACd,OAAO,CAAC,CAAC;iBACZ;aACJ;;;;;;;;;QACD,OAAO,SAAS,CAAC;;CACpB;AAPD,oBAOC;AACD,SAAsB,MAAM,CAAI,EAA4B,EAAE,SAAgC;;;;QAC1F,MAAM,MAAM,GAAG,EAAE,CAAC;;YAClB,KAAsB,OAAA,cAAA,EAAE,CAAA;gBAAb,MAAM,CAAC,eAAA,CAAA;gBACd,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;oBACd,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBAClB;aACJ;;;;;;;;;QACD,OAAO,MAAM,CAAC;;CACjB;AARD,wBAQC;AAKD,MAAa,wBAAwB;IAKjC,YAA+B,QAAkC;QAAlC,aAAQ,GAAR,QAAQ,CAA0B;QAJvD,UAAK,GAAQ,EAAE,CAAC;QAChB,WAAM,GAAG,CAAC,CAAC;QACX,cAAS,GAAG,KAAK,CAAC;IAEwC,CAAC;IAE9D,WAAW;QACd,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAEY,IAAI,CAAC,KAAW;;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACpD,OAAO;oBACH,IAAI,EAAE,KAAK;oBACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;iBACnC,CAAC;aACL;YACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YAEtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACjC;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;KAAA;IAED,CAAC,MAAM,CAAC,aAAa,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA/BD,4DA+BC"}
|
package/lib/util/cancelable.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
|
import { Disposable } from "./disposable";
|
|
7
7
|
export declare class Cancelable<T> implements Disposable {
|
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> {
|