@gitpod/gitpod-protocol 0.1.5-main.648 → 0.1.5-main.6480
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/gitpod-schema.json +157 -29
- package/lib/accounting-protocol.d.ts +19 -14
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +44 -48
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +44 -5
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +16 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +44 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/analytics.js +10 -0
- package/lib/analytics.js.map +1 -0
- package/lib/attribution.d.ts +24 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +54 -0
- package/lib/attribution.js.map +1 -0
- package/lib/auth.d.ts +1 -1
- package/lib/auth.d.ts.map +1 -1
- package/lib/auth.js +1 -1
- package/lib/billing-mode.d.ts +45 -0
- package/lib/billing-mode.d.ts.map +1 -0
- package/lib/billing-mode.js +44 -0
- package/lib/billing-mode.js.map +1 -0
- package/lib/blocked-repositories-protocol.d.ts +13 -0
- package/lib/blocked-repositories-protocol.d.ts.map +1 -0
- package/lib/blocked-repositories-protocol.js +8 -0
- package/lib/blocked-repositories-protocol.js.map +1 -0
- package/lib/context-url.d.ts +30 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +100 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +12 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +81 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/encryption/container-module.d.ts +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +5 -5
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +26 -27
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +30 -38
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +31 -45
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +32 -39
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -7
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +8 -28
- package/lib/env.js.map +1 -1
- package/lib/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +10 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +37 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +51 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +22 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +10 -0
- package/lib/experiments/types.js.map +1 -0
- package/lib/frontend-dashboard-service.d.ts +90 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +49 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-file-parser.d.ts +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +27 -43
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.d.ts +1 -1
- package/lib/gitpod-file-parser.spec.js +146 -143
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +191 -55
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +204 -298
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +10 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +7 -9
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +2 -2
- package/lib/ide-frontend-service.js +1 -1
- package/lib/ide-protocol.d.ts +126 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +18 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +17 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +30 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +31 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/license-protocol.d.ts +8 -1
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +4 -6
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +176 -45
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +5 -5
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +43 -60
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +21 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +95 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +13 -3
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +25 -5
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/handler.js +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +24 -60
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +3 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +75 -162
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/payment-protocol.d.ts +1 -1
- package/lib/payment-protocol.d.ts.map +1 -1
- package/lib/payment-protocol.js +2 -2
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +14 -4
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +45 -32
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +6 -5
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +230 -210
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +261 -105
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +346 -205
- package/lib/protocol.js.map +1 -1
- package/{src/util/without.ts → lib/protocol.spec.d.ts} +3 -4
- package/lib/protocol.spec.d.ts.map +1 -0
- package/lib/protocol.spec.js +127 -0
- package/lib/protocol.spec.js.map +1 -0
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/lib/snapshot-url.spec.d.ts +7 -0
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +24 -5
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +36 -18
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +137 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +41 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +3 -3
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/typings/globals.js +1 -1
- package/lib/usage.d.ts +73 -0
- package/lib/usage.d.ts.map +1 -0
- package/lib/usage.js +20 -0
- package/lib/usage.js.map +1 -0
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +88 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.d.ts +1 -1
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +58 -136
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.d.ts +1 -1
- package/lib/util/cancelable.js +18 -60
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.d.ts +1 -1
- package/lib/util/date-time.js +12 -12
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/debug-app.d.ts +25 -0
- package/lib/util/debug-app.d.ts.map +1 -0
- package/lib/util/debug-app.js +100 -0
- package/lib/util/debug-app.js.map +1 -0
- package/lib/util/deep-partial.d.ts +1 -1
- package/lib/util/deep-partial.js +1 -1
- package/lib/util/deferred.d.ts +1 -1
- package/lib/util/deferred.js +11 -13
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +27 -40
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +63 -77
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +2 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +33 -48
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +6 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +469 -502
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.d.ts +1 -1
- package/lib/util/generate-workspace-id.spec.js +69 -79
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +41 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +12 -7
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +132 -110
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +7 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +113 -31
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +35 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +90 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/{theia-plugins.js → util/jaeger-client-types.js} +2 -2
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +50 -34
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +133 -130
- package/lib/util/logging.js.map +1 -1
- package/lib/util/logging.spec.d.ts +7 -0
- package/lib/util/logging.spec.d.ts.map +1 -0
- package/lib/util/logging.spec.js +52 -0
- package/lib/util/logging.spec.js.map +1 -0
- package/lib/util/make-link.d.ts +1 -1
- package/lib/util/make-link.js +6 -6
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/nice-grpc.d.ts +9 -0
- package/lib/util/nice-grpc.d.ts.map +1 -0
- package/lib/util/nice-grpc.js +121 -0
- package/lib/util/nice-grpc.js.map +1 -0
- package/lib/util/parse-workspace-id.d.ts +11 -1
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +5 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +124 -85
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.d.ts +1 -1
- package/lib/util/queue.js +17 -56
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.d.ts +1 -1
- package/lib/util/queue.spec.js +148 -289
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/semaphore.d.ts +1 -1
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js +16 -47
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +7 -7
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +3 -1
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +30 -18
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +3 -1
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +55 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +53 -7
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +198 -65
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.d.ts +8 -8
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +10 -13
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/webhook-event.d.ts +44 -0
- package/lib/webhook-event.d.ts.map +1 -0
- package/lib/webhook-event.js +8 -0
- package/lib/webhook-event.js.map +1 -0
- package/lib/workspace-class.d.ts +14 -0
- package/lib/workspace-class.d.ts.map +1 -0
- package/lib/workspace-class.js +8 -0
- package/lib/workspace-class.js.map +1 -0
- package/lib/workspace-cluster.d.ts +28 -8
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +20 -5
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +46 -6
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/workspace-instance.js +1 -1
- package/lib/wsready.d.ts +8 -2
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +3 -3
- package/package.json +40 -18
- package/pkg-yarn.lock +23 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +67 -58
- package/src/admin-protocol.ts +88 -20
- package/src/analytics.ts +52 -0
- package/src/attribution.ts +63 -0
- package/src/auth.ts +3 -3
- package/src/billing-mode.ts +84 -0
- package/src/blocked-repositories-protocol.ts +13 -0
- package/src/context-url.spec.ts +49 -0
- package/src/context-url.ts +107 -0
- package/src/encryption/container-module.ts +3 -4
- package/src/encryption/encryption-engine.spec.ts +10 -9
- package/src/encryption/encryption-engine.ts +21 -17
- package/src/encryption/encryption-service.ts +5 -6
- package/src/encryption/key-provider.ts +17 -20
- package/src/env.ts +2 -25
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +42 -0
- package/src/experiments/configcat.ts +56 -0
- package/src/experiments/types.ts +34 -0
- package/src/frontend-dashboard-service.ts +125 -0
- package/src/gitpod-file-parser.spec.ts +56 -62
- package/src/gitpod-file-parser.ts +17 -18
- package/src/gitpod-service.ts +369 -146
- package/src/headless-workspace-log.ts +13 -15
- package/src/ide-frontend-service.ts +3 -3
- package/src/ide-protocol.ts +147 -0
- package/src/index.ts +17 -11
- package/src/installation-admin-protocol.ts +45 -0
- package/src/license-protocol.ts +13 -7
- package/src/messaging/browser/connection.ts +187 -28
- package/src/messaging/browser/window-connection.ts +40 -30
- package/src/messaging/client-call-metrics.ts +94 -0
- package/src/messaging/error.ts +36 -8
- package/src/messaging/handler.ts +13 -1
- package/src/messaging/node/connection.ts +23 -70
- package/src/messaging/proxy-factory.ts +35 -34
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +3 -3
- package/src/permission.ts +47 -34
- package/src/plans.ts +250 -199
- package/src/protocol.spec.ts +97 -0
- package/src/protocol.ts +636 -293
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +62 -23
- package/src/teams-projects-protocol.ts +181 -0
- package/src/typings/globals.ts +6 -5
- package/src/usage.ts +85 -0
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +5 -6
- package/src/util/cancelable.ts +4 -4
- package/src/util/date-time.ts +9 -9
- package/src/util/debug-app.ts +81 -0
- package/src/util/deep-partial.ts +1 -1
- package/src/util/deferred.ts +7 -7
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +17 -9
- package/src/util/generate-workspace-id.spec.ts +38 -11
- package/src/util/generate-workspace-id.ts +465 -439
- package/src/util/gitpod-cookie.ts +38 -0
- package/src/util/gitpod-host-url.spec.ts +59 -8
- package/src/util/gitpod-host-url.ts +88 -48
- package/src/util/grpc.ts +107 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/logging.ts +157 -75
- package/src/util/make-link.ts +7 -8
- package/src/util/nice-grpc.ts +96 -0
- package/src/util/parse-workspace-id.spec.ts +38 -9
- package/src/util/parse-workspace-id.ts +33 -8
- package/src/util/queue.spec.ts +28 -26
- package/src/util/queue.ts +1 -1
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +7 -9
- package/src/util/skip-if.ts +11 -8
- package/src/util/timeutil.spec.ts +41 -15
- package/src/util/timeutil.ts +32 -16
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +201 -32
- package/src/util/workspace-port-authentication.ts +11 -14
- package/src/webhook-event.ts +55 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-cluster.ts +47 -17
- package/src/workspace-instance.ts +106 -32
- package/src/wsready.ts +11 -4
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/email-protocol.d.ts +0 -50
- package/lib/email-protocol.d.ts.map +0 -1
- package/lib/email-protocol.js +0 -28
- package/lib/email-protocol.js.map +0 -1
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js.map +0 -1
- package/lib/util/context-url.d.ts +0 -13
- package/lib/util/context-url.d.ts.map +0 -1
- package/lib/util/context-url.js +0 -26
- package/lib/util/context-url.js.map +0 -1
- package/lib/util/context-url.spec.d.ts +0 -10
- package/lib/util/context-url.spec.d.ts.map +0 -1
- package/lib/util/context-url.spec.js +0 -52
- package/lib/util/context-url.spec.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/lib/util/without.d.ts +0 -7
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js +0 -8
- package/lib/util/without.js.map +0 -1
- package/src/email-protocol.ts +0 -67
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/theia-plugins.ts +0 -11
- package/src/util/context-url.spec.ts +0 -25
- package/src/util/context-url.ts +0 -23
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
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;;;AAEH;
|
|
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"}
|
|
@@ -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
|
@@ -7,42 +7,34 @@ exports.DisposableCollection = exports.Disposable = void 0;
|
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
|
8
8
|
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
const event_1 = require("./event");
|
|
11
11
|
var Disposable;
|
|
12
12
|
(function (Disposable) {
|
|
13
13
|
function create(func) {
|
|
14
14
|
return {
|
|
15
|
-
dispose: func
|
|
15
|
+
dispose: func,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
Disposable.create = create;
|
|
19
|
-
Disposable.NULL = create(
|
|
19
|
+
Disposable.NULL = create(() => { });
|
|
20
20
|
})(Disposable = exports.Disposable || (exports.Disposable = {}));
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
class DisposableCollection {
|
|
22
|
+
constructor() {
|
|
23
23
|
this.disposables = [];
|
|
24
24
|
this.onDisposeEmitter = new event_1.Emitter();
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
enumerable: false,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
DisposableCollection.prototype.checkDisposed = function () {
|
|
26
|
+
get onDispose() {
|
|
27
|
+
return this.onDisposeEmitter.event;
|
|
28
|
+
}
|
|
29
|
+
checkDisposed() {
|
|
34
30
|
if (this.disposed) {
|
|
35
31
|
this.onDisposeEmitter.fire(undefined);
|
|
36
32
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
enumerable: false,
|
|
43
|
-
configurable: true
|
|
44
|
-
});
|
|
45
|
-
DisposableCollection.prototype.dispose = function () {
|
|
33
|
+
}
|
|
34
|
+
get disposed() {
|
|
35
|
+
return this.disposables.length === 0;
|
|
36
|
+
}
|
|
37
|
+
dispose() {
|
|
46
38
|
if (this.disposed) {
|
|
47
39
|
return;
|
|
48
40
|
}
|
|
@@ -50,32 +42,27 @@ var DisposableCollection = /** @class */ (function () {
|
|
|
50
42
|
this.disposables.pop().dispose();
|
|
51
43
|
}
|
|
52
44
|
this.checkDisposed();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var disposables = this.disposables;
|
|
45
|
+
}
|
|
46
|
+
push(disposable) {
|
|
47
|
+
const disposables = this.disposables;
|
|
57
48
|
disposables.push(disposable);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
const originalDispose = disposable.dispose.bind(disposable);
|
|
50
|
+
const toRemove = Disposable.create(() => {
|
|
51
|
+
const index = disposables.indexOf(disposable);
|
|
61
52
|
if (index !== -1) {
|
|
62
53
|
disposables.splice(index, 1);
|
|
63
54
|
}
|
|
64
|
-
|
|
55
|
+
this.checkDisposed();
|
|
65
56
|
});
|
|
66
|
-
disposable.dispose =
|
|
57
|
+
disposable.dispose = () => {
|
|
67
58
|
toRemove.dispose();
|
|
68
59
|
originalDispose();
|
|
69
60
|
};
|
|
70
61
|
return toRemove;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
return DisposableCollection;
|
|
79
|
-
}());
|
|
62
|
+
}
|
|
63
|
+
pushAll(disposables) {
|
|
64
|
+
return disposables.map((disposable) => this.push(disposable));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
80
67
|
exports.DisposableCollection = DisposableCollection;
|
|
81
68
|
//# sourceMappingURL=disposable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../src/util/disposable.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,mCAAyC;AASzC,IAAiB,UAAU,CAO1B;AAPD,WAAiB,UAA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AAK,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.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"}
|
package/lib/util/event.js
CHANGED
|
@@ -7,18 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Emitter = exports.Event = void 0;
|
|
10
|
-
|
|
10
|
+
const logging_1 = require("./logging");
|
|
11
11
|
var Event;
|
|
12
12
|
(function (Event) {
|
|
13
|
-
|
|
14
|
-
Event.None = function () {
|
|
13
|
+
const _disposable = { dispose() { } };
|
|
14
|
+
Event.None = function () {
|
|
15
|
+
return _disposable;
|
|
16
|
+
};
|
|
15
17
|
})(Event = exports.Event || (exports.Event = {}));
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
CallbackList.prototype.add = function (callback, context, bucket) {
|
|
20
|
-
var _this = this;
|
|
21
|
-
if (context === void 0) { context = null; }
|
|
18
|
+
class CallbackList {
|
|
19
|
+
add(callback, context = null, bucket) {
|
|
22
20
|
if (!this._callbacks) {
|
|
23
21
|
this._callbacks = [];
|
|
24
22
|
this._contexts = [];
|
|
@@ -26,16 +24,15 @@ var CallbackList = /** @class */ (function () {
|
|
|
26
24
|
this._callbacks.push(callback);
|
|
27
25
|
this._contexts.push(context);
|
|
28
26
|
if (Array.isArray(bucket)) {
|
|
29
|
-
bucket.push({ dispose:
|
|
27
|
+
bucket.push({ dispose: () => this.remove(callback, context) });
|
|
30
28
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (context === void 0) { context = null; }
|
|
29
|
+
}
|
|
30
|
+
remove(callback, context = null) {
|
|
34
31
|
if (!this._callbacks) {
|
|
35
32
|
return;
|
|
36
33
|
}
|
|
37
|
-
|
|
38
|
-
for (
|
|
34
|
+
let foundCallbackWithDifferentContext = false;
|
|
35
|
+
for (let i = 0, len = this._callbacks.length; i < len; i++) {
|
|
39
36
|
if (this._callbacks[i] === callback) {
|
|
40
37
|
if (this._contexts[i] === context) {
|
|
41
38
|
// callback & context match => remove it
|
|
@@ -49,21 +46,17 @@ var CallbackList = /** @class */ (function () {
|
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
if (foundCallbackWithDifferentContext) {
|
|
52
|
-
throw new Error(
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
CallbackList.prototype.invoke = function () {
|
|
56
|
-
var args = [];
|
|
57
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
58
|
-
args[_i] = arguments[_i];
|
|
49
|
+
throw new Error("When adding a listener with a context, you should remove it with the same context");
|
|
59
50
|
}
|
|
51
|
+
}
|
|
52
|
+
invoke(...args) {
|
|
60
53
|
if (!this._callbacks) {
|
|
61
54
|
return [];
|
|
62
55
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
for (
|
|
56
|
+
const ret = [];
|
|
57
|
+
const callbacks = this._callbacks.slice(0);
|
|
58
|
+
const contexts = this._contexts.slice(0);
|
|
59
|
+
for (let i = 0, len = callbacks.length; i < len; i++) {
|
|
67
60
|
try {
|
|
68
61
|
ret.push(callbacks[i].apply(contexts[i], args));
|
|
69
62
|
}
|
|
@@ -72,74 +65,67 @@ var CallbackList = /** @class */ (function () {
|
|
|
72
65
|
}
|
|
73
66
|
}
|
|
74
67
|
return ret;
|
|
75
|
-
}
|
|
76
|
-
|
|
68
|
+
}
|
|
69
|
+
isEmpty() {
|
|
77
70
|
return !this._callbacks || this._callbacks.length === 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
71
|
+
}
|
|
72
|
+
dispose() {
|
|
80
73
|
this._callbacks = undefined;
|
|
81
74
|
this._contexts = undefined;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
function Emitter(_options) {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
class Emitter {
|
|
78
|
+
constructor(_options) {
|
|
87
79
|
this._options = _options;
|
|
88
80
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
dispose
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (_this._options && _this._options.onLastListenerRemove && _this._callbacks.isEmpty()) {
|
|
111
|
-
_this._options.onLastListenerRemove(_this);
|
|
112
|
-
}
|
|
81
|
+
/**
|
|
82
|
+
* For the public to allow to subscribe
|
|
83
|
+
* to events from this Emitter
|
|
84
|
+
*/
|
|
85
|
+
get event() {
|
|
86
|
+
if (!this._event) {
|
|
87
|
+
this._event = (listener, thisArgs, disposables) => {
|
|
88
|
+
if (!this._callbacks) {
|
|
89
|
+
this._callbacks = new CallbackList();
|
|
90
|
+
}
|
|
91
|
+
if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
|
|
92
|
+
this._options.onFirstListenerAdd(this);
|
|
93
|
+
}
|
|
94
|
+
this._callbacks.add(listener, thisArgs);
|
|
95
|
+
let result;
|
|
96
|
+
result = {
|
|
97
|
+
dispose: () => {
|
|
98
|
+
this._callbacks.remove(listener, thisArgs);
|
|
99
|
+
result.dispose = Emitter._noop;
|
|
100
|
+
if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
|
|
101
|
+
this._options.onLastListenerRemove(this);
|
|
113
102
|
}
|
|
114
|
-
}
|
|
115
|
-
if (Array.isArray(disposables)) {
|
|
116
|
-
disposables.push(result);
|
|
117
|
-
}
|
|
118
|
-
return result;
|
|
103
|
+
},
|
|
119
104
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
105
|
+
if (Array.isArray(disposables)) {
|
|
106
|
+
disposables.push(result);
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return this._event;
|
|
112
|
+
}
|
|
126
113
|
/**
|
|
127
114
|
* To be kept private to fire an event to
|
|
128
115
|
* subscribers
|
|
129
116
|
*/
|
|
130
|
-
|
|
117
|
+
fire(event) {
|
|
131
118
|
if (this._callbacks) {
|
|
132
119
|
this._callbacks.invoke.call(this._callbacks, event);
|
|
133
120
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
121
|
+
}
|
|
122
|
+
dispose() {
|
|
136
123
|
if (this._callbacks) {
|
|
137
124
|
this._callbacks.dispose();
|
|
138
125
|
this._callbacks = undefined;
|
|
139
126
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return Emitter;
|
|
143
|
-
}());
|
|
127
|
+
}
|
|
128
|
+
}
|
|
144
129
|
exports.Emitter = Emitter;
|
|
130
|
+
Emitter._noop = function () { };
|
|
145
131
|
//# sourceMappingURL=event.js.map
|
package/lib/util/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/util/event.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/util/event.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,uCAAgC;AAgBhC,IAAiB,KAAK,CAKrB;AALD,WAAiB,KAAK;IAClB,MAAM,WAAW,GAAG,EAAE,OAAO,KAAI,CAAC,E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C,UAAU,EAAE,KAAK,CAAC,CAAC;SACvD;IACL,CAAC;IAED,OAAO;QACH,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC/B;IACL,CAAC;;AA1DL,0BA2DC;AA1DkB,aAAK,GAAG,cAAa,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
3
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
-
* See License
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
interface CacheEntry<T> {
|
|
7
7
|
key: string;
|
|
@@ -15,6 +15,7 @@ export declare class GarbageCollectedCache<T> {
|
|
|
15
15
|
constructor(defaultMaxAgeSeconds: number, gcIntervalSeconds: number);
|
|
16
16
|
set(key: string, value: T): void;
|
|
17
17
|
get(key: string): T | undefined;
|
|
18
|
+
delete(key: string): void;
|
|
18
19
|
protected regularlyCollectGarbage(): void;
|
|
19
20
|
protected collectGarbage(): void;
|
|
20
21
|
protected calcExpiryDate(maxAgeSeconds?: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbage-collected-cache.d.ts","sourceRoot":"","sources":["../../src/util/garbage-collected-cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"garbage-collected-cache.d.ts","sourceRoot":"","sources":["../../src/util/garbage-collected-cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,UAAU,UAAU,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAqB,CAAC,CAAC;IAGpB,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM;IAAE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM;IAFzG,SAAS,CAAC,QAAQ,CAAC,KAAK,6BAAoC;gBAE7B,oBAAoB,EAAE,MAAM,EAAqB,iBAAiB,EAAE,MAAM;IAIlG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAazB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAa/B,MAAM,CAAC,GAAG,EAAE,MAAM;IAIzB,SAAS,CAAC,uBAAuB;IAIjC,SAAS,CAAC,cAAc;IASxB,SAAS,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM;CAG3D"}
|
|
@@ -2,74 +2,59 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
4
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
|
-
var __values = (this && this.__values) || function(o) {
|
|
8
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
9
|
-
if (m) return m.call(o);
|
|
10
|
-
if (o && typeof o.length === "number") return {
|
|
11
|
-
next: function () {
|
|
12
|
-
if (o && i >= o.length) o = void 0;
|
|
13
|
-
return { value: o && o[i++], done: !o };
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
17
|
-
};
|
|
18
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
8
|
exports.GarbageCollectedCache = void 0;
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const repeat_1 = require("./repeat");
|
|
10
|
+
class GarbageCollectedCache {
|
|
11
|
+
constructor(defaultMaxAgeSeconds, gcIntervalSeconds) {
|
|
22
12
|
this.defaultMaxAgeSeconds = defaultMaxAgeSeconds;
|
|
23
13
|
this.gcIntervalSeconds = gcIntervalSeconds;
|
|
24
14
|
this.store = new Map();
|
|
25
15
|
this.regularlyCollectGarbage();
|
|
26
16
|
}
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
set(key, value) {
|
|
18
|
+
const oldValue = this.store.get(key);
|
|
29
19
|
if (oldValue) {
|
|
30
20
|
// We don't want values to be cached indefinitely just because their queried often
|
|
31
21
|
return;
|
|
32
22
|
}
|
|
33
23
|
this.store.set(key, {
|
|
34
|
-
key
|
|
35
|
-
value
|
|
24
|
+
key,
|
|
25
|
+
value,
|
|
36
26
|
expiryDate: this.calcExpiryDate(),
|
|
37
27
|
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
}
|
|
29
|
+
get(key) {
|
|
30
|
+
const entry = this.store.get(key);
|
|
41
31
|
if (!entry) {
|
|
42
32
|
return undefined;
|
|
43
33
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
setInterval(function () { return _this.collectGarbage(); }, this.gcIntervalSeconds * 1000);
|
|
49
|
-
};
|
|
50
|
-
GarbageCollectedCache.prototype.collectGarbage = function () {
|
|
51
|
-
var e_1, _a;
|
|
52
|
-
var now = Date.now();
|
|
53
|
-
try {
|
|
54
|
-
for (var _b = __values(this.store.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
55
|
-
var entry = _c.value;
|
|
56
|
-
if (entry.expiryDate < now) {
|
|
57
|
-
this.store.delete(entry.key);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
34
|
+
// Still valid?
|
|
35
|
+
if (entry.expiryDate < Date.now()) {
|
|
36
|
+
this.store.delete(entry.key);
|
|
37
|
+
return undefined;
|
|
60
38
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
39
|
+
return entry.value;
|
|
40
|
+
}
|
|
41
|
+
delete(key) {
|
|
42
|
+
this.store.delete(key);
|
|
43
|
+
}
|
|
44
|
+
regularlyCollectGarbage() {
|
|
45
|
+
(0, repeat_1.repeat)(() => this.collectGarbage(), this.gcIntervalSeconds * 1000);
|
|
46
|
+
}
|
|
47
|
+
collectGarbage() {
|
|
48
|
+
const now = Date.now();
|
|
49
|
+
for (const entry of this.store.values()) {
|
|
50
|
+
if (entry.expiryDate < now) {
|
|
51
|
+
this.store.delete(entry.key);
|
|
65
52
|
}
|
|
66
|
-
finally { if (e_1) throw e_1.error; }
|
|
67
53
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return Date.now() + (
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}());
|
|
54
|
+
}
|
|
55
|
+
calcExpiryDate(maxAgeSeconds) {
|
|
56
|
+
return Date.now() + (maxAgeSeconds || this.defaultMaxAgeSeconds) * 1000;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
74
59
|
exports.GarbageCollectedCache = GarbageCollectedCache;
|
|
75
60
|
//# sourceMappingURL=garbage-collected-cache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbage-collected-cache.js","sourceRoot":"","sources":["../../src/util/garbage-collected-cache.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"garbage-collected-cache.js","sourceRoot":"","sources":["../../src/util/garbage-collected-cache.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAkC;AAQlC,MAAa,qBAAqB;IAG9B,YAA+B,oBAA4B,EAAqB,iBAAyB;QAA1E,yBAAoB,GAApB,oBAAoB,CAAQ;QAAqB,sBAAiB,GAAjB,iBAAiB,CAAQ;QAFtF,UAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;QAGxD,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACnC,CAAC;IAEM,GAAG,CAAC,GAAW,EAAE,KAAQ;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CA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,GAAG,IAAI,CAAC;IAC5E,CAAC;CACJ;AArDD,sDAqDC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
3
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
+
* See License.AGPL.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateWorkspaceID(firstSegment?: string, secondSegment?: string): Promise<string>;
|
|
2
7
|
export declare const colors: string[];
|
|
3
8
|
export declare const animals: string[];
|
|
4
9
|
//# sourceMappingURL=generate-workspace-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-workspace-id.d.ts","sourceRoot":"","sources":["../../src/util/generate-workspace-id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-workspace-id.d.ts","sourceRoot":"","sources":["../../src/util/generate-workspace-id.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,wBAAsB,mBAAmB,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxG;AA8BD,eAAO,MAAM,MAAM,UAsDlB,CAAC;AAEF,eAAO,MAAM,OAAO,UA2XnB,CAAC"}
|