
Security News
Feross on TBPN: Socket's Series C and the State of Software Supply Chain Security
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.
cl-host-app-api
Advanced tools
Client library for interacting with Host App Api. For use in dashboard browser/mobile app.
Host is a container with a dedicated IP address. Each user can have multiple containers. Containers have different sizes (cpu, mem, disk).
Host Application provides user interface for project management and monitoring of host resources (cpu, mem, disk).
Project is a cluster of services (Docker containers) linked together in an isolated network.
Each project must have it's unique slug name. Slug is a value at least 3 characters long and can only contain -[a-z0-9] (for example my-project-1).
Project service is a docker container running a specific image (for example node:4, or mysql, etc.). Each service can have defined specific configuration (for example {"rootPassword": "test1234", "defaultDatabase": "test"}) and port forwarding (host port to container port). Multiple ports can be assigned to each service but no two services can share the same source port (host port).
For local development use DummyHostAppClient to simulate real client behaviour without running entire infrastructure.
/*
NOTE: `HostAppApi` is for example showcase only and should be replaced with relative path or else
*/
import { DummyHostAppClient } from 'HostAppApi'
import {
Project,
createProjectSlug,
createProjectName,
createServiceCode,
createNetworkPort,
ClientEvents,
ProjectState
} from 'HostAppApi'
const client = new DummyHostAppClient()
client.on(ClientEvents.ProjectAdded, project => {
console.log('project added', project)
})
client.on(ClientEvents.ProjectUpdated, project => {
console.log('project updated', project)
})
client.on(ClientEvents.ProjectRemoved, project => {
console.log('project removed', project)
})
const testProject1 = {
slug: createProjectSlug('project-1'),
name: createProjectName('Test Project 1'),
services: [
{
service: createServiceCode('node:4'),
base: true,
ports: [
{
source: createNetworkPort(2000),
destination: createNetworkPort(3000)
}
]
}
]
}
client.createProject(testProject1)
testProject1.name = createProjectName('Test Project 1 Updated')
client.updateProject(testProject1)
client.startProject(testProject1)
client.stopProject(testProject1)
client.deleteProject(testProject1)
Call these methods for local tests
initTestData - Auto generates predefined projects (to simulate existing projects on real host)startSysUsageGenerator - Starts hardware usage events simulation (cpu, mem, disk usage events)endSysUsageGenerator - Stops hardware usage events simulation. Use this method to clear interval timer (needed to finish tests, etc., use in afterAll method for example)For example
client.initTestData()
client.startSysUsageGenerator()
FAQs
Api for Host Client App (Dashboard)
The npm package cl-host-app-api receives a total of 21 weekly downloads. As such, cl-host-app-api popularity was classified as not popular.
We found that cl-host-app-api demonstrated a not healthy version release cadence and project activity because the last version was released 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
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.

Security News
OSV withdrew 157 OSV malware reports after automated false positives incorrectly flagged trusted npm and PyPI packages, sending bad records into tools that rely on OSV data.

Research
/Security News
TrapDoor crypto stealer hits 36 malicious packages across npm, PyPI, and Crates.io, targeting crypto, DeFi, AI, and security developers.