anywhere-ai 0.0.19 → 0.0.21
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/dist/cli.js +15 -16
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -8,10 +8,10 @@ import path from "path";
|
|
|
8
8
|
import crypto from "crypto";
|
|
9
9
|
import { spawn, spawnSync, execSync } from "child_process";
|
|
10
10
|
import readline from "readline";
|
|
11
|
-
import qrcode from "qrcode
|
|
11
|
+
import qrcode from "qrcode";
|
|
12
12
|
var args = process.argv.slice(2);
|
|
13
13
|
if (args.includes("--version") || args.includes("-v")) {
|
|
14
|
-
console.log(`anywhere-ai v${"0.0.
|
|
14
|
+
console.log(`anywhere-ai v${"0.0.21"}`);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
}
|
|
17
17
|
function ask(question, preserveCase = false) {
|
|
@@ -173,8 +173,8 @@ var isVPS = publicIP && localIP && publicIP !== localIP;
|
|
|
173
173
|
await import("./server-SPM3PZ5G.js");
|
|
174
174
|
var tunnelURL = null;
|
|
175
175
|
var tunnelProcess = null;
|
|
176
|
-
function printBanner(serverURL2) {
|
|
177
|
-
const qrData =
|
|
176
|
+
async function printBanner(serverURL2) {
|
|
177
|
+
const qrData = `${serverURL2}#${config.authToken}`;
|
|
178
178
|
console.log(`
|
|
179
179
|
____ ____ ____ ____ ____ ____ ____ ____
|
|
180
180
|
||A |||N |||Y |||W |||H |||E |||R |||E ||
|
|
@@ -188,17 +188,16 @@ function printBanner(serverURL2) {
|
|
|
188
188
|
console.log();
|
|
189
189
|
console.log(" Scan this QR code in the Anywhere app:");
|
|
190
190
|
console.log();
|
|
191
|
-
qrcode.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
});
|
|
191
|
+
const code = await qrcode.toString(qrData, { type: "terminal", errorCorrectionLevel: "L", small: true });
|
|
192
|
+
for (const line of code.split("\n")) {
|
|
193
|
+
console.log(" " + line);
|
|
194
|
+
}
|
|
195
|
+
console.log();
|
|
196
|
+
console.log(" Or enter the URL and token manually in Settings.");
|
|
197
|
+
if (isVPS) {
|
|
198
|
+
console.log(" Make sure port " + port + " is open in your firewall.");
|
|
199
|
+
}
|
|
200
|
+
console.log();
|
|
202
201
|
}
|
|
203
202
|
if (!args.includes("--no-tunnel")) {
|
|
204
203
|
let cloudflaredBin = null;
|
|
@@ -257,7 +256,7 @@ if (tunnelURL) {
|
|
|
257
256
|
} else {
|
|
258
257
|
serverURL = "http://" + (localIP || "localhost") + ":" + port;
|
|
259
258
|
}
|
|
260
|
-
printBanner(serverURL);
|
|
259
|
+
await printBanner(serverURL);
|
|
261
260
|
function cleanup() {
|
|
262
261
|
if (tunnelProcess) {
|
|
263
262
|
tunnelProcess.kill();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anywhere-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Code on any repo from your phone",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@hono/node-server": "^1.19.11",
|
|
24
24
|
"dotenv": "^17.3.1",
|
|
25
25
|
"hono": "^4.12.5",
|
|
26
|
-
"qrcode
|
|
26
|
+
"qrcode": "^1.5.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^25.3.3",
|