@graffy/core 0.16.9-alpha.2 → 0.16.10-alpha.1
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/index.cjs +4 -4
- package/index.mjs +4 -4
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -51,14 +51,14 @@ function wrapProvider(fn, decodedPath, isRead) {
|
|
|
51
51
|
let remainingNextResult;
|
|
52
52
|
const porcelainPayload = common.unwrapObject(decodePayload(payload), decodedPath);
|
|
53
53
|
const remainingPayload = common.remove(payload, path) || [];
|
|
54
|
-
async function shiftedNext(porcelainNextPayload) {
|
|
54
|
+
async function shiftedNext(porcelainNextPayload, nextOptions) {
|
|
55
55
|
nextCalled = true;
|
|
56
56
|
const nextPayload = encodePayload(
|
|
57
57
|
common.wrapObject(porcelainNextPayload, decodedPath)
|
|
58
58
|
);
|
|
59
59
|
if (remainingPayload.length)
|
|
60
60
|
common.merge(nextPayload, remainingPayload);
|
|
61
|
-
const nextResult = await next(nextPayload);
|
|
61
|
+
const nextResult = await next(nextPayload, nextOptions);
|
|
62
62
|
remainingNextResult = common.remove(nextResult, path) || [];
|
|
63
63
|
return common.unwrapObject(common.decodeGraph(nextResult), decodedPath);
|
|
64
64
|
}
|
|
@@ -85,7 +85,7 @@ function shiftGen(fn, path) {
|
|
|
85
85
|
let remainingNextStream;
|
|
86
86
|
const unwrappedPayload = common.unwrap(payload, path);
|
|
87
87
|
const remainingPayload = common.remove(payload, path) || [];
|
|
88
|
-
const shiftedNext = async function* shiftedNextFn(unwrappedNextPayload) {
|
|
88
|
+
const shiftedNext = async function* shiftedNextFn(unwrappedNextPayload, nextOptions) {
|
|
89
89
|
nextCalled = true;
|
|
90
90
|
const nextPayload = common.wrap(unwrappedNextPayload, path);
|
|
91
91
|
if (remainingPayload.length)
|
|
@@ -94,7 +94,7 @@ function shiftGen(fn, path) {
|
|
|
94
94
|
remainingNextStream = stream.makeStream((push) => {
|
|
95
95
|
pushRemaining = push;
|
|
96
96
|
});
|
|
97
|
-
for await (const value of next(nextPayload)) {
|
|
97
|
+
for await (const value of next(nextPayload, nextOptions)) {
|
|
98
98
|
const unwrappedValue = common.unwrap(value, path);
|
|
99
99
|
const remainingValue = common.remove(value, path);
|
|
100
100
|
if (remainingValue)
|
package/index.mjs
CHANGED
|
@@ -50,14 +50,14 @@ function wrapProvider(fn, decodedPath, isRead) {
|
|
|
50
50
|
let remainingNextResult;
|
|
51
51
|
const porcelainPayload = unwrapObject(decodePayload(payload), decodedPath);
|
|
52
52
|
const remainingPayload = remove(payload, path) || [];
|
|
53
|
-
async function shiftedNext(porcelainNextPayload) {
|
|
53
|
+
async function shiftedNext(porcelainNextPayload, nextOptions) {
|
|
54
54
|
nextCalled = true;
|
|
55
55
|
const nextPayload = encodePayload(
|
|
56
56
|
wrapObject(porcelainNextPayload, decodedPath)
|
|
57
57
|
);
|
|
58
58
|
if (remainingPayload.length)
|
|
59
59
|
merge(nextPayload, remainingPayload);
|
|
60
|
-
const nextResult = await next(nextPayload);
|
|
60
|
+
const nextResult = await next(nextPayload, nextOptions);
|
|
61
61
|
remainingNextResult = remove(nextResult, path) || [];
|
|
62
62
|
return unwrapObject(decodeGraph(nextResult), decodedPath);
|
|
63
63
|
}
|
|
@@ -84,7 +84,7 @@ function shiftGen(fn, path) {
|
|
|
84
84
|
let remainingNextStream;
|
|
85
85
|
const unwrappedPayload = unwrap(payload, path);
|
|
86
86
|
const remainingPayload = remove(payload, path) || [];
|
|
87
|
-
const shiftedNext = async function* shiftedNextFn(unwrappedNextPayload) {
|
|
87
|
+
const shiftedNext = async function* shiftedNextFn(unwrappedNextPayload, nextOptions) {
|
|
88
88
|
nextCalled = true;
|
|
89
89
|
const nextPayload = wrap(unwrappedNextPayload, path);
|
|
90
90
|
if (remainingPayload.length)
|
|
@@ -93,7 +93,7 @@ function shiftGen(fn, path) {
|
|
|
93
93
|
remainingNextStream = makeStream((push) => {
|
|
94
94
|
pushRemaining = push;
|
|
95
95
|
});
|
|
96
|
-
for await (const value of next(nextPayload)) {
|
|
96
|
+
for await (const value of next(nextPayload, nextOptions)) {
|
|
97
97
|
const unwrappedValue = unwrap(value, path);
|
|
98
98
|
const remainingValue = remove(value, path);
|
|
99
99
|
if (remainingValue)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/core",
|
|
3
3
|
"description": "The main module for Graffy, a library for intuitive real-time data APIs.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.16.
|
|
5
|
+
"version": "0.16.10-alpha.1",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@graffy/common": "0.16.
|
|
20
|
-
"@graffy/stream": "0.16.
|
|
19
|
+
"@graffy/common": "0.16.10-alpha.1",
|
|
20
|
+
"@graffy/stream": "0.16.10-alpha.1",
|
|
21
21
|
"debug": "^4.3.3"
|
|
22
22
|
}
|
|
23
23
|
}
|