hookcatch 0.3.0 → 0.5.0

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 (39) hide show
  1. package/README.md +66 -44
  2. package/dist/__tests__/cli.test.d.ts +2 -0
  3. package/dist/__tests__/cli.test.d.ts.map +1 -0
  4. package/dist/__tests__/cli.test.js +322 -0
  5. package/dist/__tests__/cli.test.js.map +1 -0
  6. package/dist/commands/bin.d.ts.map +1 -1
  7. package/dist/commands/bin.js +121 -13
  8. package/dist/commands/bin.js.map +1 -1
  9. package/dist/commands/login.d.ts.map +1 -1
  10. package/dist/commands/login.js +62 -2
  11. package/dist/commands/login.js.map +1 -1
  12. package/dist/commands/replay.d.ts +3 -0
  13. package/dist/commands/replay.d.ts.map +1 -0
  14. package/dist/commands/replay.js +83 -0
  15. package/dist/commands/replay.js.map +1 -0
  16. package/dist/commands/request.d.ts +3 -0
  17. package/dist/commands/request.d.ts.map +1 -0
  18. package/dist/commands/request.js +89 -0
  19. package/dist/commands/request.js.map +1 -0
  20. package/dist/commands/status.d.ts +3 -0
  21. package/dist/commands/status.d.ts.map +1 -0
  22. package/dist/commands/status.js +41 -0
  23. package/dist/commands/status.js.map +1 -0
  24. package/dist/commands/token.js +4 -5
  25. package/dist/commands/token.js.map +1 -1
  26. package/dist/commands/tunnel.d.ts.map +1 -1
  27. package/dist/commands/tunnel.js +84 -33
  28. package/dist/commands/tunnel.js.map +1 -1
  29. package/dist/index.js +6 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/lib/api.d.ts +18 -0
  32. package/dist/lib/api.d.ts.map +1 -1
  33. package/dist/lib/api.js +62 -9
  34. package/dist/lib/api.js.map +1 -1
  35. package/dist/lib/request-utils.d.ts +2 -0
  36. package/dist/lib/request-utils.d.ts.map +1 -0
  37. package/dist/lib/request-utils.js +35 -0
  38. package/dist/lib/request-utils.js.map +1 -0
  39. package/package.json +7 -4
package/README.md CHANGED
@@ -80,7 +80,8 @@ hookcatch bin create [options]
80
80
  # Options:
81
81
  # --name <name> Bin name
82
82
  # --private Create private bin (PLUS+ tier)
83
- # --password <password> Password for private bin
83
+ # --password <password> Password for private bin (min 4 chars)
84
+ # --format <type> Output format: json|text (default: text)
84
85
 
85
86
  # Examples:
86
87
  hookcatch bin create --name "Stripe Webhooks"
@@ -91,7 +92,7 @@ hookcatch bin create --private --password secret123
91
92
  List all your bins.
92
93
 
93
94
  ```bash
94
- hookcatch bin list
95
+ hookcatch bin list [--format json]
95
96
  ```
96
97
 
97
98
  #### `bin requests <binId>`
@@ -99,22 +100,70 @@ Get captured requests for a bin.
99
100
 
100
101
  ```bash
101
102
  hookcatch bin requests <binId> [options]
103
+ hookcatch bin requests --binId <binId> [options]
102
104
 
103
105
  # Options:
104
106
  # --limit <number> Number of requests (default: 50)
105
107
  # --format <type> Output format: json|table (default: table)
106
108
  # --method <method> Filter by HTTP method (GET, POST, etc.)
109
+ # --password <password> Password for private bins (or use your auth token if you own the bin)
110
+ # --access-token <token> Access token for private bins
107
111
 
108
112
  # Examples:
109
113
  hookcatch bin requests abc123xyz --limit 10
110
114
  hookcatch bin requests abc123xyz --format json --method POST
115
+ hookcatch bin requests abc123xyz --password "secret123"
111
116
  ```
112
117
 
