wao 0.18.2 → 0.18.4

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.
@@ -199,6 +199,7 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
199
199
  height: 0,
200
200
  results: [id],
201
201
  }
202
+ let __msg = null
202
203
  if (memory) {
203
204
  // forking...
204
205
  } else if (_tags["On-Boot"] || true) {
@@ -206,6 +207,7 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
206
207
  if (_tags["On-Boot"] === "Data") data = opt.data ?? ""
207
208
  else data = (await mem.get("msgs", _tags["On-Boot"]))?.data ?? ""
208
209
  let msg = await genMsg(id, p, data, opt.tags, owner, msg_owner, true)
210
+ __msg = msg
209
211
  const _env = await genEnv({
210
212
  pid: p.id,
211
213
  owner: p.owner,
@@ -217,7 +219,11 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
217
219
  } else {
218
220
  p.height += 1
219
221
  }
220
- const _msg = { ...o(dissoc("signer"), dissoc("memory"))(opt), res }
222
+ const _msg = {
223
+ ...o(dissoc("signer"), dissoc("memory"))(opt),
224
+ res,
225
+ msg: __msg,
226
+ }
221
227
  await mem.set(_msg, "msgs", id)
222
228
  if (_tags["Cron-Interval"]) {
223
229
  let [num, unit] = _tags["Cron-Interval"].split("-")
@@ -349,7 +355,7 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
349
355
  delete res.Memory
350
356
  p.results.push(opt.message)
351
357
  await mem.set(p, "env", opt.process)
352
- const _msg = { ...dissoc("signer", _opt), res }
358
+ const _msg = { ...dissoc("signer", _opt), res, msg }
353
359
  await mem.set(_msg, "msgs", opt.message)
354
360
  for (const v of res.Messages ?? []) {
355
361
  if (await mem.get("env", v.Target)) {
@@ -486,7 +492,7 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
486
492
  delete res.Memory
487
493
  p.results.push(id)
488
494
  await mem.set(p, "env", opt.process)
489
- const _msg = { ...dissoc("signer", _opt), res }
495
+ const _msg = { ...dissoc("signer", _opt), res, msg }
490
496
  await mem.set(_msg, "msgs", id)
491
497
  } catch (e) {
492
498
  console.log(e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wao",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "bin": {
5
5
  "wao": "./cjs/cli.js",
6
6
  "wao-esm": "./esm/cli.js"