
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@jay-framework/editor-client
Advanced tools
Socket.io client implementation for editor applications to connect to Jay dev servers.
This package provides a Socket.io client that can be used by editor applications to connect to Jay dev servers and perform real-time operations. It includes:
import { createEditorClient } from '@jay-framework/editor-client';
// Create the editor client
const client = createEditorClient({
portRange: [3101, 3200],
scanTimeout: 5000,
retryAttempts: 3,
editorId: 'my-editor-123',
});
// Connect to the dev server
await client.connect();
// Publish a jay-html file
const result = await client.publish({
type: 'publish',
pages: [
{
route: '/pages',
jayHtml: '<div>Hello World</div>',
name: 'home',
},
],
});
console.log('Published:', result.status[0].filePath);
import {
createEditorClientWithConnectionManager,
createConnectionManager,
} from '@jay-framework/editor-client';
// Create a custom connection manager
const connectionManager = createConnectionManager({
portRange: [3101, 3200],
autoReconnect: true,
reconnectDelay: 1000,
maxReconnectAttempts: 5,
});
// Create editor client with the connection manager
const client = createEditorClientWithConnectionManager(connectionManager);
// Connect and handle state changes
await client.connect();
client.onConnectionStateChange((state) => {
console.log('Connection state:', state);
});
// Use protocol methods
const imageResult = await client.saveImage({
type: 'saveImage',
imageId: 'my-image',
imageData:
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==',
});
console.log('Image saved:', imageResult.imageUrl);
id, timestamp, and payload fieldsThe package follows a clean separation of concerns:
EditorProtocol interfaceAll messages use a wrapper structure:
interface ProtocolMessage {
id: string;
timestamp: number;
payload: {
type: 'publish' | 'saveImage' | 'hasImage';
// ... message-specific fields
};
}
interface ConnectionManagerOptions {
portRange?: [number, number]; // Default: [3101, 3200]
scanTimeout?: number; // Default: 5000ms
retryAttempts?: number; // Default: 3
editorId?: string; // Auto-generated UUID if not provided
autoReconnect?: boolean; // Default: true
reconnectDelay?: number; // Default: 1000ms
maxReconnectAttempts?: number; // Default: 5
}
Comprehensive test suite including:
This package is designed to be used by any editor application that needs to communicate with Jay dev servers, such as:
interface EditorClientOptions extends ConnectionManagerOptions { // Additional editor-specific options can be added here }
## Integration with Editor Applications
This package is designed to be used by any editor application that needs to communicate with Jay dev servers, such as:
- Figma plugins
- Web-based editors
- Desktop applications
- Browser extensions
FAQs
Unknown package
The npm package @jay-framework/editor-client receives a total of 14 weekly downloads. As such, @jay-framework/editor-client popularity was classified as not popular.
We found that @jay-framework/editor-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.