@omegup/msync 0.1.23 → 0.1.24
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.esm.js +5 -7
- package/index.js +5 -7
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2154,13 +2154,11 @@ const executes$1 = (view, input, streamName, needs) => {
|
|
|
2154
2154
|
partialFilterExpression: { deletedAt: { $eq: null } },
|
|
2155
2155
|
name: 'touchedAt_' + new UUID().toString('base64'),
|
|
2156
2156
|
});
|
|
2157
|
-
log('start stream', { streamName, data });
|
|
2158
|
-
await last.findOne();
|
|
2159
|
-
console.log('got last update');
|
|
2160
|
-
const p = last.findOne({ _id: streamName, data });
|
|
2161
|
-
await p;
|
|
2162
2157
|
log('stream started', { streamName, data });
|
|
2163
|
-
const ts = await Promise.all([
|
|
2158
|
+
const ts = await Promise.all([
|
|
2159
|
+
last.findOne({ _id: streamName, data }),
|
|
2160
|
+
last.findOne({ _id: streamName }),
|
|
2161
|
+
]);
|
|
2164
2162
|
log('got last update', { streamName, ts });
|
|
2165
2163
|
return next(step2_5(ts), 'handle teardown');
|
|
2166
2164
|
};
|
|
@@ -2194,11 +2192,11 @@ const executes$1 = (view, input, streamName, needs) => {
|
|
|
2194
2192
|
const step4 = (lastTS) => async () => {
|
|
2195
2193
|
const raw = stages(lastTS).with(finalInput.raw(lastTS === null)).stages;
|
|
2196
2194
|
const stream = await makeStream();
|
|
2195
|
+
const nextRes = stream.tryNext();
|
|
2197
2196
|
const aggResult = await aggregate(pdb, streamName, c => c({
|
|
2198
2197
|
coll: collection,
|
|
2199
2198
|
input: raw,
|
|
2200
2199
|
}));
|
|
2201
|
-
const nextRes = stream.tryNext();
|
|
2202
2200
|
return next(step7({ aggResult, ts: aggResult.cursor.atClusterTime, stream, nextRes }), 'update __last', () => stream.close());
|
|
2203
2201
|
};
|
|
2204
2202
|
const step7 = (l) => async () => {
|
package/index.js
CHANGED
|
@@ -2156,13 +2156,11 @@ const executes$1 = (view, input, streamName, needs) => {
|
|
|
2156
2156
|
partialFilterExpression: { deletedAt: { $eq: null } },
|
|
2157
2157
|
name: 'touchedAt_' + new mongodb.UUID().toString('base64'),
|
|
2158
2158
|
});
|
|
2159
|
-
log('start stream', { streamName, data });
|
|
2160
|
-
await last.findOne();
|
|
2161
|
-
console.log('got last update');
|
|
2162
|
-
const p = last.findOne({ _id: streamName, data });
|
|
2163
|
-
await p;
|
|
2164
2159
|
log('stream started', { streamName, data });
|
|
2165
|
-
const ts = await Promise.all([
|
|
2160
|
+
const ts = await Promise.all([
|
|
2161
|
+
last.findOne({ _id: streamName, data }),
|
|
2162
|
+
last.findOne({ _id: streamName }),
|
|
2163
|
+
]);
|
|
2166
2164
|
log('got last update', { streamName, ts });
|
|
2167
2165
|
return next(step2_5(ts), 'handle teardown');
|
|
2168
2166
|
};
|
|
@@ -2196,11 +2194,11 @@ const executes$1 = (view, input, streamName, needs) => {
|
|
|
2196
2194
|
const step4 = (lastTS) => async () => {
|
|
2197
2195
|
const raw = stages(lastTS).with(finalInput.raw(lastTS === null)).stages;
|
|
2198
2196
|
const stream = await makeStream();
|
|
2197
|
+
const nextRes = stream.tryNext();
|
|
2199
2198
|
const aggResult = await aggregate(pdb, streamName, c => c({
|
|
2200
2199
|
coll: collection,
|
|
2201
2200
|
input: raw,
|
|
2202
2201
|
}));
|
|
2203
|
-
const nextRes = stream.tryNext();
|
|
2204
2202
|
return next(step7({ aggResult, ts: aggResult.cursor.atClusterTime, stream, nextRes }), 'update __last', () => stream.close());
|
|
2205
2203
|
};
|
|
2206
2204
|
const step7 = (l) => async () => {
|