krx-cli 1.7.1 → 1.7.2
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/SKILL.md +1 -1
- package/dist/cli.js +13 -10
- package/dist/cli.js.map +2 -2
- package/dist/mcp.js +7 -9
- package/dist/mcp.js.map +2 -2
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -31302,21 +31302,19 @@ function createCategoryTool(categoryId) {
|
|
|
31302
31302
|
err instanceof Error ? err.message : "Invalid date format"
|
|
31303
31303
|
);
|
|
31304
31304
|
}
|
|
31305
|
-
const extraParams = {};
|
|
31306
|
-
if (isuCd) {
|
|
31307
|
-
extraParams["isuCd"] = isuCd;
|
|
31308
|
-
}
|
|
31309
31305
|
const rangeResult = await fetchDateRange({
|
|
31310
31306
|
endpoint: endpoint.path,
|
|
31311
31307
|
from: dateFrom,
|
|
31312
31308
|
to: dateTo,
|
|
31313
|
-
apiKey
|
|
31314
|
-
extraParams
|
|
31309
|
+
apiKey
|
|
31315
31310
|
});
|
|
31316
31311
|
if (!rangeResult.success) {
|
|
31317
31312
|
return errorResult(rangeResult.error ?? "Date range fetch failed");
|
|
31318
31313
|
}
|
|
31319
31314
|
let data2 = rangeResult.data;
|
|
31315
|
+
if (isuCd) {
|
|
31316
|
+
data2 = data2.filter((row) => row["ISU_CD"] === isuCd);
|
|
31317
|
+
}
|
|
31320
31318
|
const filterExpr = args.filter;
|
|
31321
31319
|
const sortField2 = args.sort;
|
|
31322
31320
|
const sortDirection2 = args.sort_direction ?? "desc";
|
|
@@ -31344,9 +31342,6 @@ function createCategoryTool(categoryId) {
|
|
|
31344
31342
|
);
|
|
31345
31343
|
}
|
|
31346
31344
|
const params = { basDd: dateStr };
|
|
31347
|
-
if (isuCd) {
|
|
31348
|
-
params["isuCd"] = isuCd;
|
|
31349
|
-
}
|
|
31350
31345
|
const result = await krxFetch({
|
|
31351
31346
|
endpoint: endpoint.path,
|
|
31352
31347
|
params,
|
|
@@ -31361,6 +31356,9 @@ function createCategoryTool(categoryId) {
|
|
|
31361
31356
|
const offsetN = args.offset;
|
|
31362
31357
|
const limitN = args.limit;
|
|
31363
31358
|
let data = result.data;
|
|
31359
|
+
if (isuCd) {
|
|
31360
|
+
data = data.filter((row) => row["ISU_CD"] === isuCd);
|
|
31361
|
+
}
|
|
31364
31362
|
data = applyPipeline(data, {
|
|
31365
31363
|
filter: filterExpr2,
|
|
31366
31364
|
sort: sortField,
|