Socket
Socket
Sign inDemoInstall

@rpldy/shared

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rpldy/shared - npm Package Compare versions

Comparing version 0.1.7 to 0.1.9

README.md

36

lib/types.js
// @flow
import { BATCH_STATES, FILE_STATES } from "./consts";
import type { UploaderEnhancer } from "@rpldy/uploader";

@@ -9,3 +8,3 @@ export type NonMaybeTypeFunc = <T>(param: T) => $NonMaybeType<T>;

//upload URL
url: ?string,
url?: ?string,
//The name of the param in the upload request (default: input element's name)

@@ -39,21 +38,4 @@ filesParamName?: ?string,

export type SendResult = {
request: Promise<UploadData>,
abort: () => boolean,
};
export type SenderProgressEvent = { total: number, loaded: number };
export type FormatParamGroupNameMethod = (number, string) => string;
export type SendOptions = {
method: string,
paramName: string,
params: Object,
headers?: Object,
forceJsonResponse: ?boolean,
withCredentials: ?boolean,
formatGroupParamName: ?FormatParamGroupNameMethod,
};
type BatchItemBase = {|

@@ -89,4 +71,2 @@ id: string,

export type OnProgress = (e: SenderProgressEvent, Object[]) => void;
export type Batch = {

@@ -103,4 +83,2 @@ id: string,

export type SendMethod = (item: BatchItem[], url: string, options: SendOptions, onProgress: OnProgress) => SendResult;
export type FileFilterMethod = (mixed) => boolean;

@@ -133,14 +111,2 @@

export type CreateOptions = {|
...UploadOptions,
//uploader enhancer function
enhancer?: UploaderEnhancer,
//whether multiple upload requests can be issued simultaneously (default: false)
concurrent?: boolean,
//the maximum allowed for simultaneous requests (default: 2)
maxConcurrent?: number,
//the send method to use. Allows overriding the method used to send files to the server for example using a mock (default: @rpldy/sender)
send?: ?SendMethod,
|};
export type Trigger<T> = (string, ...args: mixed[]) => Promise<?T>[];

@@ -147,0 +113,0 @@

{
"version": "0.1.7",
"version": "0.1.9",
"name": "@rpldy/shared",

@@ -8,2 +8,3 @@ "description": "",

"module": "src/index.js",
"types": "types/index.d.ts",
"license": "MIT",

@@ -20,3 +21,3 @@ "repository": {

"devDependencies": {
"flow-bin": "^0.121.0"
"flow-bin": "^0.123.0"
},

@@ -30,3 +31,3 @@ "dependencies": {

},
"gitHead": "0ac67a2893ef3a684b8cf1834590035065340366"
"gitHead": "f1a40b9335abc19d904be186e43ae72b9d366e32"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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