@verdaccio/proxy 6.0.0-6-next.20 → 6.0.0-6-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/build/agent.d.ts +17 -0
- package/build/agent.js +63 -0
- package/build/agent.js.map +1 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/proxy-utils.js.map +1 -1
- package/build/{up-storage.d.ts → proxy.d.ts} +28 -54
- package/build/proxy.js +565 -0
- package/build/proxy.js.map +1 -0
- package/jest.config.js +4 -5
- package/package.json +66 -67
- package/src/agent.ts +54 -0
- package/src/index.ts +1 -1
- package/src/{up-storage.ts → proxy.ts} +248 -352
- package/test/headers.auth.spec.ts +15 -18
- package/test/noProxy.spec.ts +215 -76
- package/test/partials/ssl-cert-snakeoil.key +15 -0
- package/test/partials/ssl-cert-snakeoil.pem +12 -0
- package/test/proxy.error.___.ts +126 -0
- package/test/proxy.metadata.spec.ts +354 -0
- package/test/proxy.search.spec.ts +1 -7
- package/test/proxy.tarball.spec.ts +142 -204
- package/tsconfig.json +0 -6
- package/build/up-storage.js +0 -691
- package/build/up-storage.js.map +0 -1
- package/test/proxy.error.spec.ts +0 -126
- package/test/proxy.metadata.ts +0 -133
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @verdaccio/proxy
|
|
2
2
|
|
|
3
|
+
## 6.0.0-6-next.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 351aeeaa: fix(deps): @verdaccio/utils should be a prod dep of local-storage
|
|
8
|
+
- Updated dependencies [351aeeaa]
|
|
9
|
+
- @verdaccio/core@6.0.0-6-next.7
|
|
10
|
+
- @verdaccio/logger@6.0.0-6-next.13
|
|
11
|
+
- @verdaccio/local-storage@11.0.0-6-next.15
|
|
12
|
+
- @verdaccio/config@6.0.0-6-next.16
|
|
13
|
+
- @verdaccio/utils@6.0.0-6-next.13
|
|
14
|
+
|
|
15
|
+
## 6.0.0-6-next.22
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [37274e4c]
|
|
20
|
+
- @verdaccio/local-storage@11.0.0-6-next.14
|
|
21
|
+
- @verdaccio/core@6.0.0-6-next.6
|
|
22
|
+
- @verdaccio/logger@6.0.0-6-next.12
|
|
23
|
+
|
|
24
|
+
## 6.0.0-6-next.21
|
|
25
|
+
|
|
26
|
+
### Major Changes
|
|
27
|
+
|
|
28
|
+
- 292c0a37: feat!: replace deprecated request dependency by got
|
|
29
|
+
|
|
30
|
+
This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
|
|
35
|
+
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
|
|
36
|
+
- Refactor with promises instead callback wherever is possible
|
|
37
|
+
- ~Document the API~
|
|
38
|
+
- Improve testing, integration tests
|
|
39
|
+
- Bugfix
|
|
40
|
+
- Clean up old validations
|
|
41
|
+
- Improve performance
|
|
42
|
+
|
|
43
|
+
## 💥 Breaking changes
|
|
44
|
+
|
|
45
|
+
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
|
|
46
|
+
- Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
|
|
47
|
+
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
|
|
48
|
+
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [292c0a37]
|
|
53
|
+
- Updated dependencies [a3a209b5]
|
|
54
|
+
- Updated dependencies [00d1d2a1]
|
|
55
|
+
- @verdaccio/config@6.0.0-6-next.15
|
|
56
|
+
- @verdaccio/core@6.0.0-6-next.6
|
|
57
|
+
- @verdaccio/logger@6.0.0-6-next.12
|
|
58
|
+
- @verdaccio/local-storage@11.0.0-6-next.13
|
|
59
|
+
- @verdaccio/utils@6.0.0-6-next.12
|
|
60
|
+
|
|
3
61
|
## 6.0.0-6-next.20
|
|
4
62
|
|
|
5
63
|
### Patch Changes
|
package/build/agent.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { Agents } from 'got';
|
|
4
|
+
import { AgentOptions as HttpAgentOptions } from 'http';
|
|
5
|
+
import { AgentOptions as HttpsAgentOptions } from 'https';
|
|
6
|
+
export declare type AgentOptionsConf = HttpAgentOptions | HttpsAgentOptions;
|
|
7
|
+
declare class CustomAgents {
|
|
8
|
+
private url;
|
|
9
|
+
private proxy;
|
|
10
|
+
private agentOptions;
|
|
11
|
+
private agent;
|
|
12
|
+
constructor(url: string, proxy: string | undefined, agentOptions: HttpAgentOptions | HttpsAgentOptions);
|
|
13
|
+
get(): Agents;
|
|
14
|
+
private getAgent;
|
|
15
|
+
private getParsedUrl;
|
|
16
|
+
}
|
|
17
|
+
export default CustomAgents;
|
package/build/agent.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _hpagent = require("hpagent");
|
|
9
|
+
|
|
10
|
+
var _http = require("http");
|
|
11
|
+
|
|
12
|
+
var _https = require("https");
|
|
13
|
+
|
|
14
|
+
var _url = require("url");
|
|
15
|
+
|
|
16
|
+
class CustomAgents {
|
|
17
|
+
constructor(url, proxy, agentOptions) {
|
|
18
|
+
this.proxy = proxy;
|
|
19
|
+
this.url = url;
|
|
20
|
+
this.agentOptions = agentOptions;
|
|
21
|
+
const {
|
|
22
|
+
protocol
|
|
23
|
+
} = this.getParsedUrl();
|
|
24
|
+
this.agent = this.getAgent(protocol);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get() {
|
|
28
|
+
return this.agent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getAgent(protocol) {
|
|
32
|
+
const isHTTPS = protocol === 'https:';
|
|
33
|
+
|
|
34
|
+
if (this.proxy) {
|
|
35
|
+
const options = {
|
|
36
|
+
proxy: this.proxy,
|
|
37
|
+
...this.agentOptions
|
|
38
|
+
}; // use hpagent
|
|
39
|
+
|
|
40
|
+
return isHTTPS ? {
|
|
41
|
+
https: new _hpagent.HttpsProxyAgent(options)
|
|
42
|
+
} : {
|
|
43
|
+
http: new _hpagent.HttpProxyAgent(options)
|
|
44
|
+
};
|
|
45
|
+
} else {
|
|
46
|
+
// use native http/https agent
|
|
47
|
+
return isHTTPS ? {
|
|
48
|
+
https: new _https.Agent(this.agentOptions)
|
|
49
|
+
} : {
|
|
50
|
+
http: new _http.Agent(this.agentOptions)
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
getParsedUrl() {
|
|
56
|
+
return this.proxy ? new _url.URL(this.proxy) : new _url.URL(this.url);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var _default = CustomAgents;
|
|
62
|
+
exports.default = _default;
|
|
63
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","names":["CustomAgents","constructor","url","proxy","agentOptions","protocol","getParsedUrl","agent","getAgent","get","isHTTPS","options","https","HttpsProxyAgent","http","HttpProxyAgent","HttpsAgent","HttpAgent","URL"],"sources":["../src/agent.ts"],"sourcesContent":["import { Agents } from 'got';\nimport { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';\nimport { Agent as HttpAgent, AgentOptions as HttpAgentOptions } from 'http';\nimport { Agent as HttpsAgent, AgentOptions as HttpsAgentOptions } from 'https';\nimport { URL } from 'url';\n\nexport type AgentOptionsConf = HttpAgentOptions | HttpsAgentOptions;\n\nclass CustomAgents {\n private url: string;\n private proxy: string | undefined;\n private agentOptions: HttpAgentOptions | HttpsAgentOptions;\n private agent: Agents;\n public constructor(\n url: string,\n proxy: string | undefined,\n agentOptions: HttpAgentOptions | HttpsAgentOptions\n ) {\n this.proxy = proxy;\n this.url = url;\n this.agentOptions = agentOptions;\n const { protocol } = this.getParsedUrl();\n this.agent = this.getAgent(protocol);\n }\n\n public get() {\n return this.agent;\n }\n\n private getAgent(protocol: string): Agents {\n const isHTTPS = protocol === 'https:';\n if (this.proxy) {\n const options = {\n proxy: this.proxy,\n ...this.agentOptions,\n };\n // use hpagent\n return isHTTPS\n ? { https: new HttpsProxyAgent(options) }\n : { http: new HttpProxyAgent(options) };\n } else {\n // use native http/https agent\n return isHTTPS\n ? { https: new HttpsAgent(this.agentOptions) }\n : { http: new HttpAgent(this.agentOptions) };\n }\n }\n\n private getParsedUrl() {\n return this.proxy ? new URL(this.proxy) : new URL(this.url);\n }\n}\n\nexport default CustomAgents;\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AACA;;AAIA,MAAMA,YAAN,CAAmB;EAKVC,WAAW,CAChBC,GADgB,EAEhBC,KAFgB,EAGhBC,YAHgB,EAIhB;IACA,KAAKD,KAAL,GAAaA,KAAb;IACA,KAAKD,GAAL,GAAWA,GAAX;IACA,KAAKE,YAAL,GAAoBA,YAApB;IACA,MAAM;MAAEC;IAAF,IAAe,KAAKC,YAAL,EAArB;IACA,KAAKC,KAAL,GAAa,KAAKC,QAAL,CAAcH,QAAd,CAAb;EACD;;EAEMI,GAAG,GAAG;IACX,OAAO,KAAKF,KAAZ;EACD;;EAEOC,QAAQ,CAACH,QAAD,EAA2B;IACzC,MAAMK,OAAO,GAAGL,QAAQ,KAAK,QAA7B;;IACA,IAAI,KAAKF,KAAT,EAAgB;MACd,MAAMQ,OAAO,GAAG;QACdR,KAAK,EAAE,KAAKA,KADE;QAEd,GAAG,KAAKC;MAFM,CAAhB,CADc,CAKd;;MACA,OAAOM,OAAO,GACV;QAAEE,KAAK,EAAE,IAAIC,wBAAJ,CAAoBF,OAApB;MAAT,CADU,GAEV;QAAEG,IAAI,EAAE,IAAIC,uBAAJ,CAAmBJ,OAAnB;MAAR,CAFJ;IAGD,CATD,MASO;MACL;MACA,OAAOD,OAAO,GACV;QAAEE,KAAK,EAAE,IAAII,YAAJ,CAAe,KAAKZ,YAApB;MAAT,CADU,GAEV;QAAEU,IAAI,EAAE,IAAIG,WAAJ,CAAc,KAAKb,YAAnB;MAAR,CAFJ;IAGD;EACF;;EAEOE,YAAY,GAAG;IACrB,OAAO,KAAKH,KAAL,GAAa,IAAIe,QAAJ,CAAQ,KAAKf,KAAb,CAAb,GAAmC,IAAIe,QAAJ,CAAQ,KAAKhB,GAAb,CAA1C;EACD;;AA1CgB;;eA6CJF,Y"}
|
package/build/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './proxy';
|
package/build/index.js
CHANGED
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _proxy = require("./proxy");
|
|
8
8
|
|
|
9
|
-
Object.keys(
|
|
9
|
+
Object.keys(_proxy).forEach(function (key) {
|
|
10
10
|
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] ===
|
|
11
|
+
if (key in exports && exports[key] === _proxy[key]) return;
|
|
12
12
|
Object.defineProperty(exports, key, {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _proxy[key];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
});
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './proxy';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/build/proxy-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"proxy-utils.js","names":["parseIntervalTable","ms","s","m","h","d","w","M","y","parseInterval","interval","result","last_suffix","Infinity","split","forEach","x","match","Error","Number"],"sources":["../src/proxy-utils.ts"],"sourcesContent":["const parseIntervalTable = {\n '': 1000,\n ms: 1,\n s: 1000,\n m: 60 * 1000,\n h: 60 * 60 * 1000,\n d: 86400000,\n w: 7 * 86400000,\n M: 30 * 86400000,\n y: 365 * 86400000,\n};\n\n/**\n * Parse an internal string to number\n * @param {*} interval\n * @return {Number}\n * @deprecated\n */\nexport function parseInterval(interval: any): number {\n if (typeof interval === 'number') {\n return interval * 1000;\n }\n let result = 0;\n let last_suffix = Infinity;\n interval.split(/\\s+/).forEach(function (x): void {\n if (!x) {\n return;\n }\n const m = x.match(/^((0|[1-9][0-9]*)(\\.[0-9]+)?)(ms|s|m|h|d|w|M|y|)$/);\n if (\n !m ||\n parseIntervalTable[m[4]] >= last_suffix ||\n (m[4] === '' && last_suffix !== Infinity)\n ) {\n throw Error('invalid interval: ' + interval);\n }\n last_suffix = parseIntervalTable[m[4]];\n result += Number(m[1]) * parseIntervalTable[m[4]];\n });\n return result;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,kBAAkB,GAAG;EACzB,IAAI,IADqB;EAEzBC,EAAE,EAAE,CAFqB;EAGzBC,CAAC,EAAE,IAHsB;EAIzBC,CAAC,EAAE,KAAK,IAJiB;EAKzBC,CAAC,EAAE,KAAK,EAAL,GAAU,IALY;EAMzBC,CAAC,EAAE,QANsB;EAOzBC,CAAC,EAAE,IAAI,QAPkB;EAQzBC,CAAC,EAAE,KAAK,QARiB;EASzBC,CAAC,EAAE,MAAM;AATgB,CAA3B;AAYA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,aAAT,CAAuBC,QAAvB,EAA8C;EACnD,IAAI,OAAOA,QAAP,KAAoB,QAAxB,EAAkC;IAChC,OAAOA,QAAQ,GAAG,IAAlB;EACD;;EACD,IAAIC,MAAM,GAAG,CAAb;EACA,IAAIC,WAAW,GAAGC,QAAlB;EACAH,QAAQ,CAACI,KAAT,CAAe,KAAf,EAAsBC,OAAtB,CAA8B,UAAUC,CAAV,EAAmB;IAC/C,IAAI,CAACA,CAAL,EAAQ;MACN;IACD;;IACD,MAAMb,CAAC,GAAGa,CAAC,CAACC,KAAF,CAAQ,mDAAR,CAAV;;IACA,IACE,CAACd,CAAD,IACAH,kBAAkB,CAACG,CAAC,CAAC,CAAD,CAAF,CAAlB,IAA4BS,WAD5B,IAECT,CAAC,CAAC,CAAD,CAAD,KAAS,EAAT,IAAeS,WAAW,KAAKC,QAHlC,EAIE;MACA,MAAMK,KAAK,CAAC,uBAAuBR,QAAxB,CAAX;IACD;;IACDE,WAAW,GAAGZ,kBAAkB,CAACG,CAAC,CAAC,CAAD,CAAF,CAAhC;IACAQ,MAAM,IAAIQ,MAAM,CAAChB,CAAC,CAAC,CAAD,CAAF,CAAN,GAAeH,kBAAkB,CAACG,CAAC,CAAC,CAAD,CAAF,CAA3C;EACD,CAdD;EAeA,OAAOQ,MAAP;AACD"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { Headers as gotHeaders } from 'got';
|
|
4
|
+
import type { Agents, Options } from 'got';
|
|
5
|
+
import Stream, { PassThrough } from 'stream';
|
|
3
6
|
import { Headers } from 'undici';
|
|
4
7
|
import { URL } from 'url';
|
|
5
8
|
import { searchUtils } from '@verdaccio/core';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
9
|
+
import { Manifest } from '@verdaccio/types';
|
|
10
|
+
import { Config, Logger, UpLinkConf } from '@verdaccio/types';
|
|
11
|
+
import { AgentOptionsConf } from './agent';
|
|
8
12
|
export declare type UpLinkConfLocal = UpLinkConf & {
|
|
9
13
|
no_proxy?: string;
|
|
10
14
|
};
|
|
@@ -30,9 +34,15 @@ export interface IProxy {
|
|
|
30
34
|
max_fails: number;
|
|
31
35
|
fail_timeout: number;
|
|
32
36
|
upname: string;
|
|
33
|
-
fetchTarball(url: string): IReadTarball;
|
|
34
37
|
search(options: ProxySearchParams): Promise<Stream.Readable>;
|
|
35
|
-
|
|
38
|
+
getRemoteMetadataNext(name: string, options: ISyncUplinksOptions): Promise<[Manifest, string]>;
|
|
39
|
+
fetchTarballNext(url: string, options: Pick<ISyncUplinksOptions, 'remoteAddress' | 'etag' | 'retry'>): PassThrough;
|
|
40
|
+
}
|
|
41
|
+
export { Options as FetchOptions };
|
|
42
|
+
export interface ISyncUplinksOptions extends Options {
|
|
43
|
+
uplinksLook?: boolean;
|
|
44
|
+
etag?: string;
|
|
45
|
+
remoteAddress?: string;
|
|
36
46
|
}
|
|
37
47
|
/**
|
|
38
48
|
* Implements Storage interface
|
|
@@ -50,38 +60,23 @@ declare class ProxyStorage implements IProxy {
|
|
|
50
60
|
timeout: number;
|
|
51
61
|
max_fails: number;
|
|
52
62
|
fail_timeout: number;
|
|
53
|
-
agent_options:
|
|
63
|
+
agent_options: AgentOptionsConf;
|
|
54
64
|
upname: string;
|
|
55
|
-
proxy:
|
|
65
|
+
proxy: string | undefined;
|
|
66
|
+
private agent;
|
|
56
67
|
last_request_time: number | null;
|
|
57
68
|
strict_ssl: boolean;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*/
|
|
63
|
-
constructor(config: UpLinkConfLocal, mainConfig: Config);
|
|
64
|
-
/**
|
|
65
|
-
* Fetch an asset.
|
|
66
|
-
* @param {*} options
|
|
67
|
-
* @param {*} cb
|
|
68
|
-
* @return {Request}
|
|
69
|
-
*/
|
|
70
|
-
private request;
|
|
71
|
-
/**
|
|
72
|
-
* Set default headers.
|
|
73
|
-
* @param {Object} options
|
|
74
|
-
* @return {Object}
|
|
75
|
-
* @private
|
|
76
|
-
*/
|
|
77
|
-
private _setHeaders;
|
|
69
|
+
private retry;
|
|
70
|
+
constructor(config: UpLinkConfLocal, mainConfig: Config, agent?: Agents);
|
|
71
|
+
private getAgent;
|
|
72
|
+
getHeadersNext(headers?: {}): gotHeaders;
|
|
78
73
|
/**
|
|
79
74
|
* Validate configuration auth and assign Header authorization
|
|
80
75
|
* @param {Object} headers
|
|
81
76
|
* @return {Object}
|
|
82
77
|
* @private
|
|
83
78
|
*/
|
|
84
|
-
private
|
|
79
|
+
private setAuthNext;
|
|
85
80
|
/**
|
|
86
81
|
* @param {string} message
|
|
87
82
|
* @throws {Error}
|
|
@@ -114,40 +109,19 @@ declare class ProxyStorage implements IProxy {
|
|
|
114
109
|
|
|
115
110
|
* @param {Object} headers
|
|
116
111
|
* @private
|
|
112
|
+
* @deprecated use applyUplinkHeaders
|
|
117
113
|
*/
|
|
118
114
|
private _overrideWithUpLinkConfLocaligHeaders;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
* @param {*} options request options, eg: eTag.
|
|
123
|
-
* @param {*} callback
|
|
124
|
-
*/
|
|
125
|
-
getRemoteMetadata(name: string, options: any, callback: Callback): void;
|
|
126
|
-
/**
|
|
127
|
-
* Fetch a tarball from the uplink.
|
|
128
|
-
* @param {String} url
|
|
129
|
-
* @return {Stream}
|
|
130
|
-
*/
|
|
131
|
-
fetchTarball(url: string): ReadTarball;
|
|
115
|
+
private applyUplinkHeaders;
|
|
116
|
+
getRemoteMetadataNext(name: string, options: ISyncUplinksOptions): Promise<[Manifest, string]>;
|
|
117
|
+
fetchTarballNext(url: string, overrideOptions: Pick<ISyncUplinksOptions, 'remoteAddress' | 'etag' | 'retry'>): any;
|
|
132
118
|
/**
|
|
133
119
|
* Perform a stream search.
|
|
134
120
|
* @param {*} options request options
|
|
135
121
|
* @return {Stream}
|
|
136
122
|
*/
|
|
137
123
|
search({ url, abort }: ProxySearchParams): Promise<Stream.Readable>;
|
|
138
|
-
|
|
139
|
-
* Add proxy headers.
|
|
140
|
-
* FIXME: object mutations, it should return an new object
|
|
141
|
-
* @param {*} req the http request
|
|
142
|
-
* @param {*} headers the request headers
|
|
143
|
-
*/
|
|
144
|
-
private _addProxyHeaders;
|
|
145
|
-
/**
|
|
146
|
-
* Check whether the remote host is available.
|
|
147
|
-
* @param {*} alive
|
|
148
|
-
* @return {Boolean}
|
|
149
|
-
*/
|
|
150
|
-
private _statusCheck;
|
|
124
|
+
private addProxyHeaders;
|
|
151
125
|
/**
|
|
152
126
|
* If the request failure.
|
|
153
127
|
* @return {boolean}
|