@nosecone/sveltekit 1.14.1 → 1.15.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/dist/index.d.ts +14 -2
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import nosecone, { CspDirectives, NoseconeOptions, Options, Options as Options$1, withVercelToolbar } from "nosecone";
|
|
2
|
-
import { Handle, KitConfig } from "@sveltejs/kit";
|
|
3
2
|
//#region src/index.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Nosecone SvelteKit defaults.
|
|
@@ -72,6 +71,20 @@ export declare const defaults: {
|
|
|
72
71
|
readonly scriptSrc: readonly ["'strict-dynamic'"];
|
|
73
72
|
};
|
|
74
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* SvelteKit `handle` hook.
|
|
76
|
+
*/
|
|
77
|
+
type Handle = <Event>(input: {
|
|
78
|
+
event: Event;
|
|
79
|
+
resolve: (event: Event) => Promise<Response> | Response;
|
|
80
|
+
}) => Promise<Response>;
|
|
81
|
+
/**
|
|
82
|
+
* SvelteKit `csp` configuration.
|
|
83
|
+
*/
|
|
84
|
+
type SvelteKitCsp = {
|
|
85
|
+
mode?: "hash" | "nonce" | "auto";
|
|
86
|
+
directives?: Record<string, string[] | boolean>;
|
|
87
|
+
};
|
|
75
88
|
/**
|
|
76
89
|
* Create a SvelteKit hook that sets secure headers on every request.
|
|
77
90
|
*
|
|
@@ -81,7 +94,6 @@ export declare const defaults: {
|
|
|
81
94
|
* SvelteKit hook that sets secure headers.
|
|
82
95
|
*/
|
|
83
96
|
export declare function createHook(options?: Options$1): Handle;
|
|
84
|
-
type SvelteKitCsp = Exclude<KitConfig["csp"], undefined>;
|
|
85
97
|
/**
|
|
86
98
|
* Content Security Policy configuration for SvelteKit.
|
|
87
99
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nosecone/sveltekit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Protect your SvelteKit application with secure headers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arcjet",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"test": "npm run build && npm run test-coverage"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"nosecone": "1.
|
|
62
|
+
"nosecone": "1.15.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@sveltejs/kit": "
|
|
66
|
-
"@sveltejs/vite-plugin-svelte": "7.3.
|
|
67
|
-
"@types/node": "22.20.
|
|
68
|
-
"svelte": "5.57.
|
|
69
|
-
"tsdown": "0.23.
|
|
65
|
+
"@sveltejs/kit": "3.0.0",
|
|
66
|
+
"@sveltejs/vite-plugin-svelte": "7.3.1",
|
|
67
|
+
"@types/node": "22.20.5",
|
|
68
|
+
"svelte": "5.57.2",
|
|
69
|
+
"tsdown": "0.23.1",
|
|
70
70
|
"typescript": "6.0.3",
|
|
71
|
-
"vite": "8.3.
|
|
71
|
+
"vite": "8.3.5"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@sveltejs/kit": ">=2"
|