Skip to content

Commit 87032c0

Browse files
committed
fix(session): cookie types
1 parent e3020cc commit 87032c0

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

package-lock.json

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"create-release": "semantic-release-npm-workspaces-monorepo"
1818
},
1919
"devDependencies": {
20-
"semantic-release-npm-workspaces-monorepo": "^3.1.0-beta.4"
20+
"semantic-release-npm-workspaces-monorepo": "^3.1.1"
2121
}
2222
}

packages/forms/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"LICENSE"
5353
],
5454
"devDependencies": {
55-
"@types/cookie": "^0.5.1",
5655
"@types/formidable": "^2.0.5",
5756
"@types/fs-extra": "^11.0.4",
5857
"@types/jsonwebtoken": "^9.0.1",
@@ -69,6 +68,7 @@
6968
"dependencies": {
7069
"@astro-utils/context": "0.0.1",
7170
"await-lock": "^2.2.2",
71+
"@types/cookie": "^0.5.1",
7272
"cookie": "^0.5.0",
7373
"csrf": "^3.1.0",
7474
"dot-prop": "^8.0.2",

packages/forms/src/settings.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { CookieSerializeOptions } from 'cookie';
12
import { BigFileUploadOptions } from './components/form/UploadBigFile/uploadBigFileClient.js';
23
import { LoadUploadFilesOptions } from './components/form/UploadBigFile/uploadBigFileServer.js';
34
import type {CSRFSettings} from './form-tools/csrf.js';
@@ -14,13 +15,7 @@ export type FormsSettings = {
1415
}
1516
session?: {
1617
cookieName?: string
17-
cookieOptions?: {
18-
httpOnly?: boolean
19-
sameSite?: boolean | 'lax' | 'strict' | 'none'
20-
maxAge?: number
21-
path?: string
22-
secure?: boolean
23-
}
18+
cookieOptions?: CookieSerializeOptions
2419
},
2520
secret?: string,
2621
logs?: (type: 'warn' | 'error' | 'log', message: string) => void

0 commit comments

Comments
 (0)