xypriss 9.5.50 → 9.5.52
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/CONTRIBUTING.md +35 -392
- package/dist/cjs/src/server/const/MIME_MAP.js +422 -0
- package/dist/cjs/src/server/const/MIME_MAP.js.map +1 -0
- package/dist/cjs/src/server/core/ResponseEnhancer.js +4 -3
- package/dist/cjs/src/server/core/ResponseEnhancer.js.map +1 -1
- package/dist/cjs/src/server/core/SendFileHandler.js +184 -0
- package/dist/cjs/src/server/core/SendFileHandler.js.map +1 -0
- package/dist/cjs/src/server/core/XHSCProtocol.js +3 -2
- package/dist/cjs/src/server/core/XHSCProtocol.js.map +1 -1
- package/dist/esm/src/server/const/MIME_MAP.js +420 -0
- package/dist/esm/src/server/const/MIME_MAP.js.map +1 -0
- package/dist/esm/src/server/core/ResponseEnhancer.js +4 -3
- package/dist/esm/src/server/core/ResponseEnhancer.js.map +1 -1
- package/dist/esm/src/server/core/SendFileHandler.js +182 -0
- package/dist/esm/src/server/core/SendFileHandler.js.map +1 -0
- package/dist/esm/src/server/core/XHSCProtocol.js +3 -2
- package/dist/esm/src/server/core/XHSCProtocol.js.map +1 -1
- package/package.json +1 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -1,411 +1,54 @@
|
|
|
1
1
|
# Contributing to XyPriss
|
|
2
2
|
|
|
3
|
-
Thank you for your interest in contributing to XyPriss
|
|
3
|
+
Thank you for your interest in contributing to the XyPriss framework. We welcome contributions that align with our mission of providing high-performance, secure, and developer-friendly infrastructure.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## License Compliance
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [Getting Started](#getting-started)
|
|
9
|
-
- [Development Setup](#development-setup)
|
|
10
|
-
- [Project Structure](#project-structure)
|
|
11
|
-
- [Contributing Guidelines](#contributing-guidelines)
|
|
12
|
-
- [Pull Request Process](#pull-request-process)
|
|
13
|
-
- [Testing](#testing)
|
|
14
|
-
- [Documentation](#documentation)
|
|
15
|
-
- [Security](#security)
|
|
7
|
+
XyPriss is licensed under the **Nehonix Open Source License (NOSL) v1.0**. By contributing to this project, you agree that:
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
1. **Work for Hire**: All contributions, including code, documentation, and assets, are considered "works made for hire" for Nehonix.
|
|
10
|
+
2. **IP Protection**: Nehonix retains all intellectual property rights. You grant Nehonix a non-exclusive, perpetual, irrevocable, worldwide, royalty-free license to use, modify, and distribute your contributions.
|
|
11
|
+
3. **No Unauthorized Distribution**: You may not distribute derivative works of XyPriss outside the terms specified in the NOSL without explicit written authorization from Nehonix Legal Department.
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
For the full legal text, please refer to the [LICENSE](LICENSE) or visit [https://dll.nehonix.com/licenses/NOSL](https://dll.nehonix.com/licenses/NOSL).
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
## Technical Standards
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
- Be respectful of differing viewpoints and experiences
|
|
25
|
-
- Gracefully accept constructive criticism
|
|
26
|
-
- Focus on what is best for the community
|
|
27
|
-
- Show empathy towards other community members
|
|
17
|
+
To maintain the integrity and performance of XyPriss, all contributions must adhere to these standards:
|
|
28
18
|
|
|
29
|
-
|
|
19
|
+
- **Language**: Use TypeScript for all application-layer logic and Go for core engine (XHSC) updates.
|
|
20
|
+
- **Modularity**: Code must be modular and maintainable. Avoid monolithic functions or classes.
|
|
21
|
+
- **Style**:
|
|
22
|
+
- Maintain a professional and serious tone in all comments and documentation.
|
|
23
|
+
- **No emojis** are permitted in the codebase or documentation.
|
|
24
|
+
- Use `lucide-react` for frontend icons if applicable.
|
|
25
|
+
- **Tooling**: Use `xfpm` for dependency management and task execution.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## Contribution Workflow
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- Git
|
|
36
|
-
- TypeScript knowledge
|
|
37
|
-
- Express.js familiarity
|
|
29
|
+
### 1. Preparation
|
|
30
|
+
Before starting work, search the active issues to ensure you are not duplicating effort. For significant changes, please open a new issue to discuss your proposed design with the Nehonix Team.
|
|
38
31
|
|
|
39
|
-
###
|
|
32
|
+
### 2. Implementation
|
|
33
|
+
1. **Fork** the repository and create a feature branch from `master`.
|
|
34
|
+
2. **Develop** your changes following the technical standards mentioned above.
|
|
35
|
+
3. **Test** your implementation thoroughly. Performance-critical changes should include benchmarks.
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
### 3. Submission
|
|
38
|
+
1. Ensure your branch is up-to-date with the upstream `master`.
|
|
39
|
+
2. Submit a **Pull Request (PR)** with a concise, technical description of the changes.
|
|
40
|
+
3. Link the PR to the relevant issue using "Closes #issue-number".
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
git clone https://github.com/your-username/XyPriss.git
|
|
45
|
-
cd XyPriss
|
|
46
|
-
```
|
|
42
|
+
## Pull Request Guidelines
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
- **Atomic Commits**: Keep commits focused on a single logical change.
|
|
45
|
+
- **Documentation**: Update relevant `.md` files in `docs/` if your change affects the public API or behavior.
|
|
46
|
+
- **No Breaking Changes**: If a breaking change is necessary, it must be explicitly highlighted in the PR description for architectural review.
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
npm install
|
|
52
|
-
```
|
|
48
|
+
## Security Disclosures
|
|
53
49
|
|
|
54
|
-
|
|
50
|
+
Do not report security vulnerabilities through public issues. To report a security concern, please contact our security team at [support@team.nehonix.com](mailto:support@team.nehonix.com).
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
npm run build
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
4. **Run tests**
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npm test
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
5. **Start development**
|
|
67
|
-
```bash
|
|
68
|
-
npm run dev
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Project Structure
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
XyPriss/
|
|
75
|
-
├── src/ # Core framework source
|
|
76
|
-
│ ├── ServerFactory.ts # Main entry point
|
|
77
|
-
│ ├── server/ # Server implementation
|
|
78
|
-
│ ├── cache/ # Caching system
|
|
79
|
-
│ ├── cluster/ # Clustering features
|
|
80
|
-
│ ├── security-middleware.ts # Security layer
|
|
81
|
-
│ ├── plugins/ # Plugin system
|
|
82
|
-
│ └── types/ # TypeScript definitions
|
|
83
|
-
├── mods/security # XyPriss Security module
|
|
84
|
-
│ ├── src/core/ # Cryptographic core
|
|
85
|
-
│ ├── src/components/ # Secure data structures
|
|
86
|
-
│ └── src/utils/ # Security utilities
|
|
87
|
-
├── __tests__/ # Test files
|
|
88
|
-
├── docs/ # Documentation
|
|
89
|
-
└── dist/ # Built files
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Contributing Guidelines
|
|
93
|
-
|
|
94
|
-
### Types of Contributions
|
|
95
|
-
|
|
96
|
-
We welcome several types of contributions:
|
|
97
|
-
|
|
98
|
-
1. **Bug Reports**: Help us identify and fix issues
|
|
99
|
-
2. **Feature Requests**: Suggest new features or improvements
|
|
100
|
-
3. **Code Contributions**: Submit bug fixes or new features
|
|
101
|
-
4. **Documentation**: Improve or add documentation
|
|
102
|
-
5. **Testing**: Add or improve test coverage
|
|
103
|
-
|
|
104
|
-
### Before You Start
|
|
105
|
-
|
|
106
|
-
1. **Check existing issues** to avoid duplicate work
|
|
107
|
-
2. **Create an issue** for significant changes to discuss the approach
|
|
108
|
-
3. **Follow coding standards** outlined below
|
|
109
|
-
4. **Write tests** for new functionality
|
|
110
|
-
5. **Update documentation** as needed
|
|
111
|
-
|
|
112
|
-
### Coding Standards
|
|
113
|
-
|
|
114
|
-
#### TypeScript Guidelines
|
|
115
|
-
|
|
116
|
-
- Use TypeScript for all new code
|
|
117
|
-
- Provide proper type definitions
|
|
118
|
-
- Avoid `any` types when possible
|
|
119
|
-
- Use interfaces for object shapes
|
|
120
|
-
- Follow existing naming conventions
|
|
121
|
-
|
|
122
|
-
#### Code Style
|
|
123
|
-
|
|
124
|
-
- Use 4 spaces for indentation
|
|
125
|
-
- Use semicolons
|
|
126
|
-
- Use double quotes for strings
|
|
127
|
-
- Follow existing code formatting
|
|
128
|
-
- Use meaningful variable and function names
|
|
129
|
-
|
|
130
|
-
#### Example Code Style
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
interface ServerConfig {
|
|
134
|
-
port?: number;
|
|
135
|
-
host?: string;
|
|
136
|
-
security?: SecurityConfig;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function createServer(options: ServerConfig = {}): Express {
|
|
140
|
-
const app = express();
|
|
141
|
-
|
|
142
|
-
if (options.security?.enabled) {
|
|
143
|
-
app.use(securityMiddleware(options.security));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return app;
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Commit Guidelines
|
|
151
|
-
|
|
152
|
-
#### Commit Message Format
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
type(scope): description
|
|
156
|
-
|
|
157
|
-
[optional body]
|
|
158
|
-
|
|
159
|
-
[optional footer]
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
#### Types
|
|
163
|
-
|
|
164
|
-
- `feat`: New feature
|
|
165
|
-
- `fix`: Bug fix
|
|
166
|
-
- `docs`: Documentation changes
|
|
167
|
-
- `style`: Code style changes (formatting, etc.)
|
|
168
|
-
- `refactor`: Code refactoring
|
|
169
|
-
- `test`: Adding or updating tests
|
|
170
|
-
- `chore`: Maintenance tasks
|
|
171
|
-
|
|
172
|
-
#### Examples
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
feat(cache): add Redis cluster support
|
|
176
|
-
|
|
177
|
-
Add support for Redis cluster configuration in cache system.
|
|
178
|
-
Includes automatic failover and load balancing.
|
|
179
|
-
|
|
180
|
-
Closes #123
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
fix(security): resolve timing attack vulnerability
|
|
185
|
-
|
|
186
|
-
Fix constant-time comparison in authentication middleware
|
|
187
|
-
to prevent timing-based attacks.
|
|
188
|
-
|
|
189
|
-
Security issue reported by: @security-researcher
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Pull Request Process
|
|
193
|
-
|
|
194
|
-
### Before Submitting
|
|
195
|
-
|
|
196
|
-
1. **Create a feature branch** from `master`
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
git checkout -b feature/your-feature-name
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
2. **Make your changes** following the guidelines above
|
|
203
|
-
|
|
204
|
-
3. **Add tests** for new functionality
|
|
205
|
-
|
|
206
|
-
4. **Update documentation** if needed
|
|
207
|
-
|
|
208
|
-
5. **Run the test suite**
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
npm test
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
6. **Build the project**
|
|
215
|
-
```bash
|
|
216
|
-
npm run build
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Submitting the Pull Request
|
|
220
|
-
|
|
221
|
-
1. **Push your branch** to your fork
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
git push origin feature/your-feature-name
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
2. **Create a pull request** with:
|
|
228
|
-
|
|
229
|
-
- Clear title and description
|
|
230
|
-
- Reference to related issues
|
|
231
|
-
- Screenshots if applicable
|
|
232
|
-
- Test results
|
|
233
|
-
|
|
234
|
-
3. **Respond to feedback** from reviewers
|
|
235
|
-
|
|
236
|
-
### Pull Request Template
|
|
237
|
-
|
|
238
|
-
```markdown
|
|
239
|
-
## Description
|
|
240
|
-
|
|
241
|
-
Brief description of changes
|
|
242
|
-
|
|
243
|
-
## Type of Change
|
|
244
|
-
|
|
245
|
-
- [ ] Bug fix
|
|
246
|
-
- [ ] New feature
|
|
247
|
-
- [ ] Breaking change
|
|
248
|
-
- [ ] Documentation update
|
|
249
|
-
|
|
250
|
-
## Testing
|
|
251
|
-
|
|
252
|
-
- [ ] Tests pass locally
|
|
253
|
-
- [ ] New tests added for new functionality
|
|
254
|
-
- [ ] Manual testing completed
|
|
255
|
-
|
|
256
|
-
## Checklist
|
|
257
|
-
|
|
258
|
-
- [ ] Code follows project style guidelines
|
|
259
|
-
- [ ] Self-review completed
|
|
260
|
-
- [ ] Documentation updated
|
|
261
|
-
- [ ] No breaking changes (or clearly documented)
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## Testing
|
|
265
|
-
|
|
266
|
-
### Test Structure
|
|
267
|
-
|
|
268
|
-
```
|
|
269
|
-
__tests__/
|
|
270
|
-
├── unit/ # Unit tests
|
|
271
|
-
├── integration/ # Integration tests
|
|
272
|
-
├── security/ # Security tests
|
|
273
|
-
└── performance/ # Performance tests
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### Running Tests
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
# Run all tests
|
|
280
|
-
npm test
|
|
281
|
-
|
|
282
|
-
# Run specific test file
|
|
283
|
-
npm test -- cache.test.ts
|
|
284
|
-
|
|
285
|
-
# Run tests with coverage
|
|
286
|
-
npm run test:coverage
|
|
287
|
-
|
|
288
|
-
# Run security tests
|
|
289
|
-
npm run test:security
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Writing Tests
|
|
293
|
-
|
|
294
|
-
- Use Jest for testing framework
|
|
295
|
-
- Write descriptive test names
|
|
296
|
-
- Test both success and error cases
|
|
297
|
-
- Mock external dependencies
|
|
298
|
-
- Aim for high test coverage
|
|
299
|
-
|
|
300
|
-
#### Example Test
|
|
301
|
-
|
|
302
|
-
```typescript
|
|
303
|
-
describe("createServer", () => {
|
|
304
|
-
it("should create server with default configuration", () => {
|
|
305
|
-
const server = createServer();
|
|
306
|
-
expect(server).toBeDefined();
|
|
307
|
-
expect(server.listen).toBeDefined();
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
it("should apply custom port configuration", () => {
|
|
311
|
-
const server = createServer({
|
|
312
|
-
server: { port: 8080 },
|
|
313
|
-
});
|
|
314
|
-
// Test implementation
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## Documentation
|
|
320
|
-
|
|
321
|
-
### Documentation Types
|
|
322
|
-
|
|
323
|
-
1. **API Documentation**: Function and class documentation
|
|
324
|
-
2. **User Guides**: How-to guides and tutorials
|
|
325
|
-
3. **Architecture Documentation**: System design and structure
|
|
326
|
-
4. **Examples**: Code examples and use cases
|
|
327
|
-
|
|
328
|
-
### Documentation Standards
|
|
329
|
-
|
|
330
|
-
- Use clear, concise language
|
|
331
|
-
- Provide code examples
|
|
332
|
-
- Keep documentation up-to-date with code changes
|
|
333
|
-
- Use proper markdown formatting
|
|
334
|
-
- Include table of contents for long documents
|
|
335
|
-
|
|
336
|
-
### Building Documentation
|
|
337
|
-
|
|
338
|
-
```bash
|
|
339
|
-
# Generate API documentation
|
|
340
|
-
npm run docs:api
|
|
341
|
-
|
|
342
|
-
# Build all documentation
|
|
343
|
-
npm run docs:build
|
|
344
|
-
|
|
345
|
-
# Serve documentation locally
|
|
346
|
-
npm run docs:serve
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Security
|
|
350
|
-
|
|
351
|
-
### Security Considerations
|
|
352
|
-
|
|
353
|
-
- Never commit sensitive information (keys, passwords, etc.)
|
|
354
|
-
- Follow secure coding practices
|
|
355
|
-
- Report security vulnerabilities privately
|
|
356
|
-
- Use the XyPriss Security module for cryptographic operations
|
|
357
|
-
|
|
358
|
-
### Reporting Security Issues
|
|
359
|
-
|
|
360
|
-
**Do not create public issues for security vulnerabilities.**
|
|
361
|
-
|
|
362
|
-
Instead, email security issues to: idevo.eleazar@gmail.com
|
|
363
|
-
|
|
364
|
-
Include:
|
|
365
|
-
|
|
366
|
-
- Description of the vulnerability
|
|
367
|
-
- Steps to reproduce
|
|
368
|
-
- Potential impact
|
|
369
|
-
- Suggested fix (if any)
|
|
370
|
-
|
|
371
|
-
### Security Review Process
|
|
372
|
-
|
|
373
|
-
All security-related changes undergo additional review:
|
|
374
|
-
|
|
375
|
-
1. Security team review
|
|
376
|
-
2. Automated security scanning
|
|
377
|
-
3. Manual security testing
|
|
378
|
-
4. Documentation review
|
|
379
|
-
|
|
380
|
-
## Getting Help
|
|
381
|
-
|
|
382
|
-
### Resources
|
|
383
|
-
|
|
384
|
-
- [Documentation](./docs/)
|
|
385
|
-
- [API Reference](./docs/api-reference.md)
|
|
386
|
-
- [Architecture Guide](./docs/architecture.md)
|
|
387
|
-
- [GitHub Issues](https://github.com/Nehonix-Team/XyPriss/issues)
|
|
388
|
-
|
|
389
|
-
### Community
|
|
390
|
-
|
|
391
|
-
- GitHub Discussions for questions and ideas
|
|
392
|
-
- Issues for bug reports and feature requests
|
|
393
|
-
- Pull requests for code contributions
|
|
394
|
-
|
|
395
|
-
### Contact
|
|
396
|
-
|
|
397
|
-
- General questions: Create a GitHub Discussion
|
|
398
|
-
- Bug reports: Create a GitHub Issue
|
|
399
|
-
- Security issues: idevo.eleazar@gmail.com
|
|
400
|
-
- Maintainers: @Nehonix-Team
|
|
401
|
-
|
|
402
|
-
## Recognition
|
|
403
|
-
|
|
404
|
-
Contributors are recognized in:
|
|
405
|
-
|
|
406
|
-
- CONTRIBUTORS.md file
|
|
407
|
-
- Release notes for significant contributions
|
|
408
|
-
- GitHub contributor statistics
|
|
409
|
-
|
|
410
|
-
Thank you for contributing to XyPriss! Your contributions help make the framework better for everyone.
|
|
52
|
+
---
|
|
411
53
|
|
|
54
|
+
*© 2026 Nehonix Team. All rights reserved.*
|