├── .editorconfig ├── .eslintrc.js ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── node.js.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── lib └── set-cookie.js ├── package-lock.json ├── package.json └── test ├── .eslintrc.js ├── fetch.js ├── set-cookie-parser.js ├── split-cookies-string.js └── warnings.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = { 3 | // This isn't really meant for use in browsers, but some dependents such as nookie are. 4 | // So, stick with ES5 to be nice. See #44 5 | parserOptions: { ecmaVersion: 5 }, 6 | env: { 7 | node: true, 8 | browser: true, 9 | }, 10 | extends: ["eslint:recommended", "plugin:prettier/recommended"], 11 | rules: { 12 | "prefer-const": "error", 13 | strict: "error", 14 | eqeqeq: "error", 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js text eol=lf 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [nfriedly] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: [push, pull_request] 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | node-version: [lts/*, latest] 14 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Use Node.js ${{ matrix.node-version }} 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: ${{ matrix.node-version }} 21 | cache: 'npm' 22 | - run: npm ci 23 | - run: npm run build --if-present 24 | - run: npm test 25 | publish: 26 | name: Publish 27 | needs: [test] 28 | if: startsWith(github.ref, 'refs/tags/v') 29 | runs-on: ubuntu-latest 30 | permissions: 31 | contents: write 32 | id-token: write 33 | steps: 34 | - name: Checkout the repository 35 | uses: actions/checkout@v4 36 | - uses: actions/setup-node@v4 37 | with: 38 | node-version: lts/* 39 | registry-url: https://registry.npmjs.org/ 40 | - name: Install dependencies 41 | run: npm ci 42 | - name: Publish package to NPM 43 | run: npm publish --provenance 44 | env: 45 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /coverage/ 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## [v2.7.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.7.0) - 2024-10-21 3 | * Docs: added link to [V3 discussion](https://github.com/nfriedly/set-cookie-parser/discussions/68) in readme 4 | 5 | ## [v2.7.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.7.0) - 2024-08-01 6 | * Added support for `partitioned` attribute 7 | * Set up automatic publishing to npm from github actions, with provenance 8 | 9 | Docs: 10 | * Added changelog 11 | 12 | ## [v2.6.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.6.0) - 2023-05-18 13 | * Add support for getSetCookie() method on fetch response headers objects. 14 | 15 | ### [v2.5.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.5.1) - 2024-07-25 16 | * Change name-value-pair parsing to follow 6265bis 17 | * When there's no `=` in the "name=value" part, now the name is '' and the value is the entire string. Previously it was the other way around. 18 | 19 | 20 | ## [v2.5.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.5.0) - 2022-06-04 21 | * Add `"sideEffects": false` to `package.json` to help bundlers like Webpack and Rollup 22 | 23 | ## [v2.4.8](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.8) - 2021-02-26 24 | * Revert to ES5 25 | 26 | ## [v2.4.7](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.7) - 2021-01-16 27 | * Handle cases where `decodeURIComponent()` throws when decoding a value by logging an error and returning the original value 28 | * Switch to ES6 29 | 30 | ## [v2.4.6](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.6) - 2020-05-30 31 | * Return an empty object rather than an empty array for falsy input when `options.map` is enabled 32 | 33 | ## [v2.4.5](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.5) - 2020-04-04 34 | * Document new silent option 35 | * No functional changes 36 | 37 | ## [v2.4.4](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.4) - 2020-04-04 38 | * Log a warning if the library appears to have been used incorrectly on a request rather than on a response. 39 | * New `silent` option to suppress this behavior 40 | 41 | ## [v2.4.3](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.3) - 2020-01-29 42 | * Fix `parseString` export, add default options 43 | 44 | ## [v2.4.2](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.2) - 2020-01-29 45 | * Documentation improvements 46 | * No functional changes 47 | 48 | ## [v2.4.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.1) - 2019-12-13 49 | * Documentation improvements 50 | * No functional changes 51 | 52 | ## [v2.4.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.4.0) - 2019-08-15 53 | * Documented `parse`, `parseString`, & `splitCookiesString` methods 54 | * Attempted but failed to export `parseString` method 55 | * No functional changes 56 | 57 | ## [v2.3.8](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.8) - 2019-07-15 58 | * Drop testing on node < 8 due to ESLint 59 | * No functional changes 60 | 61 | ## [v2.3.7](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.7) - 2019-07-15 (unpublished) 62 | * Development dependency bump 63 | * No functional changes 64 | 65 | ## [v2.3.6](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.6) - 2019-07-15 (unpublished) 66 | * Support arbitrary capitalization of `Set-Cookie` header name for non-node.js environments 67 | 68 | ## [v2.3.5](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.5) - 2019-01-29 69 | * Clarify documentation of `map` option 70 | * No functional changes 71 | 72 | ## [v2.3.4](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.4) - 2019-01-28 (unpublished) 73 | * Fixed automated publishing to npm 74 | * No functional changes 75 | 76 | ## [v2.3.3](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.3) - 2019-01-28 (unpublished) 77 | * No functional changes 78 | 79 | ## [v2.3.2](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.2) - 2019-01-28 (unpublished) 80 | * No functional changes 81 | 82 | ## [v2.3.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.1) - 2019-01-28 (unpublished) 83 | * No functional changes 84 | 85 | ## [v2.3.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.3.0) - 2018-11-12 (unpublished) 86 | 87 | * New `map` option to return an Object with cookies keyed by name rather than an array of cookies 88 | 89 | ## [v2.2.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.2.1) - 2018-07-10 90 | * Revert to ES5 91 | 92 | ## [v2.2.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.2.0) - 2018-07-08 93 | * Add `splitCookiesString` to separate multiple comma-separated Set-Cookie headers 94 | * Changed code from ES5 to ES6 95 | 96 | ## [v2.1.2](https://github.com/nfriedly/set-cookie-parser/tree/v2.1.2) - 2018-05-26 97 | 98 | Docs 99 | * Fixed a broken link 100 | 101 | ## [v2.1.1](https://github.com/nfriedly/set-cookie-parser/tree/v2.1.1) - 2018-02-26 102 | 103 | * Updated automated release script 104 | 105 | ## [v2.1.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.1.0) - 2018-02-26 106 | 107 | Added 108 | 109 | * Support for `SameSite` attribute 110 | 111 | ## [v2.0.0](https://github.com/nfriedly/set-cookie-parser/tree/v2.0.0) - 2016-12-13 112 | * Added decodeValues option (calls `decodeURIComponent()` on each cookie value), enabled by default. 113 | * Added `splitCookiesString` method. 114 | 115 | ## [v1.0.2](https://github.com/nfriedly/set-cookie-parser/tree/v1.0.2) - 2016-02-08 116 | 117 | Docs: 118 | 119 | * Update badges and keywords 120 | 121 | ## [v1.0.1](https://github.com/nfriedly/set-cookie-parser/tree/v1.0.1) - 2015-07-01 122 | 123 | Docs: 124 | * Added output example 125 | 126 | ## [v1.0.0](https://github.com/nfriedly/set-cookie-parser/tree/v1.0.0) - 2015-07-01 127 | 128 | Initial release -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Nathan Friedly (http://nfriedly.com/) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # set-cookie-parser 2 | 3 | [![Node.js CI](https://github.com/nfriedly/set-cookie-parser/actions/workflows/node.js.yml/badge.svg)](https://github.com/nfriedly/set-cookie-parser/actions/workflows/node.js.yml) 4 | [![NPM version][npm-image]][npm-url] 5 | [![npm downloads](https://img.shields.io/npm/dm/set-cookie-parser)][npm-url] 6 | 7 | --- 8 | 9 | ℹ️ **Note for current users:** I'm considering some changes for the next major version and would appreciate your feedback: https://github.com/nfriedly/set-cookie-parser/discussions/68 10 | 11 | --- 12 | 13 | Parses set-cookie headers into JavaScript objects 14 | 15 | Accepts a single `set-cookie` header value, an array of `set-cookie` header values, a Node.js response object, or a `fetch()` `Response` object that may have 0 or more `set-cookie` headers. 16 | 17 | Also accepts an optional options object. Defaults: 18 | 19 | ```js 20 | { 21 | decodeValues: true, // Calls decodeURIComponent on each value - default: true 22 | map: false, // Return an object instead of an array - default: false 23 | silent: false, // Suppress the warning that is logged when called on a request instead of a response - default: false 24 | } 25 | ``` 26 | 27 | Returns either an array of cookie objects or a map of name => cookie object with `{map: true}`. Each cookie object will have, at a minimum `name` and `value` properties, and may have additional properties depending on the set-cookie header: 28 | 29 | * `name` - cookie name (string) 30 | * `value` - cookie value (string) 31 | * `path` - URL path to limit the scope to (string or undefined) 32 | * `domain` - domain to expand the scope to (string or undefined, may begin with "." to indicate the named domain or any subdomain of it) 33 | * `expires` - absolute expiration date for the cookie (Date object or undefined) 34 | * `maxAge` - relative expiration time of the cookie in seconds from when the client receives it (integer or undefined) 35 | * Note: when using with [express's res.cookie() method](http://expressjs.com/en/4x/api.html#res.cookie), multiply `maxAge` by 1000 to convert to milliseconds. 36 | * `secure` - indicates cookie should only be sent over HTTPs (true or undefined) 37 | * `httpOnly` - indicates cookie should *not* be accessible to client-side JavaScript (true or undefined) 38 | * `sameSite` - indicates if cookie should be included in cross-site requests ([more info](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value)) (string or undefined) 39 | * Note: valid values are `"Strict"`, `"Lax"`, and `"None"`, but set-cookie-parser coppies the value verbatim and does *not* perform any validation. 40 | * `partitioned` - indicates cookie should be scoped to the combination of 3rd party domain + top page domain ([more info](https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies)) (true or undefined) 41 | 42 | (The output format is loosely based on the input format of https://www.npmjs.com/package/cookie) 43 | 44 | ## Install 45 | 46 | ```sh 47 | $ npm install --save set-cookie-parser 48 | ``` 49 | 50 | 51 | ## Usage 52 | 53 | ### Get array of cookie objects 54 | 55 | ```js 56 | var http = require('http'); 57 | var setCookie = require('set-cookie-parser'); 58 | 59 | http.get('http://example.com', function(res) { 60 | var cookies = setCookie.parse(res, { 61 | decodeValues: true // default: true 62 | }); 63 | 64 | cookies.forEach(console.log); 65 | } 66 | ``` 67 | 68 | Example output: 69 | 70 | ```js 71 | [ 72 | { 73 | name: 'bam', 74 | value: 'baz' 75 | }, 76 | { 77 | name: 'foo', 78 | value: 'bar', 79 | path: '/', 80 | expires: new Date('Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)'), 81 | maxAge: 1000, 82 | domain: '.example.com', 83 | secure: true, 84 | httpOnly: true, 85 | sameSite: 'lax' 86 | } 87 | ] 88 | ``` 89 | 90 | ### Get map of cookie objects 91 | 92 | ```js 93 | var http = require('http'); 94 | var setCookie = require('set-cookie-parser'); 95 | 96 | http.get('http://example.com', function(res) { 97 | var cookies = setCookie.parse(res, { 98 | decodeValues: true, // default: true 99 | map: true // default: false 100 | }); 101 | 102 | var desiredCookie = cookies['session']; 103 | console.log(desiredCookie); 104 | }); 105 | ``` 106 | Example output: 107 | ```js 108 | { 109 | bam: { 110 | name: 'bam', 111 | value: 'baz' 112 | }, 113 | foo: { 114 | name: 'foo', 115 | value: 'bar', 116 | path: '/', 117 | expires: new Date('Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)'), 118 | maxAge: 1000, 119 | domain: '.example.com', 120 | secure: true, 121 | httpOnly: true, 122 | sameSite: 'lax' 123 | } 124 | } 125 | ``` 126 | 127 | ### Creating a new, modified set-cookie header 128 | 129 | This library can be used in conjunction with the [cookie](https://www.npmjs.com/package/cookie) library to modify and replace set-cookie headers: 130 | 131 | ```js 132 | const libCookie = require('cookie'); 133 | const setCookie = require('set-cookie-parser'); 134 | 135 | function modifySetCookie(res){ 136 | // parse the set-cookie headers with this library 137 | let cookies = setCookie.parse(res); 138 | 139 | // modify the cookies here 140 | // ... 141 | 142 | // create new set-cookie headers using the cookie library 143 | res.headers['set-cookie'] = cookies.map(function(cookie) { 144 | return libCookie.serialize(cookie.name, cookie.value, cookie); 145 | }); 146 | } 147 | ``` 148 | 149 | See a real-world example of this in [unblocker](https://github.com/nfriedly/node-unblocker/blob/08a89ec27274b46dcd80d0a324a59406f2bdad3d/lib/cookies.js#L67-L85) 150 | 151 | ## Usage in React Native (and with some other fetch implementations) 152 | 153 | React Native follows the Fetch spec more closely and combines all of the Set-Cookie header values into a single string. 154 | The `splitCookiesString` method reverses this. 155 | 156 | ```js 157 | var setCookie = require('set-cookie-parser'); 158 | 159 | var response = fetch(/*...*/); 160 | 161 | // This is mainly for React Native; Node.js does not combine set-cookie headers. 162 | var combinedCookieHeader = response.headers.get('Set-Cookie'); 163 | var splitCookieHeaders = setCookie.splitCookiesString(combinedCookieHeader) 164 | var cookies = setCookie.parse(splitCookieHeaders); 165 | 166 | console.log(cookies); // should be an array of cookies 167 | ``` 168 | 169 | This behavior may become a default part of parse in the next major release, but requires the extra step for now. 170 | 171 | Note that the `fetch()` spec now includes a `getSetCookie()` method that provides un-combined `Set-Cookie` headers. This library will automatically use that method if it is present. 172 | 173 | ## API 174 | 175 | ### parse(input, [options]) 176 | 177 | Parses cookies from a string, array of strings, or a http response object. 178 | Always returns an array, regardless of input format. (Unless the `map` option is set, in which case it always returns an object.) 179 | 180 | ### parseString(individualSetCookieHeader, [options]) 181 | 182 | Parses a single set-cookie header value string. Options default is `{decodeValues: true}`. Used under-the-hood by `parse()`. 183 | Returns an object. 184 | 185 | ### splitCookiesString(combinedSetCookieHeader) 186 | 187 | It's uncommon, but the HTTP spec does allow for multiple of the same header to have their values combined (comma-separated) into a single header. 188 | This method splits apart a combined header without choking on commas that appear within a cookie's value (or expiration date). 189 | Returns an array of strings that may be passed to `parse()`. 190 | 191 | ## References 192 | 193 | * [RFC 6265: HTTP State Management Mechanism](https://tools.ietf.org/html/rfc6265) 194 | * [draft-ietf-httpbis-rfc6265bis-10](https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html) 195 | 196 | ## License 197 | 198 | MIT © [Nathan Friedly](http://www.nfriedly.com/) 199 | 200 | 201 | [npm-image]: https://badge.fury.io/js/set-cookie-parser.svg 202 | [npm-url]: https://npmjs.org/package/set-cookie-parser 203 | -------------------------------------------------------------------------------- /lib/set-cookie.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var defaultParseOptions = { 4 | decodeValues: true, 5 | map: false, 6 | silent: false, 7 | }; 8 | 9 | function isNonEmptyString(str) { 10 | return typeof str === "string" && !!str.trim(); 11 | } 12 | 13 | function parseString(setCookieValue, options) { 14 | var parts = setCookieValue.split(";").filter(isNonEmptyString); 15 | 16 | var nameValuePairStr = parts.shift(); 17 | var parsed = parseNameValuePair(nameValuePairStr); 18 | var name = parsed.name; 19 | var value = parsed.value; 20 | 21 | options = options 22 | ? Object.assign({}, defaultParseOptions, options) 23 | : defaultParseOptions; 24 | 25 | try { 26 | value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value 27 | } catch (e) { 28 | console.error( 29 | "set-cookie-parser encountered an error while decoding a cookie with value '" + 30 | value + 31 | "'. Set options.decodeValues to false to disable this feature.", 32 | e 33 | ); 34 | } 35 | 36 | var cookie = { 37 | name: name, 38 | value: value, 39 | }; 40 | 41 | parts.forEach(function (part) { 42 | var sides = part.split("="); 43 | var key = sides.shift().trimLeft().toLowerCase(); 44 | var value = sides.join("="); 45 | if (key === "expires") { 46 | cookie.expires = new Date(value); 47 | } else if (key === "max-age") { 48 | cookie.maxAge = parseInt(value, 10); 49 | } else if (key === "secure") { 50 | cookie.secure = true; 51 | } else if (key === "httponly") { 52 | cookie.httpOnly = true; 53 | } else if (key === "samesite") { 54 | cookie.sameSite = value; 55 | } else if (key === "partitioned") { 56 | cookie.partitioned = true; 57 | } else { 58 | cookie[key] = value; 59 | } 60 | }); 61 | 62 | return cookie; 63 | } 64 | 65 | function parseNameValuePair(nameValuePairStr) { 66 | // Parses name-value-pair according to rfc6265bis draft 67 | 68 | var name = ""; 69 | var value = ""; 70 | var nameValueArr = nameValuePairStr.split("="); 71 | if (nameValueArr.length > 1) { 72 | name = nameValueArr.shift(); 73 | value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part 74 | } else { 75 | value = nameValuePairStr; 76 | } 77 | 78 | return { name: name, value: value }; 79 | } 80 | 81 | function parse(input, options) { 82 | options = options 83 | ? Object.assign({}, defaultParseOptions, options) 84 | : defaultParseOptions; 85 | 86 | if (!input) { 87 | if (!options.map) { 88 | return []; 89 | } else { 90 | return {}; 91 | } 92 | } 93 | 94 | if (input.headers) { 95 | if (typeof input.headers.getSetCookie === "function") { 96 | // for fetch responses - they combine headers of the same type in the headers array, 97 | // but getSetCookie returns an uncombined array 98 | input = input.headers.getSetCookie(); 99 | } else if (input.headers["set-cookie"]) { 100 | // fast-path for node.js (which automatically normalizes header names to lower-case 101 | input = input.headers["set-cookie"]; 102 | } else { 103 | // slow-path for other environments - see #25 104 | var sch = 105 | input.headers[ 106 | Object.keys(input.headers).find(function (key) { 107 | return key.toLowerCase() === "set-cookie"; 108 | }) 109 | ]; 110 | // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36 111 | if (!sch && input.headers.cookie && !options.silent) { 112 | console.warn( 113 | "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning." 114 | ); 115 | } 116 | input = sch; 117 | } 118 | } 119 | if (!Array.isArray(input)) { 120 | input = [input]; 121 | } 122 | 123 | if (!options.map) { 124 | return input.filter(isNonEmptyString).map(function (str) { 125 | return parseString(str, options); 126 | }); 127 | } else { 128 | var cookies = {}; 129 | return input.filter(isNonEmptyString).reduce(function (cookies, str) { 130 | var cookie = parseString(str, options); 131 | cookies[cookie.name] = cookie; 132 | return cookies; 133 | }, cookies); 134 | } 135 | } 136 | 137 | /* 138 | Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas 139 | that are within a single set-cookie field-value, such as in the Expires portion. 140 | 141 | This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 142 | Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 143 | React Native's fetch does this for *every* header, including set-cookie. 144 | 145 | Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 146 | Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation 147 | */ 148 | function splitCookiesString(cookiesString) { 149 | if (Array.isArray(cookiesString)) { 150 | return cookiesString; 151 | } 152 | if (typeof cookiesString !== "string") { 153 | return []; 154 | } 155 | 156 | var cookiesStrings = []; 157 | var pos = 0; 158 | var start; 159 | var ch; 160 | var lastComma; 161 | var nextStart; 162 | var cookiesSeparatorFound; 163 | 164 | function skipWhitespace() { 165 | while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { 166 | pos += 1; 167 | } 168 | return pos < cookiesString.length; 169 | } 170 | 171 | function notSpecialChar() { 172 | ch = cookiesString.charAt(pos); 173 | 174 | return ch !== "=" && ch !== ";" && ch !== ","; 175 | } 176 | 177 | while (pos < cookiesString.length) { 178 | start = pos; 179 | cookiesSeparatorFound = false; 180 | 181 | while (skipWhitespace()) { 182 | ch = cookiesString.charAt(pos); 183 | if (ch === ",") { 184 | // ',' is a cookie separator if we have later first '=', not ';' or ',' 185 | lastComma = pos; 186 | pos += 1; 187 | 188 | skipWhitespace(); 189 | nextStart = pos; 190 | 191 | while (pos < cookiesString.length && notSpecialChar()) { 192 | pos += 1; 193 | } 194 | 195 | // currently special character 196 | if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { 197 | // we found cookies separator 198 | cookiesSeparatorFound = true; 199 | // pos is inside the next cookie, so back up and return it. 200 | pos = nextStart; 201 | cookiesStrings.push(cookiesString.substring(start, lastComma)); 202 | start = pos; 203 | } else { 204 | // in param ',' or param separator ';', 205 | // we continue from that comma 206 | pos = lastComma + 1; 207 | } 208 | } else { 209 | pos += 1; 210 | } 211 | } 212 | 213 | if (!cookiesSeparatorFound || pos >= cookiesString.length) { 214 | cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); 215 | } 216 | } 217 | 218 | return cookiesStrings; 219 | } 220 | 221 | module.exports = parse; 222 | module.exports.parse = parse; 223 | module.exports.parseString = parseString; 224 | module.exports.splitCookiesString = splitCookiesString; 225 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "set-cookie-parser", 3 | "version": "2.7.1", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "set-cookie-parser", 9 | "version": "2.7.1", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "eslint": "^8.57.0", 13 | "eslint-config-prettier": "^9.1.0", 14 | "eslint-plugin-prettier": "^5.1.3", 15 | "husky": "^9.0.11", 16 | "mocha": "^10.3.0", 17 | "prettier": "^3.2.5", 18 | "pretty-quick": "^4.0.0", 19 | "sinon": "^17.0.1" 20 | } 21 | }, 22 | "node_modules/@aashutoshrathi/word-wrap": { 23 | "version": "1.2.6", 24 | "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", 25 | "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", 26 | "dev": true, 27 | "engines": { 28 | "node": ">=0.10.0" 29 | } 30 | }, 31 | "node_modules/@eslint-community/eslint-utils": { 32 | "version": "4.4.0", 33 | "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", 34 | "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", 35 | "dev": true, 36 | "dependencies": { 37 | "eslint-visitor-keys": "^3.3.0" 38 | }, 39 | "engines": { 40 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 41 | }, 42 | "peerDependencies": { 43 | "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" 44 | } 45 | }, 46 | "node_modules/@eslint-community/regexpp": { 47 | "version": "4.10.0", 48 | "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", 49 | "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", 50 | "dev": true, 51 | "engines": { 52 | "node": "^12.0.0 || ^14.0.0 || >=16.0.0" 53 | } 54 | }, 55 | "node_modules/@eslint/eslintrc": { 56 | "version": "2.1.4", 57 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", 58 | "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", 59 | "dev": true, 60 | "dependencies": { 61 | "ajv": "^6.12.4", 62 | "debug": "^4.3.2", 63 | "espree": "^9.6.0", 64 | "globals": "^13.19.0", 65 | "ignore": "^5.2.0", 66 | "import-fresh": "^3.2.1", 67 | "js-yaml": "^4.1.0", 68 | "minimatch": "^3.1.2", 69 | "strip-json-comments": "^3.1.1" 70 | }, 71 | "engines": { 72 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 73 | }, 74 | "funding": { 75 | "url": "https://opencollective.com/eslint" 76 | } 77 | }, 78 | "node_modules/@eslint/js": { 79 | "version": "8.57.0", 80 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", 81 | "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", 82 | "dev": true, 83 | "engines": { 84 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 85 | } 86 | }, 87 | "node_modules/@humanwhocodes/config-array": { 88 | "version": "0.11.14", 89 | "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", 90 | "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", 91 | "dev": true, 92 | "dependencies": { 93 | "@humanwhocodes/object-schema": "^2.0.2", 94 | "debug": "^4.3.1", 95 | "minimatch": "^3.0.5" 96 | }, 97 | "engines": { 98 | "node": ">=10.10.0" 99 | } 100 | }, 101 | "node_modules/@humanwhocodes/module-importer": { 102 | "version": "1.0.1", 103 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", 104 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", 105 | "dev": true, 106 | "engines": { 107 | "node": ">=12.22" 108 | }, 109 | "funding": { 110 | "type": "github", 111 | "url": "https://github.com/sponsors/nzakas" 112 | } 113 | }, 114 | "node_modules/@humanwhocodes/object-schema": { 115 | "version": "2.0.2", 116 | "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", 117 | "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", 118 | "dev": true 119 | }, 120 | "node_modules/@nodelib/fs.scandir": { 121 | "version": "2.1.5", 122 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", 123 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", 124 | "dev": true, 125 | "dependencies": { 126 | "@nodelib/fs.stat": "2.0.5", 127 | "run-parallel": "^1.1.9" 128 | }, 129 | "engines": { 130 | "node": ">= 8" 131 | } 132 | }, 133 | "node_modules/@nodelib/fs.stat": { 134 | "version": "2.0.5", 135 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", 136 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", 137 | "dev": true, 138 | "engines": { 139 | "node": ">= 8" 140 | } 141 | }, 142 | "node_modules/@nodelib/fs.walk": { 143 | "version": "1.2.8", 144 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", 145 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", 146 | "dev": true, 147 | "dependencies": { 148 | "@nodelib/fs.scandir": "2.1.5", 149 | "fastq": "^1.6.0" 150 | }, 151 | "engines": { 152 | "node": ">= 8" 153 | } 154 | }, 155 | "node_modules/@pkgr/core": { 156 | "version": "0.1.1", 157 | "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", 158 | "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", 159 | "dev": true, 160 | "engines": { 161 | "node": "^12.20.0 || ^14.18.0 || >=16.0.0" 162 | }, 163 | "funding": { 164 | "url": "https://opencollective.com/unts" 165 | } 166 | }, 167 | "node_modules/@sinonjs/commons": { 168 | "version": "3.0.1", 169 | "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", 170 | "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", 171 | "dev": true, 172 | "dependencies": { 173 | "type-detect": "4.0.8" 174 | } 175 | }, 176 | "node_modules/@sinonjs/fake-timers": { 177 | "version": "11.2.2", 178 | "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", 179 | "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", 180 | "dev": true, 181 | "dependencies": { 182 | "@sinonjs/commons": "^3.0.0" 183 | } 184 | }, 185 | "node_modules/@sinonjs/samsam": { 186 | "version": "8.0.0", 187 | "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", 188 | "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", 189 | "dev": true, 190 | "dependencies": { 191 | "@sinonjs/commons": "^2.0.0", 192 | "lodash.get": "^4.4.2", 193 | "type-detect": "^4.0.8" 194 | } 195 | }, 196 | "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { 197 | "version": "2.0.0", 198 | "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", 199 | "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", 200 | "dev": true, 201 | "dependencies": { 202 | "type-detect": "4.0.8" 203 | } 204 | }, 205 | "node_modules/@sinonjs/text-encoding": { 206 | "version": "0.7.2", 207 | "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", 208 | "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", 209 | "dev": true 210 | }, 211 | "node_modules/@ungap/structured-clone": { 212 | "version": "1.2.0", 213 | "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", 214 | "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", 215 | "dev": true 216 | }, 217 | "node_modules/acorn": { 218 | "version": "8.11.3", 219 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", 220 | "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", 221 | "dev": true, 222 | "bin": { 223 | "acorn": "bin/acorn" 224 | }, 225 | "engines": { 226 | "node": ">=0.4.0" 227 | } 228 | }, 229 | "node_modules/acorn-jsx": { 230 | "version": "5.3.2", 231 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 232 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 233 | "dev": true, 234 | "peerDependencies": { 235 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 236 | } 237 | }, 238 | "node_modules/ajv": { 239 | "version": "6.12.6", 240 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 241 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 242 | "dev": true, 243 | "dependencies": { 244 | "fast-deep-equal": "^3.1.1", 245 | "fast-json-stable-stringify": "^2.0.0", 246 | "json-schema-traverse": "^0.4.1", 247 | "uri-js": "^4.2.2" 248 | }, 249 | "funding": { 250 | "type": "github", 251 | "url": "https://github.com/sponsors/epoberezkin" 252 | } 253 | }, 254 | "node_modules/ansi-colors": { 255 | "version": "4.1.3", 256 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 257 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 258 | "dev": true, 259 | "license": "MIT", 260 | "engines": { 261 | "node": ">=6" 262 | } 263 | }, 264 | "node_modules/ansi-regex": { 265 | "version": "5.0.1", 266 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 267 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 268 | "dev": true, 269 | "engines": { 270 | "node": ">=8" 271 | } 272 | }, 273 | "node_modules/anymatch": { 274 | "version": "3.1.2", 275 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 276 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 277 | "dev": true, 278 | "dependencies": { 279 | "normalize-path": "^3.0.0", 280 | "picomatch": "^2.0.4" 281 | }, 282 | "engines": { 283 | "node": ">= 8" 284 | } 285 | }, 286 | "node_modules/argparse": { 287 | "version": "2.0.1", 288 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 289 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 290 | "dev": true 291 | }, 292 | "node_modules/balanced-match": { 293 | "version": "1.0.0", 294 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 295 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 296 | "dev": true 297 | }, 298 | "node_modules/binary-extensions": { 299 | "version": "2.2.0", 300 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 301 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 302 | "dev": true, 303 | "engines": { 304 | "node": ">=8" 305 | } 306 | }, 307 | "node_modules/brace-expansion": { 308 | "version": "1.1.11", 309 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 310 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 311 | "dev": true, 312 | "dependencies": { 313 | "balanced-match": "^1.0.0", 314 | "concat-map": "0.0.1" 315 | } 316 | }, 317 | "node_modules/braces": { 318 | "version": "3.0.3", 319 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 320 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 321 | "dev": true, 322 | "dependencies": { 323 | "fill-range": "^7.1.1" 324 | }, 325 | "engines": { 326 | "node": ">=8" 327 | } 328 | }, 329 | "node_modules/browser-stdout": { 330 | "version": "1.3.1", 331 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 332 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 333 | "dev": true 334 | }, 335 | "node_modules/callsites": { 336 | "version": "3.1.0", 337 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 338 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 339 | "dev": true, 340 | "engines": { 341 | "node": ">=6" 342 | } 343 | }, 344 | "node_modules/camelcase": { 345 | "version": "6.3.0", 346 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 347 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 348 | "dev": true, 349 | "engines": { 350 | "node": ">=10" 351 | }, 352 | "funding": { 353 | "url": "https://github.com/sponsors/sindresorhus" 354 | } 355 | }, 356 | "node_modules/chokidar": { 357 | "version": "3.5.3", 358 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 359 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 360 | "dev": true, 361 | "funding": [ 362 | { 363 | "type": "individual", 364 | "url": "https://paulmillr.com/funding/" 365 | } 366 | ], 367 | "dependencies": { 368 | "anymatch": "~3.1.2", 369 | "braces": "~3.0.2", 370 | "glob-parent": "~5.1.2", 371 | "is-binary-path": "~2.1.0", 372 | "is-glob": "~4.0.1", 373 | "normalize-path": "~3.0.0", 374 | "readdirp": "~3.6.0" 375 | }, 376 | "engines": { 377 | "node": ">= 8.10.0" 378 | }, 379 | "optionalDependencies": { 380 | "fsevents": "~2.3.2" 381 | } 382 | }, 383 | "node_modules/chokidar/node_modules/glob-parent": { 384 | "version": "5.1.2", 385 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 386 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 387 | "dev": true, 388 | "dependencies": { 389 | "is-glob": "^4.0.1" 390 | }, 391 | "engines": { 392 | "node": ">= 6" 393 | } 394 | }, 395 | "node_modules/cliui": { 396 | "version": "7.0.4", 397 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 398 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 399 | "dev": true, 400 | "dependencies": { 401 | "string-width": "^4.2.0", 402 | "strip-ansi": "^6.0.0", 403 | "wrap-ansi": "^7.0.0" 404 | } 405 | }, 406 | "node_modules/concat-map": { 407 | "version": "0.0.1", 408 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 409 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 410 | "dev": true 411 | }, 412 | "node_modules/cross-spawn": { 413 | "version": "7.0.3", 414 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 415 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 416 | "dev": true, 417 | "dependencies": { 418 | "path-key": "^3.1.0", 419 | "shebang-command": "^2.0.0", 420 | "which": "^2.0.1" 421 | }, 422 | "engines": { 423 | "node": ">= 8" 424 | } 425 | }, 426 | "node_modules/debug": { 427 | "version": "4.4.0", 428 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 429 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 430 | "dev": true, 431 | "license": "MIT", 432 | "dependencies": { 433 | "ms": "^2.1.3" 434 | }, 435 | "engines": { 436 | "node": ">=6.0" 437 | }, 438 | "peerDependenciesMeta": { 439 | "supports-color": { 440 | "optional": true 441 | } 442 | } 443 | }, 444 | "node_modules/decamelize": { 445 | "version": "4.0.0", 446 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 447 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 448 | "dev": true, 449 | "engines": { 450 | "node": ">=10" 451 | }, 452 | "funding": { 453 | "url": "https://github.com/sponsors/sindresorhus" 454 | } 455 | }, 456 | "node_modules/deep-is": { 457 | "version": "0.1.4", 458 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", 459 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", 460 | "dev": true 461 | }, 462 | "node_modules/diff": { 463 | "version": "5.2.0", 464 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 465 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 466 | "dev": true, 467 | "license": "BSD-3-Clause", 468 | "engines": { 469 | "node": ">=0.3.1" 470 | } 471 | }, 472 | "node_modules/doctrine": { 473 | "version": "3.0.0", 474 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 475 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 476 | "dev": true, 477 | "dependencies": { 478 | "esutils": "^2.0.2" 479 | }, 480 | "engines": { 481 | "node": ">=6.0.0" 482 | } 483 | }, 484 | "node_modules/emoji-regex": { 485 | "version": "8.0.0", 486 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 487 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 488 | "dev": true 489 | }, 490 | "node_modules/escalade": { 491 | "version": "3.1.1", 492 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 493 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 494 | "dev": true, 495 | "engines": { 496 | "node": ">=6" 497 | } 498 | }, 499 | "node_modules/eslint": { 500 | "version": "8.57.0", 501 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", 502 | "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", 503 | "dev": true, 504 | "dependencies": { 505 | "@eslint-community/eslint-utils": "^4.2.0", 506 | "@eslint-community/regexpp": "^4.6.1", 507 | "@eslint/eslintrc": "^2.1.4", 508 | "@eslint/js": "8.57.0", 509 | "@humanwhocodes/config-array": "^0.11.14", 510 | "@humanwhocodes/module-importer": "^1.0.1", 511 | "@nodelib/fs.walk": "^1.2.8", 512 | "@ungap/structured-clone": "^1.2.0", 513 | "ajv": "^6.12.4", 514 | "chalk": "^4.0.0", 515 | "cross-spawn": "^7.0.2", 516 | "debug": "^4.3.2", 517 | "doctrine": "^3.0.0", 518 | "escape-string-regexp": "^4.0.0", 519 | "eslint-scope": "^7.2.2", 520 | "eslint-visitor-keys": "^3.4.3", 521 | "espree": "^9.6.1", 522 | "esquery": "^1.4.2", 523 | "esutils": "^2.0.2", 524 | "fast-deep-equal": "^3.1.3", 525 | "file-entry-cache": "^6.0.1", 526 | "find-up": "^5.0.0", 527 | "glob-parent": "^6.0.2", 528 | "globals": "^13.19.0", 529 | "graphemer": "^1.4.0", 530 | "ignore": "^5.2.0", 531 | "imurmurhash": "^0.1.4", 532 | "is-glob": "^4.0.0", 533 | "is-path-inside": "^3.0.3", 534 | "js-yaml": "^4.1.0", 535 | "json-stable-stringify-without-jsonify": "^1.0.1", 536 | "levn": "^0.4.1", 537 | "lodash.merge": "^4.6.2", 538 | "minimatch": "^3.1.2", 539 | "natural-compare": "^1.4.0", 540 | "optionator": "^0.9.3", 541 | "strip-ansi": "^6.0.1", 542 | "text-table": "^0.2.0" 543 | }, 544 | "bin": { 545 | "eslint": "bin/eslint.js" 546 | }, 547 | "engines": { 548 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 549 | }, 550 | "funding": { 551 | "url": "https://opencollective.com/eslint" 552 | } 553 | }, 554 | "node_modules/eslint-config-prettier": { 555 | "version": "9.1.0", 556 | "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", 557 | "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", 558 | "dev": true, 559 | "bin": { 560 | "eslint-config-prettier": "bin/cli.js" 561 | }, 562 | "peerDependencies": { 563 | "eslint": ">=7.0.0" 564 | } 565 | }, 566 | "node_modules/eslint-plugin-prettier": { 567 | "version": "5.1.3", 568 | "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", 569 | "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", 570 | "dev": true, 571 | "dependencies": { 572 | "prettier-linter-helpers": "^1.0.0", 573 | "synckit": "^0.8.6" 574 | }, 575 | "engines": { 576 | "node": "^14.18.0 || >=16.0.0" 577 | }, 578 | "funding": { 579 | "url": "https://opencollective.com/eslint-plugin-prettier" 580 | }, 581 | "peerDependencies": { 582 | "@types/eslint": ">=8.0.0", 583 | "eslint": ">=8.0.0", 584 | "eslint-config-prettier": "*", 585 | "prettier": ">=3.0.0" 586 | }, 587 | "peerDependenciesMeta": { 588 | "@types/eslint": { 589 | "optional": true 590 | }, 591 | "eslint-config-prettier": { 592 | "optional": true 593 | } 594 | } 595 | }, 596 | "node_modules/eslint-scope": { 597 | "version": "7.2.2", 598 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", 599 | "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", 600 | "dev": true, 601 | "dependencies": { 602 | "esrecurse": "^4.3.0", 603 | "estraverse": "^5.2.0" 604 | }, 605 | "engines": { 606 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 607 | }, 608 | "funding": { 609 | "url": "https://opencollective.com/eslint" 610 | } 611 | }, 612 | "node_modules/eslint-visitor-keys": { 613 | "version": "3.4.3", 614 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", 615 | "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", 616 | "dev": true, 617 | "engines": { 618 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 619 | }, 620 | "funding": { 621 | "url": "https://opencollective.com/eslint" 622 | } 623 | }, 624 | "node_modules/eslint/node_modules/ansi-styles": { 625 | "version": "4.3.0", 626 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 627 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 628 | "dev": true, 629 | "dependencies": { 630 | "color-convert": "^2.0.1" 631 | }, 632 | "engines": { 633 | "node": ">=8" 634 | }, 635 | "funding": { 636 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 637 | } 638 | }, 639 | "node_modules/eslint/node_modules/chalk": { 640 | "version": "4.1.2", 641 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 642 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 643 | "dev": true, 644 | "dependencies": { 645 | "ansi-styles": "^4.1.0", 646 | "supports-color": "^7.1.0" 647 | }, 648 | "engines": { 649 | "node": ">=10" 650 | }, 651 | "funding": { 652 | "url": "https://github.com/chalk/chalk?sponsor=1" 653 | } 654 | }, 655 | "node_modules/eslint/node_modules/color-convert": { 656 | "version": "2.0.1", 657 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 658 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 659 | "dev": true, 660 | "dependencies": { 661 | "color-name": "~1.1.4" 662 | }, 663 | "engines": { 664 | "node": ">=7.0.0" 665 | } 666 | }, 667 | "node_modules/eslint/node_modules/color-name": { 668 | "version": "1.1.4", 669 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 670 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 671 | "dev": true 672 | }, 673 | "node_modules/eslint/node_modules/escape-string-regexp": { 674 | "version": "4.0.0", 675 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 676 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 677 | "dev": true, 678 | "engines": { 679 | "node": ">=10" 680 | }, 681 | "funding": { 682 | "url": "https://github.com/sponsors/sindresorhus" 683 | } 684 | }, 685 | "node_modules/eslint/node_modules/has-flag": { 686 | "version": "4.0.0", 687 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 688 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 689 | "dev": true, 690 | "engines": { 691 | "node": ">=8" 692 | } 693 | }, 694 | "node_modules/eslint/node_modules/supports-color": { 695 | "version": "7.2.0", 696 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 697 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 698 | "dev": true, 699 | "dependencies": { 700 | "has-flag": "^4.0.0" 701 | }, 702 | "engines": { 703 | "node": ">=8" 704 | } 705 | }, 706 | "node_modules/espree": { 707 | "version": "9.6.1", 708 | "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", 709 | "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", 710 | "dev": true, 711 | "dependencies": { 712 | "acorn": "^8.9.0", 713 | "acorn-jsx": "^5.3.2", 714 | "eslint-visitor-keys": "^3.4.1" 715 | }, 716 | "engines": { 717 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 718 | }, 719 | "funding": { 720 | "url": "https://opencollective.com/eslint" 721 | } 722 | }, 723 | "node_modules/esquery": { 724 | "version": "1.5.0", 725 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", 726 | "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", 727 | "dev": true, 728 | "dependencies": { 729 | "estraverse": "^5.1.0" 730 | }, 731 | "engines": { 732 | "node": ">=0.10" 733 | } 734 | }, 735 | "node_modules/esrecurse": { 736 | "version": "4.3.0", 737 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 738 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 739 | "dev": true, 740 | "dependencies": { 741 | "estraverse": "^5.2.0" 742 | }, 743 | "engines": { 744 | "node": ">=4.0" 745 | } 746 | }, 747 | "node_modules/estraverse": { 748 | "version": "5.3.0", 749 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 750 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 751 | "dev": true, 752 | "engines": { 753 | "node": ">=4.0" 754 | } 755 | }, 756 | "node_modules/esutils": { 757 | "version": "2.0.3", 758 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 759 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 760 | "dev": true, 761 | "engines": { 762 | "node": ">=0.10.0" 763 | } 764 | }, 765 | "node_modules/execa": { 766 | "version": "5.1.1", 767 | "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", 768 | "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", 769 | "dev": true, 770 | "dependencies": { 771 | "cross-spawn": "^7.0.3", 772 | "get-stream": "^6.0.0", 773 | "human-signals": "^2.1.0", 774 | "is-stream": "^2.0.0", 775 | "merge-stream": "^2.0.0", 776 | "npm-run-path": "^4.0.1", 777 | "onetime": "^5.1.2", 778 | "signal-exit": "^3.0.3", 779 | "strip-final-newline": "^2.0.0" 780 | }, 781 | "engines": { 782 | "node": ">=10" 783 | }, 784 | "funding": { 785 | "url": "https://github.com/sindresorhus/execa?sponsor=1" 786 | } 787 | }, 788 | "node_modules/fast-deep-equal": { 789 | "version": "3.1.3", 790 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 791 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 792 | "dev": true 793 | }, 794 | "node_modules/fast-diff": { 795 | "version": "1.2.0", 796 | "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", 797 | "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", 798 | "dev": true 799 | }, 800 | "node_modules/fast-json-stable-stringify": { 801 | "version": "2.1.0", 802 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 803 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 804 | "dev": true 805 | }, 806 | "node_modules/fast-levenshtein": { 807 | "version": "2.0.6", 808 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 809 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", 810 | "dev": true 811 | }, 812 | "node_modules/fastq": { 813 | "version": "1.17.1", 814 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", 815 | "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", 816 | "dev": true, 817 | "dependencies": { 818 | "reusify": "^1.0.4" 819 | } 820 | }, 821 | "node_modules/file-entry-cache": { 822 | "version": "6.0.1", 823 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", 824 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", 825 | "dev": true, 826 | "dependencies": { 827 | "flat-cache": "^3.0.4" 828 | }, 829 | "engines": { 830 | "node": "^10.12.0 || >=12.0.0" 831 | } 832 | }, 833 | "node_modules/fill-range": { 834 | "version": "7.1.1", 835 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 836 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 837 | "dev": true, 838 | "dependencies": { 839 | "to-regex-range": "^5.0.1" 840 | }, 841 | "engines": { 842 | "node": ">=8" 843 | } 844 | }, 845 | "node_modules/find-up": { 846 | "version": "5.0.0", 847 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 848 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 849 | "dev": true, 850 | "dependencies": { 851 | "locate-path": "^6.0.0", 852 | "path-exists": "^4.0.0" 853 | }, 854 | "engines": { 855 | "node": ">=10" 856 | }, 857 | "funding": { 858 | "url": "https://github.com/sponsors/sindresorhus" 859 | } 860 | }, 861 | "node_modules/flat": { 862 | "version": "5.0.2", 863 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 864 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 865 | "dev": true, 866 | "bin": { 867 | "flat": "cli.js" 868 | } 869 | }, 870 | "node_modules/flat-cache": { 871 | "version": "3.0.4", 872 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", 873 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", 874 | "dev": true, 875 | "dependencies": { 876 | "flatted": "^3.1.0", 877 | "rimraf": "^3.0.2" 878 | }, 879 | "engines": { 880 | "node": "^10.12.0 || >=12.0.0" 881 | } 882 | }, 883 | "node_modules/flatted": { 884 | "version": "3.2.5", 885 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", 886 | "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", 887 | "dev": true 888 | }, 889 | "node_modules/fs.realpath": { 890 | "version": "1.0.0", 891 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 892 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 893 | "dev": true 894 | }, 895 | "node_modules/fsevents": { 896 | "version": "2.3.2", 897 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 898 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 899 | "dev": true, 900 | "hasInstallScript": true, 901 | "optional": true, 902 | "os": [ 903 | "darwin" 904 | ], 905 | "engines": { 906 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 907 | } 908 | }, 909 | "node_modules/get-caller-file": { 910 | "version": "2.0.5", 911 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 912 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 913 | "dev": true, 914 | "engines": { 915 | "node": "6.* || 8.* || >= 10.*" 916 | } 917 | }, 918 | "node_modules/get-stream": { 919 | "version": "6.0.1", 920 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", 921 | "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", 922 | "dev": true, 923 | "engines": { 924 | "node": ">=10" 925 | }, 926 | "funding": { 927 | "url": "https://github.com/sponsors/sindresorhus" 928 | } 929 | }, 930 | "node_modules/glob": { 931 | "version": "7.2.3", 932 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 933 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 934 | "dev": true, 935 | "dependencies": { 936 | "fs.realpath": "^1.0.0", 937 | "inflight": "^1.0.4", 938 | "inherits": "2", 939 | "minimatch": "^3.1.1", 940 | "once": "^1.3.0", 941 | "path-is-absolute": "^1.0.0" 942 | }, 943 | "engines": { 944 | "node": "*" 945 | }, 946 | "funding": { 947 | "url": "https://github.com/sponsors/isaacs" 948 | } 949 | }, 950 | "node_modules/glob-parent": { 951 | "version": "6.0.2", 952 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", 953 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", 954 | "dev": true, 955 | "dependencies": { 956 | "is-glob": "^4.0.3" 957 | }, 958 | "engines": { 959 | "node": ">=10.13.0" 960 | } 961 | }, 962 | "node_modules/globals": { 963 | "version": "13.24.0", 964 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", 965 | "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", 966 | "dev": true, 967 | "dependencies": { 968 | "type-fest": "^0.20.2" 969 | }, 970 | "engines": { 971 | "node": ">=8" 972 | }, 973 | "funding": { 974 | "url": "https://github.com/sponsors/sindresorhus" 975 | } 976 | }, 977 | "node_modules/graphemer": { 978 | "version": "1.4.0", 979 | "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", 980 | "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", 981 | "dev": true 982 | }, 983 | "node_modules/he": { 984 | "version": "1.2.0", 985 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 986 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 987 | "dev": true, 988 | "bin": { 989 | "he": "bin/he" 990 | } 991 | }, 992 | "node_modules/human-signals": { 993 | "version": "2.1.0", 994 | "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", 995 | "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", 996 | "dev": true, 997 | "engines": { 998 | "node": ">=10.17.0" 999 | } 1000 | }, 1001 | "node_modules/husky": { 1002 | "version": "9.0.11", 1003 | "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", 1004 | "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", 1005 | "dev": true, 1006 | "bin": { 1007 | "husky": "bin.mjs" 1008 | }, 1009 | "engines": { 1010 | "node": ">=18" 1011 | }, 1012 | "funding": { 1013 | "url": "https://github.com/sponsors/typicode" 1014 | } 1015 | }, 1016 | "node_modules/ignore": { 1017 | "version": "5.3.1", 1018 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", 1019 | "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", 1020 | "dev": true, 1021 | "engines": { 1022 | "node": ">= 4" 1023 | } 1024 | }, 1025 | "node_modules/import-fresh": { 1026 | "version": "3.3.0", 1027 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 1028 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 1029 | "dev": true, 1030 | "dependencies": { 1031 | "parent-module": "^1.0.0", 1032 | "resolve-from": "^4.0.0" 1033 | }, 1034 | "engines": { 1035 | "node": ">=6" 1036 | }, 1037 | "funding": { 1038 | "url": "https://github.com/sponsors/sindresorhus" 1039 | } 1040 | }, 1041 | "node_modules/imurmurhash": { 1042 | "version": "0.1.4", 1043 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1044 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", 1045 | "dev": true, 1046 | "engines": { 1047 | "node": ">=0.8.19" 1048 | } 1049 | }, 1050 | "node_modules/inflight": { 1051 | "version": "1.0.6", 1052 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1053 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1054 | "dev": true, 1055 | "dependencies": { 1056 | "once": "^1.3.0", 1057 | "wrappy": "1" 1058 | } 1059 | }, 1060 | "node_modules/inherits": { 1061 | "version": "2.0.4", 1062 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1063 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1064 | "dev": true 1065 | }, 1066 | "node_modules/is-binary-path": { 1067 | "version": "2.1.0", 1068 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1069 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1070 | "dev": true, 1071 | "dependencies": { 1072 | "binary-extensions": "^2.0.0" 1073 | }, 1074 | "engines": { 1075 | "node": ">=8" 1076 | } 1077 | }, 1078 | "node_modules/is-extglob": { 1079 | "version": "2.1.1", 1080 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1081 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1082 | "dev": true, 1083 | "engines": { 1084 | "node": ">=0.10.0" 1085 | } 1086 | }, 1087 | "node_modules/is-fullwidth-code-point": { 1088 | "version": "3.0.0", 1089 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1090 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1091 | "dev": true, 1092 | "engines": { 1093 | "node": ">=8" 1094 | } 1095 | }, 1096 | "node_modules/is-glob": { 1097 | "version": "4.0.3", 1098 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1099 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1100 | "dev": true, 1101 | "dependencies": { 1102 | "is-extglob": "^2.1.1" 1103 | }, 1104 | "engines": { 1105 | "node": ">=0.10.0" 1106 | } 1107 | }, 1108 | "node_modules/is-number": { 1109 | "version": "7.0.0", 1110 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1111 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1112 | "dev": true, 1113 | "engines": { 1114 | "node": ">=0.12.0" 1115 | } 1116 | }, 1117 | "node_modules/is-path-inside": { 1118 | "version": "3.0.3", 1119 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", 1120 | "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", 1121 | "dev": true, 1122 | "engines": { 1123 | "node": ">=8" 1124 | } 1125 | }, 1126 | "node_modules/is-plain-obj": { 1127 | "version": "2.1.0", 1128 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1129 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1130 | "dev": true, 1131 | "engines": { 1132 | "node": ">=8" 1133 | } 1134 | }, 1135 | "node_modules/is-stream": { 1136 | "version": "2.0.1", 1137 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", 1138 | "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", 1139 | "dev": true, 1140 | "engines": { 1141 | "node": ">=8" 1142 | }, 1143 | "funding": { 1144 | "url": "https://github.com/sponsors/sindresorhus" 1145 | } 1146 | }, 1147 | "node_modules/is-unicode-supported": { 1148 | "version": "0.1.0", 1149 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1150 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1151 | "dev": true, 1152 | "engines": { 1153 | "node": ">=10" 1154 | }, 1155 | "funding": { 1156 | "url": "https://github.com/sponsors/sindresorhus" 1157 | } 1158 | }, 1159 | "node_modules/isexe": { 1160 | "version": "2.0.0", 1161 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1162 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1163 | "dev": true 1164 | }, 1165 | "node_modules/js-yaml": { 1166 | "version": "4.1.0", 1167 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1168 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1169 | "dev": true, 1170 | "dependencies": { 1171 | "argparse": "^2.0.1" 1172 | }, 1173 | "bin": { 1174 | "js-yaml": "bin/js-yaml.js" 1175 | } 1176 | }, 1177 | "node_modules/json-schema-traverse": { 1178 | "version": "0.4.1", 1179 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1180 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1181 | "dev": true 1182 | }, 1183 | "node_modules/json-stable-stringify-without-jsonify": { 1184 | "version": "1.0.1", 1185 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1186 | "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", 1187 | "dev": true 1188 | }, 1189 | "node_modules/just-extend": { 1190 | "version": "6.2.0", 1191 | "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", 1192 | "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", 1193 | "dev": true 1194 | }, 1195 | "node_modules/levn": { 1196 | "version": "0.4.1", 1197 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 1198 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 1199 | "dev": true, 1200 | "dependencies": { 1201 | "prelude-ls": "^1.2.1", 1202 | "type-check": "~0.4.0" 1203 | }, 1204 | "engines": { 1205 | "node": ">= 0.8.0" 1206 | } 1207 | }, 1208 | "node_modules/locate-path": { 1209 | "version": "6.0.0", 1210 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1211 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1212 | "dev": true, 1213 | "dependencies": { 1214 | "p-locate": "^5.0.0" 1215 | }, 1216 | "engines": { 1217 | "node": ">=10" 1218 | }, 1219 | "funding": { 1220 | "url": "https://github.com/sponsors/sindresorhus" 1221 | } 1222 | }, 1223 | "node_modules/lodash.get": { 1224 | "version": "4.4.2", 1225 | "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", 1226 | "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", 1227 | "dev": true 1228 | }, 1229 | "node_modules/lodash.merge": { 1230 | "version": "4.6.2", 1231 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", 1232 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", 1233 | "dev": true 1234 | }, 1235 | "node_modules/log-symbols": { 1236 | "version": "4.1.0", 1237 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1238 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1239 | "dev": true, 1240 | "dependencies": { 1241 | "chalk": "^4.1.0", 1242 | "is-unicode-supported": "^0.1.0" 1243 | }, 1244 | "engines": { 1245 | "node": ">=10" 1246 | }, 1247 | "funding": { 1248 | "url": "https://github.com/sponsors/sindresorhus" 1249 | } 1250 | }, 1251 | "node_modules/log-symbols/node_modules/ansi-styles": { 1252 | "version": "4.3.0", 1253 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1254 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1255 | "dev": true, 1256 | "dependencies": { 1257 | "color-convert": "^2.0.1" 1258 | }, 1259 | "engines": { 1260 | "node": ">=8" 1261 | }, 1262 | "funding": { 1263 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1264 | } 1265 | }, 1266 | "node_modules/log-symbols/node_modules/chalk": { 1267 | "version": "4.1.2", 1268 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1269 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1270 | "dev": true, 1271 | "dependencies": { 1272 | "ansi-styles": "^4.1.0", 1273 | "supports-color": "^7.1.0" 1274 | }, 1275 | "engines": { 1276 | "node": ">=10" 1277 | }, 1278 | "funding": { 1279 | "url": "https://github.com/chalk/chalk?sponsor=1" 1280 | } 1281 | }, 1282 | "node_modules/log-symbols/node_modules/color-convert": { 1283 | "version": "2.0.1", 1284 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1285 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1286 | "dev": true, 1287 | "dependencies": { 1288 | "color-name": "~1.1.4" 1289 | }, 1290 | "engines": { 1291 | "node": ">=7.0.0" 1292 | } 1293 | }, 1294 | "node_modules/log-symbols/node_modules/color-name": { 1295 | "version": "1.1.4", 1296 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1297 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1298 | "dev": true 1299 | }, 1300 | "node_modules/log-symbols/node_modules/has-flag": { 1301 | "version": "4.0.0", 1302 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1303 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1304 | "dev": true, 1305 | "engines": { 1306 | "node": ">=8" 1307 | } 1308 | }, 1309 | "node_modules/log-symbols/node_modules/supports-color": { 1310 | "version": "7.2.0", 1311 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1312 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1313 | "dev": true, 1314 | "dependencies": { 1315 | "has-flag": "^4.0.0" 1316 | }, 1317 | "engines": { 1318 | "node": ">=8" 1319 | } 1320 | }, 1321 | "node_modules/merge-stream": { 1322 | "version": "2.0.0", 1323 | "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", 1324 | "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", 1325 | "dev": true 1326 | }, 1327 | "node_modules/mimic-fn": { 1328 | "version": "2.1.0", 1329 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 1330 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 1331 | "dev": true, 1332 | "engines": { 1333 | "node": ">=6" 1334 | } 1335 | }, 1336 | "node_modules/minimatch": { 1337 | "version": "3.1.2", 1338 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1339 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1340 | "dev": true, 1341 | "dependencies": { 1342 | "brace-expansion": "^1.1.7" 1343 | }, 1344 | "engines": { 1345 | "node": "*" 1346 | } 1347 | }, 1348 | "node_modules/mocha": { 1349 | "version": "10.8.2", 1350 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", 1351 | "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", 1352 | "dev": true, 1353 | "license": "MIT", 1354 | "dependencies": { 1355 | "ansi-colors": "^4.1.3", 1356 | "browser-stdout": "^1.3.1", 1357 | "chokidar": "^3.5.3", 1358 | "debug": "^4.3.5", 1359 | "diff": "^5.2.0", 1360 | "escape-string-regexp": "^4.0.0", 1361 | "find-up": "^5.0.0", 1362 | "glob": "^8.1.0", 1363 | "he": "^1.2.0", 1364 | "js-yaml": "^4.1.0", 1365 | "log-symbols": "^4.1.0", 1366 | "minimatch": "^5.1.6", 1367 | "ms": "^2.1.3", 1368 | "serialize-javascript": "^6.0.2", 1369 | "strip-json-comments": "^3.1.1", 1370 | "supports-color": "^8.1.1", 1371 | "workerpool": "^6.5.1", 1372 | "yargs": "^16.2.0", 1373 | "yargs-parser": "^20.2.9", 1374 | "yargs-unparser": "^2.0.0" 1375 | }, 1376 | "bin": { 1377 | "_mocha": "bin/_mocha", 1378 | "mocha": "bin/mocha.js" 1379 | }, 1380 | "engines": { 1381 | "node": ">= 14.0.0" 1382 | } 1383 | }, 1384 | "node_modules/mocha/node_modules/escape-string-regexp": { 1385 | "version": "4.0.0", 1386 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1387 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1388 | "dev": true, 1389 | "engines": { 1390 | "node": ">=10" 1391 | }, 1392 | "funding": { 1393 | "url": "https://github.com/sponsors/sindresorhus" 1394 | } 1395 | }, 1396 | "node_modules/mocha/node_modules/glob": { 1397 | "version": "8.1.0", 1398 | "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", 1399 | "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", 1400 | "dev": true, 1401 | "dependencies": { 1402 | "fs.realpath": "^1.0.0", 1403 | "inflight": "^1.0.4", 1404 | "inherits": "2", 1405 | "minimatch": "^5.0.1", 1406 | "once": "^1.3.0" 1407 | }, 1408 | "engines": { 1409 | "node": ">=12" 1410 | }, 1411 | "funding": { 1412 | "url": "https://github.com/sponsors/isaacs" 1413 | } 1414 | }, 1415 | "node_modules/mocha/node_modules/has-flag": { 1416 | "version": "4.0.0", 1417 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1418 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1419 | "dev": true, 1420 | "engines": { 1421 | "node": ">=8" 1422 | } 1423 | }, 1424 | "node_modules/mocha/node_modules/minimatch": { 1425 | "version": "5.1.6", 1426 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 1427 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 1428 | "dev": true, 1429 | "license": "ISC", 1430 | "dependencies": { 1431 | "brace-expansion": "^2.0.1" 1432 | }, 1433 | "engines": { 1434 | "node": ">=10" 1435 | } 1436 | }, 1437 | "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { 1438 | "version": "2.0.1", 1439 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1440 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1441 | "dev": true, 1442 | "dependencies": { 1443 | "balanced-match": "^1.0.0" 1444 | } 1445 | }, 1446 | "node_modules/mocha/node_modules/supports-color": { 1447 | "version": "8.1.1", 1448 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1449 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1450 | "dev": true, 1451 | "dependencies": { 1452 | "has-flag": "^4.0.0" 1453 | }, 1454 | "engines": { 1455 | "node": ">=10" 1456 | }, 1457 | "funding": { 1458 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1459 | } 1460 | }, 1461 | "node_modules/mri": { 1462 | "version": "1.2.0", 1463 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", 1464 | "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", 1465 | "dev": true, 1466 | "engines": { 1467 | "node": ">=4" 1468 | } 1469 | }, 1470 | "node_modules/ms": { 1471 | "version": "2.1.3", 1472 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1473 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1474 | "dev": true, 1475 | "license": "MIT" 1476 | }, 1477 | "node_modules/natural-compare": { 1478 | "version": "1.4.0", 1479 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 1480 | "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", 1481 | "dev": true 1482 | }, 1483 | "node_modules/nise": { 1484 | "version": "5.1.9", 1485 | "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz", 1486 | "integrity": "sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==", 1487 | "dev": true, 1488 | "dependencies": { 1489 | "@sinonjs/commons": "^3.0.0", 1490 | "@sinonjs/fake-timers": "^11.2.2", 1491 | "@sinonjs/text-encoding": "^0.7.2", 1492 | "just-extend": "^6.2.0", 1493 | "path-to-regexp": "^6.2.1" 1494 | } 1495 | }, 1496 | "node_modules/normalize-path": { 1497 | "version": "3.0.0", 1498 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1499 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1500 | "dev": true, 1501 | "engines": { 1502 | "node": ">=0.10.0" 1503 | } 1504 | }, 1505 | "node_modules/npm-run-path": { 1506 | "version": "4.0.1", 1507 | "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", 1508 | "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", 1509 | "dev": true, 1510 | "dependencies": { 1511 | "path-key": "^3.0.0" 1512 | }, 1513 | "engines": { 1514 | "node": ">=8" 1515 | } 1516 | }, 1517 | "node_modules/once": { 1518 | "version": "1.4.0", 1519 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1520 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1521 | "dev": true, 1522 | "dependencies": { 1523 | "wrappy": "1" 1524 | } 1525 | }, 1526 | "node_modules/onetime": { 1527 | "version": "5.1.2", 1528 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", 1529 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", 1530 | "dev": true, 1531 | "dependencies": { 1532 | "mimic-fn": "^2.1.0" 1533 | }, 1534 | "engines": { 1535 | "node": ">=6" 1536 | }, 1537 | "funding": { 1538 | "url": "https://github.com/sponsors/sindresorhus" 1539 | } 1540 | }, 1541 | "node_modules/optionator": { 1542 | "version": "0.9.3", 1543 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", 1544 | "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", 1545 | "dev": true, 1546 | "dependencies": { 1547 | "@aashutoshrathi/word-wrap": "^1.2.3", 1548 | "deep-is": "^0.1.3", 1549 | "fast-levenshtein": "^2.0.6", 1550 | "levn": "^0.4.1", 1551 | "prelude-ls": "^1.2.1", 1552 | "type-check": "^0.4.0" 1553 | }, 1554 | "engines": { 1555 | "node": ">= 0.8.0" 1556 | } 1557 | }, 1558 | "node_modules/p-limit": { 1559 | "version": "3.1.0", 1560 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1561 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1562 | "dev": true, 1563 | "dependencies": { 1564 | "yocto-queue": "^0.1.0" 1565 | }, 1566 | "engines": { 1567 | "node": ">=10" 1568 | }, 1569 | "funding": { 1570 | "url": "https://github.com/sponsors/sindresorhus" 1571 | } 1572 | }, 1573 | "node_modules/p-locate": { 1574 | "version": "5.0.0", 1575 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1576 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1577 | "dev": true, 1578 | "dependencies": { 1579 | "p-limit": "^3.0.2" 1580 | }, 1581 | "engines": { 1582 | "node": ">=10" 1583 | }, 1584 | "funding": { 1585 | "url": "https://github.com/sponsors/sindresorhus" 1586 | } 1587 | }, 1588 | "node_modules/parent-module": { 1589 | "version": "1.0.1", 1590 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1591 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1592 | "dev": true, 1593 | "dependencies": { 1594 | "callsites": "^3.0.0" 1595 | }, 1596 | "engines": { 1597 | "node": ">=6" 1598 | } 1599 | }, 1600 | "node_modules/path-exists": { 1601 | "version": "4.0.0", 1602 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1603 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1604 | "dev": true, 1605 | "engines": { 1606 | "node": ">=8" 1607 | } 1608 | }, 1609 | "node_modules/path-is-absolute": { 1610 | "version": "1.0.1", 1611 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1612 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1613 | "dev": true, 1614 | "engines": { 1615 | "node": ">=0.10.0" 1616 | } 1617 | }, 1618 | "node_modules/path-key": { 1619 | "version": "3.1.1", 1620 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1621 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1622 | "dev": true, 1623 | "engines": { 1624 | "node": ">=8" 1625 | } 1626 | }, 1627 | "node_modules/path-to-regexp": { 1628 | "version": "6.2.1", 1629 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", 1630 | "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", 1631 | "dev": true 1632 | }, 1633 | "node_modules/picocolors": { 1634 | "version": "1.0.0", 1635 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", 1636 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", 1637 | "dev": true 1638 | }, 1639 | "node_modules/picomatch": { 1640 | "version": "2.3.1", 1641 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1642 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1643 | "dev": true, 1644 | "engines": { 1645 | "node": ">=8.6" 1646 | }, 1647 | "funding": { 1648 | "url": "https://github.com/sponsors/jonschlinkert" 1649 | } 1650 | }, 1651 | "node_modules/prelude-ls": { 1652 | "version": "1.2.1", 1653 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 1654 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 1655 | "dev": true, 1656 | "engines": { 1657 | "node": ">= 0.8.0" 1658 | } 1659 | }, 1660 | "node_modules/prettier": { 1661 | "version": "3.2.5", 1662 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", 1663 | "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", 1664 | "dev": true, 1665 | "bin": { 1666 | "prettier": "bin/prettier.cjs" 1667 | }, 1668 | "engines": { 1669 | "node": ">=14" 1670 | }, 1671 | "funding": { 1672 | "url": "https://github.com/prettier/prettier?sponsor=1" 1673 | } 1674 | }, 1675 | "node_modules/prettier-linter-helpers": { 1676 | "version": "1.0.0", 1677 | "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", 1678 | "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", 1679 | "dev": true, 1680 | "dependencies": { 1681 | "fast-diff": "^1.1.2" 1682 | }, 1683 | "engines": { 1684 | "node": ">=6.0.0" 1685 | } 1686 | }, 1687 | "node_modules/pretty-quick": { 1688 | "version": "4.0.0", 1689 | "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.0.0.tgz", 1690 | "integrity": "sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==", 1691 | "dev": true, 1692 | "dependencies": { 1693 | "execa": "^5.1.1", 1694 | "find-up": "^5.0.0", 1695 | "ignore": "^5.3.0", 1696 | "mri": "^1.2.0", 1697 | "picocolors": "^1.0.0", 1698 | "picomatch": "^3.0.1", 1699 | "tslib": "^2.6.2" 1700 | }, 1701 | "bin": { 1702 | "pretty-quick": "lib/cli.mjs" 1703 | }, 1704 | "engines": { 1705 | "node": ">=14" 1706 | }, 1707 | "peerDependencies": { 1708 | "prettier": "^3.0.0" 1709 | } 1710 | }, 1711 | "node_modules/pretty-quick/node_modules/picomatch": { 1712 | "version": "3.0.1", 1713 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", 1714 | "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", 1715 | "dev": true, 1716 | "engines": { 1717 | "node": ">=10" 1718 | }, 1719 | "funding": { 1720 | "url": "https://github.com/sponsors/jonschlinkert" 1721 | } 1722 | }, 1723 | "node_modules/punycode": { 1724 | "version": "2.3.1", 1725 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 1726 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 1727 | "dev": true, 1728 | "engines": { 1729 | "node": ">=6" 1730 | } 1731 | }, 1732 | "node_modules/queue-microtask": { 1733 | "version": "1.2.3", 1734 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 1735 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 1736 | "dev": true, 1737 | "funding": [ 1738 | { 1739 | "type": "github", 1740 | "url": "https://github.com/sponsors/feross" 1741 | }, 1742 | { 1743 | "type": "patreon", 1744 | "url": "https://www.patreon.com/feross" 1745 | }, 1746 | { 1747 | "type": "consulting", 1748 | "url": "https://feross.org/support" 1749 | } 1750 | ] 1751 | }, 1752 | "node_modules/randombytes": { 1753 | "version": "2.1.0", 1754 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1755 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1756 | "dev": true, 1757 | "license": "MIT", 1758 | "dependencies": { 1759 | "safe-buffer": "^5.1.0" 1760 | } 1761 | }, 1762 | "node_modules/readdirp": { 1763 | "version": "3.6.0", 1764 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1765 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1766 | "dev": true, 1767 | "dependencies": { 1768 | "picomatch": "^2.2.1" 1769 | }, 1770 | "engines": { 1771 | "node": ">=8.10.0" 1772 | } 1773 | }, 1774 | "node_modules/require-directory": { 1775 | "version": "2.1.1", 1776 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1777 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1778 | "dev": true, 1779 | "engines": { 1780 | "node": ">=0.10.0" 1781 | } 1782 | }, 1783 | "node_modules/resolve-from": { 1784 | "version": "4.0.0", 1785 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1786 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1787 | "dev": true, 1788 | "engines": { 1789 | "node": ">=4" 1790 | } 1791 | }, 1792 | "node_modules/reusify": { 1793 | "version": "1.0.4", 1794 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1795 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1796 | "dev": true, 1797 | "engines": { 1798 | "iojs": ">=1.0.0", 1799 | "node": ">=0.10.0" 1800 | } 1801 | }, 1802 | "node_modules/rimraf": { 1803 | "version": "3.0.2", 1804 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1805 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1806 | "dev": true, 1807 | "dependencies": { 1808 | "glob": "^7.1.3" 1809 | }, 1810 | "bin": { 1811 | "rimraf": "bin.js" 1812 | }, 1813 | "funding": { 1814 | "url": "https://github.com/sponsors/isaacs" 1815 | } 1816 | }, 1817 | "node_modules/run-parallel": { 1818 | "version": "1.2.0", 1819 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1820 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1821 | "dev": true, 1822 | "funding": [ 1823 | { 1824 | "type": "github", 1825 | "url": "https://github.com/sponsors/feross" 1826 | }, 1827 | { 1828 | "type": "patreon", 1829 | "url": "https://www.patreon.com/feross" 1830 | }, 1831 | { 1832 | "type": "consulting", 1833 | "url": "https://feross.org/support" 1834 | } 1835 | ], 1836 | "dependencies": { 1837 | "queue-microtask": "^1.2.2" 1838 | } 1839 | }, 1840 | "node_modules/safe-buffer": { 1841 | "version": "5.2.1", 1842 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1843 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1844 | "dev": true, 1845 | "funding": [ 1846 | { 1847 | "type": "github", 1848 | "url": "https://github.com/sponsors/feross" 1849 | }, 1850 | { 1851 | "type": "patreon", 1852 | "url": "https://www.patreon.com/feross" 1853 | }, 1854 | { 1855 | "type": "consulting", 1856 | "url": "https://feross.org/support" 1857 | } 1858 | ], 1859 | "license": "MIT" 1860 | }, 1861 | "node_modules/serialize-javascript": { 1862 | "version": "6.0.2", 1863 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 1864 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 1865 | "dev": true, 1866 | "license": "BSD-3-Clause", 1867 | "dependencies": { 1868 | "randombytes": "^2.1.0" 1869 | } 1870 | }, 1871 | "node_modules/shebang-command": { 1872 | "version": "2.0.0", 1873 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1874 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1875 | "dev": true, 1876 | "dependencies": { 1877 | "shebang-regex": "^3.0.0" 1878 | }, 1879 | "engines": { 1880 | "node": ">=8" 1881 | } 1882 | }, 1883 | "node_modules/shebang-regex": { 1884 | "version": "3.0.0", 1885 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1886 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1887 | "dev": true, 1888 | "engines": { 1889 | "node": ">=8" 1890 | } 1891 | }, 1892 | "node_modules/signal-exit": { 1893 | "version": "3.0.7", 1894 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 1895 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", 1896 | "dev": true 1897 | }, 1898 | "node_modules/sinon": { 1899 | "version": "17.0.1", 1900 | "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", 1901 | "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", 1902 | "dev": true, 1903 | "dependencies": { 1904 | "@sinonjs/commons": "^3.0.0", 1905 | "@sinonjs/fake-timers": "^11.2.2", 1906 | "@sinonjs/samsam": "^8.0.0", 1907 | "diff": "^5.1.0", 1908 | "nise": "^5.1.5", 1909 | "supports-color": "^7.2.0" 1910 | }, 1911 | "funding": { 1912 | "type": "opencollective", 1913 | "url": "https://opencollective.com/sinon" 1914 | } 1915 | }, 1916 | "node_modules/sinon/node_modules/has-flag": { 1917 | "version": "4.0.0", 1918 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1919 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1920 | "dev": true, 1921 | "engines": { 1922 | "node": ">=8" 1923 | } 1924 | }, 1925 | "node_modules/sinon/node_modules/supports-color": { 1926 | "version": "7.2.0", 1927 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1928 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1929 | "dev": true, 1930 | "dependencies": { 1931 | "has-flag": "^4.0.0" 1932 | }, 1933 | "engines": { 1934 | "node": ">=8" 1935 | } 1936 | }, 1937 | "node_modules/string-width": { 1938 | "version": "4.2.3", 1939 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1940 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1941 | "dev": true, 1942 | "dependencies": { 1943 | "emoji-regex": "^8.0.0", 1944 | "is-fullwidth-code-point": "^3.0.0", 1945 | "strip-ansi": "^6.0.1" 1946 | }, 1947 | "engines": { 1948 | "node": ">=8" 1949 | } 1950 | }, 1951 | "node_modules/strip-ansi": { 1952 | "version": "6.0.1", 1953 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1954 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1955 | "dev": true, 1956 | "dependencies": { 1957 | "ansi-regex": "^5.0.1" 1958 | }, 1959 | "engines": { 1960 | "node": ">=8" 1961 | } 1962 | }, 1963 | "node_modules/strip-final-newline": { 1964 | "version": "2.0.0", 1965 | "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", 1966 | "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", 1967 | "dev": true, 1968 | "engines": { 1969 | "node": ">=6" 1970 | } 1971 | }, 1972 | "node_modules/strip-json-comments": { 1973 | "version": "3.1.1", 1974 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1975 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1976 | "dev": true, 1977 | "engines": { 1978 | "node": ">=8" 1979 | }, 1980 | "funding": { 1981 | "url": "https://github.com/sponsors/sindresorhus" 1982 | } 1983 | }, 1984 | "node_modules/synckit": { 1985 | "version": "0.8.8", 1986 | "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", 1987 | "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", 1988 | "dev": true, 1989 | "dependencies": { 1990 | "@pkgr/core": "^0.1.0", 1991 | "tslib": "^2.6.2" 1992 | }, 1993 | "engines": { 1994 | "node": "^14.18.0 || >=16.0.0" 1995 | }, 1996 | "funding": { 1997 | "url": "https://opencollective.com/unts" 1998 | } 1999 | }, 2000 | "node_modules/text-table": { 2001 | "version": "0.2.0", 2002 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2003 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2004 | "dev": true 2005 | }, 2006 | "node_modules/to-regex-range": { 2007 | "version": "5.0.1", 2008 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2009 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2010 | "dev": true, 2011 | "dependencies": { 2012 | "is-number": "^7.0.0" 2013 | }, 2014 | "engines": { 2015 | "node": ">=8.0" 2016 | } 2017 | }, 2018 | "node_modules/tslib": { 2019 | "version": "2.6.2", 2020 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 2021 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", 2022 | "dev": true 2023 | }, 2024 | "node_modules/type-check": { 2025 | "version": "0.4.0", 2026 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 2027 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 2028 | "dev": true, 2029 | "dependencies": { 2030 | "prelude-ls": "^1.2.1" 2031 | }, 2032 | "engines": { 2033 | "node": ">= 0.8.0" 2034 | } 2035 | }, 2036 | "node_modules/type-detect": { 2037 | "version": "4.0.8", 2038 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 2039 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 2040 | "dev": true, 2041 | "engines": { 2042 | "node": ">=4" 2043 | } 2044 | }, 2045 | "node_modules/type-fest": { 2046 | "version": "0.20.2", 2047 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", 2048 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", 2049 | "dev": true, 2050 | "engines": { 2051 | "node": ">=10" 2052 | }, 2053 | "funding": { 2054 | "url": "https://github.com/sponsors/sindresorhus" 2055 | } 2056 | }, 2057 | "node_modules/uri-js": { 2058 | "version": "4.4.1", 2059 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 2060 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 2061 | "dev": true, 2062 | "dependencies": { 2063 | "punycode": "^2.1.0" 2064 | } 2065 | }, 2066 | "node_modules/which": { 2067 | "version": "2.0.2", 2068 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2069 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2070 | "dev": true, 2071 | "dependencies": { 2072 | "isexe": "^2.0.0" 2073 | }, 2074 | "bin": { 2075 | "node-which": "bin/node-which" 2076 | }, 2077 | "engines": { 2078 | "node": ">= 8" 2079 | } 2080 | }, 2081 | "node_modules/workerpool": { 2082 | "version": "6.5.1", 2083 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 2084 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 2085 | "dev": true, 2086 | "license": "Apache-2.0" 2087 | }, 2088 | "node_modules/wrap-ansi": { 2089 | "version": "7.0.0", 2090 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2091 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2092 | "dev": true, 2093 | "dependencies": { 2094 | "ansi-styles": "^4.0.0", 2095 | "string-width": "^4.1.0", 2096 | "strip-ansi": "^6.0.0" 2097 | }, 2098 | "engines": { 2099 | "node": ">=10" 2100 | }, 2101 | "funding": { 2102 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 2103 | } 2104 | }, 2105 | "node_modules/wrap-ansi/node_modules/ansi-styles": { 2106 | "version": "4.3.0", 2107 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 2108 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 2109 | "dev": true, 2110 | "dependencies": { 2111 | "color-convert": "^2.0.1" 2112 | }, 2113 | "engines": { 2114 | "node": ">=8" 2115 | }, 2116 | "funding": { 2117 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 2118 | } 2119 | }, 2120 | "node_modules/wrap-ansi/node_modules/color-convert": { 2121 | "version": "2.0.1", 2122 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 2123 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 2124 | "dev": true, 2125 | "dependencies": { 2126 | "color-name": "~1.1.4" 2127 | }, 2128 | "engines": { 2129 | "node": ">=7.0.0" 2130 | } 2131 | }, 2132 | "node_modules/wrap-ansi/node_modules/color-name": { 2133 | "version": "1.1.4", 2134 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 2135 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 2136 | "dev": true 2137 | }, 2138 | "node_modules/wrappy": { 2139 | "version": "1.0.2", 2140 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2141 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2142 | "dev": true 2143 | }, 2144 | "node_modules/y18n": { 2145 | "version": "5.0.8", 2146 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 2147 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 2148 | "dev": true, 2149 | "engines": { 2150 | "node": ">=10" 2151 | } 2152 | }, 2153 | "node_modules/yargs": { 2154 | "version": "16.2.0", 2155 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 2156 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 2157 | "dev": true, 2158 | "dependencies": { 2159 | "cliui": "^7.0.2", 2160 | "escalade": "^3.1.1", 2161 | "get-caller-file": "^2.0.5", 2162 | "require-directory": "^2.1.1", 2163 | "string-width": "^4.2.0", 2164 | "y18n": "^5.0.5", 2165 | "yargs-parser": "^20.2.2" 2166 | }, 2167 | "engines": { 2168 | "node": ">=10" 2169 | } 2170 | }, 2171 | "node_modules/yargs-parser": { 2172 | "version": "20.2.9", 2173 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 2174 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 2175 | "dev": true, 2176 | "license": "ISC", 2177 | "engines": { 2178 | "node": ">=10" 2179 | } 2180 | }, 2181 | "node_modules/yargs-unparser": { 2182 | "version": "2.0.0", 2183 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 2184 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 2185 | "dev": true, 2186 | "dependencies": { 2187 | "camelcase": "^6.0.0", 2188 | "decamelize": "^4.0.0", 2189 | "flat": "^5.0.2", 2190 | "is-plain-obj": "^2.1.0" 2191 | }, 2192 | "engines": { 2193 | "node": ">=10" 2194 | } 2195 | }, 2196 | "node_modules/yocto-queue": { 2197 | "version": "0.1.0", 2198 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2199 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2200 | "dev": true, 2201 | "engines": { 2202 | "node": ">=10" 2203 | }, 2204 | "funding": { 2205 | "url": "https://github.com/sponsors/sindresorhus" 2206 | } 2207 | } 2208 | } 2209 | } 2210 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "set-cookie-parser", 3 | "version": "2.7.1", 4 | "description": "Parses set-cookie headers into objects", 5 | "homepage": "https://github.com/nfriedly/set-cookie-parser", 6 | "repository": "nfriedly/set-cookie-parser", 7 | "author": { 8 | "name": "Nathan Friedly", 9 | "url": "http://nfriedly.com/" 10 | }, 11 | "files": [ 12 | "lib" 13 | ], 14 | "main": "./lib/set-cookie.js", 15 | "sideEffects": false, 16 | "keywords": [ 17 | "set-cookie", 18 | "set", 19 | "cookie", 20 | "cookies", 21 | "header", 22 | "parse", 23 | "parser" 24 | ], 25 | "devDependencies": { 26 | "eslint": "^8.57.0", 27 | "eslint-config-prettier": "^9.1.0", 28 | "eslint-plugin-prettier": "^5.1.3", 29 | "husky": "^9.0.11", 30 | "mocha": "^10.3.0", 31 | "prettier": "^3.2.5", 32 | "pretty-quick": "^4.0.0", 33 | "sinon": "^17.0.1" 34 | }, 35 | "scripts": { 36 | "lint": "eslint . --ignore-pattern '!.eslintrc.js'", 37 | "test": "npm run lint && mocha", 38 | "autofix": "npm run lint -- --fix", 39 | "precommit": "npm test" 40 | }, 41 | "license": "MIT", 42 | "prettier": { 43 | "trailingComma": "es5" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /test/.eslintrc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = { 3 | parserOptions: { ecmaVersion: 6 }, 4 | env: { 5 | mocha: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /test/fetch.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var assert = require("assert"); 3 | var setCookie = require("../lib/set-cookie.js"); 4 | 5 | describe("fetch", () => { 6 | before(() => { 7 | // conditionall skip these tests if the environment doesn't support the necessary features 8 | if ( 9 | typeof fetch !== "undefined" && 10 | typeof Response !== "undefined" && 11 | typeof new Response().headers.getSetCookie !== "function" 12 | ) { 13 | this.skip(); 14 | } 15 | }); 16 | 17 | it("should use getSetCookie method on a Response object", () => { 18 | const fakeResponse = { 19 | headers: { 20 | getSetCookie: () => ["foo=bar"], 21 | }, 22 | }; 23 | 24 | var actual = setCookie.parse(fakeResponse); 25 | var expected = [{ name: "foo", value: "bar" }]; 26 | assert.deepEqual(actual, expected); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /test/set-cookie-parser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var assert = require("assert"); 3 | var setCookie = require("../lib/set-cookie.js"); 4 | 5 | describe("set-cookie-parser", function () { 6 | it("should parse a simple set-cookie header", function () { 7 | var actual = setCookie.parse("foo=bar;"); 8 | var expected = [{ name: "foo", value: "bar" }]; 9 | assert.deepEqual(actual, expected); 10 | }); 11 | 12 | it("should return empty array on falsy input", function () { 13 | var cookieStr = ""; 14 | var actual = setCookie.parse(cookieStr); 15 | var expected = []; 16 | assert.deepEqual(actual, expected); 17 | 18 | cookieStr = null; 19 | actual = setCookie.parse(cookieStr); 20 | expected = []; 21 | assert.deepEqual(actual, expected); 22 | 23 | cookieStr = undefined; 24 | actual = setCookie.parse(cookieStr); 25 | expected = []; 26 | assert.deepEqual(actual, expected); 27 | }); 28 | 29 | it("should parse a complex set-cookie header", function () { 30 | var cookieStr = 31 | "foo=bar; Max-Age=1000; Domain=.example.com; Path=/; Expires=Tue, 01 Jul 2025 10:01:11 GMT; HttpOnly; Secure; Partitioned"; 32 | var actual = setCookie.parse(cookieStr); 33 | var expected = [ 34 | { 35 | name: "foo", 36 | value: "bar", 37 | path: "/", 38 | expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"), 39 | maxAge: 1000, 40 | domain: ".example.com", 41 | secure: true, 42 | httpOnly: true, 43 | partitioned: true, 44 | }, 45 | ]; 46 | assert.deepEqual(actual, expected); 47 | }); 48 | 49 | it("should parse a weird but valid cookie", function () { 50 | var cookieStr = 51 | "foo=bar=bar&foo=foo&John=Doe&Doe=John; Max-Age=1000; Domain=.example.com; Path=/; HttpOnly; Secure"; 52 | var actual = setCookie.parse(cookieStr); 53 | var expected = [ 54 | { 55 | name: "foo", 56 | value: "bar=bar&foo=foo&John=Doe&Doe=John", 57 | path: "/", 58 | maxAge: 1000, 59 | domain: ".example.com", 60 | secure: true, 61 | httpOnly: true, 62 | }, 63 | ]; 64 | assert.deepEqual(actual, expected); 65 | }); 66 | 67 | it("should parse a cookie with percent-encoding in the data", function () { 68 | var cookieStr = "foo=asdf%3Basdf%3Dtrue%3Basdf%3Dasdf%3Basdf%3Dtrue%40asdf"; 69 | var actual = setCookie.parse(cookieStr); 70 | var expected = [ 71 | { name: "foo", value: "asdf;asdf=true;asdf=asdf;asdf=true@asdf" }, 72 | ]; 73 | assert.deepEqual(actual, expected); 74 | 75 | actual = setCookie.parse(cookieStr, { decodeValues: false }); 76 | expected = [ 77 | { 78 | name: "foo", 79 | value: "asdf%3Basdf%3Dtrue%3Basdf%3Dasdf%3Basdf%3Dtrue%40asdf", 80 | }, 81 | ]; 82 | assert.deepEqual(actual, expected); 83 | 84 | actual = setCookie.parse(cookieStr, { decodeValues: true }); 85 | expected = [ 86 | { name: "foo", value: "asdf;asdf=true;asdf=asdf;asdf=true@asdf" }, 87 | ]; 88 | assert.deepEqual(actual, expected); 89 | }); 90 | 91 | it("should handle the case when value is not UTF-8 encoded", function () { 92 | var cookieStr = 93 | "foo=R%F3r%EB%80%8DP%FF%3B%2C%23%9A%0CU%8E%A2C8%D7%3C%3C%B0%DF%17%60%F7Y%DB%16%8BQ%D6%1A"; 94 | var actual = setCookie.parse(cookieStr, { decodeValues: true }); 95 | var expected = [ 96 | { 97 | name: "foo", 98 | value: 99 | "R%F3r%EB%80%8DP%FF%3B%2C%23%9A%0CU%8E%A2C8%D7%3C%3C%B0%DF%17%60%F7Y%DB%16%8BQ%D6%1A", 100 | }, 101 | ]; 102 | assert.deepEqual(actual, expected); 103 | }); 104 | 105 | it("should work on an array of headers", function () { 106 | var cookieStrs = [ 107 | "bam=baz", 108 | "foo=bar; Max-Age=1000; Domain=.example.com; Path=/; Expires=Tue, 01 Jul 2025 10:01:11 GMT; HttpOnly; Secure", 109 | ]; 110 | var actual = setCookie.parse(cookieStrs); 111 | var expected = [ 112 | { name: "bam", value: "baz" }, 113 | { 114 | name: "foo", 115 | value: "bar", 116 | path: "/", 117 | expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"), 118 | maxAge: 1000, 119 | domain: ".example.com", 120 | secure: true, 121 | httpOnly: true, 122 | }, 123 | ]; 124 | assert.deepEqual(actual, expected); 125 | }); 126 | 127 | it("should work on response objects", function () { 128 | var mockResponse = { 129 | headers: { 130 | "set-cookie": [ 131 | "bam=baz", 132 | "foo=bar; Max-Age=1000; Domain=.example.com; Path=/; Expires=Tue, 01 Jul 2025 10:01:11 GMT; HttpOnly; Secure; SameSite=strict", 133 | ], 134 | }, 135 | }; 136 | var actual = setCookie.parse(mockResponse); 137 | var expected = [ 138 | { name: "bam", value: "baz" }, 139 | { 140 | name: "foo", 141 | value: "bar", 142 | path: "/", 143 | expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"), 144 | maxAge: 1000, 145 | domain: ".example.com", 146 | secure: true, 147 | httpOnly: true, 148 | sameSite: "strict", 149 | }, 150 | ]; 151 | assert.deepEqual(actual, expected); 152 | }); 153 | 154 | it("should work with strangely capitalized set-cookie key", function () { 155 | var mockResponse = { 156 | headers: { 157 | "sEt-CookIe": [ 158 | "bam=baz", 159 | "foo=bar; Max-Age=1000; Domain=.example.com; Path=/; Expires=Tue, 01 Jul 2025 10:01:11 GMT; HttpOnly; Secure; SameSite=strict", 160 | ], 161 | }, 162 | }; 163 | var actual = setCookie.parse(mockResponse); 164 | var expected = [ 165 | { name: "bam", value: "baz" }, 166 | { 167 | name: "foo", 168 | value: "bar", 169 | path: "/", 170 | expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"), 171 | maxAge: 1000, 172 | domain: ".example.com", 173 | secure: true, 174 | httpOnly: true, 175 | sameSite: "strict", 176 | }, 177 | ]; 178 | assert.deepEqual(actual, expected); 179 | }); 180 | 181 | it("should work on response objects that don't have any set-cookie headers", function () { 182 | var mockResponse = { 183 | headers: {}, 184 | }; 185 | var actual = setCookie.parse(mockResponse); 186 | var expected = []; 187 | assert.deepEqual(actual, expected); 188 | }); 189 | 190 | it("should return object of cookies when result option is set to map", function () { 191 | var cookieStr = 192 | "foo=bar; Max-Age=1000; Domain=.example.com; Path=/; Expires=Tue, 01 Jul 2025 10:01:11 GMT; HttpOnly; Secure"; 193 | var actual = setCookie.parse(cookieStr, { map: true }); 194 | var expected = { 195 | foo: { 196 | name: "foo", 197 | value: "bar", 198 | path: "/", 199 | expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"), 200 | maxAge: 1000, 201 | domain: ".example.com", 202 | secure: true, 203 | httpOnly: true, 204 | }, 205 | }; 206 | assert.deepEqual(actual, expected); 207 | }); 208 | 209 | it("should return empty object on falsy input when result options is set to map", function () { 210 | var cookieStr = ""; 211 | var actual = setCookie.parse(cookieStr, { map: true }); 212 | var expected = {}; 213 | assert.deepEqual(actual, expected); 214 | 215 | cookieStr = null; 216 | actual = setCookie.parse(cookieStr, { map: true }); 217 | expected = {}; 218 | assert.deepEqual(actual, expected); 219 | 220 | cookieStr = undefined; 221 | actual = setCookie.parse(cookieStr, { map: true }); 222 | expected = {}; 223 | assert.deepEqual(actual, expected); 224 | }); 225 | 226 | it("should have empty name string, and value is the name-value-pair if the name-value-pair string lacks a = character", function () { 227 | var actual = setCookie.parse("foo;"); 228 | var expected = [{ name: "", value: "foo" }]; 229 | 230 | assert.deepEqual(actual, expected); 231 | 232 | actual = setCookie.parse("foo;SameSite=None;Secure"); 233 | expected = [{ name: "", value: "foo", sameSite: "None", secure: true }]; 234 | assert.deepEqual(actual, expected); 235 | }); 236 | }); 237 | -------------------------------------------------------------------------------- /test/split-cookies-string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var assert = require("assert"); 3 | var setCookie = require("../lib/set-cookie.js"); 4 | 5 | const splitCookiesString = setCookie.splitCookiesString; 6 | 7 | const array = ["a", "b"]; 8 | 9 | const cookieNoParams = "sessionid=6ky4pkr7qoi4me7rwleyvxjove25huef"; 10 | const cookieWithParams = `${cookieNoParams}; HttpOnly; Path=/`; 11 | const cookieWithExpires = 12 | "cid=70125eaa-399a-41b2-b235-8a5092042dba; expires=Thu, 04-Jun-2020 12:17:56 GMT; Max-Age=63072000; Path=/; HttpOnly; Secure"; 13 | const cookieWithExpiresAtEnd = 14 | "client_id=70125eaa-399a-41b2-b235-8a5092042dba; Max-Age=63072000; Path=/; expires=Thu, 04-Jun-2020 12:17:56 GMT"; 15 | const jsonCookie = `myJsonCookie=${JSON.stringify({ 16 | foo: "bar", 17 | arr: [1, 2, 3], 18 | })}`; 19 | const jsonCookieWithParams = `${jsonCookie}; expires=Thu, 04-Jun-2020 12:17:56 GMT; Max-Age=63072000; Path=/; HttpOnly; Secure`; 20 | 21 | const firstWithParamSecondNoParam = `${cookieWithParams}, ${cookieNoParams}`; 22 | const threeNoParams = `${cookieNoParams}, ${cookieNoParams}, ${cookieNoParams}`; 23 | const threeWithParams = `${cookieWithParams}, ${cookieWithParams}, ${cookieWithParams}`; 24 | const firstWithExpiresSecondNoParam = `${cookieWithExpires}, ${cookieNoParams}`; 25 | const firstWithExpiresSecondWithParam = `${cookieWithExpires}, ${cookieWithParams}`; 26 | const firstWithExpiresAtEndSecondNoParam = `${cookieWithExpiresAtEnd}, ${cookieNoParams}`; 27 | const firstWithExpiresAtEndSecondWithParam = `${cookieWithExpiresAtEnd}, ${cookieWithParams}`; 28 | const firstWithExpiresSecondWithExpires = `${cookieWithExpires}, ${cookieWithExpires}`; 29 | const firstWithExpiresSecondWithExpiresAtEnd = `${cookieWithExpires}, ${cookieWithExpiresAtEnd}`; 30 | const firstWithExpiresAtEndSecondWithExpires = `${cookieWithExpiresAtEnd}, ${cookieWithExpires}`; 31 | const firstWithExpiresAtEndSecondWithExpiresAtEnd = `${cookieWithExpiresAtEnd}, ${cookieWithExpiresAtEnd}`; 32 | const firstWithExpiresSecondWithExpiresAtEndThirdWithExpires = `${cookieWithExpires}, ${cookieWithExpiresAtEnd}, ${cookieWithExpires}`; 33 | const firstWithExpiresSecondWithExpiresAtEndThirdWithExpiresAtEnd = `${cookieWithExpires}, ${cookieWithExpiresAtEnd}, ${cookieWithExpiresAtEnd}`; 34 | const threeWithExpires = `${cookieWithExpires}, ${cookieWithExpires}, ${cookieWithExpires}`; 35 | const threeWithExpiresAtEnd = `${cookieWithExpiresAtEnd}, ${cookieWithExpiresAtEnd}, ${cookieWithExpiresAtEnd}`; 36 | 37 | describe("splitCookiesString", function () { 38 | it("should return array if Array", function () { 39 | var actual = splitCookiesString(array); 40 | var expected = array; 41 | assert.deepEqual(actual, expected); 42 | }); 43 | 44 | it("should return empty array on non string type", function () { 45 | var actual = splitCookiesString(1); 46 | var expected = []; 47 | assert.deepEqual(actual, expected); 48 | }); 49 | 50 | it("should parse empty string", function () { 51 | var actual = splitCookiesString(""); 52 | var expected = []; 53 | assert.deepEqual(actual, expected); 54 | }); 55 | 56 | it("should parse single cookie without params", function () { 57 | var actual = splitCookiesString(cookieNoParams); 58 | var expected = [cookieNoParams]; 59 | assert.deepEqual(actual, expected); 60 | }); 61 | 62 | it("should parse single cookie with params", function () { 63 | var actual = splitCookiesString(cookieWithParams); 64 | var expected = [cookieWithParams]; 65 | assert.deepEqual(actual, expected); 66 | }); 67 | 68 | it("should parse three cookies without params", function () { 69 | var actual = splitCookiesString(threeNoParams); 70 | var expected = [cookieNoParams, cookieNoParams, cookieNoParams]; 71 | assert.deepEqual(actual, expected); 72 | }); 73 | 74 | it("should parse Three with params", function () { 75 | var actual = splitCookiesString(threeWithParams); 76 | var expected = [cookieWithParams, cookieWithParams, cookieWithParams]; 77 | assert.deepEqual(actual, expected); 78 | }); 79 | 80 | it("should parse first with params, second without params", function () { 81 | var actual = splitCookiesString(firstWithParamSecondNoParam); 82 | var expected = [cookieWithParams, cookieNoParams]; 83 | assert.deepEqual(actual, expected); 84 | }); 85 | 86 | it("should parse single with expires", function () { 87 | var actual = splitCookiesString(cookieWithExpires); 88 | var expected = [cookieWithExpires]; 89 | assert.deepEqual(actual, expected); 90 | }); 91 | 92 | it("should parse single with expires at end", function () { 93 | var actual = splitCookiesString(cookieWithExpiresAtEnd); 94 | var expected = [cookieWithExpiresAtEnd]; 95 | assert.deepEqual(actual, expected); 96 | }); 97 | 98 | it("should parse first with expires, second without params", function () { 99 | var actual = splitCookiesString(firstWithExpiresSecondNoParam); 100 | var expected = [cookieWithExpires, cookieNoParams]; 101 | assert.deepEqual(actual, expected); 102 | }); 103 | 104 | it("should parse first with expires, second with params", function () { 105 | var actual = splitCookiesString(firstWithExpiresSecondWithParam); 106 | var expected = [cookieWithExpires, cookieWithParams]; 107 | assert.deepEqual(actual, expected); 108 | }); 109 | 110 | it("should parse first with expires at end, second without params", function () { 111 | var actual = splitCookiesString(firstWithExpiresAtEndSecondNoParam); 112 | var expected = [cookieWithExpiresAtEnd, cookieNoParams]; 113 | assert.deepEqual(actual, expected); 114 | }); 115 | 116 | it("should parse first with expires at end, second with params", function () { 117 | var actual = splitCookiesString(firstWithExpiresAtEndSecondWithParam); 118 | var expected = [cookieWithExpiresAtEnd, cookieWithParams]; 119 | assert.deepEqual(actual, expected); 120 | }); 121 | 122 | it("should parse first with expires, second with expires", function () { 123 | var actual = splitCookiesString(firstWithExpiresSecondWithExpires); 124 | var expected = [cookieWithExpires, cookieWithExpires]; 125 | assert.deepEqual(actual, expected); 126 | }); 127 | 128 | it("should parse first with expires, second with expires at end", function () { 129 | var actual = splitCookiesString(firstWithExpiresSecondWithExpiresAtEnd); 130 | var expected = [cookieWithExpires, cookieWithExpiresAtEnd]; 131 | assert.deepEqual(actual, expected); 132 | }); 133 | 134 | it("should parse first with expires at end, second with expires", function () { 135 | var actual = splitCookiesString(firstWithExpiresAtEndSecondWithExpires); 136 | var expected = [cookieWithExpiresAtEnd, cookieWithExpires]; 137 | assert.deepEqual(actual, expected); 138 | }); 139 | 140 | it("should parse first with expires at end, second with expires at end", function () { 141 | var actual = splitCookiesString( 142 | firstWithExpiresAtEndSecondWithExpiresAtEnd 143 | ); 144 | var expected = [cookieWithExpiresAtEnd, cookieWithExpiresAtEnd]; 145 | assert.deepEqual(actual, expected); 146 | }); 147 | 148 | it("should parse first with expires, second with expires at end, third with expires", function () { 149 | var actual = splitCookiesString( 150 | firstWithExpiresSecondWithExpiresAtEndThirdWithExpires 151 | ); 152 | var expected = [ 153 | cookieWithExpires, 154 | cookieWithExpiresAtEnd, 155 | cookieWithExpires, 156 | ]; 157 | assert.deepEqual(actual, expected); 158 | }); 159 | 160 | it("should parse first with expires, second with expires at end, third with expires at end", function () { 161 | var actual = splitCookiesString( 162 | firstWithExpiresSecondWithExpiresAtEndThirdWithExpiresAtEnd 163 | ); 164 | var expected = [ 165 | cookieWithExpires, 166 | cookieWithExpiresAtEnd, 167 | cookieWithExpiresAtEnd, 168 | ]; 169 | assert.deepEqual(actual, expected); 170 | }); 171 | 172 | it("should parse three with expires", function () { 173 | var actual = splitCookiesString(threeWithExpires); 174 | var expected = [cookieWithExpires, cookieWithExpires, cookieWithExpires]; 175 | assert.deepEqual(actual, expected); 176 | }); 177 | 178 | it("should parse three with expires at end", function () { 179 | var actual = splitCookiesString(threeWithExpiresAtEnd); 180 | var expected = [ 181 | cookieWithExpiresAtEnd, 182 | cookieWithExpiresAtEnd, 183 | cookieWithExpiresAtEnd, 184 | ]; 185 | assert.deepEqual(actual, expected); 186 | }); 187 | 188 | it("should not split json", function () { 189 | var actual = splitCookiesString(jsonCookie); 190 | var expected = [jsonCookie]; 191 | assert.deepEqual(actual, expected); 192 | }); 193 | 194 | it("should not split json with params", function () { 195 | var actual = splitCookiesString(jsonCookieWithParams); 196 | var expected = [jsonCookieWithParams]; 197 | assert.deepEqual(actual, expected); 198 | }); 199 | }); 200 | -------------------------------------------------------------------------------- /test/warnings.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var sinon = require("sinon"); 3 | var setCookie = require("../lib/set-cookie.js"); 4 | 5 | describe("set-cookie-parser", function () { 6 | var sandbox = sinon.createSandbox(); 7 | 8 | afterEach(function () { 9 | // completely restore all fakes created through the sandbox 10 | sandbox.restore(); 11 | }); 12 | 13 | // see #34, #36 14 | it("should log a warning on request-like objects", function () { 15 | sandbox.stub(console, "warn"); 16 | 17 | var mockRequest = { 18 | headers: { 19 | cookie: "bam=baz; foo=bar", 20 | }, 21 | }; 22 | 23 | setCookie.parse(mockRequest); 24 | 25 | sandbox.assert.calledOnce(console.warn); 26 | }); 27 | 28 | it("should not log a warning on request-like objects when slient: true is set", function () { 29 | sandbox.stub(console, "warn"); 30 | 31 | var mockRequest = { 32 | headers: { 33 | cookie: "bam=baz; foo=bar", 34 | }, 35 | }; 36 | 37 | setCookie.parse(mockRequest, { 38 | silent: true, 39 | }); 40 | 41 | sandbox.assert.notCalled(console.warn); 42 | }); 43 | }); 44 | --------------------------------------------------------------------------------