corebasic 1.0.145 → 1.0.146

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/libs/dip.js CHANGED
@@ -53,3 +53,11 @@ export const IdempotentDip = () => {
53
53
  })
54
54
  }
55
55
  }
56
+
57
+
58
+ export const insertKeys = message => {
59
+ return {"created": message.date, "updated": message.date, "createdBy": message.user, "updatedBy": message.user}
60
+ }
61
+ export const updateKeys = message => {
62
+ return {"updated": message.date, "updatedBy": message.user}
63
+ }
package/libs/messaging.js CHANGED
@@ -114,4 +114,12 @@ export async function produce(channel, message) {
114
114
  }
115
115
 
116
116
 
117
+ // Hydrate
118
+
119
+ export async function hydrate(callback) {
120
+ setTimeout(async _ => {
121
+ let {user,company,items} = await callback()
122
+ await publish(user, {event: "RPC_hydrate", data: { company, items }, txn: Utils.uid() })
123
+ }, 100)
124
+ }
117
125
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.145",
4
+ "version": "1.0.146",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {