@ktmcp-cli/nordigen 1.0.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.
@@ -0,0 +1,198 @@
1
+ # Contributing to Nordigen CLI
2
+
3
+ Thank you for your interest in contributing to the Nordigen CLI!
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ # Clone the repository
9
+ git clone https://github.com/ktmcp/nordigen-cli.git
10
+ cd nordigen-cli
11
+
12
+ # Install dependencies
13
+ npm install
14
+
15
+ # Make the CLI executable
16
+ chmod +x bin/nordigen.js
17
+
18
+ # Link for local development
19
+ npm link
20
+ ```
21
+
22
+ ## Project Structure
23
+
24
+ ```
25
+ nordigen-cli/
26
+ ├── bin/
27
+ │ └── nordigen.js # Main CLI entry point
28
+ ├── src/
29
+ │ ├── commands/ # Command implementations
30
+ │ │ ├── auth.js
31
+ │ │ ├── accounts.js
32
+ │ │ ├── institutions.js
33
+ │ │ ├── agreements.js
34
+ │ │ ├── requisitions.js
35
+ │ │ ├── payments.js
36
+ │ │ └── config.js
37
+ │ └── lib/ # Core libraries
38
+ │ ├── api.js # API client
39
+ │ ├── auth.js # Authentication
40
+ │ ├── config.js # Configuration management
41
+ │ └── output.js # Output formatting
42
+ ├── test/ # Tests
43
+ └── docs/ # Documentation
44
+ ```
45
+
46
+ ## Coding Standards
47
+
48
+ - Use ES modules (import/export)
49
+ - Follow ESLint configuration
50
+ - Use JSDoc comments for all functions
51
+ - Maintain consistent code style
52
+ - Add tests for new features
53
+
54
+ ## Testing
55
+
56
+ ```bash
57
+ # Run all tests
58
+ npm test
59
+
60
+ # Run specific test file
61
+ node --test test/api.test.js
62
+
63
+ # Run with coverage (when configured)
64
+ npm run test:coverage
65
+ ```
66
+
67
+ ## Adding a New Command
68
+
69
+ 1. Create a new file in `src/commands/`:
70
+
71
+ ```javascript
72
+ // src/commands/newcommand.js
73
+ import { Command } from 'commander';
74
+ import { ensureAuth } from '../lib/auth.js';
75
+ import { createClient } from '../lib/api.js';
76
+
77
+ export const newCommand = new Command('newcommand')
78
+ .description('Description of new command')
79
+ .action(async (options) => {
80
+ // Implementation
81
+ });
82
+ ```
83
+
84
+ 2. Register the command in `bin/nordigen.js`:
85
+
86
+ ```javascript
87
+ import { newCommand } from '../src/commands/newcommand.js';
88
+ program.addCommand(newCommand);
89
+ ```
90
+
91
+ 3. Add tests in `test/newcommand.test.js`
92
+
93
+ 4. Update documentation
94
+
95
+ ## Adding API Methods
96
+
97
+ Add new methods to `src/lib/api.js`:
98
+
99
+ ```javascript
100
+ /**
101
+ * Description of the method
102
+ *
103
+ * @param {string} param - Parameter description
104
+ * @returns {Promise<Object>}
105
+ */
106
+ async newMethod(param) {
107
+ return this.get(`/api/v2/endpoint/${param}`);
108
+ }
109
+ ```
110
+
111
+ ## Documentation
112
+
113
+ When adding features, update:
114
+
115
+ - README.md - Main documentation
116
+ - EXAMPLES.md - Usage examples
117
+ - AGENT.md - AI agent patterns (if relevant)
118
+ - JSDoc comments in code
119
+
120
+ ## Commit Messages
121
+
122
+ Follow conventional commits:
123
+
124
+ ```
125
+ feat: add transaction export command
126
+ fix: handle rate limiting properly
127
+ docs: update installation instructions
128
+ test: add tests for auth module
129
+ refactor: simplify error handling
130
+ ```
131
+
132
+ ## Pull Request Process
133
+
134
+ 1. Fork the repository
135
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
136
+ 3. Make your changes
137
+ 4. Run tests (`npm test`)
138
+ 5. Commit your changes (`git commit -m 'feat: add amazing feature'`)
139
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
140
+ 7. Open a Pull Request
141
+
142
+ ## Pull Request Checklist
143
+
144
+ - [ ] Code follows project style guidelines
145
+ - [ ] Tests added for new functionality
146
+ - [ ] All tests pass
147
+ - [ ] Documentation updated
148
+ - [ ] Commit messages follow conventions
149
+ - [ ] No breaking changes (or clearly documented)
150
+
151
+ ## Reporting Bugs
152
+
153
+ When reporting bugs, please include:
154
+
155
+ 1. CLI version (`nordigen --version`)
156
+ 2. Node.js version (`node --version`)
157
+ 3. Operating system
158
+ 4. Command that caused the issue
159
+ 5. Expected behavior
160
+ 6. Actual behavior
161
+ 7. Error messages (use DEBUG=1 for detailed output)
162
+
163
+ ## Feature Requests
164
+
165
+ We welcome feature requests! Please:
166
+
167
+ 1. Check if the feature already exists
168
+ 2. Explain the use case
169
+ 3. Describe the desired behavior
170
+ 4. Consider contributing the implementation
171
+
172
+ ## Code Review Process
173
+
174
+ All contributions will be reviewed by maintainers. We look for:
175
+
176
+ - Code quality and style
177
+ - Test coverage
178
+ - Documentation
179
+ - Backwards compatibility
180
+ - Performance implications
181
+
182
+ ## Release Process
183
+
184
+ Maintainers handle releases:
185
+
186
+ 1. Update version in package.json
187
+ 2. Update CHANGELOG.md
188
+ 3. Create git tag
189
+ 4. Publish to npm
190
+ 5. Create GitHub release
191
+
192
+ ## Questions?
193
+
194
+ - Open an issue for discussion
195
+ - Check existing issues and PRs
196
+ - Read the documentation
197
+
198
+ Thank you for contributing!