@indexnetwork/cli 0.10.10 → 0.10.12-rc.41.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1489,8 +1489,8 @@ async function handleProfile(client, subcommand, positionals, options = {}) {
1489
1489
  } else {
1490
1490
  for (const p of data.profiles) {
1491
1491
  console.log(` ${p.name} (${p.userId.slice(0, 8)})`);
1492
- if (p.profile?.bio)
1493
- dim(` ${p.profile.bio.slice(0, 100)}`);
1492
+ if (p.bio)
1493
+ dim(` ${p.bio.slice(0, 100)}`);
1494
1494
  }
1495
1495
  }
1496
1496
  console.log();
@@ -1952,7 +1952,14 @@ async function discoverIntroduction(client, userA, userB, hint, json) {
1952
1952
  if (d.profile)
1953
1953
  return d.profile;
1954
1954
  const profiles = d.profiles;
1955
- return profiles?.[0]?.profile;
1955
+ if (profiles?.length) {
1956
+ const first = profiles[0];
1957
+ return first.profile ?? first;
1958
+ }
1959
+ if (typeof d.name === "string" || typeof d.context === "string") {
1960
+ return { name: d.name, bio: d.bio, location: d.location, context: d.context };
1961
+ }
1962
+ return;
1956
1963
  };
1957
1964
  const extractIntents = (result2) => {
1958
1965
  if (!result2.success || !result2.data)
@@ -2959,7 +2966,7 @@ async function onboardingComplete(client, json) {
2959
2966
  // src/main.ts
2960
2967
  var DEFAULT_API_URL = "https://protocol.index.network";
2961
2968
  var DEFAULT_APP_URL = "https://index.network";
2962
- var VERSION = "0.10.6";
2969
+ var VERSION = "0.10.12";
2963
2970
  var BOX = { tl: "╭", tr: "╮", bl: "╰", br: "╯", h: "─", v: "│" };
2964
2971
  function visualLen(s) {
2965
2972
  return stripAnsi(s).length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/cli",
3
- "version": "0.10.10",
3
+ "version": "0.10.12-rc.41.1",
4
4
  "description": "Command-line interface for Index Network",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,10 +20,10 @@
20
20
  "publish:all": "bun scripts/publish.ts"
21
21
  },
22
22
  "optionalDependencies": {
23
- "@indexnetwork/cli-linux-x64": "0.10.10",
24
- "@indexnetwork/cli-linux-arm64": "0.10.10",
25
- "@indexnetwork/cli-darwin-x64": "0.10.10",
26
- "@indexnetwork/cli-darwin-arm64": "0.10.10"
23
+ "@indexnetwork/cli-linux-x64": "0.10.12-rc.41.1",
24
+ "@indexnetwork/cli-linux-arm64": "0.10.12-rc.41.1",
25
+ "@indexnetwork/cli-darwin-x64": "0.10.12-rc.41.1",
26
+ "@indexnetwork/cli-darwin-arm64": "0.10.12-rc.41.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/bun": "latest"