
- Complete NestJS TypeScript implementation with WebSocket support - Direct messaging (DM) and group chat functionality - End-to-end encryption with AES encryption and key pairs - Media file support (images, videos, audio, documents) up to 100MB - Push notifications with Firebase Cloud Messaging integration - Mention alerts and real-time typing indicators - User authentication with JWT and Passport - SQLite database with TypeORM entities and relationships - Comprehensive API documentation with Swagger/OpenAPI - File upload handling with secure access control - Online/offline status tracking and presence management - Message editing, deletion, and reply functionality - Notification management with automatic cleanup - Health check endpoint for monitoring - CORS configuration for cross-origin requests - Environment-based configuration management - Structured for Flutter SDK integration Features implemented: ✅ Real-time messaging with Socket.IO ✅ User registration and authentication ✅ Direct messages and group chats ✅ Media file uploads and management ✅ End-to-end encryption ✅ Push notifications ✅ Mention alerts ✅ Typing indicators ✅ Message read receipts ✅ Online status tracking ✅ File access control ✅ Comprehensive API documentation Ready for Flutter SDK development and production deployment.
62 lines
1.8 KiB
Markdown
62 lines
1.8 KiB
Markdown
# aggregate-error [](https://travis-ci.org/sindresorhus/aggregate-error)
|
|
|
|
> Create an error from multiple errors
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install aggregate-error
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
const AggregateError = require('aggregate-error');
|
|
|
|
const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);
|
|
|
|
throw error;
|
|
/*
|
|
AggregateError:
|
|
Error: foo
|
|
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)
|
|
Error: bar
|
|
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
Error: baz
|
|
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)
|
|
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
at Module._compile (module.js:556:32)
|
|
at Object.Module._extensions..js (module.js:565:10)
|
|
at Module.load (module.js:473:32)
|
|
at tryModuleLoad (module.js:432:12)
|
|
at Function.Module._load (module.js:424:3)
|
|
at Module.runMain (module.js:590:10)
|
|
at run (bootstrap_node.js:394:7)
|
|
at startup (bootstrap_node.js:149:9)
|
|
*/
|
|
|
|
for (const individualError of error) {
|
|
console.log(individualError);
|
|
}
|
|
//=> [Error: foo]
|
|
//=> [Error: bar]
|
|
//=> [Error: baz]
|
|
```
|
|
|
|
|
|
## API
|
|
|
|
### AggregateError(errors)
|
|
|
|
Returns an `Error` that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors.
|
|
|
|
#### errors
|
|
|
|
Type: `Array<Error|Object|string>`
|
|
|
|
If a string, a new `Error` is created with the string as the error message.<br>
|
|
If a non-Error object, a new `Error` is created with all properties from the object copied over.
|