Skip to content

Commit 8165c17

Browse files
committed
style: format code
1 parent cceac2c commit 8165c17

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

benchmarks/adonisjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Emitter } from '@adonisjs/events'
1313
import { Encryption } from '@adonisjs/encryption'
1414
import { Application } from '@adonisjs/application'
1515

16-
import { defineConfig, Server } from '../build/index.ts'
16+
import { defineConfig, Server } from '../build/index.js'
1717

1818
const app = new Application(new URL('./', import.meta.url), {
1919
environment: 'web',

src/cookies/client.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class CookieClient {
2525

2626
/**
2727
* Create a new instance of CookieClient
28-
*
28+
*
2929
* @param encryption - The encryption instance for cookie operations
3030
*/
3131
constructor(encryption: Encryption) {
@@ -34,7 +34,7 @@ export class CookieClient {
3434

3535
/**
3636
* Encrypt a key value pair to be sent in the cookie header
37-
*
37+
*
3838
* @param key - The cookie key
3939
* @param value - The value to encrypt
4040
* @returns The encrypted cookie string or null if encryption fails
@@ -45,7 +45,7 @@ export class CookieClient {
4545

4646
/**
4747
* Sign a key value pair to be sent in the cookie header
48-
*
48+
*
4949
* @param key - The cookie key
5050
* @param value - The value to sign
5151
* @returns The signed cookie string or null if signing fails
@@ -56,7 +56,7 @@ export class CookieClient {
5656

5757
/**
5858
* Encode a key value pair to be sent in the cookie header
59-
*
59+
*
6060
* @param _ - Unused key parameter
6161
* @param value - The value to encode
6262
* @param stringify - Whether to stringify the value before encoding
@@ -68,7 +68,7 @@ export class CookieClient {
6868

6969
/**
7070
* Unsign a signed cookie value
71-
*
71+
*
7272
* @param key - The cookie key
7373
* @param value - The signed cookie value to unsign
7474
* @returns The original value if valid signature, null otherwise
@@ -81,7 +81,7 @@ export class CookieClient {
8181

8282
/**
8383
* Decrypt an encrypted cookie value
84-
*
84+
*
8585
* @param key - The cookie key
8686
* @param value - The encrypted cookie value to decrypt
8787
* @returns The decrypted value or null if decryption fails
@@ -94,7 +94,7 @@ export class CookieClient {
9494

9595
/**
9696
* Decode an encoded cookie value
97-
*
97+
*
9898
* @param _ - Unused key parameter
9999
* @param value - The encoded cookie value to decode
100100
* @param stringified - Whether the value was stringified during encoding
@@ -109,7 +109,7 @@ export class CookieClient {
109109

110110
/**
111111
* Parse response cookie
112-
*
112+
*
113113
* @param key - The cookie key
114114
* @param value - The cookie value to parse
115115
* @returns The parsed value or undefined if parsing fails

src/cookies/drivers/encrypted.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { Encryption } from '@adonisjs/encryption'
1111

1212
/**
1313
* Encrypt a value to be set as cookie
14-
*
14+
*
1515
* @param key - The cookie key used for encryption
1616
* @param value - The value to encrypt
1717
* @param encryption - The encryption instance
@@ -27,7 +27,7 @@ export function pack(key: string, value: any, encryption: Encryption): null | st
2727
/**
2828
* Returns a boolean, if the unpack method from this module can attempt
2929
* to unpack encrypted value.
30-
*
30+
*
3131
* @param encryptedValue - The encrypted value to check
3232
* @returns True if the value can be unpacked by this module
3333
*/
@@ -39,7 +39,7 @@ export function canUnpack(encryptedValue: string) {
3939
* Attempts to unpack the encrypted cookie value. Returns null, when fails to do so.
4040
* Only call this method, when `canUnpack` returns true, otherwise runtime
4141
* exceptions can be raised.
42-
*
42+
*
4343
* @param key - The cookie key used for decryption
4444
* @param encryptedValue - The encrypted value to decrypt
4545
* @param encryption - The encryption instance

src/cookies/drivers/plain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { MessageBuilder } from '@poppinss/utils'
1313
/**
1414
* Encodes a value into a base64 url encoded string to
1515
* be set as cookie
16-
*
16+
*
1717
* @param value - The value to encode
1818
* @returns The encoded cookie string or null if value is null/undefined
1919
*/
@@ -27,7 +27,7 @@ export function pack(value: any): null | string {
2727
/**
2828
* Returns true when this `unpack` method of this module can attempt
2929
* to unpack the encode value.
30-
*
30+
*
3131
* @param encodedValue - The encoded value to check
3232
* @returns True if the value can be unpacked by this module
3333
*/
@@ -38,7 +38,7 @@ export function canUnpack(encodedValue: string) {
3838
/**
3939
* Attempts to unpack the value by decoding it. Make sure to call, `canUnpack`
4040
* before calling this method
41-
*
41+
*
4242
* @param encodedValue - The encoded value to decode
4343
* @returns The decoded value or null if decoding fails
4444
*/

src/cookies/drivers/signed.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { Encryption } from '@adonisjs/encryption'
1212
/**
1313
* Signs a value to be shared as a cookie. The signed output has a
1414
* hash to verify tampering with the original value
15-
*
15+
*
1616
* @param key - The cookie key used for signing
1717
* @param value - The value to sign
1818
* @param encryption - The encryption instance
@@ -28,7 +28,7 @@ export function pack(key: string, value: any, encryption: Encryption): null | st
2828
/**
2929
* Returns a boolean, if the unpack method from this module can attempt
3030
* to unpack the signed value.
31-
*
31+
*
3232
* @param signedValue - The signed value to check
3333
* @returns True if the value can be unpacked by this module
3434
*/
@@ -39,7 +39,7 @@ export function canUnpack(signedValue: string) {
3939
/**
4040
* Attempts to unpack the signed value. Make sure to call `canUnpack` before
4141
* calling this method.
42-
*
42+
*
4343
* @param key - The cookie key used for verification
4444
* @param signedValue - The signed value to verify and unpack
4545
* @param encryption - The encryption instance

src/cookies/parser.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class CookieParser {
5050

5151
/**
5252
* Create a new instance of CookieParser
53-
*
53+
*
5454
* @param cookieHeader - The raw cookie header string from the request
5555
* @param encryption - The encryption instance for cookie operations
5656
*/
@@ -61,7 +61,7 @@ export class CookieParser {
6161

6262
/**
6363
* Parses the request `cookie` header
64-
*
64+
*
6565
* @param cookieHeader - The cookie header string to parse
6666
* @returns Parsed cookies as key-value pairs
6767
*/
@@ -83,7 +83,7 @@ export class CookieParser {
8383
* Attempts to decode a cookie by the name. When calling this method,
8484
* you are assuming that the cookie was just stringified in the first
8585
* place and not signed or encrypted.
86-
*
86+
*
8787
* @param key - The cookie key to decode
8888
* @param stringified - Whether the cookie value was stringified
8989
* @returns The decoded cookie value or null if decoding fails
@@ -126,7 +126,7 @@ export class CookieParser {
126126
/**
127127
* Attempts to unsign a cookie by the name. When calling this method,
128128
* you are assuming that the cookie was signed in the first place.
129-
*
129+
*
130130
* @param key - The cookie key to unsign
131131
* @returns The original cookie value or null if unsigning fails
132132
*/
@@ -168,7 +168,7 @@ export class CookieParser {
168168
/**
169169
* Attempts to decrypt a cookie by the name. When calling this method,
170170
* you are assuming that the cookie was encrypted in the first place.
171-
*
171+
*
172172
* @param key - The cookie key to decrypt
173173
* @returns The decrypted cookie value or null if decryption fails
174174
*/
@@ -211,7 +211,7 @@ export class CookieParser {
211211
* Returns an object of cookies key-value pair. Do note, the
212212
* cookies are not decoded, unsigned or decrypted inside this
213213
* list.
214-
*
214+
*
215215
* @returns Raw cookies as key-value pairs
216216
*/
217217
list() {

src/cookies/serializer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class CookieSerializer {
2626

2727
/**
2828
* Create a new instance of CookieSerializer
29-
*
29+
*
3030
* @param encryption - The encryption instance for cookie operations
3131
*/
3232
constructor(encryption: Encryption) {
@@ -43,7 +43,7 @@ export class CookieSerializer {
4343
* serializer.encode('name', 'virk')
4444
* serializer.encode('name', 'virk', { stringify: false })
4545
* ```
46-
*
46+
*
4747
* @param key - The cookie key
4848
* @param value - The value to encode
4949
* @param options - Cookie encoding options
@@ -75,7 +75,7 @@ export class CookieSerializer {
7575
/**
7676
* Sign a key-value pair to a signed cookie. The signed value has a
7777
* verification hash attached to it to detect data tampering.
78-
*
78+
*
7979
* @param key - The cookie key
8080
* @param value - The value to sign
8181
* @param options - Cookie options
@@ -92,7 +92,7 @@ export class CookieSerializer {
9292

9393
/**
9494
* Encrypts a key-value pair to an encrypted cookie.
95-
*
95+
*
9696
* @param key - The cookie key
9797
* @param value - The value to encrypt
9898
* @param options - Cookie options

0 commit comments

Comments
 (0)