@omegup/msync 0.0.32-test1 → 0.0.32-test2

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 CHANGED
@@ -457,6 +457,7 @@ type Params<As extends string, LQ extends O, RQ extends O, RE extends RQ, S exte
457
457
  as: AsLiteral<As>;
458
458
  };
459
459
  declare const $lookup: <As extends string, LQ extends doc, RQ extends O, RE extends RQ & doc, S extends notArr>(p: Params<As, LQ, RQ, RE, S>) => <LE extends LQ>(l: SnapshotStream<LQ, LE>) => SnapshotStream<LQ, LE & RORec<As, RE>>;
460
+ declare const $outerLookup: <As extends string, LQ extends doc, RQ extends O, RE extends RQ & doc, S extends notArr>(p: Params<As, LQ, RQ, RE, S>) => <LE extends LQ>(l: SnapshotStream<LQ, LE>) => SnapshotStream<LQ, LE & RORec<As, RE | null>>;
460
461
 
461
462
  declare const $matchDelta: <T extends doc>(query: Expr<boolean, T>) => RawStages<unknown, Delta<T>, Delta<T>, unknown, number>;
462
463
 
@@ -662,4 +663,4 @@ declare const enablePreAndPostImages: <T extends doc>(coll: Collection<T>) => Pr
662
663
  declare const prepare: (testName?: string) => Promise<MongoClient$1>;
663
664
  declare const makeCol: <T extends ID>(docs: readonly OptionalUnlessRequiredId<T>[], database: Db, name?: string) => Promise<Collection<T>>;
664
665
 
665
- export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $simpleInsert, $simpleMerge, $sum, $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 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, year };
666
+ export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $outerLookup, $pushDict, $rand, $replaceWith, $set, $simpleInsert, $simpleMerge, $sum, $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 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, year };
package/index.esm.js CHANGED
@@ -992,7 +992,7 @@ const join = ({ lField, rField, left, right, as }, leftSnapshot, rightSnapshot,
992
992
  },
993
993
  };
994
994
  };
995
- const $lookup1 = (p) => (input) => p.left.stages((lStages) => p.right.stages((rStages) => join(p, lStages, rStages, input)));
995
+ const $lookup1 = (p, includeNull) => (input) => p.left.stages((lStages) => p.right.stages((rStages) => join(p, lStages, rStages, input, includeNull)));
996
996
  const $lookup = (p) => (l) => $lookup1({
997
997
  right: p.from,
998
998
  as: p.as,
@@ -1000,6 +1000,13 @@ const $lookup = (p) => (l) => $lookup1({
1000
1000
  rField: p.foreignField,
1001
1001
  left: l(emptyDelta()),
1002
1002
  });
1003
+ const $outerLookup = (p) => (l) => $lookup1({
1004
+ right: p.from,
1005
+ as: p.as,
1006
+ lField: p.localField,
1007
+ rField: p.foreignField,
1008
+ left: l(emptyDelta()),
1009
+ }, null);
1003
1010
 
1004
1011
  const operator = () => (op) => (operand) => {
1005
1012
  return {
@@ -1771,4 +1778,4 @@ const makeCol = async (docs, database, name) => {
1771
1778
  }
1772
1779
  };
1773
1780
 
1774
- export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $pushDict, $rand, $replaceWith, $set, $simpleInsert, $simpleMerge, $sum, $unwind, $unwindDelta, 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, year };
1781
+ export { $accumulator, $and, $countDict, $entries, $eq, $expr, $getField, $group, $groupId, $groupMerge, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map1, $match, $matchDelta, $merge, $merge_, $ne, $nin, $nor, $or, $outerLookup, $pushDict, $rand, $replaceWith, $set, $simpleInsert, $simpleMerge, $sum, $unwind, $unwindDelta, 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, year };
package/index.js CHANGED
@@ -994,7 +994,7 @@ const join = ({ lField, rField, left, right, as }, leftSnapshot, rightSnapshot,
994
994
  },
995
995
  };
996
996
  };
997
- const $lookup1 = (p) => (input) => p.left.stages((lStages) => p.right.stages((rStages) => join(p, lStages, rStages, input)));
997
+ const $lookup1 = (p, includeNull) => (input) => p.left.stages((lStages) => p.right.stages((rStages) => join(p, lStages, rStages, input, includeNull)));
998
998
  const $lookup = (p) => (l) => $lookup1({
999
999
  right: p.from,
1000
1000
  as: p.as,
@@ -1002,6 +1002,13 @@ const $lookup = (p) => (l) => $lookup1({
1002
1002
  rField: p.foreignField,
1003
1003
  left: l(emptyDelta()),
1004
1004
  });
1005
+ const $outerLookup = (p) => (l) => $lookup1({
1006
+ right: p.from,
1007
+ as: p.as,
1008
+ lField: p.localField,
1009
+ rField: p.foreignField,
1010
+ left: l(emptyDelta()),
1011
+ }, null);
1005
1012
 
1006
1013
  const operator = () => (op) => (operand) => {
1007
1014
  return {
@@ -1806,6 +1813,7 @@ exports.$ne = $ne;
1806
1813
  exports.$nin = $nin;
1807
1814
  exports.$nor = $nor;
1808
1815
  exports.$or = $or;
1816
+ exports.$outerLookup = $outerLookup;
1809
1817
  exports.$pushDict = $pushDict;
1810
1818
  exports.$rand = $rand;
1811
1819
  exports.$replaceWith = $replaceWith;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "module": "index.esm.js",
4
4
  "typings": "index.d.ts",
5
5
  "name": "@omegup/msync",
6
- "version": "0.0.32-test1",
6
+ "version": "0.0.32-test2",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",