@cnpmjs/binding
Advanced tools
Comparing version 0.0.0 to 0.0.12
@@ -27,2 +27,54 @@ /* tslint:disable */ | ||
export function download(requests: Array<JsPackageRequest>, options: JsDownloadOptions): object | ||
export interface JsTocPath { | ||
map: string | ||
index: string | ||
} | ||
export interface JsDownloadOptions { | ||
downloadDir: string | ||
downloadTimeout: number | ||
bucketCount: number | ||
httpConcurrentCount: number | ||
entryWhitelist?: Array<string> | undefined | null | ||
entryListener?: (...args: any[]) => any | undefined | null | ||
retryTime?: number | undefined | null | ||
tocPath?: JsTocPath | undefined | null | ||
} | ||
export interface JsPackageRequest { | ||
name?: string | undefined | null | ||
version?: string | undefined | null | ||
sha?: string | undefined | null | ||
url?: string | undefined | null | ||
} | ||
export interface JsPackageEntry { | ||
pkgName: string | ||
content: string | ||
entryName: string | ||
} | ||
export function download(requests: Array<JsPackageRequest>, options: JsDownloadOptions): object | ||
export interface JsTocPath { | ||
map: string | ||
index: string | ||
} | ||
export interface JsDownloadOptions { | ||
downloadDir: string | ||
downloadTimeout: number | ||
bucketCount: number | ||
httpConcurrentCount: number | ||
entryWhitelist?: Array<string> | undefined | null | ||
entryListener?: (...args: any[]) => any | undefined | null | ||
retryTime?: number | undefined | null | ||
tocPath?: JsTocPath | undefined | null | ||
} | ||
export interface JsPackageRequest { | ||
name?: string | undefined | null | ||
version?: string | undefined | null | ||
sha?: string | undefined | null | ||
url?: string | undefined | null | ||
} | ||
export interface JsPackageEntry { | ||
pkgName: string | ||
content: string | ||
entryName: string | ||
} | ||
export function download(requests: Array<JsPackageRequest>, options: JsDownloadOptions): object | ||
export type JsDownloader = Downloader | ||
@@ -36,2 +88,14 @@ export class Downloader { | ||
shutdown(): Promise<void> | ||
constructor(options: JsDownloadOptions) | ||
init(): object | ||
download(request: JsPackageRequest): Promise<void> | ||
batchDownloads(jsRequests: Array<JsPackageRequest>): Promise<void> | ||
dump(): string | ||
shutdown(): Promise<void> | ||
constructor(options: JsDownloadOptions) | ||
init(): object | ||
download(request: JsPackageRequest): Promise<void> | ||
batchDownloads(jsRequests: Array<JsPackageRequest>): Promise<void> | ||
dump(): string | ||
shutdown(): Promise<void> | ||
} | ||
@@ -43,2 +107,8 @@ export type JsFcntl = Fcntl | ||
unlock(): void | ||
constructor(filepath: string) | ||
lock(): void | ||
unlock(): void | ||
constructor(filepath: string) | ||
lock(): void | ||
unlock(): void | ||
} |
{ | ||
"name": "@cnpmjs/binding", | ||
"version": "0.0.0", | ||
"description": "", | ||
"version": "0.0.12", | ||
"description": "downloader binding", | ||
"main": "index.js", | ||
@@ -14,3 +14,3 @@ "files": [ | ||
"scripts": { | ||
"build-release": "sh ./scripts/build.sh", | ||
"build-release": "bash ./scripts/build.sh", | ||
"prepare-test": "npm run build-release", | ||
@@ -22,6 +22,6 @@ "test:rs": "cargo test", | ||
"optionalDependencies": { | ||
"@cnpmjs/binding-darwin-arm64": "^0.0.0", | ||
"@cnpmjs/binding-darwin-x64": "^0.0.0", | ||
"@cnpmjs/binding-linux-arm64": "^0.0.0", | ||
"@cnpmjs/binding-linux-x64": "^0.0.0" | ||
"@cnpmjs/binding-darwin-arm64": "^0.0.12", | ||
"@cnpmjs/binding-darwin-x64": "^0.0.12", | ||
"@cnpmjs/binding-linux-arm64": "^0.0.12", | ||
"@cnpmjs/binding-linux-x64": "^0.0.12" | ||
}, | ||
@@ -28,0 +28,0 @@ "devDependencies": { |
7586
116