@commitguard/cli
Advanced tools
+14
-13
| #!/usr/bin/env node | ||
| import { createRequire } from "node:module"; | ||
| import process from "node:process"; | ||
@@ -13,4 +12,4 @@ import { consola } from "consola"; | ||
| import { dirname, join } from "node:path"; | ||
| import { fileURLToPath, pathToFileURL } from "node:url"; | ||
| import { readFile } from "node:fs/promises"; | ||
| import { pathToFileURL } from "node:url"; | ||
| import { findUp } from "find-up"; | ||
@@ -21,8 +20,4 @@ import { FlatCache } from "flat-cache"; | ||
| //#region rolldown:runtime | ||
| var __require = /* @__PURE__ */ createRequire(import.meta.url); | ||
| //#endregion | ||
| //#region package.json | ||
| var version = "0.0.3"; | ||
| var version = "0.0.13"; | ||
| var package_default = { | ||
@@ -36,3 +31,3 @@ name: "@commitguard/cli", | ||
| "type": "git", | ||
| "url": "git+https://github.com/moshetanzer/commitguard.git" | ||
| "url": "git+https://github.com/commitguard/cli.git" | ||
| }, | ||
@@ -55,3 +50,4 @@ exports: { | ||
| "lint": "eslint .", | ||
| "lint:fix": "eslint . --fix" | ||
| "lint:fix": "eslint . --fix", | ||
| "release": "pnpm typecheck && bumpp --tag --push --publish && npm publish" | ||
| }, | ||
@@ -748,3 +744,3 @@ dependencies: { | ||
| const node = process.execPath.replace(/\\/g, "/"); | ||
| const cliPath = __require.resolve("commitguard").replace(/\\/g, "/"); | ||
| const cliPath = fileURLToPath(import.meta.url).replace(/\\/g, "/"); | ||
| writeFileSync(COMMIT_MSG_HOOK_PATH, `#!/bin/sh | ||
@@ -798,5 +794,10 @@ ${COMMITGUARD_MARKER} | ||
| `, { mode: 493 }); | ||
| log.info("Analyzing ESLint configuration for better checks..."); | ||
| await getEslintRules({ overrideCache: true }); | ||
| log.success("ESLint configuration loaded."); | ||
| log.info("Checking ESLint configuration..."); | ||
| try { | ||
| const eslintRules = await getEslintRules({ overrideCache: true }); | ||
| if (Object.keys(eslintRules.rules).length > 0) log.success("ESLint configuration loaded."); | ||
| else log.info("No ESLint rules detected."); | ||
| } catch { | ||
| log.warn("Failed to load ESLint configuration."); | ||
| } | ||
| if (!getGlobalKey() && process.env.COMMITGUARD_API_KEY === void 0) { | ||
@@ -803,0 +804,0 @@ if (await confirm({ |
+13
-11
| { | ||
| "name": "@commitguard/cli", | ||
| "type": "module", | ||
| "version": "0.0.3", | ||
| "version": "0.0.13", | ||
| "description": "AI-powered git commit checker that blocks bad code before it ships", | ||
@@ -9,3 +9,3 @@ "license": "MIT", | ||
| "type": "git", | ||
| "url": "git+https://github.com/moshetanzer/commitguard.git" | ||
| "url": "git+https://github.com/commitguard/cli.git" | ||
| }, | ||
@@ -25,2 +25,12 @@ "exports": { | ||
| ], | ||
| "scripts": { | ||
| "build": "tsdown", | ||
| "dev": "tsdown --watch", | ||
| "test": "vitest", | ||
| "typecheck": "tsc --noEmit", | ||
| "prepublishOnly": "pnpm run build", | ||
| "lint": "eslint .", | ||
| "lint:fix": "eslint . --fix", | ||
| "release": "pnpm typecheck && bumpp --tag --push --publish && npm publish" | ||
| }, | ||
| "dependencies": { | ||
@@ -47,11 +57,3 @@ "@clack/prompts": "^0.11.0", | ||
| "vitest": "^4.0.16" | ||
| }, | ||
| "scripts": { | ||
| "build": "tsdown", | ||
| "dev": "tsdown --watch", | ||
| "test": "vitest", | ||
| "typecheck": "tsc --noEmit", | ||
| "lint": "eslint .", | ||
| "lint:fix": "eslint . --fix" | ||
| } | ||
| } | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
31508
0.69%1040
0.19%