bt-core-app 2.0.32 → 2.0.33

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.
@@ -8071,8 +8071,9 @@ function lP(e) {
8071
8071
  if (!b && e.priority != "server" && l == !0) {
8072
8072
  const I = await zl().getItem(x);
8073
8073
  if (I != null && parseFloat(I.meta.storedOn) > n - 7) {
8074
- if (t.value = I.data, a.value = I.data.length, i.value = I.meta, S.localPredicate != null) {
8075
- var k = ((C = t.value) == null ? void 0 : C.filter((E) => S.localPredicate(E))) ?? [];
8074
+ if (t.value = I.data, a.value = I.data.length, i.value = I.meta, console.log("a"), S.localPredicate != null) {
8075
+ console.log("exists a");
8076
+ var k = ((C = t.value) == null ? void 0 : C.filter((E) => !!S.localPredicate(E))) ?? [];
8076
8077
  return {
8077
8078
  count: k.length,
8078
8079
  data: k,
@@ -8087,8 +8088,9 @@ function lP(e) {
8087
8088
  }
8088
8089
  }
8089
8090
  if (e.api == null || S.localOnly) {
8090
- if (S.localPredicate != null) {
8091
- var k = ((D = t.value) == null ? void 0 : D.filter((E) => S.localPredicate(E))) ?? [];
8091
+ if (console.log("b"), S.localPredicate != null) {
8092
+ console.log("exists b");
8093
+ var k = ((D = t.value) == null ? void 0 : D.filter((E) => !!S.localPredicate(E))) ?? [];
8092
8094
  return {
8093
8095
  count: k.length,
8094
8096
  data: k,
@@ -8104,8 +8106,9 @@ function lP(e) {
8104
8106
  } else
8105
8107
  t.value ?? (t.value = []);
8106
8108
  try {
8107
- if (await d(S), S.localPredicate != null) {
8108
- var k = (($ = t.value) == null ? void 0 : $.filter((E) => S.localPredicate(E))) ?? [];
8109
+ if (await d(S), console.log("c"), S.localPredicate != null) {
8110
+ console.log("exists c");
8111
+ var k = (($ = t.value) == null ? void 0 : $.filter((E) => !!S.localPredicate(E))) ?? [];
8109
8112
  return {
8110
8113
  count: k.length,
8111
8114
  data: k,
@@ -8138,19 +8141,19 @@ function lP(e) {
8138
8141
  if (F != null && parseFloat(F.meta.storedOn) > n - 12) {
8139
8142
  t.value = F.data, a.value = F.data.length, i.value = F.meta;
8140
8143
  let V = (D = t.value) == null ? void 0 : D.find((j) => r(j) == b);
8141
- if (S.localPredicate != null && (V = (L = t.value) == null ? void 0 : L.find((j) => S.localPredicate(j))), V != null)
8144
+ if (console.log("d"), console.log(S.localPredicate), S.localPredicate != null && (V = (L = t.value) == null ? void 0 : L.find((j) => S.localPredicate(j))), V != null)
8142
8145
  return { data: V };
8143
8146
  }
8144
8147
  }
8145
8148
  if (e.api == null || S.localOnly) {
8146
8149
  var M = ($ = t.value) == null ? void 0 : $.find((F) => r(F) == b);
8147
- return S.localPredicate != null && (M = (P = t.value) == null ? void 0 : P.find((F) => S.localPredicate(F))), { data: M };
8150
+ return console.log("e"), console.log(S.localPredicate), S.localPredicate != null && (M = (P = t.value) == null ? void 0 : P.find((F) => S.localPredicate(F))), { data: M };
8148
8151
  } else
8149
8152
  t.value ?? (t.value = []);
8150
8153
  try {
8151
8154
  await d(S);
8152
8155
  var C = (I = t.value) == null ? void 0 : I.find((F) => r(F) == b);
8153
- return S.localPredicate != null && (C = (E = t.value) == null ? void 0 : E.find((F) => S.localPredicate(F))), { data: C };
8156
+ return console.log("f"), console.log(S.localPredicate), S.localPredicate != null && (C = (E = t.value) == null ? void 0 : E.find((F) => S.localPredicate(F))), { data: C };
8154
8157
  } catch (F) {
8155
8158
  let V = F;
8156
8159
  throw new Error(V.message ?? "Problem");
package/dist/index.d.ts CHANGED
@@ -1608,7 +1608,7 @@ export declare interface StorePathOptions extends PathOptions {
1608
1608
  /**will store this request in session as a special memory in the pinia store */
1609
1609
  getStorageKey?: (dOptions: GetStorageKeyOptions) => string;
1610
1610
  localOnly?: boolean;
1611
- localPredicate?: <T>(item: T) => boolean;
1611
+ localPredicate?: (item: any) => boolean;
1612
1612
  storeKey?: string;
1613
1613
  /**PLU Only */
1614
1614
  dateFrom?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {