full site update
This commit is contained in:
114
node_modules/node-fetch-native/LICENSE
generated
vendored
Normal file
114
node_modules/node-fetch-native/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Pooya Parsa <pooya@pi0.io>
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
https://github.com/node-fetch/node-fetch
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 - 2020 Node Fetch Team
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
https://github.com/mysticatea/abort-controller
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Toru Nagashima
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
https://github.com/TooTallNate/proxy-agents
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
https://github.com/nodejs/undici
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) Matteo Collina and Undici 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.
|
225
node_modules/node-fetch-native/README.md
generated
vendored
Normal file
225
node_modules/node-fetch-native/README.md
generated
vendored
Normal file
@@ -0,0 +1,225 @@
|
||||
# node-fetch-native
|
||||
|
||||
[![][npm-version-src]][npm-version-href]
|
||||
[![][github-actions-src]][github-actions-href]
|
||||
[![][packagephobia-src]][packagephobia-href]
|
||||
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
||||
|
||||
<!-- [![Codecov][codecov-src]][codecov-href] -->
|
||||
|
||||
A redistribution of [node-fetch v3](https://github.com/node-fetch/node-fetch) (+ more!) for better backward and forward compatibility.
|
||||
|
||||
**Why this package?**
|
||||
|
||||
- We can no longer `require('node-fetch')` with the latest version. This stopped popular libraries from upgrading and dependency conflicts between `node-fetch@2` and `node-fetch@3`.
|
||||
- With upcoming versions of Node.js, native `fetch` is being supported. We are prepared for native fetch support using this package yet keep supporting older Node versions.
|
||||
- With the introduction of native fetch to Node.js via [undici](https://github.com/nodejs/undici) there is no easy way to support http proxies!
|
||||
|
||||
**Features:**
|
||||
|
||||
✅ Prefer to **native globals** when available (See Node.js [experimental fetch](https://nodejs.org/dist/latest-v17.x/docs/api/cli.html#--experimental-fetch)).
|
||||
|
||||
✅ Compact build and less install size with **zero dependencies** [![][packagephobia-s-src]][packagephobia-s-href] <sup>vs</sup> [![][packagephobia-s-alt-src]][packagephobia-s-alt-href]
|
||||
|
||||
✅ Support both **CommonJS** (`require`) and **ESM** (`import`) usage
|
||||
|
||||
✅ Use native version if imported without `node` condition using [conditional exports](https://nodejs.org/api/packages.html#packages_conditional_exports) with **zero bundle overhead**
|
||||
|
||||
✅ Polyfill support for Node.js
|
||||
|
||||
✅ Compact and simple proxy supporting both Node.js versions without native fetch using [HTTP Agent](https://github.com/TooTallNate/proxy-agents/tree/main/packages/proxy-agent) and versions with native fetch using [Undici Proxy Agent](https://undici.nodejs.org/#/docs/api/ProxyAgent)
|
||||
|
||||
## Usage
|
||||
|
||||
Install `node-fetch-native` dependency:
|
||||
|
||||
```sh
|
||||
# npm
|
||||
npm i node-fetch-native
|
||||
|
||||
# yarn
|
||||
yarn add node-fetch-native
|
||||
|
||||
# pnpm
|
||||
pnpm i node-fetch-native
|
||||
```
|
||||
|
||||
You can now either import or require the dependency:
|
||||
|
||||
```js
|
||||
// ESM
|
||||
import fetch from "node-fetch-native";
|
||||
|
||||
// CommonJS
|
||||
const fetch = require("node-fetch-native");
|
||||
```
|
||||
|
||||
More named exports:
|
||||
|
||||
```js
|
||||
// ESM
|
||||
import {
|
||||
fetch,
|
||||
Blob,
|
||||
FormData,
|
||||
Headers,
|
||||
Request,
|
||||
Response,
|
||||
AbortController,
|
||||
} from "node-fetch-native";
|
||||
|
||||
// CommonJS
|
||||
const {
|
||||
fetch,
|
||||
Blob,
|
||||
FormData,
|
||||
Headers,
|
||||
Request,
|
||||
Response,
|
||||
AbortController,
|
||||
} = require("node-fetch-native");
|
||||
```
|
||||
|
||||
## Force using non-native version
|
||||
|
||||
Sometimes you want to explicitly use none native (`node-fetch`) implementation of `fetch` in case of issues with the native/polyfill version of `globalThis.fetch` with Node.js or runtime environment.
|
||||
|
||||
You have two ways to do this:
|
||||
|
||||
- Set the `FORCE_NODE_FETCH` environment variable before starting the application.
|
||||
- Import from `node-fetch-native/node`
|
||||
|
||||
## Disable runtime check
|
||||
|
||||
Once the `node-fetch-native/node` module is loaded, it pushes a log warning if the current runtime differs from the Node.js. Set the `DISABLE_NODE_FETCH_NATIVE_WARN` environment variable to turn this check off.
|
||||
|
||||
## Polyfill support
|
||||
|
||||
Using the polyfill method, we can ensure global fetch is available in the environment and all files. Natives are always preferred.
|
||||
|
||||
**Note:** I don't recommend this if you are authoring a library! Please prefer the explicit methods.
|
||||
|
||||
```js
|
||||
// ESM
|
||||
import "node-fetch-native/polyfill";
|
||||
|
||||
// CJS
|
||||
require("node-fetch-native/polyfill");
|
||||
|
||||
// You can now use fetch() without any import!
|
||||
```
|
||||
|
||||
## Proxy Support
|
||||
|
||||
Node.js has no built-in support for HTTP Proxies for fetch (see [nodejs/undici#1650](https://github.com/nodejs/undici/issues/1650) and [nodejs/node#8381](https://github.com/nodejs/node/issues/8381))
|
||||
|
||||
This package bundles a compact and simple proxy-supported solution for both Node.js versions without native fetch using [HTTP Agent](https://github.com/TooTallNate/proxy-agents/tree/main/packages/proxy-agent) and versions with native fetch using [Undici Proxy Agent](https://undici.nodejs.org/#/docs/api/ProxyAgent).
|
||||
|
||||
By default, `https_proxy`, `http_proxy`, `HTTPS_PROXY`, and `HTTP_PROXY` environment variables will be checked and used (in order) for the proxy and if not any of them are set, the proxy will be disabled. You can override it using the `url` option passed to `createFetch` and `createProxy` utils.
|
||||
|
||||
By default, `no_proxy` and `NO_PROXY` environment variables will be checked and used for the (comma-separated) list of hosts to ignore the proxy for. You can override it using the `noProxy` option passed to `createFetch` and `createProxy` utils. The entries starting with a dot will be used to check the domain and also any subdomain.
|
||||
|
||||
> [!NOTE]
|
||||
> Using export conditions, this utility adds proxy support for Node.js and for other runtimes, it will simply return native fetch.
|
||||
|
||||
### `fetch` with proxy support
|
||||
|
||||
You can simply import `{ fetch }` from `node-fetch-native/proxy` with a preconfigured `fetch` function that has proxy support.
|
||||
|
||||
```ts
|
||||
import { fetch } from "node-fetch-native/proxy";
|
||||
|
||||
console.log(await fetch("https://icanhazip.com").then((r) => r.text()));
|
||||
```
|
||||
|
||||
### `createFetch` utility
|
||||
|
||||
You can use the `createFetch` utility to instantiate a `fetch` instance with custom proxy options.
|
||||
|
||||
```ts
|
||||
import { createFetch } from "node-fetch-native/proxy";
|
||||
|
||||
const fetch = createFetch({ url: "http://localhost:9080" });
|
||||
|
||||
console.log(await fetch("https://icanhazip.com").then((r) => r.text()));
|
||||
```
|
||||
|
||||
### `createProxy` utility
|
||||
|
||||
`createProxy` returns an object with `agent` and `dispatcher` keys that can be passed as fetch options.
|
||||
|
||||
```ts
|
||||
import { fetch } from "node-fetch-native";
|
||||
import { createProxy } from "node-fetch-native/proxy";
|
||||
|
||||
const proxy = createProxy();
|
||||
// const proxy = createProxy({ url: "http://localhost:8080" });
|
||||
|
||||
console.log(
|
||||
await fetch("https://icanhazip.com", { ...proxy }).then((r) => r.text()),
|
||||
);
|
||||
```
|
||||
|
||||
## Alias to `node-fetch`
|
||||
|
||||
Using this method, you can ensure all project dependencies and usages of `node-fetch` can benefit from improved `node-fetch-native` and won't conflict between `node-fetch@2` and `node-fetch@3`.
|
||||
|
||||
### npm
|
||||
|
||||
Using npm [overrides](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides):
|
||||
|
||||
```jsonc
|
||||
// package.json
|
||||
{
|
||||
"overrides": {
|
||||
"node-fetch": "npm:node-fetch-native@latest",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### yarn
|
||||
|
||||
Using yarn [selective dependency resolutions](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/):
|
||||
|
||||
```jsonc
|
||||
// package.json
|
||||
{
|
||||
"resolutions": {
|
||||
"node-fetch": "npm:node-fetch-native@latest",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### pnpm
|
||||
|
||||
Using [pnpm.overrides](https://pnpm.io/package_json#pnpmoverrides):
|
||||
|
||||
```jsonc
|
||||
// package.json
|
||||
{
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"node-fetch": "npm:node-fetch-native@latest",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Made with 💛 Published under the [MIT](./LICENSE) license.
|
||||
|
||||
<!-- Badges -->
|
||||
|
||||
[npm-version-src]: https://flat.badgen.net/npm/v/node-fetch-native
|
||||
[npm-version-href]: https://npmjs.com/package/node-fetch-native
|
||||
[npm-downloads-src]: https://flat.badgen.net/npm/dm/node-fetch-native
|
||||
[npm-downloads-href]: https://npmjs.com/package/node-fetch-native
|
||||
[github-actions-src]: https://flat.badgen.net/github/checks/unjs/node-fetch-native
|
||||
[github-actions-href]: https://github.com/unjs/node-fetch-native/actions?query=workflow%3Aci
|
||||
[packagephobia-src]: https://flat.badgen.net/packagephobia/install/node-fetch-native
|
||||
[packagephobia-href]: https://packagephobia.com/result?p=node-fetch-native
|
||||
[packagephobia-s-src]: https://flat.badgen.net/packagephobia/install/node-fetch-native?label=node-fetch-native&scale=.9
|
||||
[packagephobia-s-href]: https://packagephobia.com/result?p=node-fetch-native
|
||||
[packagephobia-s-alt-src]: https://flat.badgen.net/packagephobia/install/node-fetch?label=node-fetch&scale=.9
|
||||
[packagephobia-s-alt-href]: https://packagephobia.com/result?p=node-fetch
|
2
node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs
generated
vendored
Normal file
2
node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";var N=Object.defineProperty;var c=(_,a)=>N(_,"name",{value:a,configurable:!0});require("node:fs"),require("node:path");const node=require("../node.cjs");require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("../shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net");let s=0;const S={START_BOUNDARY:s++,HEADER_FIELD_START:s++,HEADER_FIELD:s++,HEADER_VALUE_START:s++,HEADER_VALUE:s++,HEADER_VALUE_ALMOST_DONE:s++,HEADERS_ALMOST_DONE:s++,PART_DATA_START:s++,PART_DATA:s++,END:s++};let f=1;const F={PART_BOUNDARY:f,LAST_BOUNDARY:f*=2},LF=10,CR=13,SPACE=32,HYPHEN=45,COLON=58,A=97,Z=122,lower=c(_=>_|32,"lower"),noop=c(()=>{},"noop");class MultipartParser{static{c(this,"MultipartParser")}constructor(a){this.index=0,this.flags=0,this.onHeaderEnd=noop,this.onHeaderField=noop,this.onHeadersEnd=noop,this.onHeaderValue=noop,this.onPartBegin=noop,this.onPartData=noop,this.onPartEnd=noop,this.boundaryChars={},a=`\r
|
||||
--`+a;const t=new Uint8Array(a.length);for(let n=0;n<a.length;n++)t[n]=a.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=S.START_BOUNDARY}write(a){let t=0;const n=a.length;let E=this.index,{lookbehind:d,boundary:h,boundaryChars:H,index:e,state:o,flags:l}=this;const b=this.boundary.length,m=b-1,O=a.length;let r,P;const u=c(D=>{this[D+"Mark"]=t},"mark"),i=c(D=>{delete this[D+"Mark"]},"clear"),T=c((D,p,R,g)=>{(p===void 0||p!==R)&&this[D](g&&g.subarray(p,R))},"callback"),L=c((D,p)=>{const R=D+"Mark";R in this&&(p?(T(D,this[R],t,a),delete this[R]):(T(D,this[R],a.length,a),this[R]=0))},"dataCallback");for(t=0;t<n;t++)switch(r=a[t],o){case S.START_BOUNDARY:if(e===h.length-2){if(r===HYPHEN)l|=F.LAST_BOUNDARY;else if(r!==CR)return;e++;break}else if(e-1===h.length-2){if(l&F.LAST_BOUNDARY&&r===HYPHEN)o=S.END,l=0;else if(!(l&F.LAST_BOUNDARY)&&r===LF)e=0,T("onPartBegin"),o=S.HEADER_FIELD_START;else return;break}r!==h[e+2]&&(e=-2),r===h[e+2]&&e++;break;case S.HEADER_FIELD_START:o=S.HEADER_FIELD,u("onHeaderField"),e=0;case S.HEADER_FIELD:if(r===CR){i("onHeaderField"),o=S.HEADERS_ALMOST_DONE;break}if(e++,r===HYPHEN)break;if(r===COLON){if(e===1)return;L("onHeaderField",!0),o=S.HEADER_VALUE_START;break}if(P=lower(r),P<A||P>Z)return;break;case S.HEADER_VALUE_START:if(r===SPACE)break;u("onHeaderValue"),o=S.HEADER_VALUE;case S.HEADER_VALUE:r===CR&&(L("onHeaderValue",!0),T("onHeaderEnd"),o=S.HEADER_VALUE_ALMOST_DONE);break;case S.HEADER_VALUE_ALMOST_DONE:if(r!==LF)return;o=S.HEADER_FIELD_START;break;case S.HEADERS_ALMOST_DONE:if(r!==LF)return;T("onHeadersEnd"),o=S.PART_DATA_START;break;case S.PART_DATA_START:o=S.PART_DATA,u("onPartData");case S.PART_DATA:if(E=e,e===0){for(t+=m;t<O&&!(a[t]in H);)t+=b;t-=m,r=a[t]}if(e<h.length)h[e]===r?(e===0&&L("onPartData",!0),e++):e=0;else if(e===h.length)e++,r===CR?l|=F.PART_BOUNDARY:r===HYPHEN?l|=F.LAST_BOUNDARY:e=0;else if(e-1===h.length)if(l&F.PART_BOUNDARY){if(e=0,r===LF){l&=~F.PART_BOUNDARY,T("onPartEnd"),T("onPartBegin"),o=S.HEADER_FIELD_START;break}}else l&F.LAST_BOUNDARY&&r===HYPHEN?(T("onPartEnd"),o=S.END,l=0):e=0;if(e>0)d[e-1]=r;else if(E>0){const D=new Uint8Array(d.buffer,d.byteOffset,d.byteLength);T("onPartData",0,E,D),E=0,u("onPartData"),t--}break;case S.END:break;default:throw new Error(`Unexpected state entered: ${o}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=e,this.state=o,this.flags=l}end(){if(this.state===S.HEADER_FIELD_START&&this.index===0||this.state===S.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==S.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}function _fileName(_){const a=_.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!a)return;const t=a[2]||a[3]||"";let n=t.slice(t.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(E,d)=>String.fromCharCode(d)),n}c(_fileName,"_fileName");async function toFormData(_,a){if(!/multipart/i.test(a))throw new TypeError("Failed to fetch");const t=a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");const n=new MultipartParser(t[1]||t[2]);let E,d,h,H,e,o;const l=[],b=new node.FormData,m=c(i=>{h+=u.decode(i,{stream:!0})},"onPartData"),O=c(i=>{l.push(i)},"appendToFile"),r=c(()=>{const i=new node.File(l,o,{type:e});b.append(H,i)},"appendFileToFormData"),P=c(()=>{b.append(H,h)},"appendEntryToFormData"),u=new TextDecoder("utf-8");u.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=P,E="",d="",h="",H="",e="",o=null,l.length=0},n.onHeaderField=function(i){E+=u.decode(i,{stream:!0})},n.onHeaderValue=function(i){d+=u.decode(i,{stream:!0})},n.onHeaderEnd=function(){if(d+=u.decode(),E=E.toLowerCase(),E==="content-disposition"){const i=d.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);i&&(H=i[2]||i[3]||""),o=_fileName(d),o&&(n.onPartData=O,n.onPartEnd=r)}else E==="content-type"&&(e=d);d="",E=""};for await(const i of _)n.write(i);return n.end(),b}c(toFormData,"toFormData"),exports.toFormData=toFormData;
|
2
node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs
generated
vendored
Normal file
2
node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var U=Object.defineProperty;var E=(_,o)=>U(_,"name",{value:o,configurable:!0});import"node:fs";import"node:path";import{FormData as w,File as B}from"../node.mjs";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"../shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";let D=0;const t={START_BOUNDARY:D++,HEADER_FIELD_START:D++,HEADER_FIELD:D++,HEADER_VALUE_START:D++,HEADER_VALUE:D++,HEADER_VALUE_ALMOST_DONE:D++,HEADERS_ALMOST_DONE:D++,PART_DATA_START:D++,PART_DATA:D++,END:D++};let F=1;const u={PART_BOUNDARY:F,LAST_BOUNDARY:F*=2},g=10,N=13,V=32,S=45,Y=58,x=97,C=122,I=E(_=>_|32,"lower"),p=E(()=>{},"noop");class M{static{E(this,"MultipartParser")}constructor(o){this.index=0,this.flags=0,this.onHeaderEnd=p,this.onHeaderField=p,this.onHeadersEnd=p,this.onHeaderValue=p,this.onPartBegin=p,this.onPartData=p,this.onPartEnd=p,this.boundaryChars={},o=`\r
|
||||
--`+o;const n=new Uint8Array(o.length);for(let r=0;r<o.length;r++)n[r]=o.charCodeAt(r),this.boundaryChars[n[r]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=t.START_BOUNDARY}write(o){let n=0;const r=o.length;let d=this.index,{lookbehind:l,boundary:c,boundaryChars:m,index:e,state:i,flags:A}=this;const H=this.boundary.length,O=H-1,y=o.length;let a,L;const f=E(h=>{this[h+"Mark"]=n},"mark"),s=E(h=>{delete this[h+"Mark"]},"clear"),T=E((h,P,R,k)=>{(P===void 0||P!==R)&&this[h](k&&k.subarray(P,R))},"callback"),b=E((h,P)=>{const R=h+"Mark";R in this&&(P?(T(h,this[R],n,o),delete this[R]):(T(h,this[R],o.length,o),this[R]=0))},"dataCallback");for(n=0;n<r;n++)switch(a=o[n],i){case t.START_BOUNDARY:if(e===c.length-2){if(a===S)A|=u.LAST_BOUNDARY;else if(a!==N)return;e++;break}else if(e-1===c.length-2){if(A&u.LAST_BOUNDARY&&a===S)i=t.END,A=0;else if(!(A&u.LAST_BOUNDARY)&&a===g)e=0,T("onPartBegin"),i=t.HEADER_FIELD_START;else return;break}a!==c[e+2]&&(e=-2),a===c[e+2]&&e++;break;case t.HEADER_FIELD_START:i=t.HEADER_FIELD,f("onHeaderField"),e=0;case t.HEADER_FIELD:if(a===N){s("onHeaderField"),i=t.HEADERS_ALMOST_DONE;break}if(e++,a===S)break;if(a===Y){if(e===1)return;b("onHeaderField",!0),i=t.HEADER_VALUE_START;break}if(L=I(a),L<x||L>C)return;break;case t.HEADER_VALUE_START:if(a===V)break;f("onHeaderValue"),i=t.HEADER_VALUE;case t.HEADER_VALUE:a===N&&(b("onHeaderValue",!0),T("onHeaderEnd"),i=t.HEADER_VALUE_ALMOST_DONE);break;case t.HEADER_VALUE_ALMOST_DONE:if(a!==g)return;i=t.HEADER_FIELD_START;break;case t.HEADERS_ALMOST_DONE:if(a!==g)return;T("onHeadersEnd"),i=t.PART_DATA_START;break;case t.PART_DATA_START:i=t.PART_DATA,f("onPartData");case t.PART_DATA:if(d=e,e===0){for(n+=O;n<y&&!(o[n]in m);)n+=H;n-=O,a=o[n]}if(e<c.length)c[e]===a?(e===0&&b("onPartData",!0),e++):e=0;else if(e===c.length)e++,a===N?A|=u.PART_BOUNDARY:a===S?A|=u.LAST_BOUNDARY:e=0;else if(e-1===c.length)if(A&u.PART_BOUNDARY){if(e=0,a===g){A&=~u.PART_BOUNDARY,T("onPartEnd"),T("onPartBegin"),i=t.HEADER_FIELD_START;break}}else A&u.LAST_BOUNDARY&&a===S?(T("onPartEnd"),i=t.END,A=0):e=0;if(e>0)l[e-1]=a;else if(d>0){const h=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);T("onPartData",0,d,h),d=0,f("onPartData"),n--}break;case t.END:break;default:throw new Error(`Unexpected state entered: ${i}`)}b("onHeaderField"),b("onHeaderValue"),b("onPartData"),this.index=e,this.state=i,this.flags=A}end(){if(this.state===t.HEADER_FIELD_START&&this.index===0||this.state===t.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==t.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}function $(_){const o=_.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!o)return;const n=o[2]||o[3]||"";let r=n.slice(n.lastIndexOf("\\")+1);return r=r.replace(/%22/g,'"'),r=r.replace(/&#(\d{4});/g,(d,l)=>String.fromCharCode(l)),r}E($,"_fileName");async function v(_,o){if(!/multipart/i.test(o))throw new TypeError("Failed to fetch");const n=o.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");const r=new M(n[1]||n[2]);let d,l,c,m,e,i;const A=[],H=new w,O=E(s=>{c+=f.decode(s,{stream:!0})},"onPartData"),y=E(s=>{A.push(s)},"appendToFile"),a=E(()=>{const s=new B(A,i,{type:e});H.append(m,s)},"appendFileToFormData"),L=E(()=>{H.append(m,c)},"appendEntryToFormData"),f=new TextDecoder("utf-8");f.decode(),r.onPartBegin=function(){r.onPartData=O,r.onPartEnd=L,d="",l="",c="",m="",e="",i=null,A.length=0},r.onHeaderField=function(s){d+=f.decode(s,{stream:!0})},r.onHeaderValue=function(s){l+=f.decode(s,{stream:!0})},r.onHeaderEnd=function(){if(l+=f.decode(),d=d.toLowerCase(),d==="content-disposition"){const s=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);s&&(m=s[2]||s[3]||""),i=$(l),i&&(r.onPartData=y,r.onPartEnd=a)}else d==="content-type"&&(e=l);l="",d=""};for await(const s of _)r.write(s);return r.end(),H}E(v,"toFormData");export{v as toFormData};
|
1
node_modules/node-fetch-native/dist/index.cjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/index.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const node=require("./node.cjs");require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("./shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net"),require("node:fs"),require("node:path");const o=!!globalThis.process?.env?.FORCE_NODE_FETCH,fetch=!o&&globalThis.fetch||node.fetch,Blob=!o&&globalThis.Blob||node.Blob,File=!o&&globalThis.File||node.File,FormData=!o&&globalThis.FormData||node.FormData,Headers=!o&&globalThis.Headers||node.Headers,Request=!o&&globalThis.Request||node.Request,Response=!o&&globalThis.Response||node.Response,AbortController=!o&&globalThis.AbortController||node.AbortController;exports.AbortError=node.AbortError,exports.FetchError=node.FetchError,exports.blobFrom=node.blobFrom,exports.blobFromSync=node.blobFromSync,exports.fileFrom=node.fileFrom,exports.fileFromSync=node.fileFromSync,exports.isRedirect=node.isRedirect,exports.AbortController=AbortController,exports.Blob=Blob,exports.File=File,exports.FormData=FormData,exports.Headers=Headers,exports.Request=Request,exports.Response=Response,exports.default=fetch,exports.fetch=fetch;
|
1
node_modules/node-fetch-native/dist/index.mjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{fetch as e,Blob as t,File as s,FormData as l,Headers as a,Request as i,Response as b,AbortController as m}from"./node.mjs";export{AbortError,FetchError,blobFrom,blobFromSync,fileFrom,fileFromSync,isRedirect}from"./node.mjs";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"./shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";import"node:fs";import"node:path";const o=!!globalThis.process?.env?.FORCE_NODE_FETCH,r=!o&&globalThis.fetch||e,p=!o&&globalThis.Blob||t,F=!o&&globalThis.File||s,h=!o&&globalThis.FormData||l,n=!o&&globalThis.Headers||a,c=!o&&globalThis.Request||i,R=!o&&globalThis.Response||b,T=!o&&globalThis.AbortController||m;export{T as AbortController,p as Blob,F as File,h as FormData,n as Headers,c as Request,R as Response,r as default,r as fetch};
|
1
node_modules/node-fetch-native/dist/native.cjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/native.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Blob=globalThis.Blob,File=globalThis.File,FormData=globalThis.FormData,Headers=globalThis.Headers,Request=globalThis.Request,Response=globalThis.Response,AbortController=globalThis.AbortController,fetch=globalThis.fetch||(()=>{throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")});exports.AbortController=AbortController,exports.Blob=Blob,exports.File=File,exports.FormData=FormData,exports.Headers=Headers,exports.Request=Request,exports.Response=Response,exports.default=fetch,exports.fetch=fetch;
|
1
node_modules/node-fetch-native/dist/native.mjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/native.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
const e=globalThis.Blob,o=globalThis.File,a=globalThis.FormData,s=globalThis.Headers,t=globalThis.Request,h=globalThis.Response,i=globalThis.AbortController,l=globalThis.fetch||(()=>{throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")});export{i as AbortController,e as Blob,o as File,a as FormData,s as Headers,t as Request,h as Response,l as default,l as fetch};
|
19
node_modules/node-fetch-native/dist/node.cjs
generated
vendored
Normal file
19
node_modules/node-fetch-native/dist/node.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
19
node_modules/node-fetch-native/dist/node.mjs
generated
vendored
Normal file
19
node_modules/node-fetch-native/dist/node.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/node-fetch-native/dist/polyfill.cjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/polyfill.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var n=Object.defineProperty;var i=(r,o)=>n(r,"name",{value:o,configurable:!0});const node=require("./node.cjs");require("node:fs"),require("node:path"),require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("./shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net");var t=Object.defineProperty,a=i((r,o)=>t(r,"name",{value:o,configurable:!0}),"a");function e(r,o){if(!(r in globalThis))try{globalThis[r]=o}catch{}}i(e,"e"),a(e,"polyfill"),e("fetch",node.fetch),e("Blob",node.Blob),e("File",node.File),e("FormData",node.FormData),e("Headers",node.Headers),e("Request",node.Request),e("Response",node.Response),e("AbortController",node.AbortController);
|
1
node_modules/node-fetch-native/dist/polyfill.mjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/polyfill.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var i=Object.defineProperty;var e=(r,t)=>i(r,"name",{value:t,configurable:!0});import{fetch as l,Blob as m,File as p,FormData as a,Headers as n,Request as s,Response as b,AbortController as f}from"./node.mjs";import"node:fs";import"node:path";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"./shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";var c=Object.defineProperty,u=e((r,t)=>c(r,"name",{value:t,configurable:!0}),"a");function o(r,t){if(!(r in globalThis))try{globalThis[r]=t}catch{}}e(o,"e"),u(o,"polyfill"),o("fetch",l),o("Blob",m),o("File",p),o("FormData",a),o("Headers",n),o("Request",s),o("Response",b),o("AbortController",f);
|
1
node_modules/node-fetch-native/dist/proxy-stub.cjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/proxy-stub.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var n=Object.defineProperty;var t=(c,a)=>n(c,"name",{value:a,configurable:!0});var r=Object.defineProperty,e=t((c,a)=>r(c,"name",{value:a,configurable:!0}),"e");function createProxy(){return{agent:void 0,dispatcher:void 0}}t(createProxy,"createProxy"),e(createProxy,"createProxy");function createFetch(){return globalThis.fetch}t(createFetch,"createFetch"),e(createFetch,"createFetch");const fetch=globalThis.fetch;exports.createFetch=createFetch,exports.createProxy=createProxy,exports.fetch=fetch;
|
1
node_modules/node-fetch-native/dist/proxy-stub.mjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/proxy-stub.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o=Object.defineProperty;var e=(t,r)=>o(t,"name",{value:r,configurable:!0});var f=Object.defineProperty,c=e((t,r)=>f(t,"name",{value:r,configurable:!0}),"e");function n(){return{agent:void 0,dispatcher:void 0}}e(n,"createProxy"),c(n,"createProxy");function a(){return globalThis.fetch}e(a,"createFetch"),c(a,"createFetch");const i=globalThis.fetch;export{a as createFetch,n as createProxy,i as fetch};
|
57
node_modules/node-fetch-native/dist/proxy.cjs
generated
vendored
Normal file
57
node_modules/node-fetch-native/dist/proxy.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var t=Object.defineProperty;var o=(e,l)=>t(e,"name",{value:l,configurable:!0});var n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}o(f,"getDefaultExportFromCjs");export{n as c,f as g};
|
1
node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
generated
vendored
Normal file
1
node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var l=Object.defineProperty;var o=(e,t)=>l(e,"name",{value:t,configurable:!0});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}o(getDefaultExportFromCjs,"getDefaultExportFromCjs"),exports.commonjsGlobal=commonjsGlobal,exports.getDefaultExportFromCjs=getDefaultExportFromCjs;
|
1
node_modules/node-fetch-native/index.d.ts
generated
vendored
Normal file
1
node_modules/node-fetch-native/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./lib/index";
|
0
node_modules/node-fetch-native/lib/empty.cjs
generated
vendored
Normal file
0
node_modules/node-fetch-native/lib/empty.cjs
generated
vendored
Normal file
0
node_modules/node-fetch-native/lib/empty.mjs
generated
vendored
Normal file
0
node_modules/node-fetch-native/lib/empty.mjs
generated
vendored
Normal file
11
node_modules/node-fetch-native/lib/index.cjs
generated
vendored
Normal file
11
node_modules/node-fetch-native/lib/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
const nodeFetch = require("../dist/index.cjs");
|
||||
|
||||
function fetch(input, options) {
|
||||
return nodeFetch.fetch(input, options);
|
||||
}
|
||||
|
||||
for (const key in nodeFetch) {
|
||||
fetch[key] = nodeFetch[key];
|
||||
}
|
||||
|
||||
module.exports = fetch;
|
10
node_modules/node-fetch-native/lib/index.d.cts
generated
vendored
Normal file
10
node_modules/node-fetch-native/lib/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const fetch: typeof globalThis.fetch;
|
||||
export declare const Blob: typeof globalThis.Blob;
|
||||
export declare const File: typeof globalThis.File;
|
||||
export declare const FormData: typeof globalThis.FormData;
|
||||
export declare const Headers: typeof globalThis.Headers;
|
||||
export declare const Request: typeof globalThis.Request;
|
||||
export declare const Response: typeof globalThis.Response;
|
||||
export declare const AbortController: typeof globalThis.AbortController;
|
||||
|
||||
export default fetch;
|
10
node_modules/node-fetch-native/lib/index.d.mts
generated
vendored
Normal file
10
node_modules/node-fetch-native/lib/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const fetch: typeof globalThis.fetch;
|
||||
export declare const Blob: typeof globalThis.Blob;
|
||||
export declare const File: typeof globalThis.File;
|
||||
export declare const FormData: typeof globalThis.FormData;
|
||||
export declare const Headers: typeof globalThis.Headers;
|
||||
export declare const Request: typeof globalThis.Request;
|
||||
export declare const Response: typeof globalThis.Response;
|
||||
export declare const AbortController: typeof globalThis.AbortController;
|
||||
|
||||
export default fetch;
|
10
node_modules/node-fetch-native/lib/index.d.ts
generated
vendored
Normal file
10
node_modules/node-fetch-native/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const fetch: typeof globalThis.fetch;
|
||||
export declare const Blob: typeof globalThis.Blob;
|
||||
export declare const File: typeof globalThis.File;
|
||||
export declare const FormData: typeof globalThis.FormData;
|
||||
export declare const Headers: typeof globalThis.Headers;
|
||||
export declare const Request: typeof globalThis.Request;
|
||||
export declare const Response: typeof globalThis.Response;
|
||||
export declare const AbortController: typeof globalThis.AbortController;
|
||||
|
||||
export default fetch;
|
11
node_modules/node-fetch-native/lib/native.cjs
generated
vendored
Normal file
11
node_modules/node-fetch-native/lib/native.cjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
const nodeFetch = require("../dist/native.cjs");
|
||||
|
||||
function fetch(input, options) {
|
||||
return nodeFetch.fetch(input, options);
|
||||
}
|
||||
|
||||
for (const key in nodeFetch) {
|
||||
fetch[key] = nodeFetch[key];
|
||||
}
|
||||
|
||||
module.exports = fetch;
|
1
node_modules/node-fetch-native/lib/polyfill.d.cts
generated
vendored
Normal file
1
node_modules/node-fetch-native/lib/polyfill.d.cts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/node-fetch-native/lib/polyfill.d.mts
generated
vendored
Normal file
1
node_modules/node-fetch-native/lib/polyfill.d.mts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/node-fetch-native/lib/polyfill.d.ts
generated
vendored
Normal file
1
node_modules/node-fetch-native/lib/polyfill.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
32
node_modules/node-fetch-native/lib/proxy.d.ts
generated
vendored
Normal file
32
node_modules/node-fetch-native/lib/proxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import type * as http from "node:http";
|
||||
import type * as https from "node:https";
|
||||
import type * as undici from "undici";
|
||||
|
||||
export type ProxyOptions = {
|
||||
/**
|
||||
* HTTP(s) Proxy URL
|
||||
*
|
||||
* Default is read from `https_proxy`, `http_proxy`, `HTTPS_PROXY` or `HTTP_PROXY` environment variables
|
||||
* */
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* List of hosts to skip proxy for (comma separated or array of strings)
|
||||
*
|
||||
* Default is read from `no_proxy` or `NO_PROXY` environment variables
|
||||
*
|
||||
* Hots starting with a leading dot, like `.foo.com` are also matched against domain and all its subdomains like `bar.foo.com`
|
||||
*/
|
||||
noProxy?: string | string[];
|
||||
};
|
||||
|
||||
export declare const createProxy: (opts?: ProxyOptions) => {
|
||||
agent: http.Agent | https.Agent | undefined;
|
||||
dispatcher: undici.Dispatcher | undefined;
|
||||
};
|
||||
|
||||
export declare const createFetch: (
|
||||
proxyOptions?: ProxyOptions,
|
||||
) => typeof globalThis.fetch;
|
||||
|
||||
export declare const fetch: typeof globalThis.fetch;
|
1
node_modules/node-fetch-native/node.d.ts
generated
vendored
Normal file
1
node_modules/node-fetch-native/node.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./lib/index";
|
138
node_modules/node-fetch-native/package.json
generated
vendored
Normal file
138
node_modules/node-fetch-native/package.json
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"name": "node-fetch-native",
|
||||
"version": "1.6.6",
|
||||
"description": "better fetch for Node.js. Works on any JavaScript runtime!",
|
||||
"repository": "unjs/node-fetch-native",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"browser": "./dist/native.mjs",
|
||||
"bun": "./dist/native.mjs",
|
||||
"deno": "./dist/native.mjs",
|
||||
"edge-light": "./dist/native.mjs",
|
||||
"edge-routine": "./dist/native.mjs",
|
||||
"lagon": "./dist/native.mjs",
|
||||
"netlify": "./dist/native.mjs",
|
||||
"react-native": "./dist/native.mjs",
|
||||
"wintercg": "./dist/native.mjs",
|
||||
"worker": "./dist/native.mjs",
|
||||
"workerd": "./dist/native.mjs",
|
||||
"node": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/index.d.cts",
|
||||
"default": "./lib/index.cjs"
|
||||
}
|
||||
},
|
||||
"types": "./lib/index.d.mts",
|
||||
"import": "./dist/native.mjs",
|
||||
"require": "./dist/native.cjs",
|
||||
"default": "./dist/native.mjs"
|
||||
},
|
||||
"./polyfill": {
|
||||
"node": {
|
||||
"import": {
|
||||
"types": "./lib/polyfill.d.mts",
|
||||
"default": "./dist/polyfill.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/polyfill.d.cts",
|
||||
"default": "./dist/polyfill.cjs"
|
||||
}
|
||||
},
|
||||
"types": "./lib/polyfill.d.mts",
|
||||
"import": "./lib/empty.mjs",
|
||||
"require": "./lib/empty.cjs",
|
||||
"default": "./lib/empty.mjs"
|
||||
},
|
||||
"./node": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.mts",
|
||||
"default": "./dist/node.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/index.d.cts",
|
||||
"default": "./dist/node.cjs"
|
||||
}
|
||||
},
|
||||
"./native": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.mts",
|
||||
"default": "./dist/native.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/index.d.cts",
|
||||
"default": "./lib/native.cjs"
|
||||
}
|
||||
},
|
||||
"./src/index.js": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/index.d.cts",
|
||||
"default": "./lib/index.cjs"
|
||||
}
|
||||
},
|
||||
"./proxy": {
|
||||
"node": {
|
||||
"types": "./lib/proxy.d.ts",
|
||||
"default": "./dist/proxy.cjs"
|
||||
},
|
||||
"default": {
|
||||
"import": {
|
||||
"types": "./lib/proxy.d.ts",
|
||||
"default": "./dist/proxy-stub.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./lib/proxy.d.ts",
|
||||
"default": "./dist/proxy-stub.cjs"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"react-native": "./dist/native.mjs",
|
||||
"types": "./lib/index.d.mts",
|
||||
"files": [
|
||||
"dist",
|
||||
"lib",
|
||||
"index.d.ts",
|
||||
"node.d.ts",
|
||||
"polyfill.d.ts",
|
||||
"proxy.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"lint": "eslint . && prettier -c src test lib",
|
||||
"lint:fix": "eslint --fix . && prettier -w src test lib",
|
||||
"prepack": "unbuild",
|
||||
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
|
||||
"test": "pnpm lint && pnpm build && vitest run --coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.7",
|
||||
"@vitest/coverage-v8": "^3.0.2",
|
||||
"abort-controller": "^3.0.0",
|
||||
"agent-base": "^7.1.3",
|
||||
"changelogen": "^0.5.7",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-unjs": "^0.4.2",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"https-proxy-agent": "^7.0.6",
|
||||
"node-fetch": "^3.3.2",
|
||||
"prettier": "^3.4.2",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"typescript": "^5.7.3",
|
||||
"unbuild": "^3.3.1",
|
||||
"undici": "^6.21.1",
|
||||
"vitest": "^3.0.2"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.4"
|
||||
}
|
1
node_modules/node-fetch-native/polyfill.d.ts
generated
vendored
Normal file
1
node_modules/node-fetch-native/polyfill.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/node-fetch-native/proxy.d.ts
generated
vendored
Normal file
1
node_modules/node-fetch-native/proxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./lib/proxy";
|
Reference in New Issue
Block a user