bluezone-hllapi
v0.1.45
Published
Low-level HLLAPI interface for Rocket BlueZone via Node.js
Downloads
48
Readme
🚀 Bluezone HLLAPI for Node.js
A high-performance Node.js binding for the Bluezone HLLAPI (High Level Language Application Programming Interface) library, enabling seamless integration with IBM mainframe systems through Rocket BlueZone terminal emulation.
✨ Features
- 🔌 Native HLLAPI integration with BlueZone
- 🎭 Built-in mock mode for development and testing
- 🚀 High-performance Rust implementation
- 🔒 Type-safe API with comprehensive error handling
- 📦 Zero-configuration installation
- 🔄 Automatic session management
- 🛡️ Resource cleanup and memory safety
- 📝 Comprehensive documentation and examples
📋 Table of Contents
💾 Installation
npm install bluezone-hllapiNo additional build tools (Rust, etc.) are required for installation. The package includes pre-built binaries for Windows.
📋 Prerequisites
- Node.js (version 14 or higher recommended)
- Rocket BlueZone terminal emulator (required for actual terminal connectivity)
🚀 Quick Start
const { HllapiClient } = require('bluezone-hllapi');
// Create a new HLLAPI client
const client = new HllapiClient();
// Connect to a session
await client.connect(1);
// Send data to the terminal
const result = await client.callHllapi(1, 3, "Hello World", 11);
console.log('Response:', result);
// Disconnect when done
await client.disconnect(1);📚 API Reference
HllapiClient
The main class for interacting with BlueZone HLLAPI.
Constructor
const client = new HllapiClient(config);Parameters:
config(Object, optional):dllPath(string): Custom path to HLLAPI DLLuseMock(boolean): Force mock moderetryCount(number): Connection retry attemptsretryDelay(number): Delay between retries in ms
Methods
connect(sessionId)
Establishes a connection to a BlueZone session.
disconnect(sessionId)
Terminates a BlueZone session connection.
callHllapi(sessionId, functionNumber, data, dataLength)
Executes a HLLAPI function call.
cleanup()
Releases all HLLAPI resources.
getSession(sessionId)
Retrieves information about a specific session.
getSessions()
Returns information about all active sessions.
isMock()
Checks if the client is running in mock mode.
🎭 Mock Mode
The module includes a mock implementation for development and testing:
const client = new HllapiClient({ useMock: true });
if (client.isMock()) {
console.log('Running in mock mode - perfect for development!');
}Mock Mode Features
- Development without BlueZone installation
- CI/CD pipeline compatibility
- Graceful error handling
- Console warnings for mock operations
🧪 Testing
Unit Tests
npm test
# or
cargo testNode.js Tests
npm run test:nodeIntegration Tests
npm run test:integrationCoverage Reports
npm run test:coverage🛠️ Development
Requirements
- Rust
- Visual Studio Build Tools (Windows)
- Node.js 14+
Building from Source
git clone https://github.com/Malco-Enterprises-of-Nevada/NodeJS-Bluezone-HLLAPI.git
cd NodeJS-Bluezone-HLLAPI
npm install
npm run build🤝 Contributing
We welcome contributions!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
Copyright (c) 2025 Malco Enterprises of Nevada. All rights reserved.
