@ztimson/momentum 0.39.2 → 0.40.0

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.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- var et = Object.defineProperty;
5
- var nt = (n, t, e) => t in n ? et(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
6
- var i = (n, t, e) => (nt(n, typeof t != "symbol" ? t + "" : t, e), e);
7
- function rt(n, t = false) {
4
+ var nt = Object.defineProperty;
5
+ var rt = (n, t, e) => t in n ? nt(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
6
+ var i = (n, t, e) => (rt(n, typeof t != "symbol" ? t + "" : t, e), e);
7
+ function ot(n, t = false) {
8
8
  if (n == null)
9
9
  throw new Error("Cannot clean a NULL value");
10
10
  return Array.isArray(n) ? n = n.filter((e) => e != null) : Object.entries(n).forEach(([e, r]) => {
@@ -22,6 +22,9 @@ function U(n) {
22
22
  return n;
23
23
  }
24
24
  }
25
+ function ut(n) {
26
+ return Array.isArray(n) ? n : [n];
27
+ }
25
28
  class m extends Promise {
26
29
  constructor(e) {
27
30
  super((r, o) => e(
@@ -59,14 +62,15 @@ class m extends Promise {
59
62
  return this.from(super.finally(e));
60
63
  }
61
64
  }
62
- function at(n, t) {
63
- const e = document.createElement("a");
64
- e.href = n, e.download = t, document.body.appendChild(e), e.click(), document.body.removeChild(e);
65
- }
66
65
  function Tt(n, t) {
66
+ n instanceof Blob || (n = new Blob(ut(n)));
67
67
  const e = URL.createObjectURL(n);
68
68
  at(e, t), URL.revokeObjectURL(e);
69
69
  }
70
+ function at(n, t) {
71
+ const e = document.createElement("a");
72
+ e.href = n, e.download = t || n.split("/").pop(), document.body.appendChild(e), e.click(), document.body.removeChild(e);
73
+ }
70
74
  function It(n = {}) {
71
75
  return new Promise((t) => {
72
76
  const e = document.createElement("input");
@@ -75,13 +79,13 @@ function It(n = {}) {
75
79
  }, document.body.appendChild(e), e.click();
76
80
  });
77
81
  }
78
- function $t(n) {
82
+ function Dt(n) {
79
83
  return new m((t, e, r) => {
80
84
  const o = new XMLHttpRequest(), s = new FormData();
81
85
  n.files.forEach((c) => s.append("file", c)), o.withCredentials = !!n.withCredentials, o.upload.addEventListener("progress", (c) => c.lengthComputable ? r(c.loaded / c.total) : null), o.addEventListener("loadend", () => t(U(o.responseText))), o.addEventListener("error", () => e(U(o.responseText))), o.addEventListener("timeout", () => e({ error: "Request timed out" })), o.open("POST", n.url), Object.entries(n.headers || {}).forEach(([c, y]) => o.setRequestHeader(c, y)), o.send(s);
82
86
  });
83
87
  }
84
- class F {
88
+ class v {
85
89
  constructor() {
86
90
  i(this, "listeners", {});
87
91
  }
@@ -122,7 +126,7 @@ class F {
122
126
  });
123
127
  }
124
128
  }
125
- i(F, "listeners", {});
129
+ i(v, "listeners", {});
126
130
  class p extends Error {
127
131
  constructor(e, r) {
128
132
  super(e);
@@ -151,7 +155,7 @@ class p extends Error {
151
155
  }
152
156
  }
153
157
  i(p, "code", 500);
154
- class v extends p {
158
+ class Y extends p {
155
159
  constructor(t = "Bad Request") {
156
160
  super(t);
157
161
  }
@@ -159,8 +163,8 @@ class v extends p {
159
163
  return t.constructor.code == this.code;
160
164
  }
161
165
  }
162
- i(v, "code", 400);
163
- class Y extends p {
166
+ i(Y, "code", 400);
167
+ class H extends p {
164
168
  constructor(t = "Unauthorized") {
165
169
  super(t);
166
170
  }
@@ -168,8 +172,8 @@ class Y extends p {
168
172
  return t.constructor.code == this.code;
169
173
  }
170
174
  }
171
- i(Y, "code", 401);
172
- class H extends p {
175
+ i(H, "code", 401);
176
+ class W extends p {
173
177
  constructor(t = "Payment Required") {
174
178
  super(t);
175
179
  }
@@ -177,8 +181,8 @@ class H extends p {
177
181
  return t.constructor.code == this.code;
178
182
  }
179
183
  }
180
- i(H, "code", 402);
181
- class W extends p {
184
+ i(W, "code", 402);
185
+ class z extends p {
182
186
  constructor(t = "Forbidden") {
183
187
  super(t);
184
188
  }
@@ -186,8 +190,8 @@ class W extends p {
186
190
  return t.constructor.code == this.code;
187
191
  }
188
192
  }
189
- i(W, "code", 403);
190
- class z extends p {
193
+ i(z, "code", 403);
194
+ class J extends p {
191
195
  constructor(t = "Not Found") {
192
196
  super(t);
193
197
  }
@@ -195,8 +199,8 @@ class z extends p {
195
199
  return t.constructor.code == this.code;
196
200
  }
197
201
  }
198
- i(z, "code", 404);
199
- class J extends p {
202
+ i(J, "code", 404);
203
+ class K extends p {
200
204
  constructor(t = "Method Not Allowed") {
201
205
  super(t);
202
206
  }
@@ -204,8 +208,8 @@ class J extends p {
204
208
  return t.constructor.code == this.code;
205
209
  }
206
210
  }
207
- i(J, "code", 405);
208
- class K extends p {
211
+ i(K, "code", 405);
212
+ class Z extends p {
209
213
  constructor(t = "Not Acceptable") {
210
214
  super(t);
211
215
  }
@@ -213,8 +217,8 @@ class K extends p {
213
217
  return t.constructor.code == this.code;
214
218
  }
215
219
  }
216
- i(K, "code", 406);
217
- class Z extends p {
220
+ i(Z, "code", 406);
221
+ class V extends p {
218
222
  constructor(t = "Internal Server Error") {
219
223
  super(t);
220
224
  }
@@ -222,8 +226,8 @@ class Z extends p {
222
226
  return t.constructor.code == this.code;
223
227
  }
224
228
  }
225
- i(Z, "code", 500);
226
- class V extends p {
229
+ i(V, "code", 500);
230
+ class X extends p {
227
231
  constructor(t = "Not Implemented") {
228
232
  super(t);
229
233
  }
@@ -231,8 +235,8 @@ class V extends p {
231
235
  return t.constructor.code == this.code;
232
236
  }
233
237
  }
234
- i(V, "code", 501);
235
- class X extends p {
238
+ i(X, "code", 501);
239
+ class Q extends p {
236
240
  constructor(t = "Bad Gateway") {
237
241
  super(t);
238
242
  }
@@ -240,8 +244,8 @@ class X extends p {
240
244
  return t.constructor.code == this.code;
241
245
  }
242
246
  }
243
- i(X, "code", 502);
244
- class Q extends p {
247
+ i(Q, "code", 502);
248
+ class _ extends p {
245
249
  constructor(t = "Service Unavailable") {
246
250
  super(t);
247
251
  }
@@ -249,8 +253,8 @@ class Q extends p {
249
253
  return t.constructor.code == this.code;
250
254
  }
251
255
  }
252
- i(Q, "code", 503);
253
- class _ extends p {
256
+ i(_, "code", 503);
257
+ class tt extends p {
254
258
  constructor(t = "Gateway Timeout") {
255
259
  super(t);
256
260
  }
@@ -258,7 +262,7 @@ class _ extends p {
258
262
  return t.constructor.code == this.code;
259
263
  }
260
264
  }
261
- i(_, "code", 504);
265
+ i(tt, "code", 504);
262
266
  const w = class w2 {
263
267
  constructor(t = {}) {
264
268
  i(this, "interceptors", {});
@@ -287,7 +291,7 @@ const w = class w2 {
287
291
  const s = Array.isArray(t.query) ? t.query : Object.keys(t.query).map((c) => ({ key: c, value: t.query[c] }));
288
292
  e += (e.includes("?") ? "&" : "?") + s.map((c) => `${c.key}=${c.value}`).join("&");
289
293
  }
290
- const r = rt({
294
+ const r = ot({
291
295
  "Content-Type": t.body ? t.body instanceof FormData ? "multipart/form-data" : "application/json" : void 0,
292
296
  ...w2.headers,
293
297
  ...this.headers,
@@ -298,36 +302,36 @@ const w = class w2 {
298
302
  headers: r,
299
303
  method: t.method || (t.body ? "POST" : "GET"),
300
304
  body: t.body
301
- }).then(async (a) => {
302
- var M, j;
303
- for (let u of [...Object.values(w2.interceptors), ...Object.values(this.interceptors)])
304
- await new Promise((O) => u(a, () => O()));
305
- const R = a.headers.get("Content-Length"), N = R ? parseInt(R, 10) : 0;
306
- let k = 0;
307
- const T = (M = a.body) == null ? void 0 : M.getReader(), tt = new ReadableStream({
308
- start(u) {
305
+ }).then(async (u) => {
306
+ var j, k;
307
+ for (let a of [...Object.values(w2.interceptors), ...Object.values(this.interceptors)])
308
+ await new Promise((O) => a(u, () => O()));
309
+ const R = u.headers.get("Content-Length"), C = R ? parseInt(R, 10) : 0;
310
+ let D = 0;
311
+ const N = (j = u.body) == null ? void 0 : j.getReader(), et = new ReadableStream({
312
+ start(a) {
309
313
  function O() {
310
- T == null || T.read().then((x) => {
311
- if (x.done)
312
- return u.close();
313
- k += x.value.byteLength, y(k / N), u.enqueue(x.value), O();
314
- }).catch((x) => u.error(x));
314
+ N == null || N.read().then((B) => {
315
+ if (B.done)
316
+ return a.close();
317
+ D += B.value.byteLength, y(D / C), a.enqueue(B.value), O();
318
+ }).catch((B) => a.error(B));
315
319
  }
316
320
  O();
317
321
  }
318
322
  });
319
- if (a.data = new Response(tt), t.decode == null || t.decode) {
320
- const u = (j = a.headers.get("Content-Type")) == null ? void 0 : j.toLowerCase();
321
- u != null && u.includes("form") ? a.data = await a.data.formData() : u != null && u.includes("json") ? a.data = await a.data.json() : u != null && u.includes("text") ? a.data = await a.data.text() : u != null && u.includes("application") && (a.data = await a.data.blob());
323
+ if (u.data = new Response(et), t.decode == null || t.decode) {
324
+ const a = (k = u.headers.get("Content-Type")) == null ? void 0 : k.toLowerCase();
325
+ a != null && a.includes("form") ? u.data = await u.data.formData() : a != null && a.includes("json") ? u.data = await u.data.json() : a != null && a.includes("text") ? u.data = await u.data.text() : a != null && a.includes("application") && (u.data = await u.data.blob());
322
326
  }
323
- a.ok ? s(a) : c(a);
327
+ u.ok ? s(u) : c(u);
324
328
  });
325
329
  });
326
330
  }
327
331
  };
328
332
  i(w, "interceptors", {}), i(w, "headers", {});
329
333
  let q = w;
330
- const B = {
334
+ const S = {
331
335
  CLEAR: "\x1B[0m",
332
336
  BRIGHT: "\x1B[1m",
333
337
  DIM: "\x1B[2m",
@@ -335,7 +339,7 @@ const B = {
335
339
  BLINK: "\x1B[5m",
336
340
  REVERSE: "\x1B[7m",
337
341
  HIDDEN: "\x1B[8m"
338
- }, L = {
342
+ }, $ = {
339
343
  BLACK: "\x1B[30m",
340
344
  RED: "\x1B[31m",
341
345
  GREEN: "\x1B[32m",
@@ -353,8 +357,8 @@ const B = {
353
357
  LIGHT_CYAN: "\x1B[96m",
354
358
  WHITE: "\x1B[97m"
355
359
  };
356
- var ut = /* @__PURE__ */ ((n) => (n[n.ERROR = 0] = "ERROR", n[n.WARN = 1] = "WARN", n[n.INFO = 2] = "INFO", n[n.LOG = 3] = "LOG", n[n.DEBUG = 4] = "DEBUG", n))(ut || {});
357
- const g = class g2 extends F {
360
+ var lt = /* @__PURE__ */ ((n) => (n[n.ERROR = 0] = "ERROR", n[n.WARN = 1] = "WARN", n[n.INFO = 2] = "INFO", n[n.LOG = 3] = "LOG", n[n.DEBUG = 4] = "DEBUG", n))(lt || {});
361
+ const g = class g2 extends v {
358
362
  constructor(t) {
359
363
  super(), this.namespace = t;
360
364
  }
@@ -373,31 +377,31 @@ const g = class g2 extends F {
373
377
  if (g2.LOG_LEVEL < 4)
374
378
  return;
375
379
  const e = this.format(...t);
376
- g2.emit(4, e), console.debug(L.LIGHT_GREY + e + B.CLEAR);
380
+ g2.emit(4, e), console.debug($.LIGHT_GREY + e + S.CLEAR);
377
381
  }
378
382
  log(...t) {
379
383
  if (g2.LOG_LEVEL < 3)
380
384
  return;
381
385
  const e = this.format(...t);
382
- g2.emit(3, e), console.log(B.CLEAR + e);
386
+ g2.emit(3, e), console.log(S.CLEAR + e);
383
387
  }
384
388
  info(...t) {
385
389
  if (g2.LOG_LEVEL < 2)
386
390
  return;
387
391
  const e = this.format(...t);
388
- g2.emit(2, e), console.info(L.BLUE + e + B.CLEAR);
392
+ g2.emit(2, e), console.info($.BLUE + e + S.CLEAR);
389
393
  }
390
394
  warn(...t) {
391
395
  if (g2.LOG_LEVEL < 1)
392
396
  return;
393
397
  const e = this.format(...t);
394
- g2.emit(1, e), console.warn(L.YELLOW + e + B.CLEAR);
398
+ g2.emit(1, e), console.warn($.YELLOW + e + S.CLEAR);
395
399
  }
396
400
  error(...t) {
397
401
  if (g2.LOG_LEVEL < 0)
398
402
  return;
399
403
  const e = this.format(...t);
400
- g2.emit(0, e), console.error(L.RED + e + B.CLEAR);
404
+ g2.emit(0, e), console.error($.RED + e + S.CLEAR);
401
405
  }
402
406
  };
403
407
  i(g, "LOG_LEVEL", 4);
@@ -405,7 +409,7 @@ class Api extends q {
405
409
  constructor(url = location.origin, opts = {}) {
406
410
  opts.url = url;
407
411
  super(opts);
408
- __publicField(this, "emitter", new F());
412
+ __publicField(this, "emitter", new v());
409
413
  __publicField(this, "_token", null);
410
414
  __publicField(this, "emit", this.emitter.emit.bind(this.emitter));
411
415
  __publicField(this, "off", this.emitter.off.bind(this.emitter));
@@ -1158,7 +1162,7 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
1158
1162
  ActionType2[ActionType2["PUT"] = 6] = "PUT";
1159
1163
  return ActionType2;
1160
1164
  })(ActionType || {});
1161
- class Actions extends F {
1165
+ class Actions extends v {
1162
1166
  constructor(api) {
1163
1167
  super();
1164
1168
  __publicField(this, "api");
@@ -1218,7 +1222,7 @@ class Actions extends F {
1218
1222
  });
1219
1223
  }
1220
1224
  }
1221
- class Ai extends F {
1225
+ class Ai extends v {
1222
1226
  constructor(api) {
1223
1227
  super();
1224
1228
  __publicField(this, "api");
@@ -1237,7 +1241,7 @@ class Ai extends F {
1237
1241
  return this.api.request({ url: "/api/ai", method: "DELETE" });
1238
1242
  }
1239
1243
  }
1240
- class Analytics extends F {
1244
+ class Analytics extends v {
1241
1245
  constructor(api) {
1242
1246
  super();
1243
1247
  __publicField(this, "api");
@@ -1262,13 +1266,13 @@ class Totp {
1262
1266
  return this.api.request({ url: `/api/auth/totp/${username}`, method: "POST" });
1263
1267
  }
1264
1268
  setup(username, method = "app", totp) {
1265
- return this.api.request({ url: `/api/auth/totp/${username}`, body: rt({
1269
+ return this.api.request({ url: `/api/auth/totp/${username}`, body: ot({
1266
1270
  method,
1267
1271
  totp
1268
1272
  }) });
1269
1273
  }
1270
1274
  }
1271
- class Auth extends F {
1275
+ class Auth extends v {
1272
1276
  constructor(api, opts = {}) {
1273
1277
  super();
1274
1278
  __publicField(this, "api");
@@ -1408,7 +1412,7 @@ class Auth extends F {
1408
1412
  });
1409
1413
  }
1410
1414
  }
1411
- class Data extends F {
1415
+ class Data extends v {
1412
1416
  constructor(api) {
1413
1417
  super();
1414
1418
  __publicField(this, "api");
@@ -1417,21 +1421,23 @@ class Data extends F {
1417
1421
  create(collection, document2) {
1418
1422
  return this.api.request({
1419
1423
  url: `/api/data/${collection}`,
1420
- method: "POST"
1424
+ method: "POST",
1425
+ body: document2
1421
1426
  }).then((resp) => {
1422
1427
  this.emit("create", collection, resp);
1423
1428
  return resp;
1424
1429
  });
1425
1430
  }
1426
- read(collection, document2) {
1427
- return this.api.request({ url: `/api/data/${collection}${document2 ? `/${document2}` : ""}` }).then((resp) => {
1431
+ read(collection, id) {
1432
+ return this.api.request({ url: `/api/data/${collection}${id ? `/${id}` : ""}` }).then((resp) => {
1428
1433
  this.emit("read", collection, resp);
1429
1434
  return resp;
1430
1435
  });
1431
1436
  }
1432
1437
  update(collection, document2, append = true) {
1438
+ if (!document2._id) return this.create(collection, document2);
1433
1439
  return this.api.request({
1434
- url: `/api/data/${collection}`,
1440
+ url: `/api/data/${collection}/${document2._id}`,
1435
1441
  method: append ? "PATCH" : "PUT",
1436
1442
  body: document2
1437
1443
  }).then((resp) => {
@@ -1439,11 +1445,11 @@ class Data extends F {
1439
1445
  return resp;
1440
1446
  });
1441
1447
  }
1442
- delete(collection, document2) {
1448
+ delete(collection, id) {
1443
1449
  return this.api.request({
1444
- url: `/api/data/${collection}/${document2}`,
1450
+ url: `/api/data/${collection}/${id}`,
1445
1451
  method: "DELETE"
1446
- }).then(() => this.emit("delete", collection, document2));
1452
+ }).then(() => this.emit("delete", collection, id));
1447
1453
  }
1448
1454
  raw(collection, query) {
1449
1455
  return this.api.request({ url: `/api/data/${collection}`, body: query }).then((resp) => {
@@ -1452,7 +1458,7 @@ class Data extends F {
1452
1458
  });
1453
1459
  }
1454
1460
  }
1455
- class Email extends F {
1461
+ class Email extends v {
1456
1462
  constructor(api) {
1457
1463
  super();
1458
1464
  __publicField(this, "api");
@@ -1467,7 +1473,7 @@ class Email extends F {
1467
1473
  });
1468
1474
  }
1469
1475
  }
1470
- class Groups extends F {
1476
+ class Groups extends v {
1471
1477
  constructor(api) {
1472
1478
  super();
1473
1479
  __publicField(this, "api");
@@ -1560,32 +1566,32 @@ ${log}`;
1560
1566
  return this.api.request({ url: `/api/logs/server${query ? `?${query}` : ""}` }).then((resp) => resp);
1561
1567
  }
1562
1568
  debug(...logs) {
1563
- return this.api.request({ url: `/api/logs/client`, body: this.buildLog(ut.DEBUG, logs) }).then(() => {
1569
+ return this.api.request({ url: `/api/logs/client`, body: this.buildLog(lt.DEBUG, logs) }).then(() => {
1564
1570
  }).catch(() => {
1565
1571
  });
1566
1572
  }
1567
1573
  log(...logs) {
1568
- return this.api.request({ url: `/api/logs/client`, body: this.buildLog(ut.LOG, logs) }).then(() => {
1574
+ return this.api.request({ url: `/api/logs/client`, body: this.buildLog(lt.LOG, logs) }).then(() => {
1569
1575
  }).catch(() => {
1570
1576
  });
1571
1577
  }
1572
1578
  info(...logs) {
1573
- return this.api.request({ url: `/api/logs/client`, body: this.buildLog(ut.INFO, logs) }).then(() => {
1579
+ return this.api.request({ url: `/api/logs/client`, body: this.buildLog(lt.INFO, logs) }).then(() => {
1574
1580
  }).catch(() => {
1575
1581
  });
1576
1582
  }
1577
1583
  warn(...logs) {
1578
- return this.api.request({ url: `/api/logs/client`, body: this.buildLog(ut.WARN, logs) }).then(() => {
1584
+ return this.api.request({ url: `/api/logs/client`, body: this.buildLog(lt.WARN, logs) }).then(() => {
1579
1585
  }).catch(() => {
1580
1586
  });
1581
1587
  }
1582
1588
  error(...logs) {
1583
- return this.api.request({ url: `/api/logs/client`, body: this.buildLog(ut.ERROR, logs) }).then(() => {
1589
+ return this.api.request({ url: `/api/logs/client`, body: this.buildLog(lt.ERROR, logs) }).then(() => {
1584
1590
  }).catch(() => {
1585
1591
  });
1586
1592
  }
1587
1593
  }
1588
- class Payments extends F {
1594
+ class Payments extends v {
1589
1595
  constructor(api, secret) {
1590
1596
  super();
1591
1597
  __publicField(this, "api");
@@ -1626,7 +1632,7 @@ class Payments extends F {
1626
1632
  return history;
1627
1633
  }
1628
1634
  }
1629
- class Pdf extends F {
1635
+ class Pdf extends v {
1630
1636
  constructor(api) {
1631
1637
  super();
1632
1638
  __publicField(this, "api");
@@ -1699,7 +1705,7 @@ const _Socket = class _Socket {
1699
1705
  };
1700
1706
  __publicField(_Socket, "timeout", 1e4);
1701
1707
  let Socket = _Socket;
1702
- class Storage extends F {
1708
+ class Storage extends v {
1703
1709
  constructor(api) {
1704
1710
  super();
1705
1711
  __publicField(this, "api");
@@ -1762,9 +1768,9 @@ class Storage extends F {
1762
1768
  if (!files) files = await It(typeof opts == "object" ? opts : void 0);
1763
1769
  if (!files || Array.isArray(files) && !files.length) return [];
1764
1770
  const path = this.api.path("/api/storage/", typeof opts == "string" ? opts : opts.path || "");
1765
- return $t({
1771
+ return Dt({
1766
1772
  url: `${this.api.url}${path}`,
1767
- files: Array.isArray(files) ? files : [files],
1773
+ files: ut(files),
1768
1774
  headers: this.api.headers
1769
1775
  }).onProgress((p2) => {
1770
1776
  prog(p2);
@@ -1780,7 +1786,7 @@ class UI {
1780
1786
  this.settings = settings;
1781
1787
  }
1782
1788
  async inject(reload = false) {
1783
- if (!Object.keys(this.settings.cache).length || reload) await this.settings.list();
1789
+ if (!Object.keys(this.settings.cache).length || reload) await this.settings.all();
1784
1790
  if (!document.querySelector('meta[name="mobile-web-app-capable"]')) {
1785
1791
  const meta = document.createElement("meta");
1786
1792
  meta.name = "mobile-web-app-capable";
@@ -1979,7 +1985,7 @@ class UI {
1979
1985
  }, 1e3);
1980
1986
  }
1981
1987
  }
1982
- class Users extends F {
1988
+ class Users extends v {
1983
1989
  constructor(api) {
1984
1990
  super();
1985
1991
  __publicField(this, "api");
@@ -2002,7 +2008,7 @@ class Users extends F {
2002
2008
  this.emit("delete", username);
2003
2009
  });
2004
2010
  }
2005
- list(reload = false) {
2011
+ all(reload = false) {
2006
2012
  if (!reload && this.listed) return Promise.resolve(this.cache);
2007
2013
  return this.api.request({ url: `/api/users` }).then((resp) => {
2008
2014
  resp == null ? void 0 : resp.map((r) => {
@@ -2039,12 +2045,12 @@ class Users extends F {
2039
2045
  resp.image = this.api.url + resp.image + `?token=${this.api.token}`;
2040
2046
  this.cache = this.cache.filter((u) => u.username != user.username).concat([resp]);
2041
2047
  }
2042
- this.emit(user._id ? "update" : "create", resp);
2048
+ this.emit(resp._id ? "update" : "create", resp);
2043
2049
  return resp;
2044
2050
  });
2045
2051
  }
2046
2052
  uploadImage(username, file) {
2047
- return $t({
2053
+ return Dt({
2048
2054
  url: this.api.url + `/api/users/${username}/image`,
2049
2055
  files: [file],
2050
2056
  headers: this.api.headers
@@ -2054,7 +2060,7 @@ class Users extends F {
2054
2060
  });
2055
2061
  }
2056
2062
  }
2057
- class Settings extends F {
2063
+ class Settings extends v {
2058
2064
  constructor(api) {
2059
2065
  super();
2060
2066
  __publicField(this, "api");
@@ -2067,7 +2073,7 @@ class Settings extends F {
2067
2073
  set cache(val) {
2068
2074
  this.$cache.next(val);
2069
2075
  }
2070
- list(detailed = false) {
2076
+ all(detailed = false) {
2071
2077
  return this.api.request({ url: `/api/settings` + (detailed ? "?detailed" : "") }).then((resp) => {
2072
2078
  this.cache = !detailed ? resp : Object.values(resp).reduce((acc, v2) => ({ ...acc, [v2.key]: v2.value }), {});
2073
2079
  this.emit("list", resp || []);
@@ -2096,7 +2102,7 @@ class Settings extends F {
2096
2102
  });
2097
2103
  }
2098
2104
  }
2099
- class Static extends F {
2105
+ class Static extends v {
2100
2106
  constructor(api) {
2101
2107
  super();
2102
2108
  __publicField(this, "api");
@@ -2109,9 +2115,9 @@ class Static extends F {
2109
2115
  }
2110
2116
  upload(files, path = "/") {
2111
2117
  return new m(async (res, rej, prog) => {
2112
- return $t({
2118
+ return Dt({
2113
2119
  url: this.api.url + ("/api/static/" + path).replaceAll("//", "/"),
2114
- files: Array.isArray(files) ? files : [files],
2120
+ files: ut(files),
2115
2121
  headers: this.api.headers
2116
2122
  }).onProgress((p2) => {
2117
2123
  prog(p2);
@@ -2122,7 +2128,7 @@ class Static extends F {
2122
2128
  });
2123
2129
  }
2124
2130
  }
2125
- class Momentum extends F {
2131
+ class Momentum extends v {
2126
2132
  constructor(url, opts) {
2127
2133
  super();
2128
2134
  __publicField(this, "api");
@@ -2175,16 +2181,11 @@ class Momentum extends F {
2175
2181
  this.storage.on("*", (event, ...args) => this.emit(`Storage:${event}`, ...args));
2176
2182
  this.users.on("*", (event, ...args) => this.emit(`Users:${event}`, ...args));
2177
2183
  this.users.on("*", (event, ...args) => {
2178
- var _a;
2179
- if (Array.isArray(args[0])) {
2180
- const u = args[0].find((u2) => {
2181
- var _a2;
2182
- return u2._id == ((_a2 = this.auth.user) == null ? void 0 : _a2._id);
2183
- });
2184
- if (u) this.auth.user = u;
2185
- } else if (args[0]._id == ((_a = this.auth.user) == null ? void 0 : _a._id)) {
2186
- this.auth.user = args[0];
2187
- }
2184
+ const u = ut(args[0]).find((u2) => {
2185
+ var _a;
2186
+ return (u2 == null ? void 0 : u2._id) == ((_a = this.auth.user) == null ? void 0 : _a._id);
2187
+ });
2188
+ if (u) this.auth.user = u;
2188
2189
  });
2189
2190
  }
2190
2191
  }
@@ -1 +1 @@
1
- {"version":3,"file":"momentum.d.ts","sourceRoot":"","sources":["../src/momentum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,GAAG,EAAE,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;A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pB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,OAAO,CAAC;IAClB,EAAE,EAAG,EAAE,CAAC;IACR,KAAK,EAAG,KAAK,CAAC;gBAEF,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,eAAe;CAyChD"}
package/dist/pdf.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../src/pdf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAExE,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IACrC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,CAAC;CAC3B,CAAA;AAED,qBAAa,GAAI,SAAQ,YAAY,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAO;gBAEf,GAAG,EAAE,GAAG,GAAG,MAAM;YAKf,cAAc;IAW5B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;IAK/C,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;IAKlE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;CAI1C"}
1
+ {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../src/pdf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IACrC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,CAAC;CAC3B,CAAA;AAED,qBAAa,GAAI,SAAQ,YAAY,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAO;gBAEf,GAAG,EAAE,GAAG,GAAG,MAAM;YAKf,cAAc;IAW5B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;IAK/C,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;IAKlE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAe;CAI1C"}
@@ -34,7 +34,7 @@ export declare class Settings extends TypedEmitter<SettingEvents> {
34
34
  [key: string]: any;
35
35
  });
36
36
  constructor(api: Api | string);
37
- list(detailed?: boolean): Promise<{
37
+ all(detailed?: boolean): Promise<{
38
38
  [key: string]: any;
39
39
  }>;
40
40
  delete(key: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,MAAM,CAAC;AAErC,wBAAwB;AACxB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACxB,kBAAkB;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,KAAK,EAAE,CAAC,CA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AAO,CAAC,IAAI,CAAC;IAOlC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAS7D,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAOrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAEnG,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACxC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC;CACjC,CAAC;AAEF,qBAAa,MAAO,SAAQ,YAAY,CAAC,YAAY,CAAC;IACrD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAO;gBAEf,GAAG,EAAE,GAAG,GAAG,MAAM;IAK7B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMnC,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,IAAI,SAAM,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC;CAcnE"}
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAY,eAAe,EAAE,YAAY,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAE9G,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACxC,MAAM,EAAE,CAAC,IAAI,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