@uipath/cli 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +227 -151
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7897,7 +7897,7 @@ var require_applicationinsights = __commonJS((exports, module) => {
|
|
|
7897
7897
|
|
|
7898
7898
|
// ../../node_modules/applicationinsights/out/Library/JsonConfig.js
|
|
7899
7899
|
var require_JsonConfig = __commonJS((exports) => {
|
|
7900
|
-
var __dirname = "/
|
|
7900
|
+
var __dirname = "/home/runner/work/uipcli/uipcli/node_modules/applicationinsights/out/Library";
|
|
7901
7901
|
var __importDefault = exports && exports.__importDefault || function(mod2) {
|
|
7902
7902
|
return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
|
|
7903
7903
|
};
|
|
@@ -30831,7 +30831,7 @@ var require_stack_chain2 = __commonJS((exports, module) => {
|
|
|
30831
30831
|
|
|
30832
30832
|
// ../../node_modules/async-hook-jl/index.js
|
|
30833
30833
|
var require_async_hook_jl = __commonJS((exports, module) => {
|
|
30834
|
-
var __dirname = "/
|
|
30834
|
+
var __dirname = "/home/runner/work/uipcli/uipcli/node_modules/async-hook-jl";
|
|
30835
30835
|
var AsyncHook = require_async_hook();
|
|
30836
30836
|
if (global._asyncHook) {
|
|
30837
30837
|
if (global._asyncHook.version === require_package2().version) {
|
|
@@ -34457,7 +34457,7 @@ var require_PrefixHelper = __commonJS((exports) => {
|
|
|
34457
34457
|
|
|
34458
34458
|
// ../../node_modules/applicationinsights/out/Library/Context.js
|
|
34459
34459
|
var require_Context = __commonJS((exports, module) => {
|
|
34460
|
-
var __dirname = "/
|
|
34460
|
+
var __dirname = "/home/runner/work/uipcli/uipcli/node_modules/applicationinsights/out/Library";
|
|
34461
34461
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
34462
34462
|
if (k2 === undefined)
|
|
34463
34463
|
k2 = k;
|
|
@@ -45270,7 +45270,7 @@ class NodeAppInsightsTelemetryProvider {
|
|
|
45270
45270
|
if (!client)
|
|
45271
45271
|
return;
|
|
45272
45272
|
const merged = this.mergeProperties(properties);
|
|
45273
|
-
logger.debug(`[AppInsights] trackEvent: ${eventName}`, merged
|
|
45273
|
+
logger.debug(`[AppInsights] trackEvent: ${eventName}`, merged ? JSON.stringify(merged) : "");
|
|
45274
45274
|
client.trackEvent({
|
|
45275
45275
|
name: eventName,
|
|
45276
45276
|
properties: merged
|
|
@@ -45320,26 +45320,44 @@ class NodeAppInsightsTelemetryProvider {
|
|
|
45320
45320
|
}
|
|
45321
45321
|
async flush() {
|
|
45322
45322
|
const client = this.client;
|
|
45323
|
-
if (!client)
|
|
45323
|
+
if (!client) {
|
|
45324
|
+
logger.warn(`[AppInsights] flush error (non-fatal): nil client`);
|
|
45324
45325
|
return;
|
|
45326
|
+
}
|
|
45325
45327
|
logger.debug("[AppInsights] flush: sending buffered telemetry to cloud");
|
|
45326
|
-
const [error] = await catchError(
|
|
45328
|
+
const [error] = await catchError(new Promise((resolve, reject) => {
|
|
45329
|
+
client.flush({
|
|
45330
|
+
callback: (response) => {
|
|
45331
|
+
if (!response) {
|
|
45332
|
+
resolve();
|
|
45333
|
+
return;
|
|
45334
|
+
}
|
|
45335
|
+
const [parseError, parsed] = catchError(() => JSON.parse(response));
|
|
45336
|
+
if (parseError || parsed?.errors && parsed.errors.length > 0) {
|
|
45337
|
+
reject(new Error(response));
|
|
45338
|
+
} else {
|
|
45339
|
+
resolve();
|
|
45340
|
+
}
|
|
45341
|
+
}
|
|
45342
|
+
});
|
|
45343
|
+
}));
|
|
45327
45344
|
if (error) {
|
|
45328
45345
|
logger.warn(`[AppInsights] flush error (non-fatal): ${error.message}`);
|
|
45329
45346
|
}
|
|
45330
45347
|
}
|
|
45331
45348
|
async shutdown() {
|
|
45332
|
-
|
|
45333
|
-
|
|
45349
|
+
if (!this.appInsightsModule) {
|
|
45350
|
+
logger.warn(`[AppInsights] shutdown error (non-fatal): nil appInsightsModule`);
|
|
45334
45351
|
return;
|
|
45352
|
+
}
|
|
45335
45353
|
const appInsights = this.appInsightsModule;
|
|
45336
|
-
const [
|
|
45337
|
-
|
|
45338
|
-
|
|
45339
|
-
})());
|
|
45340
|
-
if (error) {
|
|
45341
|
-
logger.warn(`[AppInsights] shutdown error (non-fatal): ${error.message}`);
|
|
45354
|
+
const [err] = catchError(() => appInsights.dispose());
|
|
45355
|
+
if (err) {
|
|
45356
|
+
logger.warn(`[AppInsights] shutdown error (non-fatal): ${err.message}`);
|
|
45342
45357
|
}
|
|
45358
|
+
this.client = undefined;
|
|
45359
|
+
this.appInsightsModule = undefined;
|
|
45360
|
+
this.initialized = false;
|
|
45343
45361
|
}
|
|
45344
45362
|
}
|
|
45345
45363
|
async function getOrCreateProvider(connectionString) {
|
|
@@ -45471,7 +45489,7 @@ var init_telemetry = __esm(() => {
|
|
|
45471
45489
|
init_logger_telemetry_provider();
|
|
45472
45490
|
init_node_appinsights_telemetry_provider();
|
|
45473
45491
|
sessionId = getOrCreateSessionId();
|
|
45474
|
-
DEFAULT_AI_CONNECTION_STRING = Buffer.from("
|
|
45492
|
+
DEFAULT_AI_CONNECTION_STRING = Buffer.from("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj", "base64").toString("utf-8");
|
|
45475
45493
|
telemetry = new Proxy({}, {
|
|
45476
45494
|
get(_, prop) {
|
|
45477
45495
|
const instance = getTelemetryInstance();
|
|
@@ -45485,7 +45503,7 @@ var init_telemetry = __esm(() => {
|
|
|
45485
45503
|
var CommonTelemetryEvents;
|
|
45486
45504
|
var init_telemetry_events = __esm(() => {
|
|
45487
45505
|
CommonTelemetryEvents = {
|
|
45488
|
-
Error: "
|
|
45506
|
+
Error: "uip.error"
|
|
45489
45507
|
};
|
|
45490
45508
|
});
|
|
45491
45509
|
|
|
@@ -45698,6 +45716,12 @@ var init_command_help = __esm(() => {
|
|
|
45698
45716
|
init_output_format_context();
|
|
45699
45717
|
});
|
|
45700
45718
|
|
|
45719
|
+
// ../common/src/constants.ts
|
|
45720
|
+
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", CONFIG_FILENAME = "config.json", LOCAL_CONFIG_FILENAME = "uipath.config.json", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS, DEFAULT_FETCH_TIMEOUT_MS = 30000, DEFAULT_REDIRECT_URI = "http://localhost:8104/oidc/login";
|
|
45721
|
+
var init_constants = __esm(() => {
|
|
45722
|
+
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
45723
|
+
});
|
|
45724
|
+
|
|
45701
45725
|
// ../../node_modules/jsonpath-plus/dist/index-node-esm.js
|
|
45702
45726
|
import vm from "vm";
|
|
45703
45727
|
|
|
@@ -47103,6 +47127,21 @@ var init_jsonpath = __esm(() => {
|
|
|
47103
47127
|
init_index_node_esm();
|
|
47104
47128
|
});
|
|
47105
47129
|
// ../common/src/trackedAction.ts
|
|
47130
|
+
function deriveCommandPath(cmd) {
|
|
47131
|
+
const parts = [];
|
|
47132
|
+
let current = cmd;
|
|
47133
|
+
while (current) {
|
|
47134
|
+
const name = current.name();
|
|
47135
|
+
if (name) {
|
|
47136
|
+
parts.unshift(name);
|
|
47137
|
+
}
|
|
47138
|
+
current = current.parent;
|
|
47139
|
+
}
|
|
47140
|
+
if (parts.length > 1) {
|
|
47141
|
+
parts.shift();
|
|
47142
|
+
}
|
|
47143
|
+
return ["uip", ...parts.filter((p) => p !== "uip")].join(".");
|
|
47144
|
+
}
|
|
47106
47145
|
var processContext;
|
|
47107
47146
|
var init_trackedAction = __esm(() => {
|
|
47108
47147
|
init_esm();
|
|
@@ -47114,8 +47153,10 @@ var init_trackedAction = __esm(() => {
|
|
|
47114
47153
|
process.exitCode = code;
|
|
47115
47154
|
}
|
|
47116
47155
|
};
|
|
47117
|
-
Command.prototype.trackedAction = function(context,
|
|
47156
|
+
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
47157
|
+
const command = this;
|
|
47118
47158
|
return this.action(async (...args) => {
|
|
47159
|
+
const telemetryName = deriveCommandPath(command);
|
|
47119
47160
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
47120
47161
|
const startTime = performance.now();
|
|
47121
47162
|
let errorMessage;
|
|
@@ -47146,6 +47187,7 @@ var init_trackedAction = __esm(() => {
|
|
|
47146
47187
|
var init_src = __esm(() => {
|
|
47147
47188
|
init_node_appinsights_telemetry_provider();
|
|
47148
47189
|
init_command_help();
|
|
47190
|
+
init_constants();
|
|
47149
47191
|
init_formatter();
|
|
47150
47192
|
init_jsonpath();
|
|
47151
47193
|
init_logger();
|
|
@@ -47153,7 +47195,6 @@ var init_src = __esm(() => {
|
|
|
47153
47195
|
init_output_format_context();
|
|
47154
47196
|
init_registry();
|
|
47155
47197
|
init_telemetry();
|
|
47156
|
-
init_telemetry_events();
|
|
47157
47198
|
init_trackedAction();
|
|
47158
47199
|
});
|
|
47159
47200
|
|
|
@@ -47162,7 +47203,7 @@ var package_default;
|
|
|
47162
47203
|
var init_package = __esm(() => {
|
|
47163
47204
|
package_default = {
|
|
47164
47205
|
name: "@uipath/cli",
|
|
47165
|
-
version: "0.1.
|
|
47206
|
+
version: "0.1.9",
|
|
47166
47207
|
description: "Cross platform CLI for UiPath",
|
|
47167
47208
|
repository: {
|
|
47168
47209
|
type: "git",
|
|
@@ -47170,7 +47211,7 @@ var init_package = __esm(() => {
|
|
|
47170
47211
|
directory: "packages/cli"
|
|
47171
47212
|
},
|
|
47172
47213
|
publishConfig: {
|
|
47173
|
-
registry: "https://registry.npmjs.org"
|
|
47214
|
+
registry: "https://registry.npmjs.org/"
|
|
47174
47215
|
},
|
|
47175
47216
|
type: "module",
|
|
47176
47217
|
main: "./dist/index.js",
|
|
@@ -61878,11 +61919,11 @@ Please check your uipath.config.json file and fix the errors above.`;
|
|
|
61878
61919
|
const fs7 = await getFs();
|
|
61879
61920
|
let configPath = fs7.env.getenv("UIPATH_CONFIG_PATH");
|
|
61880
61921
|
if (!configPath) {
|
|
61881
|
-
const localPath = fs7.path.join(fs7.env.cwd(),
|
|
61922
|
+
const localPath = fs7.path.join(fs7.env.cwd(), LOCAL_CONFIG_FILENAME);
|
|
61882
61923
|
if (await fs7.exists(localPath)) {
|
|
61883
61924
|
configPath = localPath;
|
|
61884
61925
|
} else {
|
|
61885
|
-
configPath = fs7.path.join(fs7.env.homedir(),
|
|
61926
|
+
configPath = fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, CONFIG_FILENAME);
|
|
61886
61927
|
}
|
|
61887
61928
|
}
|
|
61888
61929
|
if (!await fs7.exists(configPath)) {
|
|
@@ -61936,7 +61977,7 @@ var init_loadConfig = __esm(() => {
|
|
|
61936
61977
|
});
|
|
61937
61978
|
|
|
61938
61979
|
// ../auth/src/config.ts
|
|
61939
|
-
var
|
|
61980
|
+
var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00", InvalidBaseUrlError, DEFAULT_SCOPES, resolveConfigAsync = async ({
|
|
61940
61981
|
customAuthority,
|
|
61941
61982
|
customClientId,
|
|
61942
61983
|
customClientSecret
|
|
@@ -62001,6 +62042,7 @@ var DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_CLIENT_ID = "36dea5b8
|
|
|
62001
62042
|
};
|
|
62002
62043
|
};
|
|
62003
62044
|
var init_config = __esm(() => {
|
|
62045
|
+
init_src();
|
|
62004
62046
|
init_loadConfig();
|
|
62005
62047
|
InvalidBaseUrlError = class InvalidBaseUrlError extends Error {
|
|
62006
62048
|
url;
|
|
@@ -62749,10 +62791,10 @@ var init_clientCredentials = __esm(() => {
|
|
|
62749
62791
|
var AuthTelemetryEvents;
|
|
62750
62792
|
var init_telemetry_events2 = __esm(() => {
|
|
62751
62793
|
AuthTelemetryEvents = {
|
|
62752
|
-
Login: "
|
|
62753
|
-
TenantSelected: "
|
|
62754
|
-
TokenRefresh: "
|
|
62755
|
-
Logout: "
|
|
62794
|
+
Login: "uip.auth.login",
|
|
62795
|
+
TenantSelected: "uip.auth.tenant-selected",
|
|
62796
|
+
TokenRefresh: "uip.auth.token-refresh",
|
|
62797
|
+
Logout: "uip.auth.logout"
|
|
62756
62798
|
};
|
|
62757
62799
|
});
|
|
62758
62800
|
|
|
@@ -63683,7 +63725,7 @@ var init_tenantSelection = __esm(() => {
|
|
|
63683
63725
|
});
|
|
63684
63726
|
|
|
63685
63727
|
// ../auth/src/utils/envFile.ts
|
|
63686
|
-
var DEFAULT_AUTH_FILENAME
|
|
63728
|
+
var DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
|
|
63687
63729
|
const fs7 = getFileSystem();
|
|
63688
63730
|
if (fs7.path.isAbsolute(envFilePath)) {
|
|
63689
63731
|
if (await fs7.exists(envFilePath)) {
|
|
@@ -63779,7 +63821,8 @@ var DEFAULT_AUTH_FILENAME = ".auth", DEFAULT_AUTH_DIR = ".uipath", DEFAULT_ENV_F
|
|
|
63779
63821
|
var init_envFile = __esm(() => {
|
|
63780
63822
|
init_src();
|
|
63781
63823
|
init_src2();
|
|
63782
|
-
|
|
63824
|
+
DEFAULT_AUTH_FILENAME = AUTH_FILENAME;
|
|
63825
|
+
DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
63783
63826
|
});
|
|
63784
63827
|
|
|
63785
63828
|
// ../auth/src/utils/jwt.ts
|
|
@@ -64396,9 +64439,9 @@ var getBaseHtml = ({ title, message, type: type2 }) => {
|
|
|
64396
64439
|
};
|
|
64397
64440
|
|
|
64398
64441
|
// ../auth/src/server.ts
|
|
64399
|
-
var
|
|
64442
|
+
var startServer = async ({
|
|
64400
64443
|
redirectUri,
|
|
64401
|
-
timeoutMs =
|
|
64444
|
+
timeoutMs = DEFAULT_AUTH_TIMEOUT_MS
|
|
64402
64445
|
}) => {
|
|
64403
64446
|
let http;
|
|
64404
64447
|
try {
|
|
@@ -64480,7 +64523,6 @@ var DEFAULT_TIMEOUT_MS, startServer = async ({
|
|
|
64480
64523
|
};
|
|
64481
64524
|
var init_server = __esm(() => {
|
|
64482
64525
|
init_src();
|
|
64483
|
-
DEFAULT_TIMEOUT_MS = 5 * 60 * 1000;
|
|
64484
64526
|
});
|
|
64485
64527
|
|
|
64486
64528
|
// ../auth/src/strategies/node-strategy.ts
|
|
@@ -64574,7 +64616,7 @@ var authenticate = async ({
|
|
|
64574
64616
|
const origin = getGlobalThis()?.window?.location?.origin ?? "";
|
|
64575
64617
|
effectiveRedirectUri = `${origin}/oidc/login`;
|
|
64576
64618
|
} else {
|
|
64577
|
-
effectiveRedirectUri =
|
|
64619
|
+
effectiveRedirectUri = DEFAULT_REDIRECT_URI;
|
|
64578
64620
|
}
|
|
64579
64621
|
const effectiveRedirectUriUrl = new URL(effectiveRedirectUri);
|
|
64580
64622
|
const authParams = new URLSearchParams({
|
|
@@ -64606,6 +64648,7 @@ var authenticate = async ({
|
|
|
64606
64648
|
});
|
|
64607
64649
|
};
|
|
64608
64650
|
var init_src3 = __esm(() => {
|
|
64651
|
+
init_src();
|
|
64609
64652
|
init_config();
|
|
64610
64653
|
init_oidc();
|
|
64611
64654
|
init_tokenExchange();
|
|
@@ -64686,29 +64729,6 @@ var init_auth = __esm(() => {
|
|
|
64686
64729
|
auth = isBrowser2() ? new BrowserAuth : new NodeAuth;
|
|
64687
64730
|
});
|
|
64688
64731
|
|
|
64689
|
-
// src/telemetry-events.ts
|
|
64690
|
-
var CliTelemetryEvents;
|
|
64691
|
-
var init_telemetry_events3 = __esm(() => {
|
|
64692
|
-
CliTelemetryEvents = {
|
|
64693
|
-
Login: "Cli.Login",
|
|
64694
|
-
LoginStatus: "Cli.Login.Status",
|
|
64695
|
-
LoginTenantList: "Cli.Login.TenantList",
|
|
64696
|
-
LoginTenantSet: "Cli.Login.TenantSet",
|
|
64697
|
-
Logout: "Cli.Logout",
|
|
64698
|
-
McpServe: "Cli.Mcp.Serve",
|
|
64699
|
-
Help: "Cli.Help",
|
|
64700
|
-
Version: "Cli.Version",
|
|
64701
|
-
ToolsInstall: "Cli.Tools.Install",
|
|
64702
|
-
ToolsList: "Cli.Tools.List",
|
|
64703
|
-
ToolsSearch: "Cli.Tools.Search",
|
|
64704
|
-
ToolsUninstall: "Cli.Tools.Uninstall",
|
|
64705
|
-
ToolsUpdate: "Cli.Tools.Update",
|
|
64706
|
-
SkillsInstall: "Cli.Skills.Install",
|
|
64707
|
-
SkillsUpdate: "Cli.Skills.Update",
|
|
64708
|
-
SkillsUninstall: "Cli.Skills.Uninstall"
|
|
64709
|
-
};
|
|
64710
|
-
});
|
|
64711
|
-
|
|
64712
64732
|
// src/commands/login.ts
|
|
64713
64733
|
import path3 from "node:path";
|
|
64714
64734
|
function resolveAuthFilePath(folder) {
|
|
@@ -64718,7 +64738,7 @@ function resolveAuthFilePath(folder) {
|
|
|
64718
64738
|
return DEFAULT_ENV_FILENAME;
|
|
64719
64739
|
}
|
|
64720
64740
|
function registerLoginCommand(program2, context) {
|
|
64721
|
-
const loginCommand = program2.command("login").description("Login to UiPath Cloud").option("-f, --file <folder>", "Path to credentials folder").option("--authority <url>", "Custom authority URL").option("--client-id <id>", "Client Id or Application Id (default: uses built-in client for interactive login)").option("--client-secret <secret>", "Client Secret or Application Secret (External Apps)").option("-s, --scope <scopes>", "Custom scopes or Application scopes (External Apps). Space separated values.").option("-t, --tenant <name>", "Tenant name (non-interactive mode)").option("--it, --interactive", "Interactively select tenant from list").trackedAction(context,
|
|
64741
|
+
const loginCommand = program2.command("login").description("Login to UiPath Cloud").option("-f, --file <folder>", "Path to credentials folder").option("--authority <url>", "Custom authority URL").option("--client-id <id>", "Client Id or Application Id (default: uses built-in client for interactive login)").option("--client-secret <secret>", "Client Secret or Application Secret (External Apps)").option("-s, --scope <scopes>", "Custom scopes or Application scopes (External Apps). Space separated values.").option("-t, --tenant <name>", "Tenant name (non-interactive mode)").option("--it, --interactive", "Interactively select tenant from list").trackedAction(context, async (options) => {
|
|
64722
64742
|
const envFilePath = resolveAuthFilePath(options.file);
|
|
64723
64743
|
const [error48, authResult] = await catchError(auth.interactiveLogin({
|
|
64724
64744
|
envFilePath,
|
|
@@ -64747,7 +64767,7 @@ function registerLoginCommand(program2, context) {
|
|
|
64747
64767
|
hasTenant: !!options.tenant,
|
|
64748
64768
|
interactive: !!options.interactive
|
|
64749
64769
|
}));
|
|
64750
|
-
loginCommand.command("status").description("Show current login status and session information").trackedAction(context,
|
|
64770
|
+
loginCommand.command("status").description("Show current login status and session information").trackedAction(context, async () => {
|
|
64751
64771
|
const [statusError, status] = await catchError(auth.getLoginStatus({
|
|
64752
64772
|
envFilePath: resolveAuthFilePath()
|
|
64753
64773
|
}));
|
|
@@ -64776,7 +64796,7 @@ function registerLoginCommand(program2, context) {
|
|
|
64776
64796
|
});
|
|
64777
64797
|
});
|
|
64778
64798
|
const tenantCommand = loginCommand.command("tenant").description("Manage tenants");
|
|
64779
|
-
tenantCommand.command("list").description("List all available tenants").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context,
|
|
64799
|
+
tenantCommand.command("list").description("List all available tenants").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context, async (options) => {
|
|
64780
64800
|
const [statusError, status] = await catchError(auth.getLoginStatus({
|
|
64781
64801
|
envFilePath: resolveAuthFilePath(options.file)
|
|
64782
64802
|
}));
|
|
@@ -64818,7 +64838,7 @@ function registerLoginCommand(program2, context) {
|
|
|
64818
64838
|
Data: tenantRows
|
|
64819
64839
|
});
|
|
64820
64840
|
});
|
|
64821
|
-
tenantCommand.command("set").description("Set the active tenant by name").argument("<name>", "Tenant name to set as active").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context,
|
|
64841
|
+
tenantCommand.command("set").description("Set the active tenant by name").argument("<name>", "Tenant name to set as active").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context, async (name, options) => {
|
|
64822
64842
|
const envFilePath = resolveAuthFilePath(options.file);
|
|
64823
64843
|
const [statusError, status] = await catchError(auth.getLoginStatus({ envFilePath }));
|
|
64824
64844
|
if (statusError) {
|
|
@@ -64884,13 +64904,12 @@ var init_login = __esm(() => {
|
|
|
64884
64904
|
init_src3();
|
|
64885
64905
|
init_src();
|
|
64886
64906
|
init_auth();
|
|
64887
|
-
init_telemetry_events3();
|
|
64888
64907
|
});
|
|
64889
64908
|
|
|
64890
64909
|
// src/commands/logout.ts
|
|
64891
64910
|
import path4 from "node:path";
|
|
64892
64911
|
function registerLogoutCommand(program2, context) {
|
|
64893
|
-
program2.command("logout").description("Logout from UiPath Cloud by removing credentials").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context,
|
|
64912
|
+
program2.command("logout").description("Logout from UiPath Cloud by removing credentials").option("-f, --file <folder>", "Path to credentials folder").trackedAction(context, async (options) => {
|
|
64894
64913
|
const file2 = options.file ? path4.join(options.file, DEFAULT_AUTH_FILENAME) : undefined;
|
|
64895
64914
|
const [logoutError, result] = await catchError(logout({ file: file2 }));
|
|
64896
64915
|
if (logoutError) {
|
|
@@ -64910,7 +64929,6 @@ function registerLogoutCommand(program2, context) {
|
|
|
64910
64929
|
var init_logout2 = __esm(() => {
|
|
64911
64930
|
init_src3();
|
|
64912
64931
|
init_src();
|
|
64913
|
-
init_telemetry_events3();
|
|
64914
64932
|
});
|
|
64915
64933
|
|
|
64916
64934
|
// src/sinks/buffer-sink.ts
|
|
@@ -72585,11 +72603,11 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72585
72603
|
const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
|
|
72586
72604
|
return `${varKind} ${this.name}${rhs};` + _n;
|
|
72587
72605
|
}
|
|
72588
|
-
optimizeNames(names,
|
|
72606
|
+
optimizeNames(names, constants2) {
|
|
72589
72607
|
if (!names[this.name.str])
|
|
72590
72608
|
return;
|
|
72591
72609
|
if (this.rhs)
|
|
72592
|
-
this.rhs = optimizeExpr(this.rhs, names,
|
|
72610
|
+
this.rhs = optimizeExpr(this.rhs, names, constants2);
|
|
72593
72611
|
return this;
|
|
72594
72612
|
}
|
|
72595
72613
|
get names() {
|
|
@@ -72607,10 +72625,10 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72607
72625
|
render({ _n }) {
|
|
72608
72626
|
return `${this.lhs} = ${this.rhs};` + _n;
|
|
72609
72627
|
}
|
|
72610
|
-
optimizeNames(names,
|
|
72628
|
+
optimizeNames(names, constants2) {
|
|
72611
72629
|
if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
|
|
72612
72630
|
return;
|
|
72613
|
-
this.rhs = optimizeExpr(this.rhs, names,
|
|
72631
|
+
this.rhs = optimizeExpr(this.rhs, names, constants2);
|
|
72614
72632
|
return this;
|
|
72615
72633
|
}
|
|
72616
72634
|
get names() {
|
|
@@ -72676,8 +72694,8 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72676
72694
|
optimizeNodes() {
|
|
72677
72695
|
return `${this.code}` ? this : undefined;
|
|
72678
72696
|
}
|
|
72679
|
-
optimizeNames(names,
|
|
72680
|
-
this.code = optimizeExpr(this.code, names,
|
|
72697
|
+
optimizeNames(names, constants2) {
|
|
72698
|
+
this.code = optimizeExpr(this.code, names, constants2);
|
|
72681
72699
|
return this;
|
|
72682
72700
|
}
|
|
72683
72701
|
get names() {
|
|
@@ -72707,12 +72725,12 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72707
72725
|
}
|
|
72708
72726
|
return nodes.length > 0 ? this : undefined;
|
|
72709
72727
|
}
|
|
72710
|
-
optimizeNames(names,
|
|
72728
|
+
optimizeNames(names, constants2) {
|
|
72711
72729
|
const { nodes } = this;
|
|
72712
72730
|
let i2 = nodes.length;
|
|
72713
72731
|
while (i2--) {
|
|
72714
72732
|
const n = nodes[i2];
|
|
72715
|
-
if (n.optimizeNames(names,
|
|
72733
|
+
if (n.optimizeNames(names, constants2))
|
|
72716
72734
|
continue;
|
|
72717
72735
|
subtractNames(names, n.names);
|
|
72718
72736
|
nodes.splice(i2, 1);
|
|
@@ -72769,12 +72787,12 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72769
72787
|
return;
|
|
72770
72788
|
return this;
|
|
72771
72789
|
}
|
|
72772
|
-
optimizeNames(names,
|
|
72790
|
+
optimizeNames(names, constants2) {
|
|
72773
72791
|
var _a2;
|
|
72774
|
-
this.else = (_a2 = this.else) === null || _a2 === undefined ? undefined : _a2.optimizeNames(names,
|
|
72775
|
-
if (!(super.optimizeNames(names,
|
|
72792
|
+
this.else = (_a2 = this.else) === null || _a2 === undefined ? undefined : _a2.optimizeNames(names, constants2);
|
|
72793
|
+
if (!(super.optimizeNames(names, constants2) || this.else))
|
|
72776
72794
|
return;
|
|
72777
|
-
this.condition = optimizeExpr(this.condition, names,
|
|
72795
|
+
this.condition = optimizeExpr(this.condition, names, constants2);
|
|
72778
72796
|
return this;
|
|
72779
72797
|
}
|
|
72780
72798
|
get names() {
|
|
@@ -72799,10 +72817,10 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72799
72817
|
render(opts) {
|
|
72800
72818
|
return `for(${this.iteration})` + super.render(opts);
|
|
72801
72819
|
}
|
|
72802
|
-
optimizeNames(names,
|
|
72803
|
-
if (!super.optimizeNames(names,
|
|
72820
|
+
optimizeNames(names, constants2) {
|
|
72821
|
+
if (!super.optimizeNames(names, constants2))
|
|
72804
72822
|
return;
|
|
72805
|
-
this.iteration = optimizeExpr(this.iteration, names,
|
|
72823
|
+
this.iteration = optimizeExpr(this.iteration, names, constants2);
|
|
72806
72824
|
return this;
|
|
72807
72825
|
}
|
|
72808
72826
|
get names() {
|
|
@@ -72840,10 +72858,10 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72840
72858
|
render(opts) {
|
|
72841
72859
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
|
|
72842
72860
|
}
|
|
72843
|
-
optimizeNames(names,
|
|
72844
|
-
if (!super.optimizeNames(names,
|
|
72861
|
+
optimizeNames(names, constants2) {
|
|
72862
|
+
if (!super.optimizeNames(names, constants2))
|
|
72845
72863
|
return;
|
|
72846
|
-
this.iterable = optimizeExpr(this.iterable, names,
|
|
72864
|
+
this.iterable = optimizeExpr(this.iterable, names, constants2);
|
|
72847
72865
|
return this;
|
|
72848
72866
|
}
|
|
72849
72867
|
get names() {
|
|
@@ -72888,11 +72906,11 @@ var require_codegen = __commonJS((exports) => {
|
|
|
72888
72906
|
(_b = this.finally) === null || _b === undefined || _b.optimizeNodes();
|
|
72889
72907
|
return this;
|
|
72890
72908
|
}
|
|
72891
|
-
optimizeNames(names,
|
|
72909
|
+
optimizeNames(names, constants2) {
|
|
72892
72910
|
var _a2, _b;
|
|
72893
|
-
super.optimizeNames(names,
|
|
72894
|
-
(_a2 = this.catch) === null || _a2 === undefined || _a2.optimizeNames(names,
|
|
72895
|
-
(_b = this.finally) === null || _b === undefined || _b.optimizeNames(names,
|
|
72911
|
+
super.optimizeNames(names, constants2);
|
|
72912
|
+
(_a2 = this.catch) === null || _a2 === undefined || _a2.optimizeNames(names, constants2);
|
|
72913
|
+
(_b = this.finally) === null || _b === undefined || _b.optimizeNames(names, constants2);
|
|
72896
72914
|
return this;
|
|
72897
72915
|
}
|
|
72898
72916
|
get names() {
|
|
@@ -73166,7 +73184,7 @@ var require_codegen = __commonJS((exports) => {
|
|
|
73166
73184
|
function addExprNames(names, from) {
|
|
73167
73185
|
return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
|
|
73168
73186
|
}
|
|
73169
|
-
function optimizeExpr(expr, names,
|
|
73187
|
+
function optimizeExpr(expr, names, constants2) {
|
|
73170
73188
|
if (expr instanceof code_1.Name)
|
|
73171
73189
|
return replaceName(expr);
|
|
73172
73190
|
if (!canOptimize(expr))
|
|
@@ -73181,14 +73199,14 @@ var require_codegen = __commonJS((exports) => {
|
|
|
73181
73199
|
return items;
|
|
73182
73200
|
}, []));
|
|
73183
73201
|
function replaceName(n) {
|
|
73184
|
-
const c =
|
|
73202
|
+
const c = constants2[n.str];
|
|
73185
73203
|
if (c === undefined || names[n.str] !== 1)
|
|
73186
73204
|
return n;
|
|
73187
73205
|
delete names[n.str];
|
|
73188
73206
|
return c;
|
|
73189
73207
|
}
|
|
73190
73208
|
function canOptimize(e) {
|
|
73191
|
-
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 &&
|
|
73209
|
+
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants2[c.str] !== undefined);
|
|
73192
73210
|
}
|
|
73193
73211
|
}
|
|
73194
73212
|
function subtractNames(names, from) {
|
|
@@ -80374,14 +80392,13 @@ var init_server4 = __esm(() => {
|
|
|
80374
80392
|
// src/commands/mcp.ts
|
|
80375
80393
|
function registerMcpCommand(program2) {
|
|
80376
80394
|
const mcpCommand = program2.command("mcp").description("Model Context Protocol (MCP) server");
|
|
80377
|
-
mcpCommand.command("serve").description("Start the MCP server (stdio transport)").trackedAction(processContext,
|
|
80395
|
+
mcpCommand.command("serve").description("Start the MCP server (stdio transport)").trackedAction(processContext, async () => {
|
|
80378
80396
|
const { startMcpServer: startMcpServer2 } = await Promise.resolve().then(() => (init_server4(), exports_server));
|
|
80379
80397
|
await startMcpServer2(program2);
|
|
80380
80398
|
});
|
|
80381
80399
|
}
|
|
80382
80400
|
var init_mcp2 = __esm(() => {
|
|
80383
80401
|
init_src();
|
|
80384
|
-
init_telemetry_events3();
|
|
80385
80402
|
});
|
|
80386
80403
|
|
|
80387
80404
|
// src/commands/skills/agents/claude.ts
|
|
@@ -80606,10 +80623,13 @@ async function removeFromManifest(storePath, skillNames, agents) {
|
|
|
80606
80623
|
function runGit(args, cwd) {
|
|
80607
80624
|
return new Promise((resolve2, reject) => {
|
|
80608
80625
|
const isWindows = process.platform === "win32";
|
|
80609
|
-
const proc = spawn("git", args, {
|
|
80626
|
+
const proc = isWindows ? spawn(["git", ...args].map((a) => a.includes(" ") ? `"${a}"` : a).join(" "), [], {
|
|
80610
80627
|
cwd,
|
|
80611
80628
|
stdio: ["inherit", "pipe", "pipe"],
|
|
80612
|
-
shell:
|
|
80629
|
+
shell: true
|
|
80630
|
+
}) : spawn("git", args, {
|
|
80631
|
+
cwd,
|
|
80632
|
+
stdio: ["inherit", "pipe", "pipe"]
|
|
80613
80633
|
});
|
|
80614
80634
|
let stdout = "";
|
|
80615
80635
|
let stderr = "";
|
|
@@ -80673,11 +80693,12 @@ async function downloadAndExtractZip(storePath) {
|
|
|
80673
80693
|
}
|
|
80674
80694
|
await fs7.rm(zipPath);
|
|
80675
80695
|
}
|
|
80676
|
-
var REPO_URL = "https://github.com/UiPath/skills.git", ZIP_URL = "https://github.com/UiPath/skills/archive/refs/heads/main.zip", STORE_NAME
|
|
80696
|
+
var REPO_URL = "https://github.com/UiPath/skills.git", ZIP_URL = "https://github.com/UiPath/skills/archive/refs/heads/main.zip", STORE_NAME, MANIFEST_NAME = "manifest.json";
|
|
80677
80697
|
var init_contentStore = __esm(() => {
|
|
80678
80698
|
init_src();
|
|
80679
80699
|
init_src2();
|
|
80680
80700
|
init_js_yaml();
|
|
80701
|
+
STORE_NAME = `${UIPATH_HOME_DIR}/.skills`;
|
|
80681
80702
|
});
|
|
80682
80703
|
|
|
80683
80704
|
// src/commands/skills/agents/codex.ts
|
|
@@ -80841,37 +80862,72 @@ var init_agents = __esm(() => {
|
|
|
80841
80862
|
|
|
80842
80863
|
// src/commands/skills/prompt.ts
|
|
80843
80864
|
import { createInterface } from "node:readline";
|
|
80865
|
+
function ask(rl, prompt) {
|
|
80866
|
+
return new Promise((resolve2, reject) => {
|
|
80867
|
+
rl.question(prompt, (line) => {
|
|
80868
|
+
resolve2(line.trim());
|
|
80869
|
+
});
|
|
80870
|
+
rl.once("close", () => reject(new Error("Input stream closed before selection.")));
|
|
80871
|
+
});
|
|
80872
|
+
}
|
|
80844
80873
|
async function promptAgentSelection(operation = "manage") {
|
|
80845
80874
|
const rl = createInterface({
|
|
80846
80875
|
input: process.stdin,
|
|
80847
80876
|
output: process.stderr
|
|
80848
80877
|
});
|
|
80849
|
-
|
|
80878
|
+
const prompt = `
|
|
80850
80879
|
Select agents to ${operation} skills for:
|
|
80880
|
+
` + ALL_AGENTS.map((a, i2) => ` ${i2 + 1}. ${AGENT_DISPLAY_NAMES[a]}`).join(`
|
|
80881
|
+
`) + `
|
|
80882
|
+
|
|
80883
|
+
Enter numbers separated by commas (e.g., 1,2,3) or 'all': `;
|
|
80884
|
+
try {
|
|
80885
|
+
while (true) {
|
|
80886
|
+
const answer = await ask(rl, prompt);
|
|
80887
|
+
if (answer.toLowerCase() === "all" || answer === "") {
|
|
80888
|
+
return [...ALL_AGENTS];
|
|
80889
|
+
}
|
|
80890
|
+
const indices = answer.split(",").map((s) => Number.parseInt(s.trim(), 10) - 1).filter((i2) => i2 >= 0 && i2 < ALL_AGENTS.length);
|
|
80891
|
+
if (indices.length > 0) {
|
|
80892
|
+
return [...new Set(indices.map((i2) => ALL_AGENTS[i2]))];
|
|
80893
|
+
}
|
|
80894
|
+
rl.write(`Invalid input. Enter numbers (1-5), comma-separated, or 'all'.
|
|
80851
80895
|
`);
|
|
80852
|
-
|
|
80853
|
-
|
|
80896
|
+
}
|
|
80897
|
+
} finally {
|
|
80898
|
+
rl.close();
|
|
80854
80899
|
}
|
|
80855
|
-
|
|
80856
|
-
|
|
80857
|
-
const
|
|
80858
|
-
|
|
80859
|
-
|
|
80860
|
-
rl.close();
|
|
80861
|
-
});
|
|
80900
|
+
}
|
|
80901
|
+
async function promptSkillSelection(availableSkills, operation = "manage") {
|
|
80902
|
+
const rl = createInterface({
|
|
80903
|
+
input: process.stdin,
|
|
80904
|
+
output: process.stderr
|
|
80862
80905
|
});
|
|
80863
|
-
|
|
80864
|
-
|
|
80865
|
-
}
|
|
80866
|
-
|
|
80867
|
-
|
|
80868
|
-
|
|
80906
|
+
const prompt = `
|
|
80907
|
+
Select skills to ${operation}:
|
|
80908
|
+
` + availableSkills.map((s, i2) => ` ${i2 + 1}. ${s}`).join(`
|
|
80909
|
+
`) + `
|
|
80910
|
+
|
|
80911
|
+
Enter numbers separated by commas (e.g., 1,2,3) or 'all': `;
|
|
80912
|
+
try {
|
|
80913
|
+
while (true) {
|
|
80914
|
+
const answer = await ask(rl, prompt);
|
|
80915
|
+
if (answer.toLowerCase() === "all" || answer === "") {
|
|
80916
|
+
return [...availableSkills];
|
|
80917
|
+
}
|
|
80918
|
+
const indices = answer.split(",").map((s) => Number.parseInt(s.trim(), 10) - 1).filter((i2) => i2 >= 0 && i2 < availableSkills.length);
|
|
80919
|
+
if (indices.length > 0) {
|
|
80920
|
+
return [...new Set(indices.map((i2) => availableSkills[i2]))];
|
|
80921
|
+
}
|
|
80922
|
+
rl.write(`Invalid input. Enter numbers (1-${availableSkills.length}), comma-separated, or 'all'.
|
|
80923
|
+
`);
|
|
80924
|
+
}
|
|
80925
|
+
} finally {
|
|
80926
|
+
rl.close();
|
|
80869
80927
|
}
|
|
80870
|
-
return [...new Set(indices.map((i2) => ALL_AGENTS[i2]))];
|
|
80871
80928
|
}
|
|
80872
|
-
var ALL_AGENTS;
|
|
80929
|
+
var ALL_AGENTS, AGENT_DISPLAY_NAMES;
|
|
80873
80930
|
var init_prompt2 = __esm(() => {
|
|
80874
|
-
init_src();
|
|
80875
80931
|
ALL_AGENTS = [
|
|
80876
80932
|
"claude",
|
|
80877
80933
|
"cursor",
|
|
@@ -80879,6 +80935,13 @@ var init_prompt2 = __esm(() => {
|
|
|
80879
80935
|
"gemini",
|
|
80880
80936
|
"codex"
|
|
80881
80937
|
];
|
|
80938
|
+
AGENT_DISPLAY_NAMES = {
|
|
80939
|
+
claude: "Claude Code",
|
|
80940
|
+
cursor: "Cursor",
|
|
80941
|
+
copilot: "GitHub Copilot",
|
|
80942
|
+
gemini: "Gemini CLI",
|
|
80943
|
+
codex: "Codex"
|
|
80944
|
+
};
|
|
80882
80945
|
});
|
|
80883
80946
|
|
|
80884
80947
|
// src/commands/skills/skillsService.ts
|
|
@@ -80898,7 +80961,11 @@ async function resolveSkillsContext(options, operation) {
|
|
|
80898
80961
|
return null;
|
|
80899
80962
|
}
|
|
80900
80963
|
let selectedSkills = availableSkills;
|
|
80901
|
-
if (options.skills) {
|
|
80964
|
+
if (!options.skills && !options.agents) {
|
|
80965
|
+
const availableNames = availableSkills.map((s) => s.name);
|
|
80966
|
+
const chosen = await promptSkillSelection(availableNames, operation);
|
|
80967
|
+
selectedSkills = availableSkills.filter((s) => chosen.includes(s.name));
|
|
80968
|
+
} else if (options.skills) {
|
|
80902
80969
|
const requested = options.skills.split(",").map((s) => s.trim());
|
|
80903
80970
|
const availableNames = availableSkills.map((s) => s.name);
|
|
80904
80971
|
const unknown3 = requested.filter((s) => !availableNames.includes(s));
|
|
@@ -80936,10 +81003,8 @@ async function resolveSkillsContext(options, operation) {
|
|
|
80936
81003
|
process.exitCode = 1;
|
|
80937
81004
|
return null;
|
|
80938
81005
|
}
|
|
80939
|
-
} else if (options.interactive) {
|
|
80940
|
-
agents = await promptAgentSelection(operation);
|
|
80941
81006
|
} else {
|
|
80942
|
-
agents =
|
|
81007
|
+
agents = await promptAgentSelection(operation);
|
|
80943
81008
|
}
|
|
80944
81009
|
return { rootDir, storePath, selectedSkills, agents, isLocal };
|
|
80945
81010
|
}
|
|
@@ -80996,10 +81061,7 @@ var init_skillsService = __esm(() => {
|
|
|
80996
81061
|
|
|
80997
81062
|
// src/commands/skills/install.ts
|
|
80998
81063
|
function registerInstallCommand(skillsCommand) {
|
|
80999
|
-
skillsCommand.command("install").description(
|
|
81000
|
-
|
|
81001
|
-
${AGENTS_TABLE}
|
|
81002
|
-
`).option("--agents <agents>", "Comma-separated list of agents").option("--skills <skills>", "Comma-separated list of skills").option("--local", "Install to current directory instead of global").option("--interactive", "Interactively select agents").trackedAction(processContext, CliTelemetryEvents.SkillsInstall, async (options) => {
|
|
81064
|
+
skillsCommand.command("install").description("Download skills from UiPath and install them for your coding agents.").option("--agents <agents>", "Target agents: claude, cursor, copilot, gemini, codex (comma-separated)").option("--skills <skills>", "Specific skills to install (comma-separated)").option("--local", "Install to current project instead of globally").trackedAction(processContext, async (options) => {
|
|
81003
81065
|
const [contextError, resolved] = await catchError(resolveSkillsContext(options, "install"));
|
|
81004
81066
|
if (contextError || !resolved) {
|
|
81005
81067
|
if (contextError) {
|
|
@@ -81029,14 +81091,12 @@ ${AGENTS_TABLE}
|
|
|
81029
81091
|
}
|
|
81030
81092
|
var init_install = __esm(() => {
|
|
81031
81093
|
init_src();
|
|
81032
|
-
init_telemetry_events3();
|
|
81033
|
-
init_skills();
|
|
81034
81094
|
init_skillsService();
|
|
81035
81095
|
});
|
|
81036
81096
|
|
|
81037
81097
|
// src/commands/skills/uninstall.ts
|
|
81038
81098
|
function registerUninstallCommand(skillsCommand) {
|
|
81039
|
-
skillsCommand.command("uninstall").description("
|
|
81099
|
+
skillsCommand.command("uninstall").description("Remove previously installed skills from agent configurations.").option("--agents <agents>", "Target agents: claude, cursor, copilot, gemini, codex (comma-separated)").option("--skills <skills>", "Specific skills to uninstall (comma-separated)").option("--local", "Uninstall from current project instead of globally").trackedAction(processContext, async (options) => {
|
|
81040
81100
|
const [contextError, resolved] = await catchError(resolveSkillsContext(options, "uninstall"));
|
|
81041
81101
|
const isLocal = !!options.local;
|
|
81042
81102
|
let rootDir;
|
|
@@ -81123,7 +81183,6 @@ function registerUninstallCommand(skillsCommand) {
|
|
|
81123
81183
|
var init_uninstall = __esm(() => {
|
|
81124
81184
|
init_src();
|
|
81125
81185
|
init_src2();
|
|
81126
|
-
init_telemetry_events3();
|
|
81127
81186
|
init_agents();
|
|
81128
81187
|
init_contentStore();
|
|
81129
81188
|
init_prompt2();
|
|
@@ -81132,7 +81191,7 @@ var init_uninstall = __esm(() => {
|
|
|
81132
81191
|
|
|
81133
81192
|
// src/commands/skills/update.ts
|
|
81134
81193
|
function registerUpdateCommand(skillsCommand) {
|
|
81135
|
-
skillsCommand.command("update").description("
|
|
81194
|
+
skillsCommand.command("update").description("Re-fetch skills from UiPath and reinstall to get the latest versions.").option("--agents <agents>", "Target agents: claude, cursor, copilot, gemini, codex (comma-separated)").option("--skills <skills>", "Specific skills to update (comma-separated)").option("--local", "Update in current project instead of globally").trackedAction(processContext, async (options) => {
|
|
81136
81195
|
const [contextError, resolved] = await catchError(resolveSkillsContext(options, "update"));
|
|
81137
81196
|
if (contextError || !resolved) {
|
|
81138
81197
|
if (contextError) {
|
|
@@ -81173,14 +81232,18 @@ function registerUpdateCommand(skillsCommand) {
|
|
|
81173
81232
|
}
|
|
81174
81233
|
var init_update = __esm(() => {
|
|
81175
81234
|
init_src();
|
|
81176
|
-
init_telemetry_events3();
|
|
81177
81235
|
init_contentStore();
|
|
81178
81236
|
init_skillsService();
|
|
81179
81237
|
});
|
|
81180
81238
|
|
|
81181
81239
|
// src/commands/skills.ts
|
|
81182
81240
|
function registerSkillsCommand(program2) {
|
|
81183
|
-
const skillsCommand = program2.command("skills").description(
|
|
81241
|
+
const skillsCommand = program2.command("skills").description(`Install and manage UiPath skills for AI coding agents.
|
|
81242
|
+
|
|
81243
|
+
` + `Skills teach AI coding agents how to build UiPath automations, agents,
|
|
81244
|
+
` + `RPA workflows, flows, and orchestrations. They are fetched from the UiPath
|
|
81245
|
+
` + `skills repository on GitHub and installed into each agent's config format.
|
|
81246
|
+
` + AGENTS_TABLE);
|
|
81184
81247
|
registerInstallCommand(skillsCommand);
|
|
81185
81248
|
registerUpdateCommand(skillsCommand);
|
|
81186
81249
|
registerUninstallCommand(skillsCommand);
|
|
@@ -81190,13 +81253,15 @@ var init_skills = __esm(() => {
|
|
|
81190
81253
|
init_install();
|
|
81191
81254
|
init_uninstall();
|
|
81192
81255
|
init_update();
|
|
81193
|
-
AGENTS_TABLE = `
|
|
81194
|
-
|
|
81195
|
-
` + `
|
|
81196
|
-
` + `
|
|
81197
|
-
` + `
|
|
81198
|
-
` + `
|
|
81199
|
-
` +
|
|
81256
|
+
AGENTS_TABLE = `
|
|
81257
|
+
Supported agents:
|
|
81258
|
+
` + ` Agent Destination
|
|
81259
|
+
` + ` ─────────────── ──────────────────────────────────────────────────
|
|
81260
|
+
` + ` Claude Code .claude/skills/<skill>/
|
|
81261
|
+
` + ` Cursor .cursor/rules/<skill>.mdc
|
|
81262
|
+
` + ` GitHub Copilot .github/instructions/<skill>.instructions.md
|
|
81263
|
+
` + ` Gemini CLI .gemini/GEMINI.md (appends @import)
|
|
81264
|
+
` + " Codex ~/.codex/instructions.md or codex.md (appends reference)";
|
|
81200
81265
|
});
|
|
81201
81266
|
|
|
81202
81267
|
// src/utils/npmrc.ts
|
|
@@ -81339,9 +81404,12 @@ async function runPackageManager(args, cwd) {
|
|
|
81339
81404
|
const pm = useBun ? "bun" : "npm";
|
|
81340
81405
|
const pmArgs = useBun ? args.filter((a) => a !== "-g").map((a) => a === "uninstall" ? "remove" : a) : args;
|
|
81341
81406
|
return new Promise((resolve2, reject) => {
|
|
81342
|
-
const proc = spawn2(pm, pmArgs, {
|
|
81407
|
+
const proc = isWindows ? spawn2([pm, ...pmArgs].map((a) => a.includes(" ") ? `"${a}"` : a).join(" "), [], {
|
|
81408
|
+
stdio: ["inherit", "pipe", "pipe"],
|
|
81409
|
+
shell: true,
|
|
81410
|
+
cwd
|
|
81411
|
+
}) : spawn2(pm, pmArgs, {
|
|
81343
81412
|
stdio: ["inherit", "pipe", "pipe"],
|
|
81344
|
-
shell: isWindows,
|
|
81345
81413
|
cwd
|
|
81346
81414
|
});
|
|
81347
81415
|
let stderr = "";
|
|
@@ -81395,7 +81463,7 @@ class NodeToolService {
|
|
|
81395
81463
|
};
|
|
81396
81464
|
const response = await fetch(url2, {
|
|
81397
81465
|
headers: fetchHeaders,
|
|
81398
|
-
signal: AbortSignal.timeout(
|
|
81466
|
+
signal: AbortSignal.timeout(DEFAULT_FETCH_TIMEOUT_MS)
|
|
81399
81467
|
});
|
|
81400
81468
|
if (response.status === 401 || response.status === 403) {
|
|
81401
81469
|
throw new Error(`Registry ${registryUrl} returned ${response.status} for ${packageName} (authentication required)`);
|
|
@@ -81501,7 +81569,7 @@ ${errors4.map((e) => ` - ${e}`).join(`
|
|
|
81501
81569
|
}
|
|
81502
81570
|
}
|
|
81503
81571
|
}
|
|
81504
|
-
var SAFE_PACKAGE_SPEC, SAFE_VERSION,
|
|
81572
|
+
var SAFE_PACKAGE_SPEC, SAFE_VERSION, NPM_TIMEOUT_MS = 180000, TOOLS_WHITELIST, WHITELIST_BY_COMMAND, WHITELIST_BY_SHORT_NAME, DEFAULT_REGISTRY = "https://registry.npmjs.org", toolService;
|
|
81505
81573
|
var init_toolService = __esm(() => {
|
|
81506
81574
|
init_src();
|
|
81507
81575
|
SAFE_PACKAGE_SPEC = /^@?[a-zA-Z0-9._/-]+(@[a-zA-Z0-9._+:~^<>=| -]+)?$/;
|
|
@@ -81514,6 +81582,7 @@ var init_toolService = __esm(() => {
|
|
|
81514
81582
|
["@uipath/orchestrator-tool", "or"],
|
|
81515
81583
|
["@uipath/rpa-tool", "rpa"],
|
|
81516
81584
|
["@uipath/flow-tool", "flow"],
|
|
81585
|
+
["@uipath/case-tool", "case"],
|
|
81517
81586
|
["@uipath/test-manager-tool", "tm"],
|
|
81518
81587
|
["@uipath/resources-tool", "resources"],
|
|
81519
81588
|
["@uipath/api-workflow-tool", "api-workflow"],
|
|
@@ -81533,7 +81602,7 @@ var init_toolService = __esm(() => {
|
|
|
81533
81602
|
// src/commands/tools/install.ts
|
|
81534
81603
|
function registerInstallCommand2(toolsCommand, _context, state) {
|
|
81535
81604
|
const { resolveInstallPath, getCliVersionPrefix } = state;
|
|
81536
|
-
toolsCommand.command("install").description("Install a tool from registry").argument("<package-name>", "Name of the package to install").trackedAction(processContext,
|
|
81605
|
+
toolsCommand.command("install").description("Install a tool from registry").argument("<package-name>", "Name of the package to install").trackedAction(processContext, async (packageArg) => {
|
|
81537
81606
|
const packageName = resolveToolPackageName(packageArg);
|
|
81538
81607
|
if (!TOOLS_WHITELIST.has(packageName)) {
|
|
81539
81608
|
OutputFormatter.error({
|
|
@@ -81579,12 +81648,11 @@ function registerInstallCommand2(toolsCommand, _context, state) {
|
|
|
81579
81648
|
var init_install2 = __esm(() => {
|
|
81580
81649
|
init_src();
|
|
81581
81650
|
init_toolService();
|
|
81582
|
-
init_telemetry_events3();
|
|
81583
81651
|
});
|
|
81584
81652
|
|
|
81585
81653
|
// src/commands/tools/list.ts
|
|
81586
81654
|
function registerListCommand(toolsCommand, state) {
|
|
81587
|
-
toolsCommand.command("list").description("List installed tools").trackedAction(processContext,
|
|
81655
|
+
toolsCommand.command("list").description("List installed tools").trackedAction(processContext, async () => {
|
|
81588
81656
|
OutputFormatter.success({
|
|
81589
81657
|
Result: "Success",
|
|
81590
81658
|
Code: "ToolList",
|
|
@@ -81594,12 +81662,11 @@ function registerListCommand(toolsCommand, state) {
|
|
|
81594
81662
|
}
|
|
81595
81663
|
var init_list = __esm(() => {
|
|
81596
81664
|
init_src();
|
|
81597
|
-
init_telemetry_events3();
|
|
81598
81665
|
});
|
|
81599
81666
|
|
|
81600
81667
|
// src/commands/tools/search.ts
|
|
81601
81668
|
function registerSearchCommand(toolsCommand, _context) {
|
|
81602
|
-
toolsCommand.command("search").description("Search for tools in the configured registry").argument("[query]", "Search query (name or keyword)").trackedAction(processContext,
|
|
81669
|
+
toolsCommand.command("search").description("Search for tools in the configured registry").argument("[query]", "Search query (name or keyword)").trackedAction(processContext, async (query) => {
|
|
81603
81670
|
const [error48, results] = await catchError(toolService.search(query));
|
|
81604
81671
|
if (error48) {
|
|
81605
81672
|
OutputFormatter.error({
|
|
@@ -81620,13 +81687,12 @@ function registerSearchCommand(toolsCommand, _context) {
|
|
|
81620
81687
|
var init_search = __esm(() => {
|
|
81621
81688
|
init_src();
|
|
81622
81689
|
init_toolService();
|
|
81623
|
-
init_telemetry_events3();
|
|
81624
81690
|
});
|
|
81625
81691
|
|
|
81626
81692
|
// src/commands/tools/uninstall.ts
|
|
81627
81693
|
function registerUninstallCommand2(toolsCommand, _context, state) {
|
|
81628
81694
|
const { resolveInstallPath } = state;
|
|
81629
|
-
toolsCommand.command("uninstall").description("Uninstall an installed tool").argument("<package-name>", "Package name (e.g. @uipath/rpa-tool) or command alias (e.g. rpa)").trackedAction(processContext,
|
|
81695
|
+
toolsCommand.command("uninstall").description("Uninstall an installed tool").argument("<package-name>", "Package name (e.g. @uipath/rpa-tool) or command alias (e.g. rpa)").trackedAction(processContext, async (packageArg) => {
|
|
81630
81696
|
const packageName = resolveToolPackageName(packageArg);
|
|
81631
81697
|
if (!TOOLS_WHITELIST.has(packageName)) {
|
|
81632
81698
|
OutputFormatter.error({
|
|
@@ -81639,7 +81705,9 @@ function registerUninstallCommand2(toolsCommand, _context, state) {
|
|
|
81639
81705
|
}
|
|
81640
81706
|
const [error48] = await catchError((async () => {
|
|
81641
81707
|
const location = await resolveInstallPath();
|
|
81642
|
-
await toolService.uninstall(packageName, location.path, {
|
|
81708
|
+
await toolService.uninstall(packageName, location.path, {
|
|
81709
|
+
global: location.global
|
|
81710
|
+
});
|
|
81643
81711
|
OutputFormatter.success({
|
|
81644
81712
|
Result: "Success",
|
|
81645
81713
|
Code: "Message",
|
|
@@ -81661,7 +81729,6 @@ function registerUninstallCommand2(toolsCommand, _context, state) {
|
|
|
81661
81729
|
var init_uninstall2 = __esm(() => {
|
|
81662
81730
|
init_src();
|
|
81663
81731
|
init_toolService();
|
|
81664
|
-
init_telemetry_events3();
|
|
81665
81732
|
});
|
|
81666
81733
|
|
|
81667
81734
|
// src/services/storage.ts
|
|
@@ -81797,7 +81864,7 @@ var init_toolLoader = __esm(() => {
|
|
|
81797
81864
|
// src/commands/tools/update.ts
|
|
81798
81865
|
function registerUpdateCommand2(toolsCommand, _context, state) {
|
|
81799
81866
|
const { tools, toolsDirs, resolveInstallPath, getCliVersionPrefix } = state;
|
|
81800
|
-
toolsCommand.command("update").description("Update installed tools").option("--name <scoped-tool-name>", "scoped package name").option("--version <version>", "package version to install", "latest").trackedAction(processContext,
|
|
81867
|
+
toolsCommand.command("update").description("Update installed tools").option("--name <scoped-tool-name>", "scoped package name").option("--version <version>", "package version to install", "latest").trackedAction(processContext, async (options) => {
|
|
81801
81868
|
if (tools.length === 0) {
|
|
81802
81869
|
OutputFormatter.error({
|
|
81803
81870
|
Result: "Failure",
|
|
@@ -81921,7 +81988,6 @@ function registerUpdateCommand2(toolsCommand, _context, state) {
|
|
|
81921
81988
|
var init_update2 = __esm(() => {
|
|
81922
81989
|
init_src();
|
|
81923
81990
|
init_toolService();
|
|
81924
|
-
init_telemetry_events3();
|
|
81925
81991
|
init_toolLoader();
|
|
81926
81992
|
});
|
|
81927
81993
|
|
|
@@ -81942,6 +82008,15 @@ var init_tools = __esm(() => {
|
|
|
81942
82008
|
init_update2();
|
|
81943
82009
|
});
|
|
81944
82010
|
|
|
82011
|
+
// src/telemetry-events.ts
|
|
82012
|
+
var CliTelemetryEvents;
|
|
82013
|
+
var init_telemetry_events3 = __esm(() => {
|
|
82014
|
+
CliTelemetryEvents = {
|
|
82015
|
+
Help: "uip.help",
|
|
82016
|
+
Version: "uip.version"
|
|
82017
|
+
};
|
|
82018
|
+
});
|
|
82019
|
+
|
|
81945
82020
|
// src/utils/helpFormatter.ts
|
|
81946
82021
|
function createHelpConfiguration(isBrowser3) {
|
|
81947
82022
|
const originalFormatHelp = Help.prototype.formatHelp;
|
|
@@ -82419,8 +82494,9 @@ var run2 = async (args) => {
|
|
|
82419
82494
|
getOutputWidth: () => process.stdout.columns || 80
|
|
82420
82495
|
},
|
|
82421
82496
|
exit: (code) => {
|
|
82422
|
-
process.exitCode
|
|
82423
|
-
|
|
82497
|
+
if (code !== 0 || !process.exitCode) {
|
|
82498
|
+
process.exitCode = code;
|
|
82499
|
+
}
|
|
82424
82500
|
},
|
|
82425
82501
|
capabilities: {
|
|
82426
82502
|
isBrowser: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Cross platform CLI for UiPath",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"directory": "packages/cli"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
|
-
"registry": "https://registry.npmjs.org"
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "./dist/index.js",
|