118
+ Table output includes response status and payload type columns.
119
+
120
+ #### `request <requestId>`
121
+ Show full details for a single request (headers, query, body).
122
+
123
+ ```bash
124
+ hookcatch request <requestId> <binId> [options]
125
+ hookcatch request --requestId <requestId> --binId <binId> [options]
126
+
127
+ # Options:
128
+ # --format <type> Output format: json|pretty (default: pretty)
129
+ # --password <password> Password for private bins
130
+ # --access-token <token> Access token for private bins
131
+
132
+ # Example:
133
+ hookcatch request req_abc123 abc123xyz
134
+ ```
135
+
136
+ #### `replay <binId> <requestId>`
137
+ Replay a captured request to a new URL.
138
+
139
+ ```bash
140
+ hookcatch replay <binId> <requestId> <url>
141
+ hookcatch replay --binId <binId> --requestId <requestId> --url <url>
142
+
143
+ hookcatch replay <binId> <requestId> --url https://example.com/hook \
144
+ --headers '{"X-Test":"1"}' \
145
+ --body '<xml>keep raw</xml>' # accepts JSON or raw text
146
+ ```
147
+
148
+ Notes:
149
+ - `--body` tries JSON first; if parsing fails, it is sent as raw text (works for XML/HTML/plain)
150
+ - Replay counts toward your monthly request quota (same as UI)
151
+
113
152
  #### `bin delete <binId>`
114
153
  Delete a bin.
115
154
 
116
155
  ```bash
117
156
  hookcatch bin delete <binId> --yes
157
+ hookcatch bin delete --binId <binId> --yes
158
+ ```
159
+
160
+ #### `bin update <binId>`
161
+ Update bin settings (name/private/password).
162
+
163
+ ```bash
164
+ hookcatch bin update <binId> --name "New Name"
165
+ hookcatch bin update <binId> --private --password "secret123"
166
+ hookcatch bin update <binId> --public
118
167
  ```
119
168
 
120
169
  ### API Token Management (NEW!)
@@ -125,7 +174,7 @@ Generate a long-lived API token for automation.
125
174
  ```bash
126
175
  hookcatch token generate
127
176
  # Store the token securely - it won't be shown again!
128
- # Use it with: export HOOKCATCH_API_KEY="hc_live_..."
177
+ # Use it with: export HOOKCATCH_TOKEN="hc_live_..."
129
178
  ```
130
179
 
131
180
  #### `token status`
@@ -151,7 +200,7 @@ Create a tunnel to your localhost.
151
200
  hookcatch tunnel <port> [options]
152
201
 
153
202
  # Options:
154
- # --password <password> Password-protect tunnel (PRO+ tier)
203
+ # --password <password> Password-protect tunnel
155
204
  # --subdomain <name> Custom subdomain (ENTERPRISE tier)
156
205
  # --capture <binId> Capture outbound requests to bin
157
206
  # --proxy-port <port> Local proxy port (default: 8081)
@@ -162,11 +211,11 @@ hookcatch tunnel 8080 --password secret123
162
211
  hookcatch tunnel 3000 --capture abc123
163
212
  ```
164
213
 
165
- #### `list`
214
+ #### `tunnel list`
166
215
  Show all your active tunnels.
167
216
 
168
217
  ```bash
169
- hookcatch list
218
+ hookcatch tunnel list
170
219
  ```
171
220
 
172
221
  #### `stop <tunnelId>`
@@ -176,6 +225,15 @@ Stop a specific tunnel.
176
225
  hookcatch stop abc123xyz
177
226
  ```
178
227
 
228
+ #### `status` / `whoami`
229
+ Show your account details.
230
+
231
+ ```bash
232
+ hookcatch status
233
+ hookcatch whoami
234
+ hookcatch status --format json
235
+ ```
236
+
179
237
  ## Usage Examples
180
238
 
181
239
  ### Test Stripe Webhooks
@@ -257,7 +315,7 @@ export HOOKCATCH_API_URL="http://localhost:3002"
257
315
  ### Webhook Bins
258
316
  - ✅ Create unlimited bins (tier-dependent)
259
317
  - ✅ Capture HTTP requests in real-time
