wao 0.24.1 → 0.24.2

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.
Files changed (3) hide show
  1. package/cjs/hb.js +10 -9
  2. package/esm/hb.js +6 -4
  3. package/package.json +1 -1
package/cjs/hb.js CHANGED
@@ -655,19 +655,20 @@ var HB = /*#__PURE__*/function () {
655
655
  key: "compute",
656
656
  value: function () {
657
657
  var _compute = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(_ref7) {
658
- var pid, slot;
658
+ var pid, slot, _ref7$path, path;
659
659
  return _regeneratorRuntime().wrap(function _callee19$(_context19) {
660
660
  while (1) switch (_context19.prev = _context19.next) {
661
661
  case 0:
662
- pid = _ref7.pid, slot = _ref7.slot;
663
- _context19.next = 3;
662
+ pid = _ref7.pid, slot = _ref7.slot, _ref7$path = _ref7.path, path = _ref7$path === void 0 ? "" : _ref7$path;
663
+ if (path && !/^\//.test(path)) path = "/" + path;
664
+ _context19.next = 4;
664
665
  return this.getJSON({
665
- path: "/".concat(pid, "/compute"),
666
+ path: "/".concat(pid, "/compute").concat(path),
666
667
  slot: slot
667
668
  });
668
- case 3:
669
- return _context19.abrupt("return", _context19.sent);
670
669
  case 4:
670
+ return _context19.abrupt("return", _context19.sent);
671
+ case 5:
671
672
  case "end":
672
673
  return _context19.stop();
673
674
  }
@@ -948,7 +949,7 @@ var HB = /*#__PURE__*/function () {
948
949
  (_pid2 = pid) !== null && _pid2 !== void 0 ? _pid2 : pid = this.pid;
949
950
  _tags = (0, _ramda.mergeLeft)(tags, {
950
951
  method: "POST",
951
- path: "/".concat(pid, "~process@1.0/schedule"),
952
+ path: "/".concat(pid, "/schedule"),
952
953
  Type: "Message",
953
954
  Target: pid
954
955
  });
@@ -1024,7 +1025,7 @@ var HB = /*#__PURE__*/function () {
1024
1025
  Type: "Process",
1025
1026
  image: image,
1026
1027
  "execution-device": "stack@1.0",
1027
- "device-stack": ["wasi@1.0", "json-iface@1.0", "wasm-64@1.0", "multipass@1.0"],
1028
+ "device-stack": ["wasi@1.0", "json-iface@1.0", "wasm-64@1.0", "patch@1.0", "multipass@1.0"],
1028
1029
  "output-prefix": "wasm",
1029
1030
  "patch-from": "/results/outbox",
1030
1031
  "stack-keys": ["init", "compute", "snapshot", "normalize"],
@@ -1216,7 +1217,7 @@ var HB = /*#__PURE__*/function () {
1216
1217
  if (path && !/^\//.test(path)) path = "/" + path;
1217
1218
  _context30.next = 4;
1218
1219
  return this.getJSON({
1219
- path: "/".concat(pid, "~process@1.0/now").concat(path)
1220
+ path: "/".concat(pid, "/now").concat(path)
1220
1221
  });
1221
1222
  case 4:
1222
1223
  return _context30.abrupt("return", _context30.sent);
package/esm/hb.js CHANGED
@@ -185,8 +185,9 @@ class HB {
185
185
  return await this.getJSON({ path: `/${pid}/compute/results`, slot })
186
186
  }
187
187
 
188
- async compute({ pid, slot }) {
189
- return await this.getJSON({ path: `/${pid}/compute`, slot })
188
+ async compute({ pid, slot, path = "" }) {
189
+ if (path && !/^\//.test(path)) path = "/" + path
190
+ return await this.getJSON({ path: `/${pid}/compute${path}`, slot })
190
191
  }
191
192
 
192
193
  async computeLegacy({ pid, slot }) {
@@ -250,7 +251,7 @@ class HB {
250
251
  pid ??= this.pid
251
252
  let _tags = mergeLeft(tags, {
252
253
  method: "POST",
253
- path: `/${pid}~process@1.0/schedule`,
254
+ path: `/${pid}/schedule`,
254
255
  Type: "Message",
255
256
  Target: pid,
256
257
  })
@@ -279,6 +280,7 @@ class HB {
279
280
  "wasi@1.0",
280
281
  "json-iface@1.0",
281
282
  "wasm-64@1.0",
283
+ "patch@1.0",
282
284
  "multipass@1.0",
283
285
  ],
284
286
  "output-prefix": "wasm",
@@ -347,7 +349,7 @@ class HB {
347
349
  }
348
350
  async now({ pid, path = "" }) {
349
351
  if (path && !/^\//.test(path)) path = "/" + path
350
- return await this.getJSON({ path: `/${pid}~process@1.0/now${path}` })
352
+ return await this.getJSON({ path: `/${pid}/now${path}` })
351
353
  }
352
354
 
353
355
  async messages({ pid, from, to, limit } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wao",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "bin": {
5
5
  "wao": "./cjs/cli.js",
6
6
  "wao-esm": "./esm/cli.js"