paymongo-cli 1.4.11 → 1.4.13

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 (46) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +4 -3
  3. package/biome.json +72 -0
  4. package/dist/.tsbuildinfo +1 -1
  5. package/dist/commands/config/actions.js +13 -5
  6. package/dist/commands/config/analytics.js +75 -0
  7. package/dist/commands/config/helpers.js +14 -25
  8. package/dist/commands/config/rate-limit.js +3 -3
  9. package/dist/commands/config.js +7 -1
  10. package/dist/commands/dev/logs.js +13 -4
  11. package/dist/commands/dev/status.js +1 -1
  12. package/dist/commands/dev/stop.js +2 -2
  13. package/dist/commands/dev.js +10 -258
  14. package/dist/commands/doctor.js +241 -0
  15. package/dist/commands/env.js +10 -19
  16. package/dist/commands/generate/templates/index.js +3 -3
  17. package/dist/commands/generate.js +6 -6
  18. package/dist/commands/init.js +22 -36
  19. package/dist/commands/login.js +18 -29
  20. package/dist/commands/payments/actions.js +15 -15
  21. package/dist/commands/payments/helpers.js +6 -24
  22. package/dist/commands/payments.js +1 -1
  23. package/dist/commands/shared/auth.js +23 -0
  24. package/dist/commands/shared/runtime.js +35 -0
  25. package/dist/commands/team/index.js +3 -3
  26. package/dist/commands/trigger/actions.js +2 -2
  27. package/dist/commands/trigger/helpers.js +13 -9
  28. package/dist/commands/trigger.js +2 -2
  29. package/dist/commands/webhooks/actions.js +11 -11
  30. package/dist/commands/webhooks/helpers.js +5 -23
  31. package/dist/commands/webhooks.js +1 -1
  32. package/dist/index.js +37 -14
  33. package/dist/services/analytics/service.js +3 -3
  34. package/dist/services/api/client.js +8 -4
  35. package/dist/services/config/manager.js +3 -3
  36. package/dist/services/dev/process-manager.js +4 -4
  37. package/dist/services/dev/server.js +4 -6
  38. package/dist/services/dev/session.js +353 -0
  39. package/dist/services/team/service.js +1 -1
  40. package/dist/utils/bulk.js +11 -11
  41. package/dist/utils/cache.js +5 -5
  42. package/dist/utils/constants.js +1 -1
  43. package/dist/utils/webhook-store.js +3 -3
  44. package/package.json +11 -25
  45. package/vitest.config.ts +18 -0
  46. package/eslint.config.ts +0 -70
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.4.13] - 2026-04-06
11
+
12
+ ### Added
13
+
14
+ - **Analytics Config Commands** - Added `paymongo config analytics enable`, `disable`, and `status` to manage local webhook analytics directly from the CLI.
15
+ - **Shared Command Runtime** - Introduced shared command runtime helpers for config loading, API client creation, auth validation, and consistent command failure handling.
16
+ - **Dev Session Service** - Added a dedicated dev session service to own dev-mode startup, shutdown, webhook registration, and tunnel orchestration outside the command layer.
17
+
18
+ ### Changed
19
+
20
+ - **Test Runner** - Replaced Jest with Vitest and migrated the CLI test suite to the new runner.
21
+ - **Linting and Formatting** - Replaced ESLint and Prettier with Biome for linting, formatting, and import organization.
22
+ - **Dev Command Architecture** - Refactored `paymongo dev` so the command is a thinner CLI adapter around centralized session orchestration.
23
+ - **Global Runtime Wiring** - Wired the global `--no-rate-limit` flag through the shared runtime so API client behavior matches the CLI option.
24
+
25
+ ### Fixed
26
+
27
+ - **Documentation Drift** - Aligned the README and command surface around analytics configuration and current tooling.
28
+ - **Detached Dev Startup** - Updated detached dev mode to reuse the active CLI entrypoint instead of depending on a hardcoded compiled path.
29
+ - **CLI Test Stability** - Tightened test lifecycle handling and ESM module isolation to keep the Vitest suite reliable.
30
+
31
+ ## [1.4.12] - 2026-03-08
32
+
33
+ ### Added
34
+
35
+ - **Doctor Command** - Added `paymongo doctor` to diagnose local PayMongo integration setup, including config presence, API key format, optional live API validation, ngrok readiness, and webhook signature configuration.
36
+
37
+ ### Changed
38
+
39
+ - **CLI Help** - Added `doctor` examples to the top-level CLI help text.
40
+ - **Documentation** - Added `doctor` usage to the README, API reference, and user guide.
41
+
42
+ ### Tests
43
+
44
+ - **Diagnostics Coverage** - Added focused unit coverage for doctor success, failure, JSON output, and offline validation paths.
45
+
10
46
  ## [1.4.11] - 2026-03-08
