@superbright/indexeddb-orm 1.0.0 → 1.0.1
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +44 -56
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs.map +1 -1
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs +49 -50
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs.map +1 -1
- package/dist/utils/dimensions.cjs +1 -1
- package/dist/utils/dimensions.cjs.map +1 -1
- package/dist/utils/dimensions.d.ts +14 -20
- package/dist/utils/dimensions.mjs +20 -23
- package/dist/utils/dimensions.mjs.map +1 -1
- package/package.json +6 -1
- package/dist/features/analytics/MixpanelProvider.cjs +0 -2
- package/dist/features/analytics/MixpanelProvider.cjs.map +0 -1
- package/dist/features/analytics/MixpanelProvider.mjs +0 -40
- package/dist/features/analytics/MixpanelProvider.mjs.map +0 -1
- package/dist/features/analytics/analytics.cjs +0 -2
- package/dist/features/analytics/analytics.cjs.map +0 -1
- package/dist/features/analytics/analytics.mjs +0 -230
- package/dist/features/analytics/analytics.mjs.map +0 -1
- package/dist/features/analytics/generateUserUUID.cjs +0 -2
- package/dist/features/analytics/generateUserUUID.cjs.map +0 -1
- package/dist/features/analytics/generateUserUUID.mjs +0 -6
- package/dist/features/analytics/generateUserUUID.mjs.map +0 -1
- package/dist/utils/casing.cjs +0 -2
- package/dist/utils/casing.cjs.map +0 -1
- package/dist/utils/casing.mjs +0 -12
- package/dist/utils/casing.mjs.map +0 -1
- package/dist/utils/collections.cjs +0 -2
- package/dist/utils/collections.cjs.map +0 -1
- package/dist/utils/collections.mjs +0 -13
- package/dist/utils/collections.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodIssueCode as c, ZodError as $ } from "./ZodError.mjs";
|
|
2
2
|
import { errorUtil as o } from "./helpers/errorUtil.mjs";
|
|
3
|
-
import { addIssueToContext as u, INVALID as p, ParseStatus as k, OK as w, isAsync as U, isValid as I, DIRTY as M, isAborted as
|
|
3
|
+
import { addIssueToContext as u, INVALID as p, ParseStatus as k, OK as w, isAsync as U, isValid as I, DIRTY as M, isAborted as se, isDirty as re } from "./helpers/parseUtil.mjs";
|
|
4
4
|
import { util as v, ZodParsedType as h, getParsedType as Z } from "./helpers/util.mjs";
|
|
5
5
|
class C {
|
|
6
6
|
constructor(e, t, s, r) {
|
|
@@ -10,7 +10,7 @@ class C {
|
|
|
10
10
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const ae = (n, e) => {
|
|
14
14
|
if (I(e))
|
|
15
15
|
return { success: !0, data: e.value };
|
|
16
16
|
if (!n.common.issues.length)
|
|
@@ -95,7 +95,7 @@ class g {
|
|
|
95
95
|
data: e,
|
|
96
96
|
parsedType: Z(e)
|
|
97
97
|
}, r = this._parseSync({ data: e, path: s.path, parent: s });
|
|
98
|
-
return
|
|
98
|
+
return ae(s, r);
|
|
99
99
|
}
|
|
100
100
|
"~validate"(e) {
|
|
101
101
|
var s, r;
|
|
@@ -149,7 +149,7 @@ class g {
|
|
|
149
149
|
data: e,
|
|
150
150
|
parsedType: Z(e)
|
|
151
151
|
}, r = this._parse({ data: e, path: s.path, parent: s }), a = await (U(r) ? r : Promise.resolve(r));
|
|
152
|
-
return
|
|
152
|
+
return ae(s, a);
|
|
153
153
|
}
|
|
154
154
|
refine(e, t) {
|
|
155
155
|
const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
|
|
@@ -212,7 +212,7 @@ class g {
|
|
|
212
212
|
}
|
|
213
213
|
default(e) {
|
|
214
214
|
const t = typeof e == "function" ? e : () => e;
|
|
215
|
-
return new
|
|
215
|
+
return new X({
|
|
216
216
|
..._(this._def),
|
|
217
217
|
innerType: this,
|
|
218
218
|
defaultValue: t,
|
|
@@ -228,7 +228,7 @@ class g {
|
|
|
228
228
|
}
|
|
229
229
|
catch(e) {
|
|
230
230
|
const t = typeof e == "function" ? e : () => e;
|
|
231
|
-
return new
|
|
231
|
+
return new K({
|
|
232
232
|
..._(this._def),
|
|
233
233
|
innerType: this,
|
|
234
234
|
catchValue: t,
|
|
@@ -243,10 +243,10 @@ class g {
|
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
pipe(e) {
|
|
246
|
-
return
|
|
246
|
+
return te.create(this, e);
|
|
247
247
|
}
|
|
248
248
|
readonly() {
|
|
249
|
-
return
|
|
249
|
+
return ee.create(this);
|
|
250
250
|
}
|
|
251
251
|
isOptional() {
|
|
252
252
|
return this.safeParse(void 0).success;
|
|
@@ -1079,7 +1079,7 @@ E.create = (n) => new E({
|
|
|
1079
1079
|
typeName: f.ZodDate,
|
|
1080
1080
|
..._(n)
|
|
1081
1081
|
});
|
|
1082
|
-
class
|
|
1082
|
+
class ne extends g {
|
|
1083
1083
|
_parse(e) {
|
|
1084
1084
|
if (this._getType(e) !== h.symbol) {
|
|
1085
1085
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1092,11 +1092,11 @@ class ie extends g {
|
|
|
1092
1092
|
return w(e.data);
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
-
|
|
1095
|
+
ne.create = (n) => new ne({
|
|
1096
1096
|
typeName: f.ZodSymbol,
|
|
1097
1097
|
..._(n)
|
|
1098
1098
|
});
|
|
1099
|
-
class
|
|
1099
|
+
class ie extends g {
|
|
1100
1100
|
_parse(e) {
|
|
1101
1101
|
if (this._getType(e) !== h.undefined) {
|
|
1102
1102
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1109,7 +1109,7 @@ class de extends g {
|
|
|
1109
1109
|
return w(e.data);
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
|
|
1112
|
+
ie.create = (n) => new ie({
|
|
1113
1113
|
typeName: f.ZodUndefined,
|
|
1114
1114
|
..._(n)
|
|
1115
1115
|
});
|
|
@@ -1130,7 +1130,7 @@ H.create = (n) => new H({
|
|
|
1130
1130
|
typeName: f.ZodNull,
|
|
1131
1131
|
..._(n)
|
|
1132
1132
|
});
|
|
1133
|
-
class
|
|
1133
|
+
class de extends g {
|
|
1134
1134
|
constructor() {
|
|
1135
1135
|
super(...arguments), this._any = !0;
|
|
1136
1136
|
}
|
|
@@ -1138,11 +1138,11 @@ class G extends g {
|
|
|
1138
1138
|
return w(e.data);
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
|
|
1141
|
+
de.create = (n) => new de({
|
|
1142
1142
|
typeName: f.ZodAny,
|
|
1143
1143
|
..._(n)
|
|
1144
1144
|
});
|
|
1145
|
-
class
|
|
1145
|
+
class G extends g {
|
|
1146
1146
|
constructor() {
|
|
1147
1147
|
super(...arguments), this._unknown = !0;
|
|
1148
1148
|
}
|
|
@@ -1150,7 +1150,7 @@ class Q extends g {
|
|
|
1150
1150
|
return w(e.data);
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1153
|
+
G.create = (n) => new G({
|
|
1154
1154
|
typeName: f.ZodUnknown,
|
|
1155
1155
|
..._(n)
|
|
1156
1156
|
});
|
|
@@ -1635,14 +1635,14 @@ F.create = (n, e) => new F({
|
|
|
1635
1635
|
typeName: f.ZodUnion,
|
|
1636
1636
|
..._(e)
|
|
1637
1637
|
});
|
|
1638
|
-
function
|
|
1638
|
+
function Q(n, e) {
|
|
1639
1639
|
const t = Z(n), s = Z(e);
|
|
1640
1640
|
if (n === e)
|
|
1641
1641
|
return { valid: !0, data: n };
|
|
1642
1642
|
if (t === h.object && s === h.object) {
|
|
1643
1643
|
const r = v.objectKeys(e), a = v.objectKeys(n).filter((i) => r.indexOf(i) !== -1), d = { ...n, ...e };
|
|
1644
1644
|
for (const i of a) {
|
|
1645
|
-
const l =
|
|
1645
|
+
const l = Q(n[i], e[i]);
|
|
1646
1646
|
if (!l.valid)
|
|
1647
1647
|
return { valid: !1 };
|
|
1648
1648
|
d[i] = l.data;
|
|
@@ -1653,7 +1653,7 @@ function X(n, e) {
|
|
|
1653
1653
|
return { valid: !1 };
|
|
1654
1654
|
const r = [];
|
|
1655
1655
|
for (let a = 0; a < n.length; a++) {
|
|
1656
|
-
const d = n[a], i = e[a], l =
|
|
1656
|
+
const d = n[a], i = e[a], l = Q(d, i);
|
|
1657
1657
|
if (!l.valid)
|
|
1658
1658
|
return { valid: !1 };
|
|
1659
1659
|
r.push(l.data);
|
|
@@ -1664,10 +1664,10 @@ function X(n, e) {
|
|
|
1664
1664
|
class W extends g {
|
|
1665
1665
|
_parse(e) {
|
|
1666
1666
|
const { status: t, ctx: s } = this._processInputParams(e), r = (a, d) => {
|
|
1667
|
-
if (
|
|
1667
|
+
if (se(a) || se(d))
|
|
1668
1668
|
return p;
|
|
1669
|
-
const i =
|
|
1670
|
-
return i.valid ? ((
|
|
1669
|
+
const i = Q(a.value, d.value);
|
|
1670
|
+
return i.valid ? ((re(a) || re(d)) && t.dirty(), { status: t.value, value: i.data }) : (u(s, {
|
|
1671
1671
|
code: c.invalid_intersection_types
|
|
1672
1672
|
}), p);
|
|
1673
1673
|
};
|
|
@@ -2171,7 +2171,7 @@ z.create = (n, e) => new z({
|
|
|
2171
2171
|
typeName: f.ZodNullable,
|
|
2172
2172
|
..._(e)
|
|
2173
2173
|
});
|
|
2174
|
-
class
|
|
2174
|
+
class X extends g {
|
|
2175
2175
|
_parse(e) {
|
|
2176
2176
|
const { ctx: t } = this._processInputParams(e);
|
|
2177
2177
|
let s = t.data;
|
|
@@ -2185,13 +2185,13 @@ class K extends g {
|
|
|
2185
2185
|
return this._def.innerType;
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
|
|
2188
|
+
X.create = (n, e) => new X({
|
|
2189
2189
|
innerType: n,
|
|
2190
2190
|
typeName: f.ZodDefault,
|
|
2191
2191
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2192
2192
|
..._(e)
|
|
2193
2193
|
});
|
|
2194
|
-
class
|
|
2194
|
+
class K extends g {
|
|
2195
2195
|
_parse(e) {
|
|
2196
2196
|
const { ctx: t } = this._processInputParams(e), s = {
|
|
2197
2197
|
...t,
|
|
@@ -2228,7 +2228,7 @@ class ee extends g {
|
|
|
2228
2228
|
return this._def.innerType;
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
|
|
2231
|
+
K.create = (n, e) => new K({
|
|
2232
2232
|
innerType: n,
|
|
2233
2233
|
typeName: f.ZodCatch,
|
|
2234
2234
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
@@ -2264,7 +2264,7 @@ class $e extends g {
|
|
|
2264
2264
|
return this._def.type;
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
|
-
class
|
|
2267
|
+
class te extends g {
|
|
2268
2268
|
_parse(e) {
|
|
2269
2269
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
2270
2270
|
if (s.common.async)
|
|
@@ -2297,14 +2297,14 @@ class se extends g {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
2299
2299
|
static create(e, t) {
|
|
2300
|
-
return new
|
|
2300
|
+
return new te({
|
|
2301
2301
|
in: e,
|
|
2302
2302
|
out: t,
|
|
2303
2303
|
typeName: f.ZodPipeline
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
class
|
|
2307
|
+
class ee extends g {
|
|
2308
2308
|
_parse(e) {
|
|
2309
2309
|
const t = this._def.innerType._parse(e), s = (r) => (I(r) && (r.value = Object.freeze(r.value)), r);
|
|
2310
2310
|
return U(t) ? t.then((r) => s(r)) : s(t);
|
|
@@ -2313,7 +2313,7 @@ class te extends g {
|
|
|
2313
2313
|
return this._def.innerType;
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2316
|
+
ee.create = (n, e) => new ee({
|
|
2317
2317
|
innerType: n,
|
|
2318
2318
|
typeName: f.ZodReadonly,
|
|
2319
2319
|
..._(e)
|
|
@@ -2326,16 +2326,16 @@ const We = b.create, Je = O.create;
|
|
|
2326
2326
|
R.create;
|
|
2327
2327
|
const Ye = B.create;
|
|
2328
2328
|
E.create;
|
|
2329
|
-
const qe = H.create, He = G.create
|
|
2329
|
+
const qe = H.create, He = G.create;
|
|
2330
2330
|
S.create;
|
|
2331
|
-
const
|
|
2331
|
+
const Ge = T.create, Qe = x.create, Xe = F.create;
|
|
2332
2332
|
W.create;
|
|
2333
2333
|
N.create;
|
|
2334
|
-
const
|
|
2334
|
+
const Ke = J.create, et = L.create;
|
|
2335
2335
|
Y.create;
|
|
2336
2336
|
A.create;
|
|
2337
2337
|
z.create;
|
|
2338
|
-
const
|
|
2338
|
+
const tt = {
|
|
2339
2339
|
string: (n) => b.create({ ...n, coerce: !0 }),
|
|
2340
2340
|
number: (n) => O.create({ ...n, coerce: !0 }),
|
|
2341
2341
|
boolean: (n) => B.create({
|
|
@@ -2347,14 +2347,14 @@ const st = {
|
|
|
2347
2347
|
};
|
|
2348
2348
|
export {
|
|
2349
2349
|
g as Schema,
|
|
2350
|
-
|
|
2350
|
+
de as ZodAny,
|
|
2351
2351
|
T as ZodArray,
|
|
2352
2352
|
R as ZodBigInt,
|
|
2353
2353
|
B as ZodBoolean,
|
|
2354
2354
|
$e as ZodBranded,
|
|
2355
|
-
|
|
2355
|
+
K as ZodCatch,
|
|
2356
2356
|
E as ZodDate,
|
|
2357
|
-
|
|
2357
|
+
X as ZodDefault,
|
|
2358
2358
|
V as ZodEffects,
|
|
2359
2359
|
L as ZodEnum,
|
|
2360
2360
|
f as ZodFirstPartyTypeKind,
|
|
@@ -2370,33 +2370,32 @@ export {
|
|
|
2370
2370
|
O as ZodNumber,
|
|
2371
2371
|
x as ZodObject,
|
|
2372
2372
|
A as ZodOptional,
|
|
2373
|
-
|
|
2373
|
+
te as ZodPipeline,
|
|
2374
2374
|
Y as ZodPromise,
|
|
2375
|
-
|
|
2375
|
+
ee as ZodReadonly,
|
|
2376
2376
|
J as ZodRecord,
|
|
2377
2377
|
g as ZodSchema,
|
|
2378
2378
|
D as ZodSet,
|
|
2379
2379
|
b as ZodString,
|
|
2380
|
-
|
|
2380
|
+
ne as ZodSymbol,
|
|
2381
2381
|
V as ZodTransformer,
|
|
2382
2382
|
N as ZodTuple,
|
|
2383
2383
|
g as ZodType,
|
|
2384
|
-
|
|
2384
|
+
ie as ZodUndefined,
|
|
2385
2385
|
F as ZodUnion,
|
|
2386
|
-
|
|
2386
|
+
G as ZodUnknown,
|
|
2387
2387
|
ce as ZodVoid,
|
|
2388
|
-
|
|
2389
|
-
Qe as array,
|
|
2388
|
+
Ge as array,
|
|
2390
2389
|
Ye as boolean,
|
|
2391
|
-
|
|
2390
|
+
tt as coerce,
|
|
2392
2391
|
Le as datetimeRegex,
|
|
2393
|
-
|
|
2392
|
+
et as enum,
|
|
2394
2393
|
qe as null,
|
|
2395
2394
|
Je as number,
|
|
2396
|
-
|
|
2397
|
-
|
|
2395
|
+
Qe as object,
|
|
2396
|
+
Ke as record,
|
|
2398
2397
|
We as string,
|
|
2399
|
-
|
|
2400
|
-
|
|
2398
|
+
Xe as union,
|
|
2399
|
+
He as unknown
|
|
2401
2400
|
};
|
|
2402
2401
|
//# sourceMappingURL=types.mjs.map
|