@gopherhole/cli 0.1.11 → 0.1.13
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/index.js +9 -3
- package/package.json +1 -1
- package/src/index.ts +8 -3
package/dist/index.js
CHANGED
|
@@ -1131,7 +1131,8 @@ ${chalk_1.default.bold('Examples:')}
|
|
|
1131
1131
|
accessBadge = chalk_1.default.blue('👤YOURS');
|
|
1132
1132
|
}
|
|
1133
1133
|
else if (agent.accessStatus === 'approved' || agent.accessStatus === 'open') {
|
|
1134
|
-
|
|
1134
|
+
const discountText = agent.discountPercent ? ` ${agent.discountPercent}% OFF` : '';
|
|
1135
|
+
accessBadge = chalk_1.default.green(`✓ACCESS${discountText}`);
|
|
1135
1136
|
}
|
|
1136
1137
|
else if (agent.accessStatus === 'pending') {
|
|
1137
1138
|
accessBadge = chalk_1.default.yellow('⏳PENDING');
|
|
@@ -1184,7 +1185,11 @@ discover
|
|
|
1184
1185
|
.action(async () => {
|
|
1185
1186
|
const spinner = (0, ora_1.default)('Fetching featured agents...').start();
|
|
1186
1187
|
try {
|
|
1187
|
-
const
|
|
1188
|
+
const sessionId = config.get('sessionId');
|
|
1189
|
+
const headers = {};
|
|
1190
|
+
if (sessionId)
|
|
1191
|
+
headers['X-Session-ID'] = sessionId;
|
|
1192
|
+
const res = await fetch(`${API_URL}/discover/featured`, { headers });
|
|
1188
1193
|
const data = await res.json();
|
|
1189
1194
|
spinner.stop();
|
|
1190
1195
|
if (data.featured.length === 0) {
|
|
@@ -1245,7 +1250,8 @@ ${chalk_1.default.bold('Example:')}
|
|
|
1245
1250
|
accessLine = chalk_1.default.blue('👤 Your agent');
|
|
1246
1251
|
}
|
|
1247
1252
|
else if (agent.accessStatus === 'approved') {
|
|
1248
|
-
|
|
1253
|
+
const discountText = agent.discountPercent ? chalk_1.default.cyan(` (${agent.discountPercent}% discount)`) : '';
|
|
1254
|
+
accessLine = chalk_1.default.green('✓ You have access') + discountText;
|
|
1249
1255
|
}
|
|
1250
1256
|
else if (agent.accessStatus === 'open') {
|
|
1251
1257
|
accessLine = chalk_1.default.green('✓ Open access (instant)');
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1251,7 +1251,8 @@ ${chalk.bold('Examples:')}
|
|
|
1251
1251
|
if (agent.accessStatus === 'owner') {
|
|
1252
1252
|
accessBadge = chalk.blue('👤YOURS');
|
|
1253
1253
|
} else if (agent.accessStatus === 'approved' || agent.accessStatus === 'open') {
|
|
1254
|
-
|
|
1254
|
+
const discountText = agent.discountPercent ? ` ${agent.discountPercent}% OFF` : '';
|
|
1255
|
+
accessBadge = chalk.green(`✓ACCESS${discountText}`);
|
|
1255
1256
|
} else if (agent.accessStatus === 'pending') {
|
|
1256
1257
|
accessBadge = chalk.yellow('⏳PENDING');
|
|
1257
1258
|
} else if (agent.accessStatus === 'denied') {
|
|
@@ -1307,7 +1308,10 @@ discover
|
|
|
1307
1308
|
const spinner = ora('Fetching featured agents...').start();
|
|
1308
1309
|
|
|
1309
1310
|
try {
|
|
1310
|
-
const
|
|
1311
|
+
const sessionId = config.get('sessionId') as string | undefined;
|
|
1312
|
+
const headers: Record<string, string> = {};
|
|
1313
|
+
if (sessionId) headers['X-Session-ID'] = sessionId;
|
|
1314
|
+
const res = await fetch(`${API_URL}/discover/featured`, { headers });
|
|
1311
1315
|
const data = await res.json();
|
|
1312
1316
|
spinner.stop();
|
|
1313
1317
|
|
|
@@ -1372,7 +1376,8 @@ ${chalk.bold('Example:')}
|
|
|
1372
1376
|
if (agent.accessStatus === 'owner') {
|
|
1373
1377
|
accessLine = chalk.blue('👤 Your agent');
|
|
1374
1378
|
} else if (agent.accessStatus === 'approved') {
|
|
1375
|
-
|
|
1379
|
+
const discountText = agent.discountPercent ? chalk.cyan(` (${agent.discountPercent}% discount)`) : '';
|
|
1380
|
+
accessLine = chalk.green('✓ You have access') + discountText;
|
|
1376
1381
|
} else if (agent.accessStatus === 'open') {
|
|
1377
1382
|
accessLine = chalk.green('✓ Open access (instant)');
|
|
1378
1383
|
} else if (agent.accessStatus === 'pending') {
|