@clerk/shared
Advanced tools
Comparing version 2.20.1-snapshot.v20241212141113 to 2.20.1
@@ -41,2 +41,3 @@ import { ClerkAPIErrorJSON, ClerkAPIError } from '@clerk/types'; | ||
declare function parseError(error: ClerkAPIErrorJSON): ClerkAPIError; | ||
declare function errorToJSON(error: ClerkAPIError | null): ClerkAPIErrorJSON; | ||
declare class ClerkAPIResponseError extends Error { | ||
@@ -137,2 +138,2 @@ clerkError: true; | ||
export { ClerkAPIResponseError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, type ErrorThrower, type ErrorThrowerOptions, type MetamaskError, buildErrorThrower, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isUnauthorizedError, isUserLockedError, parseError, parseErrors }; | ||
export { ClerkAPIResponseError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, type ErrorThrower, type ErrorThrowerOptions, type MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isUnauthorizedError, isUserLockedError, parseError, parseErrors }; |
@@ -29,2 +29,3 @@ "use strict"; | ||
buildErrorThrower: () => buildErrorThrower, | ||
errorToJSON: () => errorToJSON, | ||
is4xxError: () => is4xxError, | ||
@@ -100,2 +101,17 @@ isCaptchaError: () => isCaptchaError, | ||
} | ||
function errorToJSON(error) { | ||
var _a, _b, _c, _d, _e; | ||
return { | ||
code: (error == null ? void 0 : error.code) || "", | ||
message: (error == null ? void 0 : error.message) || "", | ||
long_message: error == null ? void 0 : error.longMessage, | ||
meta: { | ||
param_name: (_a = error == null ? void 0 : error.meta) == null ? void 0 : _a.paramName, | ||
session_id: (_b = error == null ? void 0 : error.meta) == null ? void 0 : _b.sessionId, | ||
email_addresses: (_c = error == null ? void 0 : error.meta) == null ? void 0 : _c.emailAddresses, | ||
identifiers: (_d = error == null ? void 0 : error.meta) == null ? void 0 : _d.identifiers, | ||
zxcvbn: (_e = error == null ? void 0 : error.meta) == null ? void 0 : _e.zxcvbn | ||
} | ||
}; | ||
} | ||
var ClerkAPIResponseError = class _ClerkAPIResponseError extends Error { | ||
@@ -237,2 +253,3 @@ constructor(message, { data, status, clerkTraceId }) { | ||
buildErrorThrower, | ||
errorToJSON, | ||
is4xxError, | ||
@@ -239,0 +256,0 @@ isCaptchaError, |
@@ -10,3 +10,3 @@ export { createDeferredPromise, fastDeepMergeAndKeep, fastDeepMergeAndReplace, handleValueOrFn, isDevelopmentEnvironment, isProductionEnvironment, isStaging, isTestEnvironment, logErrorInDevMode, noop, runWithExponentialBackOff } from './utils/index.js'; | ||
export { deriveState } from './deriveState.js'; | ||
export { ClerkAPIResponseError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from './error.js'; | ||
export { ClerkAPIResponseError, ClerkRuntimeError, ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from './error.js'; | ||
export { SupportedMimeType, extension, readJSONFile } from './file.js'; | ||
@@ -13,0 +13,0 @@ export { isomorphicAtob } from './isomorphicAtob.js'; |
@@ -62,2 +62,3 @@ "use strict"; | ||
differenceInCalendarDays: () => differenceInCalendarDays, | ||
errorToJSON: () => errorToJSON, | ||
extension: () => extension, | ||
@@ -855,2 +856,17 @@ extractDevBrowserJWTFromURL: () => extractDevBrowserJWTFromURL, | ||
} | ||
function errorToJSON(error) { | ||
var _a, _b, _c, _d, _e; | ||
return { | ||
code: (error == null ? void 0 : error.code) || "", | ||
message: (error == null ? void 0 : error.message) || "", | ||
long_message: error == null ? void 0 : error.longMessage, | ||
meta: { | ||
param_name: (_a = error == null ? void 0 : error.meta) == null ? void 0 : _a.paramName, | ||
session_id: (_b = error == null ? void 0 : error.meta) == null ? void 0 : _b.sessionId, | ||
email_addresses: (_c = error == null ? void 0 : error.meta) == null ? void 0 : _c.emailAddresses, | ||
identifiers: (_d = error == null ? void 0 : error.meta) == null ? void 0 : _d.identifiers, | ||
zxcvbn: (_e = error == null ? void 0 : error.meta) == null ? void 0 : _e.zxcvbn | ||
} | ||
}; | ||
} | ||
var ClerkAPIResponseError = class _ClerkAPIResponseError extends Error { | ||
@@ -1188,3 +1204,3 @@ constructor(message, { data, status, clerkTraceId }) { | ||
// src/versionSelector.ts | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0-snapshot.v20241212141113") => { | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0") => { | ||
if (clerkJSVersion) { | ||
@@ -1196,3 +1212,3 @@ return clerkJSVersion; | ||
if (prereleaseTag === "snapshot") { | ||
return "5.42.0-snapshot.v20241212141113"; | ||
return "5.42.0"; | ||
} | ||
@@ -1661,2 +1677,3 @@ return prereleaseTag; | ||
differenceInCalendarDays, | ||
errorToJSON, | ||
extension, | ||
@@ -1663,0 +1680,0 @@ extractDevBrowserJWTFromURL, |
@@ -272,3 +272,3 @@ "use strict"; | ||
// src/versionSelector.ts | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0-snapshot.v20241212141113") => { | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0") => { | ||
if (clerkJSVersion) { | ||
@@ -280,3 +280,3 @@ return clerkJSVersion; | ||
if (prereleaseTag === "snapshot") { | ||
return "5.42.0-snapshot.v20241212141113"; | ||
return "5.42.0"; | ||
} | ||
@@ -283,0 +283,0 @@ return prereleaseTag; |
@@ -27,3 +27,3 @@ "use strict"; | ||
module.exports = __toCommonJS(versionSelector_exports); | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0-snapshot.v20241212141113") => { | ||
var versionSelector = (clerkJSVersion, packageVersion = "5.42.0") => { | ||
if (clerkJSVersion) { | ||
@@ -35,3 +35,3 @@ return clerkJSVersion; | ||
if (prereleaseTag === "snapshot") { | ||
return "5.42.0-snapshot.v20241212141113"; | ||
return "5.42.0"; | ||
} | ||
@@ -38,0 +38,0 @@ return prereleaseTag; |
{ | ||
"name": "@clerk/shared", | ||
"version": "2.20.1-snapshot.v20241212141113", | ||
"version": "2.20.1", | ||
"description": "Internal package utils used by the Clerk SDKs", | ||
@@ -125,3 +125,3 @@ "repository": { | ||
"swr": "^2.2.0", | ||
"@clerk/types": "^4.39.3-snapshot.v20241212141113" | ||
"@clerk/types": "^4.39.3" | ||
}, | ||
@@ -128,0 +128,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1131723
12677
1
Updated@clerk/types@^4.39.3