ebay-mcp 1.9.0 → 1.10.0
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/build/index.js +7 -2
- package/build/scripts/diagnostics.js +26 -0
- package/build/utils/version.js +35 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5,8 +5,7 @@ import { createEbayMcpRuntime } from './mcp/runtime.js';
|
|
|
5
5
|
import { runSetup } from './scripts/setup.js';
|
|
6
6
|
import { getErrorMessage } from './utils/errors.js';
|
|
7
7
|
import { serverLogger, getLogPaths } from './utils/logger.js';
|
|
8
|
-
import {
|
|
9
|
-
checkForUpdates({ defer: true });
|
|
8
|
+
import { getCachedUpdateNotice } from './utils/version.js';
|
|
10
9
|
const args = process.argv.slice(2);
|
|
11
10
|
if (args.includes('setup')) {
|
|
12
11
|
try {
|
|
@@ -43,6 +42,12 @@ class EbayMcpServer {
|
|
|
43
42
|
}
|
|
44
43
|
async run() {
|
|
45
44
|
serverLogger.info('Starting eBay API MCP Server');
|
|
45
|
+
// stdout is reserved for the MCP protocol, so a TTY update box (used by the
|
|
46
|
+
// CLIs) can't run here — surface any newer version as a stderr log line.
|
|
47
|
+
const updateNotice = getCachedUpdateNotice();
|
|
48
|
+
if (updateNotice) {
|
|
49
|
+
serverLogger.info(updateNotice);
|
|
50
|
+
}
|
|
46
51
|
// Validate environment configuration
|
|
47
52
|
const validation = validateEnvironmentConfig();
|
|
48
53
|
// Log informational notices (e.g. proxy auth mode)
|
|
@@ -17,6 +17,7 @@ import { displayScopeVerification, parseScopeString } from '../utils/scope-helpe
|
|
|
17
17
|
import { readEnvironment } from './setup-shared.js';
|
|
18
18
|
import { EbaySellerApi } from '../api/index.js';
|
|
19
19
|
import { getErrorMessage } from '../utils/errors.js';
|
|
20
|
+
import { getUpdateInfo, getVersion } from '../utils/version.js';
|
|
20
21
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
22
|
const __dirname = dirname(__filename);
|
|
22
23
|
const PROJECT_ROOT = join(__dirname, '../..');
|
|
@@ -83,6 +84,30 @@ function displaySystemInfo() {
|
|
|
83
84
|
console.log(` ${chalk.gray('CWD:')} ${process.cwd()}`);
|
|
84
85
|
console.log('');
|
|
85
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Check npm for a newer published version and surface it. `diagnose` is an
|
|
89
|
+
* intentional, interactive command run by the user, so a live registry fetch is
|
|
90
|
+
* appropriate here (unlike the server hot path, which uses the cached check).
|
|
91
|
+
* A failed fetch (offline) is reported, not thrown — diagnostics should never
|
|
92
|
+
* abort on a best-effort network call.
|
|
93
|
+
*/
|
|
94
|
+
async function displayUpdateStatus() {
|
|
95
|
+
console.log(chalk.bold.cyan('🔄 Version\n'));
|
|
96
|
+
console.log(` ${chalk.gray('Installed:')} ${getVersion()}`);
|
|
97
|
+
try {
|
|
98
|
+
const info = await getUpdateInfo();
|
|
99
|
+
if (info) {
|
|
100
|
+
console.log(` ${chalk.gray('Latest:')} ${chalk.green(info.latest)} ${chalk.yellow(`(run \`npm i -g ${info.name}\` to update)`)}`);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
console.log(` ${chalk.gray('Latest:')} ${chalk.green('up to date')}`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
console.log(` ${chalk.gray('Latest:')} ${chalk.dim('update check unavailable (offline?)')}`);
|
|
108
|
+
}
|
|
109
|
+
console.log('');
|
|
110
|
+
}
|
|
86
111
|
/**
|
|
87
112
|
* Display configuration status
|
|
88
113
|
*/
|
|
@@ -210,6 +235,7 @@ async function generateDiagnosticReport(exportPath) {
|
|
|
210
235
|
async function runDiagnostics(exportReport = false) {
|
|
211
236
|
displayHeader();
|
|
212
237
|
displaySystemInfo();
|
|
238
|
+
await displayUpdateStatus();
|
|
213
239
|
// Security checks
|
|
214
240
|
const securityResults = await runSecurityChecks(PROJECT_ROOT);
|
|
215
241
|
displaySecurityResults(securityResults);
|
package/build/utils/version.js
CHANGED
|
@@ -48,20 +48,53 @@ export function getPackageName() {
|
|
|
48
48
|
}
|
|
49
49
|
const ONE_DAY_MS = 1000 * 60 * 60 * 24;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Surface a "newer version available" box in an interactive terminal — the
|
|
52
|
+
* setup wizard and `diagnose`.
|
|
53
|
+
*
|
|
54
|
+
* `shouldNotifyInNpmScript: true` is essential: these CLIs are launched via
|
|
55
|
+
* `npm run setup` / `npx`, and without this flag update-notifier suppresses the
|
|
56
|
+
* notice whenever it detects an npm/yarn user agent (the common case). The
|
|
57
|
+
* notice is still a no-op when stdout is not a TTY (e.g. the MCP server's piped
|
|
58
|
+
* stdio); that path uses {@link getCachedUpdateNotice} instead. Dropping the
|
|
59
|
+
* old custom `message` lets update-notifier render its default colorized
|
|
60
|
+
* template (dim current → green latest, cyan command).
|
|
52
61
|
*/
|
|
53
62
|
export function checkForUpdates(options = {}) {
|
|
54
63
|
const pkg = getPackageJson();
|
|
55
64
|
const notifier = updateNotifier({
|
|
56
65
|
pkg,
|
|
57
66
|
updateCheckInterval: ONE_DAY_MS,
|
|
67
|
+
shouldNotifyInNpmScript: true,
|
|
58
68
|
});
|
|
59
69
|
notifier.notify({
|
|
60
70
|
isGlobal: true,
|
|
61
71
|
defer: options.defer ?? false,
|
|
62
|
-
message: 'Update available {currentVersion} → {latestVersion}\n' + 'Run {updateCommand} to update',
|
|
63
72
|
});
|
|
64
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Build a one-line "update available" notice from update-notifier's cached
|
|
76
|
+
* daily check, for contexts with no TTY where {@link checkForUpdates} stays
|
|
77
|
+
* silent — chiefly the MCP server, whose stdout is reserved for the protocol so
|
|
78
|
+
* the notice must go to a stderr log line instead of a box.
|
|
79
|
+
*
|
|
80
|
+
* Constructing the notifier triggers the once-a-day background check and reads
|
|
81
|
+
* its cached result, so this never blocks startup or hits the network on the
|
|
82
|
+
* hot path. Returns `undefined` when already current, or before the first
|
|
83
|
+
* background check has populated the cache (so the notice appears from the
|
|
84
|
+
* second run onward — update-notifier's normal behavior).
|
|
85
|
+
*/
|
|
86
|
+
export function getCachedUpdateNotice() {
|
|
87
|
+
const pkg = getPackageJson();
|
|
88
|
+
const notifier = updateNotifier({
|
|
89
|
+
pkg,
|
|
90
|
+
updateCheckInterval: ONE_DAY_MS,
|
|
91
|
+
});
|
|
92
|
+
const { update } = notifier;
|
|
93
|
+
if (!update || update.latest === pkg.version) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
return `Update available ${pkg.version} → ${update.latest} — run \`npm i -g ${pkg.name}\` to update`;
|
|
97
|
+
}
|
|
65
98
|
/**
|
|
66
99
|
* Fetches update metadata without printing a notification.
|
|
67
100
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ebay-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server that exposes 100% of eBay's Sell APIs (332 tools across 270 endpoints) to AI assistants like Claude, Cursor, and Cline, covering inventory, order fulfillment, marketing, analytics, and developer tools with OAuth authentication and refresh-token support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|