@eggjs/cookies 4.0.0-beta.34 → 4.0.0-beta.36

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/cookie.d.ts CHANGED
@@ -1,66 +1,69 @@
1
- export interface CookieSetOptions {
2
- /**
3
- * The path for the cookie to be set in
4
- */
5
- path?: string | null;
6
- /**
7
- * The domain for the cookie
8
- */
9
- domain?: string | (() => string);
10
- /**
11
- * Is overridable
12
- */
13
- overwrite?: boolean;
14
- /**
15
- * Is the same site
16
- */
17
- sameSite?: string | boolean;
18
- /**
19
- * Encrypt the cookie's value or not
20
- */
21
- encrypt?: boolean;
22
- /**
23
- * Max age for browsers
24
- */
25
- maxAge?: number;
26
- /**
27
- * Expire time
28
- */
29
- expires?: Date;
30
- /**
31
- * Is for http only
32
- */
33
- httpOnly?: boolean;
34
- /**
35
- * Encrypt the cookie's value or not
36
- */
37
- secure?: boolean;
38
- /**
39
- * Once `true` and secure set to `true`, ignore the secure error in a none-ssl environment.
40
- */
41
- ignoreSecureError?: boolean;
42
- /**
43
- * Is it signed or not.
44
- */
45
- signed?: boolean | number;
46
- /**
47
- * Is it partitioned or not.
48
- */
49
- partitioned?: boolean;
50
- /**
51
- * Remove unpartitioned same name cookie or not.
52
- */
53
- removeUnpartitioned?: boolean;
54
- /**
55
- * The cookie priority.
56
- */
57
- priority?: 'low' | 'medium' | 'high' | 'LOW' | 'MEDIUM' | 'HIGH';
1
+ //#region src/cookie.d.ts
2
+ interface CookieSetOptions {
3
+ /**
4
+ * The path for the cookie to be set in
5
+ */
6
+ path?: string | null;
7
+ /**
8
+ * The domain for the cookie
9
+ */
10
+ domain?: string | (() => string);
11
+ /**
12
+ * Is overridable
13
+ */
14
+ overwrite?: boolean;
15
+ /**
16
+ * Is the same site
17
+ */
18
+ sameSite?: string | boolean;
19
+ /**
20
+ * Encrypt the cookie's value or not
21
+ */
22
+ encrypt?: boolean;
23
+ /**
24
+ * Max age for browsers
25
+ */
26
+ maxAge?: number;
27
+ /**
28
+ * Expire time
29
+ */
30
+ expires?: Date;
31
+ /**
32
+ * Is for http only
33
+ */
34
+ httpOnly?: boolean;
35
+ /**
36
+ * Encrypt the cookie's value or not
37
+ */
38
+ secure?: boolean;
39
+ /**
40
+ * Once `true` and secure set to `true`, ignore the secure error in a none-ssl environment.
41
+ */
42
+ ignoreSecureError?: boolean;
43
+ /**
44
+ * Is it signed or not.
45
+ */
46
+ signed?: boolean | number;
47
+ /**
48
+ * Is it partitioned or not.
49
+ */
50
+ partitioned?: boolean;
51
+ /**
52
+ * Remove unpartitioned same name cookie or not.
53
+ */
54
+ removeUnpartitioned?: boolean;
55
+ /**
56
+ * The cookie priority.
57
+ */
58
+ priority?: "low" | "medium" | "high" | "LOW" | "MEDIUM" | "HIGH";
58
59
  }
59
- export declare class Cookie {
60
- name: string;
61
- value: string;
62
- readonly attrs: CookieSetOptions;
63
- constructor(name: string, value?: string | null, attrs?: CookieSetOptions);
64
- toString(): string;
65
- toHeader(): string;
60
+ declare class Cookie {
61
+ name: string;
62
+ value: string;
63
+ readonly attrs: CookieSetOptions;
64
+ constructor(name: string, value?: string | null, attrs?: CookieSetOptions);
65
+ toString(): string;
66
+ toHeader(): string;
66
67
  }
68
+ //#endregion
69
+ export { Cookie, CookieSetOptions };
package/dist/cookie.js CHANGED
@@ -1,94 +1,77 @@
1
- import assert from 'node:assert';
1
+ import assert from "node:assert";
2
+
3
+ //#region src/cookie.ts
2
4
  /**
3
- * RegExp to match field-content in RFC 7230 sec 3.2
4
- *
5
- * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
6
- * field-vchar = VCHAR / obs-text
7
- * obs-text = %x80-FF
8
- */
9
- const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; // eslint-disable-line no-control-regex
5
+ * RegExp to match field-content in RFC 7230 sec 3.2
6
+ *
7
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
8
+ * field-vchar = VCHAR / obs-text
9
+ * obs-text = %x80-FF
10
+ */
11
+ const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
10
12
  /**
11
- * RegExp to match Same-Site cookie attribute value.
12
- * https://en.wikipedia.org/wiki/HTTP_cookie#SameSite_cookie
13
- */
13
+ * RegExp to match Same-Site cookie attribute value.
14
+ * https://en.wikipedia.org/wiki/HTTP_cookie#SameSite_cookie
15
+ */
14
16
  const sameSiteRegExp = /^(?:none|lax|strict)$/i;
15
17
  /**
16
- * RegExp to match Priority cookie attribute value.
17
- */
18
+ * RegExp to match Priority cookie attribute value.
19
+ */
18
20
  const PRIORITY_REGEXP = /^(?:low|medium|high)$/i;
19
- export class Cookie {
20
- name;
21
- value;
22
- attrs;
23
- constructor(name, value, attrs) {
24
- assert(fieldContentRegExp.test(name), 'argument name is invalid');
25
- assert(!value || fieldContentRegExp.test(value), 'argument value is invalid');
26
- this.name = name;
27
- this.value = value ?? '';
28
- this.attrs = mergeDefaultAttrs(attrs);
29
- assert(!this.attrs.path || fieldContentRegExp.test(this.attrs.path), 'argument option path is invalid');
30
- if (typeof this.attrs.domain === 'function') {
31
- this.attrs.domain = this.attrs.domain();
32
- }
33
- assert(!this.attrs.domain || fieldContentRegExp.test(this.attrs.domain), 'argument option domain is invalid');
34
- assert(!this.attrs.sameSite || this.attrs.sameSite === true || sameSiteRegExp.test(this.attrs.sameSite), 'argument option sameSite is invalid');
35
- assert(!this.attrs.priority || PRIORITY_REGEXP.test(this.attrs.priority), 'argument option priority is invalid');
36
- if (!value) {
37
- this.attrs.expires = new Date(0);
38
- // make sure maxAge is empty
39
- this.attrs.maxAge = undefined;
40
- }
41
- }
42
- toString() {
43
- return this.name + '=' + this.value;
44
- }
45
- toHeader() {
46
- let header = this.toString();
47
- const attrs = this.attrs;
48
- if (attrs.path) {
49
- header += '; path=' + attrs.path;
50
- }
51
- const maxAge = typeof attrs.maxAge === 'string' ? parseInt(attrs.maxAge, 10) : attrs.maxAge;
52
- // ignore 0, `session` and other invalid maxAge
53
- if (maxAge) {
54
- header += '; max-age=' + Math.round(maxAge / 1000);
55
- attrs.expires = new Date(Date.now() + maxAge);
56
- }
57
- if (attrs.expires) {
58
- header += '; expires=' + attrs.expires.toUTCString();
59
- }
60
- if (attrs.domain) {
61
- header += '; domain=' + attrs.domain;
62
- }
63
- if (attrs.priority) {
64
- header += '; priority=' + attrs.priority.toLowerCase();
65
- }
66
- if (attrs.sameSite) {
67
- header += '; samesite=' + (attrs.sameSite === true ? 'strict' : attrs.sameSite.toLowerCase());
68
- }
69
- if (attrs.secure) {
70
- header += '; secure';
71
- }
72
- if (attrs.httpOnly) {
73
- header += '; httponly';
74
- }
75
- if (attrs.partitioned) {
76
- header += '; partitioned';
77
- }
78
- return header;
79
- }
80
- }
21
+ var Cookie = class {
22
+ name;
23
+ value;
24
+ attrs;
25
+ constructor(name, value, attrs) {
26
+ assert(fieldContentRegExp.test(name), "argument name is invalid");
27
+ assert(!value || fieldContentRegExp.test(value), "argument value is invalid");
28
+ this.name = name;
29
+ this.value = value ?? "";
30
+ this.attrs = mergeDefaultAttrs(attrs);
31
+ assert(!this.attrs.path || fieldContentRegExp.test(this.attrs.path), "argument option path is invalid");
32
+ if (typeof this.attrs.domain === "function") this.attrs.domain = this.attrs.domain();
33
+ assert(!this.attrs.domain || fieldContentRegExp.test(this.attrs.domain), "argument option domain is invalid");
34
+ assert(!this.attrs.sameSite || this.attrs.sameSite === true || sameSiteRegExp.test(this.attrs.sameSite), "argument option sameSite is invalid");
35
+ assert(!this.attrs.priority || PRIORITY_REGEXP.test(this.attrs.priority), "argument option priority is invalid");
36
+ if (!value) {
37
+ this.attrs.expires = /* @__PURE__ */ new Date(0);
38
+ this.attrs.maxAge = void 0;
39
+ }
40
+ }
41
+ toString() {
42
+ return this.name + "=" + this.value;
43
+ }
44
+ toHeader() {
45
+ let header = this.toString();
46
+ const attrs = this.attrs;
47
+ if (attrs.path) header += "; path=" + attrs.path;
48
+ const maxAge = typeof attrs.maxAge === "string" ? parseInt(attrs.maxAge, 10) : attrs.maxAge;
49
+ if (maxAge) {
50
+ header += "; max-age=" + Math.round(maxAge / 1e3);
51
+ attrs.expires = new Date(Date.now() + maxAge);
52
+ }
53
+ if (attrs.expires) header += "; expires=" + attrs.expires.toUTCString();
54
+ if (attrs.domain) header += "; domain=" + attrs.domain;
55
+ if (attrs.priority) header += "; priority=" + attrs.priority.toLowerCase();
56
+ if (attrs.sameSite) header += "; samesite=" + (attrs.sameSite === true ? "strict" : attrs.sameSite.toLowerCase());
57
+ if (attrs.secure) header += "; secure";
58
+ if (attrs.httpOnly) header += "; httponly";
59
+ if (attrs.partitioned) header += "; partitioned";
60
+ return header;
61
+ }
62
+ };
81
63
  function mergeDefaultAttrs(attrs) {
82
- const merged = {
83
- path: '/',
84
- httpOnly: true,
85
- secure: false,
86
- overwrite: false,
87
- sameSite: false,
88
- partitioned: false,
89
- priority: undefined,
90
- ...attrs,
91
- };
92
- return merged;
64
+ return {
65
+ path: "/",
66
+ httpOnly: true,
67
+ secure: false,
68
+ overwrite: false,
69
+ sameSite: false,
70
+ partitioned: false,
71
+ priority: void 0,
72
+ ...attrs
73
+ };
93
74
  }
94
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29va2llLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Nvb2tpZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLE1BQU0sTUFBTSxhQUFhLENBQUM7QUFFakM7Ozs7OztHQU1HO0FBQ0gsTUFBTSxrQkFBa0IsR0FBRyx1Q0FBdUMsQ0FBQyxDQUFDLHVDQUF1QztBQUUzRzs7O0dBR0c7QUFDSCxNQUFNLGNBQWMsR0FBRyx3QkFBd0IsQ0FBQztBQUVoRDs7R0FFRztBQUNILE1BQU0sZUFBZSxHQUFHLHdCQUF3QixDQUFDO0FBOERqRCxNQUFNLE9BQU8sT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QztZQUNqQixNQUFNLElBQUksVUFBVSxDQUFDO1FBQ3ZCLENBQUM7UUFDRCxJQUFJLEtBQUssQ0FBQyxRQUFRLEVBQUUsQ0FBQztZQUNuQixNQUFNLElBQUksWUFBWSxDQUFDO1FBQ3pCLENBQUM7UUFDRCxJQUFJLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQztZQUN0QixNQUFNLElBQUksZUFBZSxDQUFDO1FBQzVCLENBQUM7UUFDRCxPQUFPLE1BQU0sQ0FBQztJQUNoQixDQUFDO0NBQ0Y7QUFFRCxTQUFTLGlCQUFpQixDQUFDLEtBQXdCO0lBQ2pELE1BQU0sTUFBTSxHQUFHO1FBQ2IsSUFBSSxFQUFFLEdBQUc7UUFDVCxRQUFRLEVBQUUsSUFBSTtRQUNkLE1BQU0sRUFBRSxLQUFLO1FBQ2IsU0FBUyxFQUFFLEtBQUs7UUFDaEIsUUFBUSxFQUFFLEtBQUs7UUFDZixXQUFXLEVBQUUsS0FBSztRQUNsQixRQUFRLEVBQUUsU0FBUztRQUNuQixHQUFHLEtBQUs7S0FDVCxDQUFDO0lBQ0YsT0FBTyxNQUFNLENBQUM7QUFDaEIsQ0FBQyJ9
75
+
76
+ //#endregion
77
+ export { Cookie };
package/dist/cookies.d.ts CHANGED
@@ -1,43 +1,47 @@
1
- import { Keygrip } from './keygrip.ts';
2
- import { type CookieSetOptions } from './cookie.ts';
3
- export interface DefaultCookieOptions extends CookieSetOptions {
4
- /**
5
- * Auto get and set `_CHIPS-` prefix cookie to adaptation CHIPS mode (The default value is false).
6
- */
7
- autoChips?: boolean;
1
+ import { CookieSetOptions } from "./cookie.js";
2
+ import { Keygrip } from "./keygrip.js";
3
+
4
+ //#region src/cookies.d.ts
5
+ interface DefaultCookieOptions extends CookieSetOptions {
6
+ /**
7
+ * Auto get and set `_CHIPS-` prefix cookie to adaptation CHIPS mode (The default value is false).
8
+ */
9
+ autoChips?: boolean;
8
10
  }
9
- export interface CookieGetOptions {
10
- /**
11
- * Whether to sign or not (The default value is true).
12
- */
13
- signed?: boolean;
14
- /**
15
- * Encrypt the cookie's value or not (The default value is false).
16
- */
17
- encrypt?: boolean;
11
+ interface CookieGetOptions {
12
+ /**
13
+ * Whether to sign or not (The default value is true).
14
+ */
15
+ signed?: boolean;
16
+ /**
17
+ * Encrypt the cookie's value or not (The default value is false).
18
+ */
19
+ encrypt?: boolean;
18
20
  }
19
21
  /**
20
- * cookies for egg
21
- * extend pillarjs/cookies, add encrypt and decrypt
22
- */
23
- export declare class Cookies {
24
- #private;
25
- readonly ctx: Record<string, any>;
26
- readonly app: Record<string, any>;
27
- readonly secure: boolean;
28
- constructor(ctx: Record<string, any>, keys: string[], defaultCookieOptions?: DefaultCookieOptions);
29
- get keys(): Keygrip;
30
- /**
31
- * get cookie value by name
32
- * @param {String} name - cookie's name
33
- * @param {Object} opts - cookies' options
34
- * - {Boolean} signed - default to true
35
- * - {Boolean} encrypt - default to false
36
- * @return {String} value - cookie's value
37
- */
38
- get(name: string, opts?: CookieGetOptions): string | undefined;
39
- _get(name: string, opts: CookieGetOptions): string | undefined;
40
- set(name: string, value: string | null, opts?: CookieSetOptions): this;
41
- isSameSiteNoneCompatible(userAgent: string): boolean;
42
- isPartitionedCompatible(userAgent: string): boolean;
22
+ * cookies for egg
23
+ * extend pillarjs/cookies, add encrypt and decrypt
24
+ */
25
+ declare class Cookies {
26
+ #private;
27
+ readonly ctx: Record<string, any>;
28
+ readonly app: Record<string, any>;
29
+ readonly secure: boolean;
30
+ constructor(ctx: Record<string, any>, keys: string[], defaultCookieOptions?: DefaultCookieOptions);
31
+ get keys(): Keygrip;
32
+ /**
33
+ * get cookie value by name
34
+ * @param {String} name - cookie's name
35
+ * @param {Object} opts - cookies' options
36
+ * - {Boolean} signed - default to true
37
+ * - {Boolean} encrypt - default to false
38
+ * @return {String} value - cookie's value
39
+ */
40
+ get(name: string, opts?: CookieGetOptions): string | undefined;
41
+ _get(name: string, opts: CookieGetOptions): string | undefined;
42
+ set(name: string, value: string | null, opts?: CookieSetOptions): this;
43
+ isSameSiteNoneCompatible(userAgent: string): boolean;
44
+ isPartitionedCompatible(userAgent: string): boolean;
43
45
  }
46
+ //#endregion
47
+ export { CookieGetOptions, Cookies, DefaultCookieOptions };