agoric 0.21.2-dev-f30b379.0 → 0.21.2-dev-d2ea4b4.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/package.json +21 -20
- package/src/anylogger-agoric.js +28 -14
- package/src/cosmos.js +2 -2
- package/src/start.js +7 -7
- package/tools/getting-started.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.21.2-dev-
|
|
3
|
+
"version": "0.21.2-dev-d2ea4b4.0+d2ea4b4",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
"lint:eslint": "eslint ."
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
33
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
32
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-d2ea4b4.0+d2ea4b4",
|
|
33
|
+
"@agoric/deploy-script-support": "0.10.4-dev-d2ea4b4.0+d2ea4b4",
|
|
34
34
|
"ava": "^5.3.0",
|
|
35
35
|
"c8": "^7.13.0",
|
|
36
36
|
"dd-trace": "^4.11.1"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
40
|
-
"@agoric/assert": "0.6.1-dev-
|
|
41
|
-
"@agoric/cache": "0.3.3-dev-
|
|
42
|
-
"@agoric/casting": "0.4.3-dev-
|
|
43
|
-
"@agoric/cosmic-proto": "0.3.1-dev-
|
|
44
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
45
|
-
"@agoric/governance": "0.10.4-dev-
|
|
46
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
47
|
-
"@agoric/internal": "0.3.3-dev-
|
|
48
|
-
"@agoric/network": "0.1.1-dev-
|
|
49
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
52
|
-
"@agoric/vats": "0.15.2-dev-
|
|
53
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
54
|
-
"@agoric/zone": "0.2.3-dev-
|
|
39
|
+
"@agoric/access-token": "0.4.22-dev-d2ea4b4.0+d2ea4b4",
|
|
40
|
+
"@agoric/assert": "0.6.1-dev-d2ea4b4.0+d2ea4b4",
|
|
41
|
+
"@agoric/cache": "0.3.3-dev-d2ea4b4.0+d2ea4b4",
|
|
42
|
+
"@agoric/casting": "0.4.3-dev-d2ea4b4.0+d2ea4b4",
|
|
43
|
+
"@agoric/cosmic-proto": "0.3.1-dev-d2ea4b4.0+d2ea4b4",
|
|
44
|
+
"@agoric/ertp": "0.16.3-dev-d2ea4b4.0+d2ea4b4",
|
|
45
|
+
"@agoric/governance": "0.10.4-dev-d2ea4b4.0+d2ea4b4",
|
|
46
|
+
"@agoric/inter-protocol": "0.16.2-dev-d2ea4b4.0+d2ea4b4",
|
|
47
|
+
"@agoric/internal": "0.3.3-dev-d2ea4b4.0+d2ea4b4",
|
|
48
|
+
"@agoric/network": "0.1.1-dev-d2ea4b4.0+d2ea4b4",
|
|
49
|
+
"@agoric/smart-wallet": "0.5.4-dev-d2ea4b4.0+d2ea4b4",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-d2ea4b4.0+d2ea4b4",
|
|
51
|
+
"@agoric/swingset-vat": "0.32.3-dev-d2ea4b4.0+d2ea4b4",
|
|
52
|
+
"@agoric/vats": "0.15.2-dev-d2ea4b4.0+d2ea4b4",
|
|
53
|
+
"@agoric/zoe": "0.26.3-dev-d2ea4b4.0+d2ea4b4",
|
|
54
|
+
"@agoric/zone": "0.2.3-dev-d2ea4b4.0+d2ea4b4",
|
|
55
55
|
"@confio/relayer": "^0.9.0",
|
|
56
56
|
"@cosmjs/crypto": "^0.30.1",
|
|
57
57
|
"@cosmjs/encoding": "^0.30.1",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@endo/bundle-source": "^3.0.2",
|
|
62
62
|
"@endo/captp": "^4.0.2",
|
|
63
63
|
"@endo/compartment-mapper": "^1.1.0",
|
|
64
|
+
"@endo/env-options": "^1.1.0",
|
|
64
65
|
"@endo/far": "^1.0.2",
|
|
65
66
|
"@endo/init": "^1.0.2",
|
|
66
67
|
"@endo/marshal": "^1.1.0",
|
|
@@ -99,5 +100,5 @@
|
|
|
99
100
|
"typeCoverage": {
|
|
100
101
|
"atLeast": 77.5
|
|
101
102
|
},
|
|
102
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "d2ea4b46b9efa61e97eec8711830d9fdd741ca55"
|
|
103
104
|
}
|
package/src/anylogger-agoric.js
CHANGED
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
getEnvironmentOption,
|
|
3
|
+
getEnvironmentOptionsList,
|
|
4
|
+
} from '@endo/env-options';
|
|
2
5
|
import anylogger from 'anylogger';
|
|
3
6
|
import chalk from 'chalk';
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const DEBUG_LIST = getEnvironmentOptionsList('DEBUG');
|
|
9
|
+
|
|
10
|
+
// Turn on debugging output with DEBUG=agoric or DEBUG=agoric:${level}
|
|
11
|
+
let selectedLevel =
|
|
12
|
+
DEBUG_LIST.length || getEnvironmentOption('DEBUG', 'unset') === 'unset'
|
|
13
|
+
? 'log'
|
|
14
|
+
: 'info';
|
|
15
|
+
for (const level of DEBUG_LIST) {
|
|
16
|
+
const parts = level.split(':');
|
|
17
|
+
if (parts[0] !== 'agoric') {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (parts.length > 1) {
|
|
21
|
+
selectedLevel = parts[1];
|
|
22
|
+
} else {
|
|
23
|
+
selectedLevel = 'debug';
|
|
24
|
+
}
|
|
12
25
|
}
|
|
13
|
-
const
|
|
26
|
+
const selectedCode = anylogger.levels[selectedLevel];
|
|
27
|
+
const globalCode = selectedCode === undefined ? -Infinity : selectedCode;
|
|
14
28
|
|
|
15
29
|
const oldExt = anylogger.ext;
|
|
16
30
|
anylogger.ext = (l, o) => {
|
|
17
31
|
l = oldExt(l, o);
|
|
18
|
-
l.enabledFor = lvl =>
|
|
32
|
+
l.enabledFor = lvl => globalCode >= anylogger.levels[lvl];
|
|
19
33
|
|
|
20
34
|
const prefix = l.name.replace(/:/g, ': ');
|
|
21
35
|
for (const [level, code] of Object.entries(anylogger.levels)) {
|
|
22
|
-
if (
|
|
23
|
-
// Disable printing.
|
|
24
|
-
l[level] = () => {};
|
|
25
|
-
} else {
|
|
36
|
+
if (globalCode >= code) {
|
|
26
37
|
// Enable the printing with a prefix.
|
|
27
38
|
const doLog = l[level] || (() => {});
|
|
28
39
|
l[level] = (...args) => doLog(chalk.bold.blue(`${prefix}:`), ...args);
|
|
40
|
+
} else {
|
|
41
|
+
// Disable printing.
|
|
42
|
+
l[level] = () => {};
|
|
29
43
|
}
|
|
30
44
|
}
|
|
31
45
|
return l;
|
package/src/cosmos.js
CHANGED
|
@@ -14,10 +14,10 @@ export default async function cosmosMain(progname, rawArgs, powers, opts) {
|
|
|
14
14
|
const pspawnEnv = { ...process.env };
|
|
15
15
|
if (popts.verbose > 1) {
|
|
16
16
|
// Enable verbose logs.
|
|
17
|
-
pspawnEnv.DEBUG = 'agoric';
|
|
17
|
+
pspawnEnv.DEBUG = 'agoric:info';
|
|
18
18
|
} else if (!popts.verbose) {
|
|
19
19
|
// Disable more logs.
|
|
20
|
-
pspawnEnv.DEBUG = '';
|
|
20
|
+
pspawnEnv.DEBUG = 'agoric:none';
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const pspawn = makePspawn({ env: pspawnEnv, log, spawn, chalk });
|
package/src/start.js
CHANGED
|
@@ -71,10 +71,10 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
71
71
|
const pspawnEnv = { ...process.env };
|
|
72
72
|
if (opts.verbose > 1) {
|
|
73
73
|
// Loudly verbose logs (nondeterministic).
|
|
74
|
-
pspawnEnv.DEBUG = 'agoric,SwingSet:vat,SwingSet:ls';
|
|
74
|
+
pspawnEnv.DEBUG = 'agoric:debug,SwingSet:vat,SwingSet:ls';
|
|
75
75
|
} else if (opts.verbose) {
|
|
76
76
|
// Verbose vat logs (nondeterministic).
|
|
77
|
-
pspawnEnv.DEBUG = 'SwingSet:vat,SwingSet:ls';
|
|
77
|
+
pspawnEnv.DEBUG = 'agoric:info,SwingSet:vat,SwingSet:ls';
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const pspawn = makePspawn({ env: pspawnEnv, spawn, log, chalk });
|
|
@@ -184,7 +184,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
184
184
|
|
|
185
185
|
await null;
|
|
186
186
|
if (popts.reset) {
|
|
187
|
-
rmVerbose(serverDir);
|
|
187
|
+
await rmVerbose(serverDir);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
if (!opts.dockerTag) {
|
|
@@ -274,7 +274,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
274
274
|
|
|
275
275
|
const serverDir = `${SERVERS_ROOT_DIR}/${profileName}-${portNum}`;
|
|
276
276
|
if (popts.reset) {
|
|
277
|
-
rmVerbose(serverDir);
|
|
277
|
+
await rmVerbose(serverDir);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
let chainSpawn;
|
|
@@ -481,7 +481,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
if (popts.reset) {
|
|
484
|
-
rmVerbose(serverDir);
|
|
484
|
+
await rmVerbose(serverDir);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
let soloSpawn;
|
|
@@ -704,7 +704,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
704
704
|
const serverDir = `${SERVERS_ROOT_DIR}/${profileName}-${port}`;
|
|
705
705
|
|
|
706
706
|
if (popts.reset) {
|
|
707
|
-
rmVerbose(serverDir);
|
|
707
|
+
await rmVerbose(serverDir);
|
|
708
708
|
}
|
|
709
709
|
|
|
710
710
|
const setupRun = (...bonusArgs) =>
|
|
@@ -731,7 +731,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {
|
|
|
731
731
|
|
|
732
732
|
await null;
|
|
733
733
|
if (popts.reset) {
|
|
734
|
-
rmVerbose(serverDir);
|
|
734
|
+
await rmVerbose(serverDir);
|
|
735
735
|
}
|
|
736
736
|
|
|
737
737
|
const setupRun = (...bonusArgs) =>
|
package/tools/getting-started.js
CHANGED
|
@@ -64,7 +64,7 @@ export const gettingStartedWorkflowTest = async (t, options = {}) => {
|
|
|
64
64
|
// console.error('running agoric-cli', ...extraArgs, ...args);
|
|
65
65
|
return pspawnStdout(agoricCmd[0], [...agoricCmd.slice(1), ...args], {
|
|
66
66
|
stdio: ['ignore', 'pipe', 'inherit'],
|
|
67
|
-
env: { ...process.env, DEBUG: 'agoric' },
|
|
67
|
+
env: { ...process.env, DEBUG: 'agoric:debug' },
|
|
68
68
|
detached: true,
|
|
69
69
|
...opts,
|
|
70
70
|
});
|