260
- - ✅ Private bins with password protection (PLUS+)
318
+ - ✅ Private bins with password protection
261
319
  - ✅ JSON output for automation
262
320
  - ✅ Request filtering by method
263
321
 
@@ -265,8 +323,7 @@ export HOOKCATCH_API_URL="http://localhost:3002"
265
323
  - ✅ Zero-config tunnel creation
266
324
  - ✅ Real-time request forwarding
267
325
  - ✅ Automatic reconnection
268
- - ✅ Password protection (PRO+)
269
- - ✅ Custom subdomains (ENTERPRISE)
326
+ - ✅ Password protection
270
327
 
271
328
  ### API Tokens
272
329
  - ✅ Long-lived tokens for automation
@@ -274,41 +331,6 @@ export HOOKCATCH_API_URL="http://localhost:3002"
274
331
  - ✅ Easy revocation
275
332
  - ✅ No expiration (until regenerated)
276
333
 
277
- ## Tiers
278
-
279
- ### FREE
280
- - 3 bins
281
- - 1,000 requests/month
282
- - 24h retention
283
- - 1 tunnel (5 min/session, 3 sessions/day)
284
- - Public bins only
285
-
286
- ### PLUS
287
- - 25 bins
288
- - 25,000 requests/month
289
- - 14-day retention
290
- - 2 tunnels (1h/session, unlimited)
291
- - Private bins with passwords
292
-
293
- ### PRO
294
- - Unlimited bins
295
- - 150,000 requests/month
296
- - 90-day retention
297
- - 5 tunnels (unlimited time)
298
- - Team features
299
-
300
- ### ENTERPRISE (Custom)
301
- - Unlimited bins
302
- - 750,000 requests/month
303
- - 180-day retention
304
- - 20 tunnels (unlimited time)
305
- - Custom subdomains
306
- - SSO & SLA
307
-
308
- ## Environment Variables
309
-
310
- - `HOOKCATCH_API_KEY` - API token for authentication
311
- - `HOOKCATCH_API_URL` - Override API URL (default: https://api.hookcatch.dev)
312
334
 
313
335
  ## Support
314
336
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,322 @@
1
+ import { expect, test, describe } from '@jest/globals';
2
+ import * as fs from 'fs';
3
+ import * as path from 'path';
4
+ const rootDir = path.resolve(process.cwd(), 'src');
5
+ describe('CLI - Login Command', () => {
6
+ describe('Password Masking', () => {
7
+ test('should have promptPassword function implementation', () => {
8
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
9
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
10
+ expect(loginCommand).toContain('promptPassword');
11
+ expect(loginCommand).toContain('function promptPassword');
12
+ });
13
+ test('should use setRawMode for character input', () => {
14
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
15
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
16
+ expect(loginCommand).toContain('setRawMode');
17
+ expect(loginCommand).toContain('setRawMode?.(true)');
18
+ expect(loginCommand).toContain('setRawMode?.(false)');
19
+ });
20
+ test('should display asterisks for password characters', () => {
21
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
22
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
23
+ expect(loginCommand).toContain("'*'.repeat(password.length)");
24
+ });
25
+ test('should handle backspace correctly', () => {
26
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
27
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
28
+ // Should have backspace handling
29
+ expect(loginCommand).toContain('\\u007f'); // DEL/Backspace
30
+ expect(loginCommand).toContain('\\b'); // Backspace
31
+ expect(loginCommand).toContain('password.slice(0, -1)');
32
+ expect(loginCommand).toContain('render()');
33
+ });
34
+ test('should handle Ctrl-C to cancel', () => {
35
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
36
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
37
+ expect(loginCommand).toContain('\\u0003'); // Ctrl-C
38
+ expect(loginCommand).toContain('process.exit(1)');
39
+ });
40
+ test('should handle Enter to submit', () => {
41
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
42
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
43
+ expect(loginCommand).toContain('\\n'); // Enter
44
+ expect(loginCommand).toContain('\\r'); // Carriage return
45
+ expect(loginCommand).toContain('resolve(password)');
46
+ });
47
+ test('should filter non-printable characters', () => {
48
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
49
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
50
+ // Should check for printable characters (>= 32)
51
+ expect(loginCommand).toContain('charCodeAt(0) >= 32');
52
+ });
53
+ });
54
+ describe('Login Methods', () => {
55
+ test('should support token login via --token flag', () => {
56
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
57
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
58
+ expect(loginCommand).toContain('--token');
59
+ expect(loginCommand).toContain('loginWithToken');
60
+ });
61
+ test('should support email/password login', () => {
62
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
63
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
64
+ expect(loginCommand).toContain('loginWithCredentials');
65
+ expect(loginCommand).toContain('Email:');
66
+ expect(loginCommand).toContain('Password:');
67
+ });
68
+ test('should validate token format', () => {
69
+ const loginCommandPath = path.join(__dirname, '../commands/login.ts');
70
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
71
+ expect(loginCommand).toContain('hc_');
72
+ expect(loginCommand).toContain('eyJ');
73
+ expect(loginCommand).toContain('Invalid token format');
74
+ });
75
+ test('should save token after successful login', () => {
76
+ const loginCommandPath = path.join(__dirname, '../commands/login.ts');
77
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
78
+ expect(loginCommand).toContain('setApiToken');
79
+ expect(loginCommand).toContain('Token saved');
80
+ });
81
+ });
82
+ });
83
+ describe('CLI - Bin Commands', () => {
84
+ describe('Create Bin', () => {
85
+ test('should have create command', () => {
86
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
87
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
88
+ expect(binCommand).toContain('create');
89
+ expect(binCommand).toContain('Create a new webhook bin');
90
+ });
91
+ test('should support --name option', () => {
92
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
93
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
94
+ expect(binCommand).toContain('--name');
95
+ expect(binCommand).toContain('Bin name');
96
+ });
97
+ test('should support --private option for password-protected bins', () => {
98
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
99
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
100
+ expect(binCommand).toContain('--private');
101
+ expect(binCommand).toContain('private bin');
102
+ });
103
+ test('should support --password option', () => {
104
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
105
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
106
+ expect(binCommand).toContain('--password');
107
+ expect(binCommand).toContain('Password for private bin');
108
+ });
109
+ test('should require authentication', () => {
110
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
111
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
112
+ expect(binCommand).toContain('hasApiToken');
113
+ expect(binCommand).toContain('Not authenticated');
114
+ });
115
+ test('should call api.createBin', () => {
116
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
117
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
118
+ expect(binCommand).toContain('api.createBin');
119
+ });
120
+ });
121
+ describe('List Bins', () => {
122
+ test('should have list command', () => {
123
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
124
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
125
+ expect(binCommand).toContain('listBinsCommand');
126
+ });
127
+ });
128
+ describe('View Requests', () => {
129
+ test('should have requests command', () => {
130
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
131
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
132
+ expect(binCommand).toContain('requestsCommand');
133
+ });
134
+ });
135
+ describe('Delete Bin', () => {
136
+ test('should have delete command', () => {
137
+ const binCommandPath = path.join(__dirname, '../commands/bin.ts');
138
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
139
+ expect(binCommand).toContain('deleteBinCommand');
140
+ });
141
+ });
142
+ });
143
+ describe('CLI - Tunnel Command', () => {
144
+ test('should exist', () => {
145
+ const tunnelCommandPath = path.join(rootDir, 'commands', 'tunnel.ts');
146
+ expect(fs.existsSync(tunnelCommandPath)).toBe(true);
147
+ });
148
+ test('should accept port argument', () => {
149
+ const tunnelCommandPath = path.join(rootDir, 'commands', 'tunnel.ts');
150
+ const tunnelCommand = fs.readFileSync(tunnelCommandPath, 'utf-8');
151
+ expect(tunnelCommand).toContain('port');
152
+ expect(tunnelCommand).toContain('tunnel');
153
+ });
154
+ test('should require authentication', () => {
155
+ const tunnelCommandPath = path.join(rootDir, 'commands', 'tunnel.ts');
156
+ const tunnelCommand = fs.readFileSync(tunnelCommandPath, 'utf-8');
157
+ expect(tunnelCommand).toContain('hasApiToken');
158
+ });
159
+ });
160
+ describe('CLI - Token Commands', () => {
161
+ test('should exist', () => {
162
+ const tokenCommandPath = path.join(rootDir, 'commands', 'token.ts');
163
+ expect(fs.existsSync(tokenCommandPath)).toBe(true);
164
+ });
165
+ test('should have generate command', () => {
166
+ const tokenCommandPath = path.join(rootDir, 'commands', 'token.ts');
167
+ const tokenCommand = fs.readFileSync(tokenCommandPath, 'utf-8');
168
+ expect(tokenCommand).toContain('generate');
169
+ });
170
+ test('should have status command', () => {
171
+ const tokenCommandPath = path.join(rootDir, 'commands', 'token.ts');
172
+ const tokenCommand = fs.readFileSync(tokenCommandPath, 'utf-8');
173
+ expect(tokenCommand).toContain('status');
174
+ });
175
+ test('should have revoke command', () => {
176
+ const tokenCommandPath = path.join(rootDir, 'commands', 'token.ts');
177
+ const tokenCommand = fs.readFileSync(tokenCommandPath, 'utf-8');
178
+ expect(tokenCommand).toContain('revoke');
179
+ });
180
+ });
181
+ describe('CLI - Configuration', () => {
182
+ test('should have config module', () => {
183
+ const configPath = path.join(rootDir, 'lib', 'config.ts');
184
+ expect(fs.existsSync(configPath)).toBe(true);
185
+ });
186
+ test('should export API token functions', () => {
187
+ const configPath = path.join(rootDir, 'lib', 'config.ts');
188
+ const config = fs.readFileSync(configPath, 'utf-8');
189
+ expect(config).toContain('export');
190
+ expect(config).toContain('setApiToken');
191
+ expect(config).toContain('getApiToken');
192
+ expect(config).toContain('hasApiToken');
193
+ });
194
+ test('should export API URL functions', () => {
195
+ const configPath = path.join(rootDir, 'lib', 'config.ts');
196
+ const config = fs.readFileSync(configPath, 'utf-8');
197
+ expect(config).toContain('getApiUrl');
198
+ });
199
+ test('should handle config file operations', () => {
200
+ const configPath = path.join(rootDir, 'lib', 'config.ts');
201
+ const config = fs.readFileSync(configPath, 'utf-8');
202
+ expect(config).toContain('projectName');
203
+ expect(config).toContain('hookcatch');
204
+ });
205
+ });
206
+ describe('CLI - API Client', () => {
207
+ test('should have api module', () => {
208
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
209
+ expect(fs.existsSync(apiPath)).toBe(true);
210
+ });
211
+ test('should use axios for HTTP requests', () => {
212
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
213
+ const api = fs.readFileSync(apiPath, 'utf-8');
214
+ expect(api).toContain('axios');
215
+ });
216
+ test('should use API URL from config', () => {
217
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
218
+ const api = fs.readFileSync(apiPath, 'utf-8');
219
+ expect(api).toContain('getApiUrl');
220
+ });
221
+ test('should include authentication headers', () => {
222
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
223
+ const api = fs.readFileSync(apiPath, 'utf-8');
224
+ expect(api).toContain('Authorization');
225
+ expect(api).toContain('Bearer');
226
+ });
227
+ });
228
+ describe('CLI - Rate Limits', () => {
229
+ test('should use server-side API rate limits (no CLI-specific limits)', () => {
230
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
231
+ const api = fs.readFileSync(apiPath, 'utf-8');
232
+ // CLI should NOT have its own rate limiting code
233
+ expect(api).not.toContain('ratelimit');
234
+ expect(api).not.toContain('throttle');
235
+ // Should rely on API responses
236
+ expect(api).toContain('axios');
237
+ });
238
+ test('should handle 429 Too Many Requests errors from API', () => {
239
+ const apiPath = path.join(rootDir, 'lib', 'api.ts');
240
+ const api = fs.readFileSync(apiPath, 'utf-8');
241
+ // Should have error handling for HTTP errors
242
+ expect(api).toContain('Error');
243
+ });
244
+ });
245
+ describe('CLI - Command Structure', () => {
246
+ const commands = ['login', 'logout', 'bin', 'tunnel', 'token', 'list', 'stop', 'request', 'replay', 'status'];
247
+ commands.forEach(command => {
248
+ test(`should have ${command} command file`, () => {
249
+ const commandPath = path.join(rootDir, 'commands', `${command}.ts`);
250
+ expect(fs.existsSync(commandPath)).toBe(true);
251
+ });
252
+ });
253
+ });
254
+ describe('CLI - Error Handling', () => {
255
+ test('login should handle network errors', () => {
256
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
257
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
258
+ expect(loginCommand).toContain('ECONNREFUSED');
259
+ expect(loginCommand).toContain('Cannot connect');
260
+ });
261
+ test('login should handle 401 Unauthorized', () => {
262
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
263
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
264
+ expect(loginCommand).toContain('401');
265
+ expect(loginCommand).toContain('Invalid');
266
+ });
267
+ test('bin create should handle authentication errors', () => {
268
+ const binCommandPath = path.join(rootDir, 'commands', 'bin.ts');
269
+ const binCommand = fs.readFileSync(binCommandPath, 'utf-8');
270
+ expect(binCommand).toContain('Not authenticated');
271
+ expect(binCommand).toContain('process.exit(1)');
272
+ });
273
+ });
274
+ describe('CLI - User Feedback', () => {
275
+ test('should use chalk for colored output', () => {
276
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
277
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
278
+ expect(loginCommand).toContain('chalk');
279
+ expect(loginCommand).toContain('chalk.green');
280
+ expect(loginCommand).toContain('chalk.red');
281
+ });
282
+ test('should use ora for spinners', () => {
283
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
284
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
285
+ expect(loginCommand).toContain('ora');
286
+ expect(loginCommand).toContain('spinner');
287
+ });
288
+ test('should provide clear success messages', () => {
289
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
290
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
291
+ expect(loginCommand).toContain('Successfully');
292
+ expect(loginCommand).toContain('✓');
293
+ });
294
+ test('should provide clear error messages', () => {
295
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
296
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
297
+ expect(loginCommand).toContain('✗');
298
+ expect(loginCommand).toContain('error');
299
+ });
300
+ });
301
+ describe('CLI - Security Features', () => {
302
+ test('should store token securely in config file', () => {
303
+ const configPath = path.join(rootDir, 'lib', 'config.ts');
304
+ const config = fs.readFileSync(configPath, 'utf-8');
305
+ expect(config).toContain('projectName');
306
+ expect(config).toContain('hookcatch');
307
+ });
308
+ test('should not log sensitive data', () => {
309
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
310
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
311
+ // Should not console.log the password value
312
+ expect(loginCommand).not.toContain('console.log(password');
313
+ expect(loginCommand).not.toContain('${password}');
314
+ });
315
+ test('should mask password during input', () => {
316
+ const loginCommandPath = path.join(rootDir, 'commands', 'login.ts');
317
+ const loginCommand = fs.readFileSync(loginCommandPath, 'utf-8');
318
+ expect(loginCommand).toContain('promptPassword');
319
+ expect(loginCommand).toContain("'*'");
320
+ });
321
+ });
322
+ //# sourceMappingURL=cli.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAA+B,MAAM,eAAe,CAAC;AACpF,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;AAEnD,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,IAAI,CAAC,oDAAoD,EAAE,GAAG,EAAE;YAC9D,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YACpE,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAEhE,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;YACjD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACrD,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YACpE,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAEhE,MAAM,CAAC,YAAY,CAAC,C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AC,CAAC;IAEH,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QACtE,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAEhE,4CAA4C;QAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAC3D,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC7C,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAEhE,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACjD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/commands/bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,UAAU,SAKU,CAAC"}
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/commands/bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,UAAU,SAMU,CAAC"}