@dnax/core 0.19.6 → 0.19.8

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.
@@ -373,8 +373,8 @@ class useRest {
373
373
  transaction: this.#session ? true : false,
374
374
  action: "insertOne",
375
375
  user:
376
- sessionStorage().get().state?.user ||
377
- sessionStorage().get().state?.by ||
376
+ sessionStorage()?.get()?.state?.user ||
377
+ sessionStorage()?.get()?.state?.by ||
378
378
  null,
379
379
  });
380
380
  return resolve(toJson(data));
@@ -492,8 +492,8 @@ class useRest {
492
492
  action: "insertMany",
493
493
  transaction: this.#session ? true : false,
494
494
  user:
495
- sessionStorage().get().state?.user ||
496
- sessionStorage().get().state?.by ||
495
+ sessionStorage()?.get().state?.user ||
496
+ sessionStorage()?.get().state?.by ||
497
497
  null,
498
498
  });
499
499
 
@@ -1325,6 +1325,7 @@ class useRest {
1325
1325
  },
1326
1326
  action: "updateMany",
1327
1327
  transaction: this.#session ? true : false,
1328
+ internal: sessionStorage()?.get() ? false : true,
1328
1329
  user:
1329
1330
  sessionStorage().get().state?.user ||
1330
1331
  sessionStorage().get().state?.by ||
@@ -1567,8 +1568,8 @@ class useRest {
1567
1568
  data: {},
1568
1569
  action: "dropCollection",
1569
1570
  user:
1570
- sessionStorage().get().state?.user ||
1571
- sessionStorage().get().state?.by ||
1571
+ sessionStorage()?.get()?.state?.user ||
1572
+ sessionStorage()?.get()?.state?.by ||
1572
1573
  null,
1573
1574
  });
1574
1575
  return resolve(r);
@@ -1655,6 +1656,7 @@ const restActivity = {
1655
1656
  collection?: string;
1656
1657
  data: any;
1657
1658
  action: string;
1659
+ internal?: boolean;
1658
1660
  ip?: string;
1659
1661
  user?: object;
1660
1662
  transaction?: boolean;
package/index.ts CHANGED
@@ -10,6 +10,7 @@ import { dataCache } from "./lib/bento";
10
10
  import { FilesystemSftpAdapter } from "./lib/media";
11
11
  import { crypt } from "./lib/crypto";
12
12
  import { contextStorage } from "./lib/asyncLocalStorage";
13
+ import { Cron as Task } from "croner";
13
14
 
14
15
  // Adapter
15
16
 
@@ -31,6 +32,7 @@ export {
31
32
  useRest,
32
33
  v,
33
34
  dataCache,
35
+ Task,
34
36
  crypt,
35
37
  $,
36
38
  contextStorage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.19.6",
3
+ "version": "0.19.8",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {