
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@livetemplate/client
Advanced tools
TypeScript/JavaScript client library for LiveTemplate - reactive HTML over the wire.
The LiveTemplate client enables reactive web applications by efficiently applying tree-based HTML updates from the server. It uses DOM morphing, intelligent static content caching, and WebSocket transport for real-time interactivity.
npm install @livetemplate/client
<script src="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.1.0/dist/livetemplate-client.browser.js"></script>
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.1.0/dist/livetemplate-client.browser.js"></script>
</head>
<body>
<div id="app"></div>
<script>
const client = new LiveTemplateClient.LiveTemplateClient({
targetSelector: "#app",
wsUrl: "ws://localhost:8080/ws",
httpUrl: "http://localhost:8080"
});
client.connect();
</script>
</body>
</html>
import { LiveTemplateClient } from "@livetemplate/client";
const client = new LiveTemplateClient({
targetSelector: "#app",
wsUrl: "ws://localhost:8080/ws",
httpUrl: "http://localhost:8080"
});
client.connect();
interface LiveTemplateClientOptions {
// Required
targetSelector: string; // CSS selector for target element
wsUrl: string; // WebSocket URL
httpUrl: string; // HTTP URL for initial render
// Optional
debug?: boolean; // Enable debug logging (default: false)
reconnectInterval?: number; // Reconnect interval in ms (default: 3000)
maxReconnectAttempts?: number;// Max reconnect attempts (default: 10)
}
// Connect to server
client.connect(): void
// Disconnect from server
client.disconnect(): void
// Send event to server
client.sendEvent(event: string, data: any): void
// Set debug mode
client.setDebug(enabled: boolean): void
The client emits events you can listen to:
// Connection established
window.addEventListener("livetemplate:connected", (e) => {
console.log("Connected to server");
});
// Connection closed
window.addEventListener("livetemplate:disconnected", (e) => {
console.log("Disconnected from server");
});
// Update received
window.addEventListener("livetemplate:update", (e) => {
console.log("Received update:", e.detail);
});
This results in ~75% reduction in update payload sizes compared to full HTML updates.
# Clone repository
git clone https://github.com/livetemplate/client.git
cd client
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
client/
├── livetemplate-client.ts # Main client
├── dom/ # DOM utilities
│ ├── directives.ts
│ ├── event-delegation.ts
│ ├── focus-manager.ts
│ ├── form-disabler.ts
│ ├── loading-indicator.ts
│ ├── modal-manager.ts
│ └── observer-manager.ts
├── state/ # State management
│ ├── form-lifecycle-manager.ts
│ └── tree-renderer.ts
├── transport/ # Network layer
│ └── websocket.ts
├── utils/ # Utilities
│ ├── logger.ts
│ ├── rate-limit.ts
│ └── testing.ts
└── tests/ # Test suite
# Run all tests
npm test
# Run specific test
npm test -- focus-manager
# Run with coverage
npm test -- --coverage
# Build TypeScript and browser bundle
npm run build
# Build browser bundle only
npm run build:browser
# Clean build artifacts
npm run clean
This client library follows the LiveTemplate core library's major.minor version. For example:
v0.1.5 → Client: v0.1.x (any patch version)v0.2.0 → Client: v0.2.0 (must match major.minor)Patch versions are independent and can be incremented for client-specific fixes.
See CONTRIBUTING.md for development guidelines.
MIT License - see LICENSE for details.
FAQs
TypeScript client for LiveTemplate tree-based updates
We found that @livetemplate/client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.