@agoric/solo 0.11.0-upgrade-17-dev-a1453b2.0 → 0.11.0-upgrade-18-dev-bf39b10.0

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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.11.0-u17.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/solo@0.10.3...@agoric/solo@0.11.0-u17.0) (2024-09-17)
6
+ ## [0.11.0-u18.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/solo@0.10.3...@agoric/solo@0.11.0-u18.0) (2024-10-31)
7
7
 
8
8
 
9
9
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/solo",
3
- "version": "0.11.0-upgrade-17-dev-a1453b2.0+a1453b2",
3
+ "version": "0.11.0-upgrade-18-dev-bf39b10.0+bf39b10",
4
4
  "description": "Agoric's Solo vat runner",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,42 +22,41 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/access-token": "0.4.22-upgrade-17-dev-a1453b2.0+a1453b2",
26
- "@agoric/cache": "0.3.3-upgrade-17-dev-a1453b2.0+a1453b2",
27
- "@agoric/cosmic-swingset": "0.42.0-upgrade-17-dev-a1453b2.0+a1453b2",
28
- "@agoric/internal": "0.4.0-upgrade-17-dev-a1453b2.0+a1453b2",
29
- "@agoric/notifier": "0.7.0-upgrade-17-dev-a1453b2.0+a1453b2",
30
- "@agoric/spawner": "0.6.9-upgrade-17-dev-a1453b2.0+a1453b2",
31
- "@agoric/store": "0.9.3-upgrade-17-dev-a1453b2.0+a1453b2",
32
- "@agoric/swing-store": "0.9.2-upgrade-17-dev-a1453b2.0+a1453b2",
33
- "@agoric/swingset-vat": "0.33.0-upgrade-17-dev-a1453b2.0+a1453b2",
34
- "@agoric/telemetry": "0.6.3-upgrade-17-dev-a1453b2.0+a1453b2",
35
- "@agoric/time": "0.3.3-upgrade-17-dev-a1453b2.0+a1453b2",
36
- "@agoric/vats": "0.16.0-upgrade-17-dev-a1453b2.0+a1453b2",
37
- "@agoric/wallet": "0.19.0-upgrade-17-dev-a1453b2.0+a1453b2",
38
- "@endo/captp": "^4.3.0",
39
- "@endo/errors": "^1.2.5",
40
- "@endo/eventual-send": "^1.2.5",
41
- "@endo/import-bundle": "^1.2.2",
42
- "@endo/init": "^1.1.4",
43
- "@endo/marshal": "^1.5.3",
44
- "@endo/promise-kit": "^1.1.5",
25
+ "@agoric/access-token": "0.4.22-upgrade-18-dev-bf39b10.0+bf39b10",
26
+ "@agoric/cache": "0.3.3-upgrade-18-dev-bf39b10.0+bf39b10",
27
+ "@agoric/cosmic-swingset": "0.42.0-upgrade-18-dev-bf39b10.0+bf39b10",
28
+ "@agoric/internal": "0.4.0-upgrade-18-dev-bf39b10.0+bf39b10",
29
+ "@agoric/notifier": "0.7.0-upgrade-18-dev-bf39b10.0+bf39b10",
30
+ "@agoric/spawner": "0.6.9-upgrade-18-dev-bf39b10.0+bf39b10",
31
+ "@agoric/store": "0.9.3-upgrade-18-dev-bf39b10.0+bf39b10",
32
+ "@agoric/swing-store": "0.10.0-upgrade-18-dev-bf39b10.0+bf39b10",
33
+ "@agoric/swingset-vat": "0.33.0-upgrade-18-dev-bf39b10.0+bf39b10",
34
+ "@agoric/telemetry": "0.6.3-upgrade-18-dev-bf39b10.0+bf39b10",
35
+ "@agoric/time": "0.3.3-upgrade-18-dev-bf39b10.0+bf39b10",
36
+ "@agoric/vats": "0.16.0-upgrade-18-dev-bf39b10.0+bf39b10",
37
+ "@agoric/wallet": "0.19.0-upgrade-18-dev-bf39b10.0+bf39b10",
38
+ "@endo/captp": "^4.4.2",
39
+ "@endo/errors": "^1.2.7",
40
+ "@endo/eventual-send": "^1.2.7",
41
+ "@endo/import-bundle": "^1.3.1",
42
+ "@endo/init": "^1.1.6",
43
+ "@endo/marshal": "^1.6.1",
44
+ "@endo/promise-kit": "^1.1.7",
45
45
  "anylogger": "^0.21.0",
46
46
  "deterministic-json": "^1.0.5",
47
47
  "esm": "agoric-labs/esm#Agoric-built",
48
- "express": "^4.17.1",
48
+ "express": "^5.0.1",
49
49
  "http-proxy-middleware": "^2.0.6",
50
50
  "import-meta-resolve": "^2.2.1",
51
51
  "minimist": "^1.2.0",
52
52
  "morgan": "^1.10.0",
53
- "node-fetch": "^2.6.0",
54
53
  "temp": "^0.9.1",
55
54
  "tmp": "^0.2.1",
56
55
  "ws": "^7.2.0"
57
56
  },
