polaris-vpn 1.2.0 → 1.2.1

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": "polaris-vpn",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Your True North in Digital Privacy. A self-hosted VPN CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -70,7 +70,7 @@
70
70
  "node-fetch": "^3.3.2",
71
71
  "node-notifier": "^10.0.1",
72
72
  "ora": "^9.4.1",
73
- "qrcode-terminal": "^0.12.0",
73
+ "qrcode": "^1.5.4",
74
74
  "socks-proxy-agent": "^10.1.0",
75
75
  "ssh2": "^1.17.0",
76
76
  "update-notifier": "^7.3.1"
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import chalk from 'chalk';
3
- import qrcode from 'qrcode-terminal';
3
+ import QRCode from 'qrcode';
4
4
  import { printSuccess, printError, printBox } from '../utils/display.js';
5
5
  import { importWgConfig, exportWgConfig } from '../core/config-export-service.js';
6
6
 
@@ -50,7 +50,8 @@ export const configExport = async (alias, options) => {
50
50
  console.log(chalk.cyan(`\nConfiguration Profile '${alias}':\n`));
51
51
  console.log(confContent);
52
52
  console.log(chalk.cyan('\nScan this QR code with the WireGuard app on your mobile device:\n'));
53
- qrcode.generate(confContent, { small: true });
53
+ const qr = await QRCode.toString(confContent, { type: 'terminal', small: true });
54
+ console.log(qr);
54
55
  }
55
56
  } catch (err) {
56
57
  if (isJson) {
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import chalk from 'chalk';
3
- import qrcode from 'qrcode-terminal';
3
+ import QRCode from 'qrcode';
4
4
  import { createSpinner, printBox, printInfo, createTable } from '../utils/display.js';
5
5
  import { addPeer, listPeers, removePeer, getLocalPeerConfPath } from '../core/peer-service.js';
6
6
  import { handleError } from '../utils/error-handler.js';
@@ -20,7 +20,8 @@ export const peerAdd = async (name, options) => {
20
20
  console.log(chalk.cyan('Scan this QR code with the WireGuard app on your mobile device:\n'));
21
21
 
22
22
  const confString = fs.readFileSync(res.confPath, 'utf-8');
23
- qrcode.generate(confString, { small: true });
23
+ const qr = await QRCode.toString(confString, { type: 'terminal', small: true });
24
+ console.log(qr);
24
25
  }
25
26
  } catch (err) {
26
27
  if (spinner) spinner.fail('Failed to add peer');
@@ -92,7 +93,8 @@ export const peerQr = async (name, options) => {
92
93
  console.log(JSON.stringify({ success: true, config: confString }));
93
94
  } else {
94
95
  console.log(chalk.cyan(`\nQR code for peer configuration '${name}':\n`));
95
- qrcode.generate(confString, { small: true });
96
+ const qr = await QRCode.toString(confString, { type: 'terminal', small: true });
97
+ console.log(qr);
96
98
  }
97
99
  } catch (err) {
98
100
  handleError('Failed to retrieve QR code', err, isJson);