agoric 0.21.2-dev-c39febd.0.c39febd → 0.21.2-dev-ef8eb1c.0.ef8eb1c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agoric",
3
- "version": "0.21.2-dev-c39febd.0.c39febd",
3
+ "version": "0.21.2-dev-ef8eb1c.0.ef8eb1c",
4
4
  "description": "Manage the Agoric Javascript smart contract platform",
5
5
  "type": "module",
6
6
  "main": "src/main.js",
@@ -30,27 +30,27 @@
30
30
  "lint:eslint": "node ../../scripts/eslint-repo.mjs ."
31
31
  },
32
32
  "devDependencies": {
33
- "@agoric/cosmic-swingset": "0.41.4-dev-c39febd.0.c39febd",
34
- "@agoric/deploy-script-support": "0.10.4-dev-c39febd.0.c39febd",
33
+ "@agoric/cosmic-swingset": "0.41.4-dev-ef8eb1c.0.ef8eb1c",
34
+ "@agoric/deploy-script-support": "0.10.4-dev-ef8eb1c.0.ef8eb1c",
35
35
  "ava": "^8.0.1",
36
36
  "c8": "^10.1.2"
37
37
  },
38
38
  "dependencies": {
39
- "@agoric/access-token": "0.4.22-dev-c39febd.0.c39febd",
40
- "@agoric/cache": "0.3.3-dev-c39febd.0.c39febd",
41
- "@agoric/casting": "0.4.3-dev-c39febd.0.c39febd",
42
- "@agoric/client-utils": "0.1.1-dev-c39febd.0.c39febd",
43
- "@agoric/cosmic-proto": "0.4.1-dev-c39febd.0.c39febd",
44
- "@agoric/ertp": "0.16.3-dev-c39febd.0.c39febd",
45
- "@agoric/governance": "0.10.4-dev-c39febd.0.c39febd",
46
- "@agoric/internal": "0.3.3-dev-c39febd.0.c39febd",
47
- "@agoric/network": "0.1.1-dev-c39febd.0.c39febd",
48
- "@agoric/smart-wallet": "0.5.4-dev-c39febd.0.c39febd",
49
- "@agoric/store": "0.9.3-dev-c39febd.0.c39febd",
50
- "@agoric/swingset-vat": "0.32.3-dev-c39febd.0.c39febd",
51
- "@agoric/vats": "0.15.2-dev-c39febd.0.c39febd",
52
- "@agoric/zoe": "0.26.3-dev-c39febd.0.c39febd",
53
- "@agoric/zone": "0.2.3-dev-c39febd.0.c39febd",
39
+ "@agoric/access-token": "0.4.22-dev-ef8eb1c.0.ef8eb1c",
40
+ "@agoric/cache": "0.3.3-dev-ef8eb1c.0.ef8eb1c",
41
+ "@agoric/casting": "0.4.3-dev-ef8eb1c.0.ef8eb1c",
42
+ "@agoric/client-utils": "0.1.1-dev-ef8eb1c.0.ef8eb1c",
43
+ "@agoric/cosmic-proto": "0.4.1-dev-ef8eb1c.0.ef8eb1c",
44
+ "@agoric/ertp": "0.16.3-dev-ef8eb1c.0.ef8eb1c",
45
+ "@agoric/governance": "0.10.4-dev-ef8eb1c.0.ef8eb1c",
46
+ "@agoric/internal": "0.3.3-dev-ef8eb1c.0.ef8eb1c",
47
+ "@agoric/network": "0.1.1-dev-ef8eb1c.0.ef8eb1c",
48
+ "@agoric/smart-wallet": "0.5.4-dev-ef8eb1c.0.ef8eb1c",
49
+ "@agoric/store": "0.9.3-dev-ef8eb1c.0.ef8eb1c",
50
+ "@agoric/swingset-vat": "0.32.3-dev-ef8eb1c.0.ef8eb1c",
51
+ "@agoric/vats": "0.15.2-dev-ef8eb1c.0.ef8eb1c",
52
+ "@agoric/zoe": "0.26.3-dev-ef8eb1c.0.ef8eb1c",
53
+ "@agoric/zone": "0.2.3-dev-ef8eb1c.0.ef8eb1c",
54
54
  "@cosmjs/crypto": "^0.36.0",
55
55
  "@cosmjs/encoding": "^0.36.0",
56
56
  "@cosmjs/math": "^0.36.0",
@@ -70,7 +70,6 @@
70
70
  "@endo/promise-kit": "^1.2.1",
71
71
  "@endo/zip": "^1.1.0",
72
72
  "@iarna/toml": "^2.2.3",
73
- "chalk": "^5.2.0",
74
73
  "commander": "^12.1.0",
75
74
  "deterministic-json": "^1.0.5",
76
75
  "inquirer": "^8.2.2",
@@ -101,5 +100,5 @@
101
100
  "engines": {
102
101
  "node": "^22.11"
103
102
  },
104
- "gitHead": "c39febd2e730d4b3e5b8885b9fc74d8bdd3e4334"
103
+ "gitHead": "ef8eb1c17454c5d3166f72e16f57fdb2b7614637"
105
104
  }
