@gitpod/gitpod-protocol 0.1.5-wth-argo.0 → 0.1.5-yh-vmoptions-fork.1
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 +206 -28
- package/lib/accounting-protocol.d.ts +162 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +107 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +32 -4
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +15 -0
- 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/auth.d.ts.map +1 -1
- package/lib/context-url.d.ts +31 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +102 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +14 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +109 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/email-protocol.d.ts +1 -2
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +5 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +25 -26
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -37
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +30 -44
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +31 -38
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +0 -6
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +7 -27
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +26 -42
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +145 -142
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +180 -33
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +194 -273
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +9 -11
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +6 -8
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +5 -1
- package/lib/ide-frontend-service.d.ts.map +1 -1
- package/lib/ide-protocol.d.ts +105 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/{util/without.js → ide-protocol.js} +2 -2
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +16 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +27 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +30 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/license-protocol.d.ts +7 -0
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +5 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +184 -34
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +4 -4
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +42 -59
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +6 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +12 -2
- 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 +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 +10 -3
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +41 -31
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +210 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +605 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +196 -83
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +264 -200
- package/lib/protocol.js.map +1 -1
- 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/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +2 -3
- 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 +91 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +74 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +118 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +30 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/typings/globals.d.ts +2 -2
- package/lib/typings/globals.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/util/async-iterator.js +57 -135
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +11 -11
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js +10 -12
- 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 +1 -0
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +27 -47
- 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.js +68 -78
- 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 +1 -2
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +108 -109
- 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 +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -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} +1 -1
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +125 -129
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +5 -5
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +10 -0
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -7
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +4 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +123 -84
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +147 -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.map +1 -1
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts +1 -0
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +35 -17
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +21 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +52 -6
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +197 -64
- 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 +7 -7
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +10 -12
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +76 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +31 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +45 -5
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +32 -18
- package/pkg-yarn.lock +18 -10
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +241 -0
- package/src/admin-protocol.ts +70 -19
- package/src/analytics.ts +52 -0
- package/src/auth.ts +2 -2
- package/src/context-url.spec.ts +67 -0
- package/src/context-url.ts +109 -0
- package/src/email-protocol.ts +5 -7
- package/src/encryption/container-module.ts +2 -3
- package/src/encryption/encryption-engine.spec.ts +9 -8
- package/src/encryption/encryption-engine.ts +14 -14
- package/src/encryption/encryption-service.ts +4 -5
- package/src/encryption/key-provider.ts +16 -19
- package/src/env.ts +0 -22
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +348 -110
- package/src/headless-workspace-log.ts +12 -14
- package/src/ide-frontend-service.ts +6 -2
- package/src/ide-protocol.ts +119 -0
- package/src/index.ts +16 -10
- package/src/installation-admin-protocol.ts +42 -0
- package/src/license-protocol.ts +12 -6
- package/src/messaging/browser/connection.ts +197 -18
- package/src/messaging/browser/window-connection.ts +39 -29
- package/src/messaging/client-call-metrics.ts +96 -0
- package/src/messaging/error.ts +18 -5
- 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 +42 -33
- package/src/plans.ts +679 -0
- package/src/protocol.ts +493 -275
- package/src/snapshot-url.spec.ts +27 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +147 -0
- package/src/teams-projects-protocol.ts +153 -0
- package/src/typings/globals.ts +4 -4
- package/src/util/analytics.ts +109 -0
- package/src/util/async-iterator.ts +4 -5
- package/src/util/cancelable.ts +3 -3
- package/src/util/date-time.ts +8 -8
- package/src/util/deferred.ts +6 -6
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +11 -8
- package/src/util/generate-workspace-id.spec.ts +37 -10
- package/src/util/generate-workspace-id.ts +464 -438
- 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 +52 -40
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +145 -72
- package/src/util/make-link.ts +6 -7
- package/src/util/parse-workspace-id.spec.ts +37 -8
- package/src/util/parse-workspace-id.ts +32 -7
- package/src/util/queue.spec.ts +28 -26
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +6 -8
- package/src/util/skip-if.ts +10 -7
- package/src/util/timeutil.spec.ts +14 -15
- package/src/util/timeutil.ts +25 -15
- package/src/util/tracing.spec.ts +88 -0
- package/src/util/tracing.ts +200 -31
- package/src/util/workspace-port-authentication.ts +10 -13
- package/src/workspace-cluster.ts +107 -0
- package/src/workspace-instance.ts +98 -31
- package/src/wsready.ts +3 -3
- package/data/builtin-theia-plugins.json +0 -372
- 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.map +0 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-iterator.d.ts","sourceRoot":"","sources":["../../src/util/async-iterator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,wBAAsB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAOpH;AACD,wBAAsB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAQ5G;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IACrE,WAAW,IAAI,IAAI,CAAC;CACvB;AACD,qBAAa,wBAAwB,CAAC,CAAC,CAAE,YAAW,qBAAqB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"async-iterator.d.ts","sourceRoot":"","sources":["../../src/util/async-iterator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,wBAAsB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAOpH;AACD,wBAAsB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAQ5G;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IACrE,WAAW,IAAI,IAAI,CAAC;CACvB;AACD,qBAAa,wBAAwB,CAAC,CAAC,CAAE,YAAW,qBAAqB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAKrF,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAJjE,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,CAAM;IAC1B,SAAS,CAAC,MAAM,SAAK;IACrB,SAAS,CAAC,SAAS,UAAS;gBAEG,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAE1D,WAAW;IAKL,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAgB1D,CAAC,MAAM,CAAC,aAAa,CAAC;CAGzB"}
|
|
@@ -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;
|
|
@@ -50,137 +23,86 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
50
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
24
|
exports.AsyncCachingIteratorImpl = exports.filter = exports.find = void 0;
|
|
52
25
|
// Use asyncIterators with es2015
|
|
53
|
-
if (typeof Symbol.asyncIterator ===
|
|
54
|
-
Symbol.asyncIterator = Symbol.asyncIterator || Symbol(
|
|
26
|
+
if (typeof Symbol.asyncIterator === "undefined") {
|
|
27
|
+
Symbol.asyncIterator = Symbol.asyncIterator || Symbol("asyncIterator");
|
|
55
28
|
}
|
|
56
29
|
function find(it, predicate) {
|
|
57
30
|
var it_1, it_1_1;
|
|
58
31
|
var e_1, _a;
|
|
59
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
_b.label = 1;
|
|
67
|
-
case 1: return [4 /*yield*/, it_1.next()];
|
|
68
|
-
case 2:
|
|
69
|
-
if (!(it_1_1 = _b.sent(), !it_1_1.done)) return [3 /*break*/, 4];
|
|
70
|
-
t = it_1_1.value;
|
|
71
|
-
if (predicate(t)) {
|
|
72
|
-
return [2 /*return*/, t];
|
|
73
|
-
}
|
|
74
|
-
_b.label = 3;
|
|
75
|
-
case 3: return [3 /*break*/, 1];
|
|
76
|
-
case 4: return [3 /*break*/, 11];
|
|
77
|
-
case 5:
|
|
78
|
-
e_1_1 = _b.sent();
|
|
79
|
-
e_1 = { error: e_1_1 };
|
|
80
|
-
return [3 /*break*/, 11];
|
|
81
|
-
case 6:
|
|
82
|
-
_b.trys.push([6, , 9, 10]);
|
|
83
|
-
if (!(it_1_1 && !it_1_1.done && (_a = it_1.return))) return [3 /*break*/, 8];
|
|
84
|
-
return [4 /*yield*/, _a.call(it_1)];
|
|
85
|
-
case 7:
|
|
86
|
-
_b.sent();
|
|
87
|
-
_b.label = 8;
|
|
88
|
-
case 8: return [3 /*break*/, 10];
|
|
89
|
-
case 9:
|
|
90
|
-
if (e_1) throw e_1.error;
|
|
91
|
-
return [7 /*endfinally*/];
|
|
92
|
-
case 10: return [7 /*endfinally*/];
|
|
93
|
-
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
|
+
}
|
|
94
39
|
}
|
|
95
|
-
}
|
|
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;
|
|
96
49
|
});
|
|
97
50
|
}
|
|
98
51
|
exports.find = find;
|
|
99
52
|
function filter(it, predicate) {
|
|
100
53
|
var it_2, it_2_1;
|
|
101
54
|
var e_2, _a;
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
_b.trys.push([1, 6, 7, 12]);
|
|
111
|
-
it_2 = __asyncValues(it);
|
|
112
|
-
_b.label = 2;
|
|
113
|
-
case 2: return [4 /*yield*/, it_2.next()];
|
|
114
|
-
case 3:
|
|
115
|
-
if (!(it_2_1 = _b.sent(), !it_2_1.done)) return [3 /*break*/, 5];
|
|
116
|
-
t = it_2_1.value;
|
|
117
|
-
if (predicate(t)) {
|
|
118
|
-
result.push(t);
|
|
119
|
-
}
|
|
120
|
-
_b.label = 4;
|
|
121
|
-
case 4: return [3 /*break*/, 2];
|
|
122
|
-
case 5: return [3 /*break*/, 12];
|
|
123
|
-
case 6:
|
|
124
|
-
e_2_1 = _b.sent();
|
|
125
|
-
e_2 = { error: e_2_1 };
|
|
126
|
-
return [3 /*break*/, 12];
|
|
127
|
-
case 7:
|
|
128
|
-
_b.trys.push([7, , 10, 11]);
|
|
129
|
-
if (!(it_2_1 && !it_2_1.done && (_a = it_2.return))) return [3 /*break*/, 9];
|
|
130
|
-
return [4 /*yield*/, _a.call(it_2)];
|
|
131
|
-
case 8:
|
|
132
|
-
_b.sent();
|
|
133
|
-
_b.label = 9;
|
|
134
|
-
case 9: return [3 /*break*/, 11];
|
|
135
|
-
case 10:
|
|
136
|
-
if (e_2) throw e_2.error;
|
|
137
|
-
return [7 /*endfinally*/];
|
|
138
|
-
case 11: return [7 /*endfinally*/];
|
|
139
|
-
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
|
+
}
|
|
140
63
|
}
|
|
141
|
-
}
|
|
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;
|
|
142
73
|
});
|
|
143
74
|
}
|
|
144
75
|
exports.filter = filter;
|
|
145
|
-
|
|
146
|
-
|
|
76
|
+
class AsyncCachingIteratorImpl {
|
|
77
|
+
constructor(iterable) {
|
|
147
78
|
this.iterable = iterable;
|
|
148
79
|
this.cache = [];
|
|
149
80
|
this.cursor = 0;
|
|
150
81
|
this.cacheRead = false;
|
|
151
82
|
}
|
|
152
|
-
|
|
83
|
+
resetCursor() {
|
|
153
84
|
this.cursor = 0;
|
|
154
85
|
this.cacheRead = false;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
case 1:
|
|
171
|
-
result = _a.sent();
|
|
172
|
-
if (!result.done) {
|
|
173
|
-
this.cache.push(result.value);
|
|
174
|
-
}
|
|
175
|
-
return [2 /*return*/, result];
|
|
176
|
-
}
|
|
177
|
-
});
|
|
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;
|
|
178
101
|
});
|
|
179
|
-
}
|
|
180
|
-
|
|
102
|
+
}
|
|
103
|
+
[Symbol.asyncIterator]() {
|
|
181
104
|
return this;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
}());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
185
107
|
exports.AsyncCachingIteratorImpl = AsyncCachingIteratorImpl;
|
|
186
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.js
CHANGED
|
@@ -13,72 +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
17
|
exports.Cancelable = void 0;
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
class Cancelable {
|
|
19
|
+
constructor(activity) {
|
|
47
20
|
this.activity = activity;
|
|
48
21
|
}
|
|
49
|
-
|
|
50
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_a.label = 2;
|
|
58
|
-
case 2:
|
|
59
|
-
if (this.canceled) {
|
|
60
|
-
return [2 /*return*/];
|
|
61
|
-
}
|
|
62
|
-
else if (r !== undefined) {
|
|
63
|
-
return [2 /*return*/, r];
|
|
64
|
-
}
|
|
65
|
-
_a.label = 3;
|
|
66
|
-
case 3: return [4 /*yield*/, this.activity(this.canceled)];
|
|
67
|
-
case 4:
|
|
68
|
-
r = _a.sent();
|
|
69
|
-
return [3 /*break*/, 2];
|
|
70
|
-
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;
|
|
71
30
|
}
|
|
72
|
-
}
|
|
31
|
+
}
|
|
73
32
|
});
|
|
74
|
-
}
|
|
75
|
-
|
|
33
|
+
}
|
|
34
|
+
cancel() {
|
|
76
35
|
this.canceled = true;
|
|
77
|
-
}
|
|
78
|
-
|
|
36
|
+
}
|
|
37
|
+
dispose() {
|
|
79
38
|
this.cancel();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
83
41
|
exports.Cancelable = Cancelable;
|
|
84
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.js
CHANGED
|
@@ -7,28 +7,28 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.formatHours = exports.formatDate = void 0;
|
|
9
9
|
function formatDate(date) {
|
|
10
|
-
return date ? new Date(date).toLocaleString() :
|
|
10
|
+
return date ? new Date(date).toLocaleString() : "";
|
|
11
11
|
}
|
|
12
12
|
exports.formatDate = formatDate;
|
|
13
13
|
function formatHours(hours) {
|
|
14
14
|
if (hours === undefined) {
|
|
15
|
-
return
|
|
15
|
+
return "";
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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);
|
|
23
23
|
if (hours < 0) {
|
|
24
|
-
return
|
|
24
|
+
return `-${result}`;
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
return
|
|
27
|
+
return `${result}`;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.formatHours = formatHours;
|
|
31
31
|
function pad2(n) {
|
|
32
|
-
return n < 10 ?
|
|
32
|
+
return n < 10 ? "0" + n : "" + n;
|
|
33
33
|
}
|
|
34
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;;;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,
|
|
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"}
|
package/lib/util/deferred.js
CHANGED
|
@@ -6,26 +6,24 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.Deferred = void 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _this = this;
|
|
9
|
+
class Deferred {
|
|
10
|
+
constructor(timeout) {
|
|
12
11
|
this.isResolved = false;
|
|
13
|
-
this.promise = new Promise(
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
this.promise = new Promise((resolve, reject) => {
|
|
13
|
+
this.resolve = (o) => {
|
|
14
|
+
this.isResolved = true;
|
|
16
15
|
resolve(o);
|
|
17
|
-
clearTimeout(
|
|
16
|
+
clearTimeout(this.timer);
|
|
18
17
|
};
|
|
19
|
-
|
|
18
|
+
this.reject = (e) => {
|
|
20
19
|
reject(e);
|
|
21
|
-
clearTimeout(
|
|
20
|
+
clearTimeout(this.timer);
|
|
22
21
|
};
|
|
23
22
|
});
|
|
24
23
|
if (timeout) {
|
|
25
|
-
this.timer = setTimeout(
|
|
24
|
+
this.timer = setTimeout(() => this.reject(new Error(`Timeout of ${timeout} ms.`)), timeout);
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
}());
|
|
27
|
+
}
|
|
30
28
|
exports.Deferred = Deferred;
|
|
31
29
|
//# sourceMappingURL=deferred.js.map
|
package/lib/util/deferred.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deferred.js","sourceRoot":"","sources":["../../src/util/deferred.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;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,UAAU;IACvB,SAAgB,MAAM,CAAC,IAAgB;QACnC,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAC;IACN,CAAC;IAJe,iBAAM,SAIrB,CAAA;IACY,eAAI,GAAG,MAAM,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACzC,CAAC,EAPgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAO1B;AAED,MAAa,oBAAoB;IAAjC;QACuB,gBAAW,GAAiB,EAAE,CAAC;QAC/B,qBAAgB,GAAG,IAAI,eAAO,EAAQ,CAAC;IA+C9D,CAAC;IA7CG,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACvC,CAAC;IAES,aAAa;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;IACL,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,OAAO;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,OAAO;SACV;QACD,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,GAAG,EAAG,CAAC,OAAO,EAAE,CAAC;SACrC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,UAAsB;QACvB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7B,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YACpC,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC9C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACd,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAChC;YACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE;YACtB,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,eAAe,EAAE,CAAC;QACtB,CAAC,CAAC;QACF,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,CAAC,WAAyB;QAC7B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAClE,CAAC;CACJ;AAjDD,oDAiDC"}
|
package/lib/util/event.d.ts.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"}
|