From 2239064ab1184bf961fa0d49690c8ae39321b515 Mon Sep 17 00:00:00 2001 From: tobil4sk <41230637+tobil4sk@users.noreply.github.com> Date: Sun, 14 Mar 2021 13:40:39 +0000 Subject: [PATCH] Fix depracated class paths (#32) js.Error -> js.lib.Error js.RegExp -> js.lib.RegExp --- src/express/Error.hx | 2 +- src/express/Next.hx | 2 +- src/mw/BasicAuth.hx | 2 +- src/mw/BearerTokenAuth.hx | 2 +- src/mw/OnFinished.hx | 2 +- src/mw/Unless.hx | 2 +- src/mw/cors/Options.hx | 2 +- src/mw/expressbrute/Options.hx | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/express/Error.hx b/src/express/Error.hx index aefa9a0..a4441ff 100644 --- a/src/express/Error.hx +++ b/src/express/Error.hx @@ -1,6 +1,6 @@ package express; @:native("Error") -extern class Error extends js.Error { +extern class Error extends js.lib.Error { public var status : Int; } diff --git a/src/express/Next.hx b/src/express/Next.hx index 89c10f8..2379e05 100644 --- a/src/express/Next.hx +++ b/src/express/Next.hx @@ -12,7 +12,7 @@ abstract Next(Dynamic) public inline function call() untyped this(); - public inline function error(err : js.Error) + public inline function error(err : js.lib.Error) untyped this(err); public inline function route() diff --git a/src/mw/BasicAuth.hx b/src/mw/BasicAuth.hx index 8267c8f..5c50ed5 100644 --- a/src/mw/BasicAuth.hx +++ b/src/mw/BasicAuth.hx @@ -5,7 +5,7 @@ import haxe.crypto.Base64; import express.Request; import express.Response; import express.Next; -import js.Error; +import js.lib.Error; import js.node.Buffer; using StringTools; diff --git a/src/mw/BearerTokenAuth.hx b/src/mw/BearerTokenAuth.hx index af8466f..277b729 100644 --- a/src/mw/BearerTokenAuth.hx +++ b/src/mw/BearerTokenAuth.hx @@ -3,7 +3,7 @@ package mw; import express.Request; import express.Response; import express.Next; -import js.Error; +import js.lib.Error; using StringTools; class BearerTokenAuth { diff --git a/src/mw/OnFinished.hx b/src/mw/OnFinished.hx index f45468a..046d5e6 100644 --- a/src/mw/OnFinished.hx +++ b/src/mw/OnFinished.hx @@ -2,7 +2,7 @@ package mw; import express.Request; import express.Response; -import js.Error; +import js.lib.Error; @:jsRequire("on-finished") extern class OnFinished { diff --git a/src/mw/Unless.hx b/src/mw/Unless.hx index 05ccd54..e31e47c 100644 --- a/src/mw/Unless.hx +++ b/src/mw/Unless.hx @@ -3,7 +3,7 @@ package mw; import express.Request; import express.Middleware; import haxe.extern.EitherType; -import js.RegExp; +import js.lib.RegExp; import mw.jwt.*; @:jsRequire("express-unless") diff --git a/src/mw/cors/Options.hx b/src/mw/cors/Options.hx index f0d0a61..84b7e7c 100644 --- a/src/mw/cors/Options.hx +++ b/src/mw/cors/Options.hx @@ -2,7 +2,7 @@ package mw.cors; import express.Request; import haxe.extern.EitherType; -import js.Error; +import js.lib.Error; typedef Options = { ?origin : EitherType>, diff --git a/src/mw/expressbrute/Options.hx b/src/mw/expressbrute/Options.hx index cc33e29..ce36882 100644 --- a/src/mw/expressbrute/Options.hx +++ b/src/mw/expressbrute/Options.hx @@ -40,7 +40,7 @@ Defines whether the remaining lifetime of a counter should be based on the time Gets called whenever an error occurs with the persistent store from which ExpressBrute cannot recover. It is passed an object containing the properties message (a description of the message), parent (the error raised by the session store), and [key, ip] or [req, res, next] depending on whether or the error occurs during reset or in the middleware itself. */ ?handleStoreError : EitherType< - { message : String, parent : js.Error} -> String -> String -> Void, - { message : String, parent : js.Error} -> Request -> Response -> Next -> Void + { message : String, parent : js.lib.Error} -> String -> String -> Void, + { message : String, parent : js.lib.Error} -> Request -> Response -> Next -> Void > }