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.
- package/cjs/ao-loader.js +10 -10
- package/cjs/aoconnect-base.js +63 -57
- package/esm/ao-loader.js +804 -804
- package/esm/aoconnect-base.js +9 -3
- package/package.json +1 -1
package/esm/aoconnect-base.js
CHANGED
|
@@ -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 = {
|
|
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)
|