@e7w/easy-model 0.1.2 → 0.1.3

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.d.ts CHANGED
@@ -3,8 +3,12 @@
3
3
  export type WatchCallback = (path: Array<string | symbol>, oldValue: any, newValue: any) => void;
4
4
  export declare function watch(target: object, callback: WatchCallback): () => void;
5
5
  export declare function provide<T extends new (...args: any[]) => InstanceType<T>>(ctor: T): T & ((...args: ConstructorParameters<T>) => InstanceType<T>);
6
- export declare function revoke(model: object): void;
6
+ export declare function finalizationRegistry(model: object): {
7
+ register(callback: () => void): void;
8
+ unregister(): void;
9
+ };
7
10
  export declare function useModel<T extends new (...args: any[]) => InstanceType<T>>(Ctor: T, args: ConstructorParameters<T>): InstanceType<T>;
8
11
  export declare function useModel<T extends new (...args: any[]) => InstanceType<T>>(Ctor: T, args: ConstructorParameters<T> | null): InstanceType<T> | Partial<InstanceType<T>>;
12
+ export declare function useInstance<T extends object>(model: T): T;
9
13
 
10
14
  export {};
package/dist/index.es.js CHANGED
@@ -1,136 +1,158 @@
1
- import { useReducer as O, useEffect as E } from "react";
2
- const b = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), P = Symbol("origin");
3
- let l = null;
4
- const _ = ["includes", "indexOf", "lastIndexOf"], j = [Promise, WeakMap, WeakSet, Map, Set];
5
- function d(e) {
6
- if (e = u(e), !e || j.some((r) => e instanceof r)) return e;
7
- if (b.has(e)) return b.get(e);
8
- const o = {}, c = {}, i = new Proxy(e, {
9
- get(r, n, s) {
10
- if (n === P) return r;
11
- let t = R(r, n);
12
- return t || (t = Reflect.get(r, n, s), typeof t == "function" ? (c[n] || (c[n] = t.bind(d(r))), t = c[n]) : typeof t == "object" && t !== null && (o[n] || (o[n] = m(t, v(e, n))), t = d(t)), t);
1
+ import { useRef as C, useReducer as A, useEffect as L } from "react";
2
+ const _ = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), O = Symbol("origin");
3
+ let d = null;
4
+ const v = ["includes", "indexOf", "lastIndexOf"], U = [Promise, RegExp, Date, WeakMap, WeakSet, Map, Set];
5
+ function w(e) {
6
+ if (e = l(e), !e || U.some((c) => e instanceof c)) return e;
7
+ if (_.has(e)) return _.get(e);
8
+ const n = {}, r = {}, i = new Proxy(e, {
9
+ get(c, t, s) {
10
+ if (t === O) return c;
11
+ let o = j(c, t);
12
+ return o || (o = Reflect.get(c, t, s), typeof o == "function" ? (r[t] || (r[t] = o.bind(w(c))), o = r[t]) : typeof o == "object" && o !== null && (n[t] || (n[t] = R(o, x(e, t))), o = w(o)), o);
13
13
  },
14
- set(r, n, s, t) {
15
- let f = Reflect.get(r, n, t);
16
- if (f = u(f), s = u(s), f === s) return !0;
17
- const k = Reflect.set(r, n, s, t);
18
- if (k) {
19
- o[n] && (o[n](), delete o[n]), typeof s == "object" && s !== null && (o[n] = m(s, v(e, n))), c[n] && delete c[n];
20
- const S = l;
21
- l = /* @__PURE__ */ new WeakSet(), M(r, [n], f, s), l = S;
14
+ set(c, t, s, o) {
15
+ let u = Reflect.get(c, t, o);
16
+ if (u = l(u), s = l(s), u === s) return !0;
17
+ const f = Reflect.set(c, t, s, o);
18
+ if (f) {
19
+ n[t] && (n[t](), delete n[t]), typeof s == "object" && s !== null && (n[t] = R(s, x(e, t))), r[t] && delete r[t];
20
+ const y = d;
21
+ d = /* @__PURE__ */ new WeakSet(), W(c, [t], u, s), d = y;
22
22
  }
23
- return k;
23
+ return f;
24
24
  },
25
- deleteProperty(r, n) {
26
- let s = Reflect.get(r, n);
27
- s = u(s);
28
- const t = Reflect.deleteProperty(r, n);
29
- return t && (o[n] && (o[n](), delete o[n]), c[n] && delete c[n], M(r, [n], s, void 0)), t;
25
+ deleteProperty(c, t) {
26
+ let s = Reflect.get(c, t);
27
+ s = l(s);
28
+ const o = Reflect.deleteProperty(c, t);
29
+ return o && (n[t] && (n[t](), delete n[t]), r[t] && delete r[t], W(c, [t], s, void 0)), o;
30
30
  }
31
31
  });
32
- return b.set(e, i), i;
32
+ return _.set(e, i), i;
33
33
  }
34
- function m(e, o) {
35
- e = u(e), y.has(e) || y.set(e, /* @__PURE__ */ new Map());
36
- const c = y.get(e), i = Symbol();
37
- return c.set(i, o), function() {
38
- c.delete(i);
34
+ function R(e, n) {
35
+ e = l(e), p.has(e) || p.set(e, /* @__PURE__ */ new Map());
36
+ const r = p.get(e), i = Symbol();
37
+ return r.set(i, n), function() {
38
+ r.delete(i);
39
39
  };
40
40
  }
41
- function v(e, o) {
42
- return function(...c) {
43
- const [i, ...r] = c;
44
- M(e, [o, ...i], ...r);
41
+ function x(e, n) {
42
+ return function(...r) {
43
+ const [i, ...c] = r;
44
+ W(e, [n, ...i], ...c);
45
45
  };
46
46
  }
47
- function M(e, ...o) {
48
- if (e = u(e), l != null && l.has(e)) return;
49
- l == null || l.add(e);
50
- const c = y.get(e);
51
- if (!c) return;
52
- [...c.values()].forEach((r) => {
53
- const n = new EventTarget(), s = new Event("__trigger__");
54
- n.addEventListener(s.type, t), n.dispatchEvent(s);
55
- function t() {
56
- n.removeEventListener(s.type, t), r(...o);
47
+ function W(e, ...n) {
48
+ if (e = l(e), d != null && d.has(e)) return;
49
+ d == null || d.add(e);
50
+ const r = p.get(e);
51
+ if (!r) return;
52
+ [...r.values()].forEach((c) => {
53
+ const t = new EventTarget(), s = new Event("__trigger__");
54
+ t.addEventListener(s.type, o), t.dispatchEvent(s);
55
+ function o() {
56
+ t.removeEventListener(s.type, o), c(...n);
57
57
  }
58
58
  });
59
59
  }
60
- function u(e) {
61
- return typeof e != "object" || e === null ? e : e[P] ?? e;
60
+ function l(e) {
61
+ return typeof e != "object" || e === null ? e : e[O] ?? e;
62
62
  }
63
- function R(e, o) {
64
- if (e = u(e), ["constructor", "__proto__"].includes(o))
65
- return Reflect.get(e, o);
66
- if (o === "hasOwnProperty")
67
- return function(c) {
68
- return Object.prototype.hasOwnProperty.call(u(this), c);
63
+ function j(e, n) {
64
+ if (e = l(e), ["constructor", "__proto__"].includes(n))
65
+ return Reflect.get(e, n);
66
+ if (n === "hasOwnProperty")
67
+ return function(r) {
68
+ return Object.prototype.hasOwnProperty.call(l(this), r);
69
69
  };
70
- if (Array.isArray(e) && _.includes(o))
71
- return function(...c) {
72
- const i = _[o].apply(u(this), c);
73
- return i === -1 || i === !1 ? _[o].apply(u(this), c.map(u)) : i;
70
+ if (Array.isArray(e) && v.includes(n))
71
+ return function(...r) {
72
+ const i = v[n].apply(l(this), r);
73
+ return i === -1 || i === !1 ? v[n].apply(l(this), r.map(l)) : i;
74
74
  };
75
75
  }
76
- const a = Symbol("instance"), w = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet();
77
- function x(e) {
78
- if (W.has(e))
76
+ const h = Symbol("instance"), b = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
77
+ function D(e) {
78
+ if (E.has(e))
79
79
  return e;
80
- if (h.has(e))
81
- return h.get(e);
82
- const o = {};
83
- i.prototype = new Proxy(
80
+ if (b.has(e))
81
+ return b.get(e);
82
+ const n = {};
83
+ t.prototype = new Proxy(
84
84
  {
85
85
  constructor: e,
86
86
  __proto__: e.prototype
87
87
  },
88
88
  {
89
- get(r, n, s) {
90
- let t = R(r, n);
91
- return t || (t = Reflect.get(r, n, s), typeof n == "symbol" || ["constructor", "__proto__"].includes(n) || typeof t != "function") ? t : (o[n] || (o[n] = function(...f) {
92
- return t.apply(d(this), f);
93
- }), o[n]);
89
+ get(s, o, u) {
90
+ let f = j(s, o);
91
+ return f || (f = Reflect.get(s, o, u), typeof o == "symbol" || ["constructor", "__proto__"].includes(o) || typeof f != "function") ? f : (n[o] || (n[o] = function(...y) {
92
+ return f.apply(w(this), y);
93
+ }), n[o]);
94
94
  }
95
95
  }
96
96
  );
97
- const c = new Proxy(e, {
98
- apply(r, n, s) {
99
- w.has(e) || w.set(e, /* @__PURE__ */ new Map());
100
- let t = w.get(e);
101
- for (let f = 0; f < s.length; f++)
102
- t.has(s[f]) || t.set(s[f], /* @__PURE__ */ new Map()), t = t.get(s[f]);
103
- if (!t.has(a)) {
104
- t.set(a, void 0);
105
- const f = d(Reflect.construct(r, s, i));
106
- t.set(a, f), p.set(f, s);
97
+ const r = /* @__PURE__ */ new Map(), i = new FinalizationRegistry(
98
+ ({ args: s, token: o }) => {
99
+ var u;
100
+ F(r, s), (u = m.get(o)) == null || u(), i.unregister(o);
101
+ }
102
+ ), c = new Proxy(e, {
103
+ apply(s, o, u) {
104
+ var y, P, k, S;
105
+ let f = r;
106
+ for (let a = 0; a < u.length; a++)
107
+ f.has(u[a]) || f.set(u[a], /* @__PURE__ */ new Map()), f = f.get(u[a]);
108
+ if (!f.has(h) || f.get(h) !== void 0 && !((P = (y = f.get(h)) == null ? void 0 : y.deref) != null && P.call(y))) {
109
+ f.set(h, void 0);
110
+ const a = w(Reflect.construct(s, u, t));
111
+ f.set(h, new WeakRef(a));
112
+ const M = {};
113
+ z.set(a, M), i.register(a, { args: u, token: M }, M);
107
114
  }
108
- return t.get(a);
115
+ return (S = (k = f.get(h)) == null ? void 0 : k.deref) == null ? void 0 : S.call(k);
109
116
  }
110
117
  });
111
- return h.set(e, c), W.add(c), h.get(e);
112
- function i() {
118
+ return b.set(e, c), E.add(c), b.get(e);
119
+ function t() {
113
120
  }
114
121
  }
115
- function C(e) {
116
- const o = d(e);
117
- if (!p.has(o)) return;
118
- const c = p.get(o);
119
- let i = w.get(o.constructor);
120
- for (; c.length; )
121
- i = i.get(c.shift());
122
- i.delete(a), p.delete(o);
122
+ function F(e, n) {
123
+ if (n.length === 0) return e.delete(h);
124
+ const [r, ...i] = n, c = e.get(r);
125
+ if (!(c instanceof Map && (F(c, i), c.size > 0)))
126
+ return e.delete(r);
127
+ }
128
+ function q(e) {
129
+ const n = w(e), r = z.get(n);
130
+ return {
131
+ register(i) {
132
+ r && m.set(r, i);
133
+ },
134
+ unregister() {
135
+ r && m.delete(r);
136
+ }
137
+ };
138
+ }
139
+ const G = /* @__PURE__ */ Object.create(null);
140
+ function B(e, n) {
141
+ const r = D(e), i = n ? r(...n) : G;
142
+ return I(i);
123
143
  }
124
- const A = /* @__PURE__ */ Object.create(null);
125
- function L(e, o) {
126
- const c = x(e), i = o ? c(...o) : A, [, r] = O((n) => (n + 1) % 100, 0);
127
- return E(() => m(i, () => {
144
+ function I(e) {
145
+ const n = C(null);
146
+ n.current !== e && (n.current = e);
147
+ const [, r] = A((i) => (i + 1) % 100, 0);
148
+ return L(() => R(n.current, () => {
128
149
  r();
129
- }), [i]), i;
150
+ }), [n.current]), n.current;
130
151
  }
131
152
  export {
132
- x as provide,
133
- C as revoke,
134
- L as useModel,
135
- m as watch
153
+ q as finalizationRegistry,
154
+ D as provide,
155
+ I as useInstance,
156
+ B as useModel,
157
+ R as watch
136
158
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l["@e7w/easy-model"]={},l.React))})(this,function(l,d){"use strict";const _=new WeakMap,w=new WeakMap,W=Symbol("origin");let a=null;const v=["includes","indexOf","lastIndexOf"],E=[Promise,WeakMap,WeakSet,Map,Set];function h(e){if(e=u(e),!e||E.some(i=>e instanceof i))return e;if(_.has(e))return _.get(e);const o={},c={},r=new Proxy(e,{get(i,n,s){if(n===W)return i;let t=P(i,n);return t||(t=Reflect.get(i,n,s),typeof t=="function"?(c[n]||(c[n]=t.bind(h(i))),t=c[n]):typeof t=="object"&&t!==null&&(o[n]||(o[n]=p(t,S(e,n))),t=h(t)),t)},set(i,n,s,t){let f=Reflect.get(i,n,t);if(f=u(f),s=u(s),f===s)return!0;const j=Reflect.set(i,n,s,t);if(j){o[n]&&(o[n](),delete o[n]),typeof s=="object"&&s!==null&&(o[n]=p(s,S(e,n))),c[n]&&delete c[n];const F=a;a=new WeakSet,k(i,[n],f,s),a=F}return j},deleteProperty(i,n){let s=Reflect.get(i,n);s=u(s);const t=Reflect.deleteProperty(i,n);return t&&(o[n]&&(o[n](),delete o[n]),c[n]&&delete c[n],k(i,[n],s,void 0)),t}});return _.set(e,r),r}function p(e,o){e=u(e),w.has(e)||w.set(e,new Map);const c=w.get(e),r=Symbol();return c.set(r,o),function(){c.delete(r)}}function S(e,o){return function(...c){const[r,...i]=c;k(e,[o,...r],...i)}}function k(e,...o){if(e=u(e),a!=null&&a.has(e))return;a==null||a.add(e);const c=w.get(e);if(!c)return;[...c.values()].forEach(i=>{const n=new EventTarget,s=new Event("__trigger__");n.addEventListener(s.type,t),n.dispatchEvent(s);function t(){n.removeEventListener(s.type,t),i(...o)}})}function u(e){return typeof e!="object"||e===null?e:e[W]??e}function P(e,o){if(e=u(e),["constructor","__proto__"].includes(o))return Reflect.get(e,o);if(o==="hasOwnProperty")return function(c){return Object.prototype.hasOwnProperty.call(u(this),c)};if(Array.isArray(e)&&v.includes(o))return function(...c){const r=v[o].apply(u(this),c);return r===-1||r===!1?v[o].apply(u(this),c.map(u)):r}}const y=Symbol("instance"),b=new Map,m=new WeakMap,M=new WeakMap,R=new WeakSet;function O(e){if(R.has(e))return e;if(M.has(e))return M.get(e);const o={};r.prototype=new Proxy({constructor:e,__proto__:e.prototype},{get(i,n,s){let t=P(i,n);return t||(t=Reflect.get(i,n,s),typeof n=="symbol"||["constructor","__proto__"].includes(n)||typeof t!="function")?t:(o[n]||(o[n]=function(...f){return t.apply(h(this),f)}),o[n])}});const c=new Proxy(e,{apply(i,n,s){b.has(e)||b.set(e,new Map);let t=b.get(e);for(let f=0;f<s.length;f++)t.has(s[f])||t.set(s[f],new Map),t=t.get(s[f]);if(!t.has(y)){t.set(y,void 0);const f=h(Reflect.construct(i,s,r));t.set(y,f),m.set(f,s)}return t.get(y)}});return M.set(e,c),R.add(c),M.get(e);function r(){}}function x(e){const o=h(e);if(!m.has(o))return;const c=m.get(o);let r=b.get(o.constructor);for(;c.length;)r=r.get(c.shift());r.delete(y),m.delete(o)}const T=Object.create(null);function A(e,o){const c=O(e),r=o?c(...o):T,[,i]=d.useReducer(n=>(n+1)%100,0);return d.useEffect(()=>p(r,()=>{i()}),[r]),r}l.provide=O,l.revoke=x,l.useModel=A,l.watch=p,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
1
+ (function(l,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(l=typeof globalThis<"u"?globalThis:l||self,w(l["@e7w/easy-model"]={},l.React))})(this,function(l,w){"use strict";const R=new WeakMap,k=new WeakMap,O=Symbol("origin");let d=null;const m=["includes","indexOf","lastIndexOf"],L=[Promise,RegExp,Date,WeakMap,WeakSet,Map,Set];function p(e){if(e=a(e),!e||L.some(r=>e instanceof r))return e;if(R.has(e))return R.get(e);const n={},o={},s=new Proxy(e,{get(r,t,c){if(t===O)return r;let i=E(r,t);return i||(i=Reflect.get(r,t,c),typeof i=="function"?(o[t]||(o[t]=i.bind(p(r))),i=o[t]):typeof i=="object"&&i!==null&&(n[t]||(n[t]=M(i,j(e,t))),i=p(i)),i)},set(r,t,c,i){let u=Reflect.get(r,t,i);if(u=a(u),c=a(c),u===c)return!0;const f=Reflect.set(r,t,c,i);if(f){n[t]&&(n[t](),delete n[t]),typeof c=="object"&&c!==null&&(n[t]=M(c,j(e,t))),o[t]&&delete o[t];const h=d;d=new WeakSet,W(r,[t],u,c),d=h}return f},deleteProperty(r,t){let c=Reflect.get(r,t);c=a(c);const i=Reflect.deleteProperty(r,t);return i&&(n[t]&&(n[t](),delete n[t]),o[t]&&delete o[t],W(r,[t],c,void 0)),i}});return R.set(e,s),s}function M(e,n){e=a(e),k.has(e)||k.set(e,new Map);const o=k.get(e),s=Symbol();return o.set(s,n),function(){o.delete(s)}}function j(e,n){return function(...o){const[s,...r]=o;W(e,[n,...s],...r)}}function W(e,...n){if(e=a(e),d!=null&&d.has(e))return;d==null||d.add(e);const o=k.get(e);if(!o)return;[...o.values()].forEach(r=>{const t=new EventTarget,c=new Event("__trigger__");t.addEventListener(c.type,i),t.dispatchEvent(c);function i(){t.removeEventListener(c.type,i),r(...n)}})}function a(e){return typeof e!="object"||e===null?e:e[O]??e}function E(e,n){if(e=a(e),["constructor","__proto__"].includes(n))return Reflect.get(e,n);if(n==="hasOwnProperty")return function(o){return Object.prototype.hasOwnProperty.call(a(this),o)};if(Array.isArray(e)&&m.includes(n))return function(...o){const s=m[n].apply(a(this),o);return s===-1||s===!1?m[n].apply(a(this),o.map(a)):s}}const b=Symbol("instance"),_=new WeakMap,x=new WeakSet,z=new WeakMap,S=new WeakMap;function F(e){if(x.has(e))return e;if(_.has(e))return _.get(e);const n={};t.prototype=new Proxy({constructor:e,__proto__:e.prototype},{get(c,i,u){let f=E(c,i);return f||(f=Reflect.get(c,i,u),typeof i=="symbol"||["constructor","__proto__"].includes(i)||typeof f!="function")?f:(n[i]||(n[i]=function(...h){return f.apply(p(this),h)}),n[i])}});const o=new Map,s=new FinalizationRegistry(({args:c,token:i})=>{var u;T(o,c),(u=S.get(i))==null||u(),s.unregister(i)}),r=new Proxy(e,{apply(c,i,u){var h,A,v,I;let f=o;for(let y=0;y<u.length;y++)f.has(u[y])||f.set(u[y],new Map),f=f.get(u[y]);if(!f.has(b)||f.get(b)!==void 0&&!((A=(h=f.get(b))==null?void 0:h.deref)!=null&&A.call(h))){f.set(b,void 0);const y=p(Reflect.construct(c,u,t));f.set(b,new WeakRef(y));const P={};z.set(y,P),s.register(y,{args:u,token:P},P)}return(I=(v=f.get(b))==null?void 0:v.deref)==null?void 0:I.call(v)}});return _.set(e,r),x.add(r),_.get(e);function t(){}}function T(e,n){if(n.length===0)return e.delete(b);const[o,...s]=n,r=e.get(o);if(!(r instanceof Map&&(T(r,s),r.size>0)))return e.delete(o)}function U(e){const n=p(e),o=z.get(n);return{register(s){o&&S.set(o,s)},unregister(){o&&S.delete(o)}}}const g=Object.create(null);function q(e,n){const o=F(e),s=n?o(...n):g;return C(s)}function C(e){const n=w.useRef(null);n.current!==e&&(n.current=e);const[,o]=w.useReducer(s=>(s+1)%100,0);return w.useEffect(()=>M(n.current,()=>{o()}),[n.current]),n.current}l.finalizationRegistry=U,l.provide=F,l.useInstance=C,l.useModel=q,l.watch=M,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e7w/easy-model",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "module": "./dist/index.es.js",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -15,21 +15,6 @@
15
15
  "require": "./dist/index.umd.js"
16
16
  }
17
17
  },
18
- "scripts": {
19
- "dev": "vite --host",
20
- "build": "npm run build:lib && npm run build:dts",
21
- "build:lib": "rimraf dist && tsc && vite build",
22
- "build:dts": "dts-bundle-generator --config ./dts-bundle-generator.config.cjs",
23
- "test": "vitest",
24
- "test:coverage": "vitest --coverage",
25
- "lint:scripts": "eslint . --fix --ext .ts",
26
- "lint:styles": "stylelint ./**/*.{css,scss}",
27
- "format:scripts": "prettier . --write",
28
- "format:styles": "stylelint ./**/*.{css,scss} --fix",
29
- "format": "npm run format:scripts && npm run format:styles",
30
- "prepare": "husky && echo 'npx lint-staged' > .husky/pre-commit && git add .husky/pre-commit",
31
- "uninstall-husky": "npm uninstall husky --no-save && git config --unset core.hooksPath && npx rimraf .husky"
32
- },
33
18
  "peerDependencies": {
34
19
  "react": ">=17.0.0"
35
20
  },
@@ -73,5 +58,19 @@
73
58
  "README.md",
74
59
  "LICENSE.md"
75
60
  ],
76
- "license": "MIT"
77
- }
61
+ "license": "MIT",
62
+ "scripts": {
63
+ "dev": "vite --host",
64
+ "build": "npm run build:lib && npm run build:dts",
65
+ "build:lib": "rimraf dist && tsc && vite build",
66
+ "build:dts": "dts-bundle-generator --config ./dts-bundle-generator.config.cjs",
67
+ "test": "vitest",
68
+ "test:coverage": "vitest --coverage",
69
+ "lint:scripts": "eslint . --fix --ext .ts",
70
+ "lint:styles": "stylelint ./**/*.{css,scss}",
71
+ "format:scripts": "prettier . --write",
72
+ "format:styles": "stylelint ./**/*.{css,scss} --fix",
73
+ "format": "npm run format:scripts && npm run format:styles",
74
+ "uninstall-husky": "npm uninstall husky --no-save && git config --unset core.hooksPath && npx rimraf .husky"
75
+ }
76
+ }