@rpldy/sender
Advanced tools
Comparing version 0.1.7 to 0.1.9
// @flow | ||
import type { NonMaybeTypeFunc } from "@rpldy/shared"; | ||
import type { | ||
BatchItem, | ||
NonMaybeTypeFunc, | ||
UploadData, | ||
FormatParamGroupNameMethod, | ||
} from "@rpldy/shared"; | ||
@@ -16,2 +21,24 @@ export type MockOptions = {| | ||
export type MandatoryMockOptions = $ObjMap<MockOptions, NonMaybeTypeFunc>; | ||
export type MandatoryMockOptions = $ObjMap<MockOptions, NonMaybeTypeFunc>; | ||
export type SendResult = { | ||
request: Promise<UploadData>, | ||
abort: () => boolean, | ||
}; | ||
export type SendOptions = { | ||
method: string, | ||
paramName: string, | ||
params: Object, | ||
headers?: Object, | ||
forceJsonResponse: ?boolean, | ||
withCredentials: ?boolean, | ||
formatGroupParamName: ?FormatParamGroupNameMethod, | ||
}; | ||
export type SenderProgressEvent = { total: number, loaded: number }; | ||
export type OnProgress = (e: SenderProgressEvent, Object[]) => void; | ||
export type SendMethod = (item: BatchItem[], url: string, options: SendOptions, onProgress: OnProgress) => SendResult; |
@@ -61,3 +61,3 @@ "use strict"; | ||
req.upload.onprogress = function (e) { | ||
if (e.lengthComputable) { | ||
if (e.lengthComputable && onProgress) { | ||
onProgress(e, items.slice()); | ||
@@ -64,0 +64,0 @@ } |
{ | ||
"version": "0.1.7", | ||
"version": "0.1.9", | ||
"name": "@rpldy/sender", | ||
@@ -8,2 +8,3 @@ "description": "", | ||
"module": "src/index.js", | ||
"types": "types/index.d.ts", | ||
"license": "MIT", | ||
@@ -20,6 +21,6 @@ "repository": { | ||
"dependencies": { | ||
"@rpldy/shared": "^0.1.7" | ||
"@rpldy/shared": "^0.1.9" | ||
}, | ||
"devDependencies": { | ||
"flow-bin": "^0.121.0" | ||
"flow-bin": "^0.123.0" | ||
}, | ||
@@ -29,3 +30,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "0ac67a2893ef3a684b8cf1834590035065340366" | ||
"gitHead": "f1a40b9335abc19d904be186e43ae72b9d366e32" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
43881
20
445
0
26
Updated@rpldy/shared@^0.1.9