sst 3.0.28 → 3.0.30

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.
@@ -4,6 +4,6 @@ import { AuthHandler } from "../auth/handler.js";
4
4
  import { SessionBuilder, createSessionBuilder } from "../auth/session.js";
5
5
  export declare namespace auth {
6
6
  type Issuer = import("openid-client").Issuer;
7
- function authorizer<Providers extends Record<string, Adapter<any>>, Sessions extends SessionBuilder, Result>(...args: Parameters<typeof AuthHandler<Providers, Sessions, Result>>): Handler<any, any>;
7
+ function authorizer<Providers extends Record<string, Adapter<any>>, Sessions extends SessionBuilder>(...args: Parameters<typeof AuthHandler<Providers, Sessions>>): Handler<any, any>;
8
8
  const sessions: typeof createSessionBuilder;
9
9
  }
package/dist/aws/auth.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { AuthHandler } from "../auth/handler.js";
2
2
  import { createSessionBuilder } from "../auth/session.js";
3
- import { streamHandle } from "hono/aws-lambda";
3
+ import { handle, streamHandle } from "hono/aws-lambda";
4
4
  export var auth;
5
5
  (function (auth) {
6
6
  function authorizer(...args) {
7
- return streamHandle(AuthHandler(...args));
7
+ const hono = AuthHandler(...args);
8
+ return (process.env.SST_LIVE ? handle(hono) : streamHandle(hono));
8
9
  }
9
10
  auth.authorizer = authorizer;
10
11
  auth.sessions = createSessionBuilder;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "sst",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
- "version": "3.0.28",
6
+ "version": "3.0.30",
7
7
  "main": "./dist/index.js",
8
8
  "exports": {
9
9
  ".": "./dist/index.js",