fix(core): update
This commit is contained in:
parent
1453abcd5f
commit
9855311739
41
package-lock.json
generated
41
package-lock.json
generated
@ -1409,15 +1409,29 @@
|
|||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@types/through2": "^2.0.34",
|
"@types/through2": "^2.0.34",
|
||||||
"through2": "^3.0.1"
|
"through2": "^3.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/smartjson": {
|
||||||
|
"version": "3.0.10",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-3.0.10.tgz",
|
||||||
|
"integrity": "sha512-0tBkET2yjmSSIf4DlgeyU8U/J2EshTmQGuMY28EjPq9VvuCFXLh72WmETpA4QqKRMqhWp1+P+RZgnQupW3GQxQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartjson": {
|
"@pushrocks/smartjson": {
|
||||||
"version": "3.0.10",
|
"version": "4.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-3.0.10.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-4.0.5.tgz",
|
||||||
"integrity": "sha512-0tBkET2yjmSSIf4DlgeyU8U/J2EshTmQGuMY28EjPq9VvuCFXLh72WmETpA4QqKRMqhWp1+P+RZgnQupW3GQxQ==",
|
"integrity": "sha512-i4kBjZSbs1t8swcAPEdPkDJHci2higzvMIkNUKTgXWrcxUFMuOis/B5huUnnIqg/Td8R+mAdf/B/CMfgjABTlg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@types/buffer-json": "^2.0.0",
|
||||||
"@types/fast-json-stable-stringify": "^2.0.0",
|
"@types/fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"buffer-json": "^2.0.0",
|
||||||
"fast-json-stable-stringify": "^2.1.0",
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
"lodash.clonedeep": "^4.5.0"
|
"lodash.clonedeep": "^4.5.0"
|
||||||
}
|
}
|
||||||
@ -1957,6 +1971,11 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/buffer-json": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fbuffer-json/-/buffer-json-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-nFKOrY93Tvv5Tobws+YbkGlPOJsn1nVpZah3BlSyQ4EniFm97KLvSr54tZ5xQp8mlf/XxbYwskNCYQB9EdrPlQ=="
|
||||||
|
},
|
||||||
"@types/chai": {
|
"@types/chai": {
|
||||||
"version": "4.2.11",
|
"version": "4.2.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.11.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.11.tgz",
|
||||||
@ -2043,8 +2062,7 @@
|
|||||||
"@types/fast-json-stable-stringify": {
|
"@types/fast-json-stable-stringify": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2ffast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2ffast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||||
"integrity": "sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==",
|
"integrity": "sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@types/figures": {
|
"@types/figures": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
@ -3026,6 +3044,11 @@
|
|||||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"buffer-json": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/buffer-json/-/buffer-json-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw=="
|
||||||
|
},
|
||||||
"buffer-xor": {
|
"buffer-xor": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/buffer-xor/-/buffer-xor-1.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/buffer-xor/-/buffer-xor-1.0.3.tgz",
|
||||||
@ -4974,8 +4997,7 @@
|
|||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||||
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
|
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"fast-levenshtein": {
|
"fast-levenshtein": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
@ -6979,8 +7001,7 @@
|
|||||||
"lodash.clonedeep": {
|
"lodash.clonedeep": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||||
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
|
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"lodash.isarguments": {
|
"lodash.isarguments": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartenv": "^4.0.10",
|
"@pushrocks/smartenv": "^4.0.10",
|
||||||
|
"@pushrocks/smartjson": "^4.0.5",
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
20
ts/index.ts
20
ts/index.ts
@ -21,7 +21,9 @@ export class WebRequest {
|
|||||||
const response: Response = await this.request(urlArg, {
|
const response: Response = await this.request(urlArg, {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
return response.json();
|
const responseText = await response.text();
|
||||||
|
const responseResult = plugins.smartjson.parse(responseText);
|
||||||
|
return responseResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,10 +31,12 @@ export class WebRequest {
|
|||||||
*/
|
*/
|
||||||
public async postJson(urlArg: string, requestBody?: any) {
|
public async postJson(urlArg: string, requestBody?: any) {
|
||||||
const response: Response = await this.request(urlArg, {
|
const response: Response = await this.request(urlArg, {
|
||||||
body: JSON.stringify(requestBody),
|
body: plugins.smartjson.stringify(requestBody),
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
});
|
});
|
||||||
return response.json();
|
const responseText = await response.text();
|
||||||
|
const responseResult = plugins.smartjson.parse(responseText);
|
||||||
|
return responseResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,10 +44,12 @@ export class WebRequest {
|
|||||||
*/
|
*/
|
||||||
public async putJson(urlArg: string, requestBody?: any) {
|
public async putJson(urlArg: string, requestBody?: any) {
|
||||||
const response: Response = await this.request(urlArg, {
|
const response: Response = await this.request(urlArg, {
|
||||||
body: JSON.stringify(requestBody),
|
body: plugins.smartjson.stringify(requestBody),
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
});
|
});
|
||||||
return response.json();
|
const responseText = await response.text();
|
||||||
|
const responseResult = plugins.smartjson.parse(responseText);
|
||||||
|
return responseResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +59,9 @@ export class WebRequest {
|
|||||||
const response: Response = await this.request(urlArg, {
|
const response: Response = await this.request(urlArg, {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
return response.json();
|
const responseText = await response.text();
|
||||||
|
const responseResult = plugins.smartjson.parse(responseText);
|
||||||
|
return responseResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as smartdelay from '@pushrocks/smartdelay';
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
import * as smartenv from '@pushrocks/smartenv';
|
import * as smartenv from '@pushrocks/smartenv';
|
||||||
|
import * as smartjson from '@pushrocks/smartjson';
|
||||||
|
|
||||||
export { smartdelay, smartenv };
|
export { smartdelay, smartenv, smartjson };
|
||||||
|
Loading…
Reference in New Issue
Block a user