@omegup/msync 0.0.72 → 0.0.73
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 +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1217,11 +1217,6 @@ const firstWorksMerge = (iters) => {
|
|
|
1217
1217
|
return iterator;
|
|
1218
1218
|
};
|
|
1219
1219
|
|
|
1220
|
-
const T = (s) => `Timestamp(${parseInt(`${BigInt(s) / 2n ** 32n}`)}, ${parseInt(`${BigInt(s) % 2n ** 32n}`)})`;
|
|
1221
|
-
const replace = (s) => s.replace(/\{"\$timestamp":"(\d+)"\}/g, (_, d) => T(d));
|
|
1222
|
-
const json = (a) => replace(JSON.stringify(a));
|
|
1223
|
-
const log = (...args) => console.log(new Date(), ...args.map(a => (typeof a === 'function' ? a(replace) : a && typeof a === 'object' ? json(a) : a)));
|
|
1224
|
-
|
|
1225
1220
|
class Machine {
|
|
1226
1221
|
sources;
|
|
1227
1222
|
constructor(root) {
|
|
@@ -1247,7 +1242,7 @@ const runCont = async (it, cb) => {
|
|
|
1247
1242
|
const { next, stop, clear } = it();
|
|
1248
1243
|
const res = await next.then(next => ({ ok: true, next }), err => ({ ok: false, err }));
|
|
1249
1244
|
if (!res.ok) {
|
|
1250
|
-
|
|
1245
|
+
console.error(res.err);
|
|
1251
1246
|
process.exit(1);
|
|
1252
1247
|
return runCont(stop, cb);
|
|
1253
1248
|
}
|
|
@@ -1408,6 +1403,11 @@ const $insert = (out) => $insertX(out, assertNotNull(root().of('after').expr()),
|
|
|
1408
1403
|
}), x));
|
|
1409
1404
|
const assertNotNull = (expr) => expr;
|
|
1410
1405
|
|
|
1406
|
+
const T = (s) => `Timestamp(${parseInt(`${BigInt(s) / 2n ** 32n}`)}, ${parseInt(`${BigInt(s) % 2n ** 32n}`)})`;
|
|
1407
|
+
const replace = (s) => s.replace(/\{"\$timestamp":"(\d+)"\}/g, (_, d) => T(d));
|
|
1408
|
+
const json = (a) => replace(JSON.stringify(a));
|
|
1409
|
+
const log = (...args) => console.log(new Date(), ...args.map(a => (typeof a === 'function' ? a(replace) : a && typeof a === 'object' ? json(a) : a)));
|
|
1410
|
+
|
|
1411
1411
|
const aggregate = (streamName, input, snapshot = true, start = Date.now()) => input(({ coll, input }) => {
|
|
1412
1412
|
const req = {
|
|
1413
1413
|
aggregate: coll.collectionName,
|
package/index.js
CHANGED
|
@@ -1219,11 +1219,6 @@ const firstWorksMerge = (iters) => {
|
|
|
1219
1219
|
return iterator;
|
|
1220
1220
|
};
|
|
1221
1221
|
|
|
1222
|
-
const T = (s) => `Timestamp(${parseInt(`${BigInt(s) / 2n ** 32n}`)}, ${parseInt(`${BigInt(s) % 2n ** 32n}`)})`;
|
|
1223
|
-
const replace = (s) => s.replace(/\{"\$timestamp":"(\d+)"\}/g, (_, d) => T(d));
|
|
1224
|
-
const json = (a) => replace(JSON.stringify(a));
|
|
1225
|
-
const log = (...args) => console.log(new Date(), ...args.map(a => (typeof a === 'function' ? a(replace) : a && typeof a === 'object' ? json(a) : a)));
|
|
1226
|
-
|
|
1227
1222
|
class Machine {
|
|
1228
1223
|
sources;
|
|
1229
1224
|
constructor(root) {
|
|
@@ -1249,7 +1244,7 @@ const runCont = async (it, cb) => {
|
|
|
1249
1244
|
const { next, stop, clear } = it();
|
|
1250
1245
|
const res = await next.then(next => ({ ok: true, next }), err => ({ ok: false, err }));
|
|
1251
1246
|
if (!res.ok) {
|
|
1252
|
-
|
|
1247
|
+
console.error(res.err);
|
|
1253
1248
|
process.exit(1);
|
|
1254
1249
|
return runCont(stop, cb);
|
|
1255
1250
|
}
|
|
@@ -1410,6 +1405,11 @@ const $insert = (out) => $insertX(out, assertNotNull(root().of('after').expr()),
|
|
|
1410
1405
|
}), x));
|
|
1411
1406
|
const assertNotNull = (expr) => expr;
|
|
1412
1407
|
|
|
1408
|
+
const T = (s) => `Timestamp(${parseInt(`${BigInt(s) / 2n ** 32n}`)}, ${parseInt(`${BigInt(s) % 2n ** 32n}`)})`;
|
|
1409
|
+
const replace = (s) => s.replace(/\{"\$timestamp":"(\d+)"\}/g, (_, d) => T(d));
|
|
1410
|
+
const json = (a) => replace(JSON.stringify(a));
|
|
1411
|
+
const log = (...args) => console.log(new Date(), ...args.map(a => (typeof a === 'function' ? a(replace) : a && typeof a === 'object' ? json(a) : a)));
|
|
1412
|
+
|
|
1413
1413
|
const aggregate = (streamName, input, snapshot = true, start = Date.now()) => input(({ coll, input }) => {
|
|
1414
1414
|
const req = {
|
|
1415
1415
|
aggregate: coll.collectionName,
|