@fre4x/yahoo-finance 1.0.55 → 1.0.58

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 +12 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38262,22 +38262,26 @@ var StdioServerTransport = class {
38262
38262
  // ../packages/shared/dist/errors.js
38263
38263
  function createApiError(message, statusCode) {
38264
38264
  let hint = "Check your network connection and retry.";
38265
+ let type = "Service Error";
38265
38266
  if (statusCode === 429) {
38266
- hint = "Rate limit exceeded. Suggestion: Wait for 60 seconds (Exponential Backoff) before retrying or reduce concurrent calls.";
38267
+ type = "Rate Limit";
38268
+ hint = "Request volume is too high. Suggestion: Wait briefly before retrying or reduce concurrent calls.";
38267
38269
  } else if (statusCode === 401 || statusCode === 403) {
38268
- hint = "Authentication failed. Suggestion: Verify your API key or token in the environment configuration.";
38270
+ type = "Authentication Error";
38271
+ hint = "The request could not be authorized. Suggestion: Verify your API key or token in the environment configuration.";
38269
38272
  } else if (statusCode && statusCode >= 500) {
38270
- hint = "Upstream service is having issues. Suggestion: This is a temporary external error. Try again in a few minutes.";
38273
+ type = "Upstream Error";
38274
+ hint = "The remote service is experiencing temporary issues. Suggestion: Try again in a few minutes.";
38271
38275
  } else if (statusCode === 404) {
38272
- hint = "The requested resource was not found. Suggestion: Check if the ID or Ticker is correct, or search for it first.";
38276
+ type = "Not Found";
38277
+ hint = "The requested information could not be found. Suggestion: Check if the ID, Ticker, or query parameters are correct.";
38273
38278
  }
38274
- const detail = statusCode ? ` (HTTP ${statusCode})` : "";
38275
38279
  return {
38276
38280
  isError: true,
38277
38281
  content: [
38278
38282
  {
38279
38283
  type: "text",
38280
- text: `API Error${detail}: ${message}
38284
+ text: `${type}: ${message}
38281
38285
 
38282
38286
  **Next Action**: ${hint}`
38283
38287
  }
@@ -38327,7 +38331,8 @@ _Showing ${start}\u2013${end} of ${total}. Use \`offset: ${offset + limit}\` for
38327
38331
  }
38328
38332
 
38329
38333
  // ../packages/shared/dist/pagination.js
38330
- var z2 = external_exports3 || zod_default || zod_exports;
38334
+ var zodCompat = zod_exports;
38335
+ var z2 = zodCompat.z ?? zodCompat.default?.z ?? zodCompat.default ?? zodCompat;
38331
38336
  var paginationSchema = z2.object({
38332
38337
  limit: z2.number().int().min(1).max(100).default(20).describe("Maximum results to return (1\u2013100, default 20)"),
38333
38338
  offset: z2.number().int().min(0).default(0).describe("Number of results to skip for pagination (default 0)")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/yahoo-finance",
3
- "version": "1.0.55",
3
+ "version": "1.0.58",
4
4
  "description": "A Yahoo Finance MCP server for LLMs.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",