sst-http 0.4.0 → 0.4.1
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.
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
Res: () => Res,
|
|
39
39
|
configureRoutes: () => configureRoutes,
|
|
40
40
|
createHandler: () => createHandler,
|
|
41
|
+
handleError: () => handleError,
|
|
41
42
|
json: () => json,
|
|
42
43
|
noContent: () => noContent,
|
|
43
44
|
text: () => text
|
|
@@ -561,6 +562,7 @@ function Res() {
|
|
|
561
562
|
Res,
|
|
562
563
|
configureRoutes,
|
|
563
564
|
createHandler,
|
|
565
|
+
handleError,
|
|
564
566
|
json,
|
|
565
567
|
noContent,
|
|
566
568
|
text
|
package/dist/index.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ declare function noContent(headers?: Record<string, string>): ResponseLike;
|
|
|
19
19
|
type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
20
20
|
type LambdaResult = APIGatewayProxyResult | APIGatewayProxyResultV2;
|
|
21
21
|
declare function createHandler(): (event: LambdaEvent, lambdaContext: unknown) => Promise<LambdaResult>;
|
|
22
|
+
declare function handleError(error: unknown, preferV2: boolean): LambdaResult;
|
|
22
23
|
|
|
23
24
|
type LegacyDecorator = (target: unknown, propertyKey?: string | symbol, descriptor?: PropertyDescriptor) => void;
|
|
24
25
|
type LegacyParameterDecorator = (target: unknown, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
@@ -40,4 +41,4 @@ declare function Res(): LegacyParameterDecorator;
|
|
|
40
41
|
|
|
41
42
|
declare function configureRoutes(next?: RouteOptions): void;
|
|
42
43
|
|
|
43
|
-
export { Auth, Body, Delete, FirebaseAuth, FirebaseAuthOptions, Get, Head, Headers, HttpError, Options, Param, Patch, Post, Put, Query, Req, Res, ResponseLike, RouteOptions, configureRoutes, createHandler, json, noContent, text };
|
|
44
|
+
export { Auth, Body, Delete, FirebaseAuth, FirebaseAuthOptions, Get, Head, Headers, HttpError, Options, Param, Patch, Post, Put, Query, Req, Res, ResponseLike, RouteOptions, configureRoutes, createHandler, handleError, json, noContent, text };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare function noContent(headers?: Record<string, string>): ResponseLike;
|
|
|
19
19
|
type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
20
20
|
type LambdaResult = APIGatewayProxyResult | APIGatewayProxyResultV2;
|
|
21
21
|
declare function createHandler(): (event: LambdaEvent, lambdaContext: unknown) => Promise<LambdaResult>;
|
|
22
|
+
declare function handleError(error: unknown, preferV2: boolean): LambdaResult;
|
|
22
23
|
|
|
23
24
|
type LegacyDecorator = (target: unknown, propertyKey?: string | symbol, descriptor?: PropertyDescriptor) => void;
|
|
24
25
|
type LegacyParameterDecorator = (target: unknown, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
@@ -40,4 +41,4 @@ declare function Res(): LegacyParameterDecorator;
|
|
|
40
41
|
|
|
41
42
|
declare function configureRoutes(next?: RouteOptions): void;
|
|
42
43
|
|
|
43
|
-
export { Auth, Body, Delete, FirebaseAuth, FirebaseAuthOptions, Get, Head, Headers, HttpError, Options, Param, Patch, Post, Put, Query, Req, Res, ResponseLike, RouteOptions, configureRoutes, createHandler, json, noContent, text };
|
|
44
|
+
export { Auth, Body, Delete, FirebaseAuth, FirebaseAuthOptions, Get, Head, Headers, HttpError, Options, Param, Patch, Post, Put, Query, Req, Res, ResponseLike, RouteOptions, configureRoutes, createHandler, handleError, json, noContent, text };
|
package/dist/index.js
CHANGED