diff --git a/.github/ISSUE_TEMPLATE/good-first-issue.md b/.github/ISSUE_TEMPLATE/good-first-issue.md new file mode 100644 index 0000000..eb7645a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/good-first-issue.md @@ -0,0 +1,33 @@ +--- +name: "๐Ÿš€ Good First Issue" +about: A starter task for new TypeScript / Commander contributors. +title: "[Good First Issue]: " +labels: ["good first issue", "help wanted", "typescript", "vitest"] +assignees: "" +--- + +## ๐Ÿ“ What needs to be done? + + +### ๐ŸŽฏ Expected Behavior + + +### ๐Ÿ› ๏ธ Technical Implementation Guide +This project is modular and built on modern tooling: +1. **CLI Layer:** We handle flags using `commander` (v14.0.3) โ€” entry point is in `src/index.ts`. +2. **Business Logic:** Implement your new handler or validation rules inside the respective subcommand file under `src/commands/`. +3. **Tests:** We use `vitest` (v4.1.6) with the native fork pool to separate testing environments cleanly. Tests live in `src/__tests__/`. + +### ๐Ÿงช Verifying Your Work Locally +1. Clean install your dependencies: + ```bash + npm install + ``` +2. Run our strict test runner to ensure code coverage and logic pass perfectly: + ```bash + npm test + ``` + *(Note: This fires up `vitest run --pool=forks` with coverage via `@vitest/coverage-v8`, after automatically rebuilding the TypeScript source.)* + +### โš–๏ธ Open Source & Licensing Safeguard +This project is proudly protected under the **AGPL-3.0 License**. Because it is a standalone CLI execution tool, running, extending, or contributing to this codebase **does not** impact or "infect" your external proprietary or commercial enterprise apps. Your code remains yours, and we promise transparent attribution! diff --git a/package.json b/package.json index 84fecaf..ebef91d 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "scripts": { "build": "tsup src/index.ts --format esm --dts", "dev": "tsup src/index.ts --format esm --watch", + "pretest": "npm run build", "test": "vitest run --pool=forks", "prepublishOnly": "npm run build" }, @@ -35,7 +36,7 @@ "devops" ], "author": "", - "license": "MIT", + "license": "AGPL-3.0-only", "dependencies": { "@kubernetes/client-node": "^1.4.0", "@vr_patel/tui": "^1.0.0", diff --git a/src/__tests__/auth.test.ts b/src/__tests__/auth.test.ts index 0ed5ff5..ccd0b34 100644 --- a/src/__tests__/auth.test.ts +++ b/src/__tests__/auth.test.ts @@ -153,7 +153,7 @@ describe('auth command & AI clients', () => { ]); await program.parseAsync(['node', 'test', 'auth', 'list']); expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('openai')); - expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('supe...ikey')); + expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('(set)')); }); it('shows empty list message', async () => {