Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

urllib

Package Overview
Dependencies
Maintainers
13
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urllib - npm Package Compare versions

Comparing version 4.6.0 to 4.6.1

dist/commonjs/BaseAgent.d.ts

4

dist/commonjs/fetch.d.ts

@@ -1,2 +0,2 @@

import { RequestInfo, RequestInit, Response, Agent } from 'undici';
import { RequestInfo, RequestInit, Response, Agent, Dispatcher } from 'undici';
import { ClientOptions, PoolStat, UndiciTimingInfo } from './HttpClient.js';

@@ -18,3 +18,3 @@ import { FetchMeta } from './Request.js';

#private;
static getDispatcher(): Agent;
static getDispatcher(): Dispatcher.ComposedDispatcher;
static setDispatcher(dispatcher: Agent): void;

@@ -21,0 +21,0 @@ static setClientOptions(clientOptions: ClientOptions): void;

@@ -20,3 +20,3 @@ "use strict";

const symbols_js_2 = __importDefault(require("./symbols.js"));
const FetchOpaqueInterceptor_js_1 = require("./FetchOpaqueInterceptor.js");
const BaseAgent_js_1 = require("./BaseAgent.js");
class FetchFactory {

@@ -33,12 +33,5 @@ static #dispatcher;

let dispatcherOption = {
interceptors: {
Agent: [
(0, FetchOpaqueInterceptor_js_1.fetchOpaqueInterceptor)({
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
}),
],
Client: [],
},
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
};
let dispatcherClazz = undici_1.Agent;
let dispatcherClazz = BaseAgent_js_1.BaseAgent;
if (clientOptions?.lookup || clientOptions?.checkAddress) {

@@ -60,3 +53,3 @@ dispatcherOption = {

};
dispatcherClazz = undici_1.Agent;
dispatcherClazz = BaseAgent_js_1.BaseAgent;
}

@@ -69,3 +62,3 @@ else if (clientOptions?.allowH2) {

};
dispatcherClazz = undici_1.Agent;
dispatcherClazz = BaseAgent_js_1.BaseAgent;
}

@@ -225,2 +218,2 @@ FetchFactory.#dispatcher = new dispatcherCl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ZQUFZLENBQUMsS0FBSyxDQUFDIn0=
import { AsyncLocalStorage } from 'node:async_hooks';
import { Dispatcher } from 'undici';
export interface FetchOpaque {

@@ -8,2 +7,1 @@ }

}
export declare function fetchOpaqueInterceptor(opts: OpaqueInterceptorOptions): (dispatch: Dispatcher["dispatch"]) => Dispatcher["dispatch"];

