New:Socket for Asana Is Now Available.Learn more
Get Started

@uipath/common

Package Overview
Dependencies
Maintainers
24
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uipath/common - npm Package Compare versions

Comparing version
1.200.0-preview.109
to
1.201.0-preview.115
+6
dist/command-extensions.d.ts
import { Command } from "commander";
import "./command-examples";
import "./preview";
import "./trackedAction.js";
/** Install Common's Commander augmentations on a caller-owned constructor. */
export declare function installCommandExtensions(commandConstructor: typeof Command): void;
/**
* Lazy loaders for the two output codecs that only some invocations need.
*
* `formatter.ts` is imported by every command in every tool, so anything it
* imports statically is parsed on every `uip` invocation — including
* `uip <tool> -h`. `js-yaml` (101 KB) is only reached by `--output yaml` and
* `@jmespath-community/jmespath` (68 KB) only by `--output-filter`, so both
* live behind `await import` here instead.
*
* The API is split in two on purpose:
*
* - `loadOutputCodecsAsync` is awaited from the async paths that already know
* what the user asked for — the CLI host right after it resolves `--output`
* and `--output-filter`, and `trackedAction` before it runs a handler.
* - `getYamlCodec` / `getJmespathCodec` are the synchronous accessors
* `OutputFormatter` uses, because the formatter API is synchronous.
*
* Loaded modules live in cross-bundle singleton slots: each tool bundles its
* own copy of `@uipath/common`, so a module-level variable would be loaded by
* the host and then missing in the tool. See `singleton.ts`.
*/
/** The slice of `js-yaml` the formatter uses. */
export interface YamlCodec {
dump: (data: unknown) => string;
}
/** The slice of `@jmespath-community/jmespath` the formatter uses. */
export interface JmespathCodec {
compile: (expression: string) => unknown;
search: (data: never, expression: string) => unknown;
}
/** Which codecs an invocation needs, derived from the resolved CLI options. */
export interface OutputCodecsNeeded {
/** True when the resolved output format is `yaml`. */
yaml?: boolean;
/** True when an `--output-filter` expression is present. */
filter?: boolean;
}
/**
* Load the codecs this invocation needs, if they are not loaded already.
*
* Safe to call repeatedly — a codec already in its slot is not re-imported.
* Call before any `OutputFormatter` output that could use them.
*/
export declare function loadOutputCodecsAsync(needed: OutputCodecsNeeded): Promise<void>;
/**
* The loaded YAML codec, or `undefined` when nothing preloaded it.
*
* `undefined` means a code path produced `--output yaml` output without
* passing through the CLI host or `trackedAction` — a bug in that path, not a
* user error, so callers should throw rather than silently emit JSON.
*/
export declare function getYamlCodec(): YamlCodec | undefined;
/** The loaded JMESPath codec, or `undefined` when nothing preloaded it. */
export declare function getJmespathCodec(): JmespathCodec | undefined;
/** Test seam — drops both codecs so a spec can assert the unloaded path. */
export declare function resetOutputCodecs(): void;
/**
* Guidance for a project type a solution cannot contain, or `null` when allowed.
* Lives in `@uipath/common` so `solution-tool`'s packager resolver can ask
* without importing the `@uipath/solution-sdk` barrel (which drags
* `@uipath/studioweb-sdk` in).
*
* A library registered as a project does not fail late, it deploys *wrong*: the
* resource builder has no library template, falls through to the default, and
* mints `kind: process`. Deploy then creates an Orchestrator process backed by a
* library package, which has no entry point. The SDK metadata agrees a library
* is not project-shaped: `kind: library` is `scope: Tenant`,
* `supportsInLineCreation: false`.
*
* Case-insensitive — `.uipx` writes PascalCase `Type`, `project.json` uses
* `designOptions.outputType`.
*
* Takes `unknown` because one caller (`ensurePackagerTools`) reads `Type`
* straight out of `.uipx` JSON, where it can be absent or not a string. Only a
* type positively known to be unsupported is rejected, so anything else is
* allowed through to the resolvers, which warn on their own.
*/
export declare function unsupportedSolutionProjectType(projectType: unknown): string | null;
export declare function setProxyAuthHttpsAgent(agent: unknown): void;
export declare function getProxyAuthHttpsAgent(): unknown;
+3
-0

@@ -145,2 +145,5 @@ import { type CommandErrorClass, type TerminalOutcome } from "./telemetry/command-terminal.js";

* closed-box guarantee must additionally wrap {@link applyFilter}.
*
* Requires `loadOutputCodecsAsync({ filter: true })` to have run — the CLI
* host awaits it immediately before calling this.
*/

@@ -147,0 +150,0 @@ export declare function validateOutputFilter(filter: string): Error | null;

@@ -5,2 +5,3 @@ export * from "./attachment-binding";

export * from "./command-examples";
export * from "./command-extensions";
export * from "./command-help";

@@ -24,2 +25,3 @@ export * from "./command-walker";

export * from "./orchestrator-urls";
export * from "./output-codecs";
export * from "./output-context";

@@ -37,2 +39,3 @@ export * from "./output-format-context";

export * from "./solution-project-artifacts";
export * from "./solution-project-types";
export * from "./stdin";

@@ -46,2 +49,3 @@ export { BrowserContextStorage } from "./telemetry/browser-context-storage.js";

export { redactError, redactProperties, redactProperty, redactValue, } from "./telemetry/pii-redactor.js";
export { getProxyAuthHttpsAgent, setProxyAuthHttpsAgent, } from "./telemetry/proxy-http-agent.js";
export { type ShipSucceededTelemetryPayload, trackShipSucceeded, } from "./telemetry/ship-succeeded.js";

@@ -48,0 +52,0 @@ export * from "./telemetry/telemetry-events.js";

+2
-2
{
"name": "@uipath/common",
"license": "MIT",
"version": "1.200.0-preview.109",
"version": "1.201.0-preview.115",
"description": "Common infrastructure needed by uip tools.",

@@ -74,3 +74,3 @@ "repository": {

],
"gitHead": "fcc01cdae81bbd0c25d3d4fc287537a9d19d99f4"
"gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc"
}

Sorry, the diff of this file is too big to display