tough-cookie 5.1.0 → 5.1.2
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.
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* - `unsafe-disabled` - Disables cookie prefix checking.
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export declare const PrefixSecurityEnum:
|
|
15
|
-
SILENT: "silent";
|
|
16
|
-
STRICT: "strict";
|
|
17
|
-
DISABLED: "unsafe-disabled";
|
|
18
|
-
}
|
|
14
|
+
export declare const PrefixSecurityEnum: {
|
|
15
|
+
readonly SILENT: "silent";
|
|
16
|
+
readonly STRICT: "strict";
|
|
17
|
+
readonly DISABLED: "unsafe-disabled";
|
|
18
|
+
};
|
|
19
19
|
export declare const IP_V6_REGEX_OBJECT: RegExp;
|
|
20
20
|
/**
|
|
21
21
|
* A JSON representation of a {@link CookieJar}.
|
package/dist/cookie/constants.js
CHANGED
|
@@ -14,11 +14,12 @@ exports.IP_V6_REGEX_OBJECT = exports.PrefixSecurityEnum = void 0;
|
|
|
14
14
|
* - `unsafe-disabled` - Disables cookie prefix checking.
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
exports.PrefixSecurityEnum =
|
|
17
|
+
exports.PrefixSecurityEnum = {
|
|
18
18
|
SILENT: 'silent',
|
|
19
19
|
STRICT: 'strict',
|
|
20
20
|
DISABLED: 'unsafe-disabled',
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
|
+
Object.freeze(exports.PrefixSecurityEnum);
|
|
22
23
|
const IP_V6_REGEX = `
|
|
23
24
|
\\[?(?:
|
|
24
25
|
(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|
|
|
@@ -74,7 +74,7 @@ function domainMatch(domain, cookieDomain, canonicalize) {
|
|
|
74
74
|
}
|
|
75
75
|
/* " o All of the following [three] conditions hold:" */
|
|
76
76
|
/* "* The domain string is a suffix of the string" */
|
|
77
|
-
const idx = _str.lastIndexOf(
|
|
77
|
+
const idx = _str.lastIndexOf(_domStr);
|
|
78
78
|
if (idx <= 0) {
|
|
79
79
|
return false; // it's a non-match (-1) or prefix (0)
|
|
80
80
|
}
|
package/dist/cookie/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { MemoryCookieStore, MemoryCookieStoreIndex } from '../memstore';
|
|
1
|
+
export { MemoryCookieStore, type MemoryCookieStoreIndex } from '../memstore';
|
|
2
2
|
export { pathMatch } from '../pathMatch';
|
|
3
3
|
export { permuteDomain } from '../permuteDomain';
|
|
4
|
-
export { getPublicSuffix, GetPublicSuffixOptions } from '../getPublicSuffix';
|
|
4
|
+
export { getPublicSuffix, type GetPublicSuffixOptions, } from '../getPublicSuffix';
|
|
5
5
|
export { Store } from '../store';
|
|
6
6
|
export { ParameterError } from '../validators';
|
|
7
7
|
export { version } from '../version';
|
|
8
|
-
export { Callback, ErrorCallback, Nullable } from '../utils';
|
|
8
|
+
export { type Callback, type ErrorCallback, type Nullable } from '../utils';
|
|
9
9
|
export { canonicalDomain } from './canonicalDomain';
|
|
10
|
-
export { PrefixSecurityEnum, SerializedCookie, SerializedCookieJar, } from './constants';
|
|
11
|
-
export { Cookie, CreateCookieOptions, ParseCookieOptions } from './cookie';
|
|
10
|
+
export { PrefixSecurityEnum, type SerializedCookie, type SerializedCookieJar, } from './constants';
|
|
11
|
+
export { Cookie, type CreateCookieOptions, type ParseCookieOptions, } from './cookie';
|
|
12
12
|
export { cookieCompare } from './cookieCompare';
|
|
13
|
-
export { CookieJar, CreateCookieJarOptions, GetCookiesOptions, SetCookieOptions, } from './cookieJar';
|
|
13
|
+
export { CookieJar, type CreateCookieJarOptions, type GetCookiesOptions, type SetCookieOptions, } from './cookieJar';
|
|
14
14
|
export { defaultPath } from './defaultPath';
|
|
15
15
|
export { domainMatch } from './domainMatch';
|
|
16
16
|
export { formatDate } from './formatDate';
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"RFC6265",
|
|
76
76
|
"RFC2965"
|
|
77
77
|
],
|
|
78
|
-
"version": "5.1.
|
|
78
|
+
"version": "5.1.2",
|
|
79
79
|
"homepage": "https://github.com/salesforce/tough-cookie",
|
|
80
80
|
"repository": {
|
|
81
81
|
"type": "git",
|
|
@@ -124,7 +124,9 @@
|
|
|
124
124
|
"@types/node": "^16.18.101",
|
|
125
125
|
"async": "3.2.6",
|
|
126
126
|
"eslint": "^9.9.1",
|
|
127
|
-
"eslint-config-prettier": "^
|
|
127
|
+
"eslint-config-prettier": "^10.0.1",
|
|
128
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
129
|
+
"eslint-plugin-import": "^2.31.0",
|
|
128
130
|
"eslint-plugin-prettier": "^5.2.1",
|
|
129
131
|
"genversion": "^3.2.0",
|
|
130
132
|
"globals": "^15.8.0",
|