@net-vert/core 0.1.0 → 0.1.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/README.md +0 -2
- package/dist/index.js +124 -189
- package/dist/index.umd.cjs +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -83,7 +83,6 @@ retryApi.get('/unstable-api');
|
|
|
83
83
|
## 🔎 缓存设计说明
|
|
84
84
|
|
|
85
85
|
- 本库默认内置缓存支持
|
|
86
|
-
- **后续将完全依赖官方独立包:`@net-vert/cache`**
|
|
87
86
|
- 用户无需关注存储机制,专注请求本身
|
|
88
87
|
|
|
89
88
|
---
|
|
@@ -98,7 +97,6 @@ retryApi.get('/unstable-api');
|
|
|
98
97
|
| `requestExtender.idempotencyRequestor(options)` | 创建幂等请求器 |
|
|
99
98
|
| `requestExtender.retryRequestor(options)` | 创建重试请求器 |
|
|
100
99
|
|
|
101
|
-
非常专业!以下是针对你这份缓存扩展的专属文档(带源码思路和示例):
|
|
102
100
|
|
|
103
101
|
---
|
|
104
102
|
|
package/dist/index.js
CHANGED
|
@@ -1,244 +1,179 @@
|
|
|
1
|
+
import h from "localforage";
|
|
2
|
+
import { TaskQueue as I } from "id-queue";
|
|
1
3
|
const f = {
|
|
2
|
-
get: (
|
|
3
|
-
url:
|
|
4
|
+
get: (t, e) => ({
|
|
5
|
+
url: t,
|
|
4
6
|
method: "get",
|
|
5
7
|
...e,
|
|
6
8
|
params: e == null ? void 0 : e.params
|
|
7
9
|
}),
|
|
8
|
-
post: (
|
|
9
|
-
url:
|
|
10
|
+
post: (t, e, r) => ({
|
|
11
|
+
url: t,
|
|
10
12
|
method: "post",
|
|
11
13
|
data: e,
|
|
12
|
-
headers: { "Content-Type": "application/json", ...
|
|
13
|
-
...
|
|
14
|
+
headers: { "Content-Type": "application/json", ...r == null ? void 0 : r.headers },
|
|
15
|
+
...r
|
|
14
16
|
}),
|
|
15
|
-
delete: (
|
|
16
|
-
url:
|
|
17
|
+
delete: (t, e) => ({
|
|
18
|
+
url: t,
|
|
17
19
|
method: "delete",
|
|
18
20
|
...e
|
|
19
21
|
}),
|
|
20
|
-
put: (
|
|
21
|
-
url:
|
|
22
|
+
put: (t, e, r) => ({
|
|
23
|
+
url: t,
|
|
22
24
|
method: "put",
|
|
23
25
|
data: e,
|
|
24
|
-
headers: { "Content-Type": "application/json", ...
|
|
25
|
-
...
|
|
26
|
+
headers: { "Content-Type": "application/json", ...r == null ? void 0 : r.headers },
|
|
27
|
+
...r
|
|
26
28
|
}),
|
|
27
|
-
request: (
|
|
29
|
+
request: (t) => t
|
|
28
30
|
};
|
|
29
|
-
function
|
|
31
|
+
function j(t) {
|
|
30
32
|
const e = {};
|
|
31
33
|
return Object.keys(f).forEach(
|
|
32
|
-
(
|
|
33
|
-
e[
|
|
34
|
-
const n = f[
|
|
35
|
-
return
|
|
34
|
+
(r) => {
|
|
35
|
+
e[r] = (...o) => {
|
|
36
|
+
const n = f[r](...o);
|
|
37
|
+
return t(n);
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
), {
|
|
39
41
|
...e,
|
|
40
|
-
request:
|
|
42
|
+
request: t
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
const e =
|
|
47
|
-
if (!e) throw new Error(`Requestor实例 ${
|
|
45
|
+
const R = "default", k = /* @__PURE__ */ new Map(), U = (t, e = R) => {
|
|
46
|
+
k.set(e, j(t));
|
|
47
|
+
}, g = (t = R) => {
|
|
48
|
+
const e = k.get(t);
|
|
49
|
+
if (!e) throw new Error(`Requestor实例 ${t} 未注册`);
|
|
48
50
|
return e;
|
|
49
51
|
};
|
|
50
|
-
class
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return !!localStorage.getItem(e);
|
|
52
|
+
class E {
|
|
53
|
+
constructor(e) {
|
|
54
|
+
e && h.config(e);
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const t = localStorage.getItem(e);
|
|
58
|
-
if (t)
|
|
59
|
-
try {
|
|
60
|
-
return JSON.parse(t);
|
|
61
|
-
} catch (s) {
|
|
62
|
-
console.error("Error parsing cached data", s);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
56
|
+
async has(e) {
|
|
57
|
+
return await h.getItem(e) !== null;
|
|
65
58
|
}
|
|
66
|
-
|
|
67
|
-
set(e, t) {
|
|
59
|
+
async get(e) {
|
|
68
60
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
return await h.getItem(e) ?? void 0;
|
|
62
|
+
} catch (r) {
|
|
63
|
+
console.error("Error getting data", r);
|
|
64
|
+
return;
|
|
73
65
|
}
|
|
74
|
-
return t;
|
|
75
66
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
async set(e, r) {
|
|
68
|
+
return await h.setItem(e, r), r;
|
|
69
|
+
}
|
|
70
|
+
async delete(e) {
|
|
71
|
+
await h.removeItem(e);
|
|
79
72
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
localStorage.clear();
|
|
73
|
+
async clear() {
|
|
74
|
+
await h.clear();
|
|
83
75
|
}
|
|
84
76
|
}
|
|
85
|
-
const
|
|
86
|
-
const
|
|
77
|
+
const S = new E(), T = /* @__PURE__ */ new Map(), $ = (t) => t ? S : T, D = () => {
|
|
78
|
+
const t = /* @__PURE__ */ new Map();
|
|
87
79
|
return {
|
|
88
|
-
getPromise: (
|
|
89
|
-
setPromise: (
|
|
90
|
-
|
|
80
|
+
getPromise: (s) => t.get(s),
|
|
81
|
+
setPromise: (s, i) => {
|
|
82
|
+
t.set(s, i);
|
|
91
83
|
},
|
|
92
|
-
delPromise: (
|
|
93
|
-
|
|
84
|
+
delPromise: (s) => {
|
|
85
|
+
t.delete(s);
|
|
94
86
|
},
|
|
95
87
|
clearCache: () => {
|
|
96
|
-
|
|
88
|
+
t.clear();
|
|
97
89
|
}
|
|
98
90
|
};
|
|
99
|
-
},
|
|
100
|
-
value:
|
|
91
|
+
}, _ = (t, e) => ({
|
|
92
|
+
value: t,
|
|
101
93
|
expiresAt: Date.now() + e
|
|
102
|
-
}),
|
|
103
|
-
key: (
|
|
94
|
+
}), z = (t) => t.expiresAt > Date.now(), A = {
|
|
95
|
+
key: (t) => t.url,
|
|
104
96
|
persist: !1,
|
|
105
97
|
duration: 1 / 0
|
|
106
|
-
},
|
|
107
|
-
const e = {
|
|
108
|
-
get(
|
|
109
|
-
return async (...
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
113
|
-
const
|
|
114
|
-
let
|
|
115
|
-
if (
|
|
98
|
+
}, x = (t) => {
|
|
99
|
+
const e = { ...A, ...t }, r = $(e.persist), { getPromise: o, setPromise: n, delPromise: s } = D(), i = {
|
|
100
|
+
get(d, c) {
|
|
101
|
+
return async (...u) => {
|
|
102
|
+
const l = f[c](...u), a = e.key(l), p = o(a);
|
|
103
|
+
if (p)
|
|
104
|
+
return p;
|
|
105
|
+
const C = r.get(a);
|
|
106
|
+
let w = !1;
|
|
107
|
+
if (C && z(C)) {
|
|
116
108
|
try {
|
|
117
|
-
|
|
109
|
+
w = e.isValid ? await e.isValid({
|
|
118
110
|
key: a,
|
|
119
|
-
config:
|
|
120
|
-
cachedData:
|
|
111
|
+
config: l,
|
|
112
|
+
cachedData: C
|
|
121
113
|
}) : !0;
|
|
122
|
-
} catch (
|
|
123
|
-
console.error(`校验异常 ${a}`,
|
|
114
|
+
} catch (m) {
|
|
115
|
+
console.error(`校验异常 ${a}`, m);
|
|
124
116
|
}
|
|
125
|
-
|
|
117
|
+
w || r.delete(a);
|
|
126
118
|
}
|
|
127
|
-
if (
|
|
128
|
-
return
|
|
129
|
-
const P = Reflect.apply(
|
|
130
|
-
const
|
|
119
|
+
if (w)
|
|
120
|
+
return C.value;
|
|
121
|
+
const P = Reflect.apply(d[c], d, u).then(async (m) => {
|
|
122
|
+
const v = typeof e.duration == "number" ? e.duration : e.duration({
|
|
131
123
|
key: a,
|
|
132
|
-
config:
|
|
133
|
-
response:
|
|
124
|
+
config: l,
|
|
125
|
+
response: m
|
|
134
126
|
});
|
|
135
|
-
return
|
|
127
|
+
return r.set(a, _(m, v)), m;
|
|
136
128
|
}).finally(() => {
|
|
137
|
-
|
|
129
|
+
s(a);
|
|
138
130
|
});
|
|
139
131
|
return n(a, P), P;
|
|
140
132
|
};
|
|
141
133
|
}
|
|
142
134
|
};
|
|
143
|
-
return new Proxy(
|
|
144
|
-
},
|
|
145
|
-
const { method: e, url:
|
|
146
|
-
return [e,
|
|
147
|
-
},
|
|
148
|
-
key: (e) =>
|
|
135
|
+
return new Proxy(g(), i);
|
|
136
|
+
}, O = (t) => {
|
|
137
|
+
const { method: e, url: r, params: o, data: n } = t;
|
|
138
|
+
return [e, r, JSON.stringify(o), JSON.stringify(n)].join("|");
|
|
139
|
+
}, H = (t) => x({
|
|
140
|
+
key: (e) => t ? t(e) : O(e),
|
|
149
141
|
persist: !1
|
|
150
|
-
}),
|
|
142
|
+
}), V = {
|
|
151
143
|
retries: 3,
|
|
152
144
|
delay: 0,
|
|
153
145
|
retryCondition: () => !0
|
|
154
|
-
},
|
|
155
|
-
const { retries: e, delay:
|
|
156
|
-
get(
|
|
157
|
-
return (...
|
|
158
|
-
let
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
const
|
|
146
|
+
}, M = (t) => {
|
|
147
|
+
const { retries: e, delay: r, retryCondition: o } = { ...V, ...t }, n = {
|
|
148
|
+
get(s, i) {
|
|
149
|
+
return (...d) => {
|
|
150
|
+
let c = 0;
|
|
151
|
+
const y = () => Reflect.apply(s[i], s, d).catch((u) => {
|
|
152
|
+
if (c < e && o(u)) {
|
|
153
|
+
c++;
|
|
154
|
+
const l = typeof r == "function" ? r(c) : r;
|
|
163
155
|
return new Promise((a) => {
|
|
164
|
-
setTimeout(() => a(
|
|
156
|
+
setTimeout(() => a(y()), l);
|
|
165
157
|
});
|
|
166
158
|
}
|
|
167
|
-
return Promise.reject(
|
|
159
|
+
return Promise.reject(u);
|
|
168
160
|
});
|
|
169
|
-
return
|
|
161
|
+
return y();
|
|
170
162
|
};
|
|
171
163
|
}
|
|
172
164
|
};
|
|
173
|
-
return new Proxy(
|
|
165
|
+
return new Proxy(g(), n);
|
|
174
166
|
};
|
|
175
|
-
|
|
176
|
-
class V {
|
|
177
|
-
// 尾部指针(最新加入的任务)
|
|
178
|
-
constructor(e) {
|
|
179
|
-
if (C(this, "map"), C(this, "head"), C(this, "tail"), this.map = /* @__PURE__ */ new Map(), this.head = null, this.tail = null, e)
|
|
180
|
-
for (const [t, s] of e)
|
|
181
|
-
this.enqueue(t, s);
|
|
182
|
-
}
|
|
183
|
-
// 添加任务(O(1))
|
|
184
|
-
enqueue(e, t) {
|
|
185
|
-
this.has(e) && this.remove(e);
|
|
186
|
-
const s = { id: e, data: t, next: null, prev: this.tail };
|
|
187
|
-
this.tail ? this.tail.next = s : this.head = s, this.tail = s, this.map.set(e, s);
|
|
188
|
-
}
|
|
189
|
-
// 取出最早的任务(O(1))
|
|
190
|
-
dequeue() {
|
|
191
|
-
if (!this.head) return null;
|
|
192
|
-
const e = this.head;
|
|
193
|
-
return this.head = e.next, this.head ? this.head.prev = null : this.tail = null, this.map.delete(e.id), e.data;
|
|
194
|
-
}
|
|
195
|
-
// 通过 ID 删除任务(O(1))
|
|
196
|
-
remove(e) {
|
|
197
|
-
const t = this.map.get(e);
|
|
198
|
-
return t ? (t.prev ? t.prev.next = t.next : this.head = t.next, t.next ? t.next.prev = t.prev : this.tail = t.prev, this.map.delete(e), !0) : !1;
|
|
199
|
-
}
|
|
200
|
-
// 通过 ID 获取任务(O(1))
|
|
201
|
-
getTask(e) {
|
|
202
|
-
var t;
|
|
203
|
-
return (t = this.map.get(e)) == null ? void 0 : t.data;
|
|
204
|
-
}
|
|
205
|
-
// 通过id更新任务
|
|
206
|
-
update(e, t) {
|
|
207
|
-
const s = this.map.get(e);
|
|
208
|
-
return s ? (s.data = t, !0) : !1;
|
|
209
|
-
}
|
|
210
|
-
has(e) {
|
|
211
|
-
return this.map.has(e);
|
|
212
|
-
}
|
|
213
|
-
peek() {
|
|
214
|
-
var e;
|
|
215
|
-
return ((e = this.head) == null ? void 0 : e.data) ?? null;
|
|
216
|
-
}
|
|
217
|
-
clear() {
|
|
218
|
-
this.map.clear(), this.head = null, this.tail = null;
|
|
219
|
-
}
|
|
220
|
-
// 获取当前队列大小
|
|
221
|
-
get size() {
|
|
222
|
-
return this.map.size;
|
|
223
|
-
}
|
|
224
|
-
get queue() {
|
|
225
|
-
const e = [];
|
|
226
|
-
let t = this.head;
|
|
227
|
-
for (; t; )
|
|
228
|
-
e.push(t.data), t = t.next;
|
|
229
|
-
return e;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
class H {
|
|
167
|
+
class b {
|
|
233
168
|
constructor(e = 4) {
|
|
234
|
-
this.parallelCount = e, this.tasks = new
|
|
169
|
+
this.parallelCount = e, this.tasks = new I(), this.runningCount = 0;
|
|
235
170
|
}
|
|
236
171
|
// 加入
|
|
237
|
-
add(e,
|
|
238
|
-
return console.log("poolinset", e,
|
|
172
|
+
add(e, r) {
|
|
173
|
+
return console.log("poolinset", e, r), new Promise((o, n) => {
|
|
239
174
|
this.tasks.enqueue(e, {
|
|
240
|
-
task:
|
|
241
|
-
resolve:
|
|
175
|
+
task: r,
|
|
176
|
+
resolve: o,
|
|
242
177
|
reject: n
|
|
243
178
|
}), this._run();
|
|
244
179
|
});
|
|
@@ -248,8 +183,8 @@ class H {
|
|
|
248
183
|
this.tasks.remove(e);
|
|
249
184
|
}
|
|
250
185
|
execute(e) {
|
|
251
|
-
const { task:
|
|
252
|
-
return
|
|
186
|
+
const { task: r, resolve: o, reject: n } = e;
|
|
187
|
+
return r().then(o).catch(n).finally(() => {
|
|
253
188
|
this.runningCount--, this._run();
|
|
254
189
|
});
|
|
255
190
|
}
|
|
@@ -260,31 +195,31 @@ class H {
|
|
|
260
195
|
}
|
|
261
196
|
}
|
|
262
197
|
}
|
|
263
|
-
const
|
|
198
|
+
const F = {
|
|
264
199
|
parallelCount: 4,
|
|
265
200
|
retries: 0,
|
|
266
201
|
createId: () => `${Date.now()}_${Math.random().toString().slice(2, 8)}`
|
|
267
|
-
},
|
|
268
|
-
const e = { ...
|
|
269
|
-
get(
|
|
270
|
-
return (...
|
|
271
|
-
const
|
|
272
|
-
return
|
|
202
|
+
}, J = (t) => {
|
|
203
|
+
const e = { ...F, ...t }, { parallelCount: r, createId: o, ...n } = e, s = new b(r), i = n.retries > 0 ? M(n) : null, q = {
|
|
204
|
+
get(d, c) {
|
|
205
|
+
return (...u) => {
|
|
206
|
+
const l = f[c](...u), a = o(l), p = () => i ? i.request(l) : Reflect.apply(d[c], d, u);
|
|
207
|
+
return s.add(a, p);
|
|
273
208
|
};
|
|
274
209
|
}
|
|
275
210
|
};
|
|
276
211
|
return {
|
|
277
|
-
requestor: new Proxy(
|
|
278
|
-
concurrentPool:
|
|
212
|
+
requestor: new Proxy(g(), q),
|
|
213
|
+
concurrentPool: s
|
|
279
214
|
};
|
|
280
|
-
},
|
|
281
|
-
cacheRequestor:
|
|
282
|
-
idempotencyRequestor:
|
|
283
|
-
retryRequestor:
|
|
284
|
-
concurrentPoolRequestor:
|
|
215
|
+
}, Q = {
|
|
216
|
+
cacheRequestor: x,
|
|
217
|
+
idempotencyRequestor: H,
|
|
218
|
+
retryRequestor: M,
|
|
219
|
+
concurrentPoolRequestor: J
|
|
285
220
|
};
|
|
286
221
|
export {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
222
|
+
U as inject,
|
|
223
|
+
Q as requestExtender,
|
|
224
|
+
g as useRequestor
|
|
290
225
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(i,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("localforage"),require("id-queue")):typeof define=="function"&&define.amd?define(["exports","localforage","id-queue"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i["net-vert/core"]={},i.localforage,i.idQueue))})(this,function(i,a,j){"use strict";const p={get:(t,e)=>({url:t,method:"get",...e,params:e==null?void 0:e.params}),post:(t,e,r)=>({url:t,method:"post",data:e,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r}),delete:(t,e)=>({url:t,method:"delete",...e}),put:(t,e,r)=>({url:t,method:"put",data:e,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r}),request:t=>t};function T(t){const e={};return Object.keys(p).forEach(r=>{e[r]=(...s)=>{const n=p[r](...s);return t(n)}}),{...e,request:t}}const R="default",k=new Map,I=(t,e=R)=>{k.set(e,T(t))},f=(t=R)=>{const e=k.get(t);if(!e)throw new Error(`Requestor实例 ${t} 未注册`);return e};class S{constructor(e){e&&a.config(e)}async has(e){return await a.getItem(e)!==null}async get(e){try{return await a.getItem(e)??void 0}catch(r){console.error("Error getting data",r);return}}async set(e,r){return await a.setItem(e,r),r}async delete(e){await a.removeItem(e)}async clear(){await a.clear()}}const E=new S,$=new Map,D=t=>t?E:$,O=()=>{const t=new Map;return{getPromise:o=>t.get(o),setPromise:(o,l)=>{t.set(o,l)},delPromise:o=>{t.delete(o)},clearCache:()=>{t.clear()}}},_=(t,e)=>({value:t,expiresAt:Date.now()+e}),z=t=>t.expiresAt>Date.now(),A={key:t=>t.url,persist:!1,duration:1/0},v=t=>{const e={...A,...t},r=D(e.persist),{getPromise:s,setPromise:n,delPromise:o}=O(),l={get(y,c){return async(...d)=>{const h=p[c](...d),u=e.key(h),C=s(u);if(C)return C;const w=r.get(u);let g=!1;if(w&&z(w)){try{g=e.isValid?await e.isValid({key:u,config:h,cachedData:w}):!0}catch(m){console.error(`校验异常 ${u}`,m)}g||r.delete(u)}if(g)return w.value;const M=Reflect.apply(y[c],y,d).then(async m=>{const N=typeof e.duration=="number"?e.duration:e.duration({key:u,config:h,response:m});return r.set(u,_(m,N)),m}).finally(()=>{o(u)});return n(u,M),M}}};return new Proxy(f(),l)},b=t=>{const{method:e,url:r,params:s,data:n}=t;return[e,r,JSON.stringify(s),JSON.stringify(n)].join("|")},H=t=>v({key:e=>t?t(e):b(e),persist:!1}),V={retries:3,delay:0,retryCondition:()=>!0},x=t=>{const{retries:e,delay:r,retryCondition:s}={...V,...t},n={get(o,l){return(...y)=>{let c=0;const q=()=>Reflect.apply(o[l],o,y).catch(d=>{if(c<e&&s(d)){c++;const h=typeof r=="function"?r(c):r;return new Promise(u=>{setTimeout(()=>u(q()),h)})}return Promise.reject(d)});return q()}}};return new Proxy(f(),n)};class F{constructor(e=4){this.parallelCount=e,this.tasks=new j.TaskQueue,this.runningCount=0}add(e,r){return console.log("poolinset",e,r),new Promise((s,n)=>{this.tasks.enqueue(e,{task:r,resolve:s,reject:n}),this._run()})}remove(e){this.tasks.remove(e)}execute(e){const{task:r,resolve:s,reject:n}=e;return r().then(s).catch(n).finally(()=>{this.runningCount--,this._run()})}_run(){for(;this.runningCount<this.parallelCount&&this.tasks.size>0;){const e=this.tasks.dequeue();this.runningCount++,this.execute(e)}}}const J={parallelCount:4,retries:0,createId:()=>`${Date.now()}_${Math.random().toString().slice(2,8)}`},L={cacheRequestor:v,idempotencyRequestor:H,retryRequestor:x,concurrentPoolRequestor:t=>{const e={...J,...t},{parallelCount:r,createId:s,...n}=e,o=new F(r),l=n.retries>0?x(n):null,P={get(y,c){return(...d)=>{const h=p[c](...d),u=s(h),C=()=>l?l.request(h):Reflect.apply(y[c],y,d);return o.add(u,C)}}};return{requestor:new Proxy(f(),P),concurrentPool:o}}};i.inject=I,i.requestExtender=L,i.useRequestor=f,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-vert/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Dependency Inversion Network Library with Type-Safe Injection.",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"id-queue": "^1.0.9"
|
|
29
|
+
"id-queue": "^1.0.9",
|
|
30
|
+
"localforage": "^1.10.0"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"test": "vitest",
|