dart-fss-cli 0.4.5 → 0.4.6

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/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createDartProgram,
4
4
  formatErrorJson
5
- } from "./chunk-JYPAIE4W.js";
5
+ } from "./chunk-UHR5UNEO.js";
6
6
 
7
7
  // src/bin.ts
8
8
  createDartProgram().parseAsync(process.argv).catch((err) => {
@@ -2,11 +2,12 @@
2
2
  import { Command } from "commander";
3
3
 
4
4
  // src/config.ts
5
- import { homedir } from "os";
5
+ import { homedir as homedir2 } from "os";
6
6
  import { join as join2 } from "path";
7
7
 
8
8
  // src/env.ts
9
9
  import { existsSync, readFileSync } from "fs";
10
+ import { homedir } from "os";
10
11
  import { join, resolve } from "path";
11
12
  var loaded = false;
12
13
  function loadEnv() {
@@ -15,7 +16,8 @@ function loadEnv() {
15
16
  const candidates = [
16
17
  process.cwd(),
17
18
  resolve(process.cwd(), ".."),
18
- resolve(import.meta.dirname, "..")
19
+ resolve(import.meta.dirname, ".."),
20
+ join(homedir(), ".dart-fss")
19
21
  ];
20
22
  for (const base of candidates) {
21
23
  const envPath = join(base, ".env");
@@ -40,7 +42,7 @@ function loadEnv() {
40
42
  // src/config.ts
41
43
  loadEnv();
42
44
  var DART_BASE_URL = "https://opendart.fss.or.kr/api/";
43
- var CACHE_DIR = join2(homedir(), ".dart-fss");
45
+ var CACHE_DIR = join2(homedir2(), ".dart-fss");
44
46
  var CORP_CODE_CACHE_PATH = join2(CACHE_DIR, "corp-codes.json");
45
47
  var CORP_CODE_CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
46
48
  function getApiKey(optionKey) {
@@ -1664,7 +1666,7 @@ function createDartProgram() {
1664
1666
  const program = new Command();
1665
1667
  program.name("dart-fss").description(
1666
1668
  'DART Open API CLI \u2014 access Korea Financial Supervisory Service (FSS) electronic disclosure system.\nProvides 83 API endpoints for company filings, financial statements, equity disclosures, and more.\nAuthentication: set DART_API_KEY env var or pass --api-key. Get a key at https://opendart.fss.or.kr\nCompanies are identified by 8-digit corp_code or company name. Use "dart-fss lookup <name>" to find corp_code.\nOutput is JSON by default (compact single-line). Use --pretty for formatted output.\nRate limit: approximately 20,000 requests per day per API key.'
1667
- ).version("0.4.5").option("--api-key <key>", "DART API key (default: DART_API_KEY env). Get one at https://opendart.fss.or.kr").option("--pretty", "Pretty-print JSON output (default: compact single-line JSON)").option("--output <file>", "Save result to file instead of stdout").option("--json <params>", "Pass raw API parameters as JSON string, bypassing flag parsing").option("--fields <f1,f2,...>", "Comma-separated field names to include in output (reduces response size for agents)").option("--dry-run", "Validate parameters and print the resolved API request without calling the API");
1669
+ ).version("0.4.6").option("--api-key <key>", "DART API key (default: DART_API_KEY env). Get one at https://opendart.fss.or.kr").option("--pretty", "Pretty-print JSON output (default: compact single-line JSON)").option("--output <file>", "Save result to file instead of stdout").option("--json <params>", "Pass raw API parameters as JSON string, bypassing flag parsing").option("--fields <f1,f2,...>", "Comma-separated field names to include in output (reduces response size for agents)").option("--dry-run", "Validate parameters and print the resolved API request without calling the API");
1668
1670
  registerDisclosureCommands(program);
1669
1671
  registerPeriodicReportCommands(program);
1670
1672
  registerFinancialCommands(program);
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createDartProgram
3
- } from "./chunk-JYPAIE4W.js";
3
+ } from "./chunk-UHR5UNEO.js";
4
4
  export {
5
5
  createDartProgram
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dart-fss-cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "DART (금융감독원 전자공시) Open API CLI",
5
5
  "type": "module",
6
6
  "bin": {