Registry / messaging / sappiens-websocket

sappiens-websocket

JSON →
library1.2.9jsnpmunverified

A WebSocket API client for the Sappiens Framework (v1.2.9), a RAD PHP framework with support for MySQL, Oracle, SQL Server, and PostgreSQL. This package provides WebSocket connectivity to Sappiens backend services. It requires Node.js >=0.12.0 and npm >=2.5.1. The package is specific to the Sappiens ecosystem and not intended for general use. The project appears to be in early development (v0.1 framework stage) with low release cadence and minimal documentation or community adoption.

npm install sappiens-websocket
INSTALL
IMPORT
SIG · SAPPIENS-WEBSOCKET
S
sappiens-websocket
messagingjavascriptv1.2.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import sappiensWebsocket from 'sappiens-websocket';
const sappiensWebsocket = require('sappiens-websocket');
ESM import is preferred; CommonJS require may still work depending on target.
SappiensWS
import { SappiensWS } from 'sappiens-websocket';
import SappiensWS from 'sappiens-websocket';
Named export must be destructured correctly.
WebSocket
import { WebSocket } from 'sappiens-websocket';
import WebSocket from 'sappiens-websocket';
Use named import for the WebSocket constructor.

Connects to a Sappiens WebSocket endpoint using token auth, sends a ping, and handles messages, errors, and closure.

import { WebSocket } from 'sappiens-websocket'; const ws = new WebSocket('wss://sappiens.example.com/socket', { headers: { 'Authorization': `Bearer ${process.env.SAPPIENS_TOKEN ?? ''}` } }); ws.on('open', () => { console.log('Connected'); ws.send(JSON.stringify({ action: 'ping', data: {} })); }); ws.on('message', (data) => { console.log('Received:', data.toString()); ws.close(); }); ws.on('error', (err) => { console.error('WebSocket error:', err); }); ws.on('close', (code, reason) => { console.log(`Disconnected: ${code} ${reason}`); });
Debug
Known issues
breakingThe package is part of Sappiens Framework v0.1, which is in early development and lacks stability guarantees.
fix
Pin to a specific version and test thoroughly before upgrading.
affects: >=0.0.0
gotchaNo TypeScript typings are provided; you may need to write your own declarations.
fix
Use 'declare module' or install @types/sappiens-websocket if available.
affects: >=1.0.0
deprecatedOld engine requirement Node.js >=0.12.0 may not be compatible with modern Node.js versions.
fix
Use Node.js >=14 LTS and check for compatibility issues.
affects: >=1.0.0
gotchaThe API surface and documentation are minimal; expect breaking changes between minor versions.
fix
Read the source code and lock your version.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'sappiens-websocket'
Package not installed or import path incorrect.
fix
Run npm install sappiens-websocket@1.2.9 and ensure you are importing from the correct path.
TypeError: sappiensWebsocket is not a constructor
Using default import when the export is named, or vice versa.
fix
Use named import: import { WebSocket } from 'sappiens-websocket';
Error: Invalid header value
WebSocket options headers containing non-ASCII or malformed values.
fix
Validate NODE_SAPPIENS_TOKEN and use proper URL encoding if necessary.
Upgrade
Version history
1.2.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
sappiens-websocket — npm install sappiens-websocket · libregistry