@agoric/solo 0.10.4-dev-7cc5def.0 → 0.10.4-u11.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,6 +3,15 @@
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.10.4-u11.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/solo@0.10.3...@agoric/solo@0.10.4-u11.0) (2023-08-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **solo:** let `init` tolerate existing `html` directory ([fa942e2](https://github.com/Agoric/agoric-sdk/commit/fa942e2f17026635e70e9f618bc1f9005498c862))
12
+
13
+
14
+
6
15
  ### [0.10.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/solo@0.10.2...@agoric/solo@0.10.3) (2023-06-09)
7
16
 
8
17
  **Note:** Version bump only for package @agoric/solo
@@ -2,7 +2,6 @@
2
2
  {
3
3
  "extends": "../../tsconfig.json",
4
4
  "compilerOptions": {
5
- "allowSyntheticDefaultImports": true,
6
5
  "checkJs": false,
7
6
  },
8
7
  "include": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/solo",
3
- "version": "0.10.4-dev-7cc5def.0+7cc5def",
3
+ "version": "0.10.4-u11.0",
4
4
  "description": "Agoric's Solo vat runner",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,33 +15,34 @@
15
15
  "test:xs": "exit 0",
16
16
  "lint-fix": "yarn lint:eslint --fix",
17
17
  "lint": "run-s --continue-on-error lint:*",
18
- "lint:types": "tsc",
18
+ "lint:types": "tsc -p jsconfig.json",
19
19
  "lint:eslint": "eslint ."
20
20
  },
21
21
  "keywords": [],
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/access-token": "0.4.22-dev-7cc5def.0+7cc5def",
26
- "@agoric/assert": "0.6.1-dev-7cc5def.0+7cc5def",
27
- "@agoric/cache": "0.3.3-dev-7cc5def.0+7cc5def",
28
- "@agoric/cosmic-swingset": "0.41.4-dev-7cc5def.0+7cc5def",
29
- "@agoric/internal": "0.3.3-dev-7cc5def.0+7cc5def",
30
- "@agoric/notifier": "0.6.3-dev-7cc5def.0+7cc5def",
31
- "@agoric/spawner": "0.6.9-dev-7cc5def.0+7cc5def",
32
- "@agoric/store": "0.9.3-dev-7cc5def.0+7cc5def",
33
- "@agoric/swing-store": "0.9.2-dev-7cc5def.0+7cc5def",
34
- "@agoric/swingset-vat": "0.32.3-dev-7cc5def.0+7cc5def",
35
- "@agoric/telemetry": "0.6.3-dev-7cc5def.0+7cc5def",
36
- "@agoric/time": "0.3.3-dev-7cc5def.0+7cc5def",
37
- "@agoric/vats": "0.15.2-dev-7cc5def.0+7cc5def",
38
- "@agoric/wallet": "0.18.4-dev-7cc5def.0+7cc5def",
39
- "@endo/captp": "^3.1.2",
40
- "@endo/eventual-send": "^0.17.3",
41
- "@endo/import-bundle": "^0.3.5",
42
- "@endo/init": "^0.5.57",
43
- "@endo/marshal": "^0.8.6",
44
- "@endo/promise-kit": "^0.2.57",
25
+ "@agoric/access-token": "^0.4.21",
26
+ "@agoric/assert": "^0.6.0",
27
+ "@agoric/cache": "^0.3.3-u11.0",
28
+ "@agoric/cosmic-swingset": "^0.42.0-u11.0",
29
+ "@agoric/internal": "^0.3.3-u11.0",
30
+ "@agoric/notifier": "^0.6.3-u11.0",
31
+ "@agoric/spawner": "^0.6.9-u11.0",
32
+ "@agoric/store": "^0.9.3-u11.0",
33
+ "@agoric/swing-store": "^0.9.2-u11.0",
34
+ "@agoric/swingset-vat": "^0.32.3-u11.0",
35
+ "@agoric/telemetry": "^0.6.3-u11.0",
36
+ "@agoric/time": "^0.3.3-u11.0",
37
+ "@agoric/vats": "^0.15.2-u11.0",
38
+ "@agoric/wallet": "^0.18.4-u11.0",
39
+ "@endo/captp": "^3.1.1",
40
+ "@endo/eventual-send": "^0.17.2",
41
+ "@endo/import-bundle": "^0.3.4",
42
+ "@endo/init": "^0.5.56",
43
+ "@endo/marshal": "^0.8.5",
44
+ "@endo/promise-kit": "^0.2.56",
45
+ "agoric": "^0.21.2-u11.0",
45
46
  "anylogger": "^0.21.0",
46
47
  "deterministic-json": "^1.0.5",
47
48
  "esm": "agoric-labs/esm#Agoric-built",
@@ -49,16 +50,16 @@
49
50
  "http-proxy-middleware": "^2.0.6",
50
51
  "import-meta-resolve": "^2.2.1",
51
52
  "minimist": "^1.2.0",
52
- "morgan": "^1.10.0",
53
+ "morgan": "^1.9.1",
53
54
  "node-fetch": "^2.6.0",
54
55
  "temp": "^0.9.1",
55
56
  "tmp": "^0.2.1",
56
57
  "ws": "^7.2.0"
57
58
  },
58
59
  "devDependencies": {
59
- "@agoric/ertp": "0.16.3-dev-7cc5def.0+7cc5def",
60
- "@endo/bundle-source": "^2.5.2",
61
- "ava": "^5.3.0",
60
+ "@agoric/ertp": "^0.16.3-u11.0",
61
+ "@endo/bundle-source": "^2.5.1",
62
+ "ava": "^5.2.0",
62
63
  "c8": "^7.13.0"
63
64
  },
64
65
  "publishConfig": {
@@ -74,5 +75,5 @@
74
75
  "timeout": "20m",
75
76
  "workerThreads": false
76
77
  },
77
- "gitHead": "7cc5defcf5c6d126fe39c94be4953afd11105a5c"
78
+ "gitHead": "92b6cd72484079b0349d8ccfa4510aeb820e8d67"
78
79
  }
package/src/add-chain.js CHANGED
@@ -13,7 +13,7 @@ const DEFAULT_CHAIN_CONFIG = 'https://testnet.agoric.com/network-config';
13
13
  /**
14
14
  * @param {string} basedir
15
15
  * @param {string} [chainConfig]
16
- * @param {boolean} [force]
16
+ * @param {boolean} [force=false]
17
17
  */
18
18
  async function addChain(basedir, chainConfig, force = false) {
19
19
  let actualConfig = chainConfig;
@@ -29,7 +29,6 @@ async function addChain(basedir, chainConfig, force = false) {
29
29
  const url = new URL(actualConfig, `file://${process.cwd()}`);
30
30
  console.log('downloading netconfig from', url.href);
31
31
  let netconf;
32
- await null;
33
32
  if (url.protocol === 'file:') {
34
33
  const f = fs.readFileSync(url.pathname, 'utf-8');
35
34
  netconf = JSON.parse(f);
@@ -177,6 +177,7 @@ export async function connectToChain(
177
177
  const thisRpcHref = rpcHrefs[rpcHrefIndex];
178
178
 
179
179
  // tryOnce will either throw if cancelled (which rejects this promise),
180
+ // eslint-disable-next-line no-await-in-loop
180
181
  const ret = await tryOnce(thisRpcHref);
181
182
  if (ret !== undefined) {
182
183
  // Or returns non-undefined, which we should resolve.
@@ -185,6 +186,7 @@ export async function connectToChain(
185
186
  }
186
187
 
187
188
  // It was undefined, so wait, then retry.
189
+ // eslint-disable-next-line no-await-in-loop
188
190
  await new Promise(resolve => setTimeout(resolve, 5000));
189
191
  rpcHrefIndex = (rpcHrefIndex + 1) % rpcHrefs.length;
190
192
  }
@@ -659,6 +661,7 @@ ${chainID} chain does not yet know of address ${clientAddr}${adviseEgress(
659
661
  let retry = true;
660
662
  for await (const _ of whileTrue(() => retry)) {
661
663
  retry = false;
664
+ // eslint-disable-next-line no-await-in-loop
662
665
  const { stderr, stdout } = await runHelper([
663
666
  ...txArgs,
664
667
  `--sequence=${sequenceNumber}`,
package/src/main.js CHANGED
@@ -55,7 +55,6 @@ start
55
55
  `);
56
56
  }
57
57
 
58
- await null;
59
58
  switch (argv[0]) {
60
59
  case 'setup': {
61
60
  const { netconfig } = parseArgs(argv.slice(1));
@@ -33,7 +33,6 @@ const main = async () => {
33
33
  deliverator(...as).then(() => send('go'));
34
34
  });
35
35
 
36
- await null;
37
36
  switch (method) {
38
37
  case 'connectToFakeChain': {
39
38
  const [basedir, GCI, delay] = margs;
@@ -59,13 +58,7 @@ const main = async () => {
59
58
  send('go');
60
59
  };
61
60
 
62
- process.exitCode = 1;
63
- main().then(
64
- () => {
65
- process.exitCode = 0;
66
- },
67
- err => {
68
- console.error('Failed with', err);
69
- process.exit(process.exitCode || 1);
70
- },
71
- );
61
+ main().catch(e => {
62
+ console.error(e);
63
+ process.exitCode = 1;
64
+ });
package/src/start.js CHANGED
@@ -262,7 +262,6 @@ const buildSwingset = async (
262
262
  async function deliverInboundToMbx(sender, messages, ack) {
263
263
  Array.isArray(messages) || Fail`inbound given non-Array: ${messages}`;
264
264
  // console.debug(`deliverInboundToMbx`, messages, ack);
265
- await null;
266
265
  if (mb.deliverInbound(sender, messages, ack)) {
267
266
  await processKernel();
268
267
  }
@@ -317,7 +316,6 @@ const buildSwingset = async (
317
316
  const queuedMoveTimeForward = withInputQueue(
318
317
  async function moveTimeForward() {
319
318
  const now = Date.now();
320
- await null;
321
319
  try {
322
320
  if (timer.poll(now)) {
323
321
  await processKernel();
@@ -491,7 +489,6 @@ const start = async (basedir, argv) => {
491
489
  let hostport;
492
490
  await Promise.all(
493
491
  connections.map(async c => {
494
- await null;
495
492
  switch (c.type) {
496
493
  case 'chain-cosmos-sdk':
497
494
  {
package/src/vat-http.js CHANGED
@@ -106,7 +106,7 @@ export function buildRootObject(vatPowers) {
106
106
  setCommandDevice(d) {
107
107
  commandDevice = d;
108
108
 
109
- const replHandler = getReplHandler(replObjects, send);
109
+ const replHandler = getReplHandler(replObjects, send, vatPowers);
110
110
  registerURLHandler(replHandler, '/private/repl');
111
111
 
112
112
  // Assign the captp handler.
@@ -198,7 +198,6 @@ export function buildRootObject(vatPowers) {
198
198
  dispatcher = 'onMessage',
199
199
  } = rawMeta;
200
200
 
201
- await null;
202
201
  try {
203
202
  let channelHandle = channelIdToHandle.get(rawChannelID);
204
203
  if (dispatcher === 'onOpen') {
package/src/web.js CHANGED
@@ -353,7 +353,6 @@ export async function makeHTTPListener(
353
353
 
354
354
  ws.on('message', async message => {
355
355
  let obj = {};
356
- await null;
357
356
  try {
358
357
  obj = JSON.parse(message);
359
358
  const res = await inboundCommand(obj, meta, id);
@@ -65,6 +65,7 @@ export async function makeFixture(PORT, noisy = false) {
65
65
  let lastUpdateCount;
66
66
  for (;;) {
67
67
  process.stdout.write('o');
68
+ // eslint-disable-next-line no-await-in-loop
68
69
  const update = await E(E.get(bootP).loadingNotifier).getUpdateSince(
69
70
  lastUpdateCount,
70
71
  );
package/test/test-home.js CHANGED
@@ -5,6 +5,7 @@ import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
5
5
  import bundleSourceAmbient from '@endo/bundle-source';
6
6
  import { AmountMath } from '@agoric/ertp';
7
7
  import { TimeMath } from '@agoric/time';
8
+ import { Stable } from '@agoric/vats/src/tokens.js';
8
9
  import { Far } from '@endo/marshal';
9
10
  import { resolve as importMetaResolve } from 'import-meta-resolve';
10
11
 
@@ -12,21 +13,6 @@ import { makeFixture, E } from './captp-fixture.js';
12
13
 
13
14
  const SOLO_PORT = 7999;
14
15
 
15
- // XXX test depends on this exact value from the Inter Protocol economy,
16
- // by way of agoric-cli (which this test covertly depends upon)
17
- export const Stable = harden(
18
- /** @type {const } */ ({
19
- symbol: 'IST',
20
- denom: 'uist',
21
- proposedName: 'Agoric stable token',
22
- assetKind: 'nat',
23
- displayInfo: {
24
- decimalPlaces: 6,
25
- assetKind: 'nat',
26
- },
27
- }),
28
- );
29
-
30
16
  //#region setup (ambient authority is confined to this region)
31
17
  test.before('setup', async t => {
32
18
  const loadBundle = async specifier => {
@@ -155,7 +141,7 @@ test.serial('home.localTimerService makeNotifier', async t => {
155
141
  const notifier = E(localTimerService).makeNotifier(1n, 1n);
156
142
  const update1 = await E(notifier).getUpdateSince();
157
143
  const firstUpdate = update1.updateCount;
158
- t.true(firstUpdate > 0);
144
+ t.truthy(firstUpdate > 0);
159
145
  const update2 = await E(notifier).getUpdateSince(update1.updateCount);
160
146
  t.truthy(BigInt(update2.updateCount) > BigInt(firstUpdate));
161
147