@voteship/cli
Advanced tools
+1
-0
| #!/usr/bin/env node | ||
| export declare function run(argv?: string[]): Promise<number>; | ||
| export declare function isDirectExecution(moduleUrl: string, argvPath: string | undefined): boolean; |
+14
-2
| #!/usr/bin/env node | ||
| import { createInterface } from "node:readline/promises"; | ||
| import { realpathSync } from "node:fs"; | ||
| import { stdin, stdout } from "node:process"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { installVoteShip, validatePosition, validateProjectKey, } from "./installer.js"; | ||
| import { verifyInstallation } from "./verify.js"; | ||
| const VERSION = "0.1.0"; | ||
| const VERSION = "0.1.1"; | ||
| function parseArgs(argv) { | ||
@@ -117,4 +119,14 @@ const command = argv[0] && !argv[0].startsWith("-") ? argv[0] : "init"; | ||
| } | ||
| if (import.meta.url === `file://${process.argv[1]}`) { | ||
| export function isDirectExecution(moduleUrl, argvPath) { | ||
| if (!argvPath) | ||
| return false; | ||
| try { | ||
| return realpathSync(fileURLToPath(moduleUrl)) === realpathSync(argvPath); | ||
| } | ||
| catch { | ||
| return false; | ||
| } | ||
| } | ||
| if (isDirectExecution(import.meta.url, process.argv[1])) { | ||
| process.exitCode = await run(); | ||
| } |
+1
-1
@@ -5,3 +5,3 @@ import { WIDGET_URL } from "./installer.js"; | ||
| const response = await fetcher(normalized, { | ||
| headers: { "User-Agent": "VoteShip-CLI/0.1.0" }, | ||
| headers: { "User-Agent": "VoteShip-CLI/0.1.1" }, | ||
| redirect: "follow", | ||
@@ -8,0 +8,0 @@ }); |
+1
-1
| { | ||
| "name": "@voteship/cli", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Install and verify VoteShip feedback widgets from Claude Code, Codex, or any terminal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
19284
2.25%372
3.62%4
33.33%