tus-js-client
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -35,3 +35,3 @@ // Type definitions for tus-js-client | ||
onChunkComplete?: ((chunkSize: number, bytesAccepted: number, bytesTotal: number) => void) | null | ||
onSuccess?: (() => void) | null | ||
onSuccess?: ((payload: OnSuccessPayload) => void) | null | ||
onError?: ((error: Error | DetailedError) => void) | null | ||
@@ -63,2 +63,6 @@ onShouldRetry?: | ||
interface OnSuccessPayload { | ||
lastResponse: HttpResponse | ||
} | ||
interface UrlStorage { | ||
@@ -65,0 +69,0 @@ findAllUploads(): Promise<PreviousUpload[]> |
@@ -30,4 +30,5 @@ // This is a test file for ensuring that the type definitions in index.d.ts are | ||
onChunkComplete: (_chunkSize: number, _bytesAccepted: number) => {}, | ||
onSuccess: () => { | ||
onSuccess: (payload: tus.OnSuccessPayload) => { | ||
console.log('Download from %s complete', upload.url) | ||
console.log('Response header', payload.lastResponse.getHeader('X-Info')) | ||
}, | ||
@@ -34,0 +35,0 @@ onError: (error: Error | DetailedError) => { |
{ | ||
"name": "tus-js-client", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "A pure JavaScript client for the tus resumable upload protocol", | ||
"main": "lib.es5/node/index.js", | ||
"module": "lib.esm/node/index.js", | ||
"files": [ | ||
"lib/**/*", | ||
"lib.es5/**/*", | ||
"lib.esm/**/*", | ||
"dist/**/*", | ||
"lib/index.d.ts" | ||
], | ||
"files": ["lib/**/*", "lib.es5/**/*", "lib.esm/**/*", "dist/**/*", "lib/index.d.ts"], | ||
"browser": { | ||
@@ -27,11 +21,3 @@ "./lib.es5/node/index.js": "./lib.es5/browser/index.js", | ||
}, | ||
"keywords": [ | ||
"tus", | ||
"resumable", | ||
"upload", | ||
"protocol", | ||
"progress", | ||
"file", | ||
"browser" | ||
], | ||
"keywords": ["tus", "resumable", "upload", "protocol", "progress", "file", "browser"], | ||
"license": "MIT", | ||
@@ -38,0 +24,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2582213
32112