@omegup/msync 0.0.78 → 0.0.79

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
@@ -483,7 +483,8 @@ type s$1 = string;
483
483
  declare const $unwindDelta: <K1 extends s$1, T extends doc, K2 extends s$1, U extends doc, Null extends null = never>(k1: AsLiteral<K1>, k2: AsLiteral<K2>, k: K1 | K2 | false, includeNull?: Null, middle?: string) => RawStages<Delta<Rec<K1, T>>, Delta<Rec<K1, T> & Rec<K2, Arr<U>>>, Delta<Rec<K1, T> & Rec<K2, U | Null> & ID>>;
484
484
 
485
485
  type s = string;
486
- declare const $unwind: <T extends doc, K extends s, U extends doc>(k: AsLiteral<K>, dict: RORec<K, "key">, middle?: string) => DeltaStages<O, T & Rec<K, Arr<U>>, T & Rec<K, U>>;
486
+ type TOf<TT, K extends string> = doc & Omit<TT, K>;
487
+ declare const $unwind: <TT extends O, K extends s, U extends doc>(k: AsLiteral<K>, dict: RORec<K, "key">, middle: string) => DeltaStages<O, TOf<TT, K> & Rec<K, Arr<U>>, TOf<TT, K> & Rec<K, U>>;
487
488
 
488
489
  type Allowed$2<K extends string> = Exclude<K, keyof (TS & ID)>;
489
490
  type Patch<V, KK extends StrKey<V> = StrKey<V>> = ((OPick<V, Allowed$2<KK>> & ID) | (Rec<Allowed$2<KK>, N> & ID)) & TS;
package/index.esm.js CHANGED
@@ -1071,18 +1071,20 @@ const $unwindDelta = (k1, k2, k, includeNull, middle) => {
1071
1071
  return stages;
1072
1072
  };
1073
1073
 
1074
- const $unwind = (k, dict, middle) => ({
1075
- delta: link()
1076
- .with($replaceWithDelta(field({
1077
- left: ['left', root().expr()],
1078
- right: ['right', root().of(k).expr()],
1079
- })))
1080
- .with($unwindDelta('left', 'right', false, undefined, middle))
1081
- .with($replaceWithDelta(mergeObjects(root().of('left').expr(), fieldM({
1082
- key: root().of('right').expr(),
1083
- }, dict)))).stages,
1084
- raw: $unwind1(k),
1085
- });
1074
+ const $unwind = (k, dict, middle) => {
1075
+ return {
1076
+ delta: link()
1077
+ .with($replaceWithDelta(field({
1078
+ left: ['left', root().expr()],
1079
+ right: ['right', root().of(k).expr()],
1080
+ })))
1081
+ .with($unwindDelta('left', 'right', false, undefined, middle))
1082
+ .with($replaceWithDelta(mergeObjects(root().of('left').expr(), fieldM({
1083
+ key: root().of('right').expr(),
1084
+ }, dict)))).stages,
1085
+ raw: $unwind1(k),
1086
+ };
1087
+ };
1086
1088
 
1087
1089
  const $lookupDelta = ({ field1, field2 }, { coll, exec, input }, k1, k2, k, includeNull) => {
1088
1090
  return link()
package/index.js CHANGED
@@ -1073,18 +1073,20 @@ const $unwindDelta = (k1, k2, k, includeNull, middle) => {
1073
1073
  return stages;
1074
1074
  };
1075
1075
 
1076
- const $unwind = (k, dict, middle) => ({
1077
- delta: link()
1078
- .with($replaceWithDelta(field({
1079
- left: ['left', root().expr()],
1080
- right: ['right', root().of(k).expr()],
1081
- })))
1082
- .with($unwindDelta('left', 'right', false, undefined, middle))
1083
- .with($replaceWithDelta(mergeObjects(root().of('left').expr(), fieldM({
1084
- key: root().of('right').expr(),
1085
- }, dict)))).stages,
1086
- raw: $unwind1(k),
1087
- });
1076
+ const $unwind = (k, dict, middle) => {
1077
+ return {
1078
+ delta: link()
1079
+ .with($replaceWithDelta(field({
1080
+ left: ['left', root().expr()],
1081
+ right: ['right', root().of(k).expr()],
1082
+ })))
1083
+ .with($unwindDelta('left', 'right', false, undefined, middle))
1084
+ .with($replaceWithDelta(mergeObjects(root().of('left').expr(), fieldM({
1085
+ key: root().of('right').expr(),
1086
+ }, dict)))).stages,
1087
+ raw: $unwind1(k),
1088
+ };
1089
+ };
1088
1090
 
1089
1091
  const $lookupDelta = ({ field1, field2 }, { coll, exec, input }, k1, k2, k, includeNull) => {
1090
1092
  return link()
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.78",
6
+ "version": "0.0.79",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",