antenna-fyi 1.3.18 ā 1.3.19
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/lib/cli.js +15 -15
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -66,15 +66,15 @@ export async function handleScan(f) {
|
|
|
66
66
|
|
|
67
67
|
export async function handleProfile(f) {
|
|
68
68
|
const id = resolveId(f);
|
|
69
|
-
if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --emoji 𦦠--
|
|
70
|
-
if (f.name || f
|
|
69
|
+
if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --emoji 𦦠--personal-description '...' --looking-for '...' --conversation-style '...'].']");
|
|
70
|
+
if (f.name || f["personal-description"] || f["looking-for"] || f["conversation-style"] || f.visible !== undefined || f.hide !== undefined) {
|
|
71
71
|
const visible = f.hide ? false : (f.visible !== undefined ? f.visible === 'true' || f.visible === true : undefined);
|
|
72
72
|
const payload = { device_id: id };
|
|
73
73
|
if (f.name) payload.display_name = f.name;
|
|
74
74
|
if (f.emoji) payload.emoji = f.emoji;
|
|
75
|
-
if (f
|
|
76
|
-
if (f
|
|
77
|
-
if (f
|
|
75
|
+
if (f["personal-description"] !== undefined) payload.line1 = f["personal-description"];
|
|
76
|
+
if (f["looking-for"] !== undefined) payload.line2 = f["looking-for"];
|
|
77
|
+
if (f["conversation-style"] !== undefined) payload.line3 = f["conversation-style"];
|
|
78
78
|
if (visible !== undefined) payload.visible = visible;
|
|
79
79
|
const data = await setProfile(payload);
|
|
80
80
|
console.log("ā
Profile saved");
|
|
@@ -337,9 +337,9 @@ export async function handleSetup(f) {
|
|
|
337
337
|
|
|
338
338
|
const name = await ask("Display name: ");
|
|
339
339
|
const emoji = (await ask("Emoji (default š¤): ")) || "š¤";
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
340
|
+
const personalDesc = await ask("Personal description ā who you are, what you do: ");
|
|
341
|
+
const lookingFor = await ask("Looking for ā the kind of people you want to meet: ");
|
|
342
|
+
const convStyle = await ask("Conversation style ā the type of conversations you want: ");
|
|
343
343
|
|
|
344
344
|
rl.close();
|
|
345
345
|
|
|
@@ -347,16 +347,16 @@ export async function handleSetup(f) {
|
|
|
347
347
|
device_id: id,
|
|
348
348
|
display_name: name || null,
|
|
349
349
|
emoji,
|
|
350
|
-
line1:
|
|
351
|
-
line2:
|
|
352
|
-
line3:
|
|
350
|
+
line1: personalDesc || null,
|
|
351
|
+
line2: lookingFor || null,
|
|
352
|
+
line3: convStyle || null,
|
|
353
353
|
});
|
|
354
354
|
|
|
355
355
|
console.log("\nā
Profile saved!\n");
|
|
356
356
|
console.log(` ${emoji} ${name || "Anonymous"}`);
|
|
357
|
-
if (
|
|
358
|
-
if (
|
|
359
|
-
if (
|
|
357
|
+
if (personalDesc) console.log(` ${personalDesc}`);
|
|
358
|
+
if (lookingFor) console.log(` ${lookingFor}`);
|
|
359
|
+
if (convStyle) console.log(` ${convStyle}`);
|
|
360
360
|
console.log();
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -974,7 +974,7 @@ export function printHelp() {
|
|
|
974
974
|
Usage:
|
|
975
975
|
antenna scan --lat 39.99 --lng 116.48 [--radius 500] (max 1000) [--id <platform>:<user_id>]
|
|
976
976
|
antenna checkin --id <platform>:<user_id> --lat 39.99 --lng 116.48
|
|
977
|
-
antenna profile --id <platform>:<user_id> [--name Yi --emoji 𦦠--
|
|
977
|
+
antenna profile --id <platform>:<user_id> [--name Yi --emoji 𦦠--personal-description '...']
|
|
978
978
|
antenna accept --id <platform>:<user_id> --target <ref_or_device_id> [--contact 'WeChat: yi']
|
|
979
979
|
antenna pass --id <platform>:<user_id> --target <ref_or_device_id> (or --ref 1)
|
|
980
980
|
antenna matches --id <platform>:<user_id>
|