@uipath/cli 1.202.1 → 1.203.0-preview.180
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/README.md +101 -5
- package/dist/THIRD-PARTY-NOTICES.md +64 -7
- package/dist/{cli-p61a1vc8.js → cli-w7vb50ez.js} +4 -4
- package/dist/{index-tqczrxct.js → index-7pvwjzsq.js} +297 -25
- package/dist/{index-bhjtwzfa.js → index-hgvsratt.js} +14 -2
- package/dist/{index-vmj27s6h.js → index-mtdmza3c.js} +55 -32
- package/dist/{index-9d17sa6t.js → index-szrenqr6.js} +331 -39
- package/dist/{index-v5cj0bhj.js → index-vmn69waj.js} +127 -12
- package/dist/index.js +5 -5
- package/dist/{server-0243hbq7.js → server-z7wh3gfs.js} +6 -5
- package/dist/{telemetry-drain-wqmnr7t7.js → telemetry-drain-zkrm8xja.js} +1 -1
- package/dist/{updateService-mashkk31.js → updateService-n7hftkkv.js} +2 -2
- package/package.json +8 -12
- package/README.browser.md +0 -128
- package/dist/index.browser.js +0 -16410
- package/dist/services.feedback.browser.js +0 -90
- package/dist/services.markdown.browser.js +0 -4
|
@@ -2,15 +2,20 @@ import {
|
|
|
2
2
|
AUTH_FLOW_ENV_VAR,
|
|
3
3
|
AuthProfileValidationError,
|
|
4
4
|
DEFAULT_AUTH_FILENAME,
|
|
5
|
+
DEFAULT_AUTH_PROFILE,
|
|
5
6
|
DEFAULT_ENV_FILENAME,
|
|
6
7
|
ENV_AUTH_ENABLE_VAR,
|
|
7
8
|
ENV_AUTH_VARS,
|
|
8
9
|
EnvAuthConfigError,
|
|
10
|
+
authProfileExistsAsync,
|
|
11
|
+
deleteAuthProfileAsync,
|
|
12
|
+
describeAuthProfilesAsync,
|
|
9
13
|
getActiveAuthProfile,
|
|
10
14
|
getActiveAuthProfileFilePath,
|
|
11
15
|
getLoginStatusAsync,
|
|
12
16
|
isEnvAuthEnabled,
|
|
13
17
|
isTenantSelectionError,
|
|
18
|
+
listAuthProfileNamesAsync,
|
|
14
19
|
loadEnvFileAsync,
|
|
15
20
|
logout,
|
|
16
21
|
normalizeAuthProfileName,
|
|
@@ -19,7 +24,7 @@ import {
|
|
|
19
24
|
readAuthFromEnv,
|
|
20
25
|
resolveEnvFileLocationAsync,
|
|
21
26
|
resolveEnvFilePathAsync
|
|
22
|
-
} from "./index-
|
|
27
|
+
} from "./index-vmn69waj.js";
|
|
23
28
|
import {
|
|
24
29
|
AGENT_DEFS,
|
|
25
30
|
AGENT_DISPLAY_NAMES,
|
|
@@ -103,13 +108,14 @@ import {
|
|
|
103
108
|
versionLinePrefix,
|
|
104
109
|
versionMigrationNotice,
|
|
105
110
|
withConfigLock
|
|
106
|
-
} from "./index-
|
|
111
|
+
} from "./index-mtdmza3c.js";
|
|
107
112
|
import {
|
|
108
113
|
CONFIG_FILENAME,
|
|
109
114
|
Command,
|
|
110
115
|
DEFAULT_FETCH_TIMEOUT_MS,
|
|
111
116
|
EXIT_CODES,
|
|
112
117
|
LogLevel,
|
|
118
|
+
OUTPUT_FORMATS,
|
|
113
119
|
OutputFormatter,
|
|
114
120
|
Pagination,
|
|
115
121
|
REGISTER_EXPORT,
|
|
@@ -138,6 +144,7 @@ import {
|
|
|
138
144
|
getOutputFormat,
|
|
139
145
|
getOutputFormatExplicit,
|
|
140
146
|
getOutputSink,
|
|
147
|
+
isOutputFormat,
|
|
141
148
|
isTelemetryDisabled,
|
|
142
149
|
loadOutputCodecsAsync,
|
|
143
150
|
logger,
|
|
@@ -146,6 +153,7 @@ import {
|
|
|
146
153
|
readStdinWithTimeout,
|
|
147
154
|
recordExitCode,
|
|
148
155
|
redactProperties,
|
|
156
|
+
requireConfirmation,
|
|
149
157
|
resolveEnvReference,
|
|
150
158
|
runWithInvocationRequest,
|
|
151
159
|
runWithTimings,
|
|
@@ -170,7 +178,7 @@ import {
|
|
|
170
178
|
telemetryInit,
|
|
171
179
|
telemetryShutdownWithoutFlush,
|
|
172
180
|
validateOutputFilter
|
|
173
|
-
} from "./index-
|
|
181
|
+
} from "./index-7pvwjzsq.js";
|
|
174
182
|
import {
|
|
175
183
|
isBrowser
|
|
176
184
|
} from "./index-0gctz400.js";
|
|
@@ -301,7 +309,6 @@ class GeneralizedStorage {
|
|
|
301
309
|
var storage = new GeneralizedStorage;
|
|
302
310
|
|
|
303
311
|
// src/utils/globalOptions.ts
|
|
304
|
-
var VALID_FORMATS = ["table", "json", "yaml", "plain"];
|
|
305
312
|
var VALID_LOG_LEVELS = {
|
|
306
313
|
debug: 0,
|
|
307
314
|
info: 1,
|
|
@@ -348,7 +355,7 @@ function tryParseOutputSpace(state, args, i) {
|
|
|
348
355
|
}
|
|
349
356
|
if (i + 1 < args.length) {
|
|
350
357
|
const v = args[i + 1];
|
|
351
|
-
if (
|
|
358
|
+
if (isOutputFormat(v)) {
|
|
352
359
|
applyOutputValue(state, v);
|
|
353
360
|
return { consumed: true, advance: 1 };
|
|
354
361
|
}
|
|
@@ -370,7 +377,7 @@ function tryParseOutputEquals(state, args, i) {
|
|
|
370
377
|
state.outputConflict = true;
|
|
371
378
|
}
|
|
372
379
|
const v = args[i].substring("--output=".length);
|
|
373
|
-
if (
|
|
380
|
+
if (isOutputFormat(v)) {
|
|
374
381
|
applyOutputValue(state, v);
|
|
375
382
|
return { consumed: true, advance: 0 };
|
|
376
383
|
}
|
|
@@ -491,7 +498,7 @@ function stripGlobalOptions(args) {
|
|
|
491
498
|
}
|
|
492
499
|
}
|
|
493
500
|
const envDefault = process.env?.UIP_DEFAULT_OUTPUT;
|
|
494
|
-
const resolvedFormat = state.format ?? (envDefault &&
|
|
501
|
+
const resolvedFormat = state.format ?? (envDefault && isOutputFormat(envDefault) ? envDefault : "json");
|
|
495
502
|
return {
|
|
496
503
|
args: state.cleaned,
|
|
497
504
|
format: resolvedFormat,
|
|
@@ -522,10 +529,14 @@ function isHelpOrVersionInvocation(args) {
|
|
|
522
529
|
return false;
|
|
523
530
|
}
|
|
524
531
|
|
|
532
|
+
// src/copyright.ts
|
|
533
|
+
var COPYRIGHT_NOTICE = "© 2026 UiPath";
|
|
534
|
+
|
|
525
535
|
// src/utils/helpFormatter.ts
|
|
536
|
+
var OUTPUT_FLAG = `--output <${OUTPUT_FORMATS.join("|")}>`;
|
|
526
537
|
var GLOBAL_OPTIONS = [
|
|
527
538
|
{
|
|
528
|
-
Flags:
|
|
539
|
+
Flags: OUTPUT_FLAG,
|
|
529
540
|
Description: "Output format (default: json)"
|
|
530
541
|
},
|
|
531
542
|
{
|
|
@@ -691,6 +702,7 @@ function renderBanner(description, cmd) {
|
|
|
691
702
|
return [
|
|
692
703
|
` ${title}`,
|
|
693
704
|
` ${tagline}`,
|
|
705
|
+
` ${COPYRIGHT_NOTICE}`,
|
|
694
706
|
"",
|
|
695
707
|
` Usage: ${usage[0]}`,
|
|
696
708
|
` ${usage[1]}`
|
|
@@ -2412,7 +2424,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2412
2424
|
var CONFIG_KEYS = {
|
|
2413
2425
|
output: {
|
|
2414
2426
|
path: ["core", "output"],
|
|
2415
|
-
validValues:
|
|
2427
|
+
validValues: OUTPUT_FORMATS,
|
|
2416
2428
|
description: "Default output format for CLI commands"
|
|
2417
2429
|
},
|
|
2418
2430
|
logLevel: {
|
|
@@ -2924,26 +2936,26 @@ var promptSelect = async (options, message) => {
|
|
|
2924
2936
|
// src/services/auth.ts
|
|
2925
2937
|
class NodeAuth {
|
|
2926
2938
|
async interactiveLogin(options) {
|
|
2927
|
-
const { interactiveLogin } = await import("./index-
|
|
2939
|
+
const { interactiveLogin } = await import("./index-hgvsratt.js");
|
|
2928
2940
|
return await interactiveLogin({
|
|
2929
2941
|
...options,
|
|
2930
2942
|
selectFromList: promptSelect
|
|
2931
2943
|
});
|
|
2932
2944
|
}
|
|
2933
2945
|
async clientCredentialsLogin(options) {
|
|
2934
|
-
const { clientCredentialsLogin } = await import("./index-
|
|
2946
|
+
const { clientCredentialsLogin } = await import("./index-hgvsratt.js");
|
|
2935
2947
|
return await clientCredentialsLogin(options);
|
|
2936
2948
|
}
|
|
2937
2949
|
async getLoginStatus(options) {
|
|
2938
|
-
const { getLoginStatusAsync: getLoginStatusAsync2 } = await import("./index-
|
|
2950
|
+
const { getLoginStatusAsync: getLoginStatusAsync2 } = await import("./index-hgvsratt.js");
|
|
2939
2951
|
return getLoginStatusAsync2(options);
|
|
2940
2952
|
}
|
|
2941
2953
|
async fetchTenants(baseUrl, accessToken, organizationId) {
|
|
2942
|
-
const { fetchTenantsAndOrganizations } = await import("./index-
|
|
2954
|
+
const { fetchTenantsAndOrganizations } = await import("./index-hgvsratt.js");
|
|
2943
2955
|
return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
|
|
2944
2956
|
}
|
|
2945
2957
|
async saveTenantSelection(envFilePath, tenantName, tenantId) {
|
|
2946
|
-
const { saveEnvFileAsync } = await import("./index-
|
|
2958
|
+
const { saveEnvFileAsync } = await import("./index-hgvsratt.js");
|
|
2947
2959
|
await saveEnvFileAsync({
|
|
2948
2960
|
envPath: envFilePath,
|
|
2949
2961
|
data: {
|
|
@@ -2957,23 +2969,23 @@ class NodeAuth {
|
|
|
2957
2969
|
|
|
2958
2970
|
class BrowserAuth {
|
|
2959
2971
|
async interactiveLogin(options) {
|
|
2960
|
-
const { interactiveLogin } = await import("./index-
|
|
2972
|
+
const { interactiveLogin } = await import("./index-hgvsratt.js");
|
|
2961
2973
|
return await interactiveLogin(options);
|
|
2962
2974
|
}
|
|
2963
2975
|
async clientCredentialsLogin(options) {
|
|
2964
|
-
const { clientCredentialsLogin } = await import("./index-
|
|
2976
|
+
const { clientCredentialsLogin } = await import("./index-hgvsratt.js");
|
|
2965
2977
|
return await clientCredentialsLogin(options);
|
|
2966
2978
|
}
|
|
2967
2979
|
async getLoginStatus(options) {
|
|
2968
|
-
const { getLoginStatusAsync: getLoginStatusAsync2 } = await import("./index-
|
|
2980
|
+
const { getLoginStatusAsync: getLoginStatusAsync2 } = await import("./index-hgvsratt.js");
|
|
2969
2981
|
return getLoginStatusAsync2(options);
|
|
2970
2982
|
}
|
|
2971
2983
|
async fetchTenants(baseUrl, accessToken, organizationId) {
|
|
2972
|
-
const { fetchTenantsAndOrganizations } = await import("./index-
|
|
2984
|
+
const { fetchTenantsAndOrganizations } = await import("./index-hgvsratt.js");
|
|
2973
2985
|
return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
|
|
2974
2986
|
}
|
|
2975
2987
|
async saveTenantSelection(envFilePath, tenantName, tenantId) {
|
|
2976
|
-
const { saveEnvFileAsync } = await import("./index-
|
|
2988
|
+
const { saveEnvFileAsync } = await import("./index-hgvsratt.js");
|
|
2977
2989
|
await saveEnvFileAsync({
|
|
2978
2990
|
envPath: envFilePath,
|
|
2979
2991
|
data: {
|
|
@@ -3107,6 +3119,288 @@ var trackAuthLogout = (result) => {
|
|
|
3107
3119
|
});
|
|
3108
3120
|
};
|
|
3109
3121
|
|
|
3122
|
+
// src/commands/profiles/delete.ts
|
|
3123
|
+
var PROFILES_DELETE_EXAMPLES = [
|
|
3124
|
+
{
|
|
3125
|
+
Description: "Delete a login profile and its stored credentials",
|
|
3126
|
+
Command: "uip login profiles delete staging --yes",
|
|
3127
|
+
Output: {
|
|
3128
|
+
Code: "Message",
|
|
3129
|
+
Data: {
|
|
3130
|
+
Message: "Deleted profile 'staging'. Removed /home/alice/.uipath/profiles/staging"
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
Description: "Delete every named profile",
|
|
3136
|
+
Command: "uip login profiles delete --all --yes",
|
|
3137
|
+
Output: {
|
|
3138
|
+
Code: "DeleteResult",
|
|
3139
|
+
Data: [
|
|
3140
|
+
{ Name: "staging", Status: "deleted" },
|
|
3141
|
+
{ Name: "prod", Status: "deleted" }
|
|
3142
|
+
]
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
];
|
|
3146
|
+
var LIST_INSTRUCTION = "Run 'uip login profiles list' to see the profiles that exist.";
|
|
3147
|
+
function rejectAsInvalid(context, message, instructions, errorCode = "invalid_argument") {
|
|
3148
|
+
OutputFormatter.error({
|
|
3149
|
+
Result: RESULTS.ValidationError,
|
|
3150
|
+
ErrorCode: errorCode,
|
|
3151
|
+
Message: message,
|
|
3152
|
+
Instructions: instructions,
|
|
3153
|
+
Retry: "RetryWillNotFix"
|
|
3154
|
+
});
|
|
3155
|
+
context.exit(EXIT_CODES.ValidationError);
|
|
3156
|
+
}
|
|
3157
|
+
function rejectBadArguments(profileArg, options, context) {
|
|
3158
|
+
if (options.all && profileArg) {
|
|
3159
|
+
rejectAsInvalid(context, "Cannot use '--all' together with a profile name.", "Use 'uip login profiles delete --all' or 'uip login profiles delete <profile-name>', not both.");
|
|
3160
|
+
return true;
|
|
3161
|
+
}
|
|
3162
|
+
if (!options.all && !profileArg) {
|
|
3163
|
+
rejectAsInvalid(context, "Missing profile name.", `Provide a profile name, or use '--all' to delete every named profile. ${LIST_INSTRUCTION}`);
|
|
3164
|
+
return true;
|
|
3165
|
+
}
|
|
3166
|
+
return false;
|
|
3167
|
+
}
|
|
3168
|
+
function registerDeleteCommand(profilesCommand, context) {
|
|
3169
|
+
profilesCommand.command("delete").description("Delete a login profile and its stored credentials").argument("[profile-name]", "Name of the profile to delete").option("--all", "Delete every named profile").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(PROFILES_DELETE_EXAMPLES).trackedAction(context, async (profileArg, options) => {
|
|
3170
|
+
if (rejectBadArguments(profileArg, options, context)) {
|
|
3171
|
+
return;
|
|
3172
|
+
}
|
|
3173
|
+
if (options.all) {
|
|
3174
|
+
await deleteAll(options, context);
|
|
3175
|
+
return;
|
|
3176
|
+
}
|
|
3177
|
+
if (profileArg) {
|
|
3178
|
+
await deleteSingle(profileArg, options, context);
|
|
3179
|
+
}
|
|
3180
|
+
});
|
|
3181
|
+
}
|
|
3182
|
+
async function rejectUndeletableProfile(profileArg, context) {
|
|
3183
|
+
if (profileArg === DEFAULT_AUTH_PROFILE) {
|
|
3184
|
+
rejectAsInvalid(context, `'${DEFAULT_AUTH_PROFILE}' is the built-in profile and cannot be deleted.`, "Run 'uip logout' to remove the credentials of the default profile.");
|
|
3185
|
+
return true;
|
|
3186
|
+
}
|
|
3187
|
+
if (getActiveAuthProfile() === profileArg) {
|
|
3188
|
+
rejectAsInvalid(context, `Cannot delete profile '${profileArg}' while '--profile ${profileArg}' selects it.`, `Re-run without '--profile ${profileArg}'.`);
|
|
3189
|
+
return true;
|
|
3190
|
+
}
|
|
3191
|
+
const [nameError] = catchError(() => normalizeAuthProfileName(profileArg));
|
|
3192
|
+
if (nameError) {
|
|
3193
|
+
rejectAsInvalid(context, nameError.message, "Use a profile name of letters, numbers, '.', '_' and '-'.");
|
|
3194
|
+
return true;
|
|
3195
|
+
}
|
|
3196
|
+
const [existsError, exists] = await catchError(authProfileExistsAsync(profileArg));
|
|
3197
|
+
if (existsError) {
|
|
3198
|
+
rejectAsInvalid(context, existsError.message, LIST_INSTRUCTION);
|
|
3199
|
+
return true;
|
|
3200
|
+
}
|
|
3201
|
+
if (!exists) {
|
|
3202
|
+
rejectAsInvalid(context, `Profile '${profileArg}' does not exist.`, LIST_INSTRUCTION, "not_found");
|
|
3203
|
+
return true;
|
|
3204
|
+
}
|
|
3205
|
+
return false;
|
|
3206
|
+
}
|
|
3207
|
+
async function deleteSingle(profileArg, options, context) {
|
|
3208
|
+
if (await rejectUndeletableProfile(profileArg, context)) {
|
|
3209
|
+
return;
|
|
3210
|
+
}
|
|
3211
|
+
if (!requireConfirmation(options, `delete profile '${profileArg}' and its stored credentials`)) {
|
|
3212
|
+
return;
|
|
3213
|
+
}
|
|
3214
|
+
const [deleteError, removedPath] = await catchError(deleteAuthProfileAsync(profileArg));
|
|
3215
|
+
if (deleteError) {
|
|
3216
|
+
OutputFormatter.error({
|
|
3217
|
+
Result: RESULTS.Failure,
|
|
3218
|
+
ErrorCode: "local_permission_denied",
|
|
3219
|
+
Message: `Failed to delete profile '${profileArg}': ${deleteError.message}`,
|
|
3220
|
+
Instructions: "Check file permissions on ~/.uipath/profiles and try again.",
|
|
3221
|
+
Retry: "RetryWillNotFix"
|
|
3222
|
+
});
|
|
3223
|
+
context.exit(EXIT_CODES.Failure);
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
OutputFormatter.success({
|
|
3227
|
+
Result: RESULTS.Success,
|
|
3228
|
+
Code: "Message",
|
|
3229
|
+
Data: {
|
|
3230
|
+
Message: removedPath === undefined ? `Profile '${profileArg}' was already gone; nothing to remove.` : `Deleted profile '${profileArg}'. Removed ${removedPath}`
|
|
3231
|
+
}
|
|
3232
|
+
});
|
|
3233
|
+
}
|
|
3234
|
+
function reportUnreadableProfiles(error, context) {
|
|
3235
|
+
OutputFormatter.error({
|
|
3236
|
+
Result: RESULTS.Failure,
|
|
3237
|
+
ErrorCode: "configuration_error",
|
|
3238
|
+
Message: `Failed to read login profiles: ${error.message}`,
|
|
3239
|
+
Instructions: "Check that ~/.uipath/profiles is readable, then try again.",
|
|
3240
|
+
Retry: "RetryWillNotFix"
|
|
3241
|
+
});
|
|
3242
|
+
context.exit(EXIT_CODES.Failure);
|
|
3243
|
+
}
|
|
3244
|
+
function reportNothingToDelete(activeProfile, skippedActive, context) {
|
|
3245
|
+
if (skippedActive) {
|
|
3246
|
+
rejectAsInvalid(context, `Profile '${activeProfile}' is the only named profile and '--profile ${activeProfile}' selects it.`, `Re-run without '--profile ${activeProfile}' to delete it.`);
|
|
3247
|
+
return;
|
|
3248
|
+
}
|
|
3249
|
+
OutputFormatter.error({
|
|
3250
|
+
Result: RESULTS.ConfigError,
|
|
3251
|
+
ErrorCode: "not_found",
|
|
3252
|
+
Message: "No named profiles to delete.",
|
|
3253
|
+
Instructions: "Run 'uip login --profile <name>' to create a named profile.",
|
|
3254
|
+
Retry: "RetryWillNotFix"
|
|
3255
|
+
});
|
|
3256
|
+
context.exit(EXIT_CODES.ConfigError);
|
|
3257
|
+
}
|
|
3258
|
+
async function deleteEach(targets) {
|
|
3259
|
+
const results = [];
|
|
3260
|
+
for (const name of targets) {
|
|
3261
|
+
const [deleteError, removedPath] = await catchError(deleteAuthProfileAsync(name));
|
|
3262
|
+
if (deleteError) {
|
|
3263
|
+
results.push({
|
|
3264
|
+
Name: name,
|
|
3265
|
+
Status: "failed",
|
|
3266
|
+
Error: deleteError.message
|
|
3267
|
+
});
|
|
3268
|
+
continue;
|
|
3269
|
+
}
|
|
3270
|
+
results.push(removedPath === undefined ? {
|
|
3271
|
+
Name: name,
|
|
3272
|
+
Status: "already-gone",
|
|
3273
|
+
Reason: "removed before this run reached it"
|
|
3274
|
+
} : { Name: name, Status: "deleted" });
|
|
3275
|
+
}
|
|
3276
|
+
return results;
|
|
3277
|
+
}
|
|
3278
|
+
async function deleteAll(options, context) {
|
|
3279
|
+
const [listError, names] = await catchError(listAuthProfileNamesAsync());
|
|
3280
|
+
if (listError) {
|
|
3281
|
+
reportUnreadableProfiles(listError, context);
|
|
3282
|
+
return;
|
|
3283
|
+
}
|
|
3284
|
+
const activeProfile = getActiveAuthProfile();
|
|
3285
|
+
const named = names ?? [];
|
|
3286
|
+
const targets = named.filter((name) => name !== activeProfile);
|
|
3287
|
+
const skippedActive = activeProfile !== undefined && named.includes(activeProfile);
|
|
3288
|
+
if (targets.length === 0) {
|
|
3289
|
+
reportNothingToDelete(activeProfile, skippedActive, context);
|
|
3290
|
+
return;
|
|
3291
|
+
}
|
|
3292
|
+
if (!requireConfirmation(options, `delete ${targets.length} profile(s) and their stored credentials`)) {
|
|
3293
|
+
return;
|
|
3294
|
+
}
|
|
3295
|
+
const results = await deleteEach(targets);
|
|
3296
|
+
if (skippedActive && activeProfile !== undefined) {
|
|
3297
|
+
results.push({
|
|
3298
|
+
Name: activeProfile,
|
|
3299
|
+
Status: "skipped",
|
|
3300
|
+
Reason: "selected by --profile"
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
OutputFormatter.success({
|
|
3304
|
+
Result: RESULTS.Success,
|
|
3305
|
+
Code: "DeleteResult",
|
|
3306
|
+
Data: results
|
|
3307
|
+
});
|
|
3308
|
+
if (results.some((result) => result.Status === "failed")) {
|
|
3309
|
+
context.exit(EXIT_CODES.Failure);
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
// src/commands/profiles/list.ts
|
|
3314
|
+
var PROFILES_LIST_EXAMPLES = [
|
|
3315
|
+
{
|
|
3316
|
+
Description: "List every login profile",
|
|
3317
|
+
Command: "uip login profiles list",
|
|
3318
|
+
Output: {
|
|
3319
|
+
Code: "ProfileList",
|
|
3320
|
+
Data: [
|
|
3321
|
+
{
|
|
3322
|
+
Name: "default",
|
|
3323
|
+
Active: true,
|
|
3324
|
+
OrganizationName: "acme",
|
|
3325
|
+
TenantName: "DefaultTenant",
|
|
3326
|
+
Status: "Logged in"
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
Name: "staging",
|
|
3330
|
+
Active: false,
|
|
3331
|
+
OrganizationName: "acme-staging",
|
|
3332
|
+
TenantName: "QA",
|
|
3333
|
+
Status: "Expired"
|
|
3334
|
+
}
|
|
3335
|
+
]
|
|
3336
|
+
}
|
|
3337
|
+
},
|
|
3338
|
+
{
|
|
3339
|
+
Description: "List profiles with the credentials file path and expiry",
|
|
3340
|
+
Command: "uip login profiles list --all-fields",
|
|
3341
|
+
Output: {
|
|
3342
|
+
Code: "ProfileList",
|
|
3343
|
+
Data: [
|
|
3344
|
+
{
|
|
3345
|
+
Name: "staging",
|
|
3346
|
+
Active: false,
|
|
3347
|
+
OrganizationName: "acme-staging",
|
|
3348
|
+
TenantName: "QA",
|
|
3349
|
+
Url: "https://cloud.uipath.com/acme-staging",
|
|
3350
|
+
Status: "Expired",
|
|
3351
|
+
ExpiresAt: "2026-09-03T10:15:00.000Z",
|
|
3352
|
+
Path: "/home/alice/.uipath/profiles/staging/.auth"
|
|
3353
|
+
}
|
|
3354
|
+
]
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
];
|
|
3358
|
+
var EMPTY_CELL = "-";
|
|
3359
|
+
function toRow(profile, allFields) {
|
|
3360
|
+
return {
|
|
3361
|
+
Name: profile.name,
|
|
3362
|
+
Active: profile.active,
|
|
3363
|
+
OrganizationName: profile.organizationName ?? EMPTY_CELL,
|
|
3364
|
+
TenantName: profile.tenantName ?? EMPTY_CELL,
|
|
3365
|
+
Status: profile.status,
|
|
3366
|
+
...allFields ? {
|
|
3367
|
+
Url: profile.url ?? EMPTY_CELL,
|
|
3368
|
+
ExpiresAt: profile.expiresAt ?? EMPTY_CELL,
|
|
3369
|
+
Path: profile.path ?? EMPTY_CELL
|
|
3370
|
+
} : {}
|
|
3371
|
+
};
|
|
3372
|
+
}
|
|
3373
|
+
function registerListCommand(profilesCommand, context) {
|
|
3374
|
+
profilesCommand.command("list").description("List login profiles").option("--all-fields", "Include the authority URL, token expiry, and credentials file path").examples(PROFILES_LIST_EXAMPLES).trackedAction(context, async (options) => {
|
|
3375
|
+
const [error, profiles] = await catchError(describeAuthProfilesAsync());
|
|
3376
|
+
if (error) {
|
|
3377
|
+
OutputFormatter.error({
|
|
3378
|
+
Result: RESULTS.Failure,
|
|
3379
|
+
ErrorCode: "configuration_error",
|
|
3380
|
+
Message: `Failed to read login profiles: ${error.message}`,
|
|
3381
|
+
Instructions: "Check that ~/.uipath/profiles is readable, then run 'uip login profiles list' again.",
|
|
3382
|
+
Retry: "RetryWillNotFix"
|
|
3383
|
+
});
|
|
3384
|
+
context.exit(1);
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
OutputFormatter.success({
|
|
3388
|
+
Result: RESULTS.Success,
|
|
3389
|
+
Code: "ProfileList",
|
|
3390
|
+
Data: profiles.map((profile) => toRow(profile, options.allFields === true))
|
|
3391
|
+
}, {
|
|
3392
|
+
tableRowStyle: (row) => row.Status === "Logged in" ? undefined : "red"
|
|
3393
|
+
});
|
|
3394
|
+
});
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3397
|
+
// src/commands/profiles.ts
|
|
3398
|
+
function registerProfilesCommand(loginCommand, context) {
|
|
3399
|
+
const profilesCommand = loginCommand.command("profiles").description("Manage login profiles");
|
|
3400
|
+
registerListCommand(profilesCommand, context);
|
|
3401
|
+
registerDeleteCommand(profilesCommand, context);
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3110
3404
|
// src/commands/login.ts
|
|
3111
3405
|
function resolveCallbackTimeoutOverrideMs() {
|
|
3112
3406
|
const raw = process.env.UIPATH_CLI_AUTH_CALLBACK_TIMEOUT_MS?.trim();
|
|
@@ -3588,6 +3882,10 @@ function registerLoginCommand(program, context) {
|
|
|
3588
3882
|
return;
|
|
3589
3883
|
}
|
|
3590
3884
|
const authFlow = clientAssertion ? "federated_credentials" : clientSecret ? "client_credentials" : "authorization_code";
|
|
3885
|
+
if (authFlow === "authorization_code" && canPrompt()) {
|
|
3886
|
+
getOutputSink().writeErr(`${COPYRIGHT_NOTICE}
|
|
3887
|
+
`);
|
|
3888
|
+
}
|
|
3591
3889
|
const noBrowser = options.browser === false || process.env.UIPATH_CLI_NO_BROWSER === "true";
|
|
3592
3890
|
if (options.organization && (clientSecret || clientAssertion)) {
|
|
3593
3891
|
logger.warn(clientSecret ? "--organization is ignored when using client credentials; the organization is fixed by the client-id." : "--organization is ignored for federated login; the organization is fixed by the client-id.");
|
|
@@ -3813,6 +4111,7 @@ Open this URL in a browser to sign in:
|
|
|
3813
4111
|
}, (options) => ({
|
|
3814
4112
|
loginValidityMinutes: options.loginValidity
|
|
3815
4113
|
}));
|
|
4114
|
+
registerProfilesCommand(loginCommand, context);
|
|
3816
4115
|
const tenantCommand = loginCommand.command("tenant").description("Manage tenants");
|
|
3817
4116
|
tenantCommand.command("list").description("List all available tenants").option("-f, --file <folder>", "Path to credentials folder").examples(LOGIN_TENANT_LIST_EXAMPLES).trackedAction(context, async (options) => {
|
|
3818
4117
|
if (rejectProfileFileConflict(context, options.file)) {
|
|
@@ -4091,7 +4390,7 @@ function registerLogoutCommand(program, context) {
|
|
|
4091
4390
|
function registerMcpCommand(program) {
|
|
4092
4391
|
const mcpCommand = program.command("mcp").description("Model Context Protocol (MCP) server");
|
|
4093
4392
|
mcpCommand.command("serve").description("Start the MCP server (stdio transport)").trackedAction(processContext, async () => {
|
|
4094
|
-
const { startMcpServer } = await import("./server-
|
|
4393
|
+
const { startMcpServer } = await import("./server-z7wh3gfs.js");
|
|
4095
4394
|
await startMcpServer(program);
|
|
4096
4395
|
});
|
|
4097
4396
|
}
|
|
@@ -4903,6 +5202,7 @@ async function loadCatalogOrReport(options) {
|
|
|
4903
5202
|
Result: RESULTS.Failure,
|
|
4904
5203
|
Message: `Failed to load skills catalog: ${error.message}`,
|
|
4905
5204
|
Instructions: details.instructions,
|
|
5205
|
+
ErrorCode: details.errorCode,
|
|
4906
5206
|
Retry: details.retry
|
|
4907
5207
|
});
|
|
4908
5208
|
processContext.exit(1);
|
|
@@ -5063,6 +5363,7 @@ function registerInstallCommand(skillsCommand) {
|
|
|
5063
5363
|
Result: RESULTS.Failure,
|
|
5064
5364
|
Message: message,
|
|
5065
5365
|
Instructions: details.instructions,
|
|
5366
|
+
ErrorCode: details.errorCode,
|
|
5066
5367
|
Retry: details.retry
|
|
5067
5368
|
});
|
|
5068
5369
|
processContext.exit(1);
|
|
@@ -5155,7 +5456,9 @@ async function resolveAgents(options, isLocal, isDefaultSource) {
|
|
|
5155
5456
|
OutputFormatter.error({
|
|
5156
5457
|
Result: RESULTS.Failure,
|
|
5157
5458
|
Message: "No agent specified and prompting is disabled.",
|
|
5158
|
-
Instructions: `Pass --agent <agent> (one of: ${ALL_AGENTS.join(", ")}), or re-run with --interactive to select
|
|
5459
|
+
Instructions: `Pass --agent <agent> (one of: ${ALL_AGENTS.join(", ")}), or re-run with --interactive to select.`,
|
|
5460
|
+
ErrorCode: "invalid_argument",
|
|
5461
|
+
Retry: "RetryWillNotFix"
|
|
5159
5462
|
});
|
|
5160
5463
|
processContext.exit(1);
|
|
5161
5464
|
return HANDLED;
|
|
@@ -5355,6 +5658,7 @@ function registerUpdateCommand(skillsCommand) {
|
|
|
5355
5658
|
Result: RESULTS.Failure,
|
|
5356
5659
|
Message: `Failed to update skills: ${err.message}`,
|
|
5357
5660
|
Instructions: details.instructions,
|
|
5661
|
+
ErrorCode: details.errorCode,
|
|
5358
5662
|
Retry: details.retry
|
|
5359
5663
|
});
|
|
5360
5664
|
processContext.exit(EXIT_CODES.Failure);
|
|
@@ -5545,7 +5849,7 @@ var TOOLS_LIST_EXAMPLES = [
|
|
|
5545
5849
|
}
|
|
5546
5850
|
}
|
|
5547
5851
|
];
|
|
5548
|
-
function
|
|
5852
|
+
function registerListCommand2(toolsCommand, state) {
|
|
5549
5853
|
toolsCommand.command("list").description("List installed tools").examples(TOOLS_LIST_EXAMPLES).trackedAction(processContext, async () => {
|
|
5550
5854
|
const cliVersionPrefix = state.getCliVersionPrefix();
|
|
5551
5855
|
const data = getInstalledTools(state).map((tool) => ({
|
|
@@ -5846,7 +6150,7 @@ function registerUpdateCommand2(toolsCommand, _context, state) {
|
|
|
5846
6150
|
// src/commands/tools.ts
|
|
5847
6151
|
function registerToolsCommand(program, context, state) {
|
|
5848
6152
|
const toolsCommand = program.command("tools").description("Manage CLI tools");
|
|
5849
|
-
|
|
6153
|
+
registerListCommand2(toolsCommand, state);
|
|
5850
6154
|
registerUpdateCommand2(toolsCommand, context, state);
|
|
5851
6155
|
registerSearchCommand(toolsCommand, context);
|
|
5852
6156
|
registerInstallCommand2(toolsCommand, context, state);
|
|
@@ -6476,7 +6780,7 @@ async function resolveUpdateLocation(state, context) {
|
|
|
6476
6780
|
return location;
|
|
6477
6781
|
}
|
|
6478
6782
|
async function runUpdateEngine(state, location, context, target) {
|
|
6479
|
-
const { runUpdate: runUpdate2 } = await import("./updateService-
|
|
6783
|
+
const { runUpdate: runUpdate2 } = await import("./updateService-n7hftkkv.js");
|
|
6480
6784
|
const spinner = await startSpinner(formatUpdateStartMessage(target));
|
|
6481
6785
|
if (!spinner) {
|
|
6482
6786
|
writeSyncStatus(context, formatUpdateStartMessage(target));
|
|
@@ -6991,7 +7295,6 @@ async function autoInstallToolIfNeeded(args, program, toolManager, context) {
|
|
|
6991
7295
|
logger.debug(`Tool '${canonicalVerb}' not installed — attempting auto-install`);
|
|
6992
7296
|
}
|
|
6993
7297
|
await toolManager.ensureAvailable(canonicalVerb);
|
|
6994
|
-
return canonicalVerb;
|
|
6995
7298
|
}
|
|
6996
7299
|
|
|
6997
7300
|
// src/utils/registerToolCommands.ts
|
|
@@ -7097,7 +7400,7 @@ async function buildNodeProgram(context) {
|
|
|
7097
7400
|
if (shouldPopulateTelemetryInstallContext(context.args)) {
|
|
7098
7401
|
await populateTelemetryInstallContext();
|
|
7099
7402
|
}
|
|
7100
|
-
const { setActiveAuthProfile, setAuthFileConfig } = await import("./index-
|
|
7403
|
+
const { setActiveAuthProfile, setAuthFileConfig } = await import("./index-hgvsratt.js");
|
|
7101
7404
|
setActiveAuthProfile(profile);
|
|
7102
7405
|
const [configErr, config] = await catchError(loadConfigAsync());
|
|
7103
7406
|
if (configErr) {
|
|
@@ -7142,7 +7445,7 @@ async function buildNodeProgram(context) {
|
|
|
7142
7445
|
setPackagerFactoryProvider((verb) => toolManager.ensurePackagerFactory(verb));
|
|
7143
7446
|
setExecutorFactoryProvider((verb) => toolManager.ensureExecutorFactory(verb));
|
|
7144
7447
|
if (toolsDir) {
|
|
7145
|
-
const [autoInstallError
|
|
7448
|
+
const [autoInstallError] = await catchError(autoInstallToolIfNeeded(context.args, program, toolManager, context));
|
|
7146
7449
|
if (autoInstallError) {
|
|
7147
7450
|
OutputFormatter.error({
|
|
7148
7451
|
Result: RESULTS.Failure,
|
|
@@ -7155,17 +7458,6 @@ async function buildNodeProgram(context) {
|
|
|
7155
7458
|
return null;
|
|
7156
7459
|
}
|
|
7157
7460
|
discoveredTools = toolManager.getDiscoveredTools();
|
|
7158
|
-
if (autoInstalledVerb && !discoveredTools.some((t) => t.commandPrefix === autoInstalledVerb)) {
|
|
7159
|
-
OutputFormatter.error({
|
|
7160
|
-
Result: RESULTS.Failure,
|
|
7161
|
-
Message: `Tool '${autoInstalledVerb}' installed without error, but no tool answering ` + `'${autoInstalledVerb}' is discoverable under ${toolsDir}, so the command cannot run.`,
|
|
7162
|
-
Instructions: `Run 'uip tools install ${autoInstalledVerb}@<version>' and read the package manager's output — it names the location it installed to and any version it filtered or refused.`,
|
|
7163
|
-
ErrorCode: "not_found",
|
|
7164
|
-
Retry: "RetryWillNotFix"
|
|
7165
|
-
});
|
|
7166
|
-
context.exit(1);
|
|
7167
|
-
return null;
|
|
7168
|
-
}
|
|
7169
7461
|
}
|
|
7170
7462
|
registerToolCommands(program, discoveredTools, context);
|
|
7171
7463
|
registerCompletionCommand(program, discoveredTools, context);
|
|
@@ -7210,4 +7502,4 @@ async function runNodeInvocation(context) {
|
|
|
7210
7502
|
|
|
7211
7503
|
export { runNode };
|
|
7212
7504
|
|
|
7213
|
-
//# debugId=
|
|
7505
|
+
//# debugId=A4A81EB58587B10164756E2164756E21
|