From 8055ba261b5a341189336c654462e53384240b2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 08:59:18 -0500 Subject: [PATCH] Bump @types/url-parse from 1.4.4 to 1.4.5 (#4494) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sebastian Malton --- package.json | 2 +- src/common/protocol-handler/error.ts | 4 ++-- src/common/protocol-handler/router.ts | 10 +++++----- src/main/protocol-handler/router.ts | 8 ++++---- yarn.lock | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 2d24504590..c7778e8d37 100644 --- a/package.json +++ b/package.json @@ -312,7 +312,7 @@ "@types/tcp-port-used": "^1.0.0", "@types/tempy": "^0.3.0", "@types/triple-beam": "^1.3.2", - "@types/url-parse": "^1.4.4", + "@types/url-parse": "^1.4.5", "@types/uuid": "^8.3.3", "@types/webpack": "^4.41.31", "@types/webpack-dev-server": "^3.11.6", diff --git a/src/common/protocol-handler/error.ts b/src/common/protocol-handler/error.ts index c08d867766..263d5bfe2f 100644 --- a/src/common/protocol-handler/error.ts +++ b/src/common/protocol-handler/error.ts @@ -30,13 +30,13 @@ export enum RoutingErrorType { MISSING_EXTENSION = "missing-ext", } -export class RoutingError extends Error { +export class RoutingError extends Error { /** * Will be set if the routing error originated in an extension route table */ public extensionName?: string; - constructor(public type: RoutingErrorType, public url: Url) { + constructor(public type: RoutingErrorType, public url: Url) { super("routing error"); } diff --git a/src/common/protocol-handler/router.ts b/src/common/protocol-handler/router.ts index c387b18a55..6aea2037d1 100644 --- a/src/common/protocol-handler/router.ts +++ b/src/common/protocol-handler/router.ts @@ -91,7 +91,7 @@ export abstract class LensProtocolRouter extends Singleton { * @param url the parsed URL that initiated the `lens://` protocol * @returns true if a route has been found */ - protected _routeToInternal(url: Url): RouteAttempt { + protected _routeToInternal(url: Url>): RouteAttempt { return this._route(this.internalRoutes.entries(), url); } @@ -101,7 +101,7 @@ export abstract class LensProtocolRouter extends Singleton { * @param routes the array of path schemas, handler pairs to match against * @param url the url (in its current state) */ - protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url): null | [match>, RouteHandler] { + protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url>): null | [match>, RouteHandler] { const matches: [match>, RouteHandler][] = []; for (const [schema, handler] of routes) { @@ -128,7 +128,7 @@ export abstract class LensProtocolRouter extends Singleton { * @param routes the array of (path schemas, handler) pairs to match against * @param url the url (in its current state) */ - protected _route(routes: Iterable<[string, RouteHandler]>, url: Url, extensionName?: string): RouteAttempt { + protected _route(routes: Iterable<[string, RouteHandler]>, url: Url>, extensionName?: string): RouteAttempt { const route = this._findMatchingRoute(routes, url); if (!route) { @@ -166,7 +166,7 @@ export abstract class LensProtocolRouter extends Singleton { * @param url the protocol request URI that was "open"-ed * @returns either the found name or the instance of `LensExtension` */ - protected async _findMatchingExtensionByName(url: Url): Promise { + protected async _findMatchingExtensionByName(url: Url>): Promise { interface ExtensionUrlMatch { [EXTENSION_PUBLISHER_MATCH]: string; [EXTENSION_NAME_MATCH]: string; @@ -222,7 +222,7 @@ export abstract class LensProtocolRouter extends Singleton { * Note: this function modifies its argument, do not reuse * @param url the protocol request URI that was "open"-ed */ - protected async _routeToExtension(url: Url): Promise { + protected async _routeToExtension(url: Url>): Promise { const extension = await this._findMatchingExtensionByName(url); if (typeof extension === "string") { diff --git a/src/main/protocol-handler/router.ts b/src/main/protocol-handler/router.ts index fe178705e7..ffcfd49d3e 100644 --- a/src/main/protocol-handler/router.ts +++ b/src/main/protocol-handler/router.ts @@ -39,7 +39,7 @@ export interface FallbackHandler { * @returns `true` if it should be routed internally to Lens, `false` if to an extension * @throws if `host` is not valid */ -function checkHost(url: URLParse): boolean { +function checkHost(url: URLParse): boolean { switch (url.host) { case "app": return true; @@ -112,7 +112,7 @@ export class LensProtocolRouterMain extends proto.LensProtocolRouter { return false; } - protected async _findMatchingExtensionByName(url: URLParse): Promise { + protected async _findMatchingExtensionByName(url: URLParse>): Promise { const firstAttempt = await super._findMatchingExtensionByName(url); if (typeof firstAttempt !== "string") { @@ -126,7 +126,7 @@ export class LensProtocolRouterMain extends proto.LensProtocolRouter { return ""; } - protected _routeToInternal(url: URLParse): RouteAttempt { + protected _routeToInternal(url: URLParse>): RouteAttempt { const rawUrl = url.toString(); // for sending to renderer const attempt = super._routeToInternal(url); @@ -135,7 +135,7 @@ export class LensProtocolRouterMain extends proto.LensProtocolRouter { return attempt; } - protected async _routeToExtension(url: URLParse): Promise { + protected async _routeToExtension(url: URLParse>): Promise { const rawUrl = url.toString(); // for sending to renderer /** diff --git a/yarn.lock b/yarn.lock index d59b4b2f37..97bda7e5cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1951,10 +1951,10 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.10.0.tgz#5cb0dff2a5f616fc8e0c61b482bf01fa20a03cec" integrity sha512-ZAbqul7QAKpM2h1PFGa5ETN27ulmqtj0QviYHasw9LffvXZvVHuraOx/FOsIPPDNGZN0Qo1nASxxSfMYOtSoCw== -"@types/url-parse@^1.4.4": - version "1.4.4" - resolved "https://registry.yarnpkg.com/@types/url-parse/-/url-parse-1.4.4.tgz#ebeb0ec8b581318739cf73e9f9b186f610764255" - integrity sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q== +"@types/url-parse@^1.4.5": + version "1.4.5" + resolved "https://registry.yarnpkg.com/@types/url-parse/-/url-parse-1.4.5.tgz#bda0b813cc8f79d767dc8ca645fdabc238c6ae77" + integrity sha512-8Wje3itJpk/FX+QItca9vjNLjGx5jlEYBw/CpMi03Fphk2DSVeZDUqWTE81BeCI5Bl6Z+zmA1O9L/8e3ZUSeLg== "@types/uuid@^8.3.3": version "8.3.3"