@omegup/msync 0.1.5 → 0.1.7
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 +17 -6
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -446,7 +446,10 @@ type GI$1<GG> = Exclude<GG, keyof TS>;
|
|
|
446
446
|
type IdAndTsKeys = keyof (TS & ID);
|
|
447
447
|
type V<VV, GG extends string> = Omit<VV, IdAndTsKeys | GI$1<GG>>;
|
|
448
448
|
type Prepare<Grp, GG extends string> = TS & ID & Rec<GI$1<GG>, Grp>;
|
|
449
|
-
type
|
|
449
|
+
type Par<T> = {
|
|
450
|
+
[P in keyof T]?: T[P] | null;
|
|
451
|
+
};
|
|
452
|
+
type Loose<Grp, VV, GG extends string> = Prepare<Grp, GG> & Par<V<VV, GG>>;
|
|
450
453
|
type Strict<Grp, VV, GG extends string, EE> = Prepare<Grp, GG> & V<VV, GG> & Omit<EE, IdAndTsKeys | GI$1<GG> | keyof V<VV, GG>>;
|
|
451
454
|
type V_Grp<VV, GG extends string, Grp> = Rec<GI$1<GG>, Grp> & V<VV, GG>;
|
|
452
455
|
type Extra<EE, VV, GG extends string> = Omit<EE, IdAndTsKeys | GI$1<GG> | keyof V<VV, GG>>;
|
|
@@ -533,7 +536,9 @@ interface SnapshotStreamHKT extends HKT<O2> {
|
|
|
533
536
|
interface DeltaHKT extends HKT<O3> {
|
|
534
537
|
readonly out: DeltaStages<I<O3, this>[0], I<O3, this>[1], I<O3, this>[2]>;
|
|
535
538
|
}
|
|
536
|
-
declare const staging: <V extends Model, KK extends StrKey<V>>(view: View<V, Allowed$1<KK
|
|
539
|
+
declare const staging: <V extends Model, KK extends StrKey<V>>(view: View<V, Allowed$1<KK>> & {
|
|
540
|
+
needs?: Partial<Record<KK, 0 | 1>>;
|
|
541
|
+
}, streamName: string, skip?: boolean, after?: () => Promise<void>) => DeltaPipe<AllowedPick$1<V, KK>, AllowedPick$1<V, KK>, SnapshotStreamHKT, DeltaHKT>;
|
|
537
542
|
|
|
538
543
|
type Allowed<K> = Exclude<K, 'deletedAt' | '_id'>;
|
|
539
544
|
type AllowedPick<V extends Model, K extends StrKey<V>> = OPickD<V, Allowed<K>>;
|
|
@@ -552,8 +557,14 @@ interface SnapshotStreamHKT2 extends HKT<O2> {
|
|
|
552
557
|
declare const single: <V extends Model, KK extends StrKey<V>>(view: View<V, Allowed$1<KK>>, needs?: Partial<Record<KK, 0 | 1>>) => DeltaPipe<AllowedPick$1<V, KK>, AllowedPick$1<V, KK>, SnapshotStreamHKT2, DeltaHKT>;
|
|
553
558
|
|
|
554
559
|
declare const max: <D, C>(...expr: Expr<number, D, C>[]) => Expr<number, D, C>;
|
|
555
|
-
declare const lt:
|
|
556
|
-
|
|
560
|
+
declare const lt: {
|
|
561
|
+
<D, C>(...expr: [Expr<Date, D, C>, Expr<Date, D, C>]): Expr<boolean, D, C>;
|
|
562
|
+
<D, C>(...expr: [Expr<number, D, C>, Expr<number, D, C>]): Expr<boolean, D, C>;
|
|
563
|
+
};
|
|
564
|
+
declare const gt: {
|
|
565
|
+
<D, C>(...expr: [Expr<Date, D, C>, Expr<Date, D, C>]): Expr<boolean, D, C>;
|
|
566
|
+
<D, C>(...expr: [Expr<number, D, C>, Expr<number, D, C>]): Expr<boolean, D, C>;
|
|
567
|
+
};
|
|
557
568
|
declare const lte: {
|
|
558
569
|
<D, C>(...expr: [Expr<Date, D, C>, Expr<Date, D, C>]): Expr<boolean, D, C>;
|
|
559
570
|
<D, C>(...expr: [Expr<number, D, C>, Expr<number, D, C>]): Expr<boolean, D, C>;
|
|
@@ -662,7 +673,7 @@ declare const wrap: <Result>(root: Machine<Result>) => Machine<Result>;
|
|
|
662
673
|
declare const $eq: <T extends unknown>(operand: rawItem & T) => Predicate<T>;
|
|
663
674
|
declare const $ne: <T extends unknown>(operand: rawItem & T) => Predicate<T>;
|
|
664
675
|
type Numeric = number | Timestamp | Date;
|
|
665
|
-
declare const comp: <D2 extends Numeric = Numeric>(op: "$
|
|
676
|
+
declare const comp: <D2 extends Numeric = Numeric>(op: "$lt" | "$gt" | "$lte" | "$gte") => <T extends Numeric>(operand: rawItem & D2) => Predicate<D2>;
|
|
666
677
|
declare const $gt: <T extends Numeric>(operand: rawItem & Numeric) => Predicate<Numeric>;
|
|
667
678
|
declare const $gtTs: <T extends Numeric>(operand: rawItem & Timestamp) => Predicate<Timestamp>;
|
|
668
679
|
declare const $gteTs: <T extends Numeric>(operand: rawItem & Timestamp) => Predicate<Timestamp>;
|
|
@@ -710,4 +721,4 @@ declare const enablePreAndPostImages: <T extends doc>(coll: Collection<T>) => Pr
|
|
|
710
721
|
declare const prepare: (testName?: string) => Promise<MongoClient$1>;
|
|
711
722
|
declare const makeCol: <T extends ID>(docs: readonly OptionalUnlessRequiredId<T>[], database: Db, name?: string) => Promise<Collection<T>>;
|
|
712
723
|
|
|
713
|
-
export { $accumulator, $and, $countDict, $entries, $eq, $exists, $expr, $getField, $group, $groupId, $groupMerge, $group_, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertPart, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map0, $map1, $match, $matchDelta, $merge, $merge2, $mergeId, $mergePart, $merge_, $ne, $nin, $nor, $or, $outerLookup, $pushDict, $rand, $reduce, $replaceWith, $set, $simpleInsert, $simpleMerge, $simpleMergePart, $sum, $type, $unwind, $unwindDelta, 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 MongoTypeNames, type N, type NoRaw, type NullToOBJ, 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, anyElementTrue, 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, not, type notArr, notNull, now, or, pair, prepare, rand, range, regex, root, set, setField, single, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap, year };
|
|
724
|
+
export { $accumulator, $and, $countDict, $entries, $eq, $exists, $expr, $getField, $group, $groupId, $groupMerge, $group_, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertPart, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map0, $map1, $match, $matchDelta, $merge, $merge2, $mergeId, $mergePart, $merge_, $ne, $nin, $nor, $or, $outerLookup, $pushDict, $rand, $reduce, $replaceWith, $set, $simpleInsert, $simpleMerge, $simpleMergePart, $sum, $type, $unwind, $unwindDelta, 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 MongoTypeNames, type N, type NoRaw, type NullToOBJ, 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, anyElementTrue, 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, type jsonItem, last, log, lt, lte, makeCol, map1, mapVal, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, minDate, monthPart, multiply, ne, nil, noop, not, type notArr, notNull, now, or, pair, prepare, rand, range, regex, root, set, setField, single, size, slice, sortArray, staging, startOf, str, sub, subtract, to, toInt, val, weekPart, wrap, year };
|
package/index.esm.js
CHANGED
|
@@ -1824,7 +1824,7 @@ const executes$2 = (view, input, streamName, skip = false, after, needs = {}) =>
|
|
|
1824
1824
|
out: run,
|
|
1825
1825
|
};
|
|
1826
1826
|
};
|
|
1827
|
-
const staging = (view, streamName, skip = false, after) => pipe(input => executes$2(view, input, streamName, skip, after), emptyDelta(), concatDelta, emptyDelta);
|
|
1827
|
+
const staging = (view, streamName, skip = false, after) => pipe(input => executes$2(view, input, streamName, skip, after, view.needs), emptyDelta(), concatDelta, emptyDelta);
|
|
1828
1828
|
|
|
1829
1829
|
const executes$1 = (view, input, streamName, needs) => {
|
|
1830
1830
|
const hash = crypto$1
|
package/index.js
CHANGED
|
@@ -1826,7 +1826,7 @@ const executes$2 = (view, input, streamName, skip = false, after, needs = {}) =>
|
|
|
1826
1826
|
out: run,
|
|
1827
1827
|
};
|
|
1828
1828
|
};
|
|
1829
|
-
const staging = (view, streamName, skip = false, after) => pipe(input => executes$2(view, input, streamName, skip, after), emptyDelta(), concatDelta, emptyDelta);
|
|
1829
|
+
const staging = (view, streamName, skip = false, after) => pipe(input => executes$2(view, input, streamName, skip, after, view.needs), emptyDelta(), concatDelta, emptyDelta);
|
|
1830
1830
|
|
|
1831
1831
|
const executes$1 = (view, input, streamName, needs) => {
|
|
1832
1832
|
const hash = crypto$1
|