byreal-test 1.3.0 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byreal-test",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Byreal CLI test suite - runs byreal-cli commands and generates test reports",
5
5
  "main": "cli.js",
6
6
  "bin": {
package/src/setup.js CHANGED
@@ -89,14 +89,22 @@ async function runSetup() {
89
89
  fs.chmodSync(keypairPath, 0o600);
90
90
  console.log(chalk.green(` ✓ Keypair saved to ${keypairPath}`));
91
91
 
92
- // set wallet
92
+ // set wallet — try new API (v0.2+) first, fall back to old API (v0.1.x)
93
+ let walletOk = false;
93
94
  try {
94
- execSync(`byreal-cli wallet set ${keypairPath}`, { encoding: 'utf8', stdio: 'pipe' });
95
- console.log(chalk.green(' ✓ byreal-cli wallet configured'));
96
- } catch (err) {
97
- console.error(chalk.red(` ✗ byreal-cli wallet set failed: ${err.stderr || err.message}`));
98
- process.exit(1);
95
+ execSync(`byreal-cli wallet set --private-key ${raw}`, { encoding: 'utf8', stdio: 'pipe' });
96
+ walletOk = true;
97
+ } catch {
98
+ // old API: pass keypair file path
99
+ try {
100
+ execSync(`byreal-cli wallet set ${keypairPath}`, { encoding: 'utf8', stdio: 'pipe' });
101
+ walletOk = true;
102
+ } catch (err2) {
103
+ console.error(chalk.red(` ✗ byreal-cli wallet set failed: ${err2.stderr || err2.message}`));
104
+ process.exit(1);
105
+ }
99
106
  }
107
+ if (walletOk) console.log(chalk.green(' ✓ byreal-cli wallet configured'));
100
108
 
101
109
  // confirm address
102
110
  try {
@@ -10,6 +10,7 @@ const SWAP_AMOUNT = '1';
10
10
  const EXCLUDED_SYMBOLS = new Set([
11
11
  'SOL', 'bbSOL', 'USDT', 'USD1', 'CRCLx', 'NVDAx',
12
12
  'XAUt0', 'METAx', 'AMZNx', 'COINx', 'APPLx', 'MCDx',
13
+ 'GOOGLx', 'TSLAx',
13
14
  ]);
14
15
 
15
16
  // ─── lark notify ─────────────────────────────────────────────────────────────