diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 272c49154..b51ba8b52 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -82,8 +82,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: - [20.11.0-nightly202312211a0be537da, 21-nightly, 18.0.0-nightly] + node-version: [20-nightly, 21-nightly, 18.0.0-nightly] steps: - uses: actions/checkout@v4 - name: Setup Node diff --git a/.licenses/npm/@actions/cache.dep.yml b/.licenses/npm/@actions/cache.dep.yml index 6afff4499..6e21be6a2 100644 --- a/.licenses/npm/@actions/cache.dep.yml +++ b/.licenses/npm/@actions/cache.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/cache" -version: 4.0.0 +version: 4.0.2 type: npm summary: Actions cache lib homepage: https://github.com/actions/toolkit/tree/main/packages/cache diff --git a/.licenses/npm/camel-case.dep.yml b/.licenses/npm/camel-case.dep.yml deleted file mode 100644 index c143a6a0c..000000000 --- a/.licenses/npm/camel-case.dep.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: camel-case -version: 4.1.2 -type: npm -summary: Transform into a string with the separator denoted by the next word capitalized -homepage: https://github.com/blakeembrey/change-case/tree/master/packages/camel-case#readme -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: |- - MIT - - [npm-image]: https://img.shields.io/npm/v/camel-case.svg?style=flat - [npm-url]: https://npmjs.org/package/camel-case - [downloads-image]: https://img.shields.io/npm/dm/camel-case.svg?style=flat - [downloads-url]: https://npmjs.org/package/camel-case - [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/camel-case.svg - [bundlephobia-url]: https://bundlephobia.com/result?p=camel-case -notices: [] diff --git a/.licenses/npm/commander.dep.yml b/.licenses/npm/commander.dep.yml deleted file mode 100644 index 7af8a2c32..000000000 --- a/.licenses/npm/commander.dep.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: commander -version: 6.2.1 -type: npm -summary: the complete solution for node.js command-line programs -homepage: -license: mit -licenses: -- sources: LICENSE - text: | - (The MIT License) - - Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - 'Software'), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -notices: [] diff --git a/.licenses/npm/dot-object.dep.yml b/.licenses/npm/dot-object.dep.yml deleted file mode 100644 index 226089bd8..000000000 --- a/.licenses/npm/dot-object.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: dot-object -version: 2.1.5 -type: npm -summary: dot-object makes it possible to transform and read (JSON) objects using dot - notation. -homepage: -license: mit -licenses: -- sources: MIT-LICENSE - text: | - Copyright (c) 2013 Rob Halff - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -notices: [] diff --git a/.licenses/npm/fs.realpath.dep.yml b/.licenses/npm/fs.realpath.dep.yml deleted file mode 100644 index 28f5754f4..000000000 --- a/.licenses/npm/fs.realpath.dep.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: fs.realpath -version: 1.0.0 -type: npm -summary: Use node's fs.realpath, but fall back to the JS implementation if the native - one fails -homepage: -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ---- - - This library bundles a version of the `fs.realpath` and `fs.realpathSync` - methods from Node.js v0.10 under the terms of the Node.js MIT license. - - Node's license follows, also included at the header of `old.js` which contains - the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. -notices: [] diff --git a/.licenses/npm/glob.dep.yml b/.licenses/npm/glob.dep.yml deleted file mode 100644 index 915452e51..000000000 --- a/.licenses/npm/glob.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: glob -version: 7.2.3 -type: npm -summary: a little globber -homepage: -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ## Glob Logo - - Glob's logo created by Tanya Brassie <http://tanyabrassie.com/>, licensed - under a Creative Commons Attribution-ShareAlike 4.0 International License - https://creativecommons.org/licenses/by-sa/4.0/ -notices: [] diff --git a/.licenses/npm/inflight.dep.yml b/.licenses/npm/inflight.dep.yml deleted file mode 100644 index 30e123e1a..000000000 --- a/.licenses/npm/inflight.dep.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: inflight -version: 1.0.6 -type: npm -summary: Add callbacks to requests in flight to avoid async duplication -homepage: https://github.com/isaacs/inflight -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -notices: [] diff --git a/.licenses/npm/inherits.dep.yml b/.licenses/npm/inherits.dep.yml deleted file mode 100644 index 74179e61f..000000000 --- a/.licenses/npm/inherits.dep.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: inherits -version: 2.0.4 -type: npm -summary: Browser-friendly inheritance fully compatible with standard node.js inherits() -homepage: -license: isc -licenses: -- sources: LICENSE - text: |+ - The ISC License - - Copyright (c) Isaac Z. Schlueter - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - -notices: [] -... diff --git a/.licenses/npm/lodash.dep.yml b/.licenses/npm/lodash.dep.yml deleted file mode 100644 index 4314a88a5..000000000 --- a/.licenses/npm/lodash.dep.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -name: lodash -version: 4.17.21 -type: npm -summary: Lodash modular utilities. -homepage: https://lodash.com/ -license: mit -licenses: -- sources: LICENSE - text: | - Copyright OpenJS Foundation and other contributors <https://openjsf.org/> - - Based on Underscore.js, copyright Jeremy Ashkenas, - DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - - This software consists of voluntary contributions made by many - individuals. For exact contribution history, see the revision history - available at https://github.com/lodash/lodash - - The following license applies to all parts of this software except as - documented below: - - ==== - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ==== - - Copyright and related rights for sample code are waived via CC0. Sample - code is defined as all source code displayed within the prose of the - documentation. - - CC0: http://creativecommons.org/publicdomain/zero/1.0/ - - ==== - - Files located in the node_modules and vendor directories are externally - maintained libraries used by this software which have their own - licenses; we recommend you read them, as their terms may differ from the - terms above. -notices: [] diff --git a/.licenses/npm/lower-case.dep.yml b/.licenses/npm/lower-case.dep.yml deleted file mode 100644 index e5b04b681..000000000 --- a/.licenses/npm/lower-case.dep.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: lower-case -version: 2.0.2 -type: npm -summary: Transforms the string to lower case -homepage: https://github.com/blakeembrey/change-case/tree/master/packages/lower-case#readme -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: |- - MIT - - [npm-image]: https://img.shields.io/npm/v/lower-case.svg?style=flat - [npm-url]: https://npmjs.org/package/lower-case - [downloads-image]: https://img.shields.io/npm/dm/lower-case.svg?style=flat - [downloads-url]: https://npmjs.org/package/lower-case - [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/lower-case.svg - [bundlephobia-url]: https://bundlephobia.com/result?p=lower-case -notices: [] diff --git a/.licenses/npm/no-case.dep.yml b/.licenses/npm/no-case.dep.yml deleted file mode 100644 index bee8a3b77..000000000 --- a/.licenses/npm/no-case.dep.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: no-case -version: 3.0.4 -type: npm -summary: Transform into a lower cased string with spaces between words -homepage: https://github.com/blakeembrey/change-case/tree/master/packages/no-case#readme -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: |- - MIT - - [npm-image]: https://img.shields.io/npm/v/no-case.svg?style=flat - [npm-url]: https://npmjs.org/package/no-case - [downloads-image]: https://img.shields.io/npm/dm/no-case.svg?style=flat - [downloads-url]: https://npmjs.org/package/no-case - [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/no-case.svg - [bundlephobia-url]: https://bundlephobia.com/result?p=no-case -notices: [] diff --git a/.licenses/npm/pascal-case.dep.yml b/.licenses/npm/pascal-case.dep.yml deleted file mode 100644 index 20cd14f63..000000000 --- a/.licenses/npm/pascal-case.dep.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: pascal-case -version: 3.1.2 -type: npm -summary: Transform into a string of capitalized words without separators -homepage: https://github.com/blakeembrey/change-case/tree/master/packages/pascal-case#readme -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: |- - MIT - - [npm-image]: https://img.shields.io/npm/v/pascal-case.svg?style=flat - [npm-url]: https://npmjs.org/package/pascal-case - [downloads-image]: https://img.shields.io/npm/dm/pascal-case.svg?style=flat - [downloads-url]: https://npmjs.org/package/pascal-case - [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/pascal-case.svg - [bundlephobia-url]: https://bundlephobia.com/result?p=pascal-case -notices: [] diff --git a/.licenses/npm/path-is-absolute.dep.yml b/.licenses/npm/path-is-absolute.dep.yml deleted file mode 100644 index d8fbfdd1b..000000000 --- a/.licenses/npm/path-is-absolute.dep.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: path-is-absolute -version: 1.0.1 -type: npm -summary: Node.js 0.12 path.isAbsolute() ponyfill -homepage: -license: mit -licenses: -- sources: license - text: | - The MIT License (MIT) - - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: readme.md - text: MIT © [Sindre Sorhus](https://sindresorhus.com) -notices: [] diff --git a/.licenses/npm/path-to-regexp.dep.yml b/.licenses/npm/path-to-regexp.dep.yml deleted file mode 100644 index 03207b9b4..000000000 --- a/.licenses/npm/path-to-regexp.dep.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: path-to-regexp -version: 6.3.0 -type: npm -summary: Express style path to RegExp utility -homepage: -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: Readme.md - text: |- - MIT - - [npm-image]: https://img.shields.io/npm/v/path-to-regexp - [npm-url]: https://npmjs.org/package/path-to-regexp - [downloads-image]: https://img.shields.io/npm/dm/path-to-regexp - [downloads-url]: https://npmjs.org/package/path-to-regexp - [build-image]: https://img.shields.io/github/actions/workflow/status/pillarjs/path-to-regexp/ci.yml?branch=master - [build-url]: https://github.com/pillarjs/path-to-regexp/actions/workflows/ci.yml?query=branch%3Amaster - [coverage-image]: https://img.shields.io/codecov/c/gh/pillarjs/path-to-regexp - [coverage-url]: https://codecov.io/gh/pillarjs/path-to-regexp - [license-image]: http://img.shields.io/npm/l/path-to-regexp.svg?style=flat - [license-url]: LICENSE.md -notices: [] diff --git a/.licenses/npm/prettier.dep.yml b/.licenses/npm/prettier.dep.yml deleted file mode 100644 index 1cfcfec8b..000000000 --- a/.licenses/npm/prettier.dep.yml +++ /dev/null @@ -1,3585 +0,0 @@ ---- -name: prettier -version: 2.8.8 -type: npm -summary: Prettier is an opinionated code formatter -homepage: https://prettier.io -license: mit -licenses: -- sources: LICENSE - text: "# Prettier license\n\nPrettier is released under the MIT license:\n\nCopyright - © James Long and contributors\n\nPermission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n\nThe above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n## Licenses of bundled dependencies\n\nThe published Prettier artifact - additionally contains code with the following licenses:\nMIT, ISC, BSD-2-Clause, - BSD-3-Clause, Apache-2.0, 0BSD\n\n## Bundled dependencies\n\n### @angular/compiler@v12.2.16\n\nLicense: - MIT\nBy: angular\nRepository: <https://github.com/angular/angular.git>\n\n----------------------------------------\n\n### - @babel/code-frame@v7.18.6\n\nLicense: MIT\nBy: The Babel Team\nRepository: <https://github.com/babel/babel.git>\n\n> - MIT License\n>\n> Copyright (c) 2014-present Sebastian McKenzie and other contributors\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> \"Software\"), to - deal in the Software without restriction, including\n> without limitation the - rights to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or - sell copies of the Software, and to\n> permit persons to whom the Software is - furnished to do so, subject to\n> the following conditions:\n>\n> The above copyright - notice and this permission notice shall be\n> included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION\n> WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### @babel/helper-validator-identifier@v7.19.1\n\nLicense: - MIT\nBy: The Babel Team\nRepository: <https://github.com/babel/babel.git>\n\n> - MIT License\n>\n> Copyright (c) 2014-present Sebastian McKenzie and other contributors\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> \"Software\"), to - deal in the Software without restriction, including\n> without limitation the - rights to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or - sell copies of the Software, and to\n> permit persons to whom the Software is - furnished to do so, subject to\n> the following conditions:\n>\n> The above copyright - notice and this permission notice shall be\n> included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION\n> WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### @babel/highlight@v7.18.6\n\nLicense: - MIT\nBy: The Babel Team\nRepository: <https://github.com/babel/babel.git>\n\n> - MIT License\n>\n> Copyright (c) 2014-present Sebastian McKenzie and other contributors\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> \"Software\"), to - deal in the Software without restriction, including\n> without limitation the - rights to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or - sell copies of the Software, and to\n> permit persons to whom the Software is - furnished to do so, subject to\n> the following conditions:\n>\n> The above copyright - notice and this permission notice shall be\n> included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION\n> WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### @babel/parser@v7.21.3\n\nLicense: - MIT\nBy: The Babel Team\nRepository: <https://github.com/babel/babel.git>\n\n> - Copyright (C) 2012-2014 by various contributors (see AUTHORS)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - @glimmer/env@v0.1.7\n\nLicense: MIT\n\n> Copyright (c) 2017 Martin Muñoz and contributors.\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of\n> - this software and associated documentation files (the \"Software\"), to deal in\n> - the Software without restriction, including without limitation the rights to\n> - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n> - of the Software, and to permit persons to whom the Software is furnished to do\n> - so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### @glimmer/syntax@v0.84.2\n\nLicense: - MIT\n\n> Copyright (c) 2015 Tilde, Inc.\n>\n> Permission is hereby granted, free - of charge, to any person obtaining a copy of\n> this software and associated documentation - files (the \"Software\"), to deal in\n> the Software without restriction, including - without limitation the rights to\n> use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies\n> of the Software, and to permit persons to whom - the Software is furnished to do\n> so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - @glimmer/util@v0.84.2\n\nLicense: MIT\n\n> Copyright (c) 2015 Tilde, Inc.\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of\n> - this software and associated documentation files (the \"Software\"), to deal in\n> - the Software without restriction, including without limitation the rights to\n> - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n> - of the Software, and to permit persons to whom the Software is furnished to do\n> - so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### @handlebars/parser@v2.0.0\n\nLicense: - ISC\nRepository: <git+https://github.com/handlebars-lang/handlebars-parser.git>\n\n----------------------------------------\n\n### - @iarna/toml@v2.2.5\n\nLicense: ISC\nBy: Rebecca Turner\nRepository: <git+https://github.com/iarna/iarna-toml.git>\n\n> - Copyright (c) 2016, Rebecca Turner <me@re-becca.org>\n>\n> Permission to use, - copy, modify, and/or distribute this software for any\n> purpose with or without - fee is hereby granted, provided that the above\n> copyright notice and this permission - notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n> - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - @nodelib/fs.scandir@v2.1.5\n\nLicense: MIT\n\n> The MIT License (MIT)\n>\n> Copyright - (c) Denis Malinochkin\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy\n> of this software and associated documentation files - (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - @nodelib/fs.stat@v2.0.5\n\nLicense: MIT\n\n> The MIT License (MIT)\n>\n> Copyright - (c) Denis Malinochkin\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy\n> of this software and associated documentation files - (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - @nodelib/fs.walk@v1.2.8\n\nLicense: MIT\n\n> The MIT License (MIT)\n>\n> Copyright - (c) Denis Malinochkin\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy\n> of this software and associated documentation files - (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - @typescript-eslint/types@v5.55.0\n\nLicense: MIT\nRepository: <https://github.com/typescript-eslint/typescript-eslint.git>\n\n> - MIT License\n>\n> Copyright (c) 2019 typescript-eslint and other contributors\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### @typescript-eslint/typescript-estree@v5.55.0\n\nLicense: - BSD-2-Clause\nRepository: <https://github.com/typescript-eslint/typescript-eslint.git>\n\n> - TypeScript ESTree\n>\n> Originally extracted from:\n>\n> TypeScript ESLint Parser\n> - Copyright JS Foundation and other contributors, https://js.foundation\n>\n> Redistribution - and use in source and binary forms, with or without\n> modification, are permitted - provided that the following conditions are met:\n>\n> - Redistributions of source - code must retain the above copyright\n> notice, this list of conditions and - the following disclaimer.\n> - Redistributions in binary form must reproduce the - above copyright\n> notice, this list of conditions and the following disclaimer - in the\n> documentation and/or other materials provided with the distribution.\n>\n> - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n> - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n> IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n> ARE DISCLAIMED. - IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n> DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n> (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n> LOSS OF USE, DATA, OR PROFITS; - OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n> ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT\n> (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF\n> THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE.\n\n----------------------------------------\n\n### - @typescript-eslint/visitor-keys@v5.55.0\n\nLicense: MIT\nRepository: <https://github.com/typescript-eslint/typescript-eslint.git>\n\n> - MIT License\n>\n> Copyright (c) 2019 typescript-eslint and other contributors\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### acorn@v8.8.1\n\nLicense: - MIT\nRepository: <https://github.com/acornjs/acorn.git>\n\n> MIT License\n>\n> - Copyright (C) 2012-2022 by various contributors (see AUTHORS)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - acorn-jsx@v5.3.2\n\nLicense: MIT\nRepository: <https://github.com/acornjs/acorn-jsx>\n\n> - Copyright (C) 2012-2017 by Ingvar Stepanyan\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - aggregate-error@v3.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - angular-estree-parser@v2.5.1\n\nLicense: MIT\nBy: Ika\n\n> MIT License\n>\n> Copyright - (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - angular-html-parser@v1.8.0\n\nLicense: MIT\nBy: Ika\n\n> MIT License\n>\n> Copyright - (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - ansi-regex@v6.0.1\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - ansi-styles@v3.2.1\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - array-union@v2.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - bail@v1.0.5\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright - (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby granted, - free of charge, to any person obtaining\n> a copy of this software and associated - documentation files (the\n> 'Software'), to deal in the Software without restriction, - including\n> without limitation the rights to use, copy, modify, merge, publish,\n> - distribute, sublicense, and/or sell copies of the Software, and to\n> permit persons - to whom the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - balanced-match@v1.0.2\n\nLicense: MIT\nBy: Julian Gruber\nRepository: <git://github.com/juliangruber/balanced-match.git>\n\n> - (MIT)\n>\n> Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of\n> - this software and associated documentation files (the \"Software\"), to deal in\n> - the Software without restriction, including without limitation the rights to\n> - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n> - of the Software, and to permit persons to whom the Software is furnished to do\n> - so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### brace-expansion@v1.1.11\n\nLicense: - MIT\nBy: Julian Gruber\nRepository: <git://github.com/juliangruber/brace-expansion.git>\n\n> - MIT License\n>\n> Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### braces@v3.0.2\n\nLicense: - MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> Copyright (c) 2014-2018, - Jon Schlinkert.\n>\n> Permission is hereby granted, free of charge, to any person - obtaining a copy\n> of this software and associated documentation files (the \"Software\"), - to deal\n> in the Software without restriction, including without limitation the - rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell\n> copies of the Software, and to permit persons to whom the Software is\n> - furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in\n> all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### camelcase@v6.3.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### ccount@v1.1.0\n\nLicense: - MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright (c) 2015 Titus Wormer - <tituswormer@gmail.com>\n>\n> Permission is hereby granted, free of charge, to - any person obtaining\n> a copy of this software and associated documentation files - (the\n> 'Software'), to deal in the Software without restriction, including\n> - without limitation the rights to use, copy, modify, merge, publish,\n> distribute, - sublicense, and/or sell copies of the Software, and to\n> permit persons to whom - the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - chalk@v2.4.2\n\nLicense: MIT\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus - <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of this software and associated - documentation files (the \"Software\"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE - FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE - OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - chalk@v5.0.1\n\nLicense: MIT\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus - <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy of this software and associated - documentation files (the \"Software\"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE - FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE - OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - character-entities@v1.2.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - character-entities-legacy@v1.1.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT - License)\n>\n> Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> 'Software'), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - character-reference-invalid@v1.1.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The - MIT License)\n>\n> Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> 'Software'), to deal - in the Software without restriction, including\n> without limitation the rights - to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or sell copies - of the Software, and to\n> permit persons to whom the Software is furnished to - do so, subject to\n> the following conditions:\n>\n> The above copyright notice - and this permission notice shall be\n> included in all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY - KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO - EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES - OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE.\n\n----------------------------------------\n\n### ci-info@v3.3.0\n\nLicense: - MIT\nBy: Thomas Watson Steen\nRepository: <https://github.com/watson/ci-info.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2016-2021 Thomas Watson Steen\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### clean-stack@v2.2.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### clone@v1.0.4\n\nLicense: - MIT\nBy: Paul Vorbach\nRepository: <git://github.com/pvorb/node-clone.git>\n\n> - Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy of\n> this software and - associated documentation files (the “Software”), to deal in\n> the Software without - restriction, including without limitation the rights to\n> use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of\n> the Software, - and to permit persons to whom the Software is furnished to do so,\n> subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE\n> - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - collapse-white-space@v1.0.6\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - color-convert@v1.9.3\n\nLicense: MIT\nBy: Heather Arthur\n\n> Copyright (c) 2011-2016 - Heather Arthur <fayearthur@gmail.com>\n>\n> Permission is hereby granted, free - of charge, to any person obtaining\n> a copy of this software and associated documentation - files (the\n> \"Software\"), to deal in the Software without restriction, including\n> - without limitation the rights to use, copy, modify, merge, publish,\n> distribute, - sublicense, and/or sell copies of the Software, and to\n> permit persons to whom - the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE\n> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n> - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n> WITH - THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - color-name@v1.1.3\n\nLicense: MIT\nBy: DY\nRepository: <git@github.com:dfcreative/color-name.git>\n\n> - The MIT License (MIT)\n> Copyright (c) 2015 Dmitry Ivanov\n> \n> Permission is - hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n> \n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n> \n> THE - SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - commondir@v1.0.1\n\nLicense: MIT\nBy: James Halliday\nRepository: <http://github.com/substack/node-commondir.git>\n\n> - The MIT License\n>\n> Copyright (c) 2013 James Halliday (mail@substack.net)\n>\n> - Permission is hereby granted, free of charge, \n> to any person obtaining a copy - of this software and \n> associated documentation files (the \"Software\"), to - \n> deal in the Software without restriction, including \n> without limitation - the rights to use, copy, modify, \n> merge, publish, distribute, sublicense, and/or - sell \n> copies of the Software, and to permit persons to whom \n> the Software - is furnished to do so, \n> subject to the following conditions:\n>\n> The above - copyright notice and this permission notice \n> shall be included in all copies - or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", - WITHOUT WARRANTY OF ANY KIND, \n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES \n> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. \n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE - FOR \n> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - \n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE \n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - concat-map@v0.0.1\n\nLicense: MIT\nBy: James Halliday\nRepository: <git://github.com/substack/node-concat-map.git>\n\n> - This software is released under the MIT license:\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of\n> the Software, and to permit persons - to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - cosmiconfig@v7.0.1\n\nLicense: MIT\nBy: David Clark\nRepository: <git+https://github.com/davidtheclark/cosmiconfig.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 David Clark\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - cross-spawn@v7.0.3\n\nLicense: MIT\nBy: André Cruz\nRepository: <git@github.com:moxystudio/node-cross-spawn.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### crypto-random-string@v4.0.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### css-units-list@v1.1.0\n\nLicense: - MIT\nBy: fisker Cheung\n\n> MIT License\n>\n> Copyright (c) fisker Cheung <lionkay@gmail.com> - (https://www.fiskercheung.com/)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - dashify@v2.0.0\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2015-present, Jon Schlinkert.\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - defaults@v1.0.4\n\nLicense: MIT\nBy: Elijah Insua\nRepository: <git://github.com/sindresorhus/node-defaults.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2022 Sindre Sorhus\n> Copyright (c) - 2015 Elijah Insua\n>\n> Permission is hereby granted, free of charge, to any person - obtaining a copy\n> of this software and associated documentation files (the \"Software\"), - to deal\n> in the Software without restriction, including without limitation the - rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell\n> copies of the Software, and to permit persons to whom the Software is\n> - furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in\n> all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### del@v6.1.1\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### detect-newline@v3.1.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### diff@v5.0.0\n\nLicense: - BSD-3-Clause\nRepository: <git://github.com/kpdecker/jsdiff.git>\n\n> Software - License Agreement (BSD License)\n>\n> Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>\n>\n> - All rights reserved.\n>\n> Redistribution and use of this software in source and - binary forms, with or without modification,\n> are permitted provided that the - following conditions are met:\n>\n> * Redistributions of source code must retain - the above\n> copyright notice, this list of conditions and the\n> following - disclaimer.\n>\n> * Redistributions in binary form must reproduce the above\n> - \ copyright notice, this list of conditions and the\n> following disclaimer - in the documentation and/or other\n> materials provided with the distribution.\n>\n> - * Neither the name of Kevin Decker nor the names of its\n> contributors may - be used to endorse or promote products\n> derived from this software without - specific prior\n> written permission.\n>\n> THIS SOFTWARE IS PROVIDED BY THE - COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n> IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n> - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR\n> CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL\n> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n> DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n> IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT\n> OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE.\n\n----------------------------------------\n\n### dir-glob@v3.0.1\n\nLicense: - MIT\nBy: Kevin Mårtensson\n\n> MIT License\n>\n> Copyright (c) Kevin Mårtensson - <kevinmartensson@gmail.com> (github.com/kevva)\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of this software and associated - documentation files (the \"Software\"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE - FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE - OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - editorconfig@v0.15.3\n\nLicense: MIT\nBy: EditorConfig Team\nRepository: <git://github.com/editorconfig/editorconfig-core-js.git>\n\n> - Copyright © 2012 EditorConfig Team\n>\n> Permission is hereby granted, free of - charge, to any person obtaining a copy\n> of this software and associated documentation - files (the “Software”), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE - OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - editorconfig-to-prettier@v1.0.0\n\nLicense: ISC\nBy: Joseph Frazier\nRepository: - <git+https://github.com/josephfrazier/editorconfig-to-prettier.git>\n\n----------------------------------------\n\n### - emoji-regex@v9.2.2\n\nLicense: MIT\nBy: Mathias Bynens\nRepository: <https://github.com/mathiasbynens/emoji-regex.git>\n\n> - Copyright Mathias Bynens <https://mathiasbynens.be/>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> \"Software\"), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n> - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - error-ex@v1.3.2\n\nLicense: MIT\n\n> The MIT License (MIT)\n>\n> Copyright (c) - 2015 JD Ballard\n>\n> Permission is hereby granted, free of charge, to any person - obtaining a copy\n> of this software and associated documentation files (the \"Software\"), - to deal\n> in the Software without restriction, including without limitation the - rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell\n> copies of the Software, and to permit persons to whom the Software is\n> - furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in\n> all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### escape-string-regexp@v1.0.5\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> The MIT License (MIT)\n>\n> Copyright (c) Sindre Sorhus - <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - escape-string-regexp@v5.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - eslint-visitor-keys@v3.3.0\n\nLicense: Apache-2.0\nBy: Toru Nagashima\n\n> Apache - License\n> Version 2.0, January 2004\n> http://www.apache.org/licenses/\n>\n> - \ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n>\n> 1. Definitions.\n>\n> - \ \"License\" shall mean the terms and conditions for use, reproduction,\n> - \ and distribution as defined by Sections 1 through 9 of this document.\n>\n> - \ \"Licensor\" shall mean the copyright owner or entity authorized by\n> - \ the copyright owner that is granting the License.\n>\n> \"Legal Entity\" - shall mean the union of the acting entity and all\n> other entities that - control, are controlled by, or are under common\n> control with that entity. - For the purposes of this definition,\n> \"control\" means (i) the power, - direct or indirect, to cause the\n> direction or management of such entity, - whether by contract or\n> otherwise, or (ii) ownership of fifty percent - (50%) or more of the\n> outstanding shares, or (iii) beneficial ownership - of such entity.\n>\n> \"You\" (or \"Your\") shall mean an individual or - Legal Entity\n> exercising permissions granted by this License.\n>\n> \"Source\" - form shall mean the preferred form for making modifications,\n> including - but not limited to software source code, documentation\n> source, and configuration - files.\n>\n> \"Object\" form shall mean any form resulting from mechanical\n> - \ transformation or translation of a Source form, including but\n> not - limited to compiled object code, generated documentation,\n> and conversions - to other media types.\n>\n> \"Work\" shall mean the work of authorship, - whether in Source or\n> Object form, made available under the License, as - indicated by a\n> copyright notice that is included in or attached to the - work\n> (an example is provided in the Appendix below).\n>\n> \"Derivative - Works\" shall mean any work, whether in Source or Object\n> form, that is - based on (or derived from) the Work and for which the\n> editorial revisions, - annotations, elaborations, or other modifications\n> represent, as a whole, - an original work of authorship. For the purposes\n> of this License, Derivative - Works shall not include works that remain\n> separable from, or merely link - (or bind by name) to the interfaces of,\n> the Work and Derivative Works - thereof.\n>\n> \"Contribution\" shall mean any work of authorship, including\n> - \ the original version of the Work and any modifications or additions\n> - \ to that Work or Derivative Works thereof, that is intentionally\n> submitted - to Licensor for inclusion in the Work by the copyright owner\n> or by an - individual or Legal Entity authorized to submit on behalf of\n> the copyright - owner. For the purposes of this definition, \"submitted\"\n> means any form - of electronic, verbal, or written communication sent\n> to the Licensor - or its representatives, including but not limited to\n> communication on - electronic mailing lists, source code control systems,\n> and issue tracking - systems that are managed by, or on behalf of, the\n> Licensor for the purpose - of discussing and improving the Work, but\n> excluding communication that - is conspicuously marked or otherwise\n> designated in writing by the copyright - owner as \"Not a Contribution.\"\n>\n> \"Contributor\" shall mean Licensor - and any individual or Legal Entity\n> on behalf of whom a Contribution has - been received by Licensor and\n> subsequently incorporated within the Work.\n>\n> - \ 2. Grant of Copyright License. Subject to the terms and conditions of\n> this - License, each Contributor hereby grants to You a perpetual,\n> worldwide, - non-exclusive, no-charge, royalty-free, irrevocable\n> copyright license - to reproduce, prepare Derivative Works of,\n> publicly display, publicly - perform, sublicense, and distribute the\n> Work and such Derivative Works - in Source or Object form.\n>\n> 3. Grant of Patent License. Subject to the - terms and conditions of\n> this License, each Contributor hereby grants - to You a perpetual,\n> worldwide, non-exclusive, no-charge, royalty-free, - irrevocable\n> (except as stated in this section) patent license to make, - have made,\n> use, offer to sell, sell, import, and otherwise transfer the - Work,\n> where such license applies only to those patent claims licensable\n> - \ by such Contributor that are necessarily infringed by their\n> Contribution(s) - alone or by combination of their Contribution(s)\n> with the Work to which - such Contribution(s) was submitted. If You\n> institute patent litigation - against any entity (including a\n> cross-claim or counterclaim in a lawsuit) - alleging that the Work\n> or a Contribution incorporated within the Work - constitutes direct\n> or contributory patent infringement, then any patent - licenses\n> granted to You under this License for that Work shall terminate\n> - \ as of the date such litigation is filed.\n>\n> 4. Redistribution. You - may reproduce and distribute copies of the\n> Work or Derivative Works thereof - in any medium, with or without\n> modifications, and in Source or Object - form, provided that You\n> meet the following conditions:\n>\n> (a) - You must give any other recipients of the Work or\n> Derivative Works - a copy of this License; and\n>\n> (b) You must cause any modified files - to carry prominent notices\n> stating that You changed the files; and\n>\n> - \ (c) You must retain, in the Source form of any Derivative Works\n> that - You distribute, all copyright, patent, trademark, and\n> attribution - notices from the Source form of the Work,\n> excluding those notices - that do not pertain to any part of\n> the Derivative Works; and\n>\n> - \ (d) If the Work includes a \"NOTICE\" text file as part of its\n> distribution, - then any Derivative Works that You distribute must\n> include a readable - copy of the attribution notices contained\n> within such NOTICE file, - excluding those notices that do not\n> pertain to any part of the Derivative - Works, in at least one\n> of the following places: within a NOTICE text - file distributed\n> as part of the Derivative Works; within the Source - form or\n> documentation, if provided along with the Derivative Works; - or,\n> within a display generated by the Derivative Works, if and\n> - \ wherever such third-party notices normally appear. The contents\n> - \ of the NOTICE file are for informational purposes only and\n> do - not modify the License. You may add Your own attribution\n> notices - within Derivative Works that You distribute, alongside\n> or as an addendum - to the NOTICE text from the Work, provided\n> that such additional attribution - notices cannot be construed\n> as modifying the License.\n>\n> You - may add Your own copyright statement to Your modifications and\n> may provide - additional or different license terms and conditions\n> for use, reproduction, - or distribution of Your modifications, or\n> for any such Derivative Works - as a whole, provided Your use,\n> reproduction, and distribution of the - Work otherwise complies with\n> the conditions stated in this License.\n>\n> - \ 5. Submission of Contributions. Unless You explicitly state otherwise,\n> - \ any Contribution intentionally submitted for inclusion in the Work\n> by - You to the Licensor shall be under the terms and conditions of\n> this License, - without any additional terms or conditions.\n> Notwithstanding the above, - nothing herein shall supersede or modify\n> the terms of any separate license - agreement you may have executed\n> with Licensor regarding such Contributions.\n>\n> - \ 6. Trademarks. This License does not grant permission to use the trade\n> - \ names, trademarks, service marks, or product names of the Licensor,\n> - \ except as required for reasonable and customary use in describing the\n> - \ origin of the Work and reproducing the content of the NOTICE file.\n>\n> - \ 7. Disclaimer of Warranty. Unless required by applicable law or\n> agreed - to in writing, Licensor provides the Work (and each\n> Contributor provides - its Contributions) on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or\n> implied, including, without limitation, - any warranties or conditions\n> of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, - or FITNESS FOR A\n> PARTICULAR PURPOSE. You are solely responsible for determining - the\n> appropriateness of using or redistributing the Work and assume any\n> - \ risks associated with Your exercise of permissions under this License.\n>\n> - \ 8. Limitation of Liability. In no event and under no legal theory,\n> whether - in tort (including negligence), contract, or otherwise,\n> unless required - by applicable law (such as deliberate and grossly\n> negligent acts) or - agreed to in writing, shall any Contributor be\n> liable to You for damages, - including any direct, indirect, special,\n> incidental, or consequential - damages of any character arising as a\n> result of this License or out of - the use or inability to use the\n> Work (including but not limited to damages - for loss of goodwill,\n> work stoppage, computer failure or malfunction, - or any and all\n> other commercial damages or losses), even if such Contributor\n> - \ has been advised of the possibility of such damages.\n>\n> 9. Accepting - Warranty or Additional Liability. While redistributing\n> the Work or Derivative - Works thereof, You may choose to offer,\n> and charge a fee for, acceptance - of support, warranty, indemnity,\n> or other liability obligations and/or - rights consistent with this\n> License. However, in accepting such obligations, - You may act only\n> on Your own behalf and on Your sole responsibility, - not on behalf\n> of any other Contributor, and only if You agree to indemnify,\n> - \ defend, and hold each Contributor harmless for any liability\n> incurred - by, or claims asserted against, such Contributor by reason\n> of your accepting - any such warranty or additional liability.\n>\n> END OF TERMS AND CONDITIONS\n>\n> - \ APPENDIX: How to apply the Apache License to your work.\n>\n> To apply - the Apache License to your work, attach the following\n> boilerplate notice, - with the fields enclosed by brackets \"{}\"\n> replaced with your own identifying - information. (Don't include\n> the brackets!) The text should be enclosed - in the appropriate\n> comment syntax for the file format. We also recommend - that a\n> file or class name and description of purpose be included on the\n> - \ same \"printed page\" as the copyright notice for easier\n> identification - within third-party archives.\n>\n> Copyright contributors\n>\n> Licensed - under the Apache License, Version 2.0 (the \"License\");\n> you may not use - this file except in compliance with the License.\n> You may obtain a copy of - the License at\n>\n> http://www.apache.org/licenses/LICENSE-2.0\n>\n> Unless - required by applicable law or agreed to in writing, software\n> distributed - under the License is distributed on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied.\n> See the License for - the specific language governing permissions and\n> limitations under the License.\n\n----------------------------------------\n\n### - espree@v9.4.1\n\nLicense: BSD-2-Clause\nBy: Nicholas C. Zakas\n\n> BSD 2-Clause - License\n>\n> Copyright (c) Open JS Foundation\n> All rights reserved.\n>\n> Redistribution - and use in source and binary forms, with or without\n> modification, are permitted - provided that the following conditions are met:\n>\n> 1. Redistributions of source - code must retain the above copyright notice, this\n> list of conditions and - the following disclaimer.\n>\n> 2. Redistributions in binary form must reproduce - the above copyright notice,\n> this list of conditions and the following disclaimer - in the documentation\n> and/or other materials provided with the distribution.\n>\n> - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n> - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n> IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n> DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n> FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n> DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n> SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n> CAUSED AND ON ANY THEORY - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n> OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n> OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE.\n\n----------------------------------------\n\n### - esutils@v2.0.3\n\nLicense: BSD-2-Clause\nRepository: <http://github.com/estools/esutils.git>\n\n> - Redistribution and use in source and binary forms, with or without\n> modification, - are permitted provided that the following conditions are met:\n>\n> * Redistributions - of source code must retain the above copyright\n> notice, this list of conditions - and the following disclaimer.\n> * Redistributions in binary form must reproduce - the above copyright\n> notice, this list of conditions and the following disclaimer - in the\n> documentation and/or other materials provided with the distribution.\n>\n> - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n> - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n> IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n> ARE DISCLAIMED. - IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n> DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n> (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n> LOSS OF USE, DATA, OR PROFITS; - OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n> ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT\n> (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF\n> THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE.\n\n----------------------------------------\n\n### - execa@v6.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - extend@v3.0.2\n\nLicense: MIT\nBy: Stefan Thomas\nRepository: <https://github.com/justmoon/node-extend.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2014 Stefan Thomas\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> \"Software\"), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n> - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - fast-glob@v3.2.12\n\nLicense: MIT\nBy: Denis Malinochkin\n\n> The MIT License - (MIT)\n>\n> Copyright (c) Denis Malinochkin\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - fast-json-stable-stringify@v2.1.0\n\nLicense: MIT\nBy: James Halliday\nRepository: - <git://github.com/epoberezkin/fast-json-stable-stringify.git>\n\n> This software - is released under the MIT license:\n>\n> Copyright (c) 2017 Evgeny Poberezkin\n> - Copyright (c) 2013 James Halliday\n>\n> Permission is hereby granted, free of - charge, to any person obtaining a copy of\n> this software and associated documentation - files (the \"Software\"), to deal in\n> the Software without restriction, including - without limitation the rights to\n> use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of\n> the Software, and to permit persons to whom - the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - fastq@v1.14.0\n\nLicense: ISC\nBy: Matteo Collina\nRepository: <git+https://github.com/mcollina/fastq.git>\n\n> - Copyright (c) 2015-2020, Matteo Collina <matteo.collina@gmail.com>\n>\n> Permission - to use, copy, modify, and/or distribute this software for any\n> purpose with - or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF\n> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - file-entry-cache@v6.0.1\n\nLicense: MIT\nBy: Roy Riojas\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2015 Roy Riojas\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - fill-range@v7.0.1\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-present, Jon Schlinkert.\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - find-cache-dir@v3.3.2\n\nLicense: MIT\n\n> MIT License\n>\n> Copyright (c) Sindre - Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - find-parent-dir@v0.3.1\n\nLicense: MIT\nBy: Thorsten Lorenz\nRepository: <git://github.com/thlorenz/find-parent-dir.git>\n\n> - Copyright 2013 Thorsten Lorenz. \n> All rights reserved.\n>\n> Permission is hereby - granted, free of charge, to any person\n> obtaining a copy of this software and - associated documentation\n> files (the \"Software\"), to deal in the Software - without\n> restriction, including without limitation the rights to use,\n> copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the\n> Software is furnished to do so, subject to - the following\n> conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n> OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT\n> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n> - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n> OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - find-up@v4.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - flat-cache@v3.0.4\n\nLicense: MIT\nBy: Roy Riojas\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2015 Roy Riojas\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - flatted@v3.2.7\n\nLicense: ISC\nBy: Andrea Giammarchi\nRepository: <git+https://github.com/WebReflection/flatted.git>\n\n> - ISC License\n>\n> Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n> REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n> AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n> INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n> LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n> OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR IN CONNECTION WITH THE USE OR\n> PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - flatten@v1.0.3\n\nLicense: MIT\nBy: Joshua Holbrook\nRepository: <git+https://github.com/mk-pmb/flatten-js.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2016 Joshua Holbrook\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - flow-parser@v0.180.0\n\nLicense: MIT\nBy: Flow Team\nRepository: <https://github.com/facebook/flow.git>\n\n----------------------------------------\n\n### - fs.realpath@v1.0.0\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git+https://github.com/isaacs/fs.realpath.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n>\n> - ----\n>\n> This library bundles a version of the `fs.realpath` and `fs.realpathSync`\n> - methods from Node.js v0.10 under the terms of the Node.js MIT license.\n>\n> Node's - license follows, also included at the header of `old.js` which contains\n> the - licensed code:\n>\n> Copyright Joyent, Inc. and other Node contributors.\n>\n> - \ Permission is hereby granted, free of charge, to any person obtaining a\n> - \ copy of this software and associated documentation files (the \"Software\"),\n> - \ to deal in the Software without restriction, including without limitation\n> - \ the rights to use, copy, modify, merge, publish, distribute, sublicense,\n> - \ and/or sell copies of the Software, and to permit persons to whom the\n> Software - is furnished to do so, subject to the following conditions:\n>\n> The above - copyright notice and this permission notice shall be included in\n> all copies - or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS - IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER\n> DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - function-bind@v1.1.1\n\nLicense: MIT\nBy: Raynos\n\n> Copyright (c) 2013 Raynos.\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### get-stdin@v8.0.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### get-stream@v6.0.1\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### glob@v7.2.3\n\nLicense: - ISC\nBy: Isaac Z. Schlueter\nRepository: <git://github.com/isaacs/node-glob.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n>\n> - ## Glob Logo\n>\n> Glob's logo created by Tanya Brassie <http://tanyabrassie.com/>, - licensed\n> under a Creative Commons Attribution-ShareAlike 4.0 International - License\n> https://creativecommons.org/licenses/by-sa/4.0/\n\n----------------------------------------\n\n### - glob-parent@v5.1.2\n\nLicense: ISC\nBy: Gulp Team\n\n> The ISC License\n>\n> Copyright - (c) 2015, 2019 Elan Shanker\n>\n> Permission to use, copy, modify, and/or distribute - this software for any\n> purpose with or without fee is hereby granted, provided - that the above\n> copyright notice and this permission notice appear in all copies.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE.\n\n----------------------------------------\n\n### globby@v11.1.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### graceful-fs@v4.2.10\n\nLicense: - ISC\nRepository: <https://github.com/isaacs/node-graceful-fs>\n\n> The ISC License\n>\n> - Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - graphql@v15.6.1\n\nLicense: MIT\nRepository: <https://github.com/graphql/graphql-js.git>\n\n> - MIT License\n>\n> Copyright (c) GraphQL Contributors\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - has@v1.0.3\n\nLicense: MIT\nBy: Thiago de Arruda\nRepository: <git://github.com/tarruda/has.git>\n\n> - Copyright (c) 2013 Thiago de Arruda\n>\n> Permission is hereby granted, free of - charge, to any person\n> obtaining a copy of this software and associated documentation\n> - files (the \"Software\"), to deal in the Software without\n> restriction, including - without limitation the rights to use,\n> copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the\n> Software is furnished to do so, subject to the following\n> conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES\n> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n> - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n> WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR\n> OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - has-flag@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - html-element-attributes@v3.1.0\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT - License)\n>\n> Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> 'Software'), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - html-tag-names@v2.0.1\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - human-signals@v3.0.1\n\nLicense: Apache-2.0\nBy: ehmicky\n\n> Apache License\n> - \ Version 2.0, January 2004\n> http://www.apache.org/licenses/\n>\n> - \ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n>\n> 1. Definitions.\n>\n> - \ \"License\" shall mean the terms and conditions for use, reproduction,\n> - \ and distribution as defined by Sections 1 through 9 of this document.\n>\n> - \ \"Licensor\" shall mean the copyright owner or entity authorized by\n> - \ the copyright owner that is granting the License.\n>\n> \"Legal Entity\" - shall mean the union of the acting entity and all\n> other entities that - control, are controlled by, or are under common\n> control with that entity. - For the purposes of this definition,\n> \"control\" means (i) the power, - direct or indirect, to cause the\n> direction or management of such entity, - whether by contract or\n> otherwise, or (ii) ownership of fifty percent - (50%) or more of the\n> outstanding shares, or (iii) beneficial ownership - of such entity.\n>\n> \"You\" (or \"Your\") shall mean an individual or - Legal Entity\n> exercising permissions granted by this License.\n>\n> \"Source\" - form shall mean the preferred form for making modifications,\n> including - but not limited to software source code, documentation\n> source, and configuration - files.\n>\n> \"Object\" form shall mean any form resulting from mechanical\n> - \ transformation or translation of a Source form, including but\n> not - limited to compiled object code, generated documentation,\n> and conversions - to other media types.\n>\n> \"Work\" shall mean the work of authorship, - whether in Source or\n> Object form, made available under the License, as - indicated by a\n> copyright notice that is included in or attached to the - work\n> (an example is provided in the Appendix below).\n>\n> \"Derivative - Works\" shall mean any work, whether in Source or Object\n> form, that is - based on (or derived from) the Work and for which the\n> editorial revisions, - annotations, elaborations, or other modifications\n> represent, as a whole, - an original work of authorship. For the purposes\n> of this License, Derivative - Works shall not include works that remain\n> separable from, or merely link - (or bind by name) to the interfaces of,\n> the Work and Derivative Works - thereof.\n>\n> \"Contribution\" shall mean any work of authorship, including\n> - \ the original version of the Work and any modifications or additions\n> - \ to that Work or Derivative Works thereof, that is intentionally\n> submitted - to Licensor for inclusion in the Work by the copyright owner\n> or by an - individual or Legal Entity authorized to submit on behalf of\n> the copyright - owner. For the purposes of this definition, \"submitted\"\n> means any form - of electronic, verbal, or written communication sent\n> to the Licensor - or its representatives, including but not limited to\n> communication on - electronic mailing lists, source code control systems,\n> and issue tracking - systems that are managed by, or on behalf of, the\n> Licensor for the purpose - of discussing and improving the Work, but\n> excluding communication that - is conspicuously marked or otherwise\n> designated in writing by the copyright - owner as \"Not a Contribution.\"\n>\n> \"Contributor\" shall mean Licensor - and any individual or Legal Entity\n> on behalf of whom a Contribution has - been received by Licensor and\n> subsequently incorporated within the Work.\n>\n> - \ 2. Grant of Copyright License. Subject to the terms and conditions of\n> this - License, each Contributor hereby grants to You a perpetual,\n> worldwide, - non-exclusive, no-charge, royalty-free, irrevocable\n> copyright license - to reproduce, prepare Derivative Works of,\n> publicly display, publicly - perform, sublicense, and distribute the\n> Work and such Derivative Works - in Source or Object form.\n>\n> 3. Grant of Patent License. Subject to the - terms and conditions of\n> this License, each Contributor hereby grants - to You a perpetual,\n> worldwide, non-exclusive, no-charge, royalty-free, - irrevocable\n> (except as stated in this section) patent license to make, - have made,\n> use, offer to sell, sell, import, and otherwise transfer the - Work,\n> where such license applies only to those patent claims licensable\n> - \ by such Contributor that are necessarily infringed by their\n> Contribution(s) - alone or by combination of their Contribution(s)\n> with the Work to which - such Contribution(s) was submitted. If You\n> institute patent litigation - against any entity (including a\n> cross-claim or counterclaim in a lawsuit) - alleging that the Work\n> or a Contribution incorporated within the Work - constitutes direct\n> or contributory patent infringement, then any patent - licenses\n> granted to You under this License for that Work shall terminate\n> - \ as of the date such litigation is filed.\n>\n> 4. Redistribution. You - may reproduce and distribute copies of the\n> Work or Derivative Works thereof - in any medium, with or without\n> modifications, and in Source or Object - form, provided that You\n> meet the following conditions:\n>\n> (a) - You must give any other recipients of the Work or\n> Derivative Works - a copy of this License; and\n>\n> (b) You must cause any modified files - to carry prominent notices\n> stating that You changed the files; and\n>\n> - \ (c) You must retain, in the Source form of any Derivative Works\n> that - You distribute, all copyright, patent, trademark, and\n> attribution - notices from the Source form of the Work,\n> excluding those notices - that do not pertain to any part of\n> the Derivative Works; and\n>\n> - \ (d) If the Work includes a \"NOTICE\" text file as part of its\n> distribution, - then any Derivative Works that You distribute must\n> include a readable - copy of the attribution notices contained\n> within such NOTICE file, - excluding those notices that do not\n> pertain to any part of the Derivative - Works, in at least one\n> of the following places: within a NOTICE text - file distributed\n> as part of the Derivative Works; within the Source - form or\n> documentation, if provided along with the Derivative Works; - or,\n> within a display generated by the Derivative Works, if and\n> - \ wherever such third-party notices normally appear. The contents\n> - \ of the NOTICE file are for informational purposes only and\n> do - not modify the License. You may add Your own attribution\n> notices - within Derivative Works that You distribute, alongside\n> or as an addendum - to the NOTICE text from the Work, provided\n> that such additional attribution - notices cannot be construed\n> as modifying the License.\n>\n> You - may add Your own copyright statement to Your modifications and\n> may provide - additional or different license terms and conditions\n> for use, reproduction, - or distribution of Your modifications, or\n> for any such Derivative Works - as a whole, provided Your use,\n> reproduction, and distribution of the - Work otherwise complies with\n> the conditions stated in this License.\n>\n> - \ 5. Submission of Contributions. Unless You explicitly state otherwise,\n> - \ any Contribution intentionally submitted for inclusion in the Work\n> by - You to the Licensor shall be under the terms and conditions of\n> this License, - without any additional terms or conditions.\n> Notwithstanding the above, - nothing herein shall supersede or modify\n> the terms of any separate license - agreement you may have executed\n> with Licensor regarding such Contributions.\n>\n> - \ 6. Trademarks. This License does not grant permission to use the trade\n> - \ names, trademarks, service marks, or product names of the Licensor,\n> - \ except as required for reasonable and customary use in describing the\n> - \ origin of the Work and reproducing the content of the NOTICE file.\n>\n> - \ 7. Disclaimer of Warranty. Unless required by applicable law or\n> agreed - to in writing, Licensor provides the Work (and each\n> Contributor provides - its Contributions) on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or\n> implied, including, without limitation, - any warranties or conditions\n> of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, - or FITNESS FOR A\n> PARTICULAR PURPOSE. You are solely responsible for determining - the\n> appropriateness of using or redistributing the Work and assume any\n> - \ risks associated with Your exercise of permissions under this License.\n>\n> - \ 8. Limitation of Liability. In no event and under no legal theory,\n> whether - in tort (including negligence), contract, or otherwise,\n> unless required - by applicable law (such as deliberate and grossly\n> negligent acts) or - agreed to in writing, shall any Contributor be\n> liable to You for damages, - including any direct, indirect, special,\n> incidental, or consequential - damages of any character arising as a\n> result of this License or out of - the use or inability to use the\n> Work (including but not limited to damages - for loss of goodwill,\n> work stoppage, computer failure or malfunction, - or any and all\n> other commercial damages or losses), even if such Contributor\n> - \ has been advised of the possibility of such damages.\n>\n> 9. Accepting - Warranty or Additional Liability. While redistributing\n> the Work or Derivative - Works thereof, You may choose to offer,\n> and charge a fee for, acceptance - of support, warranty, indemnity,\n> or other liability obligations and/or - rights consistent with this\n> License. However, in accepting such obligations, - You may act only\n> on Your own behalf and on Your sole responsibility, - not on behalf\n> of any other Contributor, and only if You agree to indemnify,\n> - \ defend, and hold each Contributor harmless for any liability\n> incurred - by, or claims asserted against, such Contributor by reason\n> of your accepting - any such warranty or additional liability.\n>\n> END OF TERMS AND CONDITIONS\n>\n> - \ APPENDIX: How to apply the Apache License to your work.\n>\n> To apply - the Apache License to your work, attach the following\n> boilerplate notice, - with the fields enclosed by brackets \"[]\"\n> replaced with your own identifying - information. (Don't include\n> the brackets!) The text should be enclosed - in the appropriate\n> comment syntax for the file format. We also recommend - that a\n> file or class name and description of purpose be included on the\n> - \ same \"printed page\" as the copyright notice for easier\n> identification - within third-party archives.\n>\n> Copyright 2021 ehmicky <ehmicky@gmail.com>\n>\n> - \ Licensed under the Apache License, Version 2.0 (the \"License\");\n> you - may not use this file except in compliance with the License.\n> You may obtain - a copy of the License at\n>\n> http://www.apache.org/licenses/LICENSE-2.0\n>\n> - \ Unless required by applicable law or agreed to in writing, software\n> distributed - under the License is distributed on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied.\n> See the License for - the specific language governing permissions and\n> limitations under the License.\n\n----------------------------------------\n\n### - ignore@v5.2.0\n\nLicense: MIT\nBy: kael\nRepository: <git@github.com:kaelzhang/node-ignore.git>\n\n> - Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors\n> http://kael.me/\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> \"Software\"), to - deal in the Software without restriction, including\n> without limitation the - rights to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or - sell copies of the Software, and to\n> permit persons to whom the Software is - furnished to do so, subject to\n> the following conditions:\n>\n> The above copyright - notice and this permission notice shall be\n> included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION\n> WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### ignore@v5.2.4\n\nLicense: - MIT\nBy: kael\nRepository: <git@github.com:kaelzhang/node-ignore.git>\n\n> Copyright - (c) 2013 Kael Zhang <i@kael.me>, contributors\n> http://kael.me/\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> \"Software\"), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE\n> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION\n> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n> - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - import-fresh@v3.3.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - indent-string@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - indexes-of@v1.0.1\n\nLicense: MIT\nBy: Dominic Tarr\nRepository: <git://github.com/dominictarr/indexes-of.git>\n\n> - Copyright (c) 2013 Dominic Tarr\n>\n> Permission is hereby granted, free of charge, - \n> to any person obtaining a copy of this software and \n> associated documentation - files (the \"Software\"), to \n> deal in the Software without restriction, including - \n> without limitation the rights to use, copy, modify, \n> merge, publish, distribute, - sublicense, and/or sell \n> copies of the Software, and to permit persons to whom - \n> the Software is furnished to do so, \n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice \n> shall be included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \n> EXPRESS OR IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES \n> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. \n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR \n> ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, \n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH - THE \n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - inflight@v1.0.6\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <https://github.com/npm/inflight.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter\n>\n> Permission to use, - copy, modify, and/or distribute this software for any\n> purpose with or without - fee is hereby granted, provided that the above\n> copyright notice and this permission - notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - inherits@v2.0.4\n\nLicense: ISC\n\n> The ISC License\n>\n> Copyright (c) Isaac - Z. Schlueter\n>\n> Permission to use, copy, modify, and/or distribute this software - for any\n> purpose with or without fee is hereby granted, provided that the above\n> - copyright notice and this permission notice appear in all copies.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n> REGARD TO - THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n> FITNESS. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n> INDIRECT, OR - CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n> LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n> OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n> PERFORMANCE OF THIS - SOFTWARE.\n\n----------------------------------------\n\n### is-alphabetical@v1.0.4\n\nLicense: - MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright (c) 2016 Titus Wormer - <tituswormer@gmail.com>\n>\n> Permission is hereby granted, free of charge, to - any person obtaining\n> a copy of this software and associated documentation files - (the\n> 'Software'), to deal in the Software without restriction, including\n> - without limitation the rights to use, copy, modify, merge, publish,\n> distribute, - sublicense, and/or sell copies of the Software, and to\n> permit persons to whom - the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-alphanumerical@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-arrayish@v0.2.1\n\nLicense: MIT\nBy: Qix\nRepository: <https://github.com/qix-/node-is-arrayish.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 JD Ballard\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - is-buffer@v2.0.5\n\nLicense: MIT\nBy: Feross Aboukhadijeh\nRepository: <git://github.com/feross/is-buffer.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) Feross Aboukhadijeh\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - is-core-module@v2.11.0\n\nLicense: MIT\nBy: Jordan Harband\nRepository: <git+https://github.com/inspect-js/is-core-module.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2014 Dave Justice\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy of\n> this software - and associated documentation files (the \"Software\"), to deal in\n> the Software - without restriction, including without limitation the rights to\n> use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies of\n> the Software, - and to permit persons to whom the Software is furnished to do so,\n> subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-decimal@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-extglob@v2.1.1\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-2016, Jon Schlinkert\n>\n> Permission is hereby granted, free - of charge, to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - is-fullwidth-code-point@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-glob@v4.0.3\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-2017, Jon Schlinkert.\n>\n> Permission is hereby granted, free - of charge, to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - is-hexadecimal@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-number@v7.0.0\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-present, Jon Schlinkert.\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - is-path-cwd@v2.2.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-path-inside@v3.0.3\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-plain-obj@v2.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-stream@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-whitespace-character@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT - License)\n>\n> Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> 'Software'), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - is-word-character@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - isexe@v2.0.0\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git+https://github.com/isaacs/isexe.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - jest-docblock@v28.1.1\n\nLicense: MIT\nRepository: <https://github.com/facebook/jest.git>\n\n> - MIT License\n>\n> Copyright (c) Facebook, Inc. and its affiliates.\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - js-tokens@v4.0.0\n\nLicense: MIT\nBy: Simon Lydell\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - json-parse-even-better-errors@v2.3.1\n\nLicense: MIT\nBy: Kat Marchán\n\n> Copyright - 2017 Kat Marchán\n> Copyright npm, Inc.\n>\n> Permission is hereby granted, free - of charge, to any person obtaining a\n> copy of this software and associated documentation - files (the \"Software\"),\n> to deal in the Software without restriction, including - without limitation\n> the rights to use, copy, modify, merge, publish, distribute, - sublicense,\n> and/or sell copies of the Software, and to permit persons to whom - the\n> Software is furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER\n> DEALINGS IN THE SOFTWARE.\n>\n> ---\n>\n> This - library is a fork of 'better-json-errors' by Kat Marchán, extended and\n> distributed - under the terms of the MIT license above.\n\n----------------------------------------\n\n### - json5@v2.2.2\n\nLicense: MIT\nBy: Aseem Kishore\nRepository: <git+https://github.com/json5/json5.git>\n\n> - MIT License\n>\n> Copyright (c) 2012-2018 Aseem Kishore, and [others].\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n>\n> [others]: - https://github.com/json5/json5/contributors\n\n----------------------------------------\n\n### - leven@v2.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> The MIT License (MIT)\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### leven@v4.0.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### lines-and-columns@v1.2.4\n\nLicense: - MIT\nBy: Brian Donovan\nRepository: <https://github.com/eventualbuddha/lines-and-columns.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 Brian Donovan\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - lines-and-columns@v2.0.3\n\nLicense: MIT\nBy: Brian Donovan\nRepository: <https://github.com/eventualbuddha/lines-and-columns.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 Brian Donovan\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - linguist-languages@v7.21.0\n\nLicense: MIT\nBy: Ika\n\n> MIT License\n>\n> Copyright - (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - locate-path@v5.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - lru-cache@v4.1.5\n\nLicense: ISC\nBy: Isaac Z. Schlueter\n\n> The ISC License\n>\n> - Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> Permission to use, copy, - modify, and/or distribute this software for any\n> purpose with or without fee - is hereby granted, provided that the above\n> copyright notice and this permission - notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - lru-cache@v6.0.0\n\nLicense: ISC\nBy: Isaac Z. Schlueter\n\n> The ISC License\n>\n> - Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> Permission to use, copy, - modify, and/or distribute this software for any\n> purpose with or without fee - is hereby granted, provided that the above\n> copyright notice and this permission - notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - make-dir@v3.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - map-age-cleaner@v0.1.3\n\nLicense: MIT\nBy: Sam Verschueren\n\n> MIT License\n>\n> - Copyright (c) Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - markdown-escapes@v1.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - mem@v9.0.2\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - merge-stream@v2.0.0\n\nLicense: MIT\nBy: Stephen Sugden\n\n> The MIT License (MIT)\n>\n> - Copyright (c) Stephen Sugden <me@stephensugden.com> (stephensugden.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### merge2@v1.4.1\n\nLicense: - MIT\nRepository: <git@github.com:teambition/merge2.git>\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-2020 Teambition\n>\n> Permission is hereby granted, free of - charge, to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - meriyah@v4.2.1\n\nLicense: ISC\nBy: Kenny F.\nRepository: <https://github.com/meriyah/meriyah>\n\n> - ISC License\n>\n> Copyright (c) 2019 and later, KFlash and others.\n>\n> Permission - to use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted, provided that the above copyright notice and this - permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" - AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING - ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - micromatch@v4.0.5\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2014-present, Jon Schlinkert.\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - mimic-fn@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - minimatch@v3.1.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git://github.com/isaacs/minimatch.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - minimist@v1.2.6\n\nLicense: MIT\nBy: James Halliday\nRepository: <git://github.com/substack/minimist.git>\n\n> - This software is released under the MIT license:\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of\n> the Software, and to permit persons - to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - n-readlines@v1.0.1\n\nLicense: MIT\nBy: Yoan Arnaudov\nRepository: <http://github.com/nacholibre/node-readlines.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2013 Liucw\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy of\n> this software and - associated documentation files (the \"Software\"), to deal in\n> the Software - without restriction, including without limitation the rights to\n> use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies of\n> the Software, - and to permit persons to whom the Software is furnished to do so,\n> subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - npm-run-path@v5.1.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - once@v1.4.0\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git://github.com/isaacs/once>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - onetime@v6.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - outdent@v0.8.0\n\nLicense: MIT\nBy: Andrew Bradley\nRepository: <git+https://github.com/cspotcode/outdent.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2016 Andrew Bradley\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - p-defer@v1.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> The MIT License (MIT)\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### p-limit@v2.3.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### p-locate@v4.1.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### p-map@v4.0.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (https://sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, - to any person obtaining a copy of this software and associated documentation files - (the \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### p-try@v2.2.0\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### parse-entities@v2.0.0\n\nLicense: - MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright (c) 2015 Titus Wormer - <mailto:tituswormer@gmail.com>\n>\n> Permission is hereby granted, free of charge, - to any person obtaining\n> a copy of this software and associated documentation - files (the\n> 'Software'), to deal in the Software without restriction, including\n> - without limitation the rights to use, copy, modify, merge, publish,\n> distribute, - sublicense, and/or sell copies of the Software, and to\n> permit persons to whom - the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - parse-json@v5.2.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - parse-srcset@v1.0.2\n\nLicense: MIT\nBy: Alex Bell\nRepository: <git+https://github.com/albell/parse-srcset.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2014 Alex Bell\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - path-exists@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - path-is-absolute@v1.0.1\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> The MIT License - (MIT)\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy\n> - of this software and associated documentation files (the \"Software\"), to deal\n> - in the Software without restriction, including without limitation the rights\n> - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies - of the Software, and to permit persons to whom the Software is\n> furnished to - do so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in\n> all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO - EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES - OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### path-key@v3.1.1\n\nLicense: - MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> - (sindresorhus.com)\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated documentation files (the - \"Software\"), to deal in the Software without restriction, including without - limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following conditions:\n>\n> The above copyright - notice and this permission notice shall be included in all copies or substantial - portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY - OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE.\n\n----------------------------------------\n\n### path-parse@v1.0.7\n\nLicense: - MIT\nBy: Javier Blanco\nRepository: <https://github.com/jbgutierrez/path-parse.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 Javier Blanco\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - path-type@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - picocolors@v0.2.1\n\nLicense: ISC\nBy: Alexey Raspopov\n\n> ISC License\n>\n> - Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n>\n> Permission - to use, copy, modify, and/or distribute this software for any\n> purpose with - or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF\n> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - picomatch@v2.3.1\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License (MIT)\n>\n> - Copyright (c) 2017-present, Jon Schlinkert.\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - pkg-dir@v4.2.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - please-upgrade-node@v3.2.0\n\nLicense: MIT\nBy: typicode\nRepository: <git+https://github.com/typicode/please-upgrade-node.git>\n\n> - MIT License\n>\n> Copyright (c) 2017 \n>\n> Permission is hereby granted, free - of charge, to any person obtaining a copy\n> of this software and associated documentation - files (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - postcss@v7.0.39\n\nLicense: MIT\nBy: Andrey Sitnik\n\n> The MIT License (MIT)\n>\n> - Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of\n> the Software, and to permit persons - to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - postcss-less@v3.1.4\n\nLicense: MIT\nBy: Denys Kniazevych\n\n> The MIT License - (MIT)\n>\n> Copyright (c) 2013 Andrey Sitnik <andrey@sitnik.ru>\n> Copyright (c) - 2016 Denys Kniazevych <webschik@gmail.com>\n> Copyright (c) 2016 Pat Sissons <patricksissons@gmail.com>\n> - Copyright (c) 2017 Andrew Powell <andrew@shellscape.org>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - postcss-media-query-parser@v0.2.3\n\nLicense: MIT\nBy: dryoma\nRepository: <git+https://github.com/dryoma/postcss-media-query-parser.git>\n\n----------------------------------------\n\n### - postcss-scss@v2.1.1\n\nLicense: MIT\nBy: Andrey Sitnik\n\n> The MIT License (MIT)\n>\n> - Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of\n> the Software, and to permit persons - to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - postcss-selector-parser@v2.2.3\n\nLicense: MIT\nBy: Ben Briggs\n\n> Copyright - (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)\n>\n> Permission is - hereby granted, free of charge, to any person\n> obtaining a copy of this software - and associated documentation\n> files (the \"Software\"), to deal in the Software - without\n> restriction, including without limitation the rights to use,\n> copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the\n> Software is furnished to do so, subject to - the following\n> conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n> OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT\n> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n> - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n> OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - postcss-values-parser@v2.0.1\n\nLicense: MIT\nBy: Andrew Powell (shellscape)\n\n> - Copyright (c) Andrew Powell <andrew@shellscape.org>\n>\n> Permission is hereby - granted, free of charge, to any person\n> obtaining a copy of this software and - associated documentation\n> files (the \"Software\"), to deal in the Software - without\n> restriction, including without limitation the rights to use,\n> copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the\n> Software is furnished to do so, subject to - the following\n> conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n> OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT\n> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n> - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n> FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n> OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - pseudomap@v1.0.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git+https://github.com/isaacs/pseudomap.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - queue-microtask@v1.2.3\n\nLicense: MIT\nBy: Feross Aboukhadijeh\nRepository: <git://github.com/feross/queue-microtask.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) Feross Aboukhadijeh\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of\n> this software - and associated documentation files (the \"Software\"), to deal in\n> the Software - without restriction, including without limitation the rights to\n> use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies of\n> the Software, - and to permit persons to whom the Software is furnished to do so,\n> subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - remark-footnotes@v2.0.0\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2020 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - remark-math@v3.0.1\n\nLicense: MIT\nBy: Junyoung Choi\n\n----------------------------------------\n\n### - remark-parse@v8.0.3\n\nLicense: MIT\nBy: Titus Wormer\n\n----------------------------------------\n\n### - repeat-string@v1.6.1\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License - (MIT)\n>\n> Copyright (c) 2014-2016, Jon Schlinkert.\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - resolve@v1.22.1\n\nLicense: MIT\nBy: James Halliday\nRepository: <git://github.com/browserify/resolve.git>\n\n> - MIT License\n>\n> Copyright (c) 2012 James Halliday\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - resolve-from@v4.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - reusify@v1.0.4\n\nLicense: MIT\nBy: Matteo Collina\nRepository: <git+https://github.com/mcollina/reusify.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2015 Matteo Collina\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - rimraf@v3.0.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\n\n> The ISC License\n>\n> - Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> Permission to use, copy, - modify, and/or distribute this software for any\n> purpose with or without fee - is hereby granted, provided that the above\n> copyright notice and this permission - notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY - DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - rollup-plugin-node-polyfills@v0.2.1\n\nLicense: MIT\nRepository: <git@github.com:ionic-team/rollup-plugin-node-polyfills.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2019 these people\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - run-parallel@v1.2.0\n\nLicense: MIT\nBy: Feross Aboukhadijeh\nRepository: <git://github.com/feross/run-parallel.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) Feross Aboukhadijeh\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of\n> this software - and associated documentation files (the \"Software\"), to deal in\n> the Software - without restriction, including without limitation the rights to\n> use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies of\n> the Software, - and to permit persons to whom the Software is furnished to do so,\n> subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - sdbm@v2.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - semver@v6.3.0\n\nLicense: ISC\n\n> The ISC License\n>\n> Copyright (c) Isaac Z. - Schlueter and Contributors\n>\n> Permission to use, copy, modify, and/or distribute - this software for any\n> purpose with or without fee is hereby granted, provided - that the above\n> copyright notice and this permission notice appear in all copies.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE.\n\n----------------------------------------\n\n### semver@v7.3.7\n\nLicense: - ISC\nBy: GitHub Inc.\nRepository: <https://github.com/npm/node-semver.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - semver@v7.3.8\n\nLicense: ISC\nBy: GitHub Inc.\nRepository: <https://github.com/npm/node-semver.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - semver-compare@v1.0.0\n\nLicense: MIT\nBy: James Halliday\nRepository: <git://github.com/substack/semver-compare.git>\n\n> - This software is released under the MIT license:\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of\n> the Software, and to permit persons - to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n> FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n> COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n> IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - shebang-command@v2.0.0\n\nLicense: MIT\nBy: Kevin Mårtensson\n\n> MIT License\n>\n> - Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - shebang-regex@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - sigmund@v1.0.1\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git://github.com/isaacs/sigmund>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - signal-exit@v3.0.7\n\nLicense: ISC\nBy: Ben Coe\nRepository: <https://github.com/tapjs/signal-exit.git>\n\n> - The ISC License\n>\n> Copyright (c) 2015, Contributors\n>\n> Permission to use, - copy, modify, and/or distribute this software\n> for any purpose with or without - fee is hereby granted, provided\n> that the above copyright notice and this permission - notice\n> appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE - AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE INCLUDING ALL - IMPLIED WARRANTIES\n> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR - BE\n> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES\n> OR - ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\n> WHETHER - IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\n> ARISING OUT - OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - simple-html-tokenizer@v0.5.11\n\nLicense: MIT\nRepository: <https://github.com/tildeio/simple-html-tokenizer.git>\n\n> - Copyright (c) 2014 Yehuda Katz and contributors\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy of\n> this software and associated - documentation files (the \"Software\"), to deal in\n> the Software without restriction, - including without limitation the rights to\n> use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies\n> of the Software, and to permit persons - to whom the Software is furnished to do\n> so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in all\n> - copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - slash@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - state-toggle@v1.0.3\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - string-width@v5.0.1\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - strip-ansi@v7.0.1\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - strip-final-newline@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - supports-color@v5.5.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - temp-dir@v2.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - tempy@v2.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> Copyright - (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the \"Software\"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and - to permit persons to whom the Software is furnished to do so, subject to the following - conditions:\n>\n> The above copyright notice and this permission notice shall - be included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE - IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - to-regex-range@v5.0.1\n\nLicense: MIT\nBy: Jon Schlinkert\n\n> The MIT License - (MIT)\n>\n> Copyright (c) 2015-present, Jon Schlinkert.\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - trim@v0.0.1\n\nBy: TJ Holowaychuk\n\n----------------------------------------\n\n### - trim-trailing-lines@v1.1.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.com>\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> 'Software'), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - trough@v1.0.5\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright - (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - tslib@v1.14.1\n\nLicense: 0BSD\nBy: Microsoft Corp.\nRepository: <https://github.com/Microsoft/tslib.git>\n\n> - Copyright (c) Microsoft Corporation.\n> \n> Permission to use, copy, modify, and/or - distribute this software for any\n> purpose with or without fee is hereby granted.\n> - \n> THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH\n> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n> - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n> - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n> - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n> - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n> PERFORMANCE - OF THIS SOFTWARE.\n\n----------------------------------------\n\n### tsutils@v3.21.0\n\nLicense: - MIT\nBy: Klaus Meinhardt\nRepository: <https://github.com/ajafff/tsutils>\n\n> - The MIT License (MIT)\n> \n> Copyright (c) 2017 Klaus Meinhardt\n> \n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n> \n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n> - \n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - typescript@v5.0.2\n\nLicense: Apache-2.0\nBy: Microsoft Corp.\nRepository: <https://github.com/Microsoft/TypeScript.git>\n\n> - Apache License\n> \n> Version 2.0, January 2004\n> \n> http://www.apache.org/licenses/ - \n> \n> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n> \n> 1. - Definitions.\n> \n> \"License\" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document.\n> \n> \"Licensor\" - shall mean the copyright owner or entity authorized by the copyright owner that - is granting the License.\n> \n> \"Legal Entity\" shall mean the union of the acting - entity and all other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, \"control\" means - (i) the power, direct or indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) - or more of the outstanding shares, or (iii) beneficial ownership of such entity.\n> - \n> \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising - permissions granted by this License.\n> \n> \"Source\" form shall mean the preferred - form for making modifications, including but not limited to software source code, - documentation source, and configuration files.\n> \n> \"Object\" form shall mean - any form resulting from mechanical transformation or translation of a Source form, - including but not limited to compiled object code, generated documentation, and - conversions to other media types.\n> \n> \"Work\" shall mean the work of authorship, - whether in Source or Object form, made available under the License, as indicated - by a copyright notice that is included in or attached to the work (an example - is provided in the Appendix below).\n> \n> \"Derivative Works\" shall mean any - work, whether in Source or Object form, that is based on (or derived from) the - Work and for which the editorial revisions, annotations, elaborations, or other - modifications represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain separable - from, or merely link (or bind by name) to the interfaces of, the Work and Derivative - Works thereof.\n> \n> \"Contribution\" shall mean any work of authorship, including - the original version of the Work and any modifications or additions to that Work - or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion - in the Work by the copyright owner or by an individual or Legal Entity authorized - to submit on behalf of the copyright owner. For the purposes of this definition, - \"submitted\" means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to communication - on electronic mailing lists, source code control systems, and issue tracking systems - that are managed by, or on behalf of, the Licensor for the purpose of discussing - and improving the Work, but excluding communication that is conspicuously marked - or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"\n> - \n> \"Contributor\" shall mean Licensor and any individual or Legal Entity on - behalf of whom a Contribution has been received by Licensor and subsequently incorporated - within the Work.\n> \n> 2. Grant of Copyright License. Subject to the terms and - conditions of this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license - to reproduce, prepare Derivative Works of, publicly display, publicly perform, - sublicense, and distribute the Work and such Derivative Works in Source or Object - form.\n> \n> 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, - no-charge, royalty-free, irrevocable (except as stated in this section) patent - license to make, have made, use, offer to sell, sell, import, and otherwise transfer - the Work, where such license applies only to those patent claims licensable by - such Contributor that are necessarily infringed by their Contribution(s) alone - or by combination of their Contribution(s) with the Work to which such Contribution(s) - was submitted. If You institute patent litigation against any entity (including - a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution - incorporated within the Work constitutes direct or contributory patent infringement, - then any patent licenses granted to You under this License for that Work shall - terminate as of the date such litigation is filed.\n> \n> 4. Redistribution. You - may reproduce and distribute copies of the Work or Derivative Works thereof in - any medium, with or without modifications, and in Source or Object form, provided - that You meet the following conditions:\n> \n> You must give any other recipients - of the Work or Derivative Works a copy of this License; and\n> \n> You must cause - any modified files to carry prominent notices stating that You changed the files; - and\n> \n> You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices from the - Source form of the Work, excluding those notices that do not pertain to any part - of the Derivative Works; and\n> \n> If the Work includes a \"NOTICE\" text file - as part of its distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained within such NOTICE - file, excluding those notices that do not pertain to any part of the Derivative - Works, in at least one of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or documentation, if provided - along with the Derivative Works; or, within a display generated by the Derivative - Works, if and wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and do not modify the License. - You may add Your own attribution notices within Derivative Works that You distribute, - alongside or as an addendum to the NOTICE text from the Work, provided that such - additional attribution notices cannot be construed as modifying the License. You - may add Your own copyright statement to Your modifications and may provide additional - or different license terms and conditions for use, reproduction, or distribution - of Your modifications, or for any such Derivative Works as a whole, provided Your - use, reproduction, and distribution of the Work otherwise complies with the conditions - stated in this License.\n> \n> 5. Submission of Contributions. Unless You explicitly - state otherwise, any Contribution intentionally submitted for inclusion in the - Work by You to the Licensor shall be under the terms and conditions of this License, - without any additional terms or conditions. Notwithstanding the above, nothing - herein shall supersede or modify the terms of any separate license agreement you - may have executed with Licensor regarding such Contributions.\n> \n> 6. Trademarks. - This License does not grant permission to use the trade names, trademarks, service - marks, or product names of the Licensor, except as required for reasonable and - customary use in describing the origin of the Work and reproducing the content - of the NOTICE file.\n> \n> 7. Disclaimer of Warranty. Unless required by applicable - law or agreed to in writing, Licensor provides the Work (and each Contributor - provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied, including, without limitation, any warranties - or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR - PURPOSE. You are solely responsible for determining the appropriateness of using - or redistributing the Work and assume any risks associated with Your exercise - of permissions under this License.\n> \n> 8. Limitation of Liability. In no event - and under no legal theory, whether in tort (including negligence), contract, or - otherwise, unless required by applicable law (such as deliberate and grossly negligent - acts) or agreed to in writing, shall any Contributor be liable to You for damages, - including any direct, indirect, special, incidental, or consequential damages - of any character arising as a result of this License or out of the use or inability - to use the Work (including but not limited to damages for loss of goodwill, work - stoppage, computer failure or malfunction, or any and all other commercial damages - or losses), even if such Contributor has been advised of the possibility of such - damages.\n> \n> 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, and charge a fee - for, acceptance of support, warranty, indemnity, or other liability obligations - and/or rights consistent with this License. However, in accepting such obligations, - You may act only on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, defend, and hold - each Contributor harmless for any liability incurred by, or claims asserted against, - such Contributor by reason of your accepting any such warranty or additional liability.\n> - \n> END OF TERMS AND CONDITIONS\n\n----------------------------------------\n\n### - unherit@v1.1.3\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - unified@v9.2.1\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - uniq@v1.0.1\n\nLicense: MIT\nBy: Mikola Lysenko\nRepository: <git://github.com/mikolalysenko/uniq.git>\n\n> - The MIT License (MIT)\n>\n> Copyright (c) 2013 Mikola Lysenko\n>\n> Permission - is hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - unique-string@v3.0.0\n\nLicense: MIT\nBy: Sindre Sorhus\n\n> MIT License\n>\n> - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the \"Software\"), to deal in - the Software without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to do so, subject - to the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - unist-util-is@v4.1.0\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT license)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - unist-util-remove-position@v2.0.1\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The - MIT License)\n>\n> Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> - Permission is hereby granted, free of charge, to any person obtaining\n> a copy - of this software and associated documentation files (the\n> 'Software'), to deal - in the Software without restriction, including\n> without limitation the rights - to use, copy, modify, merge, publish,\n> distribute, sublicense, and/or sell copies - of the Software, and to\n> permit persons to whom the Software is furnished to - do so, subject to\n> the following conditions:\n>\n> The above copyright notice - and this permission notice shall be\n> included in all copies or substantial portions - of the Software.\n>\n> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY - KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO - EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES - OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE.\n\n----------------------------------------\n\n### unist-util-stringify-position@v2.0.3\n\nLicense: - MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright (c) 2016 Titus Wormer - <tituswormer@gmail.com>\n>\n> Permission is hereby granted, free of charge, to - any person obtaining\n> a copy of this software and associated documentation files - (the\n> 'Software'), to deal in the Software without restriction, including\n> - without limitation the rights to use, copy, modify, merge, publish,\n> distribute, - sublicense, and/or sell copies of the Software, and to\n> permit persons to whom - the Software is furnished to do so, subject to\n> the following conditions:\n>\n> - The above copyright notice and this permission notice shall be\n> included in - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT - LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n> - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n> SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - unist-util-visit@v2.0.3\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - unist-util-visit-parents@v3.1.1\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT - License)\n>\n> Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission - is hereby granted, free of charge, to any person obtaining\n> a copy of this software - and associated documentation files (the\n> 'Software'), to deal in the Software - without restriction, including\n> without limitation the rights to use, copy, - modify, merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - vfile@v4.2.1\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> Copyright - (c) 2015 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby granted, - free of charge, to any person obtaining a copy\n> of this software and associated - documentation files (the \"Software\"), to deal\n> in the Software without restriction, - including without limitation the rights\n> to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons - to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - vfile-location@v3.2.0\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - vfile-message@v2.0.4\n\nLicense: MIT\nBy: Titus Wormer\n\n> (The MIT License)\n>\n> - Copyright (c) 2017 Titus Wormer <tituswormer@gmail.com>\n>\n> Permission is hereby - granted, free of charge, to any person obtaining\n> a copy of this software and - associated documentation files (the\n> 'Software'), to deal in the Software without - restriction, including\n> without limitation the rights to use, copy, modify, - merge, publish,\n> distribute, sublicense, and/or sell copies of the Software, - and to\n> permit persons to whom the Software is furnished to do so, subject to\n> - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n> IN NO EVENT SHALL THE AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT,\n> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE\n> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n----------------------------------------\n\n### - vnopts@v1.0.2\n\nLicense: MIT\nBy: Ika\n\n> MIT License\n>\n> Copyright (c) Ika - <ikatyang@gmail.com> (https://github.com/ikatyang)\n>\n> Permission is hereby - granted, free of charge, to any person obtaining a copy\n> of this software and - associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n----------------------------------------\n\n### - wcwidth@v1.0.1\n\nLicense: MIT\nBy: Tim Oxley\nRepository: <git+https://github.com/timoxley/wcwidth.git>\n\n> - wcwidth.js: JavaScript Portng of Markus Kuhn's wcwidth() Implementation\n> =======================================================================\n>\n> - Copyright (C) 2012 by Jun Woong.\n>\n> This package is a JavaScript porting of - `wcwidth()` implementation\n> [by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c).\n>\n> - Permission is hereby granted, free of charge, to any person obtaining a copy of\n> - this software and associated documentation files (the \"Software\"), to deal in\n> - the Software without restriction, including without limitation the rights to\n> - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n> - of the Software, and to permit persons to whom the Software is furnished to do\n> - so, subject to the following conditions:\n>\n> The above copyright notice and - this permission notice shall be included in all\n> copies or substantial portions - of the Software.\n>\n>\n> THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES,\n> INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND\n> FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE AUTHOR\n> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL,\n> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO,\n> PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR\n> BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER\n> IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n> - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n> - POSSIBILITY OF SUCH DAMAGE.\n\n----------------------------------------\n\n### - which@v2.0.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git://github.com/isaacs/node-which.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - wrappy@v1.0.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <https://github.com/npm/wrappy>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - xtend@v4.0.2\n\nLicense: MIT\nBy: Raynos\n\n> The MIT License (MIT)\n> Copyright - (c) 2012-2014 Raynos.\n>\n> Permission is hereby granted, free of charge, to any - person obtaining a copy\n> of this software and associated documentation files - (the \"Software\"), to deal\n> in the Software without restriction, including - without limitation the rights\n> to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell\n> copies of the Software, and to permit persons to whom - the Software is\n> furnished to do so, subject to the following conditions:\n>\n> - The above copyright notice and this permission notice shall be included in\n> - all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n\n----------------------------------------\n\n### - yallist@v2.1.2\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git+https://github.com/isaacs/yallist.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - yallist@v4.0.0\n\nLicense: ISC\nBy: Isaac Z. Schlueter\nRepository: <git+https://github.com/isaacs/yallist.git>\n\n> - The ISC License\n>\n> Copyright (c) Isaac Z. Schlueter and Contributors\n>\n> - Permission to use, copy, modify, and/or distribute this software for any\n> purpose - with or without fee is hereby granted, provided that the above\n> copyright notice - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n> WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF\n> MERCHANTABILITY AND FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR\n> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES\n> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN\n> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - OUT OF OR\n> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----------------------------------------\n\n### - yaml@v1.10.2\n\nLicense: ISC\nBy: Eemeli Aro\n\n> Copyright 2018 Eemeli Aro <eemeli@gmail.com>\n>\n> - Permission to use, copy, modify, and/or distribute this software for any purpose\n> - with or without fee is hereby granted, provided that the above copyright notice\n> - and this permission notice appear in all copies.\n>\n> THE SOFTWARE IS PROVIDED - \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n> REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n> FITNESS. IN NO EVENT - SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n> INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n> OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n> TORTIOUS ACTION, ARISING - OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n> THIS SOFTWARE.\n\n----------------------------------------\n\n### - yaml-unist-parser@v1.3.1\n\nLicense: MIT\nBy: Ika\n\n> MIT License\n>\n> Copyright - (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)\n>\n> Permission is - hereby granted, free of charge, to any person obtaining a copy\n> of this software - and associated documentation files (the \"Software\"), to deal\n> in the Software - without restriction, including without limitation the rights\n> to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, - and to permit persons to whom the Software is\n> furnished to do so, subject to - the following conditions:\n>\n> The above copyright notice and this permission - notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS - OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n" -notices: [] diff --git a/.licenses/npm/ts-poet.dep.yml b/.licenses/npm/ts-poet.dep.yml deleted file mode 100644 index 15ea4f6c0..000000000 --- a/.licenses/npm/ts-poet.dep.yml +++ /dev/null @@ -1,216 +0,0 @@ ---- -name: ts-poet -version: 4.15.0 -type: npm -summary: code generation DSL for TypeScript -homepage: -license: apache-2.0 -licenses: -- sources: LICENSE.txt - text: |2+ - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -notices: [] -... diff --git a/.licenses/npm/twirp-ts.dep.yml b/.licenses/npm/twirp-ts.dep.yml deleted file mode 100644 index f557a4860..000000000 --- a/.licenses/npm/twirp-ts.dep.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: twirp-ts -version: 2.5.0 -type: npm -summary: Typescript implementation of the Twirp protocol -homepage: -license: mit -licenses: -- sources: README.md - text: MIT <3 -notices: [] diff --git a/.licenses/npm/yaml.dep.yml b/.licenses/npm/yaml.dep.yml deleted file mode 100644 index a870f57bd..000000000 --- a/.licenses/npm/yaml.dep.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: yaml -version: 1.10.2 -type: npm -summary: JavaScript parser and stringifier for YAML -homepage: https://eemeli.org/yaml/v1/ -license: isc -licenses: -- sources: LICENSE - text: | - Copyright 2018 Eemeli Aro <eemeli@gmail.com> - - Permission to use, copy, modify, and/or distribute this software for any purpose - with or without fee is hereby granted, provided that the above copyright notice - and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - THIS SOFTWARE. -notices: [] diff --git a/README.md b/README.md index 0c5548981..4508478c6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # setup-node [](https://github.com/actions/setup-node/actions/workflows/basic-validation.yml) @@ -76,6 +77,10 @@ See [action.yml](action.yml) # Set always-auth option in npmrc file. # Default: '' always-auth: '' + + # Optional mirror to download nodejs binaries from. + # Default: '' + mirror-url: '' ``` <!-- end usage --> @@ -86,7 +91,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm ci - run: npm test ``` @@ -103,7 +108,7 @@ The `node-version` input supports the Semantic Versioning Specification, for mor Examples: - - Major versions: `18`, `20` + - Major versions: `20`, `22` - More specific versions: `10.15`, `16.15.1` , `18.4.0` - NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`, `lts/-n` - Latest release: `*` or `latest`/`current`/`node` @@ -163,7 +168,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 14, 16, 18 ] + node: [ 18, 20, 22 ] name: Node ${{ matrix.node }} sample steps: - uses: actions/checkout@v4 @@ -203,6 +208,7 @@ If the runner is not able to access github.com, any Nodejs versions requested du - [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm) - [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn) - [Using private packages](docs/advanced-usage.md#use-private-packages) + - [Using mirror-url)](https://github.com/aparnajyothi-y/setup-node/edit/add-mirror-url/docs/advanced-usage.md#node-mirrors-nodejs-version-mirrors) ## Recommended permissions @@ -224,3 +230,5 @@ Contributions are welcome! See [Contributor's Guide](docs/contributors.md) ## Code of Conduct :wave: Be nice. See [our code of conduct](CODE_OF_CONDUCT.md) + + diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 501741a6b..5a3b0f9b7 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -13,6 +13,7 @@ import each from 'jest-each'; import * as main from '../src/main'; import * as util from '../src/util'; import OfficialBuilds from '../src/distributions/official_builds/official_builds'; +import {validateMirrorURL} from '../src/util'; describe('main tests', () => { let inputs = {} as any; @@ -280,4 +281,36 @@ describe('main tests', () => { ); }); }); + describe('mirror-url parameter', () => { + beforeEach(() => { + inputs['mirror-url'] = 'https://custom-mirror-url.com'; + }); + + afterEach(() => { + delete inputs['mirror-url']; + }); + + it('Read mirror-url if mirror-url is provided', async () => { + // Arrange + inputs['mirror-url'] = 'https://custom-mirror-url.com'; + + // Act + await main.run(); + + // Assert + expect(inputs['mirror-url']).toBeDefined(); + }); + + it('should throw an error if mirror-url is empty', async () => { + // Arrange + inputs['mirror-url'] = ' '; + + const logSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); // Mock the log function + + // Act & Assert + expect(() => validateMirrorURL(inputs['mirror-url'])).toThrow( + 'Mirror URL is empty. Please provide a valid mirror URL.' + ); + }); + }); }); diff --git a/__tests__/official-installer.test.ts b/__tests__/official-installer.test.ts index 2d8f17cfa..274166abf 100644 --- a/__tests__/official-installer.test.ts +++ b/__tests__/official-installer.test.ts @@ -10,6 +10,8 @@ import osm from 'os'; import path from 'path'; import * as main from '../src/main'; import * as auth from '../src/authutil'; +import isLtsAlias from '../src/distributions/official_builds/official_builds'; + import OfficialBuilds from '../src/distributions/official_builds/official_builds'; import {INodeVersion} from '../src/distributions/base-models'; @@ -828,4 +830,35 @@ describe('setup-node', () => { } ); }); + describe('mirror-url parameter', () => { + it('default if mirror url is not provided', async () => { + os.platform = 'linux'; + os.arch = 'x64'; + + inputs['node-version'] = '11'; + inputs['check-latest'] = 'true'; + inputs['always-auth'] = false; + inputs['token'] = 'faketoken'; + + dlSpy.mockImplementation(async () => '/some/temp/path'); + const toolPath = path.normalize('/cache/node/12.11.0/x64'); + exSpy.mockImplementation(async () => '/some/other/temp/path'); + cacheSpy.mockImplementation(async () => toolPath); + + const dlmirrorSpy = jest.fn(); + dlmirrorSpy.mockImplementation(async () => 'mocked-download-path'); + await main.run(); + + const expPath = path.join(toolPath, 'bin'); + + expect(dlSpy).toHaveBeenCalled(); + expect(exSpy).toHaveBeenCalled(); + + expect(logSpy).toHaveBeenCalledWith( + 'Attempt to resolve the latest version from manifest...' + ); + + expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`); + }); + }); }); diff --git a/action.yml b/action.yml index 99db5869f..353028133 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,9 @@ inputs: default: false registry-url: description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.' + mirror-url: + description: 'Custom mirror URL to download Node.js' + required: false scope: description: 'Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).' token: diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 9d8d19809..128702ad6 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core.warning(`Cache not found for keys: ${keys.join(', ')}`); + core.debug(`Cache not found for keys: ${keys.join(', ')}`); return undefined; } core.info(`Cache hit for: ${request.key}`); @@ -412,12 +412,20 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { key, version }; - const response = yield twirpClient.CreateCacheEntry(request); - if (!response.ok) { + let signedUploadUrl; + try { + const response = yield twirpClient.CreateCacheEntry(request); + if (!response.ok) { + throw new Error('Response was not ok'); + } + signedUploadUrl = response.signedUploadUrl; + } + catch (error) { + core.debug(`Failed to reserve cache: ${error}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } core.debug(`Attempting to upload cache located at: ${archivePath}`); - yield cacheHttpClient.saveCache(cacheId, archivePath, response.signedUploadUrl, options); + yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, version, @@ -458,156 +466,13 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { /***/ }), -/***/ 4469: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Timestamp = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -const runtime_6 = __nccwpck_require__(4061); -const runtime_7 = __nccwpck_require__(4061); -// @generated message type with reflection information, may provide speed optimized methods -class Timestamp$Type extends runtime_7.MessageType { - constructor() { - super("google.protobuf.Timestamp", [ - { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } - ]); - } - /** - * Creates a new `Timestamp` for the current time. - */ - now() { - const msg = this.create(); - const ms = Date.now(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } - /** - * Converts a `Timestamp` to a JavaScript Date. - */ - toDate(message) { - return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000)); - } - /** - * Converts a JavaScript Date to a `Timestamp`. - */ - fromDate(date) { - const msg = this.create(); - const ms = date.getTime(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } - /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. - */ - internalJsonWrite(message, options) { - let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1000; - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (message.nanos < 0) - throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); - let z = "Z"; - if (message.nanos > 0) { - let nanosStr = (message.nanos + 1000000000).toString().substring(1); - if (nanosStr.substring(3) === "000000") - z = "." + nanosStr.substring(0, 3) + "Z"; - else if (nanosStr.substring(6) === "000") - z = "." + nanosStr.substring(0, 6) + "Z"; - else - z = "." + nanosStr + "Z"; - } - return new Date(ms).toISOString().replace(".000Z", z); - } - /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. - */ - internalJsonRead(json, options, target) { - if (typeof json !== "string") - throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_5.typeofJsonValue)(json) + "."); - let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); - if (!matches) - throw new Error("Unable to parse Timestamp from JSON. Invalid format."); - let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); - if (Number.isNaN(ms)) - throw new Error("Unable to parse Timestamp from JSON. Invalid value."); - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (!target) - target = this.create(); - target.seconds = runtime_6.PbLong.from(ms / 1000).toString(); - target.nanos = 0; - if (matches[7]) - target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000); - return target; - } - create(value) { - const message = { seconds: "0", nanos: 0 }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 seconds */ 1: - message.seconds = reader.int64().toString(); - break; - case /* int32 nanos */ 2: - message.nanos = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* int64 seconds = 1; */ - if (message.seconds !== "0") - writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); - /* int32 nanos = 2; */ - if (message.nanos !== 0) - writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.Timestamp - */ -exports.Timestamp = new Timestamp$Type(); -//# sourceMappingURL=timestamp.js.map - -/***/ }), - /***/ 4388: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheService = exports.LookupCacheEntryResponse = exports.LookupCacheEntryRequest = exports.ListCacheEntriesResponse = exports.ListCacheEntriesRequest = exports.DeleteCacheEntryResponse = exports.DeleteCacheEntryRequest = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; +exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; // @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies // @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3) // tslint:disable @@ -617,7 +482,6 @@ const runtime_2 = __nccwpck_require__(4061); const runtime_3 = __nccwpck_require__(4061); const runtime_4 = __nccwpck_require__(4061); const runtime_5 = __nccwpck_require__(4061); -const cacheentry_1 = __nccwpck_require__(3639); const cachemetadata_1 = __nccwpck_require__(7988); // @generated message type with reflection information, may provide speed optimized methods class CreateCacheEntryRequest$Type extends runtime_5.MessageType { @@ -985,376 +849,25 @@ class GetCacheEntryDownloadURLResponse$Type extends runtime_5.MessageType { * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse */ exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DeleteCacheEntryRequest$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.DeleteCacheEntryRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value) { - const message = { key: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest - */ -exports.DeleteCacheEntryRequest = new DeleteCacheEntryRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DeleteCacheEntryResponse$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.DeleteCacheEntryResponse", [ - { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ } - ]); - } - create(value) { - const message = { ok: false, entryId: "0" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool ok */ 1: - message.ok = reader.bool(); - break; - case /* int64 entry_id */ 2: - message.entryId = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* bool ok = 1; */ - if (message.ok !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - /* int64 entry_id = 2; */ - if (message.entryId !== "0") - writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse - */ -exports.DeleteCacheEntryResponse = new DeleteCacheEntryResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListCacheEntriesRequest$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.ListCacheEntriesRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value) { - const message = { key: "", restoreKeys: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - case /* repeated string restore_keys */ 3: - message.restoreKeys.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - /* repeated string restore_keys = 3; */ - for (let i = 0; i < message.restoreKeys.length; i++) - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesRequest - */ -exports.ListCacheEntriesRequest = new ListCacheEntriesRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListCacheEntriesResponse$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.ListCacheEntriesResponse", [ - { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => cacheentry_1.CacheEntry } - ]); - } - create(value) { - const message = { entries: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated github.actions.results.entities.v1.CacheEntry entries */ 1: - message.entries.push(cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* repeated github.actions.results.entities.v1.CacheEntry entries = 1; */ - for (let i = 0; i < message.entries.length; i++) - cacheentry_1.CacheEntry.internalBinaryWrite(message.entries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesResponse - */ -exports.ListCacheEntriesResponse = new ListCacheEntriesResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class LookupCacheEntryRequest$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.LookupCacheEntryRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value) { - const message = { key: "", restoreKeys: [], version: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - case /* repeated string restore_keys */ 3: - message.restoreKeys.push(reader.string()); - break; - case /* string version */ 4: - message.version = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - /* repeated string restore_keys = 3; */ - for (let i = 0; i < message.restoreKeys.length; i++) - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); - /* string version = 4; */ - if (message.version !== "") - writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryRequest - */ -exports.LookupCacheEntryRequest = new LookupCacheEntryRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class LookupCacheEntryResponse$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.LookupCacheEntryResponse", [ - { no: 1, name: "exists", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "entry", kind: "message", T: () => cacheentry_1.CacheEntry } - ]); - } - create(value) { - const message = { exists: false }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool exists */ 1: - message.exists = reader.bool(); - break; - case /* github.actions.results.entities.v1.CacheEntry entry */ 2: - message.entry = cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options, message.entry); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* bool exists = 1; */ - if (message.exists !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.exists); - /* github.actions.results.entities.v1.CacheEntry entry = 2; */ - if (message.entry) - cacheentry_1.CacheEntry.internalBinaryWrite(message.entry, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryResponse - */ -exports.LookupCacheEntryResponse = new LookupCacheEntryResponse$Type(); /** * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService */ exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ { name: "CreateCacheEntry", options: {}, I: exports.CreateCacheEntryRequest, O: exports.CreateCacheEntryResponse }, { name: "FinalizeCacheEntryUpload", options: {}, I: exports.FinalizeCacheEntryUploadRequest, O: exports.FinalizeCacheEntryUploadResponse }, - { name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse }, - { name: "DeleteCacheEntry", options: {}, I: exports.DeleteCacheEntryRequest, O: exports.DeleteCacheEntryResponse }, - { name: "ListCacheEntries", options: {}, I: exports.ListCacheEntriesRequest, O: exports.ListCacheEntriesResponse }, - { name: "LookupCacheEntry", options: {}, I: exports.LookupCacheEntryRequest, O: exports.LookupCacheEntryResponse } + { name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse } ]); //# sourceMappingURL=cache.js.map /***/ }), -/***/ 267: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 2655: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createCacheServiceServer = exports.CacheServiceMethodList = exports.CacheServiceMethod = exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; -const twirp_ts_1 = __nccwpck_require__(6465); +exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; const cache_1 = __nccwpck_require__(4388); class CacheServiceClientJSON { constructor(rpc) { @@ -1362,9 +875,6 @@ class CacheServiceClientJSON { this.CreateCacheEntry.bind(this); this.FinalizeCacheEntryUpload.bind(this); this.GetCacheEntryDownloadURL.bind(this); - this.DeleteCacheEntry.bind(this); - this.ListCacheEntries.bind(this); - this.LookupCacheEntry.bind(this); } CreateCacheEntry(request) { const data = cache_1.CreateCacheEntryRequest.toJson(request, { @@ -1396,36 +906,6 @@ class CacheServiceClientJSON { ignoreUnknownFields: true, })); } - DeleteCacheEntry(request) { - const data = cache_1.DeleteCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/json", data); - return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - ListCacheEntries(request) { - const data = cache_1.ListCacheEntriesRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/json", data); - return promise.then((data) => cache_1.ListCacheEntriesResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - LookupCacheEntry(request) { - const data = cache_1.LookupCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/json", data); - return promise.then((data) => cache_1.LookupCacheEntryResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } } exports.CacheServiceClientJSON = CacheServiceClientJSON; class CacheServiceClientProtobuf { @@ -1434,9 +914,6 @@ class CacheServiceClientProtobuf { this.CreateCacheEntry.bind(this); this.FinalizeCacheEntryUpload.bind(this); this.GetCacheEntryDownloadURL.bind(this); - this.DeleteCacheEntry.bind(this); - this.ListCacheEntries.bind(this); - this.LookupCacheEntry.bind(this); } CreateCacheEntry(request) { const data = cache_1.CreateCacheEntryRequest.toBinary(request); @@ -1453,610 +930,9 @@ class CacheServiceClientProtobuf { const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data)); } - DeleteCacheEntry(request) { - const data = cache_1.DeleteCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/protobuf", data); - return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromBinary(data)); - } - ListCacheEntries(request) { - const data = cache_1.ListCacheEntriesRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/protobuf", data); - return promise.then((data) => cache_1.ListCacheEntriesResponse.fromBinary(data)); - } - LookupCacheEntry(request) { - const data = cache_1.LookupCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/protobuf", data); - return promise.then((data) => cache_1.LookupCacheEntryResponse.fromBinary(data)); - } } exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; -var CacheServiceMethod; -(function (CacheServiceMethod) { - CacheServiceMethod["CreateCacheEntry"] = "CreateCacheEntry"; - CacheServiceMethod["FinalizeCacheEntryUpload"] = "FinalizeCacheEntryUpload"; - CacheServiceMethod["GetCacheEntryDownloadURL"] = "GetCacheEntryDownloadURL"; - CacheServiceMethod["DeleteCacheEntry"] = "DeleteCacheEntry"; - CacheServiceMethod["ListCacheEntries"] = "ListCacheEntries"; - CacheServiceMethod["LookupCacheEntry"] = "LookupCacheEntry"; -})(CacheServiceMethod || (exports.CacheServiceMethod = CacheServiceMethod = {})); -exports.CacheServiceMethodList = [ - CacheServiceMethod.CreateCacheEntry, - CacheServiceMethod.FinalizeCacheEntryUpload, - CacheServiceMethod.GetCacheEntryDownloadURL, - CacheServiceMethod.DeleteCacheEntry, - CacheServiceMethod.ListCacheEntries, - CacheServiceMethod.LookupCacheEntry, -]; -function createCacheServiceServer(service) { - return new twirp_ts_1.TwirpServer({ - service, - packageName: "github.actions.results.api.v1", - serviceName: "CacheService", - methodList: exports.CacheServiceMethodList, - matchRoute: matchCacheServiceRoute, - }); -} -exports.createCacheServiceServer = createCacheServiceServer; -function matchCacheServiceRoute(method, events) { - switch (method) { - case "CreateCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "CreateCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors); - }); - case "FinalizeCacheEntryUpload": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "FinalizeCacheEntryUpload" }); - yield events.onMatch(ctx); - return handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors); - }); - case "GetCacheEntryDownloadURL": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "GetCacheEntryDownloadURL" }); - yield events.onMatch(ctx); - return handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors); - }); - case "DeleteCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "DeleteCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors); - }); - case "ListCacheEntries": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "ListCacheEntries" }); - yield events.onMatch(ctx); - return handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors); - }); - case "LookupCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "LookupCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors); - }); - default: - events.onNotFound(); - const msg = `no handler found`; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.CreateCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.CreateCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.CreateCacheEntry(ctx, request); - } - return JSON.stringify(cache_1.CreateCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.FinalizeCacheEntryUploadRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.FinalizeCacheEntryUpload(ctx, inputReq); - }); - } - else { - response = yield service.FinalizeCacheEntryUpload(ctx, request); - } - return JSON.stringify(cache_1.FinalizeCacheEntryUploadResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.GetCacheEntryDownloadURLRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.GetCacheEntryDownloadURL(ctx, inputReq); - }); - } - else { - response = yield service.GetCacheEntryDownloadURL(ctx, request); - } - return JSON.stringify(cache_1.GetCacheEntryDownloadURLResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.DeleteCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.DeleteCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.DeleteCacheEntry(ctx, request); - } - return JSON.stringify(cache_1.DeleteCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.ListCacheEntriesRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.ListCacheEntries(ctx, inputReq); - }); - } - else { - response = yield service.ListCacheEntries(ctx, request); - } - return JSON.stringify(cache_1.ListCacheEntriesResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.LookupCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.LookupCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.LookupCacheEntry(ctx, request); - } - return JSON.stringify(cache_1.LookupCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); - }); -} -function handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.CreateCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.CreateCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.CreateCacheEntry(ctx, request); - } - return Buffer.from(cache_1.CreateCacheEntryResponse.toBinary(response)); - }); -} -function handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.FinalizeCacheEntryUploadRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.FinalizeCacheEntryUpload(ctx, inputReq); - }); - } - else { - response = yield service.FinalizeCacheEntryUpload(ctx, request); - } - return Buffer.from(cache_1.FinalizeCacheEntryUploadResponse.toBinary(response)); - }); -} -function handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.GetCacheEntryDownloadURLRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.GetCacheEntryDownloadURL(ctx, inputReq); - }); - } - else { - response = yield service.GetCacheEntryDownloadURL(ctx, request); - } - return Buffer.from(cache_1.GetCacheEntryDownloadURLResponse.toBinary(response)); - }); -} -function handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.DeleteCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.DeleteCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.DeleteCacheEntry(ctx, request); - } - return Buffer.from(cache_1.DeleteCacheEntryResponse.toBinary(response)); - }); -} -function handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.ListCacheEntriesRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.ListCacheEntries(ctx, inputReq); - }); - } - else { - response = yield service.ListCacheEntries(ctx, request); - } - return Buffer.from(cache_1.ListCacheEntriesResponse.toBinary(response)); - }); -} -function handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors) { - return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.LookupCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.LookupCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.LookupCacheEntry(ctx, request); - } - return Buffer.from(cache_1.LookupCacheEntryResponse.toBinary(response)); - }); -} -//# sourceMappingURL=cache.twirp.js.map - -/***/ }), - -/***/ 3639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheEntry = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -const timestamp_1 = __nccwpck_require__(4469); -// @generated message type with reflection information, may provide speed optimized methods -class CacheEntry$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheEntry", [ - { no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "size_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 4, name: "scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "created_at", kind: "message", T: () => timestamp_1.Timestamp }, - { no: 7, name: "last_accessed_at", kind: "message", T: () => timestamp_1.Timestamp }, - { no: 8, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp } - ]); - } - create(value) { - const message = { key: "", hash: "", sizeBytes: "0", scope: "", version: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string key */ 1: - message.key = reader.string(); - break; - case /* string hash */ 2: - message.hash = reader.string(); - break; - case /* int64 size_bytes */ 3: - message.sizeBytes = reader.int64().toString(); - break; - case /* string scope */ 4: - message.scope = reader.string(); - break; - case /* string version */ 5: - message.version = reader.string(); - break; - case /* google.protobuf.Timestamp created_at */ 6: - message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); - break; - case /* google.protobuf.Timestamp last_accessed_at */ 7: - message.lastAccessedAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAccessedAt); - break; - case /* google.protobuf.Timestamp expires_at */ 8: - message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* string key = 1; */ - if (message.key !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.key); - /* string hash = 2; */ - if (message.hash !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.hash); - /* int64 size_bytes = 3; */ - if (message.sizeBytes !== "0") - writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); - /* string scope = 4; */ - if (message.scope !== "") - writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.scope); - /* string version = 5; */ - if (message.version !== "") - writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.version); - /* google.protobuf.Timestamp created_at = 6; */ - if (message.createdAt) - timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp last_accessed_at = 7; */ - if (message.lastAccessedAt) - timestamp_1.Timestamp.internalBinaryWrite(message.lastAccessedAt, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp expires_at = 8; */ - if (message.expiresAt) - timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheEntry - */ -exports.CacheEntry = new CacheEntry$Type(); -//# sourceMappingURL=cacheentry.js.map +//# sourceMappingURL=cache.twirp-client.js.map /***/ }), @@ -3327,7 +2203,7 @@ const config_1 = __nccwpck_require__(5147); const cacheUtils_1 = __nccwpck_require__(1518); const auth_1 = __nccwpck_require__(5526); const http_client_1 = __nccwpck_require__(6255); -const cache_twirp_1 = __nccwpck_require__(267); +const cache_twirp_client_1 = __nccwpck_require__(2655); /** * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. * @@ -3464,7 +2340,7 @@ class CacheServiceClient { } function internalCacheTwirpClient(options) { const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); - return new cache_twirp_1.CacheServiceClientJSON(client); + return new cache_twirp_client_1.CacheServiceClientJSON(client); } exports.internalCacheTwirpClient = internalCacheTwirpClient; //# sourceMappingURL=cacheTwirpClient.js.map @@ -54333,599 +53209,6 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; -/***/ }), - -/***/ 4365: -/***/ ((module) => { - -"use strict"; - - -function _process (v, mod) { - var i - var r - - if (typeof mod === 'function') { - r = mod(v) - if (r !== undefined) { - v = r - } - } else if (Array.isArray(mod)) { - for (i = 0; i < mod.length; i++) { - r = mod[i](v) - if (r !== undefined) { - v = r - } - } - } - - return v -} - -function parseKey (key, val) { - // detect negative index notation - if (key[0] === '-' && Array.isArray(val) && /^-\d+$/.test(key)) { - return val.length + parseInt(key, 10) - } - return key -} - -function isIndex (k) { - return /^\d+$/.test(k) -} - -function isObject (val) { - return Object.prototype.toString.call(val) === '[object Object]' -} - -function isArrayOrObject (val) { - return Object(val) === val -} - -function isEmptyObject (val) { - return Object.keys(val).length === 0 -} - -var blacklist = ['__proto__', 'prototype', 'constructor'] -var blacklistFilter = function (part) { return blacklist.indexOf(part) === -1 } - -function parsePath (path, sep) { - if (path.indexOf('[') >= 0) { - path = path.replace(/\[/g, sep).replace(/]/g, '') - } - - var parts = path.split(sep) - - var check = parts.filter(blacklistFilter) - - if (check.length !== parts.length) { - throw Error('Refusing to update blacklisted property ' + path) - } - - return parts -} - -var hasOwnProperty = Object.prototype.hasOwnProperty - -function DotObject (separator, override, useArray, useBrackets) { - if (!(this instanceof DotObject)) { - return new DotObject(separator, override, useArray, useBrackets) - } - - if (typeof override === 'undefined') override = false - if (typeof useArray === 'undefined') useArray = true - if (typeof useBrackets === 'undefined') useBrackets = true - this.separator = separator || '.' - this.override = override - this.useArray = useArray - this.useBrackets = useBrackets - this.keepArray = false - - // contains touched arrays - this.cleanup = [] -} - -var dotDefault = new DotObject('.', false, true, true) -function wrap (method) { - return function () { - return dotDefault[method].apply(dotDefault, arguments) - } -} - -DotObject.prototype._fill = function (a, obj, v, mod) { - var k = a.shift() - - if (a.length > 0) { - obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {}) - - if (!isArrayOrObject(obj[k])) { - if (this.override) { - obj[k] = {} - } else { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error( - 'Trying to redefine `' + k + '` which is a ' + typeof obj[k] - ) - } - - return - } - } - - this._fill(a, obj[k], v, mod) - } else { - if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error("Trying to redefine non-empty obj['" + k + "']") - } - - return - } - - obj[k] = _process(v, mod) - } -} - -/** - * - * Converts an object with dotted-key/value pairs to it's expanded version - * - * Optionally transformed by a set of modifiers. - * - * Usage: - * - * var row = { - * 'nr': 200, - * 'doc.name': ' My Document ' - * } - * - * var mods = { - * 'doc.name': [_s.trim, _s.underscored] - * } - * - * dot.object(row, mods) - * - * @param {Object} obj - * @param {Object} mods - */ -DotObject.prototype.object = function (obj, mods) { - var self = this - - Object.keys(obj).forEach(function (k) { - var mod = mods === undefined ? null : mods[k] - // normalize array notation. - var ok = parsePath(k, self.separator).join(self.separator) - - if (ok.indexOf(self.separator) !== -1) { - self._fill(ok.split(self.separator), obj, obj[k], mod) - delete obj[k] - } else { - obj[k] = _process(obj[k], mod) - } - }) - - return obj -} - -/** - * @param {String} path dotted path - * @param {String} v value to be set - * @param {Object} obj object to be modified - * @param {Function|Array} mod optional modifier - */ -DotObject.prototype.str = function (path, v, obj, mod) { - var ok = parsePath(path, this.separator).join(this.separator) - - if (path.indexOf(this.separator) !== -1) { - this._fill(ok.split(this.separator), obj, v, mod) - } else { - obj[path] = _process(v, mod) - } - - return obj -} - -/** - * - * Pick a value from an object using dot notation. - * - * Optionally remove the value - * - * @param {String} path - * @param {Object} obj - * @param {Boolean} remove - */ -DotObject.prototype.pick = function (path, obj, remove, reindexArray) { - var i - var keys - var val - var key - var cp - - keys = parsePath(path, this.separator) - for (i = 0; i < keys.length; i++) { - key = parseKey(keys[i], obj) - if (obj && typeof obj === 'object' && key in obj) { - if (i === keys.length - 1) { - if (remove) { - val = obj[key] - if (reindexArray && Array.isArray(obj)) { - obj.splice(key, 1) - } else { - delete obj[key] - } - if (Array.isArray(obj)) { - cp = keys.slice(0, -1).join('.') - if (this.cleanup.indexOf(cp) === -1) { - this.cleanup.push(cp) - } - } - return val - } else { - return obj[key] - } - } else { - obj = obj[key] - } - } else { - return undefined - } - } - if (remove && Array.isArray(obj)) { - obj = obj.filter(function (n) { - return n !== undefined - }) - } - return obj -} -/** - * - * Delete value from an object using dot notation. - * - * @param {String} path - * @param {Object} obj - * @return {any} The removed value - */ -DotObject.prototype.delete = function (path, obj) { - return this.remove(path, obj, true) -} - -/** - * - * Remove value from an object using dot notation. - * - * Will remove multiple items if path is an array. - * In this case array indexes will be retained until all - * removals have been processed. - * - * Use dot.delete() to automatically re-index arrays. - * - * @param {String|Array<String>} path - * @param {Object} obj - * @param {Boolean} reindexArray - * @return {any} The removed value - */ -DotObject.prototype.remove = function (path, obj, reindexArray) { - var i - - this.cleanup = [] - if (Array.isArray(path)) { - for (i = 0; i < path.length; i++) { - this.pick(path[i], obj, true, reindexArray) - } - if (!reindexArray) { - this._cleanup(obj) - } - return obj - } else { - return this.pick(path, obj, true, reindexArray) - } -} - -DotObject.prototype._cleanup = function (obj) { - var ret - var i - var keys - var root - if (this.cleanup.length) { - for (i = 0; i < this.cleanup.length; i++) { - keys = this.cleanup[i].split('.') - root = keys.splice(0, -1).join('.') - ret = root ? this.pick(root, obj) : obj - ret = ret[keys[0]].filter(function (v) { - return v !== undefined - }) - this.set(this.cleanup[i], ret, obj) - } - this.cleanup = [] - } -} - -/** - * Alias method for `dot.remove` - * - * Note: this is not an alias for dot.delete() - * - * @param {String|Array<String>} path - * @param {Object} obj - * @param {Boolean} reindexArray - * @return {any} The removed value - */ -DotObject.prototype.del = DotObject.prototype.remove - -/** - * - * Move a property from one place to the other. - * - * If the source path does not exist (undefined) - * the target property will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.move = function (source, target, obj, mods, merge) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set(target, _process(this.pick(source, obj, true), mods), obj, merge) - } else { - merge = mods - this.set(target, this.pick(source, obj, true), obj, merge) - } - - return obj -} - -/** - * - * Transfer a property from one object to another object. - * - * If the source path does not exist (undefined) - * the property on the other object will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj1 - * @param {Object} obj2 - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.transfer = function ( - source, - target, - obj1, - obj2, - mods, - merge -) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set( - target, - _process(this.pick(source, obj1, true), mods), - obj2, - merge - ) - } else { - merge = mods - this.set(target, this.pick(source, obj1, true), obj2, merge) - } - - return obj2 -} - -/** - * - * Copy a property from one object to another object. - * - * If the source path does not exist (undefined) - * the property on the other object will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj1 - * @param {Object} obj2 - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.copy = function (source, target, obj1, obj2, mods, merge) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set( - target, - _process( - // clone what is picked - JSON.parse(JSON.stringify(this.pick(source, obj1, false))), - mods - ), - obj2, - merge - ) - } else { - merge = mods - this.set(target, this.pick(source, obj1, false), obj2, merge) - } - - return obj2 -} - -/** - * - * Set a property on an object using dot notation. - * - * @param {String} path - * @param {any} val - * @param {Object} obj - * @param {Boolean} merge - */ -DotObject.prototype.set = function (path, val, obj, merge) { - var i - var k - var keys - var key - - // Do not operate if the value is undefined. - if (typeof val === 'undefined') { - return obj - } - keys = parsePath(path, this.separator) - - for (i = 0; i < keys.length; i++) { - key = keys[i] - if (i === keys.length - 1) { - if (merge && isObject(val) && isObject(obj[key])) { - for (k in val) { - if (hasOwnProperty.call(val, k)) { - obj[key][k] = val[k] - } - } - } else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) { - for (var j = 0; j < val.length; j++) { - obj[keys[i]].push(val[j]) - } - } else { - obj[key] = val - } - } else if ( - // force the value to be an object - !hasOwnProperty.call(obj, key) || - (!isObject(obj[key]) && !Array.isArray(obj[key])) - ) { - // initialize as array if next key is numeric - if (/^\d+$/.test(keys[i + 1])) { - obj[key] = [] - } else { - obj[key] = {} - } - } - obj = obj[key] - } - return obj -} - -/** - * - * Transform an object - * - * Usage: - * - * var obj = { - * "id": 1, - * "some": { - * "thing": "else" - * } - * } - * - * var transform = { - * "id": "nr", - * "some.thing": "name" - * } - * - * var tgt = dot.transform(transform, obj) - * - * @param {Object} recipe Transform recipe - * @param {Object} obj Object to be transformed - * @param {Array} mods modifiers for the target - */ -DotObject.prototype.transform = function (recipe, obj, tgt) { - obj = obj || {} - tgt = tgt || {} - Object.keys(recipe).forEach( - function (key) { - this.set(recipe[key], this.pick(key, obj), tgt) - }.bind(this) - ) - return tgt -} - -/** - * - * Convert object to dotted-key/value pair - * - * Usage: - * - * var tgt = dot.dot(obj) - * - * or - * - * var tgt = {} - * dot.dot(obj, tgt) - * - * @param {Object} obj source object - * @param {Object} tgt target object - * @param {Array} path path array (internal) - */ -DotObject.prototype.dot = function (obj, tgt, path) { - tgt = tgt || {} - path = path || [] - var isArray = Array.isArray(obj) - - Object.keys(obj).forEach( - function (key) { - var index = isArray && this.useBrackets ? '[' + key + ']' : key - if ( - isArrayOrObject(obj[key]) && - ((isObject(obj[key]) && !isEmptyObject(obj[key])) || - (Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0)) - ) { - if (isArray && this.useBrackets) { - var previousKey = path[path.length - 1] || '' - return this.dot( - obj[key], - tgt, - path.slice(0, -1).concat(previousKey + index) - ) - } else { - return this.dot(obj[key], tgt, path.concat(index)) - } - } else { - if (isArray && this.useBrackets) { - tgt[path.join(this.separator).concat('[' + key + ']')] = obj[key] - } else { - tgt[path.concat(index).join(this.separator)] = obj[key] - } - } - }.bind(this) - ) - return tgt -} - -DotObject.pick = wrap('pick') -DotObject.move = wrap('move') -DotObject.transfer = wrap('transfer') -DotObject.transform = wrap('transform') -DotObject.copy = wrap('copy') -DotObject.object = wrap('object') -DotObject.str = wrap('str') -DotObject.set = wrap('set') -DotObject.delete = wrap('delete') -DotObject.del = DotObject.remove = wrap('remove') -DotObject.dot = wrap('dot'); -['override', 'overwrite'].forEach(function (prop) { - Object.defineProperty(DotObject, prop, { - get: function () { - return dotDefault.override - }, - set: function (val) { - dotDefault.override = !!val - } - }) -}); -['useArray', 'keepArray', 'useBrackets'].forEach(function (prop) { - Object.defineProperty(DotObject, prop, { - get: function () { - return dotDefault[prop] - }, - set: function (val) { - dotDefault[prop] = val - } - }) -}) - -DotObject._process = _process - -module.exports = DotObject - - /***/ }), /***/ 7426: @@ -60380,1152 +58663,6 @@ if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { exports.debug = debug; // for test -/***/ }), - -/***/ 1524: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 6647: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isValidErrorCode = exports.httpStatusFromErrorCode = exports.TwirpErrorCode = exports.BadRouteError = exports.InternalServerErrorWith = exports.InternalServerError = exports.RequiredArgumentError = exports.InvalidArgumentError = exports.NotFoundError = exports.TwirpError = void 0; -/** - * Represents a twirp error - */ -class TwirpError extends Error { - constructor(code, msg) { - super(msg); - this.code = TwirpErrorCode.Internal; - this.meta = {}; - this.code = code; - this.msg = msg; - Object.setPrototypeOf(this, TwirpError.prototype); - } - /** - * Adds a metadata kv to the error - * @param key - * @param value - */ - withMeta(key, value) { - this.meta[key] = value; - return this; - } - /** - * Returns a single metadata value - * return "" if not found - * @param key - */ - getMeta(key) { - return this.meta[key] || ""; - } - /** - * Add the original error cause - * @param err - * @param addMeta - */ - withCause(err, addMeta = false) { - this._originalCause = err; - if (addMeta) { - this.withMeta("cause", err.message); - } - return this; - } - cause() { - return this._originalCause; - } - /** - * Returns the error representation to JSON - */ - toJSON() { - try { - return JSON.stringify({ - code: this.code, - msg: this.msg, - meta: this.meta, - }); - } - catch (e) { - return `{"code": "internal", "msg": "There was an error but it could not be serialized into JSON"}`; - } - } - /** - * Create a twirp error from an object - * @param obj - */ - static fromObject(obj) { - const code = obj["code"] || TwirpErrorCode.Unknown; - const msg = obj["msg"] || "unknown"; - const error = new TwirpError(code, msg); - if (obj["meta"]) { - Object.keys(obj["meta"]).forEach((key) => { - error.withMeta(key, obj["meta"][key]); - }); - } - return error; - } -} -exports.TwirpError = TwirpError; -/** - * NotFoundError constructor for the common NotFound error. - */ -class NotFoundError extends TwirpError { - constructor(msg) { - super(TwirpErrorCode.NotFound, msg); - } -} -exports.NotFoundError = NotFoundError; -/** - * InvalidArgumentError constructor for the common InvalidArgument error. Can be - * used when an argument has invalid format, is a number out of range, is a bad - * option, etc). - */ -class InvalidArgumentError extends TwirpError { - constructor(argument, validationMsg) { - super(TwirpErrorCode.InvalidArgument, argument + " " + validationMsg); - this.withMeta("argument", argument); - } -} -exports.InvalidArgumentError = InvalidArgumentError; -/** - * RequiredArgumentError is a more specific constructor for InvalidArgument - * error. Should be used when the argument is required (expected to have a - * non-zero value). - */ -class RequiredArgumentError extends InvalidArgumentError { - constructor(argument) { - super(argument, "is required"); - } -} -exports.RequiredArgumentError = RequiredArgumentError; -/** - * InternalError constructor for the common Internal error. Should be used to - * specify that something bad or unexpected happened. - */ -class InternalServerError extends TwirpError { - constructor(msg) { - super(TwirpErrorCode.Internal, msg); - } -} -exports.InternalServerError = InternalServerError; -/** - * InternalErrorWith makes an internal error, wrapping the original error and using it - * for the error message, and with metadata "cause" with the original error type. - * This function is used by Twirp services to wrap non-Twirp errors as internal errors. - * The wrapped error can be extracted later with err.cause() - */ -class InternalServerErrorWith extends InternalServerError { - constructor(err) { - super(err.message); - this.withMeta("cause", err.name); - this.withCause(err); - } -} -exports.InternalServerErrorWith = InternalServerErrorWith; -/** - * A standard BadRoute Error - */ -class BadRouteError extends TwirpError { - constructor(msg, method, url) { - super(TwirpErrorCode.BadRoute, msg); - this.withMeta("twirp_invalid_route", method + " " + url); - } -} -exports.BadRouteError = BadRouteError; -var TwirpErrorCode; -(function (TwirpErrorCode) { - // Canceled indicates the operation was cancelled (typically by the caller). - TwirpErrorCode["Canceled"] = "canceled"; - // Unknown error. For example when handling errors raised by APIs that do not - // return enough error information. - TwirpErrorCode["Unknown"] = "unknown"; - // InvalidArgument indicates client specified an invalid argument. It - // indicates arguments that are problematic regardless of the state of the - // system (i.e. a malformed file name, required argument, number out of range, - // etc.). - TwirpErrorCode["InvalidArgument"] = "invalid_argument"; - // Malformed indicates an error occurred while decoding the client's request. - // This may mean that the message was encoded improperly, or that there is a - // disagreement in message format between the client and server. - TwirpErrorCode["Malformed"] = "malformed"; - // DeadlineExceeded means operation expired before completion. For operations - // that change the state of the system, this error may be returned even if the - // operation has completed successfully (timeout). - TwirpErrorCode["DeadlineExceeded"] = "deadline_exceeded"; - // NotFound means some requested entity was not found. - TwirpErrorCode["NotFound"] = "not_found"; - // BadRoute means that the requested URL path wasn't routable to a Twirp - // service and method. This is returned by the generated server, and usually - // shouldn't be returned by applications. Instead, applications should use - // NotFound or Unimplemented. - TwirpErrorCode["BadRoute"] = "bad_route"; - // AlreadyExists means an attempt to create an entity failed because one - // already exists. - TwirpErrorCode["AlreadyExists"] = "already_exists"; - // PermissionDenied indicates the caller does not have permission to execute - // the specified operation. It must not be used if the caller cannot be - // identified (Unauthenticated). - TwirpErrorCode["PermissionDenied"] = "permission_denied"; - // Unauthenticated indicates the request does not have valid authentication - // credentials for the operation. - TwirpErrorCode["Unauthenticated"] = "unauthenticated"; - // ResourceExhausted indicates some resource has been exhausted, perhaps a - // per-user quota, or perhaps the entire file system is out of space. - TwirpErrorCode["ResourceExhausted"] = "resource_exhausted"; - // FailedPrecondition indicates operation was rejected because the system is - // not in a state required for the operation's execution. For example, doing - // an rmdir operation on a directory that is non-empty, or on a non-directory - // object, or when having conflicting read-modify-write on the same resource. - TwirpErrorCode["FailedPrecondition"] = "failed_precondition"; - // Aborted indicates the operation was aborted, typically due to a concurrency - // issue like sequencer check failures, transaction aborts, etc. - TwirpErrorCode["Aborted"] = "aborted"; - // OutOfRange means operation was attempted past the valid range. For example, - // seeking or reading past end of a paginated collection. - // - // Unlike InvalidArgument, this error indicates a problem that may be fixed if - // the system state changes (i.e. adding more items to the collection). - // - // There is a fair bit of overlap between FailedPrecondition and OutOfRange. - // We recommend using OutOfRange (the more specific error) when it applies so - // that callers who are iterating through a space can easily look for an - // OutOfRange error to detect when they are done. - TwirpErrorCode["OutOfRange"] = "out_of_range"; - // Unimplemented indicates operation is not implemented or not - // supported/enabled in this service. - TwirpErrorCode["Unimplemented"] = "unimplemented"; - // Internal errors. When some invariants expected by the underlying system - // have been broken. In other words, something bad happened in the library or - // backend service. Do not confuse with HTTP Internal Server Error; an - // Internal error could also happen on the client code, i.e. when parsing a - // server response. - TwirpErrorCode["Internal"] = "internal"; - // Unavailable indicates the service is currently unavailable. This is a most - // likely a transient condition and may be corrected by retrying with a - // backoff. - TwirpErrorCode["Unavailable"] = "unavailable"; - // DataLoss indicates unrecoverable data loss or corruption. - TwirpErrorCode["DataLoss"] = "data_loss"; -})(TwirpErrorCode = exports.TwirpErrorCode || (exports.TwirpErrorCode = {})); -// ServerHTTPStatusFromErrorCode maps a Twirp error type into a similar HTTP -// response status. It is used by the Twirp server handler to set the HTTP -// response status code. Returns 0 if the ErrorCode is invalid. -function httpStatusFromErrorCode(code) { - switch (code) { - case TwirpErrorCode.Canceled: - return 408; // RequestTimeout - case TwirpErrorCode.Unknown: - return 500; // Internal Server Error - case TwirpErrorCode.InvalidArgument: - return 400; // BadRequest - case TwirpErrorCode.Malformed: - return 400; // BadRequest - case TwirpErrorCode.DeadlineExceeded: - return 408; // RequestTimeout - case TwirpErrorCode.NotFound: - return 404; // Not Found - case TwirpErrorCode.BadRoute: - return 404; // Not Found - case TwirpErrorCode.AlreadyExists: - return 409; // Conflict - case TwirpErrorCode.PermissionDenied: - return 403; // Forbidden - case TwirpErrorCode.Unauthenticated: - return 401; // Unauthorized - case TwirpErrorCode.ResourceExhausted: - return 429; // Too Many Requests - case TwirpErrorCode.FailedPrecondition: - return 412; // Precondition Failed - case TwirpErrorCode.Aborted: - return 409; // Conflict - case TwirpErrorCode.OutOfRange: - return 400; // Bad Request - case TwirpErrorCode.Unimplemented: - return 501; // Not Implemented - case TwirpErrorCode.Internal: - return 500; // Internal Server Error - case TwirpErrorCode.Unavailable: - return 503; // Service Unavailable - case TwirpErrorCode.DataLoss: - return 500; // Internal Server Error - default: - return 0; // Invalid! - } -} -exports.httpStatusFromErrorCode = httpStatusFromErrorCode; -// IsValidErrorCode returns true if is one of the valid predefined constants. -function isValidErrorCode(code) { - return httpStatusFromErrorCode(code) != 0; -} -exports.isValidErrorCode = isValidErrorCode; - - -/***/ }), - -/***/ 6748: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Gateway = exports.Pattern = void 0; -const querystring_1 = __nccwpck_require__(3477); -const dotObject = __importStar(__nccwpck_require__(4365)); -const request_1 = __nccwpck_require__(8347); -const errors_1 = __nccwpck_require__(6647); -const http_client_1 = __nccwpck_require__(4091); -const server_1 = __nccwpck_require__(6604); -var Pattern; -(function (Pattern) { - Pattern["POST"] = "post"; - Pattern["GET"] = "get"; - Pattern["PATCH"] = "patch"; - Pattern["PUT"] = "put"; - Pattern["DELETE"] = "delete"; -})(Pattern = exports.Pattern || (exports.Pattern = {})); -/** - * The Gateway proxies http requests to Twirp Compliant - * handlers - */ -class Gateway { - constructor(routes) { - this.routes = routes; - } - /** - * Middleware that rewrite the current request - * to a Twirp compliant request - */ - twirpRewrite(prefix = "/twirp") { - return (req, resp, next) => { - this.rewrite(req, resp, prefix) - .then(() => next()) - .catch((e) => { - if (e instanceof errors_1.TwirpError) { - if (e.code !== errors_1.TwirpErrorCode.NotFound) { - server_1.writeError(resp, e); - } - else { - next(); - } - } - }); - }; - } - /** - * Rewrite an incoming request to a Twirp compliant request - * @param req - * @param resp - * @param prefix - */ - rewrite(req, resp, prefix = "/twirp") { - return __awaiter(this, void 0, void 0, function* () { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const twirpUrl = `${prefix}/${route.packageName}.${route.serviceName}/${route.methodName}`; - req.url = twirpUrl; - req.originalUrl = twirpUrl; - req.method = "POST"; - req.headers["content-type"] = "application/json"; - req.rawBody = Buffer.from(JSON.stringify(body)); - if (route.responseBodyKey) { - const endFn = resp.end.bind(resp); - resp.end = function (chunk) { - if (resp.statusCode === 200) { - endFn(`{ "${route.responseBodyKey}": ${chunk} }`); - } - else { - endFn(chunk); - } - }; - } - }); - } - /** - * Create a reverse proxy handler to - * proxy http requests to Twirp Compliant handlers - * @param httpClientOption - */ - reverseProxy(httpClientOption) { - const client = http_client_1.NodeHttpRPC(httpClientOption); - return (req, res) => __awaiter(this, void 0, void 0, function* () { - try { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const response = yield client.request(`${route.packageName}.${route.serviceName}`, route.methodName, "application/json", body); - res.statusCode = 200; - res.setHeader("content-type", "application/json"); - let jsonResponse; - if (route.responseBodyKey) { - jsonResponse = JSON.stringify({ [route.responseBodyKey]: response }); - } - else { - jsonResponse = JSON.stringify(response); - } - res.end(jsonResponse); - } - catch (e) { - server_1.writeError(res, e); - } - }); - } - /** - * Prepares twirp body requests using http.google.annotions - * compliant spec - * - * @param req - * @param match - * @param route - * @protected - */ - prepareTwirpBody(req, match, route) { - return __awaiter(this, void 0, void 0, function* () { - const _a = match.params, { query_string } = _a, params = __rest(_a, ["query_string"]); - let requestBody = Object.assign({}, params); - if (query_string && route.bodyKey !== "*") { - const queryParams = this.parseQueryString(query_string); - requestBody = Object.assign(Object.assign({}, queryParams), requestBody); - } - let body = {}; - if (route.bodyKey) { - const data = yield request_1.getRequestData(req); - try { - const jsonBody = JSON.parse(data.toString() || "{}"); - if (route.bodyKey === "*") { - body = jsonBody; - } - else { - body[route.bodyKey] = jsonBody; - } - } - catch (e) { - const msg = "the json request could not be decoded"; - throw new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - return Object.assign(Object.assign({}, body), requestBody); - }); - } - /** - * Matches a route - * @param req - */ - matchRoute(req) { - var _a; - const httpMethod = (_a = req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase(); - if (!httpMethod) { - throw new errors_1.BadRouteError(`method not allowed`, req.method || "", req.url || ""); - } - const routes = this.routes[httpMethod]; - for (const route of routes) { - const match = route.matcher(req.url || "/"); - if (match) { - return [match, route]; - } - } - throw new errors_1.NotFoundError(`url ${req.url} not found`); - } - /** - * Parse query string - * @param queryString - */ - parseQueryString(queryString) { - const queryParams = querystring_1.parse(queryString.replace("?", "")); - return dotObject.object(queryParams); - } -} -exports.Gateway = Gateway; - - -/***/ }), - -/***/ 4263: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isHook = exports.chainHooks = void 0; -// ChainHooks creates a new ServerHook which chains the callbacks in -// each of the constituent hooks passed in. Each hook function will be -// called in the order of the ServerHooks values passed in. -// -// For the erroring hooks, RequestReceived and RequestRouted, any returned -// errors prevent processing by later hooks. -function chainHooks(...hooks) { - if (hooks.length === 0) { - return null; - } - if (hooks.length === 1) { - return hooks[0]; - } - const serverHook = { - requestReceived(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestReceived) { - continue; - } - yield hook.requestReceived(ctx); - } - }); - }, - requestPrepared(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestPrepared) { - continue; - } - console.warn("hook requestPrepared is deprecated and will be removed in the next release. " + - "Please use responsePrepared instead."); - yield hook.requestPrepared(ctx); - } - }); - }, - responsePrepared(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responsePrepared) { - continue; - } - yield hook.responsePrepared(ctx); - } - }); - }, - requestSent(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestSent) { - continue; - } - console.warn("hook requestSent is deprecated and will be removed in the next release. " + - "Please use responseSent instead."); - yield hook.requestSent(ctx); - } - }); - }, - responseSent(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responseSent) { - continue; - } - yield hook.responseSent(ctx); - } - }); - }, - requestRouted(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestRouted) { - continue; - } - yield hook.requestRouted(ctx); - } - }); - }, - error(ctx, err) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.error) { - continue; - } - yield hook.error(ctx, err); - } - }); - }, - }; - return serverHook; -} -exports.chainHooks = chainHooks; -function isHook(object) { - return ("requestReceived" in object || - "requestPrepared" in object || - "requestSent" in object || - "requestRouted" in object || - "responsePrepared" in object || - "responseSent" in object || - "error" in object); -} -exports.isHook = isHook; - - -/***/ }), - -/***/ 4091: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FetchRPC = exports.wrapErrorResponseToTwirpError = exports.NodeHttpRPC = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const url_1 = __nccwpck_require__(7310); -const errors_1 = __nccwpck_require__(6647); -/** - * a node HTTP RPC implementation - * @param options - * @constructor - */ -const NodeHttpRPC = (options) => ({ - request(service, method, contentType, data) { - let client; - return new Promise((resolve, rejected) => { - const responseChunks = []; - const requestData = contentType === "application/protobuf" - ? Buffer.from(data) - : JSON.stringify(data); - const url = new url_1.URL(options.baseUrl); - const isHttps = url.protocol === "https:"; - if (isHttps) { - client = https; - } - else { - client = http; - } - const prefix = url.pathname !== "/" ? url.pathname : ""; - const req = client - .request(Object.assign(Object.assign({}, (options ? options : {})), { method: "POST", protocol: url.protocol, host: url.hostname, port: url.port ? url.port : isHttps ? 443 : 80, path: `${prefix}/${service}/${method}`, headers: Object.assign(Object.assign({}, (options.headers ? options.headers : {})), { "Content-Type": contentType, "Content-Length": contentType === "application/protobuf" - ? Buffer.byteLength(requestData) - : Buffer.from(requestData).byteLength }) }), (res) => { - res.on("data", (chunk) => responseChunks.push(chunk)); - res.on("end", () => { - const data = Buffer.concat(responseChunks); - if (res.statusCode != 200) { - rejected(wrapErrorResponseToTwirpError(data.toString())); - } - else { - if (contentType === "application/json") { - resolve(JSON.parse(data.toString())); - } - else { - resolve(data); - } - } - }); - res.on("error", (err) => { - rejected(err); - }); - }) - .on("error", (err) => { - rejected(err); - }); - req.end(requestData); - }); - }, -}); -exports.NodeHttpRPC = NodeHttpRPC; -function wrapErrorResponseToTwirpError(errorResponse) { - return errors_1.TwirpError.fromObject(JSON.parse(errorResponse)); -} -exports.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError; -/** - * a browser fetch RPC implementation - */ -const FetchRPC = (options) => ({ - request(service, method, contentType, data) { - return __awaiter(this, void 0, void 0, function* () { - const headers = new Headers(options.headers); - headers.set("content-type", contentType); - const response = yield fetch(`${options.baseUrl}/${service}/${method}`, Object.assign(Object.assign({}, options), { method: "POST", headers, body: data instanceof Uint8Array ? data : JSON.stringify(data) })); - if (response.status === 200) { - if (contentType === "application/json") { - return yield response.json(); - } - return new Uint8Array(yield response.arrayBuffer()); - } - throw errors_1.TwirpError.fromObject(yield response.json()); - }); - }, -}); -exports.FetchRPC = FetchRPC; - - -/***/ }), - -/***/ 6465: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TwirpContentType = void 0; -__exportStar(__nccwpck_require__(1524), exports); -__exportStar(__nccwpck_require__(6604), exports); -__exportStar(__nccwpck_require__(8913), exports); -__exportStar(__nccwpck_require__(4263), exports); -__exportStar(__nccwpck_require__(6647), exports); -__exportStar(__nccwpck_require__(6748), exports); -__exportStar(__nccwpck_require__(4091), exports); -var request_1 = __nccwpck_require__(8347); -Object.defineProperty(exports, "TwirpContentType", ({ enumerable: true, get: function () { return request_1.TwirpContentType; } })); - - -/***/ }), - -/***/ 8913: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.chainInterceptors = void 0; -// chains multiple Interceptors into a single Interceptor. -// The first interceptor wraps the second one, and so on. -// Returns null if interceptors is empty. -function chainInterceptors(...interceptors) { - if (interceptors.length === 0) { - return; - } - if (interceptors.length === 1) { - return interceptors[0]; - } - const first = interceptors[0]; - return (ctx, request, handler) => __awaiter(this, void 0, void 0, function* () { - let next = handler; - for (let i = interceptors.length - 1; i > 0; i--) { - next = ((next) => (ctx, typedRequest) => { - return interceptors[i](ctx, typedRequest, next); - })(next); - } - return first(ctx, request, next); - }); -} -exports.chainInterceptors = chainInterceptors; - - -/***/ }), - -/***/ 8347: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseTwirpPath = exports.getRequestData = exports.validateRequest = exports.getContentType = exports.TwirpContentType = void 0; -const errors_1 = __nccwpck_require__(6647); -/** - * Supported Twirp Content-Type - */ -var TwirpContentType; -(function (TwirpContentType) { - TwirpContentType[TwirpContentType["Protobuf"] = 0] = "Protobuf"; - TwirpContentType[TwirpContentType["JSON"] = 1] = "JSON"; - TwirpContentType[TwirpContentType["Unknown"] = 2] = "Unknown"; -})(TwirpContentType = exports.TwirpContentType || (exports.TwirpContentType = {})); -/** - * Get supported content-type - * @param mimeType - */ -function getContentType(mimeType) { - switch (mimeType) { - case "application/protobuf": - return TwirpContentType.Protobuf; - case "application/json": - return TwirpContentType.JSON; - default: - return TwirpContentType.Unknown; - } -} -exports.getContentType = getContentType; -/** - * Validate a twirp request - * @param ctx - * @param request - * @param pathPrefix - */ -function validateRequest(ctx, request, pathPrefix) { - if (request.method !== "POST") { - const msg = `unsupported method ${request.method} (only POST is allowed)`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - const path = parseTwirpPath(request.url || ""); - if (path.pkgService !== - (ctx.packageName ? ctx.packageName + "." : "") + ctx.serviceName) { - const msg = `no handler for path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - if (path.prefix !== pathPrefix) { - const msg = `invalid path prefix ${path.prefix}, expected ${pathPrefix}, on path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - const mimeContentType = request.headers["content-type"] || ""; - if (ctx.contentType === TwirpContentType.Unknown) { - const msg = `unexpected Content-Type: ${request.headers["content-type"]}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - return Object.assign(Object.assign({}, path), { mimeContentType, contentType: ctx.contentType }); -} -exports.validateRequest = validateRequest; -/** - * Get request data from the body - * @param req - */ -function getRequestData(req) { - return new Promise((resolve, reject) => { - const reqWithRawBody = req; - if (reqWithRawBody.rawBody instanceof Buffer) { - resolve(reqWithRawBody.rawBody); - return; - } - const chunks = []; - req.on("data", (chunk) => chunks.push(chunk)); - req.on("end", () => __awaiter(this, void 0, void 0, function* () { - const data = Buffer.concat(chunks); - resolve(data); - })); - req.on("error", (err) => { - if (req.aborted) { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.DeadlineExceeded, "failed to read request: deadline exceeded")); - } - else { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, err.message).withCause(err)); - } - }); - req.on("close", () => { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Canceled, "failed to read request: context canceled")); - }); - }); -} -exports.getRequestData = getRequestData; -/** - * Parses twirp url path - * @param path - */ -function parseTwirpPath(path) { - const parts = path.split("/"); - if (parts.length < 2) { - return { - pkgService: "", - method: "", - prefix: "", - }; - } - return { - method: parts[parts.length - 1], - pkgService: parts[parts.length - 2], - prefix: parts.slice(0, parts.length - 2).join("/"), - }; -} -exports.parseTwirpPath = parseTwirpPath; - - -/***/ }), - -/***/ 6604: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.writeError = exports.TwirpServer = void 0; -const hooks_1 = __nccwpck_require__(4263); -const request_1 = __nccwpck_require__(8347); -const errors_1 = __nccwpck_require__(6647); -/** - * Runtime server implementation of a TwirpServer - */ -class TwirpServer { - constructor(options) { - this.pathPrefix = "/twirp"; - this.hooks = []; - this.interceptors = []; - this.packageName = options.packageName; - this.serviceName = options.serviceName; - this.methodList = options.methodList; - this.matchRoute = options.matchRoute; - this.service = options.service; - } - /** - * Returns the prefix for this server - */ - get prefix() { - return this.pathPrefix; - } - /** - * The http handler for twirp complaint endpoints - * @param options - */ - httpHandler(options) { - return (req, resp) => { - // setup prefix - if ((options === null || options === void 0 ? void 0 : options.prefix) !== undefined) { - this.withPrefix(options.prefix); - } - return this._httpHandler(req, resp); - }; - } - /** - * Adds interceptors or hooks to the request stack - * @param middlewares - */ - use(...middlewares) { - middlewares.forEach((middleware) => { - if (hooks_1.isHook(middleware)) { - this.hooks.push(middleware); - return this; - } - this.interceptors.push(middleware); - }); - return this; - } - /** - * Adds a prefix to the service url path - * @param prefix - */ - withPrefix(prefix) { - if (prefix === false) { - this.pathPrefix = ""; - } - else { - this.pathPrefix = prefix; - } - return this; - } - /** - * Returns the regex matching path for this twirp server - */ - matchingPath() { - const baseRegex = this.baseURI().replace(/\./g, "\\."); - return new RegExp(`${baseRegex}\/(${this.methodList.join("|")})`); - } - /** - * Returns the base URI for this twirp server - */ - baseURI() { - return `${this.pathPrefix}/${this.packageName ? this.packageName + "." : ""}${this.serviceName}`; - } - /** - * Create a twirp context - * @param req - * @param res - * @private - */ - createContext(req, res) { - return { - packageName: this.packageName, - serviceName: this.serviceName, - methodName: "", - contentType: request_1.getContentType(req.headers["content-type"]), - req: req, - res: res, - }; - } - /** - * Twrip server http handler implementation - * @param req - * @param resp - * @private - */ - _httpHandler(req, resp) { - return __awaiter(this, void 0, void 0, function* () { - const ctx = this.createContext(req, resp); - try { - yield this.invokeHook("requestReceived", ctx); - const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || ""); - const handler = this.matchRoute(method, { - onMatch: (ctx) => { - return this.invokeHook("requestRouted", ctx); - }, - onNotFound: () => { - const msg = `no handler for path ${req.url}`; - throw new errors_1.BadRouteError(msg, req.method || "", req.url || ""); - }, - }); - const body = yield request_1.getRequestData(req); - const response = yield handler(ctx, this.service, body, this.interceptors); - yield Promise.all([ - this.invokeHook("responsePrepared", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestPrepared", ctx), - ]); - resp.statusCode = 200; - resp.setHeader("Content-Type", mimeContentType); - resp.end(response); - } - catch (e) { - yield this.invokeHook("error", ctx, mustBeTwirpError(e)); - if (!resp.headersSent) { - writeError(resp, e); - } - } - finally { - yield Promise.all([ - this.invokeHook("responseSent", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestSent", ctx), - ]); - } - }); - } - /** - * Invoke a hook - * @param hookName - * @param ctx - * @param err - * @protected - */ - invokeHook(hookName, ctx, err) { - return __awaiter(this, void 0, void 0, function* () { - if (this.hooks.length === 0) { - return; - } - const chainedHooks = hooks_1.chainHooks(...this.hooks); - const hook = chainedHooks === null || chainedHooks === void 0 ? void 0 : chainedHooks[hookName]; - if (hook) { - yield hook(ctx, err || new errors_1.InternalServerError("internal server error")); - } - }); - } -} -exports.TwirpServer = TwirpServer; -/** - * Write http error response - * @param res - * @param error - */ -function writeError(res, error) { - const twirpError = mustBeTwirpError(error); - res.setHeader("Content-Type", "application/json"); - res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code); - res.end(twirpError.toJSON()); -} -exports.writeError = writeError; -/** - * Make sure that the error passed is a TwirpError - * otherwise it will wrap it into an InternalError - * @param err - */ -function mustBeTwirpError(err) { - if (err instanceof errors_1.TwirpError) { - return err; - } - return new errors_1.InternalServerErrorWith(err); -} - - /***/ }), /***/ 1773: @@ -91098,7 +88235,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0; +exports.unique = exports.validateMirrorURL = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0; const core = __importStar(__nccwpck_require__(2186)); const exec = __importStar(__nccwpck_require__(1514)); const io = __importStar(__nccwpck_require__(7436)); @@ -91186,6 +88323,15 @@ function getToolVersion(tool, options) { } }); } +function validateMirrorURL(mirrorURL) { + if (mirrorURL === ' ' || mirrorURL.trim() === 'undefined') { + throw new Error('Mirror URL is empty. Please provide a valid mirror URL.'); + } + else { + return mirrorURL; + } +} +exports.validateMirrorURL = validateMirrorURL; const unique = () => { const encountered = new Set(); return (value) => { @@ -93093,7 +90239,7 @@ module.exports = parseParams /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1","twirp-ts":"^2.5.0"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}'); +module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}'); /***/ }), diff --git a/dist/setup/index.js b/dist/setup/index.js index cdca1dbfd..e77c9caea 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core.warning(`Cache not found for keys: ${keys.join(', ')}`); + core.debug(`Cache not found for keys: ${keys.join(', ')}`); return undefined; } core.info(`Cache hit for: ${request.key}`); @@ -412,12 +412,20 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { key, version }; - const response = yield twirpClient.CreateCacheEntry(request); - if (!response.ok) { + let signedUploadUrl; + try { + const response = yield twirpClient.CreateCacheEntry(request); + if (!response.ok) { + throw new Error('Response was not ok'); + } + signedUploadUrl = response.signedUploadUrl; + } + catch (error) { + core.debug(`Failed to reserve cache: ${error}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } core.debug(`Attempting to upload cache located at: ${archivePath}`); - yield cacheHttpClient.saveCache(cacheId, archivePath, response.signedUploadUrl, options); + yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, version, @@ -458,156 +466,13 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { /***/ }), -/***/ 4469: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Timestamp = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -const runtime_6 = __nccwpck_require__(4061); -const runtime_7 = __nccwpck_require__(4061); -// @generated message type with reflection information, may provide speed optimized methods -class Timestamp$Type extends runtime_7.MessageType { - constructor() { - super("google.protobuf.Timestamp", [ - { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } - ]); - } - /** - * Creates a new `Timestamp` for the current time. - */ - now() { - const msg = this.create(); - const ms = Date.now(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } - /** - * Converts a `Timestamp` to a JavaScript Date. - */ - toDate(message) { - return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000)); - } - /** - * Converts a JavaScript Date to a `Timestamp`. - */ - fromDate(date) { - const msg = this.create(); - const ms = date.getTime(); - msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString(); - msg.nanos = (ms % 1000) * 1000000; - return msg; - } - /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. - */ - internalJsonWrite(message, options) { - let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1000; - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (message.nanos < 0) - throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); - let z = "Z"; - if (message.nanos > 0) { - let nanosStr = (message.nanos + 1000000000).toString().substring(1); - if (nanosStr.substring(3) === "000000") - z = "." + nanosStr.substring(0, 3) + "Z"; - else if (nanosStr.substring(6) === "000") - z = "." + nanosStr.substring(0, 6) + "Z"; - else - z = "." + nanosStr + "Z"; - } - return new Date(ms).toISOString().replace(".000Z", z); - } - /** - * In JSON format, the `Timestamp` type is encoded as a string - * in the RFC 3339 format. - */ - internalJsonRead(json, options, target) { - if (typeof json !== "string") - throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_5.typeofJsonValue)(json) + "."); - let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); - if (!matches) - throw new Error("Unable to parse Timestamp from JSON. Invalid format."); - let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); - if (Number.isNaN(ms)) - throw new Error("Unable to parse Timestamp from JSON. Invalid value."); - if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) - throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); - if (!target) - target = this.create(); - target.seconds = runtime_6.PbLong.from(ms / 1000).toString(); - target.nanos = 0; - if (matches[7]) - target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000); - return target; - } - create(value) { - const message = { seconds: "0", nanos: 0 }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 seconds */ 1: - message.seconds = reader.int64().toString(); - break; - case /* int32 nanos */ 2: - message.nanos = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* int64 seconds = 1; */ - if (message.seconds !== "0") - writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds); - /* int32 nanos = 2; */ - if (message.nanos !== 0) - writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.Timestamp - */ -exports.Timestamp = new Timestamp$Type(); -//# sourceMappingURL=timestamp.js.map - -/***/ }), - /***/ 4388: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheService = exports.LookupCacheEntryResponse = exports.LookupCacheEntryRequest = exports.ListCacheEntriesResponse = exports.ListCacheEntriesRequest = exports.DeleteCacheEntryResponse = exports.DeleteCacheEntryRequest = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; +exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0; // @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies // @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3) // tslint:disable @@ -617,7 +482,6 @@ const runtime_2 = __nccwpck_require__(4061); const runtime_3 = __nccwpck_require__(4061); const runtime_4 = __nccwpck_require__(4061); const runtime_5 = __nccwpck_require__(4061); -const cacheentry_1 = __nccwpck_require__(3639); const cachemetadata_1 = __nccwpck_require__(7988); // @generated message type with reflection information, may provide speed optimized methods class CreateCacheEntryRequest$Type extends runtime_5.MessageType { @@ -985,234 +849,116 @@ class GetCacheEntryDownloadURLResponse$Type extends runtime_5.MessageType { * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse */ exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DeleteCacheEntryRequest$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.DeleteCacheEntryRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value) { - const message = { key: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest - */ -exports.DeleteCacheEntryRequest = new DeleteCacheEntryRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DeleteCacheEntryResponse$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.DeleteCacheEntryResponse", [ - { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ } - ]); - } - create(value) { - const message = { ok: false, entryId: "0" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* bool ok */ 1: - message.ok = reader.bool(); - break; - case /* int64 entry_id */ 2: - message.entryId = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* bool ok = 1; */ - if (message.ok !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.ok); - /* int64 entry_id = 2; */ - if (message.entryId !== "0") - writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} /** - * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse + * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService */ -exports.DeleteCacheEntryResponse = new DeleteCacheEntryResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListCacheEntriesRequest$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.ListCacheEntriesRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); +exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ + { name: "CreateCacheEntry", options: {}, I: exports.CreateCacheEntryRequest, O: exports.CreateCacheEntryResponse }, + { name: "FinalizeCacheEntryUpload", options: {}, I: exports.FinalizeCacheEntryUploadRequest, O: exports.FinalizeCacheEntryUploadResponse }, + { name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse } +]); +//# sourceMappingURL=cache.js.map + +/***/ }), + +/***/ 2655: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; +const cache_1 = __nccwpck_require__(4388); +class CacheServiceClientJSON { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); } - create(value) { - const message = { key: "", restoreKeys: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false, + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data); + return promise.then((data) => cache_1.CreateCacheEntryResponse.fromJson(data, { + ignoreUnknownFields: true, + })); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - case /* repeated string restore_keys */ 3: - message.restoreKeys.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false, + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data); + return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data, { + ignoreUnknownFields: true, + })); } - internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - /* repeated string restore_keys = 3; */ - for (let i = 0; i < message.restoreKeys.length; i++) - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { + useProtoFieldName: true, + emitDefaultValues: false, + }); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data); + return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data, { + ignoreUnknownFields: true, + })); } } -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesRequest - */ -exports.ListCacheEntriesRequest = new ListCacheEntriesRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListCacheEntriesResponse$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.api.v1.ListCacheEntriesResponse", [ - { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => cacheentry_1.CacheEntry } - ]); +exports.CacheServiceClientJSON = CacheServiceClientJSON; +class CacheServiceClientProtobuf { + constructor(rpc) { + this.rpc = rpc; + this.CreateCacheEntry.bind(this); + this.FinalizeCacheEntryUpload.bind(this); + this.GetCacheEntryDownloadURL.bind(this); } - create(value) { - const message = { entries: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + CreateCacheEntry(request) { + const data = cache_1.CreateCacheEntryRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); + return promise.then((data) => cache_1.CreateCacheEntryResponse.fromBinary(data)); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated github.actions.results.entities.v1.CacheEntry entries */ 1: - message.entries.push(cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + FinalizeCacheEntryUpload(request) { + const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); + return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data)); } - internalBinaryWrite(message, writer, options) { - /* repeated github.actions.results.entities.v1.CacheEntry entries = 1; */ - for (let i = 0; i < message.entries.length; i++) - cacheentry_1.CacheEntry.internalBinaryWrite(message.entries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + GetCacheEntryDownloadURL(request) { + const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); + const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); + return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data)); } } -/** - * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesResponse - */ -exports.ListCacheEntriesResponse = new ListCacheEntriesResponse$Type(); +exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; +//# sourceMappingURL=cache.twirp-client.js.map + +/***/ }), + +/***/ 7988: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CacheMetadata = void 0; +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); +const cachescope_1 = __nccwpck_require__(3749); // @generated message type with reflection information, may provide speed optimized methods -class LookupCacheEntryRequest$Type extends runtime_5.MessageType { +class CacheMetadata$Type extends runtime_5.MessageType { constructor() { - super("github.actions.results.api.v1.LookupCacheEntryRequest", [ - { no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata }, - { no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + super("github.actions.results.entities.v1.CacheMetadata", [ + { no: 1, name: "repository_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, + { no: 2, name: "scope", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => cachescope_1.CacheScope } ]); } create(value) { - const message = { key: "", restoreKeys: [], version: "" }; + const message = { repositoryId: "0", scope: [] }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -1223,17 +969,11 @@ class LookupCacheEntryRequest$Type extends runtime_5.MessageType { while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1: - message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); - break; - case /* string key */ 2: - message.key = reader.string(); - break; - case /* repeated string restore_keys */ 3: - message.restoreKeys.push(reader.string()); + case /* int64 repository_id */ 1: + message.repositoryId = reader.int64().toString(); break; - case /* string version */ 4: - message.version = reader.string(); + case /* repeated github.actions.results.entities.v1.CacheScope scope */ 2: + message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -1247,18 +987,12 @@ class LookupCacheEntryRequest$Type extends runtime_5.MessageType { return message; } internalBinaryWrite(message, writer, options) { - /* github.actions.results.entities.v1.CacheMetadata metadata = 1; */ - if (message.metadata) - cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* string key = 2; */ - if (message.key !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key); - /* repeated string restore_keys = 3; */ - for (let i = 0; i < message.restoreKeys.length; i++) - writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]); - /* string version = 4; */ - if (message.version !== "") - writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version); + /* int64 repository_id = 1; */ + if (message.repositoryId !== "0") + writer.tag(1, runtime_1.WireType.Varint).int64(message.repositoryId); + /* repeated github.actions.results.entities.v1.CacheScope scope = 2; */ + for (let i = 0; i < message.scope.length; i++) + cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -1266,19 +1000,35 @@ class LookupCacheEntryRequest$Type extends runtime_5.MessageType { } } /** - * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryRequest + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheMetadata */ -exports.LookupCacheEntryRequest = new LookupCacheEntryRequest$Type(); +exports.CacheMetadata = new CacheMetadata$Type(); +//# sourceMappingURL=cachemetadata.js.map + +/***/ }), + +/***/ 3749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CacheScope = void 0; +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); // @generated message type with reflection information, may provide speed optimized methods -class LookupCacheEntryResponse$Type extends runtime_5.MessageType { +class CacheScope$Type extends runtime_5.MessageType { constructor() { - super("github.actions.results.api.v1.LookupCacheEntryResponse", [ - { no: 1, name: "exists", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "entry", kind: "message", T: () => cacheentry_1.CacheEntry } + super("github.actions.results.entities.v1.CacheScope", [ + { no: 1, name: "scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "permission", kind: "scalar", T: 3 /*ScalarType.INT64*/ } ]); } create(value) { - const message = { exists: false }; + const message = { scope: "", permission: "0" }; globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) (0, runtime_3.reflectionMergePartial)(this, message, value); @@ -1289,11 +1039,11 @@ class LookupCacheEntryResponse$Type extends runtime_5.MessageType { while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* bool exists */ 1: - message.exists = reader.bool(); + case /* string scope */ 1: + message.scope = reader.string(); break; - case /* github.actions.results.entities.v1.CacheEntry entry */ 2: - message.entry = cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options, message.entry); + case /* int64 permission */ 2: + message.permission = reader.int64().toString(); break; default: let u = options.readUnknownField; @@ -1307,12 +1057,12 @@ class LookupCacheEntryResponse$Type extends runtime_5.MessageType { return message; } internalBinaryWrite(message, writer, options) { - /* bool exists = 1; */ - if (message.exists !== false) - writer.tag(1, runtime_1.WireType.Varint).bool(message.exists); - /* github.actions.results.entities.v1.CacheEntry entry = 2; */ - if (message.entry) - cacheentry_1.CacheEntry.internalBinaryWrite(message.entry, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); + /* string scope = 1; */ + if (message.scope !== "") + writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.scope); + /* int64 permission = 2; */ + if (message.permission !== "0") + writer.tag(2, runtime_1.WireType.Varint).int64(message.permission); let u = options.writeUnknownFields; if (u !== false) (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -1320,29 +1070,41 @@ class LookupCacheEntryResponse$Type extends runtime_5.MessageType { } } /** - * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryResponse - */ -exports.LookupCacheEntryResponse = new LookupCacheEntryResponse$Type(); -/** - * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService + * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheScope */ -exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [ - { name: "CreateCacheEntry", options: {}, I: exports.CreateCacheEntryRequest, O: exports.CreateCacheEntryResponse }, - { name: "FinalizeCacheEntryUpload", options: {}, I: exports.FinalizeCacheEntryUploadRequest, O: exports.FinalizeCacheEntryUploadResponse }, - { name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse }, - { name: "DeleteCacheEntry", options: {}, I: exports.DeleteCacheEntryRequest, O: exports.DeleteCacheEntryResponse }, - { name: "ListCacheEntries", options: {}, I: exports.ListCacheEntriesRequest, O: exports.ListCacheEntriesResponse }, - { name: "LookupCacheEntry", options: {}, I: exports.LookupCacheEntryRequest, O: exports.LookupCacheEntryResponse } -]); -//# sourceMappingURL=cache.js.map +exports.CacheScope = new CacheScope$Type(); +//# sourceMappingURL=cachescope.js.map /***/ }), -/***/ 267: +/***/ 8245: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -1353,855 +1115,543 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createCacheServiceServer = exports.CacheServiceMethodList = exports.CacheServiceMethod = exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0; -const twirp_ts_1 = __nccwpck_require__(6465); -const cache_1 = __nccwpck_require__(4388); -class CacheServiceClientJSON { - constructor(rpc) { - this.rpc = rpc; - this.CreateCacheEntry.bind(this); - this.FinalizeCacheEntryUpload.bind(this); - this.GetCacheEntryDownloadURL.bind(this); - this.DeleteCacheEntry.bind(this); - this.ListCacheEntries.bind(this); - this.LookupCacheEntry.bind(this); - } - CreateCacheEntry(request) { - const data = cache_1.CreateCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data); - return promise.then((data) => cache_1.CreateCacheEntryResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - FinalizeCacheEntryUpload(request) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data); - return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - GetCacheEntryDownloadURL(request) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data); - return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - DeleteCacheEntry(request) { - const data = cache_1.DeleteCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/json", data); - return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - ListCacheEntries(request) { - const data = cache_1.ListCacheEntriesRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/json", data); - return promise.then((data) => cache_1.ListCacheEntriesResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } - LookupCacheEntry(request) { - const data = cache_1.LookupCacheEntryRequest.toJson(request, { - useProtoFieldName: true, - emitDefaultValues: false, - }); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/json", data); - return promise.then((data) => cache_1.LookupCacheEntryResponse.fromJson(data, { - ignoreUnknownFields: true, - })); - } -} -exports.CacheServiceClientJSON = CacheServiceClientJSON; -class CacheServiceClientProtobuf { - constructor(rpc) { - this.rpc = rpc; - this.CreateCacheEntry.bind(this); - this.FinalizeCacheEntryUpload.bind(this); - this.GetCacheEntryDownloadURL.bind(this); - this.DeleteCacheEntry.bind(this); - this.ListCacheEntries.bind(this); - this.LookupCacheEntry.bind(this); - } - CreateCacheEntry(request) { - const data = cache_1.CreateCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data); - return promise.then((data) => cache_1.CreateCacheEntryResponse.fromBinary(data)); - } - FinalizeCacheEntryUpload(request) { - const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data); - return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data)); - } - GetCacheEntryDownloadURL(request) { - const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data); - return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data)); - } - DeleteCacheEntry(request) { - const data = cache_1.DeleteCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/protobuf", data); - return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromBinary(data)); - } - ListCacheEntries(request) { - const data = cache_1.ListCacheEntriesRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/protobuf", data); - return promise.then((data) => cache_1.ListCacheEntriesResponse.fromBinary(data)); - } - LookupCacheEntry(request) { - const data = cache_1.LookupCacheEntryRequest.toBinary(request); - const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/protobuf", data); - return promise.then((data) => cache_1.LookupCacheEntryResponse.fromBinary(data)); - } -} -exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf; -var CacheServiceMethod; -(function (CacheServiceMethod) { - CacheServiceMethod["CreateCacheEntry"] = "CreateCacheEntry"; - CacheServiceMethod["FinalizeCacheEntryUpload"] = "FinalizeCacheEntryUpload"; - CacheServiceMethod["GetCacheEntryDownloadURL"] = "GetCacheEntryDownloadURL"; - CacheServiceMethod["DeleteCacheEntry"] = "DeleteCacheEntry"; - CacheServiceMethod["ListCacheEntries"] = "ListCacheEntries"; - CacheServiceMethod["LookupCacheEntry"] = "LookupCacheEntry"; -})(CacheServiceMethod || (exports.CacheServiceMethod = CacheServiceMethod = {})); -exports.CacheServiceMethodList = [ - CacheServiceMethod.CreateCacheEntry, - CacheServiceMethod.FinalizeCacheEntryUpload, - CacheServiceMethod.GetCacheEntryDownloadURL, - CacheServiceMethod.DeleteCacheEntry, - CacheServiceMethod.ListCacheEntries, - CacheServiceMethod.LookupCacheEntry, -]; -function createCacheServiceServer(service) { - return new twirp_ts_1.TwirpServer({ - service, - packageName: "github.actions.results.api.v1", - serviceName: "CacheService", - methodList: exports.CacheServiceMethodList, - matchRoute: matchCacheServiceRoute, - }); -} -exports.createCacheServiceServer = createCacheServiceServer; -function matchCacheServiceRoute(method, events) { - switch (method) { - case "CreateCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "CreateCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors); - }); - case "FinalizeCacheEntryUpload": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "FinalizeCacheEntryUpload" }); - yield events.onMatch(ctx); - return handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors); - }); - case "GetCacheEntryDownloadURL": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "GetCacheEntryDownloadURL" }); - yield events.onMatch(ctx); - return handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors); - }); - case "DeleteCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "DeleteCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors); - }); - case "ListCacheEntries": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "ListCacheEntries" }); - yield events.onMatch(ctx); - return handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors); - }); - case "LookupCacheEntry": - return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () { - ctx = Object.assign(Object.assign({}, ctx), { methodName: "LookupCacheEntry" }); - yield events.onMatch(ctx); - return handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors); - }); - default: - events.onNotFound(); - const msg = `no handler found`; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } -} -function handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); +exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const http_client_1 = __nccwpck_require__(6255); +const auth_1 = __nccwpck_require__(5526); +const fs = __importStar(__nccwpck_require__(7147)); +const url_1 = __nccwpck_require__(7310); +const utils = __importStar(__nccwpck_require__(1518)); +const uploadUtils_1 = __nccwpck_require__(1786); +const downloadUtils_1 = __nccwpck_require__(5500); +const options_1 = __nccwpck_require__(6215); +const requestUtils_1 = __nccwpck_require__(3981); +const config_1 = __nccwpck_require__(5147); +const user_agent_1 = __nccwpck_require__(580); +function getCacheApiUrl(resource) { + const baseUrl = (0, config_1.getCacheServiceURL)(); + if (!baseUrl) { + throw new Error('Cache Service Url not found, unable to restore cache.'); } + const url = `${baseUrl}_apis/artifactcache/${resource}`; + core.debug(`Resource Url: ${url}`); + return url; } -function handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } +function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; } -function handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } +function getRequestOptions() { + const requestOptions = { + headers: { + Accept: createAcceptHeader('application/json', '6.0-preview.1') + } + }; + return requestOptions; } -function handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors) { - switch (ctx.contentType) { - case twirp_ts_1.TwirpContentType.JSON: - return handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors); - case twirp_ts_1.TwirpContentType.Protobuf: - return handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors); - default: - const msg = "unexpected Content-Type"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg); - } +function createHttpClient() { + const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; + const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); + return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } -function handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors) { +function getCacheEntry(keys, paths, options) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.CreateCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + const httpClient = createHttpClient(); + const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; + const response = yield (0, requestUtils_1.retryTypedResponse)('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); + // Cache not found + if (response.statusCode === 204) { + // List cache for primary key only if cache miss occurs + if (core.isDebug()) { + yield printCachesListForDiagnostics(keys[0], httpClient, version); } + return null; } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.CreateCacheEntry(ctx, inputReq); - }); + if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) { + throw new Error(`Cache service responded with ${response.statusCode}`); } - else { - response = yield service.CreateCacheEntry(ctx, request); + const cacheResult = response.result; + const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; + if (!cacheDownloadUrl) { + // Cache achiveLocation not found. This should never happen, and hence bail out. + throw new Error('Cache not found.'); } - return JSON.stringify(cache_1.CreateCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); + core.setSecret(cacheDownloadUrl); + core.debug(`Cache Result:`); + core.debug(JSON.stringify(cacheResult)); + return cacheResult; }); } -function handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors) { +exports.getCacheEntry = getCacheEntry; +function printCachesListForDiagnostics(key, httpClient, version) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.FinalizeCacheEntryUploadRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + const resource = `caches?key=${encodeURIComponent(key)}`; + const response = yield (0, requestUtils_1.retryTypedResponse)('listCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); + if (response.statusCode === 200) { + const cacheListResult = response.result; + const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; + if (totalCount && totalCount > 0) { + core.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env['GITHUB_REF']}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`); + for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { + core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + } } } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.FinalizeCacheEntryUpload(ctx, inputReq); - }); - } - else { - response = yield service.FinalizeCacheEntryUpload(ctx, request); - } - return JSON.stringify(cache_1.FinalizeCacheEntryUploadResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); }); } -function handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors) { +function downloadCache(archiveLocation, archivePath, options) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.GetCacheEntryDownloadURLRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + const archiveUrl = new url_1.URL(archiveLocation); + const downloadOptions = (0, options_1.getDownloadOptions)(options); + if (archiveUrl.hostname.endsWith('.blob.core.windows.net')) { + if (downloadOptions.useAzureSdk) { + // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability. + yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); + } + else if (downloadOptions.concurrentBlobDownloads) { + // Use concurrent implementation with HttpClient to work around blob SDK issue + yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); + } + else { + // Otherwise, download using the Actions http-client. + yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.GetCacheEntryDownloadURL(ctx, inputReq); - }); } else { - response = yield service.GetCacheEntryDownloadURL(ctx, request); + yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); } - return JSON.stringify(cache_1.GetCacheEntryDownloadURLResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, - })); }); } -function handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors) { +exports.downloadCache = downloadCache; +// Reserve Cache +function reserveCache(key, paths, options) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.DeleteCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.DeleteCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.DeleteCacheEntry(ctx, request); - } - return JSON.stringify(cache_1.DeleteCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, + const httpClient = createHttpClient(); + const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); + const reserveCacheRequest = { + key, + version, + cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize + }; + const response = yield (0, requestUtils_1.retryTypedResponse)('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); })); + return response; }); } -function handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors) { +exports.reserveCache = reserveCache; +function getContentRange(start, end) { + // Format: `bytes start-end/filesize + // start and end are inclusive + // filesize can be * + // For a 200 byte chunk starting at byte 0: + // Content-Range: bytes 0-199/* + return `bytes ${start}-${end}/*`; +} +function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.ListCacheEntriesRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.ListCacheEntries(ctx, inputReq); - }); - } - else { - response = yield service.ListCacheEntries(ctx, request); - } - return JSON.stringify(cache_1.ListCacheEntriesResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, + core.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + const additionalHeaders = { + 'Content-Type': 'application/octet-stream', + 'Content-Range': getContentRange(start, end) + }; + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { + return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); })); + if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { + throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + } }); } -function handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors) { +function uploadFile(httpClient, cacheId, archivePath, options) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; + // Upload Chunks + const fileSize = utils.getArchiveFileSizeInBytes(archivePath); + const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); + const fd = fs.openSync(archivePath, 'r'); + const uploadOptions = (0, options_1.getUploadOptions)(options); + const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); + const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); + const parallelUploads = [...new Array(concurrency).keys()]; + core.debug('Awaiting all uploads'); + let offset = 0; try { - const body = JSON.parse(data.toString() || "{}"); - request = cache_1.LookupCacheEntryRequest.fromJson(body, { - ignoreUnknownFields: true, - }); - } - catch (e) { - if (e instanceof Error) { - const msg = "the json request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.LookupCacheEntry(ctx, inputReq); - }); + yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { + while (offset < fileSize) { + const chunkSize = Math.min(fileSize - offset, maxChunkSize); + const start = offset; + const end = offset + chunkSize - 1; + offset += maxChunkSize; + yield uploadChunk(httpClient, resourceUrl, () => fs + .createReadStream(archivePath, { + fd, + start, + end, + autoClose: false + }) + .on('error', error => { + throw new Error(`Cache upload failed because file read failed with ${error.message}`); + }), start, end); + } + }))); } - else { - response = yield service.LookupCacheEntry(ctx, request); + finally { + fs.closeSync(fd); } - return JSON.stringify(cache_1.LookupCacheEntryResponse.toJson(response, { - useProtoFieldName: true, - emitDefaultValues: false, + return; + }); +} +function commitCache(httpClient, cacheId, filesize) { + return __awaiter(this, void 0, void 0, function* () { + const commitCacheRequest = { size: filesize }; + return yield (0, requestUtils_1.retryTypedResponse)('commitCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } -function handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors) { +function saveCache(cacheId, archivePath, signedUploadURL, options) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.CreateCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + const uploadOptions = (0, options_1.getUploadOptions)(options); + if (uploadOptions.useAzureSdk) { + // Use Azure storage SDK to upload caches directly to Azure + if (!signedUploadURL) { + throw new Error('Azure Storage SDK can only be used when a signed URL is provided.'); } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.CreateCacheEntry(ctx, inputReq); - }); + yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { - response = yield service.CreateCacheEntry(ctx, request); + const httpClient = createHttpClient(); + core.debug('Upload cache'); + yield uploadFile(httpClient, cacheId, archivePath, options); + // Commit Cache + core.debug('Commiting cache'); + const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); + core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { + throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + } + core.info('Cache saved successfully'); } - return Buffer.from(cache_1.CreateCacheEntryResponse.toBinary(response)); }); } -function handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors) { +exports.saveCache = saveCache; +//# sourceMappingURL=cacheHttpClient.js.map + +/***/ }), + +/***/ 1518: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeToken = exports.getCacheVersion = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const exec = __importStar(__nccwpck_require__(1514)); +const glob = __importStar(__nccwpck_require__(1597)); +const io = __importStar(__nccwpck_require__(7436)); +const crypto = __importStar(__nccwpck_require__(6113)); +const fs = __importStar(__nccwpck_require__(7147)); +const path = __importStar(__nccwpck_require__(1017)); +const semver = __importStar(__nccwpck_require__(3771)); +const util = __importStar(__nccwpck_require__(3837)); +const constants_1 = __nccwpck_require__(8840); +const versionSalt = '1.0'; +// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23 +function createTempDirectory() { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.FinalizeCacheEntryUploadRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + const IS_WINDOWS = process.platform === 'win32'; + let tempDirectory = process.env['RUNNER_TEMP'] || ''; + if (!tempDirectory) { + let baseLocation; + if (IS_WINDOWS) { + // On Windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; } + else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } + else { + baseLocation = '/home'; + } + } + tempDirectory = path.join(baseLocation, 'actions', 'temp'); } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.FinalizeCacheEntryUpload(ctx, inputReq); - }); - } - else { - response = yield service.FinalizeCacheEntryUpload(ctx, request); - } - return Buffer.from(cache_1.FinalizeCacheEntryUploadResponse.toBinary(response)); + const dest = path.join(tempDirectory, crypto.randomUUID()); + yield io.mkdirP(dest); + return dest; }); } -function handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors) { +exports.createTempDirectory = createTempDirectory; +function getArchiveFileSizeInBytes(filePath) { + return fs.statSync(filePath).size; +} +exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; +function resolvePaths(patterns) { + var _a, e_1, _b, _c; + var _d; return __awaiter(this, void 0, void 0, function* () { - let request; - let response; + const paths = []; + const workspace = (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd(); + const globber = yield glob.create(patterns.join('\n'), { + implicitDescendants: false + }); try { - request = cache_1.GetCacheEntryDownloadURLRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); + for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + const relativeFile = path + .relative(workspace, file) + .replace(new RegExp(`\\${path.sep}`, 'g'), '/'); + core.debug(`Matched: ${relativeFile}`); + // Paths are made relative so the tar entries are all relative to the root of the workspace. + if (relativeFile === '') { + // path.relative returns empty string if workspace and file are equal + paths.push('.'); + } + else { + paths.push(`${relativeFile}`); + } } } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.GetCacheEntryDownloadURL(ctx, inputReq); - }); - } - else { - response = yield service.GetCacheEntryDownloadURL(ctx, request); + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } + finally { if (e_1) throw e_1.error; } } - return Buffer.from(cache_1.GetCacheEntryDownloadURLResponse.toBinary(response)); + return paths; }); } -function handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors) { +exports.resolvePaths = resolvePaths; +function unlinkFile(filePath) { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; + return util.promisify(fs.unlink)(filePath); + }); +} +exports.unlinkFile = unlinkFile; +function getVersion(app, additionalArgs = []) { + return __awaiter(this, void 0, void 0, function* () { + let versionOutput = ''; + additionalArgs.push('--version'); + core.debug(`Checking ${app} ${additionalArgs.join(' ')}`); try { - request = cache_1.DeleteCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.DeleteCacheEntry(ctx, inputReq); + yield exec.exec(`${app}`, additionalArgs, { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => (versionOutput += data.toString()), + stderr: (data) => (versionOutput += data.toString()) + } }); } - else { - response = yield service.DeleteCacheEntry(ctx, request); + catch (err) { + core.debug(err.message); } - return Buffer.from(cache_1.DeleteCacheEntryResponse.toBinary(response)); + versionOutput = versionOutput.trim(); + core.debug(versionOutput); + return versionOutput; }); } -function handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors) { +// Use zstandard if possible to maximize cache performance +function getCompressionMethod() { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.ListCacheEntriesRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.ListCacheEntries(ctx, inputReq); - }); + const versionOutput = yield getVersion('zstd', ['--quiet']); + const version = semver.clean(versionOutput); + core.debug(`zstd version: ${version}`); + if (versionOutput === '') { + return constants_1.CompressionMethod.Gzip; } else { - response = yield service.ListCacheEntries(ctx, request); + return constants_1.CompressionMethod.ZstdWithoutLong; } - return Buffer.from(cache_1.ListCacheEntriesResponse.toBinary(response)); }); } -function handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors) { +exports.getCompressionMethod = getCompressionMethod; +function getCacheFileName(compressionMethod) { + return compressionMethod === constants_1.CompressionMethod.Gzip + ? constants_1.CacheFilename.Gzip + : constants_1.CacheFilename.Zstd; +} +exports.getCacheFileName = getCacheFileName; +function getGnuTarPathOnWindows() { return __awaiter(this, void 0, void 0, function* () { - let request; - let response; - try { - request = cache_1.LookupCacheEntryRequest.fromBinary(data); - } - catch (e) { - if (e instanceof Error) { - const msg = "the protobuf request could not be decoded"; - throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - if (interceptors && interceptors.length > 0) { - const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors); - response = yield interceptor(ctx, request, (ctx, inputReq) => { - return service.LookupCacheEntry(ctx, inputReq); - }); - } - else { - response = yield service.LookupCacheEntry(ctx, request); + if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { + return constants_1.GnuTarPathOnWindows; } - return Buffer.from(cache_1.LookupCacheEntryResponse.toBinary(response)); + const versionOutput = yield getVersion('tar'); + return versionOutput.toLowerCase().includes('gnu tar') ? io.which('tar') : ''; }); } -//# sourceMappingURL=cache.twirp.js.map - -/***/ }), - -/***/ 3639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheEntry = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -const timestamp_1 = __nccwpck_require__(4469); -// @generated message type with reflection information, may provide speed optimized methods -class CacheEntry$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheEntry", [ - { no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "size_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 4, name: "scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "created_at", kind: "message", T: () => timestamp_1.Timestamp }, - { no: 7, name: "last_accessed_at", kind: "message", T: () => timestamp_1.Timestamp }, - { no: 8, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp } - ]); +exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; +function assertDefined(name, value) { + if (value === undefined) { + throw Error(`Expected ${name} but value was undefiend`); } - create(value) { - const message = { key: "", hash: "", sizeBytes: "0", scope: "", version: "" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; + return value; +} +exports.assertDefined = assertDefined; +function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { + // don't pass changes upstream + const components = paths.slice(); + // Add compression method to cache version to restore + // compressed cache as per compression method + if (compressionMethod) { + components.push(compressionMethod); } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string key */ 1: - message.key = reader.string(); - break; - case /* string hash */ 2: - message.hash = reader.string(); - break; - case /* int64 size_bytes */ 3: - message.sizeBytes = reader.int64().toString(); - break; - case /* string scope */ 4: - message.scope = reader.string(); - break; - case /* string version */ 5: - message.version = reader.string(); - break; - case /* google.protobuf.Timestamp created_at */ 6: - message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt); - break; - case /* google.protobuf.Timestamp last_accessed_at */ 7: - message.lastAccessedAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAccessedAt); - break; - case /* google.protobuf.Timestamp expires_at */ 8: - message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; + // Only check for windows platforms if enableCrossOsArchive is false + if (process.platform === 'win32' && !enableCrossOsArchive) { + components.push('windows-only'); } - internalBinaryWrite(message, writer, options) { - /* string key = 1; */ - if (message.key !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.key); - /* string hash = 2; */ - if (message.hash !== "") - writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.hash); - /* int64 size_bytes = 3; */ - if (message.sizeBytes !== "0") - writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes); - /* string scope = 4; */ - if (message.scope !== "") - writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.scope); - /* string version = 5; */ - if (message.version !== "") - writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.version); - /* google.protobuf.Timestamp created_at = 6; */ - if (message.createdAt) - timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp last_accessed_at = 7; */ - if (message.lastAccessedAt) - timestamp_1.Timestamp.internalBinaryWrite(message.lastAccessedAt, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join(); - /* google.protobuf.Timestamp expires_at = 8; */ - if (message.expiresAt) - timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; + // Add salt to cache version to support breaking changes in cache entry + components.push(versionSalt); + return crypto.createHash('sha256').update(components.join('|')).digest('hex'); +} +exports.getCacheVersion = getCacheVersion; +function getRuntimeToken() { + const token = process.env['ACTIONS_RUNTIME_TOKEN']; + if (!token) { + throw new Error('Unable to get the ACTIONS_RUNTIME_TOKEN env variable'); } + return token; } -/** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheEntry - */ -exports.CacheEntry = new CacheEntry$Type(); -//# sourceMappingURL=cacheentry.js.map +exports.getRuntimeToken = getRuntimeToken; +//# sourceMappingURL=cacheUtils.js.map /***/ }), -/***/ 7988: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 5147: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheMetadata = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -const cachescope_1 = __nccwpck_require__(3749); -// @generated message type with reflection information, may provide speed optimized methods -class CacheMetadata$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheMetadata", [ - { no: 1, name: "repository_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 2, name: "scope", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => cachescope_1.CacheScope } - ]); - } - create(value) { - const message = { repositoryId: "0", scope: [] }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 repository_id */ 1: - message.repositoryId = reader.int64().toString(); - break; - case /* repeated github.actions.results.entities.v1.CacheScope scope */ 2: - message.scope.push(cachescope_1.CacheScope.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* int64 repository_id = 1; */ - if (message.repositoryId !== "0") - writer.tag(1, runtime_1.WireType.Varint).int64(message.repositoryId); - /* repeated github.actions.results.entities.v1.CacheScope scope = 2; */ - for (let i = 0; i < message.scope.length; i++) - cachescope_1.CacheScope.internalBinaryWrite(message.scope[i], writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; +exports.getCacheServiceURL = exports.getCacheServiceVersion = exports.isGhes = void 0; +function isGhes() { + const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === 'GITHUB.COM'; + const isGheHost = hostname.endsWith('.GHE.COM'); + const isLocalHost = hostname.endsWith('.LOCALHOST'); + return !isGitHubHost && !isGheHost && !isLocalHost; +} +exports.isGhes = isGhes; +function getCacheServiceVersion() { + // Cache service v2 is not supported on GHES. We will default to + // cache service v1 even if the feature flag was enabled by user. + if (isGhes()) + return 'v1'; + return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1'; +} +exports.getCacheServiceVersion = getCacheServiceVersion; +function getCacheServiceURL() { + const version = getCacheServiceVersion(); + // Based on the version of the cache service, we will determine which + // URL to use. + switch (version) { + case 'v1': + return (process.env['ACTIONS_CACHE_URL'] || + process.env['ACTIONS_RESULTS_URL'] || + ''); + case 'v2': + return process.env['ACTIONS_RESULTS_URL'] || ''; + default: + throw new Error(`Unsupported cache service version: ${version}`); } } -/** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheMetadata - */ -exports.CacheMetadata = new CacheMetadata$Type(); -//# sourceMappingURL=cachemetadata.js.map +exports.getCacheServiceURL = getCacheServiceURL; +//# sourceMappingURL=config.js.map /***/ }), -/***/ 3749: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 8840: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheScope = void 0; -const runtime_1 = __nccwpck_require__(4061); -const runtime_2 = __nccwpck_require__(4061); -const runtime_3 = __nccwpck_require__(4061); -const runtime_4 = __nccwpck_require__(4061); -const runtime_5 = __nccwpck_require__(4061); -// @generated message type with reflection information, may provide speed optimized methods -class CacheScope$Type extends runtime_5.MessageType { - constructor() { - super("github.actions.results.entities.v1.CacheScope", [ - { no: 1, name: "scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "permission", kind: "scalar", T: 3 /*ScalarType.INT64*/ } - ]); - } - create(value) { - const message = { scope: "", permission: "0" }; - globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this }); - if (value !== undefined) - (0, runtime_3.reflectionMergePartial)(this, message, value); - return message; - } - internalBinaryRead(reader, length, options, target) { - let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string scope */ 1: - message.scope = reader.string(); - break; - case /* int64 permission */ 2: - message.permission = reader.int64().toString(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message, writer, options) { - /* string scope = 1; */ - if (message.scope !== "") - writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.scope); - /* int64 permission = 2; */ - if (message.permission !== "0") - writer.tag(2, runtime_1.WireType.Varint).int64(message.permission); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message github.actions.results.entities.v1.CacheScope - */ -exports.CacheScope = new CacheScope$Type(); -//# sourceMappingURL=cachescope.js.map +exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0; +var CacheFilename; +(function (CacheFilename) { + CacheFilename["Gzip"] = "cache.tgz"; + CacheFilename["Zstd"] = "cache.tzst"; +})(CacheFilename || (exports.CacheFilename = CacheFilename = {})); +var CompressionMethod; +(function (CompressionMethod) { + CompressionMethod["Gzip"] = "gzip"; + // Long range mode was added to zstd in v1.3.2. + // This enum is for earlier version of zstd that does not have --long support + CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; + CompressionMethod["Zstd"] = "zstd"; +})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {})); +var ArchiveToolType; +(function (ArchiveToolType) { + ArchiveToolType["GNU"] = "gnu"; + ArchiveToolType["BSD"] = "bsd"; +})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {})); +// The default number of retry attempts. +exports.DefaultRetryAttempts = 2; +// The default delay in milliseconds between retry attempts. +exports.DefaultRetryDelay = 5000; +// Socket timeout in milliseconds during download. If no traffic is received +// over the socket during this period, the socket is destroyed and the download +// is aborted. +exports.SocketTimeout = 5000; +// The default path of GNUtar on hosted Windows runners +exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\tar.exe`; +// The default path of BSDtar on hosted Windows runners +exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`; +exports.TarFilename = 'cache.tar'; +exports.ManifestFilename = 'manifest.txt'; +exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 8245: +/***/ 5500: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2239,232 +1689,354 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = void 0; +exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0; const core = __importStar(__nccwpck_require__(2186)); const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); +const storage_blob_1 = __nccwpck_require__(4100); +const buffer = __importStar(__nccwpck_require__(4300)); const fs = __importStar(__nccwpck_require__(7147)); -const url_1 = __nccwpck_require__(7310); +const stream = __importStar(__nccwpck_require__(2781)); +const util = __importStar(__nccwpck_require__(3837)); const utils = __importStar(__nccwpck_require__(1518)); -const uploadUtils_1 = __nccwpck_require__(1786); -const downloadUtils_1 = __nccwpck_require__(5500); -const options_1 = __nccwpck_require__(6215); +const constants_1 = __nccwpck_require__(8840); const requestUtils_1 = __nccwpck_require__(3981); -const config_1 = __nccwpck_require__(5147); -const user_agent_1 = __nccwpck_require__(580); -function getCacheApiUrl(resource) { - const baseUrl = (0, config_1.getCacheServiceURL)(); - if (!baseUrl) { - throw new Error('Cache Service Url not found, unable to restore cache.'); - } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core.debug(`Resource Url: ${url}`); - return url; -} -function createAcceptHeader(type, apiVersion) { - return `${type};api-version=${apiVersion}`; -} -function getRequestOptions() { - const requestOptions = { - headers: { - Accept: createAcceptHeader('application/json', '6.0-preview.1') - } - }; - return requestOptions; -} -function createHttpClient() { - const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; - const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); - return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); -} -function getCacheEntry(keys, paths, options) { +const abort_controller_1 = __nccwpck_require__(2557); +/** + * Pipes the body of a HTTP response to a stream + * + * @param response the HTTP response + * @param output the writable stream + */ +function pipeResponseToStream(response, output) { return __awaiter(this, void 0, void 0, function* () { - const httpClient = createHttpClient(); - const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); - const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); - // Cache not found - if (response.statusCode === 204) { - // List cache for primary key only if cache miss occurs - if (core.isDebug()) { - yield printCachesListForDiagnostics(keys[0], httpClient, version); - } - return null; - } - if (!(0, requestUtils_1.isSuccessStatusCode)(response.statusCode)) { - throw new Error(`Cache service responded with ${response.statusCode}`); - } - const cacheResult = response.result; - const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; - if (!cacheDownloadUrl) { - // Cache achiveLocation not found. This should never happen, and hence bail out. - throw new Error('Cache not found.'); - } - core.setSecret(cacheDownloadUrl); - core.debug(`Cache Result:`); - core.debug(JSON.stringify(cacheResult)); - return cacheResult; + const pipeline = util.promisify(stream.pipeline); + yield pipeline(response.message, output); }); } -exports.getCacheEntry = getCacheEntry; -function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter(this, void 0, void 0, function* () { - const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)('listCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); - if (response.statusCode === 200) { - const cacheListResult = response.result; - const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; - if (totalCount && totalCount > 0) { - core.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env['GITHUB_REF']}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`); - for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); - } +/** + * Class for tracking the download state and displaying stats. + */ +class DownloadProgress { + constructor(contentLength) { + this.contentLength = contentLength; + this.segmentIndex = 0; + this.segmentSize = 0; + this.segmentOffset = 0; + this.receivedBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); + } + /** + * Progress to the next segment. Only call this method when the previous segment + * is complete. + * + * @param segmentSize the length of the next segment + */ + nextSegment(segmentSize) { + this.segmentOffset = this.segmentOffset + this.segmentSize; + this.segmentIndex = this.segmentIndex + 1; + this.segmentSize = segmentSize; + this.receivedBytes = 0; + core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + } + /** + * Sets the number of bytes received for the current segment. + * + * @param receivedBytes the number of bytes received + */ + setReceivedBytes(receivedBytes) { + this.receivedBytes = receivedBytes; + } + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.segmentOffset + this.receivedBytes; + } + /** + * Returns true if the download is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current download stats. Once the download completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) { + return; + } + const transferredBytes = this.segmentOffset + this.receivedBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const downloadSpeed = (transferredBytes / + (1024 * 1024) / + (elapsedTime / 1000)).toFixed(1); + core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + if (this.isDone()) { + this.displayedComplete = true; + } + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setReceivedBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1000) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) { + this.timeoutHandle = setTimeout(displayCallback, delayInMs); } + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the download + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = undefined; } - }); + this.display(); + } } -function downloadCache(archiveLocation, archivePath, options) { +exports.DownloadProgress = DownloadProgress; +/** + * Download the cache using the Actions toolkit http-client + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ +function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter(this, void 0, void 0, function* () { - const archiveUrl = new url_1.URL(archiveLocation); - const downloadOptions = (0, options_1.getDownloadOptions)(options); - if (archiveUrl.hostname.endsWith('.blob.core.windows.net')) { - if (downloadOptions.useAzureSdk) { - // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability. - yield (0, downloadUtils_1.downloadCacheStorageSDK)(archiveLocation, archivePath, downloadOptions); - } - else if (downloadOptions.concurrentBlobDownloads) { - // Use concurrent implementation with HttpClient to work around blob SDK issue - yield (0, downloadUtils_1.downloadCacheHttpClientConcurrent)(archiveLocation, archivePath, downloadOptions); - } - else { - // Otherwise, download using the Actions http-client. - yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + const writeStream = fs.createWriteStream(archivePath); + const httpClient = new http_client_1.HttpClient('actions/cache'); + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); + // Abort download if no traffic received over the socket. + downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { + downloadResponse.message.destroy(); + core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + }); + yield pipeResponseToStream(downloadResponse, writeStream); + // Validate download size. + const contentLengthHeader = downloadResponse.message.headers['content-length']; + if (contentLengthHeader) { + const expectedLength = parseInt(contentLengthHeader); + const actualLength = utils.getArchiveFileSizeInBytes(archivePath); + if (actualLength !== expectedLength) { + throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - yield (0, downloadUtils_1.downloadCacheHttpClient)(archiveLocation, archivePath); + core.debug('Unable to validate download, no Content-Length header'); } }); } -exports.downloadCache = downloadCache; -// Reserve Cache -function reserveCache(key, paths, options) { +exports.downloadCacheHttpClient = downloadCacheHttpClient; +/** + * Download the cache using the Actions toolkit http-client concurrently + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ +function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { + var _a; return __awaiter(this, void 0, void 0, function* () { - const httpClient = createHttpClient(); - const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); - const reserveCacheRequest = { - key, - version, - cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize - }; - const response = yield (0, requestUtils_1.retryTypedResponse)('reserveCache', () => __awaiter(this, void 0, void 0, function* () { - return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); - })); - return response; - }); -} -exports.reserveCache = reserveCache; -function getContentRange(start, end) { - // Format: `bytes start-end/filesize - // start and end are inclusive - // filesize can be * - // For a 200 byte chunk starting at byte 0: - // Content-Range: bytes 0-199/* - return `bytes ${start}-${end}/*`; -} -function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter(this, void 0, void 0, function* () { - core.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); - const additionalHeaders = { - 'Content-Type': 'application/octet-stream', - 'Content-Range': getContentRange(start, end) - }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { - return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); - })); - if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { - throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); - } - }); -} -function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter(this, void 0, void 0, function* () { - // Upload Chunks - const fileSize = utils.getArchiveFileSizeInBytes(archivePath); - const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs.openSync(archivePath, 'r'); - const uploadOptions = (0, options_1.getUploadOptions)(options); - const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); - const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); - const parallelUploads = [...new Array(concurrency).keys()]; - core.debug('Awaiting all uploads'); - let offset = 0; + const archiveDescriptor = yield fs.promises.open(archivePath, 'w'); + const httpClient = new http_client_1.HttpClient('actions/cache', undefined, { + socketTimeout: options.timeoutInMs, + keepAlive: true + }); try { - yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { - while (offset < fileSize) { - const chunkSize = Math.min(fileSize - offset, maxChunkSize); - const start = offset; - const end = offset + chunkSize - 1; - offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs - .createReadStream(archivePath, { - fd, - start, - end, - autoClose: false + const res = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCacheMetadata', () => __awaiter(this, void 0, void 0, function* () { return yield httpClient.request('HEAD', archiveLocation, null, {}); })); + const lengthHeader = res.message.headers['content-length']; + if (lengthHeader === undefined || lengthHeader === null) { + throw new Error('Content-Length not found on blob response'); + } + const length = parseInt(lengthHeader); + if (Number.isNaN(length)) { + throw new Error(`Could not interpret Content-Length: ${length}`); + } + const downloads = []; + const blockSize = 4 * 1024 * 1024; + for (let offset = 0; offset < length; offset += blockSize) { + const count = Math.min(blockSize, length - offset); + downloads.push({ + offset, + promiseGetter: () => __awaiter(this, void 0, void 0, function* () { + return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) - .on('error', error => { - throw new Error(`Cache upload failed because file read failed with ${error.message}`); - }), start, end); + }); + } + // reverse to use .pop instead of .shift + downloads.reverse(); + let actives = 0; + let bytesDownloaded = 0; + const progress = new DownloadProgress(length); + progress.startDisplayTimer(); + const progressFn = progress.onProgress(); + const activeDownloads = []; + let nextDownload; + const waitAndWrite = () => __awaiter(this, void 0, void 0, function* () { + const segment = yield Promise.race(Object.values(activeDownloads)); + yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); + actives--; + delete activeDownloads[segment.offset]; + bytesDownloaded += segment.count; + progressFn({ loadedBytes: bytesDownloaded }); + }); + while ((nextDownload = downloads.pop())) { + activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); + actives++; + if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) { + yield waitAndWrite(); } - }))); + } + while (actives > 0) { + yield waitAndWrite(); + } } finally { - fs.closeSync(fd); + httpClient.dispose(); + yield archiveDescriptor.close(); } - return; }); } -function commitCache(httpClient, cacheId, filesize) { +exports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; +function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { return __awaiter(this, void 0, void 0, function* () { - const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)('commitCache', () => __awaiter(this, void 0, void 0, function* () { - return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); + const retries = 5; + let failures = 0; + while (true) { + try { + const timeout = 30000; + const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count)); + if (typeof result === 'string') { + throw new Error('downloadSegmentRetry failed due to timeout'); + } + return result; + } + catch (err) { + if (failures >= retries) { + throw err; + } + failures++; + } + } + }); +} +function downloadSegment(httpClient, archiveLocation, offset, count) { + return __awaiter(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCachePart', () => __awaiter(this, void 0, void 0, function* () { + return yield httpClient.get(archiveLocation, { + Range: `bytes=${offset}-${offset + count - 1}` + }); })); + if (!partRes.readBodyBuffer) { + throw new Error('Expected HttpClientResponse to implement readBodyBuffer'); + } + return { + offset, + count, + buffer: yield partRes.readBodyBuffer() + }; }); } -function saveCache(cacheId, archivePath, signedUploadURL, options) { +/** + * Download the cache using the Azure Storage SDK. Only call this method if the + * URL points to an Azure Storage endpoint. + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + * @param options the download options with the defaults set + */ +function downloadCacheStorageSDK(archiveLocation, archivePath, options) { + var _a; return __awaiter(this, void 0, void 0, function* () { - const uploadOptions = (0, options_1.getUploadOptions)(options); - if (uploadOptions.useAzureSdk) { - // Use Azure storage SDK to upload caches directly to Azure - if (!signedUploadURL) { - throw new Error('Azure Storage SDK can only be used when a signed URL is provided.'); + const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { + retryOptions: { + // Override the timeout used when downloading each 4 MB chunk + // The default is 2 min / MB, which is way too slow + tryTimeoutInMs: options.timeoutInMs } - yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); + }); + const properties = yield client.getProperties(); + const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; + if (contentLength < 0) { + // We should never hit this condition, but just in case fall back to downloading the + // file as one large stream + core.debug('Unable to determine content length, downloading file with http-client...'); + yield downloadCacheHttpClient(archiveLocation, archivePath); } else { - const httpClient = createHttpClient(); - core.debug('Upload cache'); - yield uploadFile(httpClient, cacheId, archivePath, options); - // Commit Cache - core.debug('Commiting cache'); - const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); - const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); - if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { - throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + // Use downloadToBuffer for faster downloads, since internally it splits the + // file into 4 MB chunks which can then be parallelized and retried independently + // + // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB + // on 64-bit systems), split the download into multiple segments + // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly. + // Updated segment size to 128MB = 134217728 bytes, to complete a segment faster and fail fast + const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); + const downloadProgress = new DownloadProgress(contentLength); + const fd = fs.openSync(archivePath, 'w'); + try { + downloadProgress.startDisplayTimer(); + const controller = new abort_controller_1.AbortController(); + const abortSignal = controller.signal; + while (!downloadProgress.isDone()) { + const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; + const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); + downloadProgress.nextSegment(segmentSize); + const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 3600000, client.downloadToBuffer(segmentStart, segmentSize, { + abortSignal, + concurrency: options.downloadConcurrency, + onProgress: downloadProgress.onProgress() + })); + if (result === 'timeout') { + controller.abort(); + throw new Error('Aborting cache download as the download time exceeded the timeout.'); + } + else if (Buffer.isBuffer(result)) { + fs.writeFileSync(fd, result); + } + } + } + finally { + downloadProgress.stopDisplayTimer(); + fs.closeSync(fd); } - core.info('Cache saved successfully'); } }); } -exports.saveCache = saveCache; -//# sourceMappingURL=cacheHttpClient.js.map +exports.downloadCacheStorageSDK = downloadCacheStorageSDK; +const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () { + let timeoutHandle; + const timeoutPromise = new Promise(resolve => { + timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs); + }); + return Promise.race([promise, timeoutPromise]).then(result => { + clearTimeout(timeoutHandle); + return result; + }); +}); +//# sourceMappingURL=downloadUtils.js.map /***/ }), -/***/ 1518: +/***/ 3981: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2501,281 +2073,378 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeToken = exports.getCacheVersion = exports.assertDefined = exports.getGnuTarPathOnWindows = exports.getCacheFileName = exports.getCompressionMethod = exports.unlinkFile = exports.resolvePaths = exports.getArchiveFileSizeInBytes = exports.createTempDirectory = void 0; +exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0; const core = __importStar(__nccwpck_require__(2186)); -const exec = __importStar(__nccwpck_require__(1514)); -const glob = __importStar(__nccwpck_require__(1597)); -const io = __importStar(__nccwpck_require__(7436)); -const crypto = __importStar(__nccwpck_require__(6113)); -const fs = __importStar(__nccwpck_require__(7147)); -const path = __importStar(__nccwpck_require__(1017)); -const semver = __importStar(__nccwpck_require__(3771)); -const util = __importStar(__nccwpck_require__(3837)); +const http_client_1 = __nccwpck_require__(6255); const constants_1 = __nccwpck_require__(8840); -const versionSalt = '1.0'; -// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23 -function createTempDirectory() { - return __awaiter(this, void 0, void 0, function* () { - const IS_WINDOWS = process.platform === 'win32'; - let tempDirectory = process.env['RUNNER_TEMP'] || ''; - if (!tempDirectory) { - let baseLocation; - if (IS_WINDOWS) { - // On Windows use the USERPROFILE env variable - baseLocation = process.env['USERPROFILE'] || 'C:\\'; - } - else { - if (process.platform === 'darwin') { - baseLocation = '/Users'; - } - else { - baseLocation = '/home'; - } - } - tempDirectory = path.join(baseLocation, 'actions', 'temp'); - } - const dest = path.join(tempDirectory, crypto.randomUUID()); - yield io.mkdirP(dest); - return dest; - }); +function isSuccessStatusCode(statusCode) { + if (!statusCode) { + return false; + } + return statusCode >= 200 && statusCode < 300; } -exports.createTempDirectory = createTempDirectory; -function getArchiveFileSizeInBytes(filePath) { - return fs.statSync(filePath).size; +exports.isSuccessStatusCode = isSuccessStatusCode; +function isServerErrorStatusCode(statusCode) { + if (!statusCode) { + return true; + } + return statusCode >= 500; } -exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; -function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter(this, void 0, void 0, function* () { - const paths = []; - const workspace = (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd(); - const globber = yield glob.create(patterns.join('\n'), { - implicitDescendants: false - }); - try { - for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - const relativeFile = path - .relative(workspace, file) - .replace(new RegExp(`\\${path.sep}`, 'g'), '/'); - core.debug(`Matched: ${relativeFile}`); - // Paths are made relative so the tar entries are all relative to the root of the workspace. - if (relativeFile === '') { - // path.relative returns empty string if workspace and file are equal - paths.push('.'); - } - else { - paths.push(`${relativeFile}`); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } - finally { if (e_1) throw e_1.error; } - } - return paths; - }); +exports.isServerErrorStatusCode = isServerErrorStatusCode; +function isRetryableStatusCode(statusCode) { + if (!statusCode) { + return false; + } + const retryableStatusCodes = [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.GatewayTimeout + ]; + return retryableStatusCodes.includes(statusCode); } -exports.resolvePaths = resolvePaths; -function unlinkFile(filePath) { +exports.isRetryableStatusCode = isRetryableStatusCode; +function sleep(milliseconds) { return __awaiter(this, void 0, void 0, function* () { - return util.promisify(fs.unlink)(filePath); + return new Promise(resolve => setTimeout(resolve, milliseconds)); }); } -exports.unlinkFile = unlinkFile; -function getVersion(app, additionalArgs = []) { +function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = undefined) { return __awaiter(this, void 0, void 0, function* () { - let versionOutput = ''; - additionalArgs.push('--version'); - core.debug(`Checking ${app} ${additionalArgs.join(' ')}`); - try { - yield exec.exec(`${app}`, additionalArgs, { - ignoreReturnCode: true, - silent: true, - listeners: { - stdout: (data) => (versionOutput += data.toString()), - stderr: (data) => (versionOutput += data.toString()) + let errorMessage = ''; + let attempt = 1; + while (attempt <= maxAttempts) { + let response = undefined; + let statusCode = undefined; + let isRetryable = false; + try { + response = yield method(); + } + catch (error) { + if (onError) { + response = onError(error); } - }); - } - catch (err) { - core.debug(err.message); + isRetryable = true; + errorMessage = error.message; + } + if (response) { + statusCode = getStatusCode(response); + if (!isServerErrorStatusCode(statusCode)) { + return response; + } + } + if (statusCode) { + isRetryable = isRetryableStatusCode(statusCode); + errorMessage = `Cache service responded with ${statusCode}`; + } + core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + if (!isRetryable) { + core.debug(`${name} - Error is not retryable`); + break; + } + yield sleep(delay); + attempt++; } - versionOutput = versionOutput.trim(); - core.debug(versionOutput); - return versionOutput; + throw Error(`${name} failed: ${errorMessage}`); }); } -// Use zstandard if possible to maximize cache performance -function getCompressionMethod() { +exports.retry = retry; +function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return __awaiter(this, void 0, void 0, function* () { - const versionOutput = yield getVersion('zstd', ['--quiet']); - const version = semver.clean(versionOutput); - core.debug(`zstd version: ${version}`); - if (versionOutput === '') { - return constants_1.CompressionMethod.Gzip; - } - else { - return constants_1.CompressionMethod.ZstdWithoutLong; - } + return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, + // If the error object contains the statusCode property, extract it and return + // an TypedResponse<T> so it can be processed by the retry logic. + (error) => { + if (error instanceof http_client_1.HttpClientError) { + return { + statusCode: error.statusCode, + result: null, + headers: {}, + error + }; + } + else { + return undefined; + } + }); }); } -exports.getCompressionMethod = getCompressionMethod; -function getCacheFileName(compressionMethod) { - return compressionMethod === constants_1.CompressionMethod.Gzip - ? constants_1.CacheFilename.Gzip - : constants_1.CacheFilename.Zstd; -} -exports.getCacheFileName = getCacheFileName; -function getGnuTarPathOnWindows() { +exports.retryTypedResponse = retryTypedResponse; +function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return __awaiter(this, void 0, void 0, function* () { - if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { - return constants_1.GnuTarPathOnWindows; - } - const versionOutput = yield getVersion('tar'); - return versionOutput.toLowerCase().includes('gnu tar') ? io.which('tar') : ''; + return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } -exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; -function assertDefined(name, value) { - if (value === undefined) { - throw Error(`Expected ${name} but value was undefiend`); - } - return value; -} -exports.assertDefined = assertDefined; -function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { - // don't pass changes upstream - const components = paths.slice(); - // Add compression method to cache version to restore - // compressed cache as per compression method - if (compressionMethod) { - components.push(compressionMethod); - } - // Only check for windows platforms if enableCrossOsArchive is false - if (process.platform === 'win32' && !enableCrossOsArchive) { - components.push('windows-only'); - } - // Add salt to cache version to support breaking changes in cache entry - components.push(versionSalt); - return crypto.createHash('sha256').update(components.join('|')).digest('hex'); -} -exports.getCacheVersion = getCacheVersion; -function getRuntimeToken() { - const token = process.env['ACTIONS_RUNTIME_TOKEN']; - if (!token) { - throw new Error('Unable to get the ACTIONS_RUNTIME_TOKEN env variable'); - } - return token; -} -exports.getRuntimeToken = getRuntimeToken; -//# sourceMappingURL=cacheUtils.js.map +exports.retryHttpClientResponse = retryHttpClientResponse; +//# sourceMappingURL=requestUtils.js.map /***/ }), -/***/ 5147: -/***/ ((__unused_webpack_module, exports) => { +/***/ 2502: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCacheServiceURL = exports.getCacheServiceVersion = exports.isGhes = void 0; -function isGhes() { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === 'GITHUB.COM'; - const isGheHost = hostname.endsWith('.GHE.COM'); - const isLocalHost = hostname.endsWith('.LOCALHOST'); - return !isGitHubHost && !isGheHost && !isLocalHost; +exports.internalCacheTwirpClient = void 0; +const core_1 = __nccwpck_require__(2186); +const user_agent_1 = __nccwpck_require__(580); +const errors_1 = __nccwpck_require__(8223); +const config_1 = __nccwpck_require__(5147); +const cacheUtils_1 = __nccwpck_require__(1518); +const auth_1 = __nccwpck_require__(5526); +const http_client_1 = __nccwpck_require__(6255); +const cache_twirp_client_1 = __nccwpck_require__(2655); +/** + * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. + * + * It adds retry logic to the request method, which is not present in the generated client. + * + * This class is used to interact with cache service v2. + */ +class CacheServiceClient { + constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { + this.maxAttempts = 5; + this.baseRetryIntervalMilliseconds = 3000; + this.retryMultiplier = 1.5; + const token = (0, cacheUtils_1.getRuntimeToken)(); + this.baseUrl = (0, config_1.getCacheServiceURL)(); + if (maxAttempts) { + this.maxAttempts = maxAttempts; + } + if (baseRetryIntervalMilliseconds) { + this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; + } + if (retryMultiplier) { + this.retryMultiplier = retryMultiplier; + } + this.httpClient = new http_client_1.HttpClient(userAgent, [ + new auth_1.BearerCredentialHandler(token) + ]); + } + // This function satisfies the Rpc interface. It is compatible with the JSON + // JSON generated client. + request(service, method, contentType, data) { + return __awaiter(this, void 0, void 0, function* () { + const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url}`); + const headers = { + 'Content-Type': contentType + }; + try { + const { body } = yield this.retryableRequest(() => __awaiter(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); + return body; + } + catch (error) { + throw new Error(`Failed to ${method}: ${error.message}`); + } + }); + } + retryableRequest(operation) { + return __awaiter(this, void 0, void 0, function* () { + let attempt = 0; + let errorMessage = ''; + let rawBody = ''; + while (attempt < this.maxAttempts) { + let isRetryable = false; + try { + const response = yield operation(); + const statusCode = response.message.statusCode; + rawBody = yield response.readBody(); + (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); + (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); + const body = JSON.parse(rawBody); + (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`); + if (this.isSuccessStatusCode(statusCode)) { + return { response, body }; + } + isRetryable = this.isRetryableHttpStatusCode(statusCode); + errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; + if (body.msg) { + if (errors_1.UsageError.isUsageErrorMessage(body.msg)) { + throw new errors_1.UsageError(); + } + errorMessage = `${errorMessage}: ${body.msg}`; + } + } + catch (error) { + if (error instanceof SyntaxError) { + (0, core_1.debug)(`Raw Body: ${rawBody}`); + } + if (error instanceof errors_1.UsageError) { + throw error; + } + if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) { + throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); + } + isRetryable = true; + errorMessage = error.message; + } + if (!isRetryable) { + throw new Error(`Received non-retryable error: ${errorMessage}`); + } + if (attempt + 1 === this.maxAttempts) { + throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); + } + const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); + (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); + yield this.sleep(retryTimeMilliseconds); + attempt++; + } + throw new Error(`Request failed`); + }); + } + isSuccessStatusCode(statusCode) { + if (!statusCode) + return false; + return statusCode >= 200 && statusCode < 300; + } + isRetryableHttpStatusCode(statusCode) { + if (!statusCode) + return false; + const retryableStatusCodes = [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.GatewayTimeout, + http_client_1.HttpCodes.InternalServerError, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.TooManyRequests + ]; + return retryableStatusCodes.includes(statusCode); + } + sleep(milliseconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise(resolve => setTimeout(resolve, milliseconds)); + }); + } + getExponentialRetryTimeMilliseconds(attempt) { + if (attempt < 0) { + throw new Error('attempt should be a positive integer'); + } + if (attempt === 0) { + return this.baseRetryIntervalMilliseconds; + } + const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); + const maxTime = minTime * this.retryMultiplier; + // returns a random number between minTime and maxTime (exclusive) + return Math.trunc(Math.random() * (maxTime - minTime) + minTime); + } } -exports.isGhes = isGhes; -function getCacheServiceVersion() { - // Cache service v2 is not supported on GHES. We will default to - // cache service v1 even if the feature flag was enabled by user. - if (isGhes()) - return 'v1'; - return process.env['ACTIONS_CACHE_SERVICE_V2'] ? 'v2' : 'v1'; +function internalCacheTwirpClient(options) { + const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); + return new cache_twirp_client_1.CacheServiceClientJSON(client); } -exports.getCacheServiceVersion = getCacheServiceVersion; -function getCacheServiceURL() { - const version = getCacheServiceVersion(); - // Based on the version of the cache service, we will determine which - // URL to use. - switch (version) { - case 'v1': - return (process.env['ACTIONS_CACHE_URL'] || - process.env['ACTIONS_RESULTS_URL'] || - ''); - case 'v2': - return process.env['ACTIONS_RESULTS_URL'] || ''; - default: - throw new Error(`Unsupported cache service version: ${version}`); +exports.internalCacheTwirpClient = internalCacheTwirpClient; +//# sourceMappingURL=cacheTwirpClient.js.map + +/***/ }), + +/***/ 8223: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0; +class FilesNotFoundError extends Error { + constructor(files = []) { + let message = 'No files were found to upload'; + if (files.length > 0) { + message += `: ${files.join(', ')}`; + } + super(message); + this.files = files; + this.name = 'FilesNotFoundError'; } } -exports.getCacheServiceURL = getCacheServiceURL; -//# sourceMappingURL=config.js.map +exports.FilesNotFoundError = FilesNotFoundError; +class InvalidResponseError extends Error { + constructor(message) { + super(message); + this.name = 'InvalidResponseError'; + } +} +exports.InvalidResponseError = InvalidResponseError; +class CacheNotFoundError extends Error { + constructor(message = 'Cache not found') { + super(message); + this.name = 'CacheNotFoundError'; + } +} +exports.CacheNotFoundError = CacheNotFoundError; +class GHESNotSupportedError extends Error { + constructor(message = '@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.') { + super(message); + this.name = 'GHESNotSupportedError'; + } +} +exports.GHESNotSupportedError = GHESNotSupportedError; +class NetworkError extends Error { + constructor(code) { + const message = `Unable to make request: ${code}\nIf you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; + super(message); + this.code = code; + this.name = 'NetworkError'; + } +} +exports.NetworkError = NetworkError; +NetworkError.isNetworkErrorCode = (code) => { + if (!code) + return false; + return [ + 'ECONNRESET', + 'ENOTFOUND', + 'ETIMEDOUT', + 'ECONNREFUSED', + 'EHOSTUNREACH' + ].includes(code); +}; +class UsageError extends Error { + constructor() { + const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; + super(message); + this.name = 'UsageError'; + } +} +exports.UsageError = UsageError; +UsageError.isUsageErrorMessage = (msg) => { + if (!msg) + return false; + return msg.includes('insufficient usage'); +}; +//# sourceMappingURL=errors.js.map /***/ }), -/***/ 8840: -/***/ ((__unused_webpack_module, exports) => { +/***/ 580: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0; -var CacheFilename; -(function (CacheFilename) { - CacheFilename["Gzip"] = "cache.tgz"; - CacheFilename["Zstd"] = "cache.tzst"; -})(CacheFilename || (exports.CacheFilename = CacheFilename = {})); -var CompressionMethod; -(function (CompressionMethod) { - CompressionMethod["Gzip"] = "gzip"; - // Long range mode was added to zstd in v1.3.2. - // This enum is for earlier version of zstd that does not have --long support - CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; - CompressionMethod["Zstd"] = "zstd"; -})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {})); -var ArchiveToolType; -(function (ArchiveToolType) { - ArchiveToolType["GNU"] = "gnu"; - ArchiveToolType["BSD"] = "bsd"; -})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {})); -// The default number of retry attempts. -exports.DefaultRetryAttempts = 2; -// The default delay in milliseconds between retry attempts. -exports.DefaultRetryDelay = 5000; -// Socket timeout in milliseconds during download. If no traffic is received -// over the socket during this period, the socket is destroyed and the download -// is aborted. -exports.SocketTimeout = 5000; -// The default path of GNUtar on hosted Windows runners -exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\tar.exe`; -// The default path of BSDtar on hosted Windows runners -exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`; -exports.TarFilename = 'cache.tar'; -exports.ManifestFilename = 'manifest.txt'; -exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository -//# sourceMappingURL=constants.js.map +exports.getUserAgentString = void 0; +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports +const packageJson = __nccwpck_require__(9167); +/** + * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package + */ +function getUserAgentString() { + return `@actions/cache-${packageJson.version}`; +} +exports.getUserAgentString = getUserAgentString; +//# sourceMappingURL=user-agent.js.map /***/ }), -/***/ 5500: +/***/ 6490: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2813,354 +2482,248 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.downloadCacheStorageSDK = exports.downloadCacheHttpClientConcurrent = exports.downloadCacheHttpClient = exports.DownloadProgress = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const http_client_1 = __nccwpck_require__(6255); -const storage_blob_1 = __nccwpck_require__(4100); -const buffer = __importStar(__nccwpck_require__(4300)); -const fs = __importStar(__nccwpck_require__(7147)); -const stream = __importStar(__nccwpck_require__(2781)); -const util = __importStar(__nccwpck_require__(3837)); +exports.createTar = exports.extractTar = exports.listTar = void 0; +const exec_1 = __nccwpck_require__(1514); +const io = __importStar(__nccwpck_require__(7436)); +const fs_1 = __nccwpck_require__(7147); +const path = __importStar(__nccwpck_require__(1017)); const utils = __importStar(__nccwpck_require__(1518)); const constants_1 = __nccwpck_require__(8840); -const requestUtils_1 = __nccwpck_require__(3981); -const abort_controller_1 = __nccwpck_require__(2557); -/** - * Pipes the body of a HTTP response to a stream - * - * @param response the HTTP response - * @param output the writable stream - */ -function pipeResponseToStream(response, output) { +const IS_WINDOWS = process.platform === 'win32'; +// Returns tar path and type: BSD or GNU +function getTarPath() { return __awaiter(this, void 0, void 0, function* () { - const pipeline = util.promisify(stream.pipeline); - yield pipeline(response.message, output); + switch (process.platform) { + case 'win32': { + const gnuTar = yield utils.getGnuTarPathOnWindows(); + const systemTar = constants_1.SystemTarPathOnWindows; + if (gnuTar) { + // Use GNUtar as default on windows + return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; + } + else if ((0, fs_1.existsSync)(systemTar)) { + return { path: systemTar, type: constants_1.ArchiveToolType.BSD }; + } + break; + } + case 'darwin': { + const gnuTar = yield io.which('gtar', false); + if (gnuTar) { + // fix permission denied errors when extracting BSD tar archive with GNU tar - https://github.com/actions/cache/issues/527 + return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; + } + else { + return { + path: yield io.which('tar', true), + type: constants_1.ArchiveToolType.BSD + }; + } + } + default: + break; + } + // Default assumption is GNU tar is present in path + return { + path: yield io.which('tar', true), + type: constants_1.ArchiveToolType.GNU + }; }); } -/** - * Class for tracking the download state and displaying stats. - */ -class DownloadProgress { - constructor(contentLength) { - this.contentLength = contentLength; - this.segmentIndex = 0; - this.segmentSize = 0; - this.segmentOffset = 0; - this.receivedBytes = 0; - this.displayedComplete = false; - this.startTime = Date.now(); - } - /** - * Progress to the next segment. Only call this method when the previous segment - * is complete. - * - * @param segmentSize the length of the next segment - */ - nextSegment(segmentSize) { - this.segmentOffset = this.segmentOffset + this.segmentSize; - this.segmentIndex = this.segmentIndex + 1; - this.segmentSize = segmentSize; - this.receivedBytes = 0; - core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); - } - /** - * Sets the number of bytes received for the current segment. - * - * @param receivedBytes the number of bytes received - */ - setReceivedBytes(receivedBytes) { - this.receivedBytes = receivedBytes; - } - /** - * Returns the total number of bytes transferred. - */ - getTransferredBytes() { - return this.segmentOffset + this.receivedBytes; - } - /** - * Returns true if the download is complete. - */ - isDone() { - return this.getTransferredBytes() === this.contentLength; - } - /** - * Prints the current download stats. Once the download completes, this will print one - * last line and then stop. - */ - display() { - if (this.displayedComplete) { - return; - } - const transferredBytes = this.segmentOffset + this.receivedBytes; - const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); - const elapsedTime = Date.now() - this.startTime; - const downloadSpeed = (transferredBytes / - (1024 * 1024) / - (elapsedTime / 1000)).toFixed(1); - core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); - if (this.isDone()) { - this.displayedComplete = true; +// Return arguments for tar as per tarPath, compressionMethod, method type and os +function getTarArgs(tarPath, compressionMethod, type, archivePath = '') { + return __awaiter(this, void 0, void 0, function* () { + const args = [`"${tarPath.path}"`]; + const cacheFileName = utils.getCacheFileName(compressionMethod); + const tarFile = 'cache.tar'; + const workingDirectory = getWorkingDirectory(); + // Speficic args for BSD tar on windows for workaround + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && + compressionMethod !== constants_1.CompressionMethod.Gzip && + IS_WINDOWS; + // Method specific args + switch (type) { + case 'create': + args.push('--posix', '-cf', BSD_TAR_ZSTD + ? tarFile + : cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '--exclude', BSD_TAR_ZSTD + ? tarFile + : cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '--files-from', constants_1.ManifestFilename); + break; + case 'extract': + args.push('-xf', BSD_TAR_ZSTD + ? tarFile + : archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/')); + break; + case 'list': + args.push('-tf', BSD_TAR_ZSTD + ? tarFile + : archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P'); + break; } - } - /** - * Returns a function used to handle TransferProgressEvents. - */ - onProgress() { - return (progress) => { - this.setReceivedBytes(progress.loadedBytes); - }; - } - /** - * Starts the timer that displays the stats. - * - * @param delayInMs the delay between each write - */ - startDisplayTimer(delayInMs = 1000) { - const displayCallback = () => { - this.display(); - if (!this.isDone()) { - this.timeoutHandle = setTimeout(displayCallback, delayInMs); + // Platform specific args + if (tarPath.type === constants_1.ArchiveToolType.GNU) { + switch (process.platform) { + case 'win32': + args.push('--force-local'); + break; + case 'darwin': + args.push('--delay-directory-restore'); + break; } - }; - this.timeoutHandle = setTimeout(displayCallback, delayInMs); - } - /** - * Stops the timer that displays the stats. As this typically indicates the download - * is complete, this will display one last line, unless the last line has already - * been written. - */ - stopDisplayTimer() { - if (this.timeoutHandle) { - clearTimeout(this.timeoutHandle); - this.timeoutHandle = undefined; } - this.display(); - } + return args; + }); } -exports.DownloadProgress = DownloadProgress; -/** - * Download the cache using the Actions toolkit http-client - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - */ -function downloadCacheHttpClient(archiveLocation, archivePath) { +// Returns commands to run tar and compression program +function getCommands(compressionMethod, type, archivePath = '') { return __awaiter(this, void 0, void 0, function* () { - const writeStream = fs.createWriteStream(archivePath); - const httpClient = new http_client_1.HttpClient('actions/cache'); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); - // Abort download if no traffic received over the socket. - downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { - downloadResponse.message.destroy(); - core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); - }); - yield pipeResponseToStream(downloadResponse, writeStream); - // Validate download size. - const contentLengthHeader = downloadResponse.message.headers['content-length']; - if (contentLengthHeader) { - const expectedLength = parseInt(contentLengthHeader); - const actualLength = utils.getArchiveFileSizeInBytes(archivePath); - if (actualLength !== expectedLength) { - throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); - } + let args; + const tarPath = yield getTarPath(); + const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); + const compressionArgs = type !== 'create' + ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) + : yield getCompressionProgram(tarPath, compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && + compressionMethod !== constants_1.CompressionMethod.Gzip && + IS_WINDOWS; + if (BSD_TAR_ZSTD && type !== 'create') { + args = [[...compressionArgs].join(' '), [...tarArgs].join(' ')]; } else { - core.debug('Unable to validate download, no Content-Length header'); + args = [[...tarArgs].join(' '), [...compressionArgs].join(' ')]; } + if (BSD_TAR_ZSTD) { + return args; + } + return [args.join(' ')]; }); } -exports.downloadCacheHttpClient = downloadCacheHttpClient; -/** - * Download the cache using the Actions toolkit http-client concurrently - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - */ -function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { +function getWorkingDirectory() { var _a; + return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); +} +// Common function for extractTar and listTar to get the compression method +function getDecompressionProgram(tarPath, compressionMethod, archivePath) { return __awaiter(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs.promises.open(archivePath, 'w'); - const httpClient = new http_client_1.HttpClient('actions/cache', undefined, { - socketTimeout: options.timeoutInMs, - keepAlive: true - }); - try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCacheMetadata', () => __awaiter(this, void 0, void 0, function* () { return yield httpClient.request('HEAD', archiveLocation, null, {}); })); - const lengthHeader = res.message.headers['content-length']; - if (lengthHeader === undefined || lengthHeader === null) { - throw new Error('Content-Length not found on blob response'); - } - const length = parseInt(lengthHeader); - if (Number.isNaN(length)) { - throw new Error(`Could not interpret Content-Length: ${length}`); - } - const downloads = []; - const blockSize = 4 * 1024 * 1024; - for (let offset = 0; offset < length; offset += blockSize) { - const count = Math.min(blockSize, length - offset); - downloads.push({ - offset, - promiseGetter: () => __awaiter(this, void 0, void 0, function* () { - return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); - }) - }); - } - // reverse to use .pop instead of .shift - downloads.reverse(); - let actives = 0; - let bytesDownloaded = 0; - const progress = new DownloadProgress(length); - progress.startDisplayTimer(); - const progressFn = progress.onProgress(); - const activeDownloads = []; - let nextDownload; - const waitAndWrite = () => __awaiter(this, void 0, void 0, function* () { - const segment = yield Promise.race(Object.values(activeDownloads)); - yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); - actives--; - delete activeDownloads[segment.offset]; - bytesDownloaded += segment.count; - progressFn({ loadedBytes: bytesDownloaded }); - }); - while ((nextDownload = downloads.pop())) { - activeDownloads[nextDownload.offset] = nextDownload.promiseGetter(); - actives++; - if (actives >= ((_a = options.downloadConcurrency) !== null && _a !== void 0 ? _a : 10)) { - yield waitAndWrite(); - } - } - while (actives > 0) { - yield waitAndWrite(); - } + // -d: Decompress. + // unzstd is equivalent to 'zstd -d' + // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. + // Using 30 here because we also support 32-bit self-hosted runners. + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && + compressionMethod !== constants_1.CompressionMethod.Gzip && + IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: + return BSD_TAR_ZSTD + ? [ + 'zstd -d --long=30 --force -o', + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/') + ] + : [ + '--use-compress-program', + IS_WINDOWS ? '"zstd -d --long=30"' : 'unzstd --long=30' + ]; + case constants_1.CompressionMethod.ZstdWithoutLong: + return BSD_TAR_ZSTD + ? [ + 'zstd -d --force -o', + constants_1.TarFilename, + archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/') + ] + : ['--use-compress-program', IS_WINDOWS ? '"zstd -d"' : 'unzstd']; + default: + return ['-z']; } - finally { - httpClient.dispose(); - yield archiveDescriptor.close(); + }); +} +// Used for creating the archive +// -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores. +// zstdmt is equivalent to 'zstd -T0' +// --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. +// Using 30 here because we also support 32-bit self-hosted runners. +// Long range mode is added to zstd in v1.3.2 release, so we will not use --long in older version of zstd. +function getCompressionProgram(tarPath, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + const cacheFileName = utils.getCacheFileName(compressionMethod); + const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && + compressionMethod !== constants_1.CompressionMethod.Gzip && + IS_WINDOWS; + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: + return BSD_TAR_ZSTD + ? [ + 'zstd -T0 --long=30 --force -o', + cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + constants_1.TarFilename + ] + : [ + '--use-compress-program', + IS_WINDOWS ? '"zstd -T0 --long=30"' : 'zstdmt --long=30' + ]; + case constants_1.CompressionMethod.ZstdWithoutLong: + return BSD_TAR_ZSTD + ? [ + 'zstd -T0 --force -o', + cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + constants_1.TarFilename + ] + : ['--use-compress-program', IS_WINDOWS ? '"zstd -T0"' : 'zstdmt']; + default: + return ['-z']; } }); } -exports.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; -function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { +// Executes all commands as separate processes +function execCommands(commands, cwd) { return __awaiter(this, void 0, void 0, function* () { - const retries = 5; - let failures = 0; - while (true) { + for (const command of commands) { try { - const timeout = 30000; - const result = yield promiseWithTimeout(timeout, downloadSegment(httpClient, archiveLocation, offset, count)); - if (typeof result === 'string') { - throw new Error('downloadSegmentRetry failed due to timeout'); - } - return result; + yield (0, exec_1.exec)(command, undefined, { + cwd, + env: Object.assign(Object.assign({}, process.env), { MSYS: 'winsymlinks:nativestrict' }) + }); } - catch (err) { - if (failures >= retries) { - throw err; - } - failures++; + catch (error) { + throw new Error(`${command.split(' ')[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); } } }); } -function downloadSegment(httpClient, archiveLocation, offset, count) { +// List the contents of a tar +function listTar(archivePath, compressionMethod) { return __awaiter(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)('downloadCachePart', () => __awaiter(this, void 0, void 0, function* () { - return yield httpClient.get(archiveLocation, { - Range: `bytes=${offset}-${offset + count - 1}` - }); - })); - if (!partRes.readBodyBuffer) { - throw new Error('Expected HttpClientResponse to implement readBodyBuffer'); - } - return { - offset, - count, - buffer: yield partRes.readBodyBuffer() - }; + const commands = yield getCommands(compressionMethod, 'list', archivePath); + yield execCommands(commands); }); } -/** - * Download the cache using the Azure Storage SDK. Only call this method if the - * URL points to an Azure Storage endpoint. - * - * @param archiveLocation the URL for the cache - * @param archivePath the local path where the cache is saved - * @param options the download options with the defaults set - */ -function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; +exports.listTar = listTar; +// Extract a tar +function extractTar(archivePath, compressionMethod) { return __awaiter(this, void 0, void 0, function* () { - const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { - retryOptions: { - // Override the timeout used when downloading each 4 MB chunk - // The default is 2 min / MB, which is way too slow - tryTimeoutInMs: options.timeoutInMs - } - }); - const properties = yield client.getProperties(); - const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; - if (contentLength < 0) { - // We should never hit this condition, but just in case fall back to downloading the - // file as one large stream - core.debug('Unable to determine content length, downloading file with http-client...'); - yield downloadCacheHttpClient(archiveLocation, archivePath); - } - else { - // Use downloadToBuffer for faster downloads, since internally it splits the - // file into 4 MB chunks which can then be parallelized and retried independently - // - // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB - // on 64-bit systems), split the download into multiple segments - // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly. - // Updated segment size to 128MB = 134217728 bytes, to complete a segment faster and fail fast - const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); - const downloadProgress = new DownloadProgress(contentLength); - const fd = fs.openSync(archivePath, 'w'); - try { - downloadProgress.startDisplayTimer(); - const controller = new abort_controller_1.AbortController(); - const abortSignal = controller.signal; - while (!downloadProgress.isDone()) { - const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; - const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); - downloadProgress.nextSegment(segmentSize); - const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 3600000, client.downloadToBuffer(segmentStart, segmentSize, { - abortSignal, - concurrency: options.downloadConcurrency, - onProgress: downloadProgress.onProgress() - })); - if (result === 'timeout') { - controller.abort(); - throw new Error('Aborting cache download as the download time exceeded the timeout.'); - } - else if (Buffer.isBuffer(result)) { - fs.writeFileSync(fd, result); - } - } - } - finally { - downloadProgress.stopDisplayTimer(); - fs.closeSync(fd); - } - } + // Create directory to extract tar into + const workingDirectory = getWorkingDirectory(); + yield io.mkdirP(workingDirectory); + const commands = yield getCommands(compressionMethod, 'extract', archivePath); + yield execCommands(commands); }); } -exports.downloadCacheStorageSDK = downloadCacheStorageSDK; -const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () { - let timeoutHandle; - const timeoutPromise = new Promise(resolve => { - timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs); - }); - return Promise.race([promise, timeoutPromise]).then(result => { - clearTimeout(timeoutHandle); - return result; +exports.extractTar = extractTar; +// Create a tar +function createTar(archiveFolder, sourceDirectories, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + // Write source directories to manifest.txt to avoid command length limits + (0, fs_1.writeFileSync)(path.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join('\n')); + const commands = yield getCommands(compressionMethod, 'create'); + yield execCommands(commands, archiveFolder); }); -}); -//# sourceMappingURL=downloadUtils.js.map +} +exports.createTar = createTar; +//# sourceMappingURL=tar.js.map /***/ }), -/***/ 3981: +/***/ 1786: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3198,388 +2761,364 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryHttpClientResponse = exports.retryTypedResponse = exports.retry = exports.isRetryableStatusCode = exports.isServerErrorStatusCode = exports.isSuccessStatusCode = void 0; +exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0; const core = __importStar(__nccwpck_require__(2186)); -const http_client_1 = __nccwpck_require__(6255); -const constants_1 = __nccwpck_require__(8840); -function isSuccessStatusCode(statusCode) { - if (!statusCode) { - return false; +const storage_blob_1 = __nccwpck_require__(4100); +const errors_1 = __nccwpck_require__(8223); +/** + * Class for tracking the upload state and displaying stats. + */ +class UploadProgress { + constructor(contentLength) { + this.contentLength = contentLength; + this.sentBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); } - return statusCode >= 200 && statusCode < 300; -} -exports.isSuccessStatusCode = isSuccessStatusCode; -function isServerErrorStatusCode(statusCode) { - if (!statusCode) { - return true; + /** + * Sets the number of bytes sent + * + * @param sentBytes the number of bytes sent + */ + setSentBytes(sentBytes) { + this.sentBytes = sentBytes; } - return statusCode >= 500; -} -exports.isServerErrorStatusCode = isServerErrorStatusCode; -function isRetryableStatusCode(statusCode) { - if (!statusCode) { - return false; + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.sentBytes; } - const retryableStatusCodes = [ - http_client_1.HttpCodes.BadGateway, - http_client_1.HttpCodes.ServiceUnavailable, - http_client_1.HttpCodes.GatewayTimeout - ]; - return retryableStatusCodes.includes(statusCode); -} -exports.isRetryableStatusCode = isRetryableStatusCode; -function sleep(milliseconds) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise(resolve => setTimeout(resolve, milliseconds)); - }); -} -function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = undefined) { - return __awaiter(this, void 0, void 0, function* () { - let errorMessage = ''; - let attempt = 1; - while (attempt <= maxAttempts) { - let response = undefined; - let statusCode = undefined; - let isRetryable = false; - try { - response = yield method(); - } - catch (error) { - if (onError) { - response = onError(error); - } - isRetryable = true; - errorMessage = error.message; - } - if (response) { - statusCode = getStatusCode(response); - if (!isServerErrorStatusCode(statusCode)) { - return response; - } - } - if (statusCode) { - isRetryable = isRetryableStatusCode(statusCode); - errorMessage = `Cache service responded with ${statusCode}`; - } - core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); - if (!isRetryable) { - core.debug(`${name} - Error is not retryable`); - break; + /** + * Returns true if the upload is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current upload stats. Once the upload completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) { + return; + } + const transferredBytes = this.sentBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const uploadSpeed = (transferredBytes / + (1024 * 1024) / + (elapsedTime / 1000)).toFixed(1); + core.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + if (this.isDone()) { + this.displayedComplete = true; + } + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setSentBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1000) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) { + this.timeoutHandle = setTimeout(displayCallback, delayInMs); } - yield sleep(delay); - attempt++; + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the upload + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = undefined; } - throw Error(`${name} failed: ${errorMessage}`); - }); + this.display(); + } } -exports.retry = retry; -function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { +exports.UploadProgress = UploadProgress; +/** + * Uploads a cache archive directly to Azure Blob Storage using the Azure SDK. + * This function will display progress information to the console. Concurrency of the + * upload is determined by the calling functions. + * + * @param signedUploadURL + * @param archivePath + * @param options + * @returns + */ +function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { + var _a; return __awaiter(this, void 0, void 0, function* () { - return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, - // If the error object contains the statusCode property, extract it and return - // an TypedResponse<T> so it can be processed by the retry logic. - (error) => { - if (error instanceof http_client_1.HttpClientError) { - return { - statusCode: error.statusCode, - result: null, - headers: {}, - error - }; - } - else { - return undefined; + const blobClient = new storage_blob_1.BlobClient(signedUploadURL); + const blockBlobClient = blobClient.getBlockBlobClient(); + const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); + // Specify data transfer options + const uploadOptions = { + blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, + concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + maxSingleShotSize: 128 * 1024 * 1024, + onProgress: uploadProgress.onProgress() + }; + try { + uploadProgress.startDisplayTimer(); + core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); + // TODO: better management of non-retryable errors + if (response._response.status >= 400) { + throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } - }); - }); -} -exports.retryTypedResponse = retryTypedResponse; -function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter(this, void 0, void 0, function* () { - return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay); + return response; + } + catch (error) { + core.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); + throw error; + } + finally { + uploadProgress.stopDisplayTimer(); + } }); } -exports.retryHttpClientResponse = retryHttpClientResponse; -//# sourceMappingURL=requestUtils.js.map +exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; +//# sourceMappingURL=uploadUtils.js.map /***/ }), -/***/ 2502: +/***/ 6215: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.internalCacheTwirpClient = void 0; -const core_1 = __nccwpck_require__(2186); -const user_agent_1 = __nccwpck_require__(580); -const errors_1 = __nccwpck_require__(8223); -const config_1 = __nccwpck_require__(5147); -const cacheUtils_1 = __nccwpck_require__(1518); -const auth_1 = __nccwpck_require__(5526); -const http_client_1 = __nccwpck_require__(6255); -const cache_twirp_1 = __nccwpck_require__(267); +exports.getDownloadOptions = exports.getUploadOptions = void 0; +const core = __importStar(__nccwpck_require__(2186)); /** - * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. - * - * It adds retry logic to the request method, which is not present in the generated client. + * Returns a copy of the upload options with defaults filled in. * - * This class is used to interact with cache service v2. + * @param copy the original upload options */ -class CacheServiceClient { - constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { - this.maxAttempts = 5; - this.baseRetryIntervalMilliseconds = 3000; - this.retryMultiplier = 1.5; - const token = (0, cacheUtils_1.getRuntimeToken)(); - this.baseUrl = (0, config_1.getCacheServiceURL)(); - if (maxAttempts) { - this.maxAttempts = maxAttempts; +function getUploadOptions(copy) { + // Defaults if not overriden + const result = { + useAzureSdk: false, + uploadConcurrency: 4, + uploadChunkSize: 32 * 1024 * 1024 + }; + if (copy) { + if (typeof copy.useAzureSdk === 'boolean') { + result.useAzureSdk = copy.useAzureSdk; } - if (baseRetryIntervalMilliseconds) { - this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds; + if (typeof copy.uploadConcurrency === 'number') { + result.uploadConcurrency = copy.uploadConcurrency; } - if (retryMultiplier) { - this.retryMultiplier = retryMultiplier; + if (typeof copy.uploadChunkSize === 'number') { + result.uploadChunkSize = copy.uploadChunkSize; } - this.httpClient = new http_client_1.HttpClient(userAgent, [ - new auth_1.BearerCredentialHandler(token) - ]); - } - // This function satisfies the Rpc interface. It is compatible with the JSON - // JSON generated client. - request(service, method, contentType, data) { - return __awaiter(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); - const headers = { - 'Content-Type': contentType - }; - try { - const { body } = yield this.retryableRequest(() => __awaiter(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); - return body; - } - catch (error) { - throw new Error(`Failed to ${method}: ${error.message}`); - } - }); - } - retryableRequest(operation) { - return __awaiter(this, void 0, void 0, function* () { - let attempt = 0; - let errorMessage = ''; - let rawBody = ''; - while (attempt < this.maxAttempts) { - let isRetryable = false; - try { - const response = yield operation(); - const statusCode = response.message.statusCode; - rawBody = yield response.readBody(); - (0, core_1.debug)(`[Response] - ${response.message.statusCode}`); - (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); - const body = JSON.parse(rawBody); - (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`); - if (this.isSuccessStatusCode(statusCode)) { - return { response, body }; - } - isRetryable = this.isRetryableHttpStatusCode(statusCode); - errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`; - if (body.msg) { - if (errors_1.UsageError.isUsageErrorMessage(body.msg)) { - throw new errors_1.UsageError(); - } - errorMessage = `${errorMessage}: ${body.msg}`; - } - } - catch (error) { - if (error instanceof SyntaxError) { - (0, core_1.debug)(`Raw Body: ${rawBody}`); - } - if (error instanceof errors_1.UsageError) { - throw error; - } - if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) { - throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code); - } - isRetryable = true; - errorMessage = error.message; - } - if (!isRetryable) { - throw new Error(`Received non-retryable error: ${errorMessage}`); - } - if (attempt + 1 === this.maxAttempts) { - throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); - } - const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); - (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); - yield this.sleep(retryTimeMilliseconds); - attempt++; - } - throw new Error(`Request failed`); - }); - } - isSuccessStatusCode(statusCode) { - if (!statusCode) - return false; - return statusCode >= 200 && statusCode < 300; - } - isRetryableHttpStatusCode(statusCode) { - if (!statusCode) - return false; - const retryableStatusCodes = [ - http_client_1.HttpCodes.BadGateway, - http_client_1.HttpCodes.GatewayTimeout, - http_client_1.HttpCodes.InternalServerError, - http_client_1.HttpCodes.ServiceUnavailable, - http_client_1.HttpCodes.TooManyRequests - ]; - return retryableStatusCodes.includes(statusCode); - } - sleep(milliseconds) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise(resolve => setTimeout(resolve, milliseconds)); - }); } - getExponentialRetryTimeMilliseconds(attempt) { - if (attempt < 0) { - throw new Error('attempt should be a positive integer'); + /** + * Add env var overrides + */ + // Cap the uploadConcurrency at 32 + result.uploadConcurrency = !isNaN(Number(process.env['CACHE_UPLOAD_CONCURRENCY'])) + ? Math.min(32, Number(process.env['CACHE_UPLOAD_CONCURRENCY'])) + : result.uploadConcurrency; + // Cap the uploadChunkSize at 128MiB + result.uploadChunkSize = !isNaN(Number(process.env['CACHE_UPLOAD_CHUNK_SIZE'])) + ? Math.min(128 * 1024 * 1024, Number(process.env['CACHE_UPLOAD_CHUNK_SIZE']) * 1024 * 1024) + : result.uploadChunkSize; + core.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core.debug(`Upload chunk size: ${result.uploadChunkSize}`); + return result; +} +exports.getUploadOptions = getUploadOptions; +/** + * Returns a copy of the download options with defaults filled in. + * + * @param copy the original download options + */ +function getDownloadOptions(copy) { + const result = { + useAzureSdk: false, + concurrentBlobDownloads: true, + downloadConcurrency: 8, + timeoutInMs: 30000, + segmentTimeoutInMs: 600000, + lookupOnly: false + }; + if (copy) { + if (typeof copy.useAzureSdk === 'boolean') { + result.useAzureSdk = copy.useAzureSdk; } - if (attempt === 0) { - return this.baseRetryIntervalMilliseconds; + if (typeof copy.concurrentBlobDownloads === 'boolean') { + result.concurrentBlobDownloads = copy.concurrentBlobDownloads; + } + if (typeof copy.downloadConcurrency === 'number') { + result.downloadConcurrency = copy.downloadConcurrency; + } + if (typeof copy.timeoutInMs === 'number') { + result.timeoutInMs = copy.timeoutInMs; + } + if (typeof copy.segmentTimeoutInMs === 'number') { + result.segmentTimeoutInMs = copy.segmentTimeoutInMs; + } + if (typeof copy.lookupOnly === 'boolean') { + result.lookupOnly = copy.lookupOnly; } - const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt); - const maxTime = minTime * this.retryMultiplier; - // returns a random number between minTime and maxTime (exclusive) - return Math.trunc(Math.random() * (maxTime - minTime) + minTime); } + const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']; + if (segmentDownloadTimeoutMins && + !isNaN(Number(segmentDownloadTimeoutMins)) && + isFinite(Number(segmentDownloadTimeoutMins))) { + result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000; + } + core.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core.debug(`Download concurrency: ${result.downloadConcurrency}`); + core.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`); + core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core.debug(`Lookup only: ${result.lookupOnly}`); + return result; } -function internalCacheTwirpClient(options) { - const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); - return new cache_twirp_1.CacheServiceClientJSON(client); -} -exports.internalCacheTwirpClient = internalCacheTwirpClient; -//# sourceMappingURL=cacheTwirpClient.js.map +exports.getDownloadOptions = getDownloadOptions; +//# sourceMappingURL=options.js.map /***/ }), -/***/ 8223: -/***/ ((__unused_webpack_module, exports) => { +/***/ 1597: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0; -class FilesNotFoundError extends Error { - constructor(files = []) { - let message = 'No files were found to upload'; - if (files.length > 0) { - message += `: ${files.join(', ')}`; - } - super(message); - this.files = files; - this.name = 'FilesNotFoundError'; - } -} -exports.FilesNotFoundError = FilesNotFoundError; -class InvalidResponseError extends Error { - constructor(message) { - super(message); - this.name = 'InvalidResponseError'; - } -} -exports.InvalidResponseError = InvalidResponseError; -class CacheNotFoundError extends Error { - constructor(message = 'Cache not found') { - super(message); - this.name = 'CacheNotFoundError'; - } -} -exports.CacheNotFoundError = CacheNotFoundError; -class GHESNotSupportedError extends Error { - constructor(message = '@actions/cache v4.1.4+, actions/cache/save@v4+ and actions/cache/restore@v4+ are not currently supported on GHES.') { - super(message); - this.name = 'GHESNotSupportedError'; - } -} -exports.GHESNotSupportedError = GHESNotSupportedError; -class NetworkError extends Error { - constructor(code) { - const message = `Unable to make request: ${code}\nIf you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`; - super(message); - this.code = code; - this.name = 'NetworkError'; - } -} -exports.NetworkError = NetworkError; -NetworkError.isNetworkErrorCode = (code) => { - if (!code) - return false; - return [ - 'ECONNRESET', - 'ENOTFOUND', - 'ETIMEDOUT', - 'ECONNREFUSED', - 'EHOSTUNREACH' - ].includes(code); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -class UsageError extends Error { - constructor() { - const message = `Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`; - super(message); - this.name = 'UsageError'; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.create = void 0; +const internal_globber_1 = __nccwpck_require__(7341); +/** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ +function create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); } -exports.UsageError = UsageError; -UsageError.isUsageErrorMessage = (msg) => { - if (!msg) - return false; - return msg.includes('insufficient usage'); -}; -//# sourceMappingURL=errors.js.map +exports.create = create; +//# sourceMappingURL=glob.js.map /***/ }), -/***/ 580: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 9350: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getUserAgentString = void 0; -// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports -const packageJson = __nccwpck_require__(9167); +exports.getOptions = void 0; +const core = __importStar(__nccwpck_require__(2186)); /** - * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package + * Returns a copy with defaults filled in. */ -function getUserAgentString() { - return `@actions/cache-${packageJson.version}`; +function getOptions(copy) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + omitBrokenSymbolicLinks: true + }; + if (copy) { + if (typeof copy.followSymbolicLinks === 'boolean') { + result.followSymbolicLinks = copy.followSymbolicLinks; + core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === 'boolean') { + result.implicitDescendants = copy.implicitDescendants; + core.debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy.omitBrokenSymbolicLinks === 'boolean') { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + } + return result; } -exports.getUserAgentString = getUserAgentString; -//# sourceMappingURL=user-agent.js.map +exports.getOptions = getOptions; +//# sourceMappingURL=internal-glob-options-helper.js.map /***/ }), -/***/ 6490: +/***/ 7341: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -3592,7 +3131,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -3605,260 +3144,248 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTar = exports.extractTar = exports.listTar = void 0; -const exec_1 = __nccwpck_require__(1514); -const io = __importStar(__nccwpck_require__(7436)); -const fs_1 = __nccwpck_require__(7147); +exports.DefaultGlobber = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const fs = __importStar(__nccwpck_require__(7147)); +const globOptionsHelper = __importStar(__nccwpck_require__(9350)); const path = __importStar(__nccwpck_require__(1017)); -const utils = __importStar(__nccwpck_require__(1518)); -const constants_1 = __nccwpck_require__(8840); +const patternHelper = __importStar(__nccwpck_require__(5186)); +const internal_match_kind_1 = __nccwpck_require__(836); +const internal_pattern_1 = __nccwpck_require__(5343); +const internal_search_state_1 = __nccwpck_require__(8530); const IS_WINDOWS = process.platform === 'win32'; -// Returns tar path and type: BSD or GNU -function getTarPath() { - return __awaiter(this, void 0, void 0, function* () { - switch (process.platform) { - case 'win32': { - const gnuTar = yield utils.getGnuTarPathOnWindows(); - const systemTar = constants_1.SystemTarPathOnWindows; - if (gnuTar) { - // Use GNUtar as default on windows - return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; - } - else if ((0, fs_1.existsSync)(systemTar)) { - return { path: systemTar, type: constants_1.ArchiveToolType.BSD }; +class DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + // Return a copy + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { + const itemPath = _c.value; + result.push(itemPath); } - break; } - case 'darwin': { - const gnuTar = yield io.which('gtar', false); - if (gnuTar) { - // fix permission denied errors when extracting BSD tar archive with GNU tar - https://github.com/actions/cache/issues/527 - return { path: gnuTar, type: constants_1.ArchiveToolType.GNU }; + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); } - else { - return { - path: yield io.which('tar', true), - type: constants_1.ArchiveToolType.BSD - }; + finally { if (e_1) throw e_1.error; } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator(this, arguments, function* globGenerator_1() { + // Fill in defaults options + const options = globOptionsHelper.getOptions(this.options); + // Implicit descendants? + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && + (pattern.trailingSeparator || + pattern.segments[pattern.segments.length - 1] !== '**')) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat('**'))); } } - default: - break; - } - // Default assumption is GNU tar is present in path - return { - path: yield io.which('tar', true), - type: constants_1.ArchiveToolType.GNU - }; - }); -} -// Return arguments for tar as per tarPath, compressionMethod, method type and os -function getTarArgs(tarPath, compressionMethod, type, archivePath = '') { - return __awaiter(this, void 0, void 0, function* () { - const args = [`"${tarPath.path}"`]; - const cacheFileName = utils.getCacheFileName(compressionMethod); - const tarFile = 'cache.tar'; - const workingDirectory = getWorkingDirectory(); - // Speficic args for BSD tar on windows for workaround - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && - compressionMethod !== constants_1.CompressionMethod.Gzip && - IS_WINDOWS; - // Method specific args - switch (type) { - case 'create': - args.push('--posix', '-cf', BSD_TAR_ZSTD - ? tarFile - : cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '--exclude', BSD_TAR_ZSTD - ? tarFile - : cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '--files-from', constants_1.ManifestFilename); - break; - case 'extract': - args.push('-xf', BSD_TAR_ZSTD - ? tarFile - : archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/')); - break; - case 'list': - args.push('-tf', BSD_TAR_ZSTD - ? tarFile - : archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P'); - break; - } - // Platform specific args - if (tarPath.type === constants_1.ArchiveToolType.GNU) { - switch (process.platform) { - case 'win32': - args.push('--force-local'); - break; - case 'darwin': - args.push('--delay-directory-restore'); - break; + // Push the search paths + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core.debug(`Search path '${searchPath}'`); + // Exists? + try { + // Intentionally using lstat. Detection for broken symlink + // will be performed later (if following symlinks). + yield __await(fs.promises.lstat(searchPath)); + } + catch (err) { + if (err.code === 'ENOENT') { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); } - } - return args; - }); -} -// Returns commands to run tar and compression program -function getCommands(compressionMethod, type, archivePath = '') { - return __awaiter(this, void 0, void 0, function* () { - let args; - const tarPath = yield getTarPath(); - const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath); - const compressionArgs = type !== 'create' - ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath) - : yield getCompressionProgram(tarPath, compressionMethod); - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && - compressionMethod !== constants_1.CompressionMethod.Gzip && - IS_WINDOWS; - if (BSD_TAR_ZSTD && type !== 'create') { - args = [[...compressionArgs].join(' '), [...tarArgs].join(' ')]; - } - else { - args = [[...tarArgs].join(' '), [...compressionArgs].join(' ')]; - } - if (BSD_TAR_ZSTD) { - return args; - } - return [args.join(' ')]; - }); -} -function getWorkingDirectory() { - var _a; - return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); -} -// Common function for extractTar and listTar to get the compression method -function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter(this, void 0, void 0, function* () { - // -d: Decompress. - // unzstd is equivalent to 'zstd -d' - // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. - // Using 30 here because we also support 32-bit self-hosted runners. - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && - compressionMethod !== constants_1.CompressionMethod.Gzip && - IS_WINDOWS; - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return BSD_TAR_ZSTD - ? [ - 'zstd -d --long=30 --force -o', - constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/') - ] - : [ - '--use-compress-program', - IS_WINDOWS ? '"zstd -d --long=30"' : 'unzstd --long=30' - ]; - case constants_1.CompressionMethod.ZstdWithoutLong: - return BSD_TAR_ZSTD - ? [ - 'zstd -d --force -o', - constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/') - ] - : ['--use-compress-program', IS_WINDOWS ? '"zstd -d"' : 'unzstd']; - default: - return ['-z']; - } - }); -} -// Used for creating the archive -// -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores. -// zstdmt is equivalent to 'zstd -T0' -// --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. -// Using 30 here because we also support 32-bit self-hosted runners. -// Long range mode is added to zstd in v1.3.2 release, so we will not use --long in older version of zstd. -function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter(this, void 0, void 0, function* () { - const cacheFileName = utils.getCacheFileName(compressionMethod); - const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && - compressionMethod !== constants_1.CompressionMethod.Gzip && - IS_WINDOWS; - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return BSD_TAR_ZSTD - ? [ - 'zstd -T0 --long=30 --force -o', - cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), - constants_1.TarFilename - ] - : [ - '--use-compress-program', - IS_WINDOWS ? '"zstd -T0 --long=30"' : 'zstdmt --long=30' - ]; - case constants_1.CompressionMethod.ZstdWithoutLong: - return BSD_TAR_ZSTD - ? [ - 'zstd -T0 --force -o', - cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), - constants_1.TarFilename - ] - : ['--use-compress-program', IS_WINDOWS ? '"zstd -T0"' : 'zstdmt']; - default: - return ['-z']; - } - }); -} -// Executes all commands as separate processes -function execCommands(commands, cwd) { - return __awaiter(this, void 0, void 0, function* () { - for (const command of commands) { - try { - yield (0, exec_1.exec)(command, undefined, { - cwd, - env: Object.assign(Object.assign({}, process.env), { MSYS: 'winsymlinks:nativestrict' }) - }); + // Search + const traversalChain = []; // used to detect cycles + while (stack.length) { + // Pop + const item = stack.pop(); + // Match? + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + // Stat + const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + // Broken symlink, or symlink cycle detected, or no longer exists + if (!stats) { + continue; + } + // Directory + if (stats.isDirectory()) { + // Matched + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await(item.path); + } + // Descend? + else if (!partialMatch) { + continue; + } + // Push the child items in reverse + const childLevel = item.level + 1; + const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } + // File + else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await(item.path); + } } - catch (error) { - throw new Error(`${command.split(' ')[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + const result = new DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, '\n'); + patterns = patterns.replace(/\r/g, '\n'); } - } - }); -} -// List the contents of a tar -function listTar(archivePath, compressionMethod) { - return __awaiter(this, void 0, void 0, function* () { - const commands = yield getCommands(compressionMethod, 'list', archivePath); - yield execCommands(commands); - }); -} -exports.listTar = listTar; -// Extract a tar -function extractTar(archivePath, compressionMethod) { - return __awaiter(this, void 0, void 0, function* () { - // Create directory to extract tar into - const workingDirectory = getWorkingDirectory(); - yield io.mkdirP(workingDirectory); - const commands = yield getCommands(compressionMethod, 'extract', archivePath); - yield execCommands(commands); - }); -} -exports.extractTar = extractTar; -// Create a tar -function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter(this, void 0, void 0, function* () { - // Write source directories to manifest.txt to avoid command length limits - (0, fs_1.writeFileSync)(path.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join('\n')); - const commands = yield getCommands(compressionMethod, 'create'); - yield execCommands(commands, archiveFolder); - }); + const lines = patterns.split('\n').map(x => x.trim()); + for (const line of lines) { + // Empty or comment + if (!line || line.startsWith('#')) { + continue; + } + // Pattern + else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter(this, void 0, void 0, function* () { + // Note: + // `stat` returns info about the target of a symlink (or symlink chain) + // `lstat` returns info about a symlink itself + let stats; + if (options.followSymbolicLinks) { + try { + // Use `stat` (following symlinks) + stats = yield fs.promises.stat(item.path); + } + catch (err) { + if (err.code === 'ENOENT') { + if (options.omitBrokenSymbolicLinks) { + core.debug(`Broken symlink '${item.path}'`); + return undefined; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } + else { + // Use `lstat` (not following symlinks) + stats = yield fs.promises.lstat(item.path); + } + // Note, isDirectory() returns false for the lstat of a symlink + if (stats.isDirectory() && options.followSymbolicLinks) { + // Get the realpath + const realPath = yield fs.promises.realpath(item.path); + // Fixup the traversal chain to match the item level + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + // Test for a cycle + if (traversalChain.some((x) => x === realPath)) { + core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return undefined; + } + // Update the traversal chain + traversalChain.push(realPath); + } + return stats; + }); + } } -exports.createTar = createTar; -//# sourceMappingURL=tar.js.map +exports.DefaultGlobber = DefaultGlobber; +//# sourceMappingURL=internal-globber.js.map /***/ }), -/***/ 1786: +/***/ 836: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MatchKind = void 0; +/** + * Indicates whether a pattern matches a path + */ +var MatchKind; +(function (MatchKind) { + /** Not matched */ + MatchKind[MatchKind["None"] = 0] = "None"; + /** Matched if the path is a directory */ + MatchKind[MatchKind["Directory"] = 1] = "Directory"; + /** Matched if the path is a regular file */ + MatchKind[MatchKind["File"] = 2] = "File"; + /** Matched */ + MatchKind[MatchKind["All"] = 3] = "All"; +})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +//# sourceMappingURL=internal-match-kind.js.map + +/***/ }), + +/***/ 22: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -3871,168 +3398,199 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uploadCacheArchiveSDK = exports.UploadProgress = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const storage_blob_1 = __nccwpck_require__(4100); -const errors_1 = __nccwpck_require__(8223); +exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; +const path = __importStar(__nccwpck_require__(1017)); +const assert_1 = __importDefault(__nccwpck_require__(9491)); +const IS_WINDOWS = process.platform === 'win32'; /** - * Class for tracking the upload state and displaying stats. + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` */ -class UploadProgress { - constructor(contentLength) { - this.contentLength = contentLength; - this.sentBytes = 0; - this.displayedComplete = false; - this.startTime = Date.now(); - } - /** - * Sets the number of bytes sent - * - * @param sentBytes the number of bytes sent - */ - setSentBytes(sentBytes) { - this.sentBytes = sentBytes; +function dirname(p) { + // Normalize slashes and trim unnecessary trailing slash + p = safeTrimTrailingSeparator(p); + // Windows UNC root, e.g. \\hello or \\hello\world + if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { + return p; } - /** - * Returns the total number of bytes transferred. - */ - getTransferredBytes() { - return this.sentBytes; + // Get dirname + let result = path.dirname(p); + // Trim trailing slash for Windows UNC root, e.g. \\hello\world\ + if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { + result = safeTrimTrailingSeparator(result); } - /** - * Returns true if the upload is complete. - */ - isDone() { - return this.getTransferredBytes() === this.contentLength; + return result; +} +exports.dirname = dirname; +/** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ +function ensureAbsoluteRoot(root, itemPath) { + assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + // Already rooted + if (hasAbsoluteRoot(itemPath)) { + return itemPath; } - /** - * Prints the current upload stats. Once the upload completes, this will print one - * last line and then stop. - */ - display() { - if (this.displayedComplete) { - return; + // Windows + if (IS_WINDOWS) { + // Check for itemPath like C: or C:foo + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + // Drive letter matches cwd? Expand to cwd + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { + // Drive only, e.g. C: + if (itemPath.length === 2) { + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}`; + } + // Drive + path, e.g. C:foo + else { + if (!cwd.endsWith('\\')) { + cwd += '\\'; + } + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + } + // Different drive + else { + return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } } - const transferredBytes = this.sentBytes; - const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); - const elapsedTime = Date.now() - this.startTime; - const uploadSpeed = (transferredBytes / - (1024 * 1024) / - (elapsedTime / 1000)).toFixed(1); - core.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); - if (this.isDone()) { - this.displayedComplete = true; + // Check for itemPath like \ or \foo + else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - /** - * Returns a function used to handle TransferProgressEvents. - */ - onProgress() { - return (progress) => { - this.setSentBytes(progress.loadedBytes); - }; + assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + // Otherwise ensure root ends with a separator + if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { + // Intentionally empty } - /** - * Starts the timer that displays the stats. - * - * @param delayInMs the delay between each write - */ - startDisplayTimer(delayInMs = 1000) { - const displayCallback = () => { - this.display(); - if (!this.isDone()) { - this.timeoutHandle = setTimeout(displayCallback, delayInMs); - } - }; - this.timeoutHandle = setTimeout(displayCallback, delayInMs); + else { + // Append separator + root += path.sep; } - /** - * Stops the timer that displays the stats. As this typically indicates the upload - * is complete, this will display one last line, unless the last line has already - * been written. - */ - stopDisplayTimer() { - if (this.timeoutHandle) { - clearTimeout(this.timeoutHandle); - this.timeoutHandle = undefined; - } - this.display(); + return root + itemPath; +} +exports.ensureAbsoluteRoot = ensureAbsoluteRoot; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ +function hasAbsoluteRoot(itemPath) { + assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \\hello\share or C:\hello + return itemPath.startsWith('\\\\') || /^[A-Z]:\\/i.test(itemPath); } + // E.g. /hello + return itemPath.startsWith('/'); } -exports.UploadProgress = UploadProgress; +exports.hasAbsoluteRoot = hasAbsoluteRoot; /** - * Uploads a cache archive directly to Azure Blob Storage using the Azure SDK. - * This function will display progress information to the console. Concurrency of the - * upload is determined by the calling functions. - * - * @param signedUploadURL - * @param archivePath - * @param options - * @returns + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). */ -function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const blobClient = new storage_blob_1.BlobClient(signedUploadURL); - const blockBlobClient = blobClient.getBlockBlobClient(); - const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); - // Specify data transfer options - const uploadOptions = { - blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, - concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, - maxSingleShotSize: 128 * 1024 * 1024, - onProgress: uploadProgress.onProgress() - }; - try { - uploadProgress.startDisplayTimer(); - core.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); - const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); - // TODO: better management of non-retryable errors - if (response._response.status >= 400) { - throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); - } - return response; - } - catch (error) { - core.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error.message}`); - throw error; - } - finally { - uploadProgress.stopDisplayTimer(); - } - }); +function hasRoot(itemPath) { + assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \ or \hello or \\hello + // E.g. C: or C:\hello + return itemPath.startsWith('\\') || /^[A-Z]:/i.test(itemPath); + } + // E.g. /hello + return itemPath.startsWith('/'); } -exports.uploadCacheArchiveSDK = uploadCacheArchiveSDK; -//# sourceMappingURL=uploadUtils.js.map +exports.hasRoot = hasRoot; +/** + * Removes redundant slashes and converts `/` to `\` on Windows + */ +function normalizeSeparators(p) { + p = p || ''; + // Windows + if (IS_WINDOWS) { + // Convert slashes on Windows + p = p.replace(/\//g, '\\'); + // Remove redundant slashes + const isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello + return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading \\ for UNC + } + // Remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +exports.normalizeSeparators = normalizeSeparators; +/** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ +function safeTrimTrailingSeparator(p) { + // Short-circuit if empty + if (!p) { + return ''; + } + // Normalize separators + p = normalizeSeparators(p); + // No trailing slash + if (!p.endsWith(path.sep)) { + return p; + } + // Check '/' on Linux/macOS and '\' on Windows + if (p === path.sep) { + return p; + } + // On Windows check if drive root. E.g. C:\ + if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { + return p; + } + // Otherwise trim trailing slash + return p.substr(0, p.length - 1); +} +exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; +//# sourceMappingURL=internal-path-helper.js.map /***/ }), -/***/ 6215: +/***/ 9413: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -4045,140 +3603,107 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDownloadOptions = exports.getUploadOptions = void 0; -const core = __importStar(__nccwpck_require__(2186)); +exports.Path = void 0; +const path = __importStar(__nccwpck_require__(1017)); +const pathHelper = __importStar(__nccwpck_require__(22)); +const assert_1 = __importDefault(__nccwpck_require__(9491)); +const IS_WINDOWS = process.platform === 'win32'; /** - * Returns a copy of the upload options with defaults filled in. - * - * @param copy the original upload options + * Helper class for parsing paths into segments */ -function getUploadOptions(copy) { - // Defaults if not overriden - const result = { - useAzureSdk: false, - uploadConcurrency: 4, - uploadChunkSize: 32 * 1024 * 1024 - }; - if (copy) { - if (typeof copy.useAzureSdk === 'boolean') { - result.useAzureSdk = copy.useAzureSdk; - } - if (typeof copy.uploadConcurrency === 'number') { - result.uploadConcurrency = copy.uploadConcurrency; +class Path { + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath) { + this.segments = []; + // String + if (typeof itemPath === 'string') { + assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // Not rooted + if (!pathHelper.hasRoot(itemPath)) { + this.segments = itemPath.split(path.sep); + } + // Rooted + else { + // Add all segments, while not at the root + let remaining = itemPath; + let dir = pathHelper.dirname(remaining); + while (dir !== remaining) { + // Add the segment + const basename = path.basename(remaining); + this.segments.unshift(basename); + // Truncate the last segment + remaining = dir; + dir = pathHelper.dirname(remaining); + } + // Remainder is the root + this.segments.unshift(remaining); + } } - if (typeof copy.uploadChunkSize === 'number') { - result.uploadChunkSize = copy.uploadChunkSize; + // Array + else { + // Must not be empty + assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + // Each segment + for (let i = 0; i < itemPath.length; i++) { + let segment = itemPath[i]; + // Must not be empty + assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + // Normalize slashes + segment = pathHelper.normalizeSeparators(itemPath[i]); + // Root segment + if (i === 0 && pathHelper.hasRoot(segment)) { + segment = pathHelper.safeTrimTrailingSeparator(segment); + assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + this.segments.push(segment); + } + // All other segments + else { + // Must not contain slash + assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + this.segments.push(segment); + } + } } } /** - * Add env var overrides + * Converts the path to it's string representation */ - // Cap the uploadConcurrency at 32 - result.uploadConcurrency = !isNaN(Number(process.env['CACHE_UPLOAD_CONCURRENCY'])) - ? Math.min(32, Number(process.env['CACHE_UPLOAD_CONCURRENCY'])) - : result.uploadConcurrency; - // Cap the uploadChunkSize at 128MiB - result.uploadChunkSize = !isNaN(Number(process.env['CACHE_UPLOAD_CHUNK_SIZE'])) - ? Math.min(128 * 1024 * 1024, Number(process.env['CACHE_UPLOAD_CHUNK_SIZE']) * 1024 * 1024) - : result.uploadChunkSize; - core.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core.debug(`Upload chunk size: ${result.uploadChunkSize}`); - return result; -} -exports.getUploadOptions = getUploadOptions; -/** - * Returns a copy of the download options with defaults filled in. - * - * @param copy the original download options - */ -function getDownloadOptions(copy) { - const result = { - useAzureSdk: false, - concurrentBlobDownloads: true, - downloadConcurrency: 8, - timeoutInMs: 30000, - segmentTimeoutInMs: 600000, - lookupOnly: false - }; - if (copy) { - if (typeof copy.useAzureSdk === 'boolean') { - result.useAzureSdk = copy.useAzureSdk; - } - if (typeof copy.concurrentBlobDownloads === 'boolean') { - result.concurrentBlobDownloads = copy.concurrentBlobDownloads; - } - if (typeof copy.downloadConcurrency === 'number') { - result.downloadConcurrency = copy.downloadConcurrency; - } - if (typeof copy.timeoutInMs === 'number') { - result.timeoutInMs = copy.timeoutInMs; - } - if (typeof copy.segmentTimeoutInMs === 'number') { - result.segmentTimeoutInMs = copy.segmentTimeoutInMs; - } - if (typeof copy.lookupOnly === 'boolean') { - result.lookupOnly = copy.lookupOnly; + toString() { + // First segment + let result = this.segments[0]; + // All others + let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result)); + for (let i = 1; i < this.segments.length; i++) { + if (skipSlash) { + skipSlash = false; + } + else { + result += path.sep; + } + result += this.segments[i]; } + return result; } - const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']; - if (segmentDownloadTimeoutMins && - !isNaN(Number(segmentDownloadTimeoutMins)) && - isFinite(Number(segmentDownloadTimeoutMins))) { - result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000; - } - core.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core.debug(`Download concurrency: ${result.downloadConcurrency}`); - core.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`); - core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core.debug(`Lookup only: ${result.lookupOnly}`); - return result; -} -exports.getDownloadOptions = getDownloadOptions; -//# sourceMappingURL=options.js.map - -/***/ }), - -/***/ 1597: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.create = void 0; -const internal_globber_1 = __nccwpck_require__(7341); -/** - * Constructs a globber - * - * @param patterns Patterns separated by newlines - * @param options Glob options - */ -function create(patterns, options) { - return __awaiter(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); } -exports.create = create; -//# sourceMappingURL=glob.js.map +exports.Path = Path; +//# sourceMappingURL=internal-path.js.map /***/ }), -/***/ 9350: +/***/ 5186: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -4203,39 +3728,83 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOptions = void 0; -const core = __importStar(__nccwpck_require__(2186)); +exports.partialMatch = exports.match = exports.getSearchPaths = void 0; +const pathHelper = __importStar(__nccwpck_require__(22)); +const internal_match_kind_1 = __nccwpck_require__(836); +const IS_WINDOWS = process.platform === 'win32'; /** - * Returns a copy with defaults filled in. + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. */ -function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - omitBrokenSymbolicLinks: true - }; - if (copy) { - if (typeof copy.followSymbolicLinks === 'boolean') { - result.followSymbolicLinks = copy.followSymbolicLinks; - core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); +function getSearchPaths(patterns) { + // Ignore negate patterns + patterns = patterns.filter(x => !x.negate); + // Create a map of all search paths + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + searchPathMap[key] = 'candidate'; + } + const result = []; + for (const pattern of patterns) { + // Check if already included + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + if (searchPathMap[key] === 'included') { + continue; } - if (typeof copy.implicitDescendants === 'boolean') { - result.implicitDescendants = copy.implicitDescendants; - core.debug(`implicitDescendants '${result.implicitDescendants}'`); + // Check for an ancestor search path + let foundAncestor = false; + let tempKey = key; + let parent = pathHelper.dirname(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = pathHelper.dirname(tempKey); } - if (typeof copy.omitBrokenSymbolicLinks === 'boolean') { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + // Include the search pattern in the result + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = 'included'; } } return result; } -exports.getOptions = getOptions; -//# sourceMappingURL=internal-glob-options-helper.js.map +exports.getSearchPaths = getSearchPaths; +/** + * Matches the patterns against the path + */ +function match(patterns, itemPath) { + let result = internal_match_kind_1.MatchKind.None; + for (const pattern of patterns) { + if (pattern.negate) { + result &= ~pattern.match(itemPath); + } + else { + result |= pattern.match(itemPath); + } + } + return result; +} +exports.match = match; +/** + * Checks whether to descend further into the directory + */ +function partialMatch(patterns, itemPath) { + return patterns.some(x => !x.negate && x.partialMatch(itemPath)); +} +exports.partialMatch = partialMatch; +//# sourceMappingURL=internal-pattern-helper.js.map /***/ }), -/***/ 7341: +/***/ 5343: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -4259,1438 +3828,745 @@ var __importStar = (this && this.__importStar) || function (mod) { __setModuleDefault(result, mod); return result; }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; -var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultGlobber = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const fs = __importStar(__nccwpck_require__(7147)); -const globOptionsHelper = __importStar(__nccwpck_require__(9350)); +exports.Pattern = void 0; +const os = __importStar(__nccwpck_require__(2037)); const path = __importStar(__nccwpck_require__(1017)); -const patternHelper = __importStar(__nccwpck_require__(5186)); +const pathHelper = __importStar(__nccwpck_require__(22)); +const assert_1 = __importDefault(__nccwpck_require__(9491)); +const minimatch_1 = __nccwpck_require__(3973); const internal_match_kind_1 = __nccwpck_require__(836); -const internal_pattern_1 = __nccwpck_require__(5343); -const internal_search_state_1 = __nccwpck_require__(8530); +const internal_path_1 = __nccwpck_require__(9413); const IS_WINDOWS = process.platform === 'win32'; -class DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - // Return a copy - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { - const itemPath = _c.value; - result.push(itemPath); - } +class Pattern { + constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { + /** + * Indicates whether matches should be excluded from the result set + */ + this.negate = false; + // Pattern overload + let pattern; + if (typeof patternOrNegate === 'string') { + pattern = patternOrNegate.trim(); + } + // Segments overload + else { + // Convert to pattern + segments = segments || []; + assert_1.default(segments.length, `Parameter 'segments' must not empty`); + const root = Pattern.getLiteral(segments[0]); + assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); + if (patternOrNegate) { + pattern = `!${pattern}`; } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } - finally { if (e_1) throw e_1.error; } + } + // Negate + while (pattern.startsWith('!')) { + this.negate = !this.negate; + pattern = pattern.substr(1).trim(); + } + // Normalize slashes and ensures absolute root + pattern = Pattern.fixupPattern(pattern, homedir); + // Segments + this.segments = new internal_path_1.Path(pattern).segments; + // Trailing slash indicates the pattern should only match directories, not regular files + this.trailingSeparator = pathHelper + .normalizeSeparators(pattern) + .endsWith(path.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); + // Search path (literal path prior to the first glob segment) + let foundGlob = false; + const searchSegments = this.segments + .map(x => Pattern.getLiteral(x)) + .filter(x => !foundGlob && !(foundGlob = x === '')); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + // Root RegExp (required when determining partial match) + this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : ''); + this.isImplicitPattern = isImplicitPattern; + // Create minimatch + const minimatchOptions = { + dot: true, + nobrace: true, + nocase: IS_WINDOWS, + nocomment: true, + noext: true, + nonegate: true + }; + pattern = IS_WINDOWS ? pattern.replace(/\\/g, '/') : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + } + /** + * Matches the pattern against the specified path + */ + match(itemPath) { + // Last segment is globstar? + if (this.segments[this.segments.length - 1] === '**') { + // Normalize slashes + itemPath = pathHelper.normalizeSeparators(itemPath); + // Append a trailing slash. Otherwise Minimatch will not match the directory immediately + // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns + // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk. + if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) { + // Note, this is safe because the constructor ensures the pattern has an absolute root. + // For example, formats like C: and C:foo on Windows are resolved to an absolute root. + itemPath = `${itemPath}${path.sep}`; } - return result; - }); + } + else { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + } + // Match + if (this.minimatch.match(itemPath)) { + return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; + } + return internal_match_kind_1.MatchKind.None; } - globGenerator() { - return __asyncGenerator(this, arguments, function* globGenerator_1() { - // Fill in defaults options - const options = globOptionsHelper.getOptions(this.options); - // Implicit descendants? - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && - (pattern.trailingSeparator || - pattern.segments[pattern.segments.length - 1] !== '**')) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat('**'))); - } + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath) { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // matchOne does not handle root path correctly + if (pathHelper.dirname(itemPath) === itemPath) { + return this.rootRegExp.test(itemPath); + } + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); + } + /** + * Escapes glob patterns within a path + */ + static globEscape(s) { + return (IS_WINDOWS ? s : s.replace(/\\/g, '\\\\')) // escape '\' on Linux/macOS + .replace(/(\[)(?=[^/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment + .replace(/\?/g, '[?]') // escape '?' + .replace(/\*/g, '[*]'); // escape '*' + } + /** + * Normalizes slashes and ensures absolute root + */ + static fixupPattern(pattern, homedir) { + // Empty + assert_1.default(pattern, 'pattern cannot be empty'); + // Must not contain `.` segment, unless first segment + // Must not contain `..` segment + const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); + assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r + assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + // Normalize slashes + pattern = pathHelper.normalizeSeparators(pattern); + // Replace leading `.` segment + if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) { + pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); + } + // Replace leading `~` segment + else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { + homedir = homedir || os.homedir(); + assert_1.default(homedir, 'Unable to determine HOME directory'); + assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + pattern = Pattern.globEscape(homedir) + pattern.substr(1); + } + // Replace relative drive root, e.g. pattern is C: or C:foo + else if (IS_WINDOWS && + (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', pattern.substr(0, 2)); + if (pattern.length > 2 && !root.endsWith('\\')) { + root += '\\'; } - // Push the search paths - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core.debug(`Search path '${searchPath}'`); - // Exists? - try { - // Intentionally using lstat. Detection for broken symlink - // will be performed later (if following symlinks). - yield __await(fs.promises.lstat(searchPath)); - } - catch (err) { - if (err.code === 'ENOENT') { + pattern = Pattern.globEscape(root) + pattern.substr(2); + } + // Replace relative root, e.g. pattern is \ or \foo + else if (IS_WINDOWS && (pattern === '\\' || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', '\\'); + if (!root.endsWith('\\')) { + root += '\\'; + } + pattern = Pattern.globEscape(root) + pattern.substr(1); + } + // Otherwise ensure absolute root + else { + pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); + } + return pathHelper.normalizeSeparators(pattern); + } + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + static getLiteral(segment) { + let literal = ''; + for (let i = 0; i < segment.length; i++) { + const c = segment[i]; + // Escape + if (c === '\\' && !IS_WINDOWS && i + 1 < segment.length) { + literal += segment[++i]; + continue; + } + // Wildcard + else if (c === '*' || c === '?') { + return ''; + } + // Character set + else if (c === '[' && i + 1 < segment.length) { + let set = ''; + let closed = -1; + for (let i2 = i + 1; i2 < segment.length; i2++) { + const c2 = segment[i2]; + // Escape + if (c2 === '\\' && !IS_WINDOWS && i2 + 1 < segment.length) { + set += segment[++i2]; continue; } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - // Search - const traversalChain = []; // used to detect cycles - while (stack.length) { - // Pop - const item = stack.pop(); - // Match? - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - // Stat - const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - // Broken symlink, or symlink cycle detected, or no longer exists - if (!stats) { - continue; + // Closed + else if (c2 === ']') { + closed = i2; + break; + } + // Otherwise + else { + set += c2; + } } - // Directory - if (stats.isDirectory()) { - // Matched - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await(item.path); + // Closed? + if (closed >= 0) { + // Cannot convert + if (set.length > 1) { + return ''; } - // Descend? - else if (!partialMatch) { + // Convert to literal + if (set) { + literal += set; + i = closed; continue; } - // Push the child items in reverse - const childLevel = item.level + 1; - const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } - // File - else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await(item.path); } + // Otherwise fall thru } - }); + // Append + literal += c; + } + return literal; } /** - * Constructs a DefaultGlobber + * Escapes regexp special characters + * https://javascript.info/regexp-escaping */ - static create(patterns, options) { - return __awaiter(this, void 0, void 0, function* () { - const result = new DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, '\n'); - patterns = patterns.replace(/\r/g, '\n'); - } - const lines = patterns.split('\n').map(x => x.trim()); - for (const line of lines) { - // Empty or comment - if (!line || line.startsWith('#')) { - continue; - } - // Pattern - else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter(this, void 0, void 0, function* () { - // Note: - // `stat` returns info about the target of a symlink (or symlink chain) - // `lstat` returns info about a symlink itself - let stats; - if (options.followSymbolicLinks) { - try { - // Use `stat` (following symlinks) - stats = yield fs.promises.stat(item.path); - } - catch (err) { - if (err.code === 'ENOENT') { - if (options.omitBrokenSymbolicLinks) { - core.debug(`Broken symlink '${item.path}'`); - return undefined; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } - else { - // Use `lstat` (not following symlinks) - stats = yield fs.promises.lstat(item.path); - } - // Note, isDirectory() returns false for the lstat of a symlink - if (stats.isDirectory() && options.followSymbolicLinks) { - // Get the realpath - const realPath = yield fs.promises.realpath(item.path); - // Fixup the traversal chain to match the item level - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - // Test for a cycle - if (traversalChain.some((x) => x === realPath)) { - core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return undefined; - } - // Update the traversal chain - traversalChain.push(realPath); - } - return stats; - }); + static regExpEscape(s) { + return s.replace(/[[\\^$.|?*+()]/g, '\\$&'); } } -exports.DefaultGlobber = DefaultGlobber; -//# sourceMappingURL=internal-globber.js.map +exports.Pattern = Pattern; +//# sourceMappingURL=internal-pattern.js.map /***/ }), -/***/ 836: +/***/ 8530: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MatchKind = void 0; -/** - * Indicates whether a pattern matches a path - */ -var MatchKind; -(function (MatchKind) { - /** Not matched */ - MatchKind[MatchKind["None"] = 0] = "None"; - /** Matched if the path is a directory */ - MatchKind[MatchKind["Directory"] = 1] = "Directory"; - /** Matched if the path is a regular file */ - MatchKind[MatchKind["File"] = 2] = "File"; - /** Matched */ - MatchKind[MatchKind["All"] = 3] = "All"; -})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); -//# sourceMappingURL=internal-match-kind.js.map +exports.SearchState = void 0; +class SearchState { + constructor(path, level) { + this.path = path; + this.level = level; + } +} +exports.SearchState = SearchState; +//# sourceMappingURL=internal-search-state.js.map /***/ }), -/***/ 22: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 3771: +/***/ ((module, exports) => { -"use strict"; +exports = module.exports = SemVer -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; -const path = __importStar(__nccwpck_require__(1017)); -const assert_1 = __importDefault(__nccwpck_require__(9491)); -const IS_WINDOWS = process.platform === 'win32'; -/** - * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. - * - * For example, on Linux/macOS: - * - `/ => /` - * - `/hello => /` - * - * For example, on Windows: - * - `C:\ => C:\` - * - `C:\hello => C:\` - * - `C: => C:` - * - `C:hello => C:` - * - `\ => \` - * - `\hello => \` - * - `\\hello => \\hello` - * - `\\hello\world => \\hello\world` - */ -function dirname(p) { - // Normalize slashes and trim unnecessary trailing slash - p = safeTrimTrailingSeparator(p); - // Windows UNC root, e.g. \\hello or \\hello\world - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - // Get dirname - let result = path.dirname(p); - // Trim trailing slash for Windows UNC root, e.g. \\hello\world\ - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} } -exports.dirname = dirname; -/** - * Roots the path if not already rooted. On Windows, relative roots like `\` - * or `C:` are expanded based on the current working directory. - */ -function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - // Already rooted - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - // Windows - if (IS_WINDOWS) { - // Check for itemPath like C: or C:foo - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - // Drive letter matches cwd? Expand to cwd - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - // Drive only, e.g. C: - if (itemPath.length === 2) { - // Preserve specified drive letter case (upper or lower) - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } - // Drive + path, e.g. C:foo - else { - if (!cwd.endsWith('\\')) { - cwd += '\\'; - } - // Preserve specified drive letter case (upper or lower) - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } - // Different drive - else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } - // Check for itemPath like \ or \foo - else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - // Otherwise ensure root ends with a separator - if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { - // Intentionally empty - } - else { - // Append separator - root += path.sep; - } - return root + itemPath; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +// The actual regexps go on exports.re +var re = exports.re = [] +var safeRe = exports.safeRe = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ } -exports.ensureAbsoluteRoot = ensureAbsoluteRoot; -/** - * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: - * `\\hello\share` and `C:\hello` (and using alternate separator). - */ -function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - // Normalize separators - itemPath = normalizeSeparators(itemPath); - // Windows - if (IS_WINDOWS) { - // E.g. \\hello\share or C:\hello - return itemPath.startsWith('\\\\') || /^[A-Z]:\\/i.test(itemPath); - } - // E.g. /hello - return itemPath.startsWith('/'); -} -exports.hasAbsoluteRoot = hasAbsoluteRoot; -/** - * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: - * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). - */ -function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); - // Normalize separators - itemPath = normalizeSeparators(itemPath); - // Windows - if (IS_WINDOWS) { - // E.g. \ or \hello or \\hello - // E.g. C: or C:\hello - return itemPath.startsWith('\\') || /^[A-Z]:/i.test(itemPath); - } - // E.g. /hello - return itemPath.startsWith('/'); + +var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +var safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +function makeSafeRe (value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0] + var max = safeRegexReplacements[i][1] + value = value + .split(token + '*').join(token + '{0,' + max + '}') + .split(token + '+').join(token + '{1,' + max + '}') + } + return value } -exports.hasRoot = hasRoot; -/** - * Removes redundant slashes and converts `/` to `\` on Windows - */ -function normalizeSeparators(p) { - p = p || ''; - // Windows - if (IS_WINDOWS) { - // Convert slashes on Windows - p = p.replace(/\//g, '\\'); - // Remove redundant slashes - const isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello - return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading \\ for UNC - } - // Remove redundant slashes - return p.replace(/\/\/+/g, '/'); + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '\\d+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') +safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + + // Replace all greedy whitespace to prevent regex dos issues. These regex are + // used internally via the safeRe object since all inputs in this library get + // normalized first to trim and collapse all extra whitespace. The original + // regexes are exported for userland consumption and lower level usage. A + // future breaking change could export the safer regex only with a note that + // all input should have extra whitespace removed. + safeRe[i] = new RegExp(makeSafeRe(src[i])) + } } -exports.normalizeSeparators = normalizeSeparators; -/** - * Normalizes the path separators and trims the trailing separator (when safe). - * For example, `/foo/ => /foo` but `/ => /` - */ -function safeTrimTrailingSeparator(p) { - // Short-circuit if empty - if (!p) { - return ''; - } - // Normalize separators - p = normalizeSeparators(p); - // No trailing slash - if (!p.endsWith(path.sep)) { - return p; - } - // Check '/' on Linux/macOS and '\' on Windows - if (p === path.sep) { - return p; - } - // On Windows check if drive root. E.g. C:\ - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false } - // Otherwise trim trailing slash - return p.substr(0, p.length - 1); + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } } -exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; -//# sourceMappingURL=internal-path-helper.js.map -/***/ }), +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} -/***/ 9413: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} -"use strict"; +exports.SemVer = SemVer -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Path = void 0; -const path = __importStar(__nccwpck_require__(1017)); -const pathHelper = __importStar(__nccwpck_require__(22)); -const assert_1 = __importDefault(__nccwpck_require__(9491)); -const IS_WINDOWS = process.platform === 'win32'; -/** - * Helper class for parsing paths into segments - */ -class Path { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - // String - if (typeof itemPath === 'string') { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); - // Normalize slashes and trim unnecessary trailing slash - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - // Not rooted - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path.sep); - } - // Rooted - else { - // Add all segments, while not at the root - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - // Add the segment - const basename = path.basename(remaining); - this.segments.unshift(basename); - // Truncate the last segment - remaining = dir; - dir = pathHelper.dirname(remaining); - } - // Remainder is the root - this.segments.unshift(remaining); - } - } - // Array - else { - // Must not be empty - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - // Each segment - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - // Must not be empty - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); - // Normalize slashes - segment = pathHelper.normalizeSeparators(itemPath[i]); - // Root segment - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } - // All other segments - else { - // Must not contain slash - assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false } - /** - * Converts the path to it's string representation - */ - toString() { - // First segment - let result = this.segments[0]; - // All others - let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result)); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } - else { - result += path.sep; - } - result += this.segments[i]; - } - return result; + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version } -} -exports.Path = Path; -//# sourceMappingURL=internal-path.js.map + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } -/***/ }), + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } -/***/ 5186: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } -"use strict"; + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.partialMatch = exports.match = exports.getSearchPaths = void 0; -const pathHelper = __importStar(__nccwpck_require__(22)); -const internal_match_kind_1 = __nccwpck_require__(836); -const IS_WINDOWS = process.platform === 'win32'; -/** - * Given an array of patterns, returns an array of paths to search. - * Duplicates and paths under other included paths are filtered out. - */ -function getSearchPaths(patterns) { - // Ignore negate patterns - patterns = patterns.filter(x => !x.negate); - // Create a map of all search paths - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS - ? pattern.searchPath.toUpperCase() - : pattern.searchPath; - searchPathMap[key] = 'candidate'; - } - const result = []; - for (const pattern of patterns) { - // Check if already included - const key = IS_WINDOWS - ? pattern.searchPath.toUpperCase() - : pattern.searchPath; - if (searchPathMap[key] === 'included') { - continue; - } - // Check for an ancestor search path - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - // Include the search pattern in the result - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = 'included'; - } - } - return result; -} -exports.getSearchPaths = getSearchPaths; -/** - * Matches the patterns against the path - */ -function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } - else { - result |= pattern.match(itemPath); - } - } - return result; -} -exports.match = match; -/** - * Checks whether to descend further into the directory - */ -function partialMatch(patterns, itemPath) { - return patterns.some(x => !x.negate && x.partialMatch(itemPath)); -} -exports.partialMatch = partialMatch; -//# sourceMappingURL=internal-pattern-helper.js.map + var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]) -/***/ }), + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } -/***/ 5343: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + this.raw = version -"use strict"; + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Pattern = void 0; -const os = __importStar(__nccwpck_require__(2037)); -const path = __importStar(__nccwpck_require__(1017)); -const pathHelper = __importStar(__nccwpck_require__(22)); -const assert_1 = __importDefault(__nccwpck_require__(9491)); -const minimatch_1 = __nccwpck_require__(3973); -const internal_match_kind_1 = __nccwpck_require__(836); -const internal_path_1 = __nccwpck_require__(9413); -const IS_WINDOWS = process.platform === 'win32'; -class Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - /** - * Indicates whether matches should be excluded from the result set - */ - this.negate = false; - // Pattern overload - let pattern; - if (typeof patternOrNegate === 'string') { - pattern = patternOrNegate.trim(); - } - // Segments overload - else { - // Convert to pattern - segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); - const root = Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - // Negate - while (pattern.startsWith('!')) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - // Normalize slashes and ensures absolute root - pattern = Pattern.fixupPattern(pattern, homedir); - // Segments - this.segments = new internal_path_1.Path(pattern).segments; - // Trailing slash indicates the pattern should only match directories, not regular files - this.trailingSeparator = pathHelper - .normalizeSeparators(pattern) - .endsWith(path.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - // Search path (literal path prior to the first glob segment) - let foundGlob = false; - const searchSegments = this.segments - .map(x => Pattern.getLiteral(x)) - .filter(x => !foundGlob && !(foundGlob = x === '')); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - // Root RegExp (required when determining partial match) - this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : ''); - this.isImplicitPattern = isImplicitPattern; - // Create minimatch - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, '/') : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - // Last segment is globstar? - if (this.segments[this.segments.length - 1] === '**') { - // Normalize slashes - itemPath = pathHelper.normalizeSeparators(itemPath); - // Append a trailing slash. Otherwise Minimatch will not match the directory immediately - // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns - // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk. - if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) { - // Note, this is safe because the constructor ensures the pattern has an absolute root. - // For example, formats like C: and C:foo on Windows are resolved to an absolute root. - itemPath = `${itemPath}${path.sep}`; - } - } - else { - // Normalize slashes and trim unnecessary trailing slash - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - // Match - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - // Normalize slashes and trim unnecessary trailing slash - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - // matchOne does not handle root path correctly - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, '\\\\')) // escape '\' on Linux/macOS - .replace(/(\[)(?=[^/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment - .replace(/\?/g, '[?]') // escape '?' - .replace(/\*/g, '[*]'); // escape '*' - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - // Empty - assert_1.default(pattern, 'pattern cannot be empty'); - // Must not contain `.` segment, unless first segment - // Must not contain `..` segment - const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - // Normalize slashes - pattern = pathHelper.normalizeSeparators(pattern); - // Replace leading `.` segment - if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) { - pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); - } - // Replace leading `~` segment - else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { - homedir = homedir || os.homedir(); - assert_1.default(homedir, 'Unable to determine HOME directory'); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = Pattern.globEscape(homedir) + pattern.substr(1); - } - // Replace relative drive root, e.g. pattern is C: or C:foo - else if (IS_WINDOWS && - (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith('\\')) { - root += '\\'; - } - pattern = Pattern.globEscape(root) + pattern.substr(2); - } - // Replace relative root, e.g. pattern is \ or \foo - else if (IS_WINDOWS && (pattern === '\\' || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', '\\'); - if (!root.endsWith('\\')) { - root += '\\'; - } - pattern = Pattern.globEscape(root) + pattern.substr(1); - } - // Otherwise ensure absolute root - else { - pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ''; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - // Escape - if (c === '\\' && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } - // Wildcard - else if (c === '*' || c === '?') { - return ''; - } - // Character set - else if (c === '[' && i + 1 < segment.length) { - let set = ''; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - // Escape - if (c2 === '\\' && !IS_WINDOWS && i2 + 1 < segment.length) { - set += segment[++i2]; - continue; - } - // Closed - else if (c2 === ']') { - closed = i2; - break; - } - // Otherwise - else { - set += c2; - } - } - // Closed? - if (closed >= 0) { - // Cannot convert - if (set.length > 1) { - return ''; - } - // Convert to literal - if (set) { - literal += set; - i = closed; - continue; - } - } - // Otherwise fall thru - } - // Append - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, '\\$&'); - } -} -exports.Pattern = Pattern; -//# sourceMappingURL=internal-pattern.js.map + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } -/***/ }), + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } -/***/ 8530: -/***/ ((__unused_webpack_module, exports) => { + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } -"use strict"; + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SearchState = void 0; -class SearchState { - constructor(path, level) { - this.path = path; - this.level = level; - } + this.build = m[5] ? m[5].split('.') : [] + this.format() } -exports.SearchState = SearchState; -//# sourceMappingURL=internal-search-state.js.map - -/***/ }), - -/***/ 3771: -/***/ ((module, exports) => { - -exports = module.exports = SemVer -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') } -} else { - debug = function () {} + return this.version } -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 +SemVer.prototype.toString = function () { + return this.version +} -// The actual regexps go on exports.re -var re = exports.re = [] -var safeRe = exports.safeRe = [] -var src = exports.src = [] -var t = exports.tokens = {} -var R = 0 +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } -function tok (n) { - t[n] = R++ + return this.compareMain(other) || this.comparePre(other) } -var LETTERDASHNUMBER = '[a-zA-Z0-9-]' +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -var safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} -function makeSafeRe (value) { - for (var i = 0; i < safeRegexReplacements.length; i++) { - var token = safeRegexReplacements[i][0] - var max = safeRegexReplacements[i][1] - value = value - .split(token + '*').join(token + '{0,' + max + '}') - .split(token + '+').join(token + '{1,' + max + '}') +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) } - return value -} -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} -tok('NUMERICIDENTIFIER') -src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' -tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '\\d+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -tok('MAINVERSION') -src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')' - -tok('MAINVERSIONLOOSE') -src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -tok('PRERELEASEIDENTIFIER') -src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -tok('PRERELEASEIDENTIFIERLOOSE') -src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -tok('PRERELEASE') -src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' - -tok('PRERELEASELOOSE') -src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -tok('BUILD') -src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + - '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -tok('FULL') -tok('FULLPLAIN') -src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + - src[t.PRERELEASE] + '?' + - src[t.BUILD] + '?' - -src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -tok('LOOSEPLAIN') -src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + - src[t.PRERELEASELOOSE] + '?' + - src[t.BUILD] + '?' - -tok('LOOSE') -src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' - -tok('GTLT') -src[t.GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -tok('XRANGEIDENTIFIERLOOSE') -src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -tok('XRANGEIDENTIFIER') -src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' - -tok('XRANGEPLAIN') -src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:' + src[t.PRERELEASE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGEPLAINLOOSE') -src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[t.PRERELEASELOOSE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGE') -src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' -tok('XRANGELOOSE') -src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -tok('COERCE') -src[t.COERCE] = '(^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' -tok('COERCERTL') -re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') -safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g') - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -tok('LONETILDE') -src[t.LONETILDE] = '(?:~>?)' - -tok('TILDETRIM') -src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' -re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') -safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g') -var tildeTrimReplace = '$1~' - -tok('TILDE') -src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' -tok('TILDELOOSE') -src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -tok('LONECARET') -src[t.LONECARET] = '(?:\\^)' - -tok('CARETTRIM') -src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' -re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') -safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g') -var caretTrimReplace = '$1^' - -tok('CARET') -src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' -tok('CARETLOOSE') -src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -tok('COMPARATORLOOSE') -src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' -tok('COMPARATOR') -src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -tok('COMPARATORTRIM') -src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + - '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') -safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -tok('HYPHENRANGE') -src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAIN] + ')' + - '\\s*$' - -tok('HYPHENRANGELOOSE') -src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -tok('STAR') -src[t.STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - - // Replace all greedy whitespace to prevent regex dos issues. These regex are - // used internally via the safeRe object since all inputs in this library get - // normalized first to trim and collapse all extra whitespace. The original - // regexes are exported for userland consumption and lower level usage. A - // future breaking change could export the safer regex only with a note that - // all input should have extra whitespace removed. - safeRe[i] = new RegExp(makeSafeRe(src[i])) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } var i = 0 do { @@ -59755,599 +58631,6 @@ class Deprecation extends Error { exports.Deprecation = Deprecation; -/***/ }), - -/***/ 4365: -/***/ ((module) => { - -"use strict"; - - -function _process (v, mod) { - var i - var r - - if (typeof mod === 'function') { - r = mod(v) - if (r !== undefined) { - v = r - } - } else if (Array.isArray(mod)) { - for (i = 0; i < mod.length; i++) { - r = mod[i](v) - if (r !== undefined) { - v = r - } - } - } - - return v -} - -function parseKey (key, val) { - // detect negative index notation - if (key[0] === '-' && Array.isArray(val) && /^-\d+$/.test(key)) { - return val.length + parseInt(key, 10) - } - return key -} - -function isIndex (k) { - return /^\d+$/.test(k) -} - -function isObject (val) { - return Object.prototype.toString.call(val) === '[object Object]' -} - -function isArrayOrObject (val) { - return Object(val) === val -} - -function isEmptyObject (val) { - return Object.keys(val).length === 0 -} - -var blacklist = ['__proto__', 'prototype', 'constructor'] -var blacklistFilter = function (part) { return blacklist.indexOf(part) === -1 } - -function parsePath (path, sep) { - if (path.indexOf('[') >= 0) { - path = path.replace(/\[/g, sep).replace(/]/g, '') - } - - var parts = path.split(sep) - - var check = parts.filter(blacklistFilter) - - if (check.length !== parts.length) { - throw Error('Refusing to update blacklisted property ' + path) - } - - return parts -} - -var hasOwnProperty = Object.prototype.hasOwnProperty - -function DotObject (separator, override, useArray, useBrackets) { - if (!(this instanceof DotObject)) { - return new DotObject(separator, override, useArray, useBrackets) - } - - if (typeof override === 'undefined') override = false - if (typeof useArray === 'undefined') useArray = true - if (typeof useBrackets === 'undefined') useBrackets = true - this.separator = separator || '.' - this.override = override - this.useArray = useArray - this.useBrackets = useBrackets - this.keepArray = false - - // contains touched arrays - this.cleanup = [] -} - -var dotDefault = new DotObject('.', false, true, true) -function wrap (method) { - return function () { - return dotDefault[method].apply(dotDefault, arguments) - } -} - -DotObject.prototype._fill = function (a, obj, v, mod) { - var k = a.shift() - - if (a.length > 0) { - obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {}) - - if (!isArrayOrObject(obj[k])) { - if (this.override) { - obj[k] = {} - } else { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error( - 'Trying to redefine `' + k + '` which is a ' + typeof obj[k] - ) - } - - return - } - } - - this._fill(a, obj[k], v, mod) - } else { - if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) { - if (!(isArrayOrObject(v) && isEmptyObject(v))) { - throw new Error("Trying to redefine non-empty obj['" + k + "']") - } - - return - } - - obj[k] = _process(v, mod) - } -} - -/** - * - * Converts an object with dotted-key/value pairs to it's expanded version - * - * Optionally transformed by a set of modifiers. - * - * Usage: - * - * var row = { - * 'nr': 200, - * 'doc.name': ' My Document ' - * } - * - * var mods = { - * 'doc.name': [_s.trim, _s.underscored] - * } - * - * dot.object(row, mods) - * - * @param {Object} obj - * @param {Object} mods - */ -DotObject.prototype.object = function (obj, mods) { - var self = this - - Object.keys(obj).forEach(function (k) { - var mod = mods === undefined ? null : mods[k] - // normalize array notation. - var ok = parsePath(k, self.separator).join(self.separator) - - if (ok.indexOf(self.separator) !== -1) { - self._fill(ok.split(self.separator), obj, obj[k], mod) - delete obj[k] - } else { - obj[k] = _process(obj[k], mod) - } - }) - - return obj -} - -/** - * @param {String} path dotted path - * @param {String} v value to be set - * @param {Object} obj object to be modified - * @param {Function|Array} mod optional modifier - */ -DotObject.prototype.str = function (path, v, obj, mod) { - var ok = parsePath(path, this.separator).join(this.separator) - - if (path.indexOf(this.separator) !== -1) { - this._fill(ok.split(this.separator), obj, v, mod) - } else { - obj[path] = _process(v, mod) - } - - return obj -} - -/** - * - * Pick a value from an object using dot notation. - * - * Optionally remove the value - * - * @param {String} path - * @param {Object} obj - * @param {Boolean} remove - */ -DotObject.prototype.pick = function (path, obj, remove, reindexArray) { - var i - var keys - var val - var key - var cp - - keys = parsePath(path, this.separator) - for (i = 0; i < keys.length; i++) { - key = parseKey(keys[i], obj) - if (obj && typeof obj === 'object' && key in obj) { - if (i === keys.length - 1) { - if (remove) { - val = obj[key] - if (reindexArray && Array.isArray(obj)) { - obj.splice(key, 1) - } else { - delete obj[key] - } - if (Array.isArray(obj)) { - cp = keys.slice(0, -1).join('.') - if (this.cleanup.indexOf(cp) === -1) { - this.cleanup.push(cp) - } - } - return val - } else { - return obj[key] - } - } else { - obj = obj[key] - } - } else { - return undefined - } - } - if (remove && Array.isArray(obj)) { - obj = obj.filter(function (n) { - return n !== undefined - }) - } - return obj -} -/** - * - * Delete value from an object using dot notation. - * - * @param {String} path - * @param {Object} obj - * @return {any} The removed value - */ -DotObject.prototype.delete = function (path, obj) { - return this.remove(path, obj, true) -} - -/** - * - * Remove value from an object using dot notation. - * - * Will remove multiple items if path is an array. - * In this case array indexes will be retained until all - * removals have been processed. - * - * Use dot.delete() to automatically re-index arrays. - * - * @param {String|Array<String>} path - * @param {Object} obj - * @param {Boolean} reindexArray - * @return {any} The removed value - */ -DotObject.prototype.remove = function (path, obj, reindexArray) { - var i - - this.cleanup = [] - if (Array.isArray(path)) { - for (i = 0; i < path.length; i++) { - this.pick(path[i], obj, true, reindexArray) - } - if (!reindexArray) { - this._cleanup(obj) - } - return obj - } else { - return this.pick(path, obj, true, reindexArray) - } -} - -DotObject.prototype._cleanup = function (obj) { - var ret - var i - var keys - var root - if (this.cleanup.length) { - for (i = 0; i < this.cleanup.length; i++) { - keys = this.cleanup[i].split('.') - root = keys.splice(0, -1).join('.') - ret = root ? this.pick(root, obj) : obj - ret = ret[keys[0]].filter(function (v) { - return v !== undefined - }) - this.set(this.cleanup[i], ret, obj) - } - this.cleanup = [] - } -} - -/** - * Alias method for `dot.remove` - * - * Note: this is not an alias for dot.delete() - * - * @param {String|Array<String>} path - * @param {Object} obj - * @param {Boolean} reindexArray - * @return {any} The removed value - */ -DotObject.prototype.del = DotObject.prototype.remove - -/** - * - * Move a property from one place to the other. - * - * If the source path does not exist (undefined) - * the target property will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.move = function (source, target, obj, mods, merge) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set(target, _process(this.pick(source, obj, true), mods), obj, merge) - } else { - merge = mods - this.set(target, this.pick(source, obj, true), obj, merge) - } - - return obj -} - -/** - * - * Transfer a property from one object to another object. - * - * If the source path does not exist (undefined) - * the property on the other object will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj1 - * @param {Object} obj2 - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.transfer = function ( - source, - target, - obj1, - obj2, - mods, - merge -) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set( - target, - _process(this.pick(source, obj1, true), mods), - obj2, - merge - ) - } else { - merge = mods - this.set(target, this.pick(source, obj1, true), obj2, merge) - } - - return obj2 -} - -/** - * - * Copy a property from one object to another object. - * - * If the source path does not exist (undefined) - * the property on the other object will not be set. - * - * @param {String} source - * @param {String} target - * @param {Object} obj1 - * @param {Object} obj2 - * @param {Function|Array} mods - * @param {Boolean} merge - */ -DotObject.prototype.copy = function (source, target, obj1, obj2, mods, merge) { - if (typeof mods === 'function' || Array.isArray(mods)) { - this.set( - target, - _process( - // clone what is picked - JSON.parse(JSON.stringify(this.pick(source, obj1, false))), - mods - ), - obj2, - merge - ) - } else { - merge = mods - this.set(target, this.pick(source, obj1, false), obj2, merge) - } - - return obj2 -} - -/** - * - * Set a property on an object using dot notation. - * - * @param {String} path - * @param {any} val - * @param {Object} obj - * @param {Boolean} merge - */ -DotObject.prototype.set = function (path, val, obj, merge) { - var i - var k - var keys - var key - - // Do not operate if the value is undefined. - if (typeof val === 'undefined') { - return obj - } - keys = parsePath(path, this.separator) - - for (i = 0; i < keys.length; i++) { - key = keys[i] - if (i === keys.length - 1) { - if (merge && isObject(val) && isObject(obj[key])) { - for (k in val) { - if (hasOwnProperty.call(val, k)) { - obj[key][k] = val[k] - } - } - } else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) { - for (var j = 0; j < val.length; j++) { - obj[keys[i]].push(val[j]) - } - } else { - obj[key] = val - } - } else if ( - // force the value to be an object - !hasOwnProperty.call(obj, key) || - (!isObject(obj[key]) && !Array.isArray(obj[key])) - ) { - // initialize as array if next key is numeric - if (/^\d+$/.test(keys[i + 1])) { - obj[key] = [] - } else { - obj[key] = {} - } - } - obj = obj[key] - } - return obj -} - -/** - * - * Transform an object - * - * Usage: - * - * var obj = { - * "id": 1, - * "some": { - * "thing": "else" - * } - * } - * - * var transform = { - * "id": "nr", - * "some.thing": "name" - * } - * - * var tgt = dot.transform(transform, obj) - * - * @param {Object} recipe Transform recipe - * @param {Object} obj Object to be transformed - * @param {Array} mods modifiers for the target - */ -DotObject.prototype.transform = function (recipe, obj, tgt) { - obj = obj || {} - tgt = tgt || {} - Object.keys(recipe).forEach( - function (key) { - this.set(recipe[key], this.pick(key, obj), tgt) - }.bind(this) - ) - return tgt -} - -/** - * - * Convert object to dotted-key/value pair - * - * Usage: - * - * var tgt = dot.dot(obj) - * - * or - * - * var tgt = {} - * dot.dot(obj, tgt) - * - * @param {Object} obj source object - * @param {Object} tgt target object - * @param {Array} path path array (internal) - */ -DotObject.prototype.dot = function (obj, tgt, path) { - tgt = tgt || {} - path = path || [] - var isArray = Array.isArray(obj) - - Object.keys(obj).forEach( - function (key) { - var index = isArray && this.useBrackets ? '[' + key + ']' : key - if ( - isArrayOrObject(obj[key]) && - ((isObject(obj[key]) && !isEmptyObject(obj[key])) || - (Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0)) - ) { - if (isArray && this.useBrackets) { - var previousKey = path[path.length - 1] || '' - return this.dot( - obj[key], - tgt, - path.slice(0, -1).concat(previousKey + index) - ) - } else { - return this.dot(obj[key], tgt, path.concat(index)) - } - } else { - if (isArray && this.useBrackets) { - tgt[path.join(this.separator).concat('[' + key + ']')] = obj[key] - } else { - tgt[path.concat(index).join(this.separator)] = obj[key] - } - } - }.bind(this) - ) - return tgt -} - -DotObject.pick = wrap('pick') -DotObject.move = wrap('move') -DotObject.transfer = wrap('transfer') -DotObject.transform = wrap('transform') -DotObject.copy = wrap('copy') -DotObject.object = wrap('object') -DotObject.str = wrap('str') -DotObject.set = wrap('set') -DotObject.delete = wrap('delete') -DotObject.del = DotObject.remove = wrap('remove') -DotObject.dot = wrap('dot'); -['override', 'overwrite'].forEach(function (prop) { - Object.defineProperty(DotObject, prop, { - get: function () { - return dotDefault.override - }, - set: function (val) { - dotDefault.override = !!val - } - }) -}); -['useArray', 'keepArray', 'useBrackets'].forEach(function (prop) { - Object.defineProperty(DotObject, prop, { - get: function () { - return dotDefault[prop] - }, - set: function (val) { - dotDefault[prop] = val - } - }) -}) - -DotObject._process = _process - -module.exports = DotObject - - /***/ }), /***/ 3287: @@ -68149,1447 +66432,301 @@ var __disposeResources; exporter("__values", __values); exporter("__read", __read); exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); -}); - - -/***/ }), - -/***/ 4294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(4219); - - -/***/ }), - -/***/ 4219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(1808); -var tls = __nccwpck_require__(4404); -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var events = __nccwpck_require__(2361); -var assert = __nccwpck_require__(9491); -var util = __nccwpck_require__(3837); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 1524: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 6647: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isValidErrorCode = exports.httpStatusFromErrorCode = exports.TwirpErrorCode = exports.BadRouteError = exports.InternalServerErrorWith = exports.InternalServerError = exports.RequiredArgumentError = exports.InvalidArgumentError = exports.NotFoundError = exports.TwirpError = void 0; -/** - * Represents a twirp error - */ -class TwirpError extends Error { - constructor(code, msg) { - super(msg); - this.code = TwirpErrorCode.Internal; - this.meta = {}; - this.code = code; - this.msg = msg; - Object.setPrototypeOf(this, TwirpError.prototype); - } - /** - * Adds a metadata kv to the error - * @param key - * @param value - */ - withMeta(key, value) { - this.meta[key] = value; - return this; - } - /** - * Returns a single metadata value - * return "" if not found - * @param key - */ - getMeta(key) { - return this.meta[key] || ""; - } - /** - * Add the original error cause - * @param err - * @param addMeta - */ - withCause(err, addMeta = false) { - this._originalCause = err; - if (addMeta) { - this.withMeta("cause", err.message); - } - return this; - } - cause() { - return this._originalCause; - } - /** - * Returns the error representation to JSON - */ - toJSON() { - try { - return JSON.stringify({ - code: this.code, - msg: this.msg, - meta: this.meta, - }); - } - catch (e) { - return `{"code": "internal", "msg": "There was an error but it could not be serialized into JSON"}`; - } - } - /** - * Create a twirp error from an object - * @param obj - */ - static fromObject(obj) { - const code = obj["code"] || TwirpErrorCode.Unknown; - const msg = obj["msg"] || "unknown"; - const error = new TwirpError(code, msg); - if (obj["meta"]) { - Object.keys(obj["meta"]).forEach((key) => { - error.withMeta(key, obj["meta"][key]); - }); - } - return error; - } -} -exports.TwirpError = TwirpError; -/** - * NotFoundError constructor for the common NotFound error. - */ -class NotFoundError extends TwirpError { - constructor(msg) { - super(TwirpErrorCode.NotFound, msg); - } -} -exports.NotFoundError = NotFoundError; -/** - * InvalidArgumentError constructor for the common InvalidArgument error. Can be - * used when an argument has invalid format, is a number out of range, is a bad - * option, etc). - */ -class InvalidArgumentError extends TwirpError { - constructor(argument, validationMsg) { - super(TwirpErrorCode.InvalidArgument, argument + " " + validationMsg); - this.withMeta("argument", argument); - } -} -exports.InvalidArgumentError = InvalidArgumentError; -/** - * RequiredArgumentError is a more specific constructor for InvalidArgument - * error. Should be used when the argument is required (expected to have a - * non-zero value). - */ -class RequiredArgumentError extends InvalidArgumentError { - constructor(argument) { - super(argument, "is required"); - } -} -exports.RequiredArgumentError = RequiredArgumentError; -/** - * InternalError constructor for the common Internal error. Should be used to - * specify that something bad or unexpected happened. - */ -class InternalServerError extends TwirpError { - constructor(msg) { - super(TwirpErrorCode.Internal, msg); - } -} -exports.InternalServerError = InternalServerError; -/** - * InternalErrorWith makes an internal error, wrapping the original error and using it - * for the error message, and with metadata "cause" with the original error type. - * This function is used by Twirp services to wrap non-Twirp errors as internal errors. - * The wrapped error can be extracted later with err.cause() - */ -class InternalServerErrorWith extends InternalServerError { - constructor(err) { - super(err.message); - this.withMeta("cause", err.name); - this.withCause(err); - } -} -exports.InternalServerErrorWith = InternalServerErrorWith; -/** - * A standard BadRoute Error - */ -class BadRouteError extends TwirpError { - constructor(msg, method, url) { - super(TwirpErrorCode.BadRoute, msg); - this.withMeta("twirp_invalid_route", method + " " + url); - } -} -exports.BadRouteError = BadRouteError; -var TwirpErrorCode; -(function (TwirpErrorCode) { - // Canceled indicates the operation was cancelled (typically by the caller). - TwirpErrorCode["Canceled"] = "canceled"; - // Unknown error. For example when handling errors raised by APIs that do not - // return enough error information. - TwirpErrorCode["Unknown"] = "unknown"; - // InvalidArgument indicates client specified an invalid argument. It - // indicates arguments that are problematic regardless of the state of the - // system (i.e. a malformed file name, required argument, number out of range, - // etc.). - TwirpErrorCode["InvalidArgument"] = "invalid_argument"; - // Malformed indicates an error occurred while decoding the client's request. - // This may mean that the message was encoded improperly, or that there is a - // disagreement in message format between the client and server. - TwirpErrorCode["Malformed"] = "malformed"; - // DeadlineExceeded means operation expired before completion. For operations - // that change the state of the system, this error may be returned even if the - // operation has completed successfully (timeout). - TwirpErrorCode["DeadlineExceeded"] = "deadline_exceeded"; - // NotFound means some requested entity was not found. - TwirpErrorCode["NotFound"] = "not_found"; - // BadRoute means that the requested URL path wasn't routable to a Twirp - // service and method. This is returned by the generated server, and usually - // shouldn't be returned by applications. Instead, applications should use - // NotFound or Unimplemented. - TwirpErrorCode["BadRoute"] = "bad_route"; - // AlreadyExists means an attempt to create an entity failed because one - // already exists. - TwirpErrorCode["AlreadyExists"] = "already_exists"; - // PermissionDenied indicates the caller does not have permission to execute - // the specified operation. It must not be used if the caller cannot be - // identified (Unauthenticated). - TwirpErrorCode["PermissionDenied"] = "permission_denied"; - // Unauthenticated indicates the request does not have valid authentication - // credentials for the operation. - TwirpErrorCode["Unauthenticated"] = "unauthenticated"; - // ResourceExhausted indicates some resource has been exhausted, perhaps a - // per-user quota, or perhaps the entire file system is out of space. - TwirpErrorCode["ResourceExhausted"] = "resource_exhausted"; - // FailedPrecondition indicates operation was rejected because the system is - // not in a state required for the operation's execution. For example, doing - // an rmdir operation on a directory that is non-empty, or on a non-directory - // object, or when having conflicting read-modify-write on the same resource. - TwirpErrorCode["FailedPrecondition"] = "failed_precondition"; - // Aborted indicates the operation was aborted, typically due to a concurrency - // issue like sequencer check failures, transaction aborts, etc. - TwirpErrorCode["Aborted"] = "aborted"; - // OutOfRange means operation was attempted past the valid range. For example, - // seeking or reading past end of a paginated collection. - // - // Unlike InvalidArgument, this error indicates a problem that may be fixed if - // the system state changes (i.e. adding more items to the collection). - // - // There is a fair bit of overlap between FailedPrecondition and OutOfRange. - // We recommend using OutOfRange (the more specific error) when it applies so - // that callers who are iterating through a space can easily look for an - // OutOfRange error to detect when they are done. - TwirpErrorCode["OutOfRange"] = "out_of_range"; - // Unimplemented indicates operation is not implemented or not - // supported/enabled in this service. - TwirpErrorCode["Unimplemented"] = "unimplemented"; - // Internal errors. When some invariants expected by the underlying system - // have been broken. In other words, something bad happened in the library or - // backend service. Do not confuse with HTTP Internal Server Error; an - // Internal error could also happen on the client code, i.e. when parsing a - // server response. - TwirpErrorCode["Internal"] = "internal"; - // Unavailable indicates the service is currently unavailable. This is a most - // likely a transient condition and may be corrected by retrying with a - // backoff. - TwirpErrorCode["Unavailable"] = "unavailable"; - // DataLoss indicates unrecoverable data loss or corruption. - TwirpErrorCode["DataLoss"] = "data_loss"; -})(TwirpErrorCode = exports.TwirpErrorCode || (exports.TwirpErrorCode = {})); -// ServerHTTPStatusFromErrorCode maps a Twirp error type into a similar HTTP -// response status. It is used by the Twirp server handler to set the HTTP -// response status code. Returns 0 if the ErrorCode is invalid. -function httpStatusFromErrorCode(code) { - switch (code) { - case TwirpErrorCode.Canceled: - return 408; // RequestTimeout - case TwirpErrorCode.Unknown: - return 500; // Internal Server Error - case TwirpErrorCode.InvalidArgument: - return 400; // BadRequest - case TwirpErrorCode.Malformed: - return 400; // BadRequest - case TwirpErrorCode.DeadlineExceeded: - return 408; // RequestTimeout - case TwirpErrorCode.NotFound: - return 404; // Not Found - case TwirpErrorCode.BadRoute: - return 404; // Not Found - case TwirpErrorCode.AlreadyExists: - return 409; // Conflict - case TwirpErrorCode.PermissionDenied: - return 403; // Forbidden - case TwirpErrorCode.Unauthenticated: - return 401; // Unauthorized - case TwirpErrorCode.ResourceExhausted: - return 429; // Too Many Requests - case TwirpErrorCode.FailedPrecondition: - return 412; // Precondition Failed - case TwirpErrorCode.Aborted: - return 409; // Conflict - case TwirpErrorCode.OutOfRange: - return 400; // Bad Request - case TwirpErrorCode.Unimplemented: - return 501; // Not Implemented - case TwirpErrorCode.Internal: - return 500; // Internal Server Error - case TwirpErrorCode.Unavailable: - return 503; // Service Unavailable - case TwirpErrorCode.DataLoss: - return 500; // Internal Server Error - default: - return 0; // Invalid! - } -} -exports.httpStatusFromErrorCode = httpStatusFromErrorCode; -// IsValidErrorCode returns true if is one of the valid predefined constants. -function isValidErrorCode(code) { - return httpStatusFromErrorCode(code) != 0; -} -exports.isValidErrorCode = isValidErrorCode; - - -/***/ }), - -/***/ 6748: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Gateway = exports.Pattern = void 0; -const querystring_1 = __nccwpck_require__(3477); -const dotObject = __importStar(__nccwpck_require__(4365)); -const request_1 = __nccwpck_require__(8347); -const errors_1 = __nccwpck_require__(6647); -const http_client_1 = __nccwpck_require__(4091); -const server_1 = __nccwpck_require__(6604); -var Pattern; -(function (Pattern) { - Pattern["POST"] = "post"; - Pattern["GET"] = "get"; - Pattern["PATCH"] = "patch"; - Pattern["PUT"] = "put"; - Pattern["DELETE"] = "delete"; -})(Pattern = exports.Pattern || (exports.Pattern = {})); -/** - * The Gateway proxies http requests to Twirp Compliant - * handlers - */ -class Gateway { - constructor(routes) { - this.routes = routes; - } - /** - * Middleware that rewrite the current request - * to a Twirp compliant request - */ - twirpRewrite(prefix = "/twirp") { - return (req, resp, next) => { - this.rewrite(req, resp, prefix) - .then(() => next()) - .catch((e) => { - if (e instanceof errors_1.TwirpError) { - if (e.code !== errors_1.TwirpErrorCode.NotFound) { - server_1.writeError(resp, e); - } - else { - next(); - } - } - }); - }; - } - /** - * Rewrite an incoming request to a Twirp compliant request - * @param req - * @param resp - * @param prefix - */ - rewrite(req, resp, prefix = "/twirp") { - return __awaiter(this, void 0, void 0, function* () { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const twirpUrl = `${prefix}/${route.packageName}.${route.serviceName}/${route.methodName}`; - req.url = twirpUrl; - req.originalUrl = twirpUrl; - req.method = "POST"; - req.headers["content-type"] = "application/json"; - req.rawBody = Buffer.from(JSON.stringify(body)); - if (route.responseBodyKey) { - const endFn = resp.end.bind(resp); - resp.end = function (chunk) { - if (resp.statusCode === 200) { - endFn(`{ "${route.responseBodyKey}": ${chunk} }`); - } - else { - endFn(chunk); - } - }; - } - }); - } - /** - * Create a reverse proxy handler to - * proxy http requests to Twirp Compliant handlers - * @param httpClientOption - */ - reverseProxy(httpClientOption) { - const client = http_client_1.NodeHttpRPC(httpClientOption); - return (req, res) => __awaiter(this, void 0, void 0, function* () { - try { - const [match, route] = this.matchRoute(req); - const body = yield this.prepareTwirpBody(req, match, route); - const response = yield client.request(`${route.packageName}.${route.serviceName}`, route.methodName, "application/json", body); - res.statusCode = 200; - res.setHeader("content-type", "application/json"); - let jsonResponse; - if (route.responseBodyKey) { - jsonResponse = JSON.stringify({ [route.responseBodyKey]: response }); - } - else { - jsonResponse = JSON.stringify(response); - } - res.end(jsonResponse); - } - catch (e) { - server_1.writeError(res, e); - } - }); - } - /** - * Prepares twirp body requests using http.google.annotions - * compliant spec - * - * @param req - * @param match - * @param route - * @protected - */ - prepareTwirpBody(req, match, route) { - return __awaiter(this, void 0, void 0, function* () { - const _a = match.params, { query_string } = _a, params = __rest(_a, ["query_string"]); - let requestBody = Object.assign({}, params); - if (query_string && route.bodyKey !== "*") { - const queryParams = this.parseQueryString(query_string); - requestBody = Object.assign(Object.assign({}, queryParams), requestBody); - } - let body = {}; - if (route.bodyKey) { - const data = yield request_1.getRequestData(req); - try { - const jsonBody = JSON.parse(data.toString() || "{}"); - if (route.bodyKey === "*") { - body = jsonBody; - } - else { - body[route.bodyKey] = jsonBody; - } - } - catch (e) { - const msg = "the json request could not be decoded"; - throw new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, msg).withCause(e, true); - } - } - return Object.assign(Object.assign({}, body), requestBody); - }); - } - /** - * Matches a route - * @param req - */ - matchRoute(req) { - var _a; - const httpMethod = (_a = req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase(); - if (!httpMethod) { - throw new errors_1.BadRouteError(`method not allowed`, req.method || "", req.url || ""); - } - const routes = this.routes[httpMethod]; - for (const route of routes) { - const match = route.matcher(req.url || "/"); - if (match) { - return [match, route]; - } - } - throw new errors_1.NotFoundError(`url ${req.url} not found`); - } - /** - * Parse query string - * @param queryString - */ - parseQueryString(queryString) { - const queryParams = querystring_1.parse(queryString.replace("?", "")); - return dotObject.object(queryParams); - } -} -exports.Gateway = Gateway; - - -/***/ }), - -/***/ 4263: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isHook = exports.chainHooks = void 0; -// ChainHooks creates a new ServerHook which chains the callbacks in -// each of the constituent hooks passed in. Each hook function will be -// called in the order of the ServerHooks values passed in. -// -// For the erroring hooks, RequestReceived and RequestRouted, any returned -// errors prevent processing by later hooks. -function chainHooks(...hooks) { - if (hooks.length === 0) { - return null; - } - if (hooks.length === 1) { - return hooks[0]; - } - const serverHook = { - requestReceived(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestReceived) { - continue; - } - yield hook.requestReceived(ctx); - } - }); - }, - requestPrepared(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestPrepared) { - continue; - } - console.warn("hook requestPrepared is deprecated and will be removed in the next release. " + - "Please use responsePrepared instead."); - yield hook.requestPrepared(ctx); - } - }); - }, - responsePrepared(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responsePrepared) { - continue; - } - yield hook.responsePrepared(ctx); - } - }); - }, - requestSent(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestSent) { - continue; - } - console.warn("hook requestSent is deprecated and will be removed in the next release. " + - "Please use responseSent instead."); - yield hook.requestSent(ctx); - } - }); - }, - responseSent(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.responseSent) { - continue; - } - yield hook.responseSent(ctx); - } - }); - }, - requestRouted(ctx) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.requestRouted) { - continue; - } - yield hook.requestRouted(ctx); - } - }); - }, - error(ctx, err) { - return __awaiter(this, void 0, void 0, function* () { - for (const hook of hooks) { - if (!hook.error) { - continue; - } - yield hook.error(ctx, err); - } - }); - }, - }; - return serverHook; -} -exports.chainHooks = chainHooks; -function isHook(object) { - return ("requestReceived" in object || - "requestPrepared" in object || - "requestSent" in object || - "requestRouted" in object || - "responsePrepared" in object || - "responseSent" in object || - "error" in object); -} -exports.isHook = isHook; - - -/***/ }), - -/***/ 4091: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FetchRPC = exports.wrapErrorResponseToTwirpError = exports.NodeHttpRPC = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const url_1 = __nccwpck_require__(7310); -const errors_1 = __nccwpck_require__(6647); -/** - * a node HTTP RPC implementation - * @param options - * @constructor - */ -const NodeHttpRPC = (options) => ({ - request(service, method, contentType, data) { - let client; - return new Promise((resolve, rejected) => { - const responseChunks = []; - const requestData = contentType === "application/protobuf" - ? Buffer.from(data) - : JSON.stringify(data); - const url = new url_1.URL(options.baseUrl); - const isHttps = url.protocol === "https:"; - if (isHttps) { - client = https; - } - else { - client = http; - } - const prefix = url.pathname !== "/" ? url.pathname : ""; - const req = client - .request(Object.assign(Object.assign({}, (options ? options : {})), { method: "POST", protocol: url.protocol, host: url.hostname, port: url.port ? url.port : isHttps ? 443 : 80, path: `${prefix}/${service}/${method}`, headers: Object.assign(Object.assign({}, (options.headers ? options.headers : {})), { "Content-Type": contentType, "Content-Length": contentType === "application/protobuf" - ? Buffer.byteLength(requestData) - : Buffer.from(requestData).byteLength }) }), (res) => { - res.on("data", (chunk) => responseChunks.push(chunk)); - res.on("end", () => { - const data = Buffer.concat(responseChunks); - if (res.statusCode != 200) { - rejected(wrapErrorResponseToTwirpError(data.toString())); - } - else { - if (contentType === "application/json") { - resolve(JSON.parse(data.toString())); - } - else { - resolve(data); - } - } - }); - res.on("error", (err) => { - rejected(err); - }); - }) - .on("error", (err) => { - rejected(err); - }); - req.end(requestData); - }); - }, -}); -exports.NodeHttpRPC = NodeHttpRPC; -function wrapErrorResponseToTwirpError(errorResponse) { - return errors_1.TwirpError.fromObject(JSON.parse(errorResponse)); -} -exports.wrapErrorResponseToTwirpError = wrapErrorResponseToTwirpError; -/** - * a browser fetch RPC implementation - */ -const FetchRPC = (options) => ({ - request(service, method, contentType, data) { - return __awaiter(this, void 0, void 0, function* () { - const headers = new Headers(options.headers); - headers.set("content-type", contentType); - const response = yield fetch(`${options.baseUrl}/${service}/${method}`, Object.assign(Object.assign({}, options), { method: "POST", headers, body: data instanceof Uint8Array ? data : JSON.stringify(data) })); - if (response.status === 200) { - if (contentType === "application/json") { - return yield response.json(); - } - return new Uint8Array(yield response.arrayBuffer()); - } - throw errors_1.TwirpError.fromObject(yield response.json()); - }); - }, -}); -exports.FetchRPC = FetchRPC; + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 6465: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; +/***/ 4294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TwirpContentType = void 0; -__exportStar(__nccwpck_require__(1524), exports); -__exportStar(__nccwpck_require__(6604), exports); -__exportStar(__nccwpck_require__(8913), exports); -__exportStar(__nccwpck_require__(4263), exports); -__exportStar(__nccwpck_require__(6647), exports); -__exportStar(__nccwpck_require__(6748), exports); -__exportStar(__nccwpck_require__(4091), exports); -var request_1 = __nccwpck_require__(8347); -Object.defineProperty(exports, "TwirpContentType", ({ enumerable: true, get: function () { return request_1.TwirpContentType; } })); +module.exports = __nccwpck_require__(4219); /***/ }), -/***/ 8913: -/***/ (function(__unused_webpack_module, exports) { +/***/ 4219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.chainInterceptors = void 0; -// chains multiple Interceptors into a single Interceptor. -// The first interceptor wraps the second one, and so on. -// Returns null if interceptors is empty. -function chainInterceptors(...interceptors) { - if (interceptors.length === 0) { - return; - } - if (interceptors.length === 1) { - return interceptors[0]; - } - const first = interceptors[0]; - return (ctx, request, handler) => __awaiter(this, void 0, void 0, function* () { - let next = handler; - for (let i = interceptors.length - 1; i > 0; i--) { - next = ((next) => (ctx, typedRequest) => { - return interceptors[i](ctx, typedRequest, next); - })(next); - } - return first(ctx, request, next); - }); -} -exports.chainInterceptors = chainInterceptors; +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); -/***/ }), -/***/ 8347: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseTwirpPath = exports.getRequestData = exports.validateRequest = exports.getContentType = exports.TwirpContentType = void 0; -const errors_1 = __nccwpck_require__(6647); -/** - * Supported Twirp Content-Type - */ -var TwirpContentType; -(function (TwirpContentType) { - TwirpContentType[TwirpContentType["Protobuf"] = 0] = "Protobuf"; - TwirpContentType[TwirpContentType["JSON"] = 1] = "JSON"; - TwirpContentType[TwirpContentType["Unknown"] = 2] = "Unknown"; -})(TwirpContentType = exports.TwirpContentType || (exports.TwirpContentType = {})); -/** - * Get supported content-type - * @param mimeType - */ -function getContentType(mimeType) { - switch (mimeType) { - case "application/protobuf": - return TwirpContentType.Protobuf; - case "application/json": - return TwirpContentType.JSON; - default: - return TwirpContentType.Unknown; - } +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; } -exports.getContentType = getContentType; -/** - * Validate a twirp request - * @param ctx - * @param request - * @param pathPrefix - */ -function validateRequest(ctx, request, pathPrefix) { - if (request.method !== "POST") { - const msg = `unsupported method ${request.method} (only POST is allowed)`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - const path = parseTwirpPath(request.url || ""); - if (path.pkgService !== - (ctx.packageName ? ctx.packageName + "." : "") + ctx.serviceName) { - const msg = `no handler for path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - if (path.prefix !== pathPrefix) { - const msg = `invalid path prefix ${path.prefix}, expected ${pathPrefix}, on path ${request.url}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - const mimeContentType = request.headers["content-type"] || ""; - if (ctx.contentType === TwirpContentType.Unknown) { - const msg = `unexpected Content-Type: ${request.headers["content-type"]}`; - throw new errors_1.BadRouteError(msg, request.method || "", request.url || ""); - } - return Object.assign(Object.assign({}, path), { mimeContentType, contentType: ctx.contentType }); + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; } -exports.validateRequest = validateRequest; -/** - * Get request data from the body - * @param req - */ -function getRequestData(req) { - return new Promise((resolve, reject) => { - const reqWithRawBody = req; - if (reqWithRawBody.rawBody instanceof Buffer) { - resolve(reqWithRawBody.rawBody); - return; - } - const chunks = []; - req.on("data", (chunk) => chunks.push(chunk)); - req.on("end", () => __awaiter(this, void 0, void 0, function* () { - const data = Buffer.concat(chunks); - resolve(data); - })); - req.on("error", (err) => { - if (req.aborted) { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.DeadlineExceeded, "failed to read request: deadline exceeded")); - } - else { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Malformed, err.message).withCause(err)); - } - }); - req.on("close", () => { - reject(new errors_1.TwirpError(errors_1.TwirpErrorCode.Canceled, "failed to read request: context canceled")); - }); - }); + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; } -exports.getRequestData = getRequestData; -/** - * Parses twirp url path - * @param path - */ -function parseTwirpPath(path) { - const parts = path.split("/"); - if (parts.length < 2) { - return { - pkgService: "", - method: "", - prefix: "", - }; + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } } - return { - method: parts[parts.length - 1], - pkgService: parts[parts.length - 2], - prefix: parts.slice(0, parts.length - 2).join("/"), - }; + socket.destroy(); + self.removeSocket(socket); + }); } -exports.parseTwirpPath = parseTwirpPath; +util.inherits(TunnelingAgent, events.EventEmitter); +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); -/***/ }), + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } -/***/ 6604: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); -"use strict"; + function onFree() { + self.emit('free', socket, options); + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.writeError = exports.TwirpServer = void 0; -const hooks_1 = __nccwpck_require__(4263); -const request_1 = __nccwpck_require__(8347); -const errors_1 = __nccwpck_require__(6647); -/** - * Runtime server implementation of a TwirpServer - */ -class TwirpServer { - constructor(options) { - this.pathPrefix = "/twirp"; - this.hooks = []; - this.interceptors = []; - this.packageName = options.packageName; - this.serviceName = options.serviceName; - this.methodList = options.methodList; - this.matchRoute = options.matchRoute; - this.service = options.service; + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); } - /** - * Returns the prefix for this server - */ - get prefix() { - return this.pathPrefix; + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port } - /** - * The http handler for twirp complaint endpoints - * @param options - */ - httpHandler(options) { - return (req, resp) => { - // setup prefix - if ((options === null || options === void 0 ? void 0 : options.prefix) !== undefined) { - this.withPrefix(options.prefix); - } - return this._httpHandler(req, resp); - }; + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; } - /** - * Adds interceptors or hooks to the request stack - * @param middlewares - */ - use(...middlewares) { - middlewares.forEach((middleware) => { - if (hooks_1.isHook(middleware)) { - this.hooks.push(middleware); - return this; - } - this.interceptors.push(middleware); - }); - return this; + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; } - /** - * Adds a prefix to the service url path - * @param prefix - */ - withPrefix(prefix) { - if (prefix === false) { - this.pathPrefix = ""; - } - else { - this.pathPrefix = prefix; + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; } - return this; - } - /** - * Returns the regex matching path for this twirp server - */ - matchingPath() { - const baseRegex = this.baseURI().replace(/\./g, "\\."); - return new RegExp(`${baseRegex}\/(${this.methodList.join("|")})`); - } - /** - * Returns the base URI for this twirp server - */ - baseURI() { - return `${this.pathPrefix}/${this.packageName ? this.packageName + "." : ""}${this.serviceName}`; - } - /** - * Create a twirp context - * @param req - * @param res - * @private - */ - createContext(req, res) { - return { - packageName: this.packageName, - serviceName: this.serviceName, - methodName: "", - contentType: request_1.getContentType(req.headers["content-type"]), - req: req, - res: res, - }; - } - /** - * Twrip server http handler implementation - * @param req - * @param resp - * @private - */ - _httpHandler(req, resp) { - return __awaiter(this, void 0, void 0, function* () { - const ctx = this.createContext(req, resp); - try { - yield this.invokeHook("requestReceived", ctx); - const { method, mimeContentType } = request_1.validateRequest(ctx, req, this.pathPrefix || ""); - const handler = this.matchRoute(method, { - onMatch: (ctx) => { - return this.invokeHook("requestRouted", ctx); - }, - onNotFound: () => { - const msg = `no handler for path ${req.url}`; - throw new errors_1.BadRouteError(msg, req.method || "", req.url || ""); - }, - }); - const body = yield request_1.getRequestData(req); - const response = yield handler(ctx, this.service, body, this.interceptors); - yield Promise.all([ - this.invokeHook("responsePrepared", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestPrepared", ctx), - ]); - resp.statusCode = 200; - resp.setHeader("Content-Type", mimeContentType); - resp.end(response); - } - catch (e) { - yield this.invokeHook("error", ctx, mustBeTwirpError(e)); - if (!resp.headersSent) { - writeError(resp, e); - } - } - finally { - yield Promise.all([ - this.invokeHook("responseSent", ctx), - // keep backwards compatibility till next release - this.invokeHook("requestSent", ctx), - ]); - } - }); - } - /** - * Invoke a hook - * @param hookName - * @param ctx - * @param err - * @protected - */ - invokeHook(hookName, ctx, err) { - return __awaiter(this, void 0, void 0, function* () { - if (this.hooks.length === 0) { - return; - } - const chainedHooks = hooks_1.chainHooks(...this.hooks); - const hook = chainedHooks === null || chainedHooks === void 0 ? void 0 : chainedHooks[hookName]; - if (hook) { - yield hook(ctx, err || new errors_1.InternalServerError("internal server error")); - } - }); + } } + } + return target; } -exports.TwirpServer = TwirpServer; -/** - * Write http error response - * @param res - * @param error - */ -function writeError(res, error) { - const twirpError = mustBeTwirpError(error); - res.setHeader("Content-Type", "application/json"); - res.statusCode = errors_1.httpStatusFromErrorCode(twirpError.code); - res.end(twirpError.toJSON()); -} -exports.writeError = writeError; -/** - * Make sure that the error passed is a TwirpError - * otherwise it will wrap it into an InternalError - * @param err - */ -function mustBeTwirpError(err) { - if (err instanceof errors_1.TwirpError) { - return err; + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); } - return new errors_1.InternalServerErrorWith(err); + console.error.apply(console, args); + } +} else { + debug = function() {}; } +exports.debug = debug; // for test /***/ }), @@ -100154,6 +97291,29 @@ class BaseDistribution { return response.result || []; }); } + getMirrorUrlVersions() { + return __awaiter(this, void 0, void 0, function* () { + const initialUrl = this.getDistributionUrl(); + const dataUrl = `${initialUrl}/index.json`; + try { + const response = yield this.httpClient.getJson(dataUrl); + return response.result || []; + } + catch (err) { + if (err instanceof Error && + err.message.includes('getaddrinfo EAI_AGAIN')) { + core.setFailed(`Network error: Failed to resolve the server at ${dataUrl}.Please check your DNS settings or verify that the URL is correct.`); + } + else if (err instanceof hc.HttpClientError && err.statusCode === 404) { + core.setFailed(`404 Error: Unable to find versions at ${dataUrl}.Please verify that the mirror URL is valid.`); + } + else { + core.setFailed(`Failed to fetch Node.js versions from ${dataUrl}.Please check the URL and try again.}`); + } + throw err; + } + }); + } getNodejsDistInfo(version) { const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); version = semver_1.default.clean(version) || ''; @@ -100174,6 +97334,26 @@ class BaseDistribution { fileName: fileName }; } + getNodejsMirrorURLInfo(version) { + const mirrorURL = this.nodeInfo.mirrorURL; + const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); + version = semver_1.default.clean(version) || ''; + const fileName = this.osPlat == 'win32' + ? `node-v${version}-win-${osArch}` + : `node-v${version}-${this.osPlat}-${osArch}`; + const urlFileName = this.osPlat == 'win32' + ? this.nodeInfo.arch === 'arm64' + ? `${fileName}.zip` + : `${fileName}.7z` + : `${fileName}.tar.gz`; + const url = `${mirrorURL}/v${version}/${urlFileName}`; + return { + downloadUrl: url, + resolvedVersion: version, + arch: osArch, + fileName: fileName + }; + } downloadNodejs(info) { return __awaiter(this, void 0, void 0, function* () { let downloadPath = ''; @@ -100185,8 +97365,15 @@ class BaseDistribution { if (err instanceof tc.HTTPError && err.httpStatusCode == 404 && this.osPlat == 'win32') { - return yield this.acquireWindowsNodeFromFallbackLocation(info.resolvedVersion, info.arch); + return yield this.acquireWindowsNodeFromFallbackLocation(info.resolvedVersion, info.arch, info.downloadUrl); } + // Handle network-related issues (e.g., DNS resolution failures) + if (err instanceof Error && + err.message.includes('getaddrinfo EAI_AGAIN')) { + core.error(`Network error: Failed to resolve the server at ${info.downloadUrl}. + This could be due to a DNS resolution issue. Please verify the URL or check your network connection.`); + } + core.error(`Download failed from ${info.downloadUrl}. Please check the URl and try again.`); throw err; } const toolPath = yield this.extractArchive(downloadPath, info, true); @@ -100202,8 +97389,9 @@ class BaseDistribution { return { range: valid, options }; } acquireWindowsNodeFromFallbackLocation(version_1) { - return __awaiter(this, arguments, void 0, function* (version, arch = os_1.default.arch()) { + return __awaiter(this, arguments, void 0, function* (version, arch = os_1.default.arch(), downloadUrl) { const initialUrl = this.getDistributionUrl(); + core.info('url: ' + initialUrl); const osArch = this.translateArchToDistUrl(arch); // Create temporary folder to download to const tempDownloadFolder = `temp_${(0, uuid_1.v4)()}`; @@ -100217,6 +97405,9 @@ class BaseDistribution { exeUrl = `${initialUrl}/v${version}/win-${osArch}/node.exe`; libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`; core.info(`Downloading only node binary from ${exeUrl}`); + if (downloadUrl != exeUrl) { + core.error('unable to download node binary with the provided URL. Please check and try again'); + } const exePath = yield tc.downloadTool(exeUrl); yield io.cp(exePath, path.join(tempDir, 'node.exe')); const libPath = yield tc.downloadTool(libUrl); @@ -100392,7 +97583,12 @@ class NightlyNodejs extends base_distribution_prerelease_1.default { this.distribution = 'nightly'; } getDistributionUrl() { - return 'https://nodejs.org/download/nightly'; + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } + else { + return 'https://nodejs.org/download/nightly'; + } } } exports["default"] = NightlyNodejs; @@ -100452,72 +97648,84 @@ class OfficialBuilds extends base_distribution_1.default { setupNodeJs() { return __awaiter(this, void 0, void 0, function* () { var _a; - let manifest; - let nodeJsVersions; - const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); - if (this.isLtsAlias(this.nodeInfo.versionSpec)) { - core.info('Attempt to resolve LTS alias from manifest...'); - // No try-catch since it's not possible to resolve LTS alias without manifest - manifest = yield this.getManifest(); - this.nodeInfo.versionSpec = this.resolveLtsAliasFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, manifest); - } - if (this.isLatestSyntax(this.nodeInfo.versionSpec)) { - nodeJsVersions = yield this.getNodeJsVersions(); - const versions = this.filterVersions(nodeJsVersions); - this.nodeInfo.versionSpec = this.evaluateVersions(versions); - core.info('getting latest node version...'); - } - if (this.nodeInfo.checkLatest) { - core.info('Attempt to resolve the latest version from manifest...'); - const resolvedVersion = yield this.resolveVersionFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest); - if (resolvedVersion) { - this.nodeInfo.versionSpec = resolvedVersion; - core.info(`Resolved as '${resolvedVersion}'`); + if (this.nodeInfo.mirrorURL) { + try { + core.info(`Attempting to download using mirror URL...`); + yield this.downloadFromMirrorURL(); // Attempt to download from the mirror } - else { - core.info(`Failed to resolve version ${this.nodeInfo.versionSpec} from manifest`); + catch (err) { + core.setFailed(err.message); } } - let toolPath = this.findVersionInHostedToolCacheDirectory(); - if (toolPath) { - core.info(`Found in cache @ ${toolPath}`); - this.addToolPath(toolPath); - return; - } - let downloadPath = ''; - try { - core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`); - const versionInfo = yield this.getInfoFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest); - if (versionInfo) { - core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`); - downloadPath = yield tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.auth); - if (downloadPath) { - toolPath = yield this.extractArchive(downloadPath, versionInfo, false); + else { + core.info('Setup Node.js'); + let manifest; + let nodeJsVersions; + const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); + if (this.isLtsAlias(this.nodeInfo.versionSpec)) { + core.info('Attempt to resolve LTS alias from manifest...'); + // No try-catch since it's not possible to resolve LTS alias without manifest + manifest = yield this.getManifest(); + this.nodeInfo.versionSpec = this.resolveLtsAliasFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, manifest); + } + if (this.isLatestSyntax(this.nodeInfo.versionSpec)) { + nodeJsVersions = yield this.getNodeJsVersions(); + const versions = this.filterVersions(nodeJsVersions); + this.nodeInfo.versionSpec = this.evaluateVersions(versions); + core.info('getting latest node version...'); + } + if (this.nodeInfo.checkLatest) { + core.info('Attempt to resolve the latest version from manifest...'); + const resolvedVersion = yield this.resolveVersionFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest); + if (resolvedVersion) { + this.nodeInfo.versionSpec = resolvedVersion; + core.info(`Resolved as '${resolvedVersion}'`); + } + else { + core.info(`Failed to resolve version ${this.nodeInfo.versionSpec} from manifest`); } } - else { - core.info('Not found in manifest. Falling back to download directly from Node'); + let toolPath = this.findVersionInHostedToolCacheDirectory(); + if (toolPath) { + core.info(`Found in cache @ ${toolPath}`); + this.addToolPath(toolPath); + return; } - } - catch (err) { - // Rate limit? - if (err instanceof tc.HTTPError && - (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { - core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); + let downloadPath = ''; + try { + core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`); + const versionInfo = yield this.getInfoFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest); + if (versionInfo) { + core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`); + downloadPath = yield tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.auth); + if (downloadPath) { + toolPath = yield this.extractArchive(downloadPath, versionInfo, false); + } + } + else { + core.info('Not found in manifest. Falling back to download directly from Node'); + } } - else { - core.info(err.message); + catch (err) { + // Rate limit? + if (err instanceof tc.HTTPError && + (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { + core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); + } + else { + core.info(err.message); + } + core.debug((_a = err.stack) !== null && _a !== void 0 ? _a : 'empty stack'); + core.info('Falling back to download directly from Node'); } - core.debug((_a = err.stack) !== null && _a !== void 0 ? _a : 'empty stack'); - core.info('Falling back to download directly from Node'); - } - if (!toolPath) { - toolPath = yield this.downloadDirectlyFromNode(); - } - if (this.osPlat != 'win32') { - toolPath = path_1.default.join(toolPath, 'bin'); + if (!toolPath) { + toolPath = yield this.downloadDirectlyFromNode(); + } + if (this.osPlat != 'win32') { + toolPath = path_1.default.join(toolPath, 'bin'); + } + core.addPath(toolPath); } - core.addPath(toolPath); }); } addToolPath(toolPath) { @@ -100559,6 +97767,9 @@ class OfficialBuilds extends base_distribution_1.default { return version; } getDistributionUrl() { + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } return `https://nodejs.org/dist`; } getManifest() { @@ -100626,6 +97837,32 @@ class OfficialBuilds extends base_distribution_1.default { isLatestSyntax(versionSpec) { return ['current', 'latest', 'node'].includes(versionSpec); } + downloadFromMirrorURL() { + return __awaiter(this, void 0, void 0, function* () { + const nodeJsVersions = yield this.getMirrorUrlVersions(); + const versions = this.filterVersions(nodeJsVersions); + const evaluatedVersion = this.evaluateVersions(versions); + if (!evaluatedVersion) { + throw new Error(`Unable to find Node version '${this.nodeInfo.versionSpec}' for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} from the provided mirror-url ${this.nodeInfo.mirrorURL}. Please check the mirror-url`); + } + const toolName = this.getNodejsMirrorURLInfo(evaluatedVersion); + try { + const toolPath = yield this.downloadNodejs(toolName); + return toolPath; + } + catch (error) { + if (error instanceof tc.HTTPError && error.httpStatusCode === 404) { + core.setFailed(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` + + 'This usually happens when downloadable binaries are not fully updated in the provided mirror-url' + + 'To resolve this issue you may either fall back to the older version or try again later.'); + } + else { + core.setFailed(`An unexpected error occurred like url might not correct`); + } + throw error; + } + }); + } } exports["default"] = OfficialBuilds; @@ -100647,7 +97884,12 @@ class RcBuild extends base_distribution_1.default { super(nodeInfo); } getDistributionUrl() { - return 'https://nodejs.org/download/rc'; + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } + else { + return 'https://nodejs.org/download/rc'; + } } } exports["default"] = RcBuild; @@ -100671,7 +97913,12 @@ class CanaryBuild extends base_distribution_prerelease_1.default { this.distribution = 'v8-canary'; } getDistributionUrl() { - return 'https://nodejs.org/download/v8-canary'; + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } + else { + return 'https://nodejs.org/download/v8-canary'; + } } } exports["default"] = CanaryBuild; @@ -100748,6 +97995,7 @@ function run() { if (!arch) { arch = os_1.default.arch(); } + const mirrorURL = core.getInput('mirror-url'); if (version) { const token = core.getInput('token'); const auth = !token ? undefined : `token ${token}`; @@ -100758,7 +98006,8 @@ function run() { checkLatest, auth, stable, - arch + arch, + mirrorURL }; const nodeDistribution = (0, installer_factory_1.getNodejsDistribution)(nodejsInfo); yield nodeDistribution.setupNodeJs(); @@ -100852,7 +98101,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0; +exports.unique = exports.validateMirrorURL = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0; const core = __importStar(__nccwpck_require__(2186)); const exec = __importStar(__nccwpck_require__(1514)); const io = __importStar(__nccwpck_require__(7436)); @@ -100940,6 +98189,15 @@ function getToolVersion(tool, options) { } }); } +function validateMirrorURL(mirrorURL) { + if (mirrorURL === ' ' || mirrorURL.trim() === 'undefined') { + throw new Error('Mirror URL is empty. Please provide a valid mirror URL.'); + } + else { + return mirrorURL; + } +} +exports.validateMirrorURL = validateMirrorURL; const unique = () => { const encountered = new Set(); return (value) => { @@ -102847,7 +100105,7 @@ module.exports = parseParams /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1","twirp-ts":"^2.5.0"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}'); +module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}'); /***/ }), diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index bf62e0713..ac61e64d9 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -1,3 +1,5 @@ + + ## Working with lockfiles All supported package managers recommend that you **always** commit the lockfile, although implementations vary doing so generally provides the following benefits: @@ -76,10 +78,10 @@ When using the `package.json` input, the action will look for `volta.node` first ```json { "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "volta": { - "node": "16.0.0" + "node": "22.0.0" } } ``` @@ -100,7 +102,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '22' architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default - run: npm ci - run: npm test @@ -239,7 +241,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '22' cache: 'yarn' - run: yarn install --frozen-lockfile # optional, --immutable - run: yarn test @@ -261,7 +263,7 @@ steps: version: 6.32.9 - uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '22' cache: 'pnpm' - run: pnpm install - run: pnpm test @@ -277,7 +279,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '22' cache: 'npm' cache-dependency-path: '**/package-lock.json' - run: npm ci @@ -290,7 +292,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '22' cache: 'npm' cache-dependency-path: | server/app/package-lock.json @@ -312,9 +314,9 @@ jobs: - macos-latest - windows-latest node_version: - - 12 - - 14 - - 16 + - 18 + - 20 + - 22 architecture: - x64 # an extra windows-x86 run: @@ -340,7 +342,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '22' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm publish @@ -360,7 +362,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '22' registry-url: <registry url> - run: yarn install --frozen-lockfile - run: yarn publish @@ -380,7 +382,7 @@ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '22' registry-url: 'https://registry.npmjs.org' # Skip post-install scripts here, as a malicious # script could steal NODE_AUTH_TOKEN. @@ -418,3 +420,15 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa ### always-auth input The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries. + +### Using mirror-url +You can use the new mirror-url parameter to specify a custom mirror for downloading node.js versions from a different location + +```yaml +steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + mirror-url: 'https://mirror.example.com/node' +``` \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 07f38dbbb..28f141ea2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "4.0.0", "license": "MIT", "dependencies": { - "@actions/cache": "^4.0.0", + "@actions/cache": "^4.0.2", "@actions/core": "^1.11.1", "@actions/exec": "^1.1.1", "@actions/github": "^5.1.1", @@ -49,9 +49,9 @@ } }, "node_modules/@actions/cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.0.tgz", - "integrity": "sha512-WIuxjnZ44lNYtIS4fqSaYvF00hORdy3cSin+jx8xNgBVGWnNIAiCBHjlwusVQlcgExoQC9pHXGrDsZyZr7rCDQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.2.tgz", + "integrity": "sha512-cBr7JL1q+JKjbBd3w3SZN5OQ1Xg+/D8QLMcE7MpgpghZlL4biBO0ZEeraoTxCZyfN0YY0dxXlLgsgGv/sT5BTg==", "license": "MIT", "dependencies": { "@actions/core": "^1.11.1", @@ -63,8 +63,7 @@ "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", "@protobuf-ts/plugin": "^2.9.4", - "semver": "^6.3.1", - "twirp-ts": "^2.5.0" + "semver": "^6.3.1" } }, "node_modules/@actions/cache/node_modules/@actions/glob": { @@ -2488,16 +2487,6 @@ "node": ">=6" } }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2632,15 +2621,6 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2788,19 +2768,6 @@ "node": ">=6.0.0" } }, - "node_modules/dot-object": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/dot-object/-/dot-object-2.1.5.tgz", - "integrity": "sha512-xHF8EP4XH/Ba9fvAF2LDd5O3IITVolerVV6xvkxoM8zlGEiCUrggpAnHyOoKJKCrhvPcGATFAUwIujj7bRG5UA==", - "license": "MIT", - "dependencies": { - "commander": "^6.1.0", - "glob": "^7.1.6" - }, - "bin": { - "dot-object": "bin/dot-object" - } - }, "node_modules/electron-to-chromium": { "version": "1.4.563", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.563.tgz", @@ -3363,7 +3330,8 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -3431,6 +3399,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3598,6 +3567,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3606,7 +3576,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-arrayish": { "version": "0.2.1", @@ -4457,12 +4428,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -4475,15 +4440,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4608,16 +4564,6 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "license": "MIT", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -4779,16 +4725,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4802,6 +4738,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4821,12 +4758,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "license": "MIT" - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4940,6 +4871,7 @@ "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, "bin": { "prettier": "bin-prettier.js" }, @@ -5466,16 +5398,6 @@ } } }, - "node_modules/ts-poet": { - "version": "4.15.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-4.15.0.tgz", - "integrity": "sha512-sLLR8yQBvHzi9d4R1F4pd+AzQxBfzOSSjfxiJxQhkUoH5bL7RsAC6wgvtVUQdGqiCsyS9rT6/8X2FI7ipdir5g==", - "license": "Apache-2.0", - "dependencies": { - "lodash": "^4.17.15", - "prettier": "^2.5.1" - } - }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -5510,35 +5432,6 @@ "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "node_modules/twirp-ts": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/twirp-ts/-/twirp-ts-2.5.0.tgz", - "integrity": "sha512-JTKIK5Pf/+3qCrmYDFlqcPPUx+ohEWKBaZy8GL8TmvV2VvC0SXVyNYILO39+GCRbqnuP6hBIF+BVr8ZxRz+6fw==", - "license": "MIT", - "dependencies": { - "@protobuf-ts/plugin-framework": "^2.0.7", - "camel-case": "^4.1.2", - "dot-object": "^2.1.4", - "path-to-regexp": "^6.2.0", - "ts-poet": "^4.5.0", - "yaml": "^1.10.2" - }, - "bin": { - "protoc-gen-twirp_ts": "protoc-gen-twirp_ts" - }, - "peerDependencies": { - "@protobuf-ts/plugin": "^2.5.0", - "ts-proto": "^1.81.3" - }, - "peerDependenciesMeta": { - "@protobuf-ts/plugin": { - "optional": true - }, - "ts-proto": { - "optional": true - } - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5780,15 +5673,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 3f88a2c23..296be5755 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/cache": "^4.0.0", + "@actions/cache": "^4.0.2", "@actions/core": "^1.11.1", "@actions/exec": "^1.1.1", "@actions/github": "^5.1.1", diff --git a/src/distributions/base-distribution.ts b/src/distributions/base-distribution.ts index 70b4b5724..21923ab41 100644 --- a/src/distributions/base-distribution.ts +++ b/src/distributions/base-distribution.ts @@ -104,6 +104,34 @@ export default abstract class BaseDistribution { return response.result || []; } + protected async getMirrorUrlVersions(): Promise<INodeVersion[]> { + const initialUrl = this.getDistributionUrl(); + + const dataUrl = `${initialUrl}/index.json`; + try { + const response = await this.httpClient.getJson<INodeVersion[]>(dataUrl); + return response.result || []; + } catch (err) { + if ( + err instanceof Error && + err.message.includes('getaddrinfo EAI_AGAIN') + ) { + core.setFailed( + `Network error: Failed to resolve the server at ${dataUrl}.Please check your DNS settings or verify that the URL is correct.` + ); + } else if (err instanceof hc.HttpClientError && err.statusCode === 404) { + core.setFailed( + `404 Error: Unable to find versions at ${dataUrl}.Please verify that the mirror URL is valid.` + ); + } else { + core.setFailed( + `Failed to fetch Node.js versions from ${dataUrl}.Please check the URL and try again.}` + ); + } + throw err; + } + } + protected getNodejsDistInfo(version: string) { const osArch: string = this.translateArchToDistUrl(this.nodeInfo.arch); version = semver.clean(version) || ''; @@ -128,6 +156,33 @@ export default abstract class BaseDistribution { }; } + protected getNodejsMirrorURLInfo(version: string) { + const mirrorURL = this.nodeInfo.mirrorURL; + + const osArch: string = this.translateArchToDistUrl(this.nodeInfo.arch); + + version = semver.clean(version) || ''; + const fileName: string = + this.osPlat == 'win32' + ? `node-v${version}-win-${osArch}` + : `node-v${version}-${this.osPlat}-${osArch}`; + const urlFileName: string = + this.osPlat == 'win32' + ? this.nodeInfo.arch === 'arm64' + ? `${fileName}.zip` + : `${fileName}.7z` + : `${fileName}.tar.gz`; + + const url = `${mirrorURL}/v${version}/${urlFileName}`; + + return <INodeVersionInfo>{ + downloadUrl: url, + resolvedVersion: version, + arch: osArch, + fileName: fileName + }; + } + protected async downloadNodejs(info: INodeVersionInfo) { let downloadPath = ''; core.info( @@ -143,9 +198,23 @@ export default abstract class BaseDistribution { ) { return await this.acquireWindowsNodeFromFallbackLocation( info.resolvedVersion, - info.arch + info.arch, + info.downloadUrl + ); + } + // Handle network-related issues (e.g., DNS resolution failures) + if ( + err instanceof Error && + err.message.includes('getaddrinfo EAI_AGAIN') + ) { + core.error( + `Network error: Failed to resolve the server at ${info.downloadUrl}. + This could be due to a DNS resolution issue. Please verify the URL or check your network connection.` ); } + core.error( + `Download failed from ${info.downloadUrl}. Please check the URl and try again.` + ); throw err; } @@ -166,9 +235,11 @@ export default abstract class BaseDistribution { protected async acquireWindowsNodeFromFallbackLocation( version: string, - arch: string = os.arch() + arch: string = os.arch(), + downloadUrl: string ): Promise<string> { const initialUrl = this.getDistributionUrl(); + core.info('url: ' + initialUrl); const osArch: string = this.translateArchToDistUrl(arch); // Create temporary folder to download to @@ -185,6 +256,12 @@ export default abstract class BaseDistribution { core.info(`Downloading only node binary from ${exeUrl}`); + if (downloadUrl != exeUrl) { + core.error( + 'unable to download node binary with the provided URL. Please check and try again' + ); + } + const exePath = await tc.downloadTool(exeUrl); await io.cp(exePath, path.join(tempDir, 'node.exe')); const libPath = await tc.downloadTool(libUrl); diff --git a/src/distributions/base-models.ts b/src/distributions/base-models.ts index 0be93b635..1af61ec8d 100644 --- a/src/distributions/base-models.ts +++ b/src/distributions/base-models.ts @@ -4,6 +4,7 @@ export interface NodeInputs { auth?: string; checkLatest: boolean; stable: boolean; + mirrorURL?: string; } export interface INodeVersionInfo { diff --git a/src/distributions/nightly/nightly_builds.ts b/src/distributions/nightly/nightly_builds.ts index 86a89eed9..ae0e6265c 100644 --- a/src/distributions/nightly/nightly_builds.ts +++ b/src/distributions/nightly/nightly_builds.ts @@ -3,11 +3,16 @@ import {NodeInputs} from '../base-models'; export default class NightlyNodejs extends BasePrereleaseNodejs { protected distribution = 'nightly'; + constructor(nodeInfo: NodeInputs) { super(nodeInfo); } protected getDistributionUrl(): string { - return 'https://nodejs.org/download/nightly'; + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } else { + return 'https://nodejs.org/download/nightly'; + } } } diff --git a/src/distributions/official_builds/official_builds.ts b/src/distributions/official_builds/official_builds.ts index e56eaf812..fe35bae4d 100644 --- a/src/distributions/official_builds/official_builds.ts +++ b/src/distributions/official_builds/official_builds.ts @@ -15,115 +15,125 @@ export default class OfficialBuilds extends BaseDistribution { } public async setupNodeJs() { - let manifest: tc.IToolRelease[] | undefined; - let nodeJsVersions: INodeVersion[] | undefined; - const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); - - if (this.isLtsAlias(this.nodeInfo.versionSpec)) { - core.info('Attempt to resolve LTS alias from manifest...'); - - // No try-catch since it's not possible to resolve LTS alias without manifest - manifest = await this.getManifest(); + if (this.nodeInfo.mirrorURL) { + try { + core.info(`Attempting to download using mirror URL...`); + await this.downloadFromMirrorURL(); // Attempt to download from the mirror + } catch (err) { + core.setFailed((err as Error).message); + } + } else { + core.info('Setup Node.js'); + let manifest: tc.IToolRelease[] | undefined; + let nodeJsVersions: INodeVersion[] | undefined; + const osArch = this.translateArchToDistUrl(this.nodeInfo.arch); + + if (this.isLtsAlias(this.nodeInfo.versionSpec)) { + core.info('Attempt to resolve LTS alias from manifest...'); + + // No try-catch since it's not possible to resolve LTS alias without manifest + manifest = await this.getManifest(); + + this.nodeInfo.versionSpec = this.resolveLtsAliasFromManifest( + this.nodeInfo.versionSpec, + this.nodeInfo.stable, + manifest + ); + } - this.nodeInfo.versionSpec = this.resolveLtsAliasFromManifest( - this.nodeInfo.versionSpec, - this.nodeInfo.stable, - manifest - ); - } + if (this.isLatestSyntax(this.nodeInfo.versionSpec)) { + nodeJsVersions = await this.getNodeJsVersions(); + const versions = this.filterVersions(nodeJsVersions); + this.nodeInfo.versionSpec = this.evaluateVersions(versions); - if (this.isLatestSyntax(this.nodeInfo.versionSpec)) { - nodeJsVersions = await this.getNodeJsVersions(); - const versions = this.filterVersions(nodeJsVersions); - this.nodeInfo.versionSpec = this.evaluateVersions(versions); - - core.info('getting latest node version...'); - } + core.info('getting latest node version...'); + } - if (this.nodeInfo.checkLatest) { - core.info('Attempt to resolve the latest version from manifest...'); - const resolvedVersion = await this.resolveVersionFromManifest( - this.nodeInfo.versionSpec, - this.nodeInfo.stable, - osArch, - manifest - ); - if (resolvedVersion) { - this.nodeInfo.versionSpec = resolvedVersion; - core.info(`Resolved as '${resolvedVersion}'`); - } else { - core.info( - `Failed to resolve version ${this.nodeInfo.versionSpec} from manifest` + if (this.nodeInfo.checkLatest) { + core.info('Attempt to resolve the latest version from manifest...'); + const resolvedVersion = await this.resolveVersionFromManifest( + this.nodeInfo.versionSpec, + this.nodeInfo.stable, + osArch, + manifest ); + if (resolvedVersion) { + this.nodeInfo.versionSpec = resolvedVersion; + core.info(`Resolved as '${resolvedVersion}'`); + } else { + core.info( + `Failed to resolve version ${this.nodeInfo.versionSpec} from manifest` + ); + } } - } - let toolPath = this.findVersionInHostedToolCacheDirectory(); + let toolPath = this.findVersionInHostedToolCacheDirectory(); - if (toolPath) { - core.info(`Found in cache @ ${toolPath}`); - this.addToolPath(toolPath); - return; - } + if (toolPath) { + core.info(`Found in cache @ ${toolPath}`); + this.addToolPath(toolPath); + return; + } - let downloadPath = ''; - try { - core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`); + let downloadPath = ''; + try { + core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`); - const versionInfo = await this.getInfoFromManifest( - this.nodeInfo.versionSpec, - this.nodeInfo.stable, - osArch, - manifest - ); - - if (versionInfo) { - core.info( - `Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}` - ); - downloadPath = await tc.downloadTool( - versionInfo.downloadUrl, - undefined, - this.nodeInfo.auth + const versionInfo = await this.getInfoFromManifest( + this.nodeInfo.versionSpec, + this.nodeInfo.stable, + osArch, + manifest ); - if (downloadPath) { - toolPath = await this.extractArchive( - downloadPath, - versionInfo, - false + if (versionInfo) { + core.info( + `Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}` + ); + downloadPath = await tc.downloadTool( + versionInfo.downloadUrl, + undefined, + this.nodeInfo.auth + ); + + if (downloadPath) { + toolPath = await this.extractArchive( + downloadPath, + versionInfo, + false + ); + } + } else { + core.info( + 'Not found in manifest. Falling back to download directly from Node' ); } - } else { - core.info( - 'Not found in manifest. Falling back to download directly from Node' - ); + } catch (err) { + // Rate limit? + if ( + err instanceof tc.HTTPError && + (err.httpStatusCode === 403 || err.httpStatusCode === 429) + ) { + core.info( + `Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded` + ); + } else { + core.info((err as Error).message); + } + core.debug((err as Error).stack ?? 'empty stack'); + core.info('Falling back to download directly from Node'); } - } catch (err) { - // Rate limit? - if ( - err instanceof tc.HTTPError && - (err.httpStatusCode === 403 || err.httpStatusCode === 429) - ) { - core.info( - `Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded` - ); - } else { - core.info((err as Error).message); + + if (!toolPath) { + toolPath = await this.downloadDirectlyFromNode(); } - core.debug((err as Error).stack ?? 'empty stack'); - core.info('Falling back to download directly from Node'); - } - if (!toolPath) { - toolPath = await this.downloadDirectlyFromNode(); - } + if (this.osPlat != 'win32') { + toolPath = path.join(toolPath, 'bin'); + } - if (this.osPlat != 'win32') { - toolPath = path.join(toolPath, 'bin'); + core.addPath(toolPath); } - - core.addPath(toolPath); } protected addToolPath(toolPath: string) { @@ -177,6 +187,9 @@ export default class OfficialBuilds extends BaseDistribution { } protected getDistributionUrl(): string { + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } return `https://nodejs.org/dist`; } @@ -291,4 +304,39 @@ export default class OfficialBuilds extends BaseDistribution { private isLatestSyntax(versionSpec): boolean { return ['current', 'latest', 'node'].includes(versionSpec); } + + protected async downloadFromMirrorURL() { + const nodeJsVersions = await this.getMirrorUrlVersions(); + const versions = this.filterVersions(nodeJsVersions); + + const evaluatedVersion = this.evaluateVersions(versions); + + if (!evaluatedVersion) { + throw new Error( + `Unable to find Node version '${this.nodeInfo.versionSpec}' for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} from the provided mirror-url ${this.nodeInfo.mirrorURL}. Please check the mirror-url` + ); + } + + const toolName = this.getNodejsMirrorURLInfo(evaluatedVersion); + + try { + const toolPath = await this.downloadNodejs(toolName); + + return toolPath; + } catch (error) { + if (error instanceof tc.HTTPError && error.httpStatusCode === 404) { + core.setFailed( + `Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` + + 'This usually happens when downloadable binaries are not fully updated in the provided mirror-url' + + 'To resolve this issue you may either fall back to the older version or try again later.' + ); + } else { + core.setFailed( + `An unexpected error occurred like url might not correct` + ); + } + + throw error; + } + } } diff --git a/src/distributions/rc/rc_builds.ts b/src/distributions/rc/rc_builds.ts index 40cdb192a..945c270d5 100644 --- a/src/distributions/rc/rc_builds.ts +++ b/src/distributions/rc/rc_builds.ts @@ -5,8 +5,11 @@ export default class RcBuild extends BaseDistribution { constructor(nodeInfo: NodeInputs) { super(nodeInfo); } - - getDistributionUrl(): string { - return 'https://nodejs.org/download/rc'; + protected getDistributionUrl(): string { + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } else { + return 'https://nodejs.org/download/rc'; + } } } diff --git a/src/distributions/v8-canary/canary_builds.ts b/src/distributions/v8-canary/canary_builds.ts index 257151b45..53671acec 100644 --- a/src/distributions/v8-canary/canary_builds.ts +++ b/src/distributions/v8-canary/canary_builds.ts @@ -1,6 +1,5 @@ import BasePrereleaseNodejs from '../base-distribution-prerelease'; import {NodeInputs} from '../base-models'; - export default class CanaryBuild extends BasePrereleaseNodejs { protected distribution = 'v8-canary'; constructor(nodeInfo: NodeInputs) { @@ -8,6 +7,10 @@ export default class CanaryBuild extends BasePrereleaseNodejs { } protected getDistributionUrl(): string { - return 'https://nodejs.org/download/v8-canary'; + if (this.nodeInfo.mirrorURL) { + return this.nodeInfo.mirrorURL; + } else { + return 'https://nodejs.org/download/v8-canary'; + } } } diff --git a/src/main.ts b/src/main.ts index c55c3b005..a49427a0e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,6 +33,8 @@ export async function run() { arch = os.arch(); } + const mirrorURL = core.getInput('mirror-url'); + if (version) { const token = core.getInput('token'); const auth = !token ? undefined : `token ${token}`; @@ -45,7 +47,8 @@ export async function run() { checkLatest, auth, stable, - arch + arch, + mirrorURL }; const nodeDistribution = getNodejsDistribution(nodejsInfo); await nodeDistribution.setupNodeJs(); diff --git a/src/util.ts b/src/util.ts index bbe25ddf0..232c5db76 100644 --- a/src/util.ts +++ b/src/util.ts @@ -97,7 +97,13 @@ async function getToolVersion(tool: string, options: string[]) { return ''; } } - +export function validateMirrorURL(mirrorURL) { + if (mirrorURL === ' ' || mirrorURL.trim() === 'undefined') { + throw new Error('Mirror URL is empty. Please provide a valid mirror URL.'); + } else { + return mirrorURL; + } +} export const unique = () => { const encountered = new Set(); return (value: unknown): boolean => {