Sign In

@uipath/common

Package Overview
Dependencies
Maintainers
24
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mini Shai-Hulud" supply chain attack.

Affected versions:

1.0.1
View campaign page

@uipath/common

Common infrastructure needed by uip tools.

Source
npmnpm
Version
1.199.0-preview.111
Version published
Weekly downloads
956
-40.14%
Maintainers
24
Weekly downloads
 
Created
Source

@uipath/common

Shared infrastructure for the UiPath CLI. Provides output formatting, logging, error handling, and telemetry.

Installation

npm install @uipath/common

Usage

Output Formatting

import { OutputFormatter } from "@uipath/common";

OutputFormatter.success({ Result: "Success", Code: "AssetList", Data: assets });
OutputFormatter.error({ Result: RESULTS.Failure, Message: "Not found", Instructions: "Check the ID" });

Supported formats: table, json, yaml, plain.

Error Handling

Go-style [error, data] tuple returns via catchError:

import { catchError } from "@uipath/common";

const [error, result] = await catchError(api.getData());
if (error) {
    OutputFormatter.error({ Result: RESULTS.Failure, Message: error.message, Instructions: "Retry" });
    return;
}

Logging

import { logger, LogLevel } from "@uipath/common";

logger.info("Fetching resources...");
logger.debug("Request payload:", payload);

// Override level at runtime
logger.setLevel(LogLevel.DEBUG);
MethodLevelStreamVisible by default
logger.debugDEBUGstdoutNo
logger.infoINFOstdoutYes
logger.warnWARNstdoutYes
logger.errorERRORstderrYes

Debug output is enabled via DEBUG env var (Node/Bun) or localStorage.debug (browser).

API

ExportDescription
OutputFormatterStructured output in table, JSON, YAML, or plain text
catchError(promise)Go-style error handling returning [error, data] tuples
loggerCross-platform logger with debug/info/warn/error levels
trackedActionCommander.js extension for automatic telemetry tracking
CommandWalkerCLI command introspection utility
OutputSinkAbstraction for output destinations

License

See the root repository for license information.

FAQs

Package last updated on 10 Aug 2026

Did you know?

Socket

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.

Install

Related posts