@openfn/language-collections 0.5.1 → 0.5.2
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/dist/index.cjs +2 -6
- package/dist/index.js +2 -6
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -46,11 +46,7 @@ __export(collections_exports, {
|
|
|
46
46
|
var import_node_path = __toESM(require("path"), 1);
|
|
47
47
|
var import_undici2 = __toESM(require("undici"), 1);
|
|
48
48
|
var import_util = require("@openfn/language-common/util");
|
|
49
|
-
var import_stream_chain = __toESM(require("stream-chain"), 1);
|
|
50
49
|
var import_stream_json = __toESM(require("stream-json"), 1);
|
|
51
|
-
var import_Pick = __toESM(require("stream-json/filters/Pick"), 1);
|
|
52
|
-
var import_StreamArray = __toESM(require("stream-json/streamers/StreamArray"), 1);
|
|
53
|
-
var import_StreamValues = __toESM(require("stream-json/streamers/StreamValues"), 1);
|
|
54
50
|
|
|
55
51
|
// src/mock.js
|
|
56
52
|
var import_undici = require("undici");
|
|
@@ -462,7 +458,7 @@ function each(name, query = {}, callback = () => {
|
|
|
462
458
|
};
|
|
463
459
|
}
|
|
464
460
|
var streamResponse = async (response, onValue) => {
|
|
465
|
-
const pipeline =
|
|
461
|
+
const pipeline = response.body.pipe((0, import_stream_json.default)());
|
|
466
462
|
let isInsideItems = false;
|
|
467
463
|
let cursor;
|
|
468
464
|
const it = pipeline.iterator();
|
|
@@ -509,7 +505,7 @@ var streamResponse = async (response, onValue) => {
|
|
|
509
505
|
key: key.value.value,
|
|
510
506
|
value: value.value.value
|
|
511
507
|
});
|
|
512
|
-
waitFor("endObject");
|
|
508
|
+
await waitFor("endObject");
|
|
513
509
|
}
|
|
514
510
|
if (isInsideItems && token.name === "endArray") {
|
|
515
511
|
isInsideItems = false;
|
package/dist/index.js
CHANGED
|
@@ -21,11 +21,7 @@ __export(collections_exports, {
|
|
|
21
21
|
import nodepath from "path";
|
|
22
22
|
import undici from "undici";
|
|
23
23
|
import { throwError, expandReferences } from "@openfn/language-common/util";
|
|
24
|
-
import chain from "stream-chain";
|
|
25
24
|
import parser from "stream-json";
|
|
26
|
-
import Pick from "stream-json/filters/Pick";
|
|
27
|
-
import streamArray from "stream-json/streamers/StreamArray";
|
|
28
|
-
import streamValues from "stream-json/streamers/StreamValues";
|
|
29
25
|
|
|
30
26
|
// src/mock.js
|
|
31
27
|
import { MockAgent } from "undici";
|
|
@@ -437,7 +433,7 @@ function each(name, query = {}, callback = () => {
|
|
|
437
433
|
};
|
|
438
434
|
}
|
|
439
435
|
var streamResponse = async (response, onValue) => {
|
|
440
|
-
const pipeline =
|
|
436
|
+
const pipeline = response.body.pipe(parser());
|
|
441
437
|
let isInsideItems = false;
|
|
442
438
|
let cursor;
|
|
443
439
|
const it = pipeline.iterator();
|
|
@@ -484,7 +480,7 @@ var streamResponse = async (response, onValue) => {
|
|
|
484
480
|
key: key.value.value,
|
|
485
481
|
value: value.value.value
|
|
486
482
|
});
|
|
487
|
-
waitFor("endObject");
|
|
483
|
+
await waitFor("endObject");
|
|
488
484
|
}
|
|
489
485
|
if (isInsideItems && token.name === "endArray") {
|
|
490
486
|
isInsideItems = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-collections",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "OpenFn collections adaptor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"configuration-schema.json"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"stream-chain": "^3.3.2",
|
|
24
23
|
"stream-json": "^1.8.0",
|
|
25
24
|
"undici": "^5.22.1",
|
|
26
25
|
"@openfn/language-common": "2.1.1"
|