@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/logging.js
CHANGED
|
@@ -2,131 +2,80 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
8
|
-
__assign = Object.assign || function(t) {
|
|
9
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
-
s = arguments[i];
|
|
11
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12
|
-
t[p] = s[p];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
return __assign.apply(this, arguments);
|
|
17
|
-
};
|
|
18
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
19
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
20
|
-
if (!m) return o;
|
|
21
|
-
var i = m.call(o), r, ar = [], e;
|
|
22
|
-
try {
|
|
23
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
24
|
-
}
|
|
25
|
-
catch (error) { e = { error: error }; }
|
|
26
|
-
finally {
|
|
27
|
-
try {
|
|
28
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
29
|
-
}
|
|
30
|
-
finally { if (e) throw e.error; }
|
|
31
|
-
}
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
var __spread = (this && this.__spread) || function () {
|
|
35
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
36
|
-
return ar;
|
|
37
|
-
};
|
|
38
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.log = exports.LogContext = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
;
|
|
8
|
+
exports.LogrusLogLevel = exports.LogrusLogLevels = exports.log = exports.LogContext = void 0;
|
|
9
|
+
const inspect = require("util").inspect; // undefined in frontend
|
|
10
|
+
let plainLogging = false; // set to true during development to get non JSON output
|
|
11
|
+
let jsonLogging = false;
|
|
12
|
+
let component;
|
|
13
|
+
let version;
|
|
45
14
|
var LogContext;
|
|
46
15
|
(function (LogContext) {
|
|
47
16
|
function from(params) {
|
|
48
17
|
var _a, _b;
|
|
49
18
|
return {
|
|
50
19
|
sessionId: (_a = params.request) === null || _a === void 0 ? void 0 : _a.requestID,
|
|
51
|
-
userId: params.userId || ((_b = params.user) === null || _b === void 0 ? void 0 : _b.id)
|
|
20
|
+
userId: params.userId || ((_b = params.user) === null || _b === void 0 ? void 0 : _b.id),
|
|
52
21
|
};
|
|
53
22
|
}
|
|
54
23
|
LogContext.from = from;
|
|
55
24
|
})(LogContext = exports.LogContext || (exports.LogContext = {}));
|
|
56
|
-
;
|
|
57
25
|
var log;
|
|
58
26
|
(function (log) {
|
|
59
|
-
function error() {
|
|
60
|
-
var args = [];
|
|
61
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
62
|
-
args[_i] = arguments[_i];
|
|
63
|
-
}
|
|
27
|
+
function error(...args) {
|
|
64
28
|
errorLog(false, args);
|
|
65
29
|
}
|
|
66
30
|
log.error = error;
|
|
67
|
-
function warn() {
|
|
68
|
-
var args = [];
|
|
69
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
70
|
-
args[_i] = arguments[_i];
|
|
71
|
-
}
|
|
31
|
+
function warn(...args) {
|
|
72
32
|
warnLog(false, args);
|
|
73
33
|
}
|
|
74
34
|
log.warn = warn;
|
|
75
|
-
function info() {
|
|
76
|
-
var args = [];
|
|
77
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
78
|
-
args[_i] = arguments[_i];
|
|
79
|
-
}
|
|
35
|
+
function info(...args) {
|
|
80
36
|
infoLog(false, args);
|
|
81
37
|
}
|
|
82
38
|
log.info = info;
|
|
83
|
-
function debug() {
|
|
84
|
-
var args = [];
|
|
85
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
86
|
-
args[_i] = arguments[_i];
|
|
87
|
-
}
|
|
39
|
+
function debug(...args) {
|
|
88
40
|
debugLog(false, args);
|
|
89
41
|
}
|
|
90
42
|
log.debug = debug;
|
|
91
43
|
/**
|
|
92
44
|
* Do not use in frontend.
|
|
93
45
|
*/
|
|
94
|
-
function enableJSONLogging(componentArg, versionArg) {
|
|
46
|
+
function enableJSONLogging(componentArg, versionArg, logLevel) {
|
|
95
47
|
component = componentArg;
|
|
96
48
|
version = versionArg;
|
|
49
|
+
setLogLevel(logLevel);
|
|
50
|
+
}
|
|
51
|
+
log.enableJSONLogging = enableJSONLogging;
|
|
52
|
+
function setLogLevel(logLevel) {
|
|
97
53
|
jsonLogging = true;
|
|
98
|
-
console.error = function () {
|
|
99
|
-
var args = [];
|
|
100
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
101
|
-
args[_i] = arguments[_i];
|
|
102
|
-
}
|
|
54
|
+
console.error = function (...args) {
|
|
103
55
|
errorLog(true, args);
|
|
104
56
|
};
|
|
105
|
-
console.warn = function () {
|
|
106
|
-
var args = [];
|
|
107
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
108
|
-
args[_i] = arguments[_i];
|
|
109
|
-
}
|
|
57
|
+
console.warn = function (...args) {
|
|
110
58
|
warnLog(true, args);
|
|
111
59
|
};
|
|
112
|
-
console.info = function () {
|
|
113
|
-
var args = [];
|
|
114
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
115
|
-
args[_i] = arguments[_i];
|
|
116
|
-
}
|
|
60
|
+
console.info = function (...args) {
|
|
117
61
|
infoLog(true, args);
|
|
118
62
|
};
|
|
119
|
-
console.debug = function () {
|
|
120
|
-
var args = [];
|
|
121
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
122
|
-
args[_i] = arguments[_i];
|
|
123
|
-
}
|
|
63
|
+
console.debug = function (...args) {
|
|
124
64
|
debugLog(true, args);
|
|
125
65
|
};
|
|
126
66
|
console.log = console.info;
|
|
127
67
|
// FIXME wrap also other console methods (e.g. trace())
|
|
68
|
+
// set/unset log functions based on loglevel so we only have to evaluate once, not every call
|
|
69
|
+
const noop = () => { };
|
|
70
|
+
const setLog = (logFunc, funcLevel) => {
|
|
71
|
+
return LogrusLogLevel.isGreatherOrEqual(funcLevel, logLevel) ? logFunc : noop;
|
|
72
|
+
};
|
|
73
|
+
errorLog = setLog(doErrorLog, "error");
|
|
74
|
+
warnLog = setLog(doWarnLog, "warning");
|
|
75
|
+
infoLog = setLog(doInfoLog, "info");
|
|
76
|
+
debugLog = setLog(doDebugLog, "debug");
|
|
128
77
|
}
|
|
129
|
-
log.
|
|
78
|
+
log.setLogLevel = setLogLevel;
|
|
130
79
|
function resetToDefaultLogging() {
|
|
131
80
|
jsonLogging = false;
|
|
132
81
|
console.log = logConsoleLog;
|
|
@@ -136,25 +85,71 @@ var log;
|
|
|
136
85
|
console.debug = debugConsoleLog;
|
|
137
86
|
}
|
|
138
87
|
log.resetToDefaultLogging = resetToDefaultLogging;
|
|
88
|
+
function setVersion(versionArg) {
|
|
89
|
+
version = versionArg;
|
|
90
|
+
}
|
|
91
|
+
log.setVersion = setVersion;
|
|
139
92
|
})(log = exports.log || (exports.log = {}));
|
|
140
|
-
|
|
141
|
-
|
|
93
|
+
let errorLog = doErrorLog;
|
|
94
|
+
function doErrorLog(calledViaConsole, args) {
|
|
95
|
+
doLog(calledViaConsole, errorConsoleLog, "ERROR", args);
|
|
142
96
|
}
|
|
143
|
-
|
|
144
|
-
|
|
97
|
+
let warnLog = doWarnLog;
|
|
98
|
+
function doWarnLog(calledViaConsole, args) {
|
|
99
|
+
doLog(calledViaConsole, warnConsoleLog, "WARNING", args);
|
|
145
100
|
}
|
|
146
|
-
|
|
147
|
-
|
|
101
|
+
let infoLog = doInfoLog;
|
|
102
|
+
function doInfoLog(calledViaConsole, args) {
|
|
103
|
+
doLog(calledViaConsole, infoConsoleLog, "INFO", args);
|
|
148
104
|
}
|
|
149
|
-
|
|
150
|
-
|
|
105
|
+
let debugLog = doDebugLog;
|
|
106
|
+
function doDebugLog(calledViaConsole, args) {
|
|
107
|
+
doLog(calledViaConsole, debugConsoleLog, "DEBUG", args);
|
|
151
108
|
}
|
|
109
|
+
exports.LogrusLogLevels = {
|
|
110
|
+
trace: true,
|
|
111
|
+
debug: true,
|
|
112
|
+
info: true,
|
|
113
|
+
warning: true,
|
|
114
|
+
error: true,
|
|
115
|
+
fatal: true,
|
|
116
|
+
panic: true,
|
|
117
|
+
};
|
|
118
|
+
var LogrusLogLevel;
|
|
119
|
+
(function (LogrusLogLevel) {
|
|
120
|
+
function isGreatherOrEqual(lvl, ref) {
|
|
121
|
+
if (lvl === undefined) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
if (ref === undefined) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
return getLevelArity(lvl) >= getLevelArity(ref);
|
|
128
|
+
}
|
|
129
|
+
LogrusLogLevel.isGreatherOrEqual = isGreatherOrEqual;
|
|
130
|
+
function getLevelArity(lvl) {
|
|
131
|
+
return Object.keys(exports.LogrusLogLevels).findIndex((l) => l === lvl);
|
|
132
|
+
}
|
|
133
|
+
function getFromEnv() {
|
|
134
|
+
const lvlStr = process.env.LOG_LEVEL;
|
|
135
|
+
if (!lvlStr) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
const lvl = lvlStr;
|
|
139
|
+
const exists = exports.LogrusLogLevels[lvl];
|
|
140
|
+
if (!exists) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
return lvl;
|
|
144
|
+
}
|
|
145
|
+
LogrusLogLevel.getFromEnv = getFromEnv;
|
|
146
|
+
})(LogrusLogLevel = exports.LogrusLogLevel || (exports.LogrusLogLevel = {}));
|
|
152
147
|
var GoogleLogSeverity;
|
|
153
148
|
(function (GoogleLogSeverity) {
|
|
154
|
-
GoogleLogSeverity.isGreaterOrEqualThanWarning =
|
|
149
|
+
GoogleLogSeverity.isGreaterOrEqualThanWarning = (severity) => {
|
|
155
150
|
switch (severity) {
|
|
156
|
-
case
|
|
157
|
-
case
|
|
151
|
+
case "INFO":
|
|
152
|
+
case "DEBUG":
|
|
158
153
|
return false;
|
|
159
154
|
default:
|
|
160
155
|
return true;
|
|
@@ -163,23 +158,23 @@ var GoogleLogSeverity;
|
|
|
163
158
|
})(GoogleLogSeverity || (GoogleLogSeverity = {}));
|
|
164
159
|
function doLog(calledViaConsole, consoleLog, severity, args) {
|
|
165
160
|
if (!jsonLogging) {
|
|
166
|
-
consoleLog
|
|
161
|
+
consoleLog(...args);
|
|
167
162
|
return;
|
|
168
163
|
}
|
|
169
164
|
if (args.length == 0) {
|
|
170
165
|
// console.xyz()
|
|
171
166
|
return;
|
|
172
167
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
168
|
+
let context;
|
|
169
|
+
let message;
|
|
170
|
+
let error;
|
|
171
|
+
let payloadArgs;
|
|
177
172
|
if (args[0] instanceof Error) {
|
|
178
173
|
// console.xyz(Error, ...any) / log.xyz(Error) / log.xyz(Error, LogPayload)
|
|
179
174
|
error = args[0];
|
|
180
175
|
payloadArgs = args.slice(1);
|
|
181
176
|
}
|
|
182
|
-
else if (typeof args[0] ===
|
|
177
|
+
else if (typeof args[0] === "string") {
|
|
183
178
|
message = args[0];
|
|
184
179
|
if (args.length < 2 || !(args[1] instanceof Error)) {
|
|
185
180
|
// console.xyz(string) / console.xyz(string, !Error, ...any) / log.xyz(string) / log.xyz(string, LogPayload)
|
|
@@ -203,7 +198,7 @@ function doLog(calledViaConsole, consoleLog, severity, args) {
|
|
|
203
198
|
error = args[1];
|
|
204
199
|
payloadArgs = args.slice(2);
|
|
205
200
|
}
|
|
206
|
-
else if (typeof args[1] ===
|
|
201
|
+
else if (typeof args[1] === "string") {
|
|
207
202
|
message = args[1];
|
|
208
203
|
if (args.length < 3 || !(args[2] instanceof Error)) {
|
|
209
204
|
// log.xyz(LogContext, string) / log.xyz(LogContext, string, LogPayload)
|
|
@@ -221,7 +216,7 @@ function doLog(calledViaConsole, consoleLog, severity, args) {
|
|
|
221
216
|
payloadArgs = args;
|
|
222
217
|
}
|
|
223
218
|
}
|
|
224
|
-
|
|
219
|
+
const logItem = makeLogItem(severity, context, message, error, payloadArgs, calledViaConsole);
|
|
225
220
|
if (logItem !== undefined) {
|
|
226
221
|
consoleLog(logItem);
|
|
227
222
|
}
|
|
@@ -230,27 +225,33 @@ function makeLogItem(severity, context, message, error, payloadArgs, calledViaCo
|
|
|
230
225
|
if (context !== undefined && Object.keys(context).length == 0) {
|
|
231
226
|
context = undefined;
|
|
232
227
|
}
|
|
233
|
-
|
|
228
|
+
let reportedErrorEvent = {};
|
|
234
229
|
if (GoogleLogSeverity.isGreaterOrEqualThanWarning(severity)) {
|
|
235
230
|
reportedErrorEvent = makeReportedErrorEvent(error);
|
|
236
231
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
severity
|
|
240
|
-
message
|
|
241
|
-
error
|
|
242
|
-
payload
|
|
243
|
-
|
|
232
|
+
const payload = payloadArgs.length == 0 ? undefined : payloadArgs.length == 1 ? payloadArgs[0] : payloadArgs;
|
|
233
|
+
const logItem = Object.assign(Object.assign({}, reportedErrorEvent), { component,
|
|
234
|
+
severity, time: new Date().toISOString(), context,
|
|
235
|
+
message,
|
|
236
|
+
error,
|
|
237
|
+
payload, loggedViaConsole: calledViaConsole ? true : undefined });
|
|
238
|
+
if (plainLogging) {
|
|
239
|
+
return `[${logItem.severity}] [${logItem.component}] ${logItem.message}
|
|
240
|
+
${JSON.stringify(payload || "", undefined, " ")}
|
|
241
|
+
${error || ""}
|
|
242
|
+
`.trim();
|
|
243
|
+
}
|
|
244
|
+
let result = stringifyLogItem(logItem);
|
|
244
245
|
if (result.length > maxAllowedLogItemLength && payload !== undefined) {
|
|
245
246
|
delete logItem.payload;
|
|
246
|
-
logItem.payloadStub =
|
|
247
|
+
(logItem).payloadStub = `Payload stripped as log item was longer than ${maxAllowedLogItemLength} characters`;
|
|
247
248
|
result = stringifyLogItem(logItem);
|
|
248
249
|
if (result.length <= maxAllowedLogItemLength) {
|
|
249
|
-
log.warn(
|
|
250
|
+
log.warn("Log item too large, stripping payload", { logItemStub: makeLogItemStub(logItem) });
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
if (result.length > maxAllowedLogItemLength) {
|
|
253
|
-
log.error(
|
|
254
|
+
log.error("Log item too large w/o payload, discarding", { logItemStub: makeLogItemStub(logItem) });
|
|
254
255
|
return undefined;
|
|
255
256
|
}
|
|
256
257
|
return result;
|
|
@@ -258,18 +259,18 @@ function makeLogItem(severity, context, message, error, payloadArgs, calledViaCo
|
|
|
258
259
|
// See https://cloud.google.com/error-reporting/docs/formatting-error-messages
|
|
259
260
|
// and https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.events/report#ReportedErrorEvent
|
|
260
261
|
function makeReportedErrorEvent(error) {
|
|
261
|
-
|
|
262
|
+
const result = {
|
|
262
263
|
// Serves as marker only
|
|
263
264
|
"@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent",
|
|
264
265
|
// This is useful for filtering in the UI
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
266
|
+
serviceContext: {
|
|
267
|
+
service: component || "<ts-not-set>",
|
|
268
|
+
version: version || "<ts-not-set>",
|
|
269
|
+
},
|
|
269
270
|
};
|
|
270
271
|
if (error) {
|
|
271
272
|
// According to: https://cloud.google.com/error-reporting/docs/formatting-error-messages#json_representation
|
|
272
|
-
|
|
273
|
+
const stackTrace = error.stack;
|
|
273
274
|
if (stackTrace) {
|
|
274
275
|
result.stack_trace = stackTrace;
|
|
275
276
|
}
|
|
@@ -277,14 +278,14 @@ function makeReportedErrorEvent(error) {
|
|
|
277
278
|
return result;
|
|
278
279
|
}
|
|
279
280
|
function makeLogItemStub(logItem) {
|
|
280
|
-
|
|
281
|
+
const result = {
|
|
281
282
|
component: logItem.component,
|
|
282
283
|
severity: logItem.severity,
|
|
283
284
|
time: logItem.time,
|
|
284
285
|
environment: logItem.environment,
|
|
285
|
-
region: logItem.region
|
|
286
|
+
region: logItem.region,
|
|
286
287
|
};
|
|
287
|
-
if (typeof
|
|
288
|
+
if (typeof logItem.message === "string") {
|
|
288
289
|
if (logItem.message.length <= maxMessageStubLength) {
|
|
289
290
|
result.message = logItem.message;
|
|
290
291
|
}
|
|
@@ -319,16 +320,18 @@ function stringifyLogItem(logItem) {
|
|
|
319
320
|
* Jsonifies Errors properly, not as {} only.
|
|
320
321
|
*/
|
|
321
322
|
function jsonStringifyWithErrors(value) {
|
|
322
|
-
return JSON.stringify(value,
|
|
323
|
+
return JSON.stringify(value, (key, value) => {
|
|
324
|
+
return value instanceof Error ? value.stack : value;
|
|
325
|
+
});
|
|
323
326
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
const logConsoleLog = console.log;
|
|
328
|
+
const errorConsoleLog = console.error;
|
|
329
|
+
const warnConsoleLog = console.warn;
|
|
330
|
+
const infoConsoleLog = console.info;
|
|
331
|
+
const debugConsoleLog = console.debug;
|
|
329
332
|
// according to https://cloud.google.com/logging/quotas#logging_usage_limits, the log item must fit in 100 KB (internal data
|
|
330
333
|
// size; its relation to the stringified JSON's size is unknown), so let's have a sufficient safe margin
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
+
const maxAllowedLogItemLength = 32 * 1024;
|
|
335
|
+
const maxMessageStubLength = 1024;
|
|
336
|
+
const maxErrorStubLength = 4096;
|
|
334
337
|
//# sourceMappingURL=logging.js.map
|
package/lib/util/logging.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/util/logging.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/util/logging.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,MAAM,OAAO,GAA4B,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB;AAE1F,IAAI,YAAY,GAAY,KAAK,CAAC,CAAC,wDAAwD;AAC3F,IAAI,WAAW,GAAY,KAAK,CAAC;AACjC,IAAI,SAA6B,CAAC;AAClC,IAAI,OAA2B,CAAC;AAQhC,IAAiB,UAAU,CAO1B;AAPD,WAAiB,UAAU;IACvB,SAAgB,IAAI,CAAC,MAAsD;;QACvE,OAAmB;YACf,SAAS,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,SAAS;YACpC,MAAM,EAAE,MAAM,CAAC,MAAM,KAAI,MAAA,MAAM,CAAC,IAAI,0CAAE,EAAE,CAAA;SAC3C,CAAC;IACN,CAAC;IALe,eAAI,OAKnB,CAAA;AACL,CAAC,EAPgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAO1B;AAMD,IAAiB,GAAG,CA2HnB;AA3HD,WAAiB,GAAG;IAahB,SAAgB,KAAK,CAAC,GAAG,IAAW;QAChC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAFe,SAAK,QAEpB,CAAA;IAcD,SAAgB,IAAI,CAAC,GAAG,IAAW;QAC/B,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzB,CA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,CAAC,GAAW,EAAE,KAAU,EAAO,EAAE;QAC1D,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACxD,CAAC,CAAC,CAAC;AACP,CAAC;AAGD,MAAM,aAAa,GAAe,OAAO,CAAC,GAAG,CAAC;AAC9C,MAAM,eAAe,GAAe,OAAO,CAAC,KAAK,CAAC;AAClD,MAAM,cAAc,GAAe,OAAO,CAAC,IAAI,CAAC;AAChD,MAAM,cAAc,GAAe,OAAO,CAAC,IAAI,CAAC;AAChD,MAAM,eAAe,GAAe,OAAO,CAAC,KAAK,CAAC;AAElD,4HAA4H;AAC5H,wGAAwG;AACxG,MAAM,uBAAuB,GAAW,EAAE,GAAG,IAAI,CAAC;AAClD,MAAM,oBAAoB,GAAW,IAAI,CAAC;AAC1C,MAAM,kBAAkB,GAAW,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.spec.d.ts","sourceRoot":"","sources":["../../src/util/logging.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
const mocha_typescript_1 = require("mocha-typescript");
|
|
27
|
+
const logging_1 = require("./logging");
|
|
28
|
+
let TestLogging = class TestLogging {
|
|
29
|
+
testLogInfo_output() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const testObj = {
|
|
32
|
+
null: null,
|
|
33
|
+
undefined: undefined,
|
|
34
|
+
empty: "",
|
|
35
|
+
foo: "bar",
|
|
36
|
+
number: 0,
|
|
37
|
+
};
|
|
38
|
+
logging_1.log.info("info logging test", testObj);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
__decorate([
|
|
43
|
+
mocha_typescript_1.test,
|
|
44
|
+
__metadata("design:type", Function),
|
|
45
|
+
__metadata("design:paramtypes", []),
|
|
46
|
+
__metadata("design:returntype", Promise)
|
|
47
|
+
], TestLogging.prototype, "testLogInfo_output", null);
|
|
48
|
+
TestLogging = __decorate([
|
|
49
|
+
mocha_typescript_1.suite
|
|
50
|
+
], TestLogging);
|
|
51
|
+
module.exports = new TestLogging();
|
|
52
|
+
//# sourceMappingURL=logging.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.spec.js","sourceRoot":"","sources":["../../src/util/logging.spec.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;AAEH,uDAA+C;AAC/C,uCAAgC;AAGhC,IAAM,WAAW,GAAjB,MAAM,WAAW;IACM,kBAAkB;;YACjC,MAAM,OAAO,GAAG;gBACZ,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,SAAS;gBACpB,KAAK,EAAE,EAAE;gBACT,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,CAAC;aACZ,CAAC;YACF,aAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;KAAA;CACJ,CAAA;AAVS;IAAL,uBAAI;;;;qDASJ;AAVC,WAAW;IADhB,wBAAK;GACA,WAAW,CAWhB;AACD,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
package/lib/util/make-link.d.ts
CHANGED
|
@@ -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
|
export declare function makeLink(node: HTMLElement, url: string, hover: string): void;
|
|
7
7
|
//# sourceMappingURL=make-link.d.ts.map
|
package/lib/util/make-link.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2020 Gitpod GmbH. All rights reserved.
|
|
4
4
|
* Licensed under the GNU Affero General Public License (AGPL).
|
|
5
|
-
* See License
|
|
5
|
+
* See License.AGPL.txt in the project root for license information.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.makeLink = void 0;
|
|
9
9
|
function isOpenNewTab(event) {
|
|
10
|
-
return event.metaKey ||
|
|
10
|
+
return event.metaKey || event.ctrlKey;
|
|
11
11
|
}
|
|
12
12
|
function makeLink(node, url, hover) {
|
|
13
|
-
node.onclick =
|
|
14
|
-
|
|
13
|
+
node.onclick = (event) => {
|
|
14
|
+
let target = "_self";
|
|
15
15
|
if (isOpenNewTab(event)) {
|
|
16
|
-
target =
|
|
16
|
+
target = "_blank";
|
|
17
17
|
}
|
|
18
18
|
window.open(url, target);
|
|
19
19
|
};
|
|
20
|
-
node.style.cursor =
|
|
20
|
+
node.style.cursor = "pointer";
|
|
21
21
|
node.title = hover;
|
|
22
22
|
}
|
|
23
23
|
exports.makeLink = makeLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-link.js","sourceRoot":"","sources":["../../src/util/make-link.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,SAAS,YAAY,CAAC,KAAiB;IACnC,OAAO,KAAK,CAAC,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"make-link.js","sourceRoot":"","sources":["../../src/util/make-link.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,SAAS,YAAY,CAAC,KAAiB;IACnC,OAAO,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;AAC1C,CAAC;AAED,SAAgB,QAAQ,CAAC,IAAiB,EAAE,GAAW,EAAE,KAAa;IAClE,IAAI,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;QACrB,IAAI,MAAM,GAAG,OAAO,CAAC;QACrB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;YACrB,MAAM,GAAG,QAAQ,CAAC;SACrB;QACD,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;IACF,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACvB,CAAC;AAVD,4BAUC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 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
|
+
import { ClientMiddleware } from "nice-grpc-common";
|
|
7
|
+
import { IClientCallMetrics } from "./grpc";
|
|
8
|
+
export declare function prometheusClientMiddleware(metrics: IClientCallMetrics): ClientMiddleware;
|
|
9
|
+
//# sourceMappingURL=nice-grpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nice-grpc.d.ts","sourceRoot":"","sources":["../../src/util/nice-grpc.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAGH,gBAAgB,EAInB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAkB,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AA2B5D,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,kBAAkB,GAAG,gBAAgB,CAqDxF"}
|