@paladen/auth
Advanced tools
Comparing version 0.0.77 to 0.0.78
export * from "./AuthContext"; | ||
export * from "./errors"; | ||
export declare type AuthProps = { | ||
@@ -3,0 +4,0 @@ isAuthenticated?: boolean; |
@@ -280,2 +280,71 @@ 'use strict'; | ||
var dist$1 = createCommonjsModule(function (module, exports) { | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
var BaseError = function BaseError(props) { | ||
_classCallCheck(this, BaseError); | ||
if (props && props.message) { | ||
this.message = props.message; | ||
} | ||
if (props && props.httpStatusCode) { | ||
this.httpStatusCode = props.httpStatusCode; | ||
} | ||
if (props && props.fields) { | ||
this.fields = props.fields; | ||
} | ||
}; | ||
var createErrorResponseArray = function createErrorResponseArray(errors) { | ||
return { | ||
errors: errors.map(function (err) { | ||
var obj = { | ||
name: err.name, | ||
message: err.message | ||
}; | ||
if (err.fields) { | ||
obj.fields = err.fields; | ||
} | ||
return obj; | ||
}) | ||
}; | ||
}; | ||
exports.BaseError = BaseError; | ||
exports.createErrorResponseArray = createErrorResponseArray; | ||
}); | ||
unwrapExports(dist$1); | ||
var dist_1$1 = dist$1.BaseError; | ||
var dist_2$1 = dist$1.createErrorResponseArray; | ||
var AlreadyAuthenticatedError = /*#__PURE__*/function (_BaseError) { | ||
_inherits(AlreadyAuthenticatedError, _BaseError); | ||
function AlreadyAuthenticatedError(props) { | ||
var _this; | ||
_classCallCheck(this, AlreadyAuthenticatedError); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AlreadyAuthenticatedError).call(this, props)); | ||
_this.name = "AlreadyAuthenticatedError"; | ||
return _this; | ||
} | ||
return AlreadyAuthenticatedError; | ||
}(dist_1$1); | ||
var buildSessionCookieString = function buildSessionCookieString(name, value, expiryDate) { | ||
@@ -317,2 +386,3 @@ return ["".concat(name, "=").concat(value), "path=/", "SameSite=Lax", "expires=".concat(expiryDate), "HttpOnly", process.env.NODE_ENV === "production" ? "Secure;" : null].join(";"); | ||
exports.AlreadyAuthenticatedError = AlreadyAuthenticatedError; | ||
exports.AuthContext = AuthContext; | ||
@@ -319,0 +389,0 @@ exports.AuthContextProvider = AuthContextProvider; |
{ | ||
"name": "@paladen/auth", | ||
"version": "0.0.77", | ||
"version": "0.0.78", | ||
"repository": "https://github.com/samstr/paladen", | ||
@@ -18,3 +18,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@paladen/config": "^0.0.77", | ||
"@paladen/config": "^0.0.78", | ||
"@paladen/errors": "^0.0.78", | ||
"react": "^16.13.0", | ||
@@ -25,2 +26,3 @@ "react-dom": "^16.13.0" | ||
"@paladen/config": "^0.0.72", | ||
"@paladen/errors": "^0.0.77", | ||
"react": "^16.13.0", | ||
@@ -33,3 +35,3 @@ "react-dom": "^16.13.0" | ||
}, | ||
"gitHead": "edb04b900727b5ec73c2be89eb33b3e41343a76c" | ||
"gitHead": "91692359d5179f024f44ccb0ee76490273ae6567" | ||
} |
14567
6
364
8
+ Added@paladen/errors@^0.0.78
+ Added@paladen/config@0.0.78(transitive)
+ Added@paladen/errors@0.0.78(transitive)
- Removed@paladen/config@0.0.77(transitive)
Updated@paladen/config@^0.0.78