@vigilhq/cli 0.1.0 → 0.1.1

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 +6 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -124,6 +124,7 @@ program
124
124
  .description("Show active watchlist sources and their status")
125
125
  .option("--api-key <key>", "API key (or set VIGIL_API_KEY env var)")
126
126
  .option("--base-url <url>", "API base URL", "https://api.vigilhq.dev")
127
+ .option("--json", "Output raw JSON")
127
128
  .action(async (opts) => {
128
129
  const apiKey = opts.apiKey || process.env.VIGIL_API_KEY;
129
130
  if (!apiKey) {
@@ -135,7 +136,11 @@ program
135
136
  headers: { Authorization: `Bearer ${apiKey}` },
136
137
  });
137
138
  const data = await resp.json();
138
- const sources = Array.isArray(data) ? data : data.sources ?? [];
139
+ if (opts.json) {
140
+ console.log(JSON.stringify(data, null, 2));
141
+ return;
142
+ }
143
+ const sources = Array.isArray(data) ? data : data.data ?? data.sources ?? [];
139
144
  console.log();
140
145
  console.log(chalk.bold(" Active Watchlist Sources:"));
141
146
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vigilhq/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Vigil CLI — Screen entities against global sanctions and PEP lists from the command line",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@vigilhq/sdk": "workspace:^",
16
+ "@vigilhq/sdk": "^0.1.1",
17
17
  "chalk": "^5.3.0",
18
18
  "commander": "^12.0.0",
19
19
  "ora": "^8.0.0"