@open-norantec/utilities 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@ type AuthenticationMethodMap<Bindings extends BindingsType, SS extends z.ZodObje
|
|
|
26
26
|
type AuthKey<AMM extends AuthenticationMethodMap<{}, z.ZodObject>> = Extract<keyof AMM, string>;
|
|
27
27
|
type HandlerContext<IS extends HTTPBodyType, Bindings extends BindingsType, SS extends z.ZodObject, A extends Array<keyof AuthenticationMethodMap<Bindings, SS>>> = BaseContext<Bindings, SS> & {
|
|
28
28
|
authentication: A extends [] ? null : A[number];
|
|
29
|
-
|
|
29
|
+
identifier: string;
|
|
30
30
|
input: IS extends string ? ReadableStreamDefaultReader<Uint8Array> : z.infer<IS>;
|
|
31
31
|
};
|
|
32
32
|
interface HookContext {
|
package/dist/hono-util.class.js
CHANGED
|
@@ -155,7 +155,7 @@ class HonoUtil {
|
|
|
155
155
|
return c.json({ error: authenticateResult.message }, authenticateResult instanceof StatusError ? authenticateResult.status : 400);
|
|
156
156
|
}
|
|
157
157
|
const { authentication, authenticationValue } = authenticateResult;
|
|
158
|
-
const rawOutput = yield attempt_util_class_1.AttemptUtil.execPromise(handler(Object.assign({ input, authentication: authentication, authenticationValue }, baseContext)));
|
|
158
|
+
const rawOutput = yield attempt_util_class_1.AttemptUtil.execPromise(handler(Object.assign({ input, authentication: authentication, identifier: authenticationValue }, baseContext)));
|
|
159
159
|
if (rawOutput instanceof Error) {
|
|
160
160
|
console.log('Handler error', rawOutput, rawOutput === null || rawOutput === void 0 ? void 0 : rawOutput.message, rawOutput === null || rawOutput === void 0 ? void 0 : rawOutput.stack);
|
|
161
161
|
return c.json({ error: rawOutput.message }, rawOutput instanceof StatusError ? rawOutput.status : 400);
|