11
47
 
12
48
  ### Changed
package/README.md CHANGED
@@ -121,9 +121,9 @@ paymongo config rate-limit disable
121
121
 
122
122
  Use `--no-rate-limit` with any command to temporarily disable rate limiting:
123
123
 
124
- ````bash
124
+ ```bash
125
125
  paymongo payments list --no-rate-limit
126
- ---
126
+ ```
127
127
 
128
128
  ## Analytics (Optional)
129
129
 
@@ -147,7 +147,7 @@ paymongo config analytics status
147
147
 
148
148
  # Disable analytics (default)
149
149
  paymongo config analytics disable
150
- ````
150
+ ```
151
151
 
152
152
  ### Analytics Features
153
153
 
@@ -175,6 +175,7 @@ Analytics data helps you:
175
175
  | `paymongo dev` | Start local development server with webhook forwarding. |
176
176
  | `paymongo payments` | Manage payments and payment intents. |
177
177
  | `paymongo webhooks` | List, create, and manage PayMongo webhooks with filtering by status and event type. |
178
+ | `paymongo doctor` | Run local integration diagnostics for config, keys, ngrok, and webhook setup. |
178
179
  | `paymongo config` | View and modify CLI configuration. |
179
180
  | `paymongo config analytics` | Configure webhook analytics settings. |
180
181
  | `paymongo config rate-limit` | Configure rate limiting settings. |
package/biome.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "files": {
9
+ "includes": ["**", "!!**/dist", "!!coverage", "!!node_modules"]
10
+ },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "formatWithErrors": false,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineEnding": "lf",
17
+ "lineWidth": 100,
18
+ "attributePosition": "auto",
19
+ "bracketSameLine": false,
20
+ "bracketSpacing": true,
21
+ "expand": "auto",
22
+ "useEditorconfig": true
23
+ },
24
+ "linter": {
25
+ "enabled": true,
26
+ "rules": {
27
+ "recommended": true,
28
+ "complexity": {
29
+ "noStaticOnlyClass": "off"
30
+ }
31
+ }
32
+ },
33
+ "overrides": [
34
+ {
35
+ "includes": ["tests/**/*.ts"],
36
+ "linter": {
37
+ "rules": {
38
+ "suspicious": {
39
+ "noExplicitAny": "off"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ],
45
+ "javascript": {
46
+ "formatter": {
47
+ "jsxQuoteStyle": "double",
48
+ "quoteProperties": "asNeeded",
49
+ "trailingCommas": "es5",
50
+ "semicolons": "always",
51
+ "arrowParentheses": "always",
52
+ "bracketSameLine": false,
53
+ "quoteStyle": "single",
54
+ "attributePosition": "auto",
55
+ "bracketSpacing": true
56
+ }
57
+ },
58
+ "html": {
59
+ "formatter": {
60
+ "indentScriptAndStyle": false,
61
+ "selfCloseVoidElements": "always"
62
+ }
63
+ },
64
+ "assist": {
65
+ "enabled": true,
66
+ "actions": {
67
+ "source": {
68
+ "organizeImports": "on"
69
+ }
70
+ }
71
+ }
72
+ }