@jsdev_ninja/core 0.10.0 → 0.10.2
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/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.es.js +21 -20
- package/dist/core.es.js.map +1 -1
- package/dist/core.umd.js +1 -1
- package/dist/core.umd.js.map +1 -1
- package/dist/entities/Store.d.ts +3 -0
- package/dist/entities/Store.d.ts.map +1 -1
- package/dist/entities/Store.js +1 -0
- package/lib/entities/Profile.ts +2 -0
- package/lib/entities/Store.ts +1 -0
- package/package.json +1 -1
package/dist/core.es.js
CHANGED
|
@@ -329,7 +329,7 @@ class O {
|
|
|
329
329
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const je = (r, e) => {
|
|
333
333
|
if (z(e))
|
|
334
334
|
return { success: !0, data: e.value };
|
|
335
335
|
if (!r.common.issues.length)
|
|
@@ -416,7 +416,7 @@ class _ {
|
|
|
416
416
|
data: e,
|
|
417
417
|
parsedType: R(e)
|
|
418
418
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
419
|
-
return
|
|
419
|
+
return je(s, a);
|
|
420
420
|
}
|
|
421
421
|
"~validate"(e) {
|
|
422
422
|
var t, n;
|
|
@@ -470,7 +470,7 @@ class _ {
|
|
|
470
470
|
data: e,
|
|
471
471
|
parsedType: R(e)
|
|
472
472
|
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (ee(s) ? s : Promise.resolve(s));
|
|
473
|
-
return
|
|
473
|
+
return je(n, a);
|
|
474
474
|
}
|
|
475
475
|
refine(e, t) {
|
|
476
476
|
const n = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
|
|
@@ -1595,7 +1595,7 @@ function B(r) {
|
|
|
1595
1595
|
} else return r instanceof A ? new A({
|
|
1596
1596
|
...r._def,
|
|
1597
1597
|
type: B(r.element)
|
|
1598
|
-
}) : r instanceof N ? N.create(B(r.unwrap())) : r instanceof D ? D.create(B(r.unwrap())) : r instanceof
|
|
1598
|
+
}) : r instanceof N ? N.create(B(r.unwrap())) : r instanceof D ? D.create(B(r.unwrap())) : r instanceof j ? j.create(r.items.map((e) => B(e))) : r;
|
|
1599
1599
|
}
|
|
1600
1600
|
class x extends _ {
|
|
1601
1601
|
constructor() {
|
|
@@ -1957,7 +1957,7 @@ se.create = (r, e) => new se({
|
|
|
1957
1957
|
typeName: y.ZodUnion,
|
|
1958
1958
|
...v(e)
|
|
1959
1959
|
});
|
|
1960
|
-
const
|
|
1960
|
+
const E = (r) => r instanceof oe ? E(r.schema) : r instanceof I ? E(r.innerType()) : r instanceof de ? [r.value] : r instanceof V ? r.options : r instanceof ce ? b.objectValues(r.enum) : r instanceof ue ? E(r._def.innerType) : r instanceof re ? [void 0] : r instanceof ne ? [null] : r instanceof N ? [void 0, ...E(r.unwrap())] : r instanceof D ? [null, ...E(r.unwrap())] : r instanceof Ie || r instanceof fe ? E(r.unwrap()) : r instanceof le ? E(r._def.innerType) : [];
|
|
1961
1961
|
class ke extends _ {
|
|
1962
1962
|
_parse(e) {
|
|
1963
1963
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -2002,7 +2002,7 @@ class ke extends _ {
|
|
|
2002
2002
|
static create(e, t, n) {
|
|
2003
2003
|
const s = /* @__PURE__ */ new Map();
|
|
2004
2004
|
for (const a of t) {
|
|
2005
|
-
const i =
|
|
2005
|
+
const i = E(a.shape[e]);
|
|
2006
2006
|
if (!i.length)
|
|
2007
2007
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2008
2008
|
for (const o of i) {
|
|
@@ -2084,7 +2084,7 @@ ae.create = (r, e, t) => new ae({
|
|
|
2084
2084
|
typeName: y.ZodIntersection,
|
|
2085
2085
|
...v(t)
|
|
2086
2086
|
});
|
|
2087
|
-
class
|
|
2087
|
+
class j extends _ {
|
|
2088
2088
|
_parse(e) {
|
|
2089
2089
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2090
2090
|
if (n.parsedType !== h.array)
|
|
@@ -2118,16 +2118,16 @@ class E extends _ {
|
|
|
2118
2118
|
return this._def.items;
|
|
2119
2119
|
}
|
|
2120
2120
|
rest(e) {
|
|
2121
|
-
return new
|
|
2121
|
+
return new j({
|
|
2122
2122
|
...this._def,
|
|
2123
2123
|
rest: e
|
|
2124
2124
|
});
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
|
|
2127
|
+
j.create = (r, e) => {
|
|
2128
2128
|
if (!Array.isArray(r))
|
|
2129
2129
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2130
|
-
return new
|
|
2130
|
+
return new j({
|
|
2131
2131
|
items: r,
|
|
2132
2132
|
typeName: y.ZodTuple,
|
|
2133
2133
|
rest: null,
|
|
@@ -2364,7 +2364,7 @@ class q extends _ {
|
|
|
2364
2364
|
args(...e) {
|
|
2365
2365
|
return new q({
|
|
2366
2366
|
...this._def,
|
|
2367
|
-
args:
|
|
2367
|
+
args: j.create(e).rest(L.create())
|
|
2368
2368
|
});
|
|
2369
2369
|
}
|
|
2370
2370
|
returns(e) {
|
|
@@ -2381,7 +2381,7 @@ class q extends _ {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
static create(e, t, n) {
|
|
2383
2383
|
return new q({
|
|
2384
|
-
args: e ||
|
|
2384
|
+
args: e || j.create([]).rest(L.create()),
|
|
2385
2385
|
returns: t || L.create(),
|
|
2386
2386
|
typeName: y.ZodFunction,
|
|
2387
2387
|
...v(n)
|
|
@@ -2810,7 +2810,7 @@ fe.create = (r, e) => new fe({
|
|
|
2810
2810
|
typeName: y.ZodReadonly,
|
|
2811
2811
|
...v(e)
|
|
2812
2812
|
});
|
|
2813
|
-
function
|
|
2813
|
+
function Ee(r, e) {
|
|
2814
2814
|
const t = typeof r == "function" ? r(e) : typeof r == "string" ? { message: r } : r;
|
|
2815
2815
|
return typeof t == "string" ? { message: t } : t;
|
|
2816
2816
|
}
|
|
@@ -2822,12 +2822,12 @@ function ze(r, e = {}, t) {
|
|
|
2822
2822
|
return o.then((f) => {
|
|
2823
2823
|
var u, p;
|
|
2824
2824
|
if (!f) {
|
|
2825
|
-
const T =
|
|
2825
|
+
const T = Ee(e, n), me = (p = (u = T.fatal) !== null && u !== void 0 ? u : t) !== null && p !== void 0 ? p : !0;
|
|
2826
2826
|
s.addIssue({ code: "custom", ...T, fatal: me });
|
|
2827
2827
|
}
|
|
2828
2828
|
});
|
|
2829
2829
|
if (!o) {
|
|
2830
|
-
const f =
|
|
2830
|
+
const f = Ee(e, n), u = (i = (a = f.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0;
|
|
2831
2831
|
s.addIssue({ code: "custom", ...f, fatal: u });
|
|
2832
2832
|
}
|
|
2833
2833
|
}) : Y.create();
|
|
@@ -2841,7 +2841,7 @@ var y;
|
|
|
2841
2841
|
})(y || (y = {}));
|
|
2842
2842
|
const vt = (r, e = {
|
|
2843
2843
|
message: `Input not instance of ${r.name}`
|
|
2844
|
-
}) => ze((t) => t instanceof r, e), Ue = C.create, Fe = $.create, _t = xe.create, bt = M.create, Be = te.create, xt = U.create, kt = ve.create, wt = re.create, Tt = ne.create, Zt = Y.create, St = L.create, Ct = P.create, At = _e.create, It = A.create, Nt = x.create, Ot = x.strictCreate,
|
|
2844
|
+
}) => ze((t) => t instanceof r, e), Ue = C.create, Fe = $.create, _t = xe.create, bt = M.create, Be = te.create, xt = U.create, kt = ve.create, wt = re.create, Tt = ne.create, Zt = Y.create, St = L.create, Ct = P.create, At = _e.create, It = A.create, Nt = x.create, Ot = x.strictCreate, jt = se.create, Et = ke.create, Rt = ae.create, Pt = j.create, $t = ie.create, Mt = be.create, Vt = F.create, Dt = q.create, Lt = oe.create, zt = de.create, Ut = V.create, Ft = ce.create, Bt = H.create, Re = I.create, Wt = N.create, qt = D.create, Jt = I.createWithPreprocess, Yt = he.create, Ht = () => Ue().optional(), Gt = () => Fe().optional(), Qt = () => Be().optional(), Xt = {
|
|
2845
2845
|
string: (r) => C.create({ ...r, coerce: !0 }),
|
|
2846
2846
|
number: (r) => $.create({ ...r, coerce: !0 }),
|
|
2847
2847
|
boolean: (r) => te.create({
|
|
@@ -2894,7 +2894,7 @@ var d = /* @__PURE__ */ Object.freeze({
|
|
|
2894
2894
|
ZodUnion: se,
|
|
2895
2895
|
ZodDiscriminatedUnion: ke,
|
|
2896
2896
|
ZodIntersection: ae,
|
|
2897
|
-
ZodTuple:
|
|
2897
|
+
ZodTuple: j,
|
|
2898
2898
|
ZodRecord: ie,
|
|
2899
2899
|
ZodMap: be,
|
|
2900
2900
|
ZodSet: F,
|
|
@@ -2928,7 +2928,7 @@ var d = /* @__PURE__ */ Object.freeze({
|
|
|
2928
2928
|
bigint: bt,
|
|
2929
2929
|
boolean: Be,
|
|
2930
2930
|
date: xt,
|
|
2931
|
-
discriminatedUnion:
|
|
2931
|
+
discriminatedUnion: Et,
|
|
2932
2932
|
effect: Re,
|
|
2933
2933
|
enum: Ut,
|
|
2934
2934
|
function: Dt,
|
|
@@ -2959,7 +2959,7 @@ var d = /* @__PURE__ */ Object.freeze({
|
|
|
2959
2959
|
transformer: Re,
|
|
2960
2960
|
tuple: Pt,
|
|
2961
2961
|
undefined: wt,
|
|
2962
|
-
union:
|
|
2962
|
+
union: jt,
|
|
2963
2963
|
unknown: St,
|
|
2964
2964
|
void: At,
|
|
2965
2965
|
NEVER: Kt,
|
|
@@ -3155,8 +3155,9 @@ d.object({
|
|
|
3155
3155
|
name: d.string(),
|
|
3156
3156
|
urls: d.array(d.string()),
|
|
3157
3157
|
logoUrl: d.string(),
|
|
3158
|
-
tenantId: d.string()
|
|
3158
|
+
tenantId: d.string(),
|
|
3159
3159
|
// firebase auth tenantId
|
|
3160
|
+
paymentType: d.enum(["external", "j5"])
|
|
3160
3161
|
});
|
|
3161
3162
|
const rr = {
|
|
3162
3163
|
stores: "STORES",
|