@jsforce/jsforce-node 3.10.12-dev.1 → 3.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/VERSION.d.ts +1 -1
- package/lib/VERSION.js +1 -1
- package/lib/request-helper.js +1 -1
- package/lib/util/stream.js +1 -12
- package/package.json +12 -1
package/lib/VERSION.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "3.10.
|
|
1
|
+
declare const _default: "3.10.13";
|
|
2
2
|
export default _default;
|
package/lib/VERSION.js
CHANGED
package/lib/request-helper.js
CHANGED
|
@@ -29,7 +29,7 @@ function createHttpRequestHandlerStreams(req, options = {}) {
|
|
|
29
29
|
}
|
|
30
30
|
duplex.on('response', async (res) => {
|
|
31
31
|
if (duplex.listenerCount('complete') > 0) {
|
|
32
|
-
logger.debug(
|
|
32
|
+
logger.debug('Processing response');
|
|
33
33
|
const start = Date.now();
|
|
34
34
|
const resBody = await (0, stream_2.readAll)(duplex, options.encoding);
|
|
35
35
|
logger.debug(`Response body read: ${(resBody.length / 1024 / 1024).toFixed(1)}MB ` +
|
package/lib/util/stream.js
CHANGED
|
@@ -30,11 +30,6 @@ class MemoryWriteStream extends stream_1.Writable {
|
|
|
30
30
|
_write(chunk, encoding, callback) {
|
|
31
31
|
this._chunks.push(chunk);
|
|
32
32
|
this._totalBytes += chunk.length;
|
|
33
|
-
// Log progress every 10MB
|
|
34
|
-
if (this._totalBytes % (10 * 1024 * 1024) < chunk.length) {
|
|
35
|
-
logger.debug(`MemoryWriteStream: received ${this._chunks.length} chunks, ` +
|
|
36
|
-
`${(this._totalBytes / 1024 / 1024).toFixed(1)}MB total`);
|
|
37
|
-
}
|
|
38
33
|
callback();
|
|
39
34
|
}
|
|
40
35
|
_writev(data, callback) {
|
|
@@ -42,16 +37,10 @@ class MemoryWriteStream extends stream_1.Writable {
|
|
|
42
37
|
this._chunks.push(chunk);
|
|
43
38
|
this._totalBytes += chunk.length;
|
|
44
39
|
}
|
|
45
|
-
logger.debug(`MemoryWriteStream._writev: received ${data.length} chunks in batch`);
|
|
46
40
|
callback();
|
|
47
41
|
}
|
|
48
42
|
toString(encoding = 'utf-8') {
|
|
49
|
-
|
|
50
|
-
`${(this._totalBytes / 1024 / 1024).toFixed(1)}MB`);
|
|
51
|
-
const start = Date.now();
|
|
52
|
-
const result = Buffer.concat(this._chunks).toString(encoding);
|
|
53
|
-
logger.debug(`MemoryWriteStream.toString: completed in ${Date.now() - start}ms`);
|
|
54
|
-
return result;
|
|
43
|
+
return Buffer.concat(this._chunks).toString(encoding);
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
46
|
async function readAll(rs, encoding = 'utf-8') {
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"database.com"
|
|
11
11
|
],
|
|
12
12
|
"homepage": "http://github.com/jsforce/jsforce",
|
|
13
|
-
"version": "3.10.
|
|
13
|
+
"version": "3.10.13",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git://github.com/jsforce/jsforce.git"
|
|
@@ -100,6 +100,16 @@
|
|
|
100
100
|
],
|
|
101
101
|
"output": []
|
|
102
102
|
},
|
|
103
|
+
"test:node:perf": {
|
|
104
|
+
"command": "jest test/perf --config {}",
|
|
105
|
+
"dependencies": [
|
|
106
|
+
"build:node:cjs"
|
|
107
|
+
],
|
|
108
|
+
"files": [
|
|
109
|
+
"test/perf/**/*.test.ts"
|
|
110
|
+
],
|
|
111
|
+
"output": []
|
|
112
|
+
},
|
|
103
113
|
"test:browser": {
|
|
104
114
|
"command": "karma start",
|
|
105
115
|
"dependencies": [
|
|
@@ -170,6 +180,7 @@
|
|
|
170
180
|
"lint": "wireit",
|
|
171
181
|
"test": "wireit",
|
|
172
182
|
"test:node": "wireit",
|
|
183
|
+
"test:node:perf": "wireit",
|
|
173
184
|
"test:browser": "wireit",
|
|
174
185
|
"test:browser-ci": "wireit",
|
|
175
186
|
"test:browser-ci:retry": "wireit",
|