Skip to content

Commit

Permalink
feat(validation): add all supported regions to validation (#233)
Browse files Browse the repository at this point in the history
* feat(validation): add all supported regions to validation

* feat(pickerOptions): Add errorsTimeout to picker options

* refactor(deps): bump dev deps

* fix(pickerOptions): Remove maximum value for maxSize param
  • Loading branch information
pcholuj committed May 31, 2019
1 parent 033e1bb commit 4cf82e7
Show file tree
Hide file tree
Showing 8 changed files with 992 additions and 478 deletions.
1,417 changes: 962 additions & 455 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions package.json
Expand Up @@ -46,24 +46,23 @@
"isutf8": "^2.0.3",
"jsonschema": "^1.2.4",
"p-queue": "^4.0.0",
"prettier-tslint": "^0.4.2",
"spark-md5": "^3.0.0",
"ts-node": "^8.1.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@purtuga/esm-webpack-plugin": "^1.0.1",
"@types/jest": "^24.0.12",
"@types/jest": "^24.0.13",
"@types/mime": "^2.0.1",
"@types/node": "^12.0.0",
"@types/node": "^12.0.4",
"@types/spark-md5": "^3.0.1",
"@types/uuid": "^3.4.4",
"aws-sdk": "^2.451.0",
"babel-loader": "^8.0.5",
"clean-webpack-plugin": "^2.0.2",
"codecov": "^3.3.0",
"aws-sdk": "^2.466.0",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^3.0.0",
"codecov": "^3.5.0",
"compression-webpack-plugin": "^2.0.0",
"del": "^4.1.1",
"dotenv": "^8.0.0",
Expand All @@ -79,25 +78,25 @@
"jest-localstorage-mock": "^2.4.0",
"jest-mock": "^24.8.0",
"js-yaml": "^3.13.1",
"jsdom": "^15.0.0",
"jsdom": "^15.1.1",
"lodash.clonedeep": "^4.5.0",
"lodash.merge": "^4.6.1",
"nock": "^10.0.6",
"opn-cli": "^4.1.0",
"prettier": "^1.17.0",
"opn-cli": "^5.0.0",
"prettier": "^1.17.1",
"prettier-tslint": "^0.4.2",
"standard-version": "^6.0.1",
"trash-cli": "^2.0.0",
"trash-cli": "^3.0.0",
"ts-jest": "^24.0.2",
"tslint": "^5.16.0",
"tslint": "^5.17.0",
"tslint-config-semistandard": "^8.0.0",
"typedoc": "^0.14.2",
"typescript": "^3.4.5",
"validate-commit-msg": "^2.14.0",
"webpack": "^4.30.0",
"webpack": "^4.32.2",
"webpack-assets-manifest": "^3.1.1",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.3.1",
"webpack-cli": "^3.3.2",
"webpack-node-externals": "^1.7.2",
"webpack-subresource-integrity": "^1.3.2"
},
Expand Down
4 changes: 2 additions & 2 deletions releases/filestack-js-3.0.0-relase.md
Expand Up @@ -66,7 +66,7 @@
height: 480,
}
);
}.catch(e: FilestackError => {
}.catch(e: FilestackError) {
console.log(e.message);
console.log(e.details); // detailed validation errors
})
Expand All @@ -80,7 +80,7 @@
wrongPickerOption: true
})
.open();
}.catch(e: FilestackError => {
}.catch(e: FilestackError) {
console.log(e.message);
console.log(e.details); // detailed validation errors
})
Expand Down
4 changes: 2 additions & 2 deletions src/lib/client.ts
Expand Up @@ -362,7 +362,7 @@ export class Client extends EventEmitter {
* token.resume(); // Resume flow
* token.cancel(); // Cancel flow (rejects)
* ```
* @param file Must be a valid [File | Blob | Buffer | string]
* @param {InputFile} file Must be a valid [File | Blob | Buffer | string]
* @param uploadOptions Uploader options.
* @param storeOptions Storage options.
* @param token A control token that can be used to call cancel(), pause(), and resume().
Expand Down Expand Up @@ -413,7 +413,7 @@ export class Client extends EventEmitter {
* token.resume(); // Resume flow
* token.cancel(); // Cancel flow (rejects)
* ```
* @param file Must be a valid [File | Blob | Buffer | string (base64)]
* @param {InputFile[]} file Must be a valid [File | Blob | Buffer | string (base64)]
* @param uploadOptions Upload options.
* @param storeOptions Storage options.
* @param token A control token that can be used to call cancel(), pause(), and resume().
Expand Down
5 changes: 5 additions & 0 deletions src/lib/picker.ts
Expand Up @@ -521,6 +521,11 @@ export interface PickerOptions {
* Default view type option for file browser
*/
viewType?: 'grid' | 'list';

/**
* Timeout for error messages
*/
errorsTimeout?: number;
/**
* Specify [width, height] in pixels of the desktop modal.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/schema/definitions.schema.ts
Expand Up @@ -62,7 +62,7 @@ export const DefinitionsSchema = {
regionsDef: {
id: '/regionsDef',
type: 'string',
enum: ['us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1', 'eu-central-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'sa-east-1'],
enum: ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-central-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'sa-east-1'],
},
locationsDef: {
id: '/locationsDef',
Expand Down
5 changes: 4 additions & 1 deletion src/schema/picker.schema.ts
Expand Up @@ -186,7 +186,6 @@ export const PickerParamsSchema = {
maxSize: {
type: 'integer',
minimum: 1,
maximum: 1000000,
},
modalSize: {
type: 'array',
Expand Down Expand Up @@ -384,5 +383,9 @@ export const PickerParamsSchema = {
additionalProperties: false,
properties: UploadParamsSchema.properties,// manual import upload definitions
},
errorsTimeout: {
type: 'number',
minimum: 0,
},
},
};
2 changes: 1 addition & 1 deletion webpack.config.js
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
const fs = require('fs');
const EsmWebpackPlugin = require('@purtuga/esm-webpack-plugin');
const merge = require('lodash.merge');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const WebpackAssetsManifest = require('webpack-assets-manifest');
const banner = fs.readFileSync('./LICENSE', 'utf8').replace('{year}', new Date().getFullYear());

Expand Down

0 comments on commit 4cf82e7

Please sign in to comment.