Skip to content

Commit

Permalink
Merge pull request #44 from contentstack/update_timeout
Browse files Browse the repository at this point in the history
#43 Typescript support to pass Boolean in where
  • Loading branch information
uttamukkoji authored Feb 19, 2021
2 parents 5c511eb + bd40ceb commit 04794ef
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ test/config.js/*
test/sync_config.js/*
test/report.json/*
tap-html.html
*html-report
*html-report
coverage
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

### Version: 3.12.2
#### Date: Feb-19-2021

##### API timeout:
- updated timeout to min 30 sec
##### Enhancement Typescript:
- boolean value support added:
- [Query] - where, equalTo, notEqualTo

### Version: 3.12.1
#### Date: Jan-22-2021

Expand Down
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for contentstack 3.12.0
// Type definitions for contentstack 3.12.2
// Project: https://www.contentstack.com/
// Definitions by: Contentstack <https://github.com/contentstack>

Expand Down Expand Up @@ -166,9 +166,9 @@ export class Query extends Entry {

tags(value: string[]): Query;

where(key: string, value: (string | number)): Query;
equalTo(key: string, value: (string | number)): Query;
notEqualTo(key: string, value: (string | number)): Query;
where(key: string, value: (string | number | boolean)): Query;
equalTo(key: string, value: (string | number | boolean)): Query;
notEqualTo(key: string, value: (string | number | boolean)): Query;

lessThan(key: string, value: (string | number)): Query;
lessThanOrEqualTo(key: string, value: (string | number)): Query;
Expand Down
137 changes: 136 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contentstack",
"version": "3.12.1",
"version": "3.12.2",
"description": "Contentstack Javascript SDK",
"homepage": "https://www.contentstack.com/",
"author": {
Expand All @@ -13,7 +13,7 @@
"_id": "[email protected]",
"scripts": {
"test": "npm run test:e2e && npm run test:typescript",
"test:e2e": "tape test/index.js | tap-html --out ./tap-html.html",
"test:e2e": "istanbul cover tape test/index.js | tap-html --out ./tap-html.html",
"test:typescript": "jest --testPathPattern=test/typescript",
"automate": "node test.js",
"buildnode": "webpack --config webpack/webpack.node.js",
Expand Down Expand Up @@ -74,6 +74,7 @@
"es3ify-loader": "0.2.0",
"fetch-mock-jest": "^1.3.0",
"http-proxy-agent": "^3.0.0",
"istanbul": "^0.4.5",
"jest": "^26.4.2",
"jest-html-reporters": "^2.0.3",
"jsdoc": "^3.6.5",
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function fetchRetry(url, headers, retryDelay = 300, retryLimit = 5, fetchOptions
var option = Object.assign({
method: 'GET',
headers: headers,
timeout: 3000,
timeout: 30000,
},
fetchOptions);

Expand Down

0 comments on commit 04794ef

Please sign in to comment.