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.
Files changed (117) hide show
  1. package/.env.example +7 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
  5. package/.github/labels.json +92 -0
  6. package/.github/pull_request_template.md +64 -0
  7. package/.github/workflows/ci.yml +87 -0
  8. package/.github/workflows/labels.yml +27 -0
  9. package/.github/workflows/manual-publish.yml +105 -0
  10. package/.github/workflows/publish.yml +57 -0
  11. package/.github/workflows/release.yml +124 -0
  12. package/.github/workflows/security-audit.yml +44 -0
  13. package/.husky/pre-commit +12 -0
  14. package/.husky/pre-push +27 -0
  15. package/.lintstagedrc.json +3 -0
  16. package/AGENTS.md +449 -0
  17. package/CHANGELOG.md +38 -0
  18. package/CHANGES.md +259 -0
  19. package/LICENSE +15 -0
  20. package/PUBLISHING.md +191 -0
  21. package/README.md +385 -0
  22. package/ROADMAP.md +158 -0
  23. package/SETUP-COMPLETE.md +446 -0
  24. package/WORKFLOW-SUMMARY.md +368 -0
  25. package/completions/_huntr +168 -0
  26. package/completions/huntr.1 +266 -0
  27. package/completions/huntr.bash +91 -0
  28. package/dist/api/client.d.ts +14 -0
  29. package/dist/api/client.d.ts.map +1 -0
  30. package/dist/api/client.js +74 -0
  31. package/dist/api/client.js.map +1 -0
  32. package/dist/api/personal/activities.d.ts +20 -0
  33. package/dist/api/personal/activities.d.ts.map +1 -0
  34. package/dist/api/personal/activities.js +50 -0
  35. package/dist/api/personal/activities.js.map +1 -0
  36. package/dist/api/personal/boards.d.ts +9 -0
  37. package/dist/api/personal/boards.d.ts.map +1 -0
  38. package/dist/api/personal/boards.js +16 -0
  39. package/dist/api/personal/boards.js.map +1 -0
  40. package/dist/api/personal/index.d.ts +17 -0
  41. package/dist/api/personal/index.d.ts.map +1 -0
  42. package/dist/api/personal/index.js +37 -0
  43. package/dist/api/personal/index.js.map +1 -0
  44. package/dist/api/personal/jobs.d.ts +13 -0
  45. package/dist/api/personal/jobs.d.ts.map +1 -0
  46. package/dist/api/personal/jobs.js +31 -0
  47. package/dist/api/personal/jobs.js.map +1 -0
  48. package/dist/api/personal/user.d.ts +8 -0
  49. package/dist/api/personal/user.d.ts.map +1 -0
  50. package/dist/api/personal/user.js +13 -0
  51. package/dist/api/personal/user.js.map +1 -0
  52. package/dist/cli.d.ts +3 -0
  53. package/dist/cli.d.ts.map +1 -0
  54. package/dist/cli.js +501 -0
  55. package/dist/cli.js.map +1 -0
  56. package/dist/commands/capture-session.d.ts +10 -0
  57. package/dist/commands/capture-session.d.ts.map +1 -0
  58. package/dist/commands/capture-session.js +478 -0
  59. package/dist/commands/capture-session.js.map +1 -0
  60. package/dist/config/clerk-session-manager.d.ts +44 -0
  61. package/dist/config/clerk-session-manager.d.ts.map +1 -0
  62. package/dist/config/clerk-session-manager.js +232 -0
  63. package/dist/config/clerk-session-manager.js.map +1 -0
  64. package/dist/config/config-manager.d.ts +15 -0
  65. package/dist/config/config-manager.d.ts.map +1 -0
  66. package/dist/config/config-manager.js +51 -0
  67. package/dist/config/config-manager.js.map +1 -0
  68. package/dist/config/keychain-manager.d.ts +6 -0
  69. package/dist/config/keychain-manager.d.ts.map +1 -0
  70. package/dist/config/keychain-manager.js +37 -0
  71. package/dist/config/keychain-manager.js.map +1 -0
  72. package/dist/config/token-capture.d.ts +11 -0
  73. package/dist/config/token-capture.d.ts.map +1 -0
  74. package/dist/config/token-capture.js +252 -0
  75. package/dist/config/token-capture.js.map +1 -0
  76. package/dist/config/token-manager.d.ts +38 -0
  77. package/dist/config/token-manager.d.ts.map +1 -0
  78. package/dist/config/token-manager.js +153 -0
  79. package/dist/config/token-manager.js.map +1 -0
  80. package/dist/lib/list-options.d.ts +69 -0
  81. package/dist/lib/list-options.d.ts.map +1 -0
  82. package/dist/lib/list-options.js +299 -0
  83. package/dist/lib/list-options.js.map +1 -0
  84. package/dist/types/personal.d.ts +113 -0
  85. package/dist/types/personal.d.ts.map +1 -0
  86. package/dist/types/personal.js +4 -0
  87. package/dist/types/personal.js.map +1 -0
  88. package/docs/AUTOMATIC-PUBLISHING.md +520 -0
  89. package/docs/CHANGELOG-AUTOMATION.md +418 -0
  90. package/docs/CI-CD-SETUP.md +582 -0
  91. package/docs/DEV-SETUP.md +512 -0
  92. package/docs/ENHANCEMENT-PLAN.md +204 -0
  93. package/docs/ENTITY-TYPES.md +462 -0
  94. package/docs/GITHUB-ACTIONS-GUIDE.md +367 -0
  95. package/docs/NPM-PUBLISHING.md +324 -0
  96. package/docs/OUTPUT-EXAMPLES.md +414 -0
  97. package/docs/OUTPUT-FORMATS.md +299 -0
  98. package/docs/TESTING.md +216 -0
  99. package/eslint.config.js +68 -0
  100. package/package.json +64 -0
  101. package/src/api/client.ts +88 -0
  102. package/src/api/personal/activities.ts +66 -0
  103. package/src/api/personal/boards.ts +14 -0
  104. package/src/api/personal/index.ts +25 -0
  105. package/src/api/personal/jobs.ts +33 -0
  106. package/src/api/personal/user.ts +10 -0
  107. package/src/cli.ts +487 -0
  108. package/src/commands/capture-session.ts +582 -0
  109. package/src/config/clerk-session-manager.ts +263 -0
  110. package/src/config/config-manager.ts +56 -0
  111. package/src/config/keychain-manager.ts +30 -0
  112. package/src/config/token-capture.ts +233 -0
  113. package/src/config/token-manager.ts +139 -0
  114. package/src/lib/list-options.ts +370 -0
  115. package/src/types/personal.ts +114 -0
  116. package/tests/example.test.ts +130 -0
  117. 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
+ }