@omegup/msync 0.0.4 → 0.0.6
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.d.ts +3 -2
- package/index.esm.js +7 -2
- package/index.js +7 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -570,7 +570,8 @@ declare const ite: {
|
|
|
570
570
|
<T, D, C = unknown>(cond: Expr<unknown, D, C>, then: Expr<T, D, C>, orelse: Expr<T, D, C>): Expr<T, D, C>;
|
|
571
571
|
<T, R1, R2, F extends HKT<R1 | R2>, C = unknown>(cond: BoolExpr<App<F, R1>, App<F, R2>, C>, then: Expr<T, App<F, R1>, C>, orelse: Expr<T, App<F, R2>, C>): Expr<T, App<F, R1 | R2>, C>;
|
|
572
572
|
};
|
|
573
|
-
declare const and: <D, C = unknown>(
|
|
573
|
+
declare const and: <D, C = unknown>(...expr: Expr<boolean, D, C>[]) => Expr<boolean, D, C>;
|
|
574
|
+
declare const or: <D, C = unknown>(...expr: Expr<boolean, D, C>[]) => Expr<boolean, D, C>;
|
|
574
575
|
declare const eq: <T, D, C = unknown>(a: Expr<T, D, C>) => (b: Expr<T, D, C>) => Expr<boolean, D, C>;
|
|
575
576
|
declare const sub: <T, D, Ctx, P extends O>(a: Expr<T, D, Ctx>, f: Field<P, D, Ctx>) => Expr<T, P, Ctx>;
|
|
576
577
|
declare const eqTyped: <T1 extends Dom, T2 extends Dom, F extends HKT<Dom>, C = unknown, Dom = unknown>(a: Expr<T1 | T2, App<F, T1 | T2>, C>, b: Expr<T1, App<F, T1 | T2>, C>) => BoolExpr<App<F, T1>, App<F, T2>, C>;
|
|
@@ -639,4 +640,4 @@ declare const enablePreAndPostImages: <T extends doc>(coll: Collection<T>) => Pr
|
|
|
639
640
|
declare const prepare: (testName?: string) => Promise<MongoClient$1>;
|
|
640
641
|
declare const makeCol: <T extends ID>(docs: readonly OptionalUnlessRequiredId<T>[], database: Db, name?: string) => Promise<Collection<T>>;
|
|
641
642
|
|
|
642
|
-
export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $sum, $unwind, $unwindDelta, $upsert, type Accumulators, type Arr, type AsLiteral, type Delta, type DeltaAccumulator, type DeltaAccumulators, Expr, type ExprHKT, type Exprs, type ExprsExact, type ExprsExactHKT, type ExprsPart, Field, type ID, type Loose, Machine, type Merge, type MergeArgs, type MergeInto, type MergeMapOArgs, type Model, type N, type NoRaw, type O, type OPick, type OPickD, type RONoRaw, type RORec, type RawStages, type Rec, type Replace, type SnapshotStreamExecutionResult, type StrKey, type Strict, type TS, Type, type WriteonlyCollection, add, and, array, ceil, comp, concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, type doc, enablePreAndPostImages, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first, firstSure, floor, from, func, gt, gte, inArray, isArray, ite, last, log, lt, lte, makeCol, map1, mapVal, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, minDate, monthPart, multiply, ne, nil, noop, type notArr, notNull, now, pair, prepare, rand, range, root, set, setField, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap };
|
|
643
|
+
export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $sum, $unwind, $unwindDelta, $upsert, type Accumulators, type Arr, type AsLiteral, type Delta, type DeltaAccumulator, type DeltaAccumulators, Expr, type ExprHKT, type Exprs, type ExprsExact, type ExprsExactHKT, type ExprsPart, Field, type ID, type Loose, Machine, type Merge, type MergeArgs, type MergeInto, type MergeMapOArgs, type Model, type N, type NoRaw, type O, type OPick, type OPickD, type RONoRaw, type RORec, type RawStages, type Rec, type Replace, type SnapshotStreamExecutionResult, type StrKey, type Strict, type TS, Type, type WriteonlyCollection, add, and, array, ceil, comp, concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, type doc, enablePreAndPostImages, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first, firstSure, floor, from, func, gt, gte, inArray, isArray, ite, last, log, lt, lte, makeCol, map1, mapVal, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, minDate, monthPart, multiply, ne, nil, noop, type notArr, notNull, now, or, pair, prepare, rand, range, root, set, setField, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap };
|
package/index.esm.js
CHANGED
|
@@ -129,6 +129,9 @@ const ite = ((cond, then, orelse) => asExpr({
|
|
|
129
129
|
const and = (...expr) => asExpr({
|
|
130
130
|
raw: f => asExprRaw({ $and: expr.map(e => e.raw(f).get()) }),
|
|
131
131
|
});
|
|
132
|
+
const or = (...expr) => asExpr({
|
|
133
|
+
raw: f => asExprRaw({ $or: expr.map(e => e.raw(f).get()) }),
|
|
134
|
+
});
|
|
132
135
|
const eq = (a) => (b) => asExpr({
|
|
133
136
|
raw: f => asExprRaw({ $eq: [a.raw(f).get(), b.raw(f).get()] }),
|
|
134
137
|
});
|
|
@@ -1163,7 +1166,9 @@ const executes$1 = (view, input, streamName) => {
|
|
|
1163
1166
|
_id: ['_id', 1],
|
|
1164
1167
|
}));
|
|
1165
1168
|
const run = (finalInput) => {
|
|
1166
|
-
const clear = async () => {
|
|
1169
|
+
const clear = async () => {
|
|
1170
|
+
await snapshotCollection.drop();
|
|
1171
|
+
};
|
|
1167
1172
|
const withStop = (next, tr) => {
|
|
1168
1173
|
return addTeardown(() => ({ stop, next: next(), clear }), tr);
|
|
1169
1174
|
};
|
|
@@ -1610,4 +1615,4 @@ const makeCol = async (docs, database, name) => {
|
|
|
1610
1615
|
}
|
|
1611
1616
|
};
|
|
1612
1617
|
|
|
1613
|
-
export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $sum, $unwind, $unwindDelta, $upsert, Field, Machine, add, and, array, ceil, comp, concat$1 as concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, enablePreAndPostImages, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first$1 as first, firstSure, floor, from, func, gt, gte, inArray, isArray, ite, last, log, lt, lte, makeCol, map1, mapVal, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, minDate, monthPart, multiply, ne, nil, noop, notNull, now, pair, prepare, rand, range, root, set, setField, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap };
|
|
1618
|
+
export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $sum, $unwind, $unwindDelta, $upsert, Field, Machine, add, and, array, ceil, comp, concat$1 as concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, enablePreAndPostImages, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first$1 as first, firstSure, floor, from, func, gt, gte, inArray, isArray, ite, last, log, lt, lte, makeCol, map1, mapVal, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, minDate, monthPart, multiply, ne, nil, noop, notNull, now, or, pair, prepare, rand, range, root, set, setField, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap };
|
package/index.js
CHANGED
|
@@ -131,6 +131,9 @@ const ite = ((cond, then, orelse) => asExpr({
|
|
|
131
131
|
const and = (...expr) => asExpr({
|
|
132
132
|
raw: f => asExprRaw({ $and: expr.map(e => e.raw(f).get()) }),
|
|
133
133
|
});
|
|
134
|
+
const or = (...expr) => asExpr({
|
|
135
|
+
raw: f => asExprRaw({ $or: expr.map(e => e.raw(f).get()) }),
|
|
136
|
+
});
|
|
134
137
|
const eq = (a) => (b) => asExpr({
|
|
135
138
|
raw: f => asExprRaw({ $eq: [a.raw(f).get(), b.raw(f).get()] }),
|
|
136
139
|
});
|
|
@@ -1165,7 +1168,9 @@ const executes$1 = (view, input, streamName) => {
|
|
|
1165
1168
|
_id: ['_id', 1],
|
|
1166
1169
|
}));
|
|
1167
1170
|
const run = (finalInput) => {
|
|
1168
|
-
const clear = async () => {
|
|
1171
|
+
const clear = async () => {
|
|
1172
|
+
await snapshotCollection.drop();
|
|
1173
|
+
};
|
|
1169
1174
|
const withStop = (next, tr) => {
|
|
1170
1175
|
return addTeardown(() => ({ stop, next: next(), clear }), tr);
|
|
1171
1176
|
};
|
|
@@ -1710,6 +1715,7 @@ exports.nil = nil;
|
|
|
1710
1715
|
exports.noop = noop;
|
|
1711
1716
|
exports.notNull = notNull;
|
|
1712
1717
|
exports.now = now;
|
|
1718
|
+
exports.or = or;
|
|
1713
1719
|
exports.pair = pair;
|
|
1714
1720
|
exports.prepare = prepare;
|
|
1715
1721
|
exports.rand = rand;
|