@@ -21,7 +21,7 @@ import {
21
21
  getEnvironmentOptionsList,
22
22
  } from '@endo/env-options';
23
23
  import anylogger from '@agoric/internal/vendor/anylogger.js';
24
- import chalk from 'chalk';
24
+ import { styleText } from 'node:util';
25
25
 
26
26
  const DEBUG_LIST = getEnvironmentOptionsList('DEBUG');
27
27
 
@@ -61,7 +61,7 @@ anylogger.ext = (l, ...rest) => {
61
61
  console[level].bind(console)) ||
62
62
  fallbackSink;
63
63
  logger[level] = (...args) =>
64
- doLog(chalk.bold.blue(`${prefix}:`), ...args);
64
+ doLog(styleText(['bold', 'blue'], `${prefix}:`), ...args);
65
65
  } else {
66
66
  // Disable printing.
67
67
  logger[level] = () => {};
package/src/cosmos.js CHANGED
@@ -1,4 +1,3 @@
1
- import chalk from 'chalk';
2
1
  import path from 'node:path';
3
2
  import { makePspawn, getSDKBinaries } from './helpers.js';
4
3
 
@@ -20,7 +19,7 @@ export default async function cosmosMain(_progname, rawArgs, powers, opts) {
20
19
  pspawnEnv.DEBUG = 'agoric:none';
21
20
  }
22
21
 
23
- const pspawn = makePspawn({ env: pspawnEnv, log, spawn, chalk });
22
+ const pspawn = makePspawn({ env: pspawnEnv, log, spawn });
24
23
 
25
24
  function helper(args, hopts = undefined) {
26
25
  if (!opts.dockerTag) {
package/src/helpers.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // @ts-check
2
2
 
3
+ import { styleText } from 'node:util';
4
+
3
5
  /** @import { ChildProcess } from 'child_process' */
4
6
 
5
7
  // Backwards compatibility
@@ -27,14 +29,12 @@ export const getSDKBinaries = ({
27
29
  *
28
30
  * @param {object} param0
29
31
  * @param {Record<string, string | undefined>} [param0.env] the default environment
30
- * @param {*} [param0.chalk] a colorizer
31
32
  * @param {Console} [param0.log] a console object
32
33
  * @param {(cmd: string, cargs: Array<string>, opts: any) => ChildProcess}param0.spawn the spawn function
33
34
  */
34
35
  export const makePspawn = ({
35
36
  env: defaultEnv = process.env,
36
37
  log = console,
37
- chalk,
38
38
  spawn,
39
39
  }) =>
40
40
  /**
@@ -57,14 +57,7 @@ export const makePspawn = ({
57
57
  cargs,
58
58
  { stdio = 'inherit', env = defaultEnv, ...rest } = {},
59
59
  ) {
60
- const color = (method, ...args) => {
61
- if (chalk && chalk[method]) {
62
- return chalk[method](...args);
63
- }
64
- return args.join(' ');
65
- };
66
-
67
- log.warn(color('blueBright', cmd, ...cargs));
60
+ log.warn(styleText('blueBright', [cmd, ...cargs].join(' ')));
68
61
  const cp = spawn(cmd, cargs, { stdio, env, ...rest });
69
62
  const pr = new Promise((resolve, _reject) => {
70
63
  cp.on('exit', resolve);
@@ -84,7 +77,7 @@ export const makePspawn = ({
84
77
  reason = e;
85
78
  }
86
79
  }
87
- log.error(color('yellow', `cannot execute ${cmd}:`), reason);
80
+ log.error(styleText('yellow', `cannot execute ${cmd}:`), reason);
88
81
  resolve(-1);
89
82
  });
90
83
  });
package/src/init.js CHANGED
@@ -1,4 +1,4 @@
1
- import chalk from 'chalk';
1
+ import { styleText } from 'node:util';
2
2
  import { makePspawn } from './helpers.js';
3
3
 
4
4
  // Use either an absolute template URL, or find it relative to DAPP_URL_BASE.
@@ -27,7 +27,7 @@ export default async function initMain(_progname, rawArgs, priv, opts) {
27
27
  // Run the Git commands.
28
28
  log.info(`initializing ${DIR} from ${dappURL}`);
29
29
 
30
- const pspawn = makePspawn({ log, chalk, spawn });
30
+ const pspawn = makePspawn({ log, spawn });
31
31
 
32
32
  let dappBranch = [];
33
33
  if (opts.dappBranch) {
@@ -80,6 +80,6 @@ export default async function initMain(_progname, rawArgs, priv, opts) {
80
80
  },
81
81
  );
82
82
 
83
- log.info(chalk.bold.yellow(`Done initializing ${DIR}`));
83
+ log.info(styleText(['bold', 'yellow'], `Done initializing ${DIR}`));
84
84
  return 0;
85
85
  }
package/src/install.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import chalk from 'chalk';
2
+ import { styleText } from 'node:util';
3
3
  import { execFileSync } from 'node:child_process';
4
4
  import { makePspawn } from './helpers.js';
5
5
  import DEFAULT_SDK_PACKAGE_NAMES from './sdk-package-names.js';
@@ -26,7 +26,7 @@ export default async function installMain(_progname, rawArgs, powers, opts) {
26
26
  process.env.CXXFLAGS = '-std=c++14';
27
27
  }
28
28
 
29
- const pspawn = makePspawn({ log, spawn, chalk });
29
+ const pspawn = makePspawn({ log, spawn });
30
30
 
31
31
  const rimraf = file => pspawn('rm', ['-rf', file]);
32
32
 
@@ -240,7 +240,7 @@ export default async function installMain(_progname, rawArgs, powers, opts) {
240
240
 
241
241
  const removeNodeModulesSymlinks = async subdir => {
242
242
  const nm = `${subdir}/node_modules`;
243
- log(chalk.bold.green(`removing ${nm} link`));
243
+ log(styleText(['bold', 'green'], `removing ${nm} link`));
244
244
  await fs.unlink(nm).catch(_ => {});
245
245
 
246
246
  // Remove all the package links.
@@ -267,7 +267,7 @@ export default async function installMain(_progname, rawArgs, powers, opts) {
267
267
  await yarnInstallEachWorktree('updates');
268
268
 
269
269
  if (sdkWorktree || !opts.sdk) {
270
- log.info(chalk.bold.green('Done installing without SDK links'));
270
+ log.info(styleText(['bold', 'green'], 'Done installing without SDK links'));
271
271
  return 0;
272
272
  }
273
273
 
@@ -313,6 +313,6 @@ export default async function installMain(_progname, rawArgs, powers, opts) {
313
313
  }
314
314
  }
315
315
 
316
- log.info(chalk.bold.green('Done installing with SDK links'));
316
+ log.info(styleText(['bold', 'green'], 'Done installing with SDK links'));
317
317
  return 0;
318
318
  }
package/src/start.js CHANGED
@@ -1,4 +1,4 @@
1
- import chalk from 'chalk';
1
+ import { styleText } from 'node:util';
2
2
  import { createHash } from 'node:crypto';
3
3
  import path from 'node:path';
4
4
  import { createRequire } from 'node:module';
@@ -75,7 +75,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
75
75
  pspawnEnv.DEBUG = 'agoric:info,SwingSet:vat,SwingSet:ls';
76
76
  }
77
77
 
78
- const pspawn = makePspawn({ env: pspawnEnv, spawn, log, chalk });
78
+ const pspawn = makePspawn({ env: pspawnEnv, spawn, log });
79
79
 
80
80
  // Turn on some debugging options.
81
81
  const nodeDebugEnv = { ...pspawnEnv };
@@ -161,7 +161,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
161
161
  };
162
162
 
163
163
  const rmVerbose = async filePath => {
164
- log(chalk.green(`removing ${filePath}`));
164
+ log(styleText('green', `removing ${filePath}`));
165
165
  // rm is available on all the unix-likes, so use it for speed.
166
166
  await pspawn('rm', ['-rf', filePath]);
167
167
  };
@@ -205,7 +205,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
205
205
  const fakeGCI = 'sim-chain';
206
206
  const serverExists = await exists(serverDir);
207
207
  if (!serverExists) {
208
- log(chalk.yellow(`initializing ${profileName}`));
208
+ log(styleText('yellow', `initializing ${profileName}`));
209
209
  await pspawn(
210
210
  agSolo,
211
211
  ['init', profileName, '--egresses=fake', `--webport=${HOST_PORT}`],
@@ -216,7 +216,9 @@ export default async function startMain(progname, rawArgs, powers, opts) {
216
216
  }
217
217
 
218
218
  if (fakeDelay >= 0) {
219
- log(chalk.yellow(`setting sim chain with ${fakeDelay} second delay`));
219
+ log(
220
+ styleText('yellow', `setting sim chain with ${fakeDelay} second delay`),
221
+ );
220
222
  await pspawn(
221
223
  agSolo,
222
224
  ['set-fake-chain', `--delay=${fakeDelay}`, fakeGCI],