@@ -6,14 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchOpaqueInterceptor = fetchOpaqueInterceptor;
const symbols_js_1 = __importDefault(require("./symbols.js"));
function fetchOpaqueInterceptor(opts) {
const opaqueLocalStorage = opts?.opaqueLocalStorage;
return (dispatch) => {
return function redirectInterceptor(opts, handler) {
const opaque = opaqueLocalStorage?.getStore();
handler.opaque = opaque;
return dispatch(opts, handler);
};
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmV0Y2hPcGFxdWVJbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9GZXRjaE9wYXF1ZUludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBK0JBLHdEQVNDO0FBdENELDhEQUFtQztBQTZCbkMsU0FBZ0Isc0JBQXNCLENBQUMsSUFBOEI7SUFDbkUsTUFBTSxrQkFBa0IsR0FBRyxJQUFJLEVBQUUsa0JBQWtCLENBQUM7SUFDcEQsT0FBTyxDQUFDLFFBQWdDLEVBQTBCLEVBQUU7UUFDbEUsT0FBTyxTQUFTLG1CQUFtQixDQUFDLElBQWdDLEVBQUUsT0FBbUM7WUFDdkcsTUFBTSxNQUFNLEdBQUcsa0JBQWtCLEVBQUUsUUFBUSxFQUFFLENBQUM7WUFDN0MsT0FBZSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7WUFDakMsT0FBTyxRQUFRLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2pDLENBQUMsQ0FBQztJQUNKLENBQUMsQ0FBQztBQUNKLENBQUMifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmV0Y2hPcGFxdWVJbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9GZXRjaE9wYXF1ZUludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsOERBQW1DIn0=
import { LookupFunction } from 'node:net';
import { Agent, Dispatcher, buildConnector } from 'undici';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;
export interface HttpAgentOptions extends Agent.Options {
export interface HttpAgentOptions extends BaseAgentOptions {
lookup?: LookupFunction;

@@ -10,3 +11,3 @@ checkAddress?: CheckAddressFunction;

}
export declare class HttpAgent extends Agent {
export declare class HttpAgent extends BaseAgent {
#private;

@@ -13,0 +14,0 @@ constructor(options: HttpAgentOptions);

@@ -9,3 +9,3 @@ "use strict";

const node_net_1 = require("node:net");
const undici_1 = require("undici");
const BaseAgent_js_1 = require("./BaseAgent.js");
class IllegalAddressError extends Error {

@@ -25,3 +25,3 @@ hostname;

}
class HttpAgent extends undici_1.Agent {
class HttpAgent extends BaseAgent_js_1.BaseAgent {
#checkAddress;

@@ -84,2 +84,2 @@ constructor(options) {

exports.HttpAgent = HttpAgent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSHR0cEFnZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0h0dHBBZ2VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSx3REFBMkI7QUFDM0IsdUNBQWdEO0FBQ2hELG1DQUlnQjtBQVdoQixNQUFNLG1CQUFvQixTQUFRLEtBQUs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4.6.0';
exports.VERSION = '4.6.1';
// 'node-urllib/4.0.0 Node.js/18.19.0 (darwin; x64)'

@@ -42,0 +42,0 @@ exports.HEADER_USER_AGENT = `node-urllib/${exports.VERSION} Node.js/${process.version.substring(1)} (${process.platform}; ${process.arch})`;

@@ -1,2 +0,2 @@

import { RequestInfo, RequestInit, Response, Agent } from 'undici';
import { RequestInfo, RequestInit, Response, Agent, Dispatcher } from 'undici';
import { ClientOptions, PoolStat, UndiciTimingInfo } from './HttpClient.js';

@@ -18,3 +18,3 @@ import { FetchMeta } from './Request.js';

#private;
static getDispatcher(): Agent;
static getDispatcher(): Dispatcher.ComposedDispatcher;
static setDispatcher(dispatcher: Agent): void;

@@ -21,0 +21,0 @@ static setClientOptions(clientOptions: ClientOptions): void;

import { AsyncLocalStorage } from 'node:async_hooks';
import { fetch as UndiciFetch, Request, Agent, getGlobalDispatcher, } from 'undici';
import { fetch as UndiciFetch, Request, getGlobalDispatcher, } from 'undici';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment

@@ -14,3 +14,3 @@ // @ts-ignore

import symbols from './symbols.js';
import { fetchOpaqueInterceptor } from './FetchOpaqueInterceptor.js';
import { BaseAgent } from './BaseAgent.js';
export class FetchFactory {

@@ -27,12 +27,5 @@ static #dispatcher;

let dispatcherOption = {
interceptors: {
Agent: [
fetchOpaqueInterceptor({
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
}),
],
Client: [],
},
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
};
let dispatcherClazz = Agent;
let dispatcherClazz = BaseAgent;
if (clientOptions?.lookup || clientOptions?.checkAddress) {

@@ -54,3 +47,3 @@ dispatcherOption = {

};
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
}

@@ -63,3 +56,3 @@ else if (clientOptions?.allowH2) {

};
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
}

@@ -218,2 +211,2 @@ FetchFactory.#dispatcher = new dispatcherClazz(dispatcherOption);

export const fetch = FetchFactory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jLENBQUMsVUFBVSxHQUFHLEdBQUksQ0FBQyxNQUFNLENBQUM7UUFDaEUsY0FBZSxDQUFDLGFBQWEsR0FBRyxHQUFJLENBQUMsVUFBVSxDQUFDO1FBQ2hELElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFLENBQUM7WUFDN0MsY0FBYyxDQUFDLElBQUksR0FBRyxRQUFRLENBQUMsY0FBYyxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7UUFDM0UsQ0FBQztRQUNELGNBQWMsQ0FBQyxFQUFFLEdBQUcsZUFBZSxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFFdEQsUUFBUSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUM7WUFDN0IsS0FBSyxFQUFFLFNBQVM7WUFDaEIsVUFBVSxFQUFFLEtBQUssQ0FBQyxVQUFVO1lBQzVCLFFBQVEsRUFBRSxHQUFJO1NBQ29CLENBQUMsQ0FBQztRQUN0QyxRQUFRLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQztZQUN4QixPQUFPLEVBQUUsT0FBTztZQUNoQixRQUFRLEVBQUUsY0FBYztTQUNLLENBQUMsQ0FBQztRQUNqQyxPQUFPLEdBQUksQ0FBQztJQUNkLENBQUM7O0FBR0gsTUFBTSxDQUFDLE1BQU0sS0FBSyxHQUFHLFlBQVksQ0FBQyxLQUFLLENBQUMifQ==
import { AsyncLocalStorage } from 'node:async_hooks';
import { Dispatcher } from 'undici';
export interface FetchOpaque {

@@ -8,2 +7,1 @@ }

}
export declare function fetchOpaqueInterceptor(opts: OpaqueInterceptorOptions): (dispatch: Dispatcher["dispatch"]) => Dispatcher["dispatch"];
import symbols from './symbols.js';
export function fetchOpaqueInterceptor(opts) {
const opaqueLocalStorage = opts?.opaqueLocalStorage;
return (dispatch) => {
return function redirectInterceptor(opts, handler) {
const opaque = opaqueLocalStorage?.getStore();
handler.opaque = opaque;
return dispatch(opts, handler);
};
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmV0Y2hPcGFxdWVJbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9GZXRjaE9wYXF1ZUludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sT0FBTyxNQUFNLGNBQWMsQ0FBQztBQTZCbkMsTUFBTSxVQUFVLHNCQUFzQixDQUFDLElBQThCO0lBQ25FLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxFQUFFLGtCQUFrQixDQUFDO0lBQ3BELE9BQU8sQ0FBQyxRQUFnQyxFQUEwQixFQUFFO1FBQ2xFLE9BQU8sU0FBUyxtQkFBbUIsQ0FBQyxJQUFnQyxFQUFFLE9BQW1DO1lBQ3ZHLE1BQU0sTUFBTSxHQUFHLGtCQUFrQixFQUFFLFFBQVEsRUFBRSxDQUFDO1lBQzdDLE9BQWUsQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1lBQ2pDLE9BQU8sUUFBUSxDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBQztRQUNqQyxDQUFDLENBQUM7SUFDSixDQUFDLENBQUM7QUFDSixDQUFDIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmV0Y2hPcGFxdWVJbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9GZXRjaE9wYXF1ZUludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sT0FBTyxNQUFNLGNBQWMsQ0FBQyJ9
import { LookupFunction } from 'node:net';
import { Agent, Dispatcher, buildConnector } from 'undici';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;
export interface HttpAgentOptions extends Agent.Options {
export interface HttpAgentOptions extends BaseAgentOptions {
lookup?: LookupFunction;

@@ -10,3 +11,3 @@ checkAddress?: CheckAddressFunction;

}
export declare class HttpAgent extends Agent {
export declare class HttpAgent extends BaseAgent {
#private;

@@ -13,0 +14,0 @@ constructor(options: HttpAgentOptions);

import dns from 'node:dns';
import { isIP } from 'node:net';
import { Agent, } from 'undici';
import { BaseAgent } from './BaseAgent.js';
class IllegalAddressError extends Error {

@@ -18,3 +18,3 @@ hostname;

}
export class HttpAgent extends Agent {
export class HttpAgent extends BaseAgent {
#checkAddress;

@@ -76,2 +76,2 @@ constructor(options) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSHR0cEFnZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0h0dHBBZ2VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEdBQUcsTUFBTSxVQUFVLENBQUM7QUFDM0IsT0FBTyxFQUFrQixJQUFJLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDaEQsT0FBTyxFQUNMLEtBQUssR0FHTixNQUFNLFFBQVEsQ0FBQztBQVdoQixNQUFNLG1CQUFvQixTQUFRLEtBQUs7SUFDckMsUUFBUSxDQUFTO0lBQ2pCLEVBQUUsQ0FBUztJQUNYLE1BQU0sQ0FBUztJQUVmLFlBQVksUUFBZ0IsRUFBRSxFQUFVLEVBQUUsTUFBYztRQUN0RCxNQUFNLE9BQU8sR0FBRyxpQkFBaUIsQ0FBQztRQUNsQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDZixJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDO1FBQ2xDLElBQUksQ0FBQyxRQUFRLEdBQUcsUUFBUSxDQUFDO1FBQ3p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FDM0MsSUFBSSxRQUFRLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxJQUFJLFFBQVEsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQztnQkFDdkQsUUFBUSxHQUFHLFFBQVEsQ0FBQyxTQUFTLENBQUMsQ0FBQyxFQUFFLFFBQVEsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDeEQsQ0FBQztZQUNELE1BQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQztZQUM5QixJQUFJLE1BQU0sS0FBSyxDQUFDLElBQUksTUFBTSxLQUFLLENBQUMsRUFBRSxDQUFDO2dCQUNqQyx5REFBeUQ7Z0JBQ3pELElBQUksQ0FBQyxJQUFJLENBQUMsYUFBYSxDQUFDLFFBQVEsRUFBRSxNQUFNLEVBQUUsUUFBUSxDQUFDLEVBQUUsQ0FBQztvQkFDcEQsTUFBTSxJQUFJLG1CQUFtQixDQUFDLFFBQVEsRUFBRSxRQUFRLEVBQUUsTUFBTSxDQUFDLENBQUM7Z0JBQzVELENBQUM7WUFDSCxDQUFDO1FBQ0gsQ0FBQztRQUNELE9BQU8sS0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDMUMsQ0FBQztDQUNGIn0=

@@ -33,3 +33,3 @@ import diagnosticsChannel from 'node:diagnostics_channel';

const debug = debuglog('urllib:HttpClient');
export const VERSION = '4.6.0';
export const VERSION = '4.6.1';
// 'node-urllib/4.0.0 Node.js/18.19.0 (darwin; x64)'

@@ -36,0 +36,0 @@ export const HEADER_USER_AGENT = `node-urllib/${VERSION} Node.js/${process.version.substring(1)} (${process.platform}; ${process.arch})`;

{
"name": "urllib",
"version": "4.6.0"
"version": "4.6.1"
}
{
"name": "urllib",
"version": "4.6.0",
"version": "4.6.1",
"publishConfig": {

@@ -5,0 +5,0 @@ "tag": "latest"

@@ -11,2 +11,3 @@ import { AsyncLocalStorage } from 'node:async_hooks';

Pool,
Dispatcher,
} from 'undici';

@@ -39,5 +40,6 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment

} from './Request.js';
import { FetchOpaque, fetchOpaqueInterceptor } from './FetchOpaqueInterceptor.js';
import { FetchOpaque } from './FetchOpaqueInterceptor.js';
import { RawResponseWithMeta, SocketInfo } from './Response.js';
import { IncomingHttpHeaders } from './IncomingHttpHeaders.js';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';

@@ -61,3 +63,3 @@ export interface UrllibRequestInit extends RequestInit {

export class FetchFactory {
static #dispatcher: Agent;
static #dispatcher: Dispatcher.ComposedDispatcher;
static #opaqueLocalStorage = new AsyncLocalStorage<FetchOpaque>();

@@ -74,13 +76,6 @@

static setClientOptions(clientOptions: ClientOptions) {
let dispatcherOption: Agent.Options = {
interceptors: {
Agent: [
fetchOpaqueInterceptor({
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
}),
],
Client: [],
},
let dispatcherOption: BaseAgentOptions = {
opaqueLocalStorage: FetchFactory.#opaqueLocalStorage,
};
let dispatcherClazz: new (options: Agent.Options) => Agent = Agent;
let dispatcherClazz: new (options: BaseAgentOptions) => BaseAgent = BaseAgent;
if (clientOptions?.lookup || clientOptions?.checkAddress) {

@@ -94,3 +89,3 @@ dispatcherOption = {

} as HttpAgentOptions;
dispatcherClazz = HttpAgent as unknown as new (options: Agent.Options) => Agent;
dispatcherClazz = HttpAgent as unknown as new (options: BaseAgentOptions) => BaseAgent;
} else if (clientOptions?.connect) {

@@ -102,3 +97,3 @@ dispatcherOption = {

} as HttpAgentOptions;
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
} else if (clientOptions?.allowH2) {

@@ -110,3 +105,3 @@ // Support HTTP2

} as HttpAgentOptions;
dispatcherClazz = Agent;
dispatcherClazz = BaseAgent;
}

@@ -113,0 +108,0 @@ FetchFactory.#dispatcher = new dispatcherClazz(dispatcherOption);

// const { AsyncLocalStorage } = require('node:async_hooks');
import { AsyncLocalStorage } from 'node:async_hooks';
import symbols from './symbols.js';
import { Dispatcher } from 'undici';

@@ -31,12 +30,1 @@ // const RedirectHandler = require('../handler/redirect-handler')

}
export function fetchOpaqueInterceptor(opts: OpaqueInterceptorOptions) {
const opaqueLocalStorage = opts?.opaqueLocalStorage;
return (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] => {
return function redirectInterceptor(opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler) {
const opaque = opaqueLocalStorage?.getStore();
(handler as any).opaque = opaque;
return dispatch(opts, handler);
};
};
}

@@ -8,6 +8,7 @@ import dns from 'node:dns';

} from 'undici';
import { BaseAgent, BaseAgentOptions } from './BaseAgent.js';
export type CheckAddressFunction = (ip: string, family: number | string, hostname: string) => boolean;
export interface HttpAgentOptions extends Agent.Options {
export interface HttpAgentOptions extends BaseAgentOptions {
lookup?: LookupFunction;

@@ -35,3 +36,3 @@ checkAddress?: CheckAddressFunction;

export class HttpAgent extends Agent {
export class HttpAgent extends BaseAgent {
#checkAddress?: CheckAddressFunction;

@@ -38,0 +39,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc