Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/sync-fetch
Advanced tools
TypeScript definitions for sync-fetch
npm install --save @types/sync-fetch
This package contains type definitions for sync-fetch (https://github.com/larsgw/sync-fetch).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sync-fetch.
import NodeFetch = require("node-fetch");
type Blob = NodeFetch.Blob;
type Headers = NodeFetch.Headers;
type HeadersInit = NodeFetch.HeadersInit;
type RequestContext = NodeFetch.RequestContext;
type RequestRedirect = NodeFetch.RequestRedirect;
type ResponseInit = NodeFetch.ResponseInit;
type ResponseType = NodeFetch.ResponseType;
type SyncFetch = (url: SyncRequestInfo, init?: SyncRequestInit) => SyncResponse;
type SyncRequestInfo = string | URLLike | SyncRequest;
declare class SyncRequest extends SyncBody {
constructor(input: SyncRequestInfo, init?: SyncRequestInit);
clone: () => SyncRequest;
context: RequestContext;
headers: Headers;
method: string;
redirect: RequestRedirect;
referrer: string;
url: string;
compress: boolean;
counter: number;
follow: number;
hostname: string;
port?: number;
protocol: string;
size: number;
timeout: number;
}
interface SyncRequestInit {
body?: SyncBodyInit;
headers?: HeadersInit;
method?: string;
redirect?: RequestRedirect;
compress?: boolean;
follow?: number;
size?: number;
timeout?: number;
}
declare class SyncResponse extends SyncBody {
constructor(body?: SyncBodyInit, init?: ResponseInit);
clone: () => SyncResponse;
headers: Headers;
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: ResponseType;
url: string;
}
declare class SyncBody {
constructor(body?: any, opts?: { size?: number; timeout?: number });
arrayBuffer: () => ArrayBuffer;
blob: () => Promise<Blob>;
body: NodeJS.ReadableStream;
bodyUsed: boolean;
buffer: () => Buffer;
json: () => any;
size: number;
text: () => string;
timeout: number;
}
type SyncBodyInit = string | ArrayBuffer | ArrayBufferView | URLSearchParams;
interface URLLike {
href: string;
}
declare const syncFetch: SyncFetch & {
FetchError: typeof NodeFetch.FetchError;
Headers: typeof NodeFetch.Headers;
Request: typeof SyncRequest;
Response: typeof SyncResponse;
};
export = syncFetch;
These definitions were written by Alex Laz.
FAQs
TypeScript definitions for sync-fetch
The npm package @types/sync-fetch receives a total of 9,408 weekly downloads. As such, @types/sync-fetch popularity was classified as popular.
We found that @types/sync-fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.