@a-type/auth
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -17,4 +17,9 @@ export var ErrorMessages; | ||
} | ||
toResponse() { | ||
return new Response(this.message, { | ||
status: this.statusCode, | ||
}); | ||
} | ||
} | ||
AuthError.Messages = ErrorMessages; | ||
//# sourceMappingURL=error.js.map |
@@ -140,3 +140,3 @@ import { AuthError } from './error.js'; | ||
name: z.string().min(1), | ||
returnTo: z.string().url().optional(), | ||
returnTo: z.string().optional(), | ||
}) | ||
@@ -274,3 +274,3 @@ .parse({ email, name, returnTo }); | ||
email: z.string().email(), | ||
returnTo: z.string().url().optional().nullable(), | ||
returnTo: z.string().optional().nullable(), | ||
appState: z.string().optional().nullable(), | ||
@@ -310,3 +310,3 @@ }) | ||
email: z.string().email(), | ||
returnTo: z.string().url().optional().nullable(), | ||
returnTo: z.string().optional().nullable(), | ||
appState: z.string().optional().nullable(), | ||
@@ -313,0 +313,0 @@ code: z.string().min(1), |
@@ -15,2 +15,3 @@ export declare enum ErrorMessages { | ||
constructor(message: string, statusCode: number); | ||
toResponse(): Response; | ||
} |
{ | ||
"name": "@a-type/auth", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "My personal auth request handlers", | ||
@@ -25,3 +25,2 @@ "module": "dist/esm/index.js", | ||
"devDependencies": { | ||
"@changesets/cli": "^2.27.1", | ||
"@types/cookie": "^0.6.0", | ||
@@ -40,6 +39,5 @@ "@types/node": "^20.10.6", | ||
"build": "tsc", | ||
"ci:version": "pnpm changeset version", | ||
"ci:publish": "pnpm changeset publish --access=public", | ||
"test": "vitest" | ||
"test": "vitest", | ||
"ci:test:unit": "vitest run" | ||
} | ||
} |
@@ -17,2 +17,8 @@ export enum ErrorMessages { | ||
} | ||
toResponse() { | ||
return new Response(this.message, { | ||
status: this.statusCode, | ||
}); | ||
} | ||
} |
@@ -225,3 +225,3 @@ import { AuthDB } from './db.js'; | ||
name: z.string().min(1), | ||
returnTo: z.string().url().optional(), | ||
returnTo: z.string().optional(), | ||
}) | ||
@@ -370,3 +370,3 @@ .parse({ email, name, returnTo }); | ||
email: z.string().email(), | ||
returnTo: z.string().url().optional().nullable(), | ||
returnTo: z.string().optional().nullable(), | ||
appState: z.string().optional().nullable(), | ||
@@ -410,3 +410,3 @@ }) | ||
email: z.string().email(), | ||
returnTo: z.string().url().optional().nullable(), | ||
returnTo: z.string().optional().nullable(), | ||
appState: z.string().optional().nullable(), | ||
@@ -413,0 +413,0 @@ code: z.string().min(1), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
6
2592
128875
49
2
0