58
57
  "devDependencies": {
59
- "@agoric/ertp": "0.16.3-upgrade-17-dev-a1453b2.0+a1453b2",
60
- "@endo/bundle-source": "^3.4.0",
58
+ "@agoric/ertp": "0.16.3-upgrade-18-dev-bf39b10.0+bf39b10",
59
+ "@endo/bundle-source": "^3.4.2",
61
60
  "ava": "^5.3.0",
62
61
  "c8": "^9.1.0"
63
62
  },
@@ -78,7 +77,7 @@
78
77
  "workerThreads": false
79
78
  },
80
79
  "typeCoverage": {
81
- "atLeast": 73.4
80
+ "atLeast": 73.54
82
81
  },
83
- "gitHead": "a1453b2877b017a7f5b43a92364067d001901953"
82
+ "gitHead": "bf39b100f0da4380bab0ce2464aaca1988f0b76a"
84
83
  }
package/src/add-chain.js CHANGED
@@ -1,5 +1,4 @@
1
- /* global process */
2
- import fetch from 'node-fetch';
1
+ /* eslint-env node */
3
2
  import crypto from 'crypto';
4
3
  import djson from 'deterministic-json';
5
4
  import path from 'path';
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /* global process */
2
+ /* eslint-env node */
3
3
  import fs from 'fs';
4
4
  import path from 'path';
5
5
  import { execFileSync } from 'child_process';
package/src/outbound.js CHANGED
@@ -1,7 +1,7 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  import anylogger from 'anylogger';
3
-
4
3
  import { Fail } from '@endo/errors';
4
+ import { exportMailboxData } from '@agoric/swingset-vat';
5
5
 
6
6
  // Limit the debug log length.
7
7
  const SOLO_MAX_DEBUG_LENGTH =
@@ -22,8 +22,8 @@ const log = anylogger('outbound');
22
22
  */
23
23
  const knownTargets = new Map();
24
24
 
25
- export function deliver(mbs) {
26
- const data = mbs.exportToData();
25
+ export function deliver(mailboxStorage) {
26
+ const data = exportMailboxData(mailboxStorage);
27
27
  log.debug(`deliver`, data);
28
28
  for (const target of Object.getOwnPropertyNames(data)) {
29
29
  if (!knownTargets.has(target)) {
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
  // @ts-check
3
3
  import '@endo/init/pre-bundle-source.js';
4
4
  import '@endo/init/unsafe-fast.js';
package/src/start.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /* global process setTimeout */
2
+ /* eslint-env node */
3
3
  import fs from 'fs';
4
4
  import url from 'url';
5
5
  import path from 'path';
@@ -28,6 +28,8 @@ import {
28
28
  buildMailbox,
29
29
  buildPlugin,
30
30
  buildTimer,
31
+ exportMailboxData,
32
+ makeEphemeralMailboxStorage,
31
33
  } from '@agoric/swingset-vat';
32
34
  import { openSwingStore } from '@agoric/swing-store';
33
35
  import { makeWithQueue } from '@agoric/internal/src/queue.js';
@@ -110,8 +112,8 @@ const buildSwingset = async (
110
112
  fs.readFileSync(mailboxStateFile, 'utf8'),
111
113
  );
112
114
 
113
- const mbs = buildMailboxStateMap();
114
- mbs.populateFromData(initialMailboxState);
115
+ const mailboxStorage = makeEphemeralMailboxStorage(initialMailboxState);
116
+ const mbs = buildMailboxStateMap(mailboxStorage);
115
117
  const mb = buildMailbox(mbs);
116
118
  const cm = buildCommand(broadcast);
117
119
  const timer = buildTimer();
@@ -235,13 +237,13 @@ const buildSwingset = async (
235
237
  });
236
238
 
237
239
  async function saveState() {
238
- const ms = JSON.stringify(mbs.exportToData());
240
+ const ms = JSON.stringify(exportMailboxData(mailboxStorage));
239
241
  await atomicReplaceFile(mailboxStateFile, ms);
240
242
  await hostStorage.commit();
241
243
  }
242
244
 
243
245
  function deliverOutbound() {
244
- deliver(mbs);
246
+ deliver(mailboxStorage);
245
247
  }
246
248
 
247
249
  const policy = neverStop();
package/src/web.js CHANGED
@@ -172,7 +172,7 @@ export async function makeHTTPListener(
172
172
  app.use('/wallet', express.static(walletHtmlDir));
173
173
 
174
174
  // Default non-bridge GETs to /wallet/index.html for history routing.
175
- app.get('/wallet/*', (_, res) =>
175
+ app.get('/wallet/:slug', (_, res) =>
176
176
  res.sendFile(path.resolve(walletHtmlDir, 'index.html')),
177
177
  );
178
178
  }
@@ -218,7 +218,7 @@ export async function makeHTTPListener(
218
218
  };
219
219
 
220
220
  // accept POST messages as commands.
221
- app.post('*', async (req, res) => {
221
+ app.post(':path', async (req, res) => {
222
222
  const valid = await validateAccessToken(req);
223
223
  if (!valid) {
224
224
  res.json({ ok: false, rej: 'Unauthorized' });
@@ -1,4 +1,4 @@
1
- /* global process setTimeout */
1
+ /* eslint-env node */
2
2
  import { spawn } from 'child_process';
3
3
  import WebSocket from 'ws';
4
4
  import { makeCapTP, E } from '@endo/captp';
package/test/home.test.js CHANGED
@@ -1,4 +1,4 @@
1
- /* global process */
1
+ /* eslint-env node */
2
2
 
3
3
  import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
4
4