@appwarden/middleware 3.5.0 → 3.5.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/cloudflare/astro.d.ts +16 -2
- 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 +1 -0
package/cloudflare/astro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Runtime } from '@astrojs/cloudflare';
|
|
2
|
-
import { MiddlewareHandler } from 'astro';
|
|
2
|
+
import { APIContext, MiddlewareHandler } from 'astro';
|
|
3
3
|
import { U as UseCSPInput } from '../use-content-security-policy-DUYpyUPy.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -30,6 +30,20 @@ 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;
|
|
33
47
|
/**
|
|
34
48
|
* Creates an Appwarden middleware function for Astro.
|
|
35
49
|
*
|
|
@@ -55,4 +69,4 @@ type AstroConfigFn = (runtime: AstroCloudflareRuntime) => AstroAppwardenConfig;
|
|
|
55
69
|
*/
|
|
56
70
|
declare function createAppwardenMiddleware(configFn: AstroConfigFn): MiddlewareHandler;
|
|
57
71
|
|
|
58
|
-
export { createAppwardenMiddleware };
|
|
72
|
+
export { type AstroAppwardenConfig, type AstroCloudflareRuntime, type AstroConfigFn, type AstroMiddlewareContext, type AstroMiddlewareFunction, 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 { createAppwardenMiddleware };
|
|
64
|
+
export { type NextJsCloudflareAppwardenConfig, type NextJsCloudflareConfigFn, type NextJsCloudflareRuntime, type NextJsMiddlewareFunction, 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, cloudflareContextSymbol, createAppwardenMiddleware };
|
|
79
|
+
export { type CloudflareContext, type ReactRouterAppwardenConfig, type ReactRouterConfigFn, type ReactRouterMiddlewareArgs, type ReactRouterMiddlewareFunction, 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 TanStackStartCloudflareContext, createAppwardenMiddleware };
|
|
83
|
+
export { type TanStackStartAppwardenConfig, type TanStackStartCloudflareContext, type TanStackStartConfigFn, type TanStackStartMiddlewareArgs, type TanStackStartMiddlewareFunction, type TanStackStartNextFn, type TanStackStartNextResult, 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 { type VercelMiddlewareFunction, createAppwardenMiddleware };
|
|
752
|
+
export { AppwardenConfigSchema, type VercelAppwardenConfig, type VercelMiddlewareFunction, createAppwardenMiddleware };
|