
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@multicloud-io/client
Advanced tools
Customer-facing Multicloud API client with limited field exposure
A TypeScript/JavaScript library for customer-facing operations with Multicloud servers. This package provides only customer API methods with limited field exposure for security.
IMPORTANT: This library is designed for server-side use only. Never expose Multicloud credentials or use this library in client/browser environments.
npm install @multicloud-io/client
import { MulticloudConfig, MulticloudClient } from '@multicloud-io/client';
// Basic usage with default configuration
const params = MulticloudConfig.getConnectionParams();
const client = new MulticloudCustomerClient(params);
// Get jobs for an application
const jobs = await client.getCustomerJobs('my-app');
// Get tasks for specific jobs
const tasks = await client.getCustomerTasks('my-app', new Set([1, 2, 3]));
The library uses environment variables for configuration:
# Required
MULTICLOUD_SERVER_URL=https://your-multicloud-server.com
# Optional
MULTICLOUD_ACCESS_TOKEN=your-access-token
MULTICLOUD_CLIENT_CERT_PATH=/path/to/client.crt
MULTICLOUD_CLIENT_KEY_PATH=/path/to/client.key
MULTICLOUD_DEBUG=true
Or use a configuration file at ~/.multicloud/config.yaml:
serverUrl: https://your-multicloud-server.com
accessToken: your-access-token
clientCert: /path/to/client.crt
clientKey: /path/to/client.key
debug: true
pingCustomer() - Test connection to customer APIgetCustomerJobs(applicationId, clusterId?) - Get jobs for an applicationaddCustomerJobs(jobDescs, applicationId, clusterId) - Add jobs to a clustercustomerJobAction(jobId, action, applicationId, clusterId, scaleBy?) - Perform job actionsgetCustomerClusters(applicationId, clusterId?) - Get clusters for an applicationgetCustomerClusterLocations(applicationId, clusterId) - Get cluster locationsgetCustomerTasks(applicationId, jobIds?, clusterId?) - Get tasks for an applicationgetCustomerServers(applicationId, clusterId?) - Get basic server informationimport { createMulticloudClient, isMulticloudEnabled } from '@multicloud-io/client';
// Quick client creation
const client = createMulticloudCustomerClient({ debug: true });
// Check if multicloud is enabled
if (isMulticloudEnabled()) {
// Use multicloud
} else {
// Use fallback
}
This package is designed with security in mind:
const client = new MulticloudCustomerClient(params);
// Get all jobs for an application
const jobs = await client.getCustomerJobs('my-application');
// Get jobs for a specific cluster
const clusterJobs = await client.getCustomerJobs('my-application', 'cluster-1');
// Get tasks for specific job IDs
const jobIds = new Set([1, 2, 3]);
const tasks = await client.getCustomerTasks('my-application', jobIds);
// Get all tasks for an application
const allTasks = await client.getCustomerTasks('my-application');
const jobDescs = [
{
name: 'my-job',
image: 'nginx:latest',
targetInstanceCount: 2,
command: 'echo "Hello World"'
}
];
const result = await client.addCustomerJobs(jobDescs, 'my-application', 'cluster-1');
// Start a job
await client.customerJobAction('job-1', 'start', 'my-application', 'cluster-1');
// Scale a job
await client.customerJobAction('job-1', 'scale', 'my-application', 'cluster-1', 3);
// Stop a job
await client.customerJobAction('job-1', 'stop', 'my-application', 'cluster-1');
The library provides specific error types:
import {
MulticloudConnectionError,
MulticloudAuthenticationError,
MulticloudNetworkError,
MulticloudResponseError
} from '@multicloud-io/client';
try {
const jobs = await client.getCustomerJobs('my-app');
} catch (error) {
if (error instanceof MulticloudAuthenticationError) {
// Handle authentication errors
} else if (error instanceof MulticloudNetworkError) {
// Handle network errors
}
}
# Install dependencies
npm install
# Build the package
npm run build
# Run tests
npm test
# Watch mode for development
npm run build:watch
MIT License - see LICENSE file for details.
FAQs
Customer-facing Multicloud API client with limited field exposure
We found that @multicloud-io/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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.