huntr-cli 1.0.9
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/.env.example +7 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
- package/.github/labels.json +92 -0
- package/.github/pull_request_template.md +64 -0
- package/.github/workflows/ci.yml +87 -0
- package/.github/workflows/labels.yml +27 -0
- package/.github/workflows/manual-publish.yml +105 -0
- package/.github/workflows/publish.yml +57 -0
- package/.github/workflows/release.yml +124 -0
- package/.github/workflows/security-audit.yml +44 -0
- package/.husky/pre-commit +12 -0
- package/.husky/pre-push +27 -0
- package/.lintstagedrc.json +3 -0
- package/AGENTS.md +449 -0
- package/CHANGELOG.md +38 -0
- package/CHANGES.md +259 -0
- package/LICENSE +15 -0
- package/PUBLISHING.md +191 -0
- package/README.md +385 -0
- package/ROADMAP.md +158 -0
- package/SETUP-COMPLETE.md +446 -0
- package/WORKFLOW-SUMMARY.md +368 -0
- package/completions/_huntr +168 -0
- package/completions/huntr.1 +266 -0
- package/completions/huntr.bash +91 -0
- package/dist/api/client.d.ts +14 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +74 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/personal/activities.d.ts +20 -0
- package/dist/api/personal/activities.d.ts.map +1 -0
- package/dist/api/personal/activities.js +50 -0
- package/dist/api/personal/activities.js.map +1 -0
- package/dist/api/personal/boards.d.ts +9 -0
- package/dist/api/personal/boards.d.ts.map +1 -0
- package/dist/api/personal/boards.js +16 -0
- package/dist/api/personal/boards.js.map +1 -0
- package/dist/api/personal/index.d.ts +17 -0
- package/dist/api/personal/index.d.ts.map +1 -0
- package/dist/api/personal/index.js +37 -0
- package/dist/api/personal/index.js.map +1 -0
- package/dist/api/personal/jobs.d.ts +13 -0
- package/dist/api/personal/jobs.d.ts.map +1 -0
- package/dist/api/personal/jobs.js +31 -0
- package/dist/api/personal/jobs.js.map +1 -0
- package/dist/api/personal/user.d.ts +8 -0
- package/dist/api/personal/user.d.ts.map +1 -0
- package/dist/api/personal/user.js +13 -0
- package/dist/api/personal/user.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +501 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/capture-session.d.ts +10 -0
- package/dist/commands/capture-session.d.ts.map +1 -0
- package/dist/commands/capture-session.js +478 -0
- package/dist/commands/capture-session.js.map +1 -0
- package/dist/config/clerk-session-manager.d.ts +44 -0
- package/dist/config/clerk-session-manager.d.ts.map +1 -0
- package/dist/config/clerk-session-manager.js +232 -0
- package/dist/config/clerk-session-manager.js.map +1 -0
- package/dist/config/config-manager.d.ts +15 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +51 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/config/keychain-manager.d.ts +6 -0
- package/dist/config/keychain-manager.d.ts.map +1 -0
- package/dist/config/keychain-manager.js +37 -0
- package/dist/config/keychain-manager.js.map +1 -0
- package/dist/config/token-capture.d.ts +11 -0
- package/dist/config/token-capture.d.ts.map +1 -0
- package/dist/config/token-capture.js +252 -0
- package/dist/config/token-capture.js.map +1 -0
- package/dist/config/token-manager.d.ts +38 -0
- package/dist/config/token-manager.d.ts.map +1 -0
- package/dist/config/token-manager.js +153 -0
- package/dist/config/token-manager.js.map +1 -0
- package/dist/lib/list-options.d.ts +69 -0
- package/dist/lib/list-options.d.ts.map +1 -0
- package/dist/lib/list-options.js +299 -0
- package/dist/lib/list-options.js.map +1 -0
- package/dist/types/personal.d.ts +113 -0
- package/dist/types/personal.d.ts.map +1 -0
- package/dist/types/personal.js +4 -0
- package/dist/types/personal.js.map +1 -0
- package/docs/AUTOMATIC-PUBLISHING.md +520 -0
- package/docs/CHANGELOG-AUTOMATION.md +418 -0
- package/docs/CI-CD-SETUP.md +582 -0
- package/docs/DEV-SETUP.md +512 -0
- package/docs/ENHANCEMENT-PLAN.md +204 -0
- package/docs/ENTITY-TYPES.md +462 -0
- package/docs/GITHUB-ACTIONS-GUIDE.md +367 -0
- package/docs/NPM-PUBLISHING.md +324 -0
- package/docs/OUTPUT-EXAMPLES.md +414 -0
- package/docs/OUTPUT-FORMATS.md +299 -0
- package/docs/TESTING.md +216 -0
- package/eslint.config.js +68 -0
- package/package.json +64 -0
- package/src/api/client.ts +88 -0
- package/src/api/personal/activities.ts +66 -0
- package/src/api/personal/boards.ts +14 -0
- package/src/api/personal/index.ts +25 -0
- package/src/api/personal/jobs.ts +33 -0
- package/src/api/personal/user.ts +10 -0
- package/src/cli.ts +487 -0
- package/src/commands/capture-session.ts +582 -0
- package/src/config/clerk-session-manager.ts +263 -0
- package/src/config/config-manager.ts +56 -0
- package/src/config/keychain-manager.ts +30 -0
- package/src/config/token-capture.ts +233 -0
- package/src/config/token-manager.ts +139 -0
- package/src/lib/list-options.ts +370 -0
- package/src/types/personal.ts +114 -0
- package/tests/example.test.ts +130 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example test suite to verify huntr-cli workflow
|
|
3
|
+
*
|
|
4
|
+
* Run tests: npm test
|
|
5
|
+
* Run specific test: npm test -- --testNamePattern="boards"
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { describe, it, expect } from 'vitest';
|
|
9
|
+
|
|
10
|
+
describe('huntr-cli Workflow Tests', () => {
|
|
11
|
+
describe('Command Structure', () => {
|
|
12
|
+
it('should have huntr command configured in package.json bin', () => {
|
|
13
|
+
// This test verifies the command structure is correct
|
|
14
|
+
expect(process.env.npm_package_bin_huntr).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should support boards list command', () => {
|
|
18
|
+
// Test that the boards list command exists
|
|
19
|
+
const commands = ['boards', 'jobs', 'activities'];
|
|
20
|
+
expect(commands).toContain('boards');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should support output format options', () => {
|
|
24
|
+
// Test that output formats are available
|
|
25
|
+
const formats = ['table', 'json', 'csv', 'pdf', 'excel'];
|
|
26
|
+
expect(formats.length).toBe(5);
|
|
27
|
+
expect(formats).toContain('json');
|
|
28
|
+
expect(formats).toContain('csv');
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe('Build & Compilation', () => {
|
|
33
|
+
it('should compile TypeScript without errors', () => {
|
|
34
|
+
// This test is skipped but documents the workflow
|
|
35
|
+
// In real CI, tsc --noEmit runs before tests
|
|
36
|
+
expect(true).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should pass linting checks', () => {
|
|
40
|
+
// This test documents that eslint runs in CI
|
|
41
|
+
// Pre-commit and pre-push hooks enforce this locally
|
|
42
|
+
expect(true).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe('Git Workflow', () => {
|
|
47
|
+
it('should enforce conventional commits', () => {
|
|
48
|
+
// Example commit types that should be used
|
|
49
|
+
const validTypes = ['feat', 'fix', 'docs', 'chore', 'refactor', 'test', 'perf'];
|
|
50
|
+
expect(validTypes).toContain('feat');
|
|
51
|
+
expect(validTypes).toContain('fix');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('should trigger pre-commit hook on git commit', () => {
|
|
55
|
+
// Pre-commit hook runs eslint --fix automatically
|
|
56
|
+
expect(true).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should trigger pre-push hook on git push', () => {
|
|
60
|
+
// Pre-push hook runs: typecheck → lint → build
|
|
61
|
+
expect(true).toBe(true);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('Publishing Workflow', () => {
|
|
66
|
+
it('should auto-publish to npm on GitHub Release', () => {
|
|
67
|
+
// publish.yml triggers on GitHub Release
|
|
68
|
+
// Runs full CI then npm publish
|
|
69
|
+
expect(true).toBe(true);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('should create artifacts on version bump', () => {
|
|
73
|
+
// release.yml detects version change
|
|
74
|
+
// Creates tar.gz and zip archives
|
|
75
|
+
// Creates GitHub Release with artifacts
|
|
76
|
+
expect(true).toBe(true);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('should support semantic versioning', () => {
|
|
80
|
+
// npm version major|minor|patch
|
|
81
|
+
// Versions should follow semver: X.Y.Z
|
|
82
|
+
const semverRegex = /^\d+\.\d+\.\d+$/;
|
|
83
|
+
expect('1.0.0').toMatch(semverRegex);
|
|
84
|
+
expect('1.1.0').toMatch(semverRegex);
|
|
85
|
+
expect('2.0.0').toMatch(semverRegex);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
describe('Output Formatting', () => {
|
|
90
|
+
it('should support field selection with --fields', () => {
|
|
91
|
+
// Example: huntr boards list --fields ID,Name
|
|
92
|
+
const fieldSelection = {
|
|
93
|
+
command: 'huntr boards list',
|
|
94
|
+
option: '--fields ID,Name',
|
|
95
|
+
supported: true,
|
|
96
|
+
};
|
|
97
|
+
expect(fieldSelection.supported).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it('should support multiple output formats', () => {
|
|
101
|
+
const formats = {
|
|
102
|
+
table: 'human-readable (default)',
|
|
103
|
+
json: 'machine-readable',
|
|
104
|
+
csv: 'spreadsheet import',
|
|
105
|
+
pdf: 'document export',
|
|
106
|
+
excel: 'spreadsheet (.xlsx)',
|
|
107
|
+
};
|
|
108
|
+
expect(Object.keys(formats).length).toBe(5);
|
|
109
|
+
expect(formats.table).toBeDefined();
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
describe('Documentation', () => {
|
|
114
|
+
it('should have complete documentation', () => {
|
|
115
|
+
const docs = [
|
|
116
|
+
'DEV-SETUP.md',
|
|
117
|
+
'CI-CD-SETUP.md',
|
|
118
|
+
'AUTOMATIC-PUBLISHING.md',
|
|
119
|
+
'ENTITY-TYPES.md',
|
|
120
|
+
'OUTPUT-FORMATS.md',
|
|
121
|
+
];
|
|
122
|
+
expect(docs.length).toBe(5);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('should have man page for huntr command', () => {
|
|
126
|
+
// completions/huntr.1 is available for: man huntr
|
|
127
|
+
expect(true).toBe(true);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"declarationMap": true,
|
|
15
|
+
"sourceMap": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|