fixparser-common 9.2.1 → 9.2.2-eba87d12
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/README.md +44 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# fixparser-common
|
|
2
|
+
|
|
3
|
+
Shared TypeScript interfaces, types, and utilities for the [FIXParser](https://fixparser.dev/) ecosystem.
|
|
4
|
+
|
|
5
|
+
## What is fixparser-common?
|
|
6
|
+
|
|
7
|
+
`fixparser-common` provides foundational building blocks for FIXParser and its plugins, including:
|
|
8
|
+
- **Message storage interfaces and buffers** for handling FIX messages
|
|
9
|
+
- **Logging interfaces and types** for consistent, pluggable logging
|
|
10
|
+
- **Plugin interface** for extensibility
|
|
11
|
+
- **UUID generation utility**
|
|
12
|
+
- **Common types** for messages and log levels
|
|
13
|
+
|
|
14
|
+
This package is not a standalone FIX engine, but is intended for use by FIXParser, its plugins, and related tools.
|
|
15
|
+
|
|
16
|
+
## Main Exports
|
|
17
|
+
|
|
18
|
+
- `IMessageStore<T>`: Interface for generic message storage (add, retrieve, update, remove, etc.)
|
|
19
|
+
- `MessageBuffer<T>`: In-memory buffer implementing `IMessageStore<T>`
|
|
20
|
+
- `ILogTransporter`: Interface for pluggable log transport (e.g., to file, console, remote)
|
|
21
|
+
- `LogMessage`, `Level`: Types for structured logging
|
|
22
|
+
- `IPlugin<T>`: Interface for registering plugins
|
|
23
|
+
- `IMessage`: Interface for FIX messages
|
|
24
|
+
- `uuidv4`: Utility for generating UUID v4 strings
|
|
25
|
+
|
|
26
|
+
## Example Usage
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { MessageBuffer, LogMessage, Level, uuidv4 } from 'fixparser-common';
|
|
30
|
+
|
|
31
|
+
// Message buffer for storing messages
|
|
32
|
+
const buffer = new MessageBuffer(100);
|
|
33
|
+
buffer.add({ messageSequence: 1, encode: () => 'FIX message' });
|
|
34
|
+
|
|
35
|
+
// Logging
|
|
36
|
+
const log: LogMessage = { level: 'info' as Level, message: 'Started FIX session' };
|
|
37
|
+
|
|
38
|
+
// Generate a UUID
|
|
39
|
+
const id = uuidv4();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
Copyright © 2025 FIXParser Ltd. Released under Commercial license. Check [LICENSE.md](https://gitlab.com/logotype/fixparser/-/blob/main/LICENSE.md).
|