@appwarden/middleware 3.5.1 → 3.6.0
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/README.md +1 -1
- package/cloudflare/astro.d.ts +2 -16
- package/cloudflare/nextjs.d.ts +1 -1
- package/cloudflare/react-router.d.ts +1 -1
- package/cloudflare/tanstack-start.d.ts +1 -1
- package/package.json +1 -1
- package/vercel.d.ts +1 -1
- package/vercel.js +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://github.com/appwarden/middleware)
|
|
5
5
|
[](https://www.npmjs.com/package/@appwarden/middleware)
|
|
6
6
|
[](https://docs.npmjs.com/generating-provenance-statements)
|
|
7
|
-

|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
|
|
10
10
|
## Core Features
|
package/cloudflare/astro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Runtime } from '@astrojs/cloudflare';
|
|
2
|
-
import {
|
|
2
|
+
import { MiddlewareHandler } from 'astro';
|
|
3
3
|
import { U as UseCSPInput } from '../use-content-security-policy-DUYpyUPy.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -30,20 +30,6 @@ interface AstroAppwardenConfig {
|
|
|
30
30
|
* This allows dynamic configuration based on environment variables.
|
|
31
31
|
*/
|
|
32
32
|
type AstroConfigFn = (runtime: AstroCloudflareRuntime) => AstroAppwardenConfig;
|
|
33
|
-
/**
|
|
34
|
-
* Astro middleware context type.
|
|
35
|
-
* Re-exported from Astro's official APIContext type for type compatibility.
|
|
36
|
-
*
|
|
37
|
-
* @deprecated Use `APIContext` from 'astro' directly. This alias is kept for backward compatibility.
|
|
38
|
-
*/
|
|
39
|
-
type AstroMiddlewareContext = APIContext;
|
|
40
|
-
/**
|
|
41
|
-
* Astro middleware function signature.
|
|
42
|
-
* This is an alias for Astro's official MiddlewareHandler type for type compatibility.
|
|
43
|
-
*
|
|
44
|
-
* @deprecated Use `MiddlewareHandler` from 'astro' directly. This alias is kept for backward compatibility.
|
|
45
|
-
*/
|
|
46
|
-
type AstroMiddlewareFunction = MiddlewareHandler;
|
|
47
33
|
/**
|
|
48
34
|
* Creates an Appwarden middleware function for Astro.
|
|
49
35
|
*
|
|
@@ -69,4 +55,4 @@ type AstroMiddlewareFunction = MiddlewareHandler;
|
|
|
69
55
|
*/
|
|
70
56
|
declare function createAppwardenMiddleware(configFn: AstroConfigFn): MiddlewareHandler;
|
|
71
57
|
|
|
72
|
-
export {
|
|
58
|
+
export { createAppwardenMiddleware };
|
package/cloudflare/nextjs.d.ts
CHANGED
|
@@ -61,4 +61,4 @@ type NextJsMiddlewareFunction = (request: NextRequest, event?: NextFetchEvent) =
|
|
|
61
61
|
*/
|
|
62
62
|
declare function createAppwardenMiddleware(configFn: NextJsCloudflareConfigFn): NextJsMiddlewareFunction;
|
|
63
63
|
|
|
64
|
-
export {
|
|
64
|
+
export { createAppwardenMiddleware };
|
|
@@ -76,4 +76,4 @@ type ReactRouterMiddlewareFunction = (args: ReactRouterMiddlewareArgs, next: ()
|
|
|
76
76
|
*/
|
|
77
77
|
declare function createAppwardenMiddleware(configFn: ReactRouterConfigFn): ReactRouterMiddlewareFunction;
|
|
78
78
|
|
|
79
|
-
export { type CloudflareContext,
|
|
79
|
+
export { type CloudflareContext, cloudflareContextSymbol, createAppwardenMiddleware };
|
|
@@ -80,4 +80,4 @@ type TanStackStartMiddlewareFunction = (args: TanStackStartMiddlewareArgs) => Pr
|
|
|
80
80
|
*/
|
|
81
81
|
declare function createAppwardenMiddleware(configFn: TanStackStartConfigFn): TanStackStartMiddlewareFunction;
|
|
82
82
|
|
|
83
|
-
export { type
|
|
83
|
+
export { type TanStackStartCloudflareContext, createAppwardenMiddleware };
|
package/package.json
CHANGED
package/vercel.d.ts
CHANGED
|
@@ -749,4 +749,4 @@ type VercelAppwardenConfig = z.input<typeof AppwardenConfigSchema>;
|
|
|
749
749
|
type VercelMiddlewareFunction = (request: Request) => Promise<Response>;
|
|
750
750
|
declare function createAppwardenMiddleware(config: VercelAppwardenConfig): VercelMiddlewareFunction;
|
|
751
751
|
|
|
752
|
-
export {
|
|
752
|
+
export { type VercelMiddlewareFunction, createAppwardenMiddleware };
|