vipcare 0.7.0 → 0.7.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/bin/vip.js +15 -2
  2. package/package.json +1 -1
package/bin/vip.js CHANGED
@@ -134,7 +134,12 @@ program.command('add')
134
134
  console.log(c.cyan(`Resolving ${query}...`));
135
135
 
136
136
  let person;
137
- if (isUrl(query)) {
137
+ // Support @handle as shortcut for Twitter URL
138
+ if (query.startsWith('@')) {
139
+ const handle = query.replace('@', '');
140
+ console.log(c.dim(` Treating as Twitter handle: @${handle}`));
141
+ person = resolveFromUrl(`https://twitter.com/${handle}`);
142
+ } else if (isUrl(query)) {
138
143
  const stop = spinner('Searching for profile...');
139
144
  person = resolveFromUrl(query);
140
145
  stop();
@@ -190,7 +195,15 @@ program.command('add')
190
195
  }
191
196
  }
192
197
 
193
- if (!rawData.trim()) { console.error(c.red('No data found.')); process.exit(1); }
198
+ if (!rawData.trim()) {
199
+ console.error(c.red('No data found for this person.'));
200
+ console.error(c.dim(' This person may not have a Wikipedia page or public profile indexed by search.'));
201
+ console.error(c.dim(' Try one of these:'));
202
+ console.error(c.dim(` vip add @twitterhandle # Use their Twitter handle`));
203
+ console.error(c.dim(` vip add https://twitter.com/handle # Use their Twitter URL`));
204
+ console.error(c.dim(` vip add "${person.name}" -c "Company" # Add company for better search`));
205
+ process.exit(1);
206
+ }
194
207
 
195
208
  let profile;
196
209
  if (opts.ai === false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vipcare",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Auto-build VIP person profiles from Twitter/LinkedIn public data",
5
5
  "type": "module",
6
6
  "bin": {