@uipath/rpa-tool 1.202.1 → 1.203.0
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/executor-tool.js +476 -44
- package/dist/index.js +298 -21
- package/dist/packager-tool.js +283 -23
- package/dist/tool.js +1131 -144
- package/package.json +18 -17
package/dist/tool.js
CHANGED
|
@@ -2162,6 +2162,7 @@ __export(exports_dist2, {
|
|
|
2162
2162
|
resolveEnvFilePathAsync: () => resolveEnvFilePathAsync,
|
|
2163
2163
|
resolveEnvFileLocationAsync: () => resolveEnvFileLocationAsync,
|
|
2164
2164
|
resolveAuthProfileFilePath: () => resolveAuthProfileFilePath,
|
|
2165
|
+
resolveAuthProfileDirPath: () => resolveAuthProfileDirPath,
|
|
2165
2166
|
registerRobotClientLoader: () => registerRobotClientLoader,
|
|
2166
2167
|
refreshTokenFingerprint: () => refreshTokenFingerprint,
|
|
2167
2168
|
refreshAccessToken: () => refreshAccessToken,
|
|
@@ -2173,6 +2174,7 @@ __export(exports_dist2, {
|
|
|
2173
2174
|
logout: () => logout,
|
|
2174
2175
|
loadRefreshBreaker: () => loadRefreshBreaker,
|
|
2175
2176
|
loadEnvFileAsync: () => loadEnvFileAsync,
|
|
2177
|
+
listAuthProfileNamesAsync: () => listAuthProfileNamesAsync,
|
|
2176
2178
|
isTokenRefreshOAuthFailure: () => isTokenRefreshOAuthFailure,
|
|
2177
2179
|
isTenantSelectionError: () => isTenantSelectionError,
|
|
2178
2180
|
isRobotAuthEnforced: () => isRobotAuthEnforced,
|
|
@@ -2183,16 +2185,20 @@ __export(exports_dist2, {
|
|
|
2183
2185
|
interactiveLogin: () => interactiveLogin,
|
|
2184
2186
|
getLoginStatusWithDeps: () => getLoginStatusWithDeps,
|
|
2185
2187
|
getLoginStatusAsync: () => getLoginStatusAsync,
|
|
2188
|
+
getAuthProfilesRootPath: () => getAuthProfilesRootPath,
|
|
2186
2189
|
getAuthEnv: () => getAuthEnv,
|
|
2187
2190
|
getAuthContext: () => getAuthContext,
|
|
2188
2191
|
getActiveAuthProfileFilePath: () => getActiveAuthProfileFilePath,
|
|
2189
2192
|
getActiveAuthProfile: () => getActiveAuthProfile,
|
|
2190
2193
|
fetchTenantsAndOrganizations: () => fetchTenantsAndOrganizations,
|
|
2191
2194
|
federatedCredentialsLogin: () => federatedCredentialsLogin,
|
|
2195
|
+
describeAuthProfilesAsync: () => describeAuthProfilesAsync,
|
|
2196
|
+
deleteAuthProfileAsync: () => deleteAuthProfileAsync,
|
|
2192
2197
|
clientCredentialsLogin: () => clientCredentialsLogin,
|
|
2193
2198
|
clearRefreshBreaker: () => clearRefreshBreaker,
|
|
2194
2199
|
clearActiveAuthProfile: () => clearActiveAuthProfile,
|
|
2195
2200
|
authenticate: () => authenticate,
|
|
2201
|
+
authProfileExistsAsync: () => authProfileExistsAsync,
|
|
2196
2202
|
TokenRefreshOAuthError: () => TokenRefreshOAuthError,
|
|
2197
2203
|
TenantSelectionRequiredError: () => TenantSelectionRequiredError,
|
|
2198
2204
|
TenantSelectionError: () => TenantSelectionError,
|
|
@@ -2976,6 +2982,63 @@ function getActiveAuthProfileFilePath() {
|
|
|
2976
2982
|
const profile = getActiveAuthProfile();
|
|
2977
2983
|
return profile ? resolveAuthProfileFilePath(profile) : undefined;
|
|
2978
2984
|
}
|
|
2985
|
+
function getAuthProfilesRootPath() {
|
|
2986
|
+
const fs72 = getFileSystem2();
|
|
2987
|
+
return fs72.path.join(fs72.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR);
|
|
2988
|
+
}
|
|
2989
|
+
function resolveAuthProfileDirPath(profile) {
|
|
2990
|
+
const normalized = normalizeAuthProfileName(profile);
|
|
2991
|
+
if (normalized === undefined) {
|
|
2992
|
+
throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile directory.`);
|
|
2993
|
+
}
|
|
2994
|
+
const fs72 = getFileSystem2();
|
|
2995
|
+
return fs72.path.join(getAuthProfilesRootPath(), normalized);
|
|
2996
|
+
}
|
|
2997
|
+
async function listAuthProfileNamesAsync() {
|
|
2998
|
+
const fs72 = getFileSystem2();
|
|
2999
|
+
const root = getAuthProfilesRootPath();
|
|
3000
|
+
if (!await fs72.exists(root)) {
|
|
3001
|
+
return [];
|
|
3002
|
+
}
|
|
3003
|
+
const [readError, entries] = await catchError2(fs72.readdir(root));
|
|
3004
|
+
if (readError || !entries) {
|
|
3005
|
+
return [];
|
|
3006
|
+
}
|
|
3007
|
+
const names = [];
|
|
3008
|
+
for (const entry of entries) {
|
|
3009
|
+
if (!PROFILE_NAME_RE.test(entry) || entry === DEFAULT_AUTH_PROFILE) {
|
|
3010
|
+
continue;
|
|
3011
|
+
}
|
|
3012
|
+
const stats = await fs72.stat(fs72.path.join(root, entry));
|
|
3013
|
+
if (stats?.isDirectory()) {
|
|
3014
|
+
names.push(entry);
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
return names.sort((a, b) => a.localeCompare(b));
|
|
3018
|
+
}
|
|
3019
|
+
async function authProfileExistsAsync(profile) {
|
|
3020
|
+
const fs72 = getFileSystem2();
|
|
3021
|
+
const [pathError, dir] = catchError2(() => resolveAuthProfileDirPath(profile));
|
|
3022
|
+
if (pathError || dir === undefined) {
|
|
3023
|
+
return false;
|
|
3024
|
+
}
|
|
3025
|
+
const stats = await fs72.stat(dir);
|
|
3026
|
+
return stats?.isDirectory() === true;
|
|
3027
|
+
}
|
|
3028
|
+
async function deleteAuthProfileAsync(profile) {
|
|
3029
|
+
const dir = resolveAuthProfileDirPath(profile);
|
|
3030
|
+
const fs72 = getFileSystem2();
|
|
3031
|
+
const relativeToRoot = fs72.path.relative(getAuthProfilesRootPath(), dir);
|
|
3032
|
+
if (relativeToRoot === "" || relativeToRoot.startsWith("..") || fs72.path.isAbsolute(relativeToRoot)) {
|
|
3033
|
+
throw new AuthProfileValidationError(`Refusing to delete "${profile}": resolved path escapes the profiles directory.`);
|
|
3034
|
+
}
|
|
3035
|
+
const stats = await fs72.stat(dir);
|
|
3036
|
+
if (stats?.isDirectory() !== true) {
|
|
3037
|
+
return;
|
|
3038
|
+
}
|
|
3039
|
+
await fs72.rm(dir);
|
|
3040
|
+
return dir;
|
|
3041
|
+
}
|
|
2979
3042
|
async function refreshTokenFingerprint(refreshToken) {
|
|
2980
3043
|
const bytes = new TextEncoder().encode(refreshToken);
|
|
2981
3044
|
if (globalThis.crypto?.subtle) {
|
|
@@ -3423,6 +3486,56 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
3423
3486
|
function errorMessage(error) {
|
|
3424
3487
|
return error instanceof Error ? error.message : String(error);
|
|
3425
3488
|
}
|
|
3489
|
+
function statusFromToken(accessToken) {
|
|
3490
|
+
if (!accessToken) {
|
|
3491
|
+
return { status: "Not logged in" };
|
|
3492
|
+
}
|
|
3493
|
+
const expiration = getTokenExpiration(accessToken);
|
|
3494
|
+
if (expiration === undefined) {
|
|
3495
|
+
return { status: "Logged in" };
|
|
3496
|
+
}
|
|
3497
|
+
return {
|
|
3498
|
+
status: expiration.getTime() <= Date.now() ? "Expired" : "Logged in",
|
|
3499
|
+
expiresAt: expiration.toISOString()
|
|
3500
|
+
};
|
|
3501
|
+
}
|
|
3502
|
+
async function describeAuthProfileAsync(name, filePath, active) {
|
|
3503
|
+
const base = {
|
|
3504
|
+
name,
|
|
3505
|
+
active,
|
|
3506
|
+
...filePath ? { path: filePath } : {}
|
|
3507
|
+
};
|
|
3508
|
+
if (!filePath) {
|
|
3509
|
+
return { ...base, status: "Not logged in" };
|
|
3510
|
+
}
|
|
3511
|
+
const fs72 = getFileSystem2();
|
|
3512
|
+
const [readError, content] = await catchError2(fs72.readFile(filePath, "utf-8"));
|
|
3513
|
+
if (readError) {
|
|
3514
|
+
return { ...base, status: "Unreadable" };
|
|
3515
|
+
}
|
|
3516
|
+
if (content === null || content === undefined) {
|
|
3517
|
+
return { ...base, status: "Not logged in" };
|
|
3518
|
+
}
|
|
3519
|
+
const values = parseEnvContent(content);
|
|
3520
|
+
return {
|
|
3521
|
+
...base,
|
|
3522
|
+
...values[ORGANIZATION_NAME_KEY] ? { organizationName: values[ORGANIZATION_NAME_KEY] } : {},
|
|
3523
|
+
...values[TENANT_NAME_KEY] ? { tenantName: values[TENANT_NAME_KEY] } : {},
|
|
3524
|
+
...values[URL_KEY] ? { url: values[URL_KEY] } : {},
|
|
3525
|
+
...statusFromToken(values[ACCESS_TOKEN_KEY])
|
|
3526
|
+
};
|
|
3527
|
+
}
|
|
3528
|
+
async function describeAuthProfilesAsync() {
|
|
3529
|
+
const activeProfile = getActiveAuthProfile();
|
|
3530
|
+
const [defaultPathError, defaultLocation] = await catchError2(resolveEnvFilePathAsync());
|
|
3531
|
+
const rows = [
|
|
3532
|
+
await describeAuthProfileAsync(DEFAULT_AUTH_PROFILE, defaultPathError ? undefined : defaultLocation?.absolutePath, activeProfile === undefined)
|
|
3533
|
+
];
|
|
3534
|
+
for (const name of await listAuthProfileNamesAsync()) {
|
|
3535
|
+
rows.push(await describeAuthProfileAsync(name, resolveAuthProfileFilePath(name), activeProfile === name));
|
|
3536
|
+
}
|
|
3537
|
+
return rows;
|
|
3538
|
+
}
|
|
3426
3539
|
function isTenantSelectionError(error) {
|
|
3427
3540
|
if (!(error instanceof Object) || !("code" in error)) {
|
|
3428
3541
|
return false;
|
|
@@ -4674,16 +4787,7 @@ var __defProp3, __returnValue3 = (v) => v, __export3 = (target, all) => {
|
|
|
4674
4787
|
absolutePath: undefined,
|
|
4675
4788
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
4676
4789
|
};
|
|
4677
|
-
},
|
|
4678
|
-
const fs72 = getFileSystem2();
|
|
4679
|
-
const absolutePath = fs72.path.isAbsolute(envPath) ? envPath : fs72.path.join(fs72.env.cwd(), envPath);
|
|
4680
|
-
if (!await fs72.exists(absolutePath)) {
|
|
4681
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
4682
|
-
}
|
|
4683
|
-
const content = await fs72.readFile(absolutePath, "utf-8");
|
|
4684
|
-
if (content === null) {
|
|
4685
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
4686
|
-
}
|
|
4790
|
+
}, parseEnvContent = (content) => {
|
|
4687
4791
|
const env = {};
|
|
4688
4792
|
for (const line of content.split(`
|
|
4689
4793
|
`)) {
|
|
@@ -4703,6 +4807,17 @@ var __defProp3, __returnValue3 = (v) => v, __export3 = (target, all) => {
|
|
|
4703
4807
|
env[key] = value;
|
|
4704
4808
|
}
|
|
4705
4809
|
return env;
|
|
4810
|
+
}, loadEnvFileAsync = async ({ envPath }) => {
|
|
4811
|
+
const fs72 = getFileSystem2();
|
|
4812
|
+
const absolutePath = fs72.path.isAbsolute(envPath) ? envPath : fs72.path.join(fs72.env.cwd(), envPath);
|
|
4813
|
+
if (!await fs72.exists(absolutePath)) {
|
|
4814
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
4815
|
+
}
|
|
4816
|
+
const content = await fs72.readFile(absolutePath, "utf-8");
|
|
4817
|
+
if (content === null) {
|
|
4818
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
4819
|
+
}
|
|
4820
|
+
return parseEnvContent(content);
|
|
4706
4821
|
}, saveEnvFileAsync = async ({
|
|
4707
4822
|
envPath,
|
|
4708
4823
|
data,
|
|
@@ -4869,7 +4984,7 @@ var __defProp3, __returnValue3 = (v) => v, __export3 = (target, all) => {
|
|
|
4869
4984
|
authEnv.UIPATH_TENANT_NAME = status.tenantName;
|
|
4870
4985
|
}
|
|
4871
4986
|
return { authEnv, loginStatus: status };
|
|
4872
|
-
}, requestClientCredentialsToken = async ({
|
|
4987
|
+
}, ORGANIZATION_NAME_KEY = "UIPATH_ORGANIZATION_NAME", TENANT_NAME_KEY = "UIPATH_TENANT_NAME", URL_KEY = "UIPATH_URL", ACCESS_TOKEN_KEY = "UIPATH_ACCESS_TOKEN", requestClientCredentialsToken = async ({
|
|
4873
4988
|
tokenEndpoint,
|
|
4874
4989
|
baseUrl,
|
|
4875
4990
|
params,
|
|
@@ -5768,6 +5883,7 @@ The identity server that issued this token is not the one you pointed --authorit
|
|
|
5768
5883
|
CredentialSource2["Robot"] = "robot";
|
|
5769
5884
|
CredentialSource2["EnvironmentVariables"] = "env-vars";
|
|
5770
5885
|
})(CredentialSource ||= {});
|
|
5886
|
+
init_src();
|
|
5771
5887
|
ClientCredentialsAuthenticationError = class ClientCredentialsAuthenticationError extends Error {
|
|
5772
5888
|
status;
|
|
5773
5889
|
constructor(message, status) {
|
|
@@ -17081,6 +17197,9 @@ class ZipService {
|
|
|
17081
17197
|
});
|
|
17082
17198
|
return zipData;
|
|
17083
17199
|
}
|
|
17200
|
+
compressEntries(entries) {
|
|
17201
|
+
return zipSync(entries, { level: 6 });
|
|
17202
|
+
}
|
|
17084
17203
|
}
|
|
17085
17204
|
function isPluralForm(value) {
|
|
17086
17205
|
return typeof value === "object" && value !== null && "other" in value;
|
|
@@ -23881,28 +24000,32 @@ function isPlainRecord2(value) {
|
|
|
23881
24000
|
const prototype = Object.getPrototypeOf(value);
|
|
23882
24001
|
return prototype === Object.prototype || prototype === null;
|
|
23883
24002
|
}
|
|
23884
|
-
function
|
|
24003
|
+
function splitPagedEnvelope2(value) {
|
|
23885
24004
|
if (Array.isArray(value) || !isPlainRecord2(value))
|
|
23886
24005
|
return null;
|
|
23887
|
-
const entries = Object.
|
|
24006
|
+
const entries = Object.entries(value);
|
|
23888
24007
|
if (entries.length === 0)
|
|
23889
24008
|
return null;
|
|
23890
|
-
let
|
|
23891
|
-
|
|
23892
|
-
for (const entry of entries) {
|
|
24009
|
+
let found = null;
|
|
24010
|
+
const meta = Object.create(null);
|
|
24011
|
+
for (const [key, entry] of entries) {
|
|
23893
24012
|
if (Array.isArray(entry)) {
|
|
23894
|
-
if (
|
|
24013
|
+
if (found !== null)
|
|
23895
24014
|
return null;
|
|
23896
|
-
|
|
24015
|
+
found = { key, rows: entry };
|
|
23897
24016
|
} else if (entry !== null && typeof entry === "object") {
|
|
23898
24017
|
return null;
|
|
23899
24018
|
} else {
|
|
23900
|
-
|
|
24019
|
+
meta[key] = entry;
|
|
23901
24020
|
}
|
|
23902
24021
|
}
|
|
23903
|
-
if (
|
|
24022
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
23904
24023
|
return null;
|
|
23905
|
-
return
|
|
24024
|
+
return { ...found, meta };
|
|
24025
|
+
}
|
|
24026
|
+
function extractPagedRows2(value) {
|
|
24027
|
+
const paged = splitPagedEnvelope2(value);
|
|
24028
|
+
return paged === null ? null : paged.rows;
|
|
23906
24029
|
}
|
|
23907
24030
|
function toLowerCamelCaseKey2(key) {
|
|
23908
24031
|
if (!key)
|
|
@@ -24006,6 +24129,9 @@ function printOutput2(data, format = "json", logFn, asciiSafe = false, tableRowS
|
|
|
24006
24129
|
}
|
|
24007
24130
|
break;
|
|
24008
24131
|
}
|
|
24132
|
+
case "markdown":
|
|
24133
|
+
logFn(renderMarkdown2(data));
|
|
24134
|
+
break;
|
|
24009
24135
|
default: {
|
|
24010
24136
|
const hasData = "Data" in data && data.Data != null;
|
|
24011
24137
|
const pagedRows = hasData ? extractPagedRows2(data.Data) : null;
|
|
@@ -24030,6 +24156,9 @@ function logOutput2(data, format = "json", tableRowStyle) {
|
|
|
24030
24156
|
printOutput2(data, format, (msg) => sink.writeOut(`${msg}
|
|
24031
24157
|
`), needsAsciiSafeJson2(sink), styleFn);
|
|
24032
24158
|
}
|
|
24159
|
+
function isPlumbingKey2(key) {
|
|
24160
|
+
return PLUMBING_KEYS2.has(key.toLowerCase());
|
|
24161
|
+
}
|
|
24033
24162
|
function cellToString2(val) {
|
|
24034
24163
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
24035
24164
|
}
|
|
@@ -24045,7 +24174,7 @@ function wrapText2(text, width) {
|
|
|
24045
24174
|
function printTable2(data, logFn, externalLogValue, tableRowStyle) {
|
|
24046
24175
|
if (data.length === 0)
|
|
24047
24176
|
return;
|
|
24048
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
24177
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey2(key));
|
|
24049
24178
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString2(item[key]).length)));
|
|
24050
24179
|
const header = keys.map((key, i2) => key.padEnd(maxWidths[i2])).join(" | ");
|
|
24051
24180
|
logFn(header);
|
|
@@ -24066,7 +24195,7 @@ function isNonEmptyPlainObject2(value) {
|
|
|
24066
24195
|
return isPlainRecord2(value) && Object.keys(value).length > 0;
|
|
24067
24196
|
}
|
|
24068
24197
|
function printVerticalTable2(data, logFn = console.log, externalLogValue) {
|
|
24069
|
-
const keys = Object.keys(data).filter((key) => !
|
|
24198
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey2(key));
|
|
24070
24199
|
if (keys.length === 0)
|
|
24071
24200
|
return;
|
|
24072
24201
|
const isBlockValue = (value) => isPlainObjectArray2(value) || isNonEmptyPlainObject2(value);
|
|
@@ -24097,7 +24226,7 @@ function printVerticalTable2(data, logFn = console.log, externalLogValue) {
|
|
|
24097
24226
|
function printResizableTable2(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
24098
24227
|
if (data.length === 0)
|
|
24099
24228
|
return;
|
|
24100
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
24229
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey2(key));
|
|
24101
24230
|
if (keys.length === 0)
|
|
24102
24231
|
return;
|
|
24103
24232
|
if (!process.stdout.isTTY) {
|
|
@@ -24171,6 +24300,213 @@ function printResizableTable2(data, logFn = console.log, externalLogValue, avail
|
|
|
24171
24300
|
logFn(`Log: ${externalLogValue}`);
|
|
24172
24301
|
}
|
|
24173
24302
|
}
|
|
24303
|
+
function markdownHeading2(depth) {
|
|
24304
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
24305
|
+
}
|
|
24306
|
+
function fencedBlock2(text) {
|
|
24307
|
+
const first = text.trimStart()[0];
|
|
24308
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
24309
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN2), (match) => match[0].length));
|
|
24310
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
24311
|
+
return `${fence}${language}
|
|
24312
|
+
${text}
|
|
24313
|
+
${fence}`;
|
|
24314
|
+
}
|
|
24315
|
+
function markdownCell2(value) {
|
|
24316
|
+
const text = value instanceof Date ? value.toISOString() : cellToString2(value);
|
|
24317
|
+
return text.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
|
|
24318
|
+
}
|
|
24319
|
+
function markdownLabel2(key) {
|
|
24320
|
+
return key.replace(/\s*\n\s*/g, " ").replace(/[\\`*|]/g, "\\$&");
|
|
24321
|
+
}
|
|
24322
|
+
function withoutPlumbing2(record) {
|
|
24323
|
+
const kept = Object.create(null);
|
|
24324
|
+
for (const [key, value] of Object.entries(record)) {
|
|
24325
|
+
if (!isPlumbingKey2(key))
|
|
24326
|
+
kept[key] = value;
|
|
24327
|
+
}
|
|
24328
|
+
return kept;
|
|
24329
|
+
}
|
|
24330
|
+
function rowsWithoutPlumbing2(rows) {
|
|
24331
|
+
return rows.map((row) => isPlainRecord2(row) ? withoutPlumbing2(row) : row);
|
|
24332
|
+
}
|
|
24333
|
+
function markdownTable2(rows) {
|
|
24334
|
+
const columns = [];
|
|
24335
|
+
const seen = new Set;
|
|
24336
|
+
for (const row of rows) {
|
|
24337
|
+
for (const key of Object.keys(row)) {
|
|
24338
|
+
if (!seen.has(key)) {
|
|
24339
|
+
seen.add(key);
|
|
24340
|
+
columns.push(key);
|
|
24341
|
+
}
|
|
24342
|
+
}
|
|
24343
|
+
}
|
|
24344
|
+
if (columns.length === 0)
|
|
24345
|
+
return null;
|
|
24346
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell2(row[key])));
|
|
24347
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL2))) {
|
|
24348
|
+
return null;
|
|
24349
|
+
}
|
|
24350
|
+
return [
|
|
24351
|
+
`| ${columns.map(markdownLabel2).join(" | ")} |`,
|
|
24352
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
24353
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
24354
|
+
].join(`
|
|
24355
|
+
`);
|
|
24356
|
+
}
|
|
24357
|
+
function extractMessageSequence2(rows) {
|
|
24358
|
+
const messages = [];
|
|
24359
|
+
for (const row of rows) {
|
|
24360
|
+
const message = extractSingleMessage2(row);
|
|
24361
|
+
if (message === null)
|
|
24362
|
+
return null;
|
|
24363
|
+
messages.push(message);
|
|
24364
|
+
}
|
|
24365
|
+
return messages.join(`
|
|
24366
|
+
|
|
24367
|
+
`);
|
|
24368
|
+
}
|
|
24369
|
+
function markdownRows2(rows, depth) {
|
|
24370
|
+
if (rows.length === 0)
|
|
24371
|
+
return "(none)";
|
|
24372
|
+
if (!isPlainObjectArray2(rows)) {
|
|
24373
|
+
return rows.map((item) => `- ${markdownCell2(item)}`).join(`
|
|
24374
|
+
`);
|
|
24375
|
+
}
|
|
24376
|
+
const prose = extractMessageSequence2(rows);
|
|
24377
|
+
if (prose !== null)
|
|
24378
|
+
return prose;
|
|
24379
|
+
const table = markdownTable2(rows);
|
|
24380
|
+
if (table !== null)
|
|
24381
|
+
return table;
|
|
24382
|
+
if (depth >= MARKDOWN_MAX_DEPTH2) {
|
|
24383
|
+
return fencedBlock2(JSON.stringify(rows, null, 2));
|
|
24384
|
+
}
|
|
24385
|
+
return rows.map((row, index) => [
|
|
24386
|
+
`${markdownHeading2(depth)} ${index + 1}`,
|
|
24387
|
+
markdownObject2(row, depth + 1)
|
|
24388
|
+
].join(`
|
|
24389
|
+
|
|
24390
|
+
`)).join(`
|
|
24391
|
+
|
|
24392
|
+
`);
|
|
24393
|
+
}
|
|
24394
|
+
function markdownObject2(obj, depth) {
|
|
24395
|
+
const scalars = [];
|
|
24396
|
+
const blocks = [];
|
|
24397
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
24398
|
+
if (value === undefined)
|
|
24399
|
+
continue;
|
|
24400
|
+
const label = markdownLabel2(key);
|
|
24401
|
+
if (Array.isArray(value)) {
|
|
24402
|
+
blocks.push(`${markdownHeading2(depth)} ${label}
|
|
24403
|
+
|
|
24404
|
+
${markdownRows2(value, depth + 1)}`);
|
|
24405
|
+
} else if (isNonEmptyPlainObject2(value)) {
|
|
24406
|
+
const nested = depth < MARKDOWN_MAX_DEPTH2 ? markdownObject2(value, depth + 1) : fencedBlock2(JSON.stringify(value, null, 2));
|
|
24407
|
+
if (nested !== "") {
|
|
24408
|
+
blocks.push(`${markdownHeading2(depth)} ${label}
|
|
24409
|
+
|
|
24410
|
+
${nested}`);
|
|
24411
|
+
}
|
|
24412
|
+
} else if (typeof value === "string" && value.includes(`
|
|
24413
|
+
`)) {
|
|
24414
|
+
blocks.push(`**${label}:**
|
|
24415
|
+
|
|
24416
|
+
${fencedBlock2(value)}`);
|
|
24417
|
+
} else {
|
|
24418
|
+
scalars.push(`**${label}:** ${markdownCell2(value)}`);
|
|
24419
|
+
}
|
|
24420
|
+
}
|
|
24421
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
24422
|
+
`)] : [];
|
|
24423
|
+
sections.push(...blocks);
|
|
24424
|
+
return sections.join(`
|
|
24425
|
+
|
|
24426
|
+
`);
|
|
24427
|
+
}
|
|
24428
|
+
function extractSingleMessage2(payload) {
|
|
24429
|
+
if (!isPlainRecord2(payload))
|
|
24430
|
+
return null;
|
|
24431
|
+
const keys = Object.keys(payload);
|
|
24432
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
24433
|
+
return null;
|
|
24434
|
+
const value = payload[keys[0]];
|
|
24435
|
+
return typeof value === "string" ? value : null;
|
|
24436
|
+
}
|
|
24437
|
+
function markdownPayload2(payload) {
|
|
24438
|
+
const message = extractSingleMessage2(payload);
|
|
24439
|
+
if (message !== null)
|
|
24440
|
+
return message;
|
|
24441
|
+
if (Array.isArray(payload)) {
|
|
24442
|
+
return markdownRows2(rowsWithoutPlumbing2(payload), 0);
|
|
24443
|
+
}
|
|
24444
|
+
const visible = withoutPlumbing2(payload);
|
|
24445
|
+
const paged = splitPagedEnvelope2(visible);
|
|
24446
|
+
if (paged !== null) {
|
|
24447
|
+
const meta = markdownObject2(paged.meta, 0);
|
|
24448
|
+
const rows = `${markdownHeading2(0)} ${markdownLabel2(paged.key)}
|
|
24449
|
+
|
|
24450
|
+
${markdownRows2(rowsWithoutPlumbing2(paged.rows), 1)}`;
|
|
24451
|
+
return meta === "" ? rows : `${meta}
|
|
24452
|
+
|
|
24453
|
+
${rows}`;
|
|
24454
|
+
}
|
|
24455
|
+
return markdownObject2(visible, 0);
|
|
24456
|
+
}
|
|
24457
|
+
function isPaginationWorthShowing2(value) {
|
|
24458
|
+
if (typeof value !== "object" || value === null)
|
|
24459
|
+
return false;
|
|
24460
|
+
const page = value;
|
|
24461
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
24462
|
+
}
|
|
24463
|
+
function markdownEnvelopeNotes2(data) {
|
|
24464
|
+
const envelope = data;
|
|
24465
|
+
const notes = [];
|
|
24466
|
+
const warning = envelope.Warning;
|
|
24467
|
+
if (typeof warning === "string" && warning !== "") {
|
|
24468
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
24469
|
+
}
|
|
24470
|
+
const instructions = envelope.Instructions;
|
|
24471
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
24472
|
+
notes.push(`> ${instructions}`);
|
|
24473
|
+
}
|
|
24474
|
+
const pagination = envelope.Pagination;
|
|
24475
|
+
if (isPaginationWorthShowing2(pagination)) {
|
|
24476
|
+
const body = markdownObject2(pagination, 1);
|
|
24477
|
+
if (body !== "") {
|
|
24478
|
+
notes.push(`${markdownHeading2(0)} Pagination
|
|
24479
|
+
|
|
24480
|
+
${body}`);
|
|
24481
|
+
}
|
|
24482
|
+
}
|
|
24483
|
+
const log = envelope.Log;
|
|
24484
|
+
if (typeof log === "string" && log !== "") {
|
|
24485
|
+
notes.push(`**Log:** ${log}`);
|
|
24486
|
+
}
|
|
24487
|
+
return notes;
|
|
24488
|
+
}
|
|
24489
|
+
function renderMarkdown2(data) {
|
|
24490
|
+
if (data.Result !== RESULTS2.Success) {
|
|
24491
|
+
const failure = data;
|
|
24492
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
24493
|
+
if (failure.Data != null) {
|
|
24494
|
+
sections.push(markdownPayload2(failure.Data));
|
|
24495
|
+
}
|
|
24496
|
+
if (failure.Instructions) {
|
|
24497
|
+
sections.push(`> ${failure.Instructions}`);
|
|
24498
|
+
}
|
|
24499
|
+
return sections.filter((section) => section !== "").join(`
|
|
24500
|
+
|
|
24501
|
+
`);
|
|
24502
|
+
}
|
|
24503
|
+
if (!("Data" in data) || data.Data == null) {
|
|
24504
|
+
return markdownObject2(withoutPlumbing2(data), 0);
|
|
24505
|
+
}
|
|
24506
|
+
return [markdownPayload2(data.Data), ...markdownEnvelopeNotes2(data)].filter((section) => section !== "").join(`
|
|
24507
|
+
|
|
24508
|
+
`);
|
|
24509
|
+
}
|
|
24174
24510
|
function toYaml2(data) {
|
|
24175
24511
|
const codec = getYamlCodec2();
|
|
24176
24512
|
if (!codec) {
|
|
@@ -25044,15 +25380,11 @@ class ProjectLoader {
|
|
|
25044
25380
|
}));
|
|
25045
25381
|
}
|
|
25046
25382
|
const declaredName = projectJson?.name?.trim() || projectData.Name;
|
|
25047
|
-
const declaredDescription = projectJson?.description?.trim() || projectData.Description?.trim() || undefined;
|
|
25048
|
-
const declaredAuthor = projectJson?.author?.trim() || projectData.Author?.trim() || undefined;
|
|
25049
25383
|
return {
|
|
25050
25384
|
type: projectType,
|
|
25051
25385
|
name: declaredName || Path.basename(projectPath),
|
|
25052
25386
|
projectPath,
|
|
25053
|
-
projectFilePath
|
|
25054
|
-
description: declaredDescription,
|
|
25055
|
-
author: declaredAuthor
|
|
25387
|
+
projectFilePath
|
|
25056
25388
|
};
|
|
25057
25389
|
}
|
|
25058
25390
|
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
@@ -25081,9 +25413,7 @@ class ProjectPackOptionsBuilder {
|
|
|
25081
25413
|
const packageId = !parameters.package.id || parameters.package.id.trim() === "" ? project.name : parameters.package.id;
|
|
25082
25414
|
const packageInfo = {
|
|
25083
25415
|
...parameters.package,
|
|
25084
|
-
id: this.packService.sanitizePackageId(packageId)
|
|
25085
|
-
description: parameters.package.description || project.description,
|
|
25086
|
-
author: parameters.package.author || project.author
|
|
25416
|
+
id: this.packService.sanitizePackageId(packageId)
|
|
25087
25417
|
};
|
|
25088
25418
|
return {
|
|
25089
25419
|
projectPath: project.projectPath,
|
|
@@ -28146,7 +28476,7 @@ var de_default, en2, es_default, es_MX_default, fr_default, ja_default, ko_defau
|
|
|
28146
28476
|
return TreeInterpreter_default2.runtime.getCustomFunctions();
|
|
28147
28477
|
}, clearCustomFunctions2 = () => {
|
|
28148
28478
|
TreeInterpreter_default2.runtime.clearCustomFunctions();
|
|
28149
|
-
}, TreeInterpreter22, jmespath2, init_dist5, require_error3, require_argument3, require_help3, require_option3, require_suggestSimilar3, require_command3, require_commander3, LOCK_HEARTBEAT_MS4 = 5000, LOCK_STALE_MS4 = 15000, LOCK_MAX_WAIT_MS4 = 20000, LOCK_MAX_HOLD_MS4 = 60000, LOCK_RETRY_MIN_MS4 = 100, LOCK_RETRY_JITTER_MS4 = 200, fsInstance4, getFileSystem3 = () => fsInstance4, PSEUDONYM_DOMAIN2 = "uipath-cli/telemetry/pseudonym/v1:", PSEUDONYM_HEX_LENGTH2 = 32, SHA256_K2, SHA256_INITIAL_STATE2, cachedSha256Hex2, PREFIX2 = "@uipath/common/", _g2, suppliedValuesSlot2, MIN_SCRUBBABLE_LENGTH2 = 4, REDACTED3 = "[REDACTED]", MAX_VALUE_LENGTH2 = 280, MAX_STACK_LENGTH2 = 4096, MAX_SCAN_LENGTH2, SENSITIVE_NAME_TOKENS2, SENSITIVE_KEY_PREFIXES2, UUID_PATTERN2, EMAIL_PATTERN2, JWT_PATTERN2, LONG_TOKEN_PATTERN2, PADDED_BASE64_PATTERN2, BASE64_WITH_PLUS_PATTERN2, USER_HOME_PATTERN2, UNC_PATH_PATTERN2, HOST_PORT_PATTERN2, SOURCE_FILE_EXTENSIONS2, URL_PATTERN2, QUOTED_LITERAL_MAX_SPAN2 = 200, QUOTED_LITERAL_PATTERN2, JSON_BODY_PATTERN2, COLLAPSED_BODY2 = "{…}", COLLAPSED_BODY_MARKER2 = "\x01body\x01", MAX_BODY_NESTING2 = 8, TRAILING_PROSE_PUNCT2, HTTP_DEPENDENCY_NAME2, MESSAGE_NAMES2, MAX_SERIALIZED_LENGTH2 = 500, TRUNCATION_SUFFIX2 = "…(truncated)", REDACTED22 = "[REDACTED]", NETWORK_ERROR_CODES2, TLS_ERROR_CODES3, TLS_INSTRUCTIONS2, NETWORK_INSTRUCTIONS2, LOCAL_PERMISSION_ERROR_CODES2, storageSingleton2, sinkSlot2, outputStorage2, CONSOLE_FALLBACK2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger2, yamlSlot2, jmespathSlot2, formatSlot2, formatExplicitSlot2, helpRequestedSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT", TRACEPARENT_PATTERN2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", SESSION_ID_MAX_LENGTH2 = 64, RANDOM_SESSION_ID_LENGTH2 = 32, TELEMETRY_SESSION_SOURCE_PROPERTY2 = "session_id_source", CONTROL_CHARACTERS2, INHERITED_SESSION_SOURCES2, telemetrySessionSlot2, telemetryOperationIdSlot2, telemetryPropsSlot2, TIMINGS_ENV_VAR2 = "UIP_TIMINGS", storageSlot2, stateSlot2, rootStartedSlot2, longLivedHostSlot2, storage2, slot2, providerSlot2, sidecarEntrySlot2, MAX_SPOOL_AGE_MS2, telemetryInstanceSlot2, DEFAULT_AI_CONNECTION_STRING2, _localTelemetryInstance2, telemetry2, ANSI_STYLES2, ANSI_RESET2 = "\x1B[0m", CLI_ERROR_CODES2, RETRY_HINTS2, CLI_ERROR_CODE_VALUES2, RETRY_HINT_VALUES2, RESULTS2, EXIT_CODES2, NESTED_INDENT2 = " ", FilterEvaluationError2, FilterImplicitLimitError2, LOCAL_PERMISSION_TEXT_PATTERN2, OutputFormatter2, import__3, program3, createCommand3, createArgument3, createOption3, CommanderError3, InvalidArgumentError3, InvalidOptionArgumentError3, Command3, Argument3, Option3, Help3, examplesByCommand2, previewSlot2, LEGACY_SKILL_NAMESPACE2 = "uipath:", MAX_SKILL_NAME_LENGTH2 = 80, SKILL_NAME_PATTERN2, SKILL_ATTRIBUTION2, KNOWN_SKILL_NAMES2, COMMAND_ATTRIBUTION2, TELEMETRY_COMMAND_ROOT2 = "uip", COMMAND_TOKEN_PATTERN2, MAX_COMMAND_TOKEN_LENGTH2 = 32, GUID_TOKEN2, UNKNOWN_TOKEN2 = "<unknown>", requestContextSlot2, pollSignalSlot2, TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.", TELEMETRY_ARG_VALUE_WITHHELD2 = "<provided>", TELEMETRY_ARG_VALUE_DEFAULTED2 = "<default>", COMPLETER_SYMBOL2, guardInstalledSlot2, savedOriginalsSlot2, DEFAULT_AUTH_TIMEOUT_MS3, RESERVED_SQL_KEYWORDS_LOWER2, RESERVED_FIELD_NAMES_LOWER2, RESERVED_KEYWORDS_LOWER2, HOST_GLOBAL_OPTIONS_WITH_VALUE2, HOST_GLOBAL_FLAGS2, VALUE_OPTIONS2, BOOLEAN_FLAGS2, modeSlot2, interactiveFlagSlot2, PollOutcome2, REASON_BY_OUTCOME2, TERMINAL_STATUSES2, FAILURE_STATUSES2, ScreenLogger2, sdkUserAgentHostToken2, shippedKeysSlot2, factorySlot2, globalLogHandler = (logMessage) => {
|
|
28479
|
+
}, TreeInterpreter22, jmespath2, init_dist5, require_error3, require_argument3, require_help3, require_option3, require_suggestSimilar3, require_command3, require_commander3, LOCK_HEARTBEAT_MS4 = 5000, LOCK_STALE_MS4 = 15000, LOCK_MAX_WAIT_MS4 = 20000, LOCK_MAX_HOLD_MS4 = 60000, LOCK_RETRY_MIN_MS4 = 100, LOCK_RETRY_JITTER_MS4 = 200, fsInstance4, getFileSystem3 = () => fsInstance4, PSEUDONYM_DOMAIN2 = "uipath-cli/telemetry/pseudonym/v1:", PSEUDONYM_HEX_LENGTH2 = 32, SHA256_K2, SHA256_INITIAL_STATE2, cachedSha256Hex2, PREFIX2 = "@uipath/common/", _g2, suppliedValuesSlot2, MIN_SCRUBBABLE_LENGTH2 = 4, REDACTED3 = "[REDACTED]", MAX_VALUE_LENGTH2 = 280, MAX_STACK_LENGTH2 = 4096, MAX_SCAN_LENGTH2, SENSITIVE_NAME_TOKENS2, SENSITIVE_KEY_PREFIXES2, UUID_PATTERN2, EMAIL_PATTERN2, JWT_PATTERN2, LONG_TOKEN_PATTERN2, PADDED_BASE64_PATTERN2, BASE64_WITH_PLUS_PATTERN2, USER_HOME_PATTERN2, UNC_PATH_PATTERN2, HOST_PORT_PATTERN2, SOURCE_FILE_EXTENSIONS2, URL_PATTERN2, QUOTED_LITERAL_MAX_SPAN2 = 200, QUOTED_LITERAL_PATTERN2, JSON_BODY_PATTERN2, COLLAPSED_BODY2 = "{…}", COLLAPSED_BODY_MARKER2 = "\x01body\x01", MAX_BODY_NESTING2 = 8, TRAILING_PROSE_PUNCT2, HTTP_DEPENDENCY_NAME2, MESSAGE_NAMES2, MAX_SERIALIZED_LENGTH2 = 500, TRUNCATION_SUFFIX2 = "…(truncated)", REDACTED22 = "[REDACTED]", NETWORK_ERROR_CODES2, TLS_ERROR_CODES3, TLS_INSTRUCTIONS2, NETWORK_INSTRUCTIONS2, LOCAL_PERMISSION_ERROR_CODES2, storageSingleton2, sinkSlot2, outputStorage2, CONSOLE_FALLBACK2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger2, yamlSlot2, jmespathSlot2, formatSlot2, formatExplicitSlot2, helpRequestedSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT", TRACEPARENT_PATTERN2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", SESSION_ID_MAX_LENGTH2 = 64, RANDOM_SESSION_ID_LENGTH2 = 32, TELEMETRY_SESSION_SOURCE_PROPERTY2 = "session_id_source", CONTROL_CHARACTERS2, INHERITED_SESSION_SOURCES2, telemetrySessionSlot2, telemetryOperationIdSlot2, telemetryPropsSlot2, TIMINGS_ENV_VAR2 = "UIP_TIMINGS", storageSlot2, stateSlot2, rootStartedSlot2, longLivedHostSlot2, storage2, slot2, providerSlot2, sidecarEntrySlot2, MAX_SPOOL_AGE_MS2, telemetryInstanceSlot2, DEFAULT_AI_CONNECTION_STRING2, _localTelemetryInstance2, telemetry2, ANSI_STYLES2, ANSI_RESET2 = "\x1B[0m", CLI_ERROR_CODES2, RETRY_HINTS2, CLI_ERROR_CODE_VALUES2, RETRY_HINT_VALUES2, RESULTS2, EXIT_CODES2, PLUMBING_KEYS2, NESTED_INDENT2 = " ", MARKDOWN_MAX_CELL2 = 200, MARKDOWN_MAX_DEPTH2 = 3, BACKTICK_RUN2, FilterEvaluationError2, FilterImplicitLimitError2, LOCAL_PERMISSION_TEXT_PATTERN2, OutputFormatter2, import__3, program3, createCommand3, createArgument3, createOption3, CommanderError3, InvalidArgumentError3, InvalidOptionArgumentError3, Command3, Argument3, Option3, Help3, examplesByCommand2, previewSlot2, LEGACY_SKILL_NAMESPACE2 = "uipath:", MAX_SKILL_NAME_LENGTH2 = 80, SKILL_NAME_PATTERN2, SKILL_ATTRIBUTION2, KNOWN_SKILL_NAMES2, COMMAND_ATTRIBUTION2, TELEMETRY_COMMAND_ROOT2 = "uip", COMMAND_TOKEN_PATTERN2, MAX_COMMAND_TOKEN_LENGTH2 = 32, GUID_TOKEN2, UNKNOWN_TOKEN2 = "<unknown>", requestContextSlot2, pollSignalSlot2, TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.", TELEMETRY_ARG_VALUE_WITHHELD2 = "<provided>", TELEMETRY_ARG_VALUE_DEFAULTED2 = "<default>", COMPLETER_SYMBOL2, guardInstalledSlot2, savedOriginalsSlot2, DEFAULT_AUTH_TIMEOUT_MS3, RESERVED_SQL_KEYWORDS_LOWER2, RESERVED_FIELD_NAMES_LOWER2, RESERVED_KEYWORDS_LOWER2, HOST_GLOBAL_OPTIONS_WITH_VALUE2, HOST_GLOBAL_FLAGS2, VALUE_OPTIONS2, BOOLEAN_FLAGS2, modeSlot2, interactiveFlagSlot2, PollOutcome2, REASON_BY_OUTCOME2, TERMINAL_STATUSES2, FAILURE_STATUSES2, ScreenLogger2, sdkUserAgentHostToken2, shippedKeysSlot2, factorySlot2, globalLogHandler = (logMessage) => {
|
|
28150
28480
|
const formattedMessage = logMessage.toFormattedString();
|
|
28151
28481
|
switch (logMessage.logLevel) {
|
|
28152
28482
|
case LogLevel2.Debug:
|
|
@@ -32447,6 +32777,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
32447
32777
|
ValidationError: 3,
|
|
32448
32778
|
TimeoutError: 4
|
|
32449
32779
|
};
|
|
32780
|
+
PLUMBING_KEYS2 = new Set(["code", "log"]);
|
|
32781
|
+
BACKTICK_RUN2 = /`+/g;
|
|
32450
32782
|
FilterEvaluationError2 = class FilterEvaluationError2 extends Error {
|
|
32451
32783
|
__brand = "FilterEvaluationError";
|
|
32452
32784
|
filter;
|
|
@@ -33148,7 +33480,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
33148
33480
|
package_default2 = {
|
|
33149
33481
|
name: "@uipath/project-packager",
|
|
33150
33482
|
license: "MIT",
|
|
33151
|
-
version: "1.
|
|
33483
|
+
version: "1.203.0-dev.8641",
|
|
33152
33484
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
33153
33485
|
type: "module",
|
|
33154
33486
|
main: "./dist/index.js",
|
|
@@ -33193,9 +33525,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
33193
33525
|
lint: "biome check ."
|
|
33194
33526
|
},
|
|
33195
33527
|
dependencies: {
|
|
33196
|
-
"@uipath/filesystem": "1.
|
|
33197
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
33198
|
-
"@uipath/common": "1.
|
|
33528
|
+
"@uipath/filesystem": "1.203.0-dev.8641",
|
|
33529
|
+
"@uipath/solutionpackager-tool-core": "1.203.0-dev.8641",
|
|
33530
|
+
"@uipath/common": "1.203.0-dev.8641"
|
|
33199
33531
|
},
|
|
33200
33532
|
peerDependencies: {
|
|
33201
33533
|
fflate: "^0.8.2"
|
|
@@ -33204,19 +33536,19 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
33204
33536
|
"@types/node": "^25.5.2",
|
|
33205
33537
|
"@uipath/resource-builder-tool": "2025.11.0-alpha4535-3530",
|
|
33206
33538
|
"@uipath/tool-agent": "^2.0.0",
|
|
33207
|
-
"@uipath/packager-tool-apiworkflow": "1.
|
|
33208
|
-
"@uipath/packager-tool-connector": "1.
|
|
33209
|
-
"@uipath/packager-tool-flow": "1.
|
|
33210
|
-
"@uipath/packager-tool-functions": "1.
|
|
33211
|
-
"@uipath/packager-tool-webapp": "1.
|
|
33212
|
-
"@uipath/packager-tool-workflowcompiler": "1.
|
|
33539
|
+
"@uipath/packager-tool-apiworkflow": "1.203.0-dev.8641",
|
|
33540
|
+
"@uipath/packager-tool-connector": "1.203.0-dev.8641",
|
|
33541
|
+
"@uipath/packager-tool-flow": "1.203.0-dev.8641",
|
|
33542
|
+
"@uipath/packager-tool-functions": "1.203.0-dev.8641",
|
|
33543
|
+
"@uipath/packager-tool-webapp": "1.203.0-dev.8641",
|
|
33544
|
+
"@uipath/packager-tool-workflowcompiler": "1.203.0-dev.8641",
|
|
33213
33545
|
"@vitest/coverage-v8": "^4.1.11",
|
|
33214
33546
|
jsdom: "^30.0.1",
|
|
33215
33547
|
typescript: "^7.0.2",
|
|
33216
33548
|
"vite-tsconfig-paths": "^6.1.1",
|
|
33217
33549
|
vitest: "^4.1.11"
|
|
33218
33550
|
},
|
|
33219
|
-
gitHead: "
|
|
33551
|
+
gitHead: "e33f25fbc6e1122496e305e40dc818983bed9dad"
|
|
33220
33552
|
};
|
|
33221
33553
|
SDK_USER_AGENT = `${package_default2.name.replace(/^@uipath\//, "")}/${package_default2.version}`;
|
|
33222
33554
|
OrchestratorResponseError = class OrchestratorResponseError extends Error {
|
|
@@ -42395,6 +42727,16 @@ function getOutputFormatExplicit() {
|
|
|
42395
42727
|
function getOutputFilter() {
|
|
42396
42728
|
return filterSlot.get();
|
|
42397
42729
|
}
|
|
42730
|
+
var OUTPUT_FORMATS = [
|
|
42731
|
+
"table",
|
|
42732
|
+
"json",
|
|
42733
|
+
"yaml",
|
|
42734
|
+
"plain",
|
|
42735
|
+
"markdown"
|
|
42736
|
+
];
|
|
42737
|
+
function isOutputFormat(value) {
|
|
42738
|
+
return OUTPUT_FORMATS.includes(value);
|
|
42739
|
+
}
|
|
42398
42740
|
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
42399
42741
|
var AUTH_ERROR_CODES = new Set([
|
|
42400
42742
|
"authentication_required",
|
|
@@ -43330,28 +43672,32 @@ function isPlainRecord(value) {
|
|
|
43330
43672
|
const prototype = Object.getPrototypeOf(value);
|
|
43331
43673
|
return prototype === Object.prototype || prototype === null;
|
|
43332
43674
|
}
|
|
43333
|
-
function
|
|
43675
|
+
function splitPagedEnvelope(value) {
|
|
43334
43676
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
43335
43677
|
return null;
|
|
43336
|
-
const entries = Object.
|
|
43678
|
+
const entries = Object.entries(value);
|
|
43337
43679
|
if (entries.length === 0)
|
|
43338
43680
|
return null;
|
|
43339
|
-
let
|
|
43340
|
-
|
|
43341
|
-
for (const entry of entries) {
|
|
43681
|
+
let found = null;
|
|
43682
|
+
const meta = Object.create(null);
|
|
43683
|
+
for (const [key, entry] of entries) {
|
|
43342
43684
|
if (Array.isArray(entry)) {
|
|
43343
|
-
if (
|
|
43685
|
+
if (found !== null)
|
|
43344
43686
|
return null;
|
|
43345
|
-
|
|
43687
|
+
found = { key, rows: entry };
|
|
43346
43688
|
} else if (entry !== null && typeof entry === "object") {
|
|
43347
43689
|
return null;
|
|
43348
43690
|
} else {
|
|
43349
|
-
|
|
43691
|
+
meta[key] = entry;
|
|
43350
43692
|
}
|
|
43351
43693
|
}
|
|
43352
|
-
if (
|
|
43694
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
43353
43695
|
return null;
|
|
43354
|
-
return
|
|
43696
|
+
return { ...found, meta };
|
|
43697
|
+
}
|
|
43698
|
+
function extractPagedRows(value) {
|
|
43699
|
+
const paged = splitPagedEnvelope(value);
|
|
43700
|
+
return paged === null ? null : paged.rows;
|
|
43355
43701
|
}
|
|
43356
43702
|
function toLowerCamelCaseKey(key) {
|
|
43357
43703
|
if (!key)
|
|
@@ -43455,6 +43801,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
43455
43801
|
}
|
|
43456
43802
|
break;
|
|
43457
43803
|
}
|
|
43804
|
+
case "markdown":
|
|
43805
|
+
logFn(renderMarkdown(data));
|
|
43806
|
+
break;
|
|
43458
43807
|
default: {
|
|
43459
43808
|
const hasData = "Data" in data && data.Data != null;
|
|
43460
43809
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -43479,6 +43828,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
43479
43828
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
43480
43829
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
43481
43830
|
}
|
|
43831
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
43832
|
+
function isPlumbingKey(key) {
|
|
43833
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
43834
|
+
}
|
|
43482
43835
|
function cellToString(val) {
|
|
43483
43836
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
43484
43837
|
}
|
|
@@ -43494,7 +43847,7 @@ function wrapText(text, width) {
|
|
|
43494
43847
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
43495
43848
|
if (data.length === 0)
|
|
43496
43849
|
return;
|
|
43497
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
43850
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
43498
43851
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
43499
43852
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
43500
43853
|
logFn(header);
|
|
@@ -43516,7 +43869,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
43516
43869
|
}
|
|
43517
43870
|
var NESTED_INDENT = " ";
|
|
43518
43871
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
43519
|
-
const keys = Object.keys(data).filter((key) => !
|
|
43872
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
43520
43873
|
if (keys.length === 0)
|
|
43521
43874
|
return;
|
|
43522
43875
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -43547,7 +43900,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
43547
43900
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
43548
43901
|
if (data.length === 0)
|
|
43549
43902
|
return;
|
|
43550
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
43903
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
43551
43904
|
if (keys.length === 0)
|
|
43552
43905
|
return;
|
|
43553
43906
|
if (!process.stdout.isTTY) {
|
|
@@ -43621,6 +43974,216 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
43621
43974
|
logFn(`Log: ${externalLogValue}`);
|
|
43622
43975
|
}
|
|
43623
43976
|
}
|
|
43977
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
43978
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
43979
|
+
function markdownHeading(depth) {
|
|
43980
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
43981
|
+
}
|
|
43982
|
+
var BACKTICK_RUN = /`+/g;
|
|
43983
|
+
function fencedBlock(text) {
|
|
43984
|
+
const first = text.trimStart()[0];
|
|
43985
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
43986
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
43987
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
43988
|
+
return `${fence}${language}
|
|
43989
|
+
${text}
|
|
43990
|
+
${fence}`;
|
|
43991
|
+
}
|
|
43992
|
+
function markdownCell(value) {
|
|
43993
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
43994
|
+
return text.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
|
|
43995
|
+
}
|
|
43996
|
+
function markdownLabel(key) {
|
|
43997
|
+
return key.replace(/\s*\n\s*/g, " ").replace(/[\\`*|]/g, "\\$&");
|
|
43998
|
+
}
|
|
43999
|
+
function withoutPlumbing(record) {
|
|
44000
|
+
const kept = Object.create(null);
|
|
44001
|
+
for (const [key, value] of Object.entries(record)) {
|
|
44002
|
+
if (!isPlumbingKey(key))
|
|
44003
|
+
kept[key] = value;
|
|
44004
|
+
}
|
|
44005
|
+
return kept;
|
|
44006
|
+
}
|
|
44007
|
+
function rowsWithoutPlumbing(rows) {
|
|
44008
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
44009
|
+
}
|
|
44010
|
+
function markdownTable(rows) {
|
|
44011
|
+
const columns = [];
|
|
44012
|
+
const seen = new Set;
|
|
44013
|
+
for (const row of rows) {
|
|
44014
|
+
for (const key of Object.keys(row)) {
|
|
44015
|
+
if (!seen.has(key)) {
|
|
44016
|
+
seen.add(key);
|
|
44017
|
+
columns.push(key);
|
|
44018
|
+
}
|
|
44019
|
+
}
|
|
44020
|
+
}
|
|
44021
|
+
if (columns.length === 0)
|
|
44022
|
+
return null;
|
|
44023
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
44024
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
44025
|
+
return null;
|
|
44026
|
+
}
|
|
44027
|
+
return [
|
|
44028
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
44029
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
44030
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
44031
|
+
].join(`
|
|
44032
|
+
`);
|
|
44033
|
+
}
|
|
44034
|
+
function extractMessageSequence(rows) {
|
|
44035
|
+
const messages = [];
|
|
44036
|
+
for (const row of rows) {
|
|
44037
|
+
const message = extractSingleMessage(row);
|
|
44038
|
+
if (message === null)
|
|
44039
|
+
return null;
|
|
44040
|
+
messages.push(message);
|
|
44041
|
+
}
|
|
44042
|
+
return messages.join(`
|
|
44043
|
+
|
|
44044
|
+
`);
|
|
44045
|
+
}
|
|
44046
|
+
function markdownRows(rows, depth) {
|
|
44047
|
+
if (rows.length === 0)
|
|
44048
|
+
return "(none)";
|
|
44049
|
+
if (!isPlainObjectArray(rows)) {
|
|
44050
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
44051
|
+
`);
|
|
44052
|
+
}
|
|
44053
|
+
const prose = extractMessageSequence(rows);
|
|
44054
|
+
if (prose !== null)
|
|
44055
|
+
return prose;
|
|
44056
|
+
const table = markdownTable(rows);
|
|
44057
|
+
if (table !== null)
|
|
44058
|
+
return table;
|
|
44059
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
44060
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
44061
|
+
}
|
|
44062
|
+
return rows.map((row, index) => [
|
|
44063
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
44064
|
+
markdownObject(row, depth + 1)
|
|
44065
|
+
].join(`
|
|
44066
|
+
|
|
44067
|
+
`)).join(`
|
|
44068
|
+
|
|
44069
|
+
`);
|
|
44070
|
+
}
|
|
44071
|
+
function markdownObject(obj, depth) {
|
|
44072
|
+
const scalars = [];
|
|
44073
|
+
const blocks = [];
|
|
44074
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
44075
|
+
if (value === undefined)
|
|
44076
|
+
continue;
|
|
44077
|
+
const label = markdownLabel(key);
|
|
44078
|
+
if (Array.isArray(value)) {
|
|
44079
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
44080
|
+
|
|
44081
|
+
${markdownRows(value, depth + 1)}`);
|
|
44082
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
44083
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
44084
|
+
if (nested !== "") {
|
|
44085
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
44086
|
+
|
|
44087
|
+
${nested}`);
|
|
44088
|
+
}
|
|
44089
|
+
} else if (typeof value === "string" && value.includes(`
|
|
44090
|
+
`)) {
|
|
44091
|
+
blocks.push(`**${label}:**
|
|
44092
|
+
|
|
44093
|
+
${fencedBlock(value)}`);
|
|
44094
|
+
} else {
|
|
44095
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
44096
|
+
}
|
|
44097
|
+
}
|
|
44098
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
44099
|
+
`)] : [];
|
|
44100
|
+
sections.push(...blocks);
|
|
44101
|
+
return sections.join(`
|
|
44102
|
+
|
|
44103
|
+
`);
|
|
44104
|
+
}
|
|
44105
|
+
function extractSingleMessage(payload) {
|
|
44106
|
+
if (!isPlainRecord(payload))
|
|
44107
|
+
return null;
|
|
44108
|
+
const keys = Object.keys(payload);
|
|
44109
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
44110
|
+
return null;
|
|
44111
|
+
const value = payload[keys[0]];
|
|
44112
|
+
return typeof value === "string" ? value : null;
|
|
44113
|
+
}
|
|
44114
|
+
function markdownPayload(payload) {
|
|
44115
|
+
const message = extractSingleMessage(payload);
|
|
44116
|
+
if (message !== null)
|
|
44117
|
+
return message;
|
|
44118
|
+
if (Array.isArray(payload)) {
|
|
44119
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
44120
|
+
}
|
|
44121
|
+
const visible = withoutPlumbing(payload);
|
|
44122
|
+
const paged = splitPagedEnvelope(visible);
|
|
44123
|
+
if (paged !== null) {
|
|
44124
|
+
const meta = markdownObject(paged.meta, 0);
|
|
44125
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
44126
|
+
|
|
44127
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
44128
|
+
return meta === "" ? rows : `${meta}
|
|
44129
|
+
|
|
44130
|
+
${rows}`;
|
|
44131
|
+
}
|
|
44132
|
+
return markdownObject(visible, 0);
|
|
44133
|
+
}
|
|
44134
|
+
function isPaginationWorthShowing(value) {
|
|
44135
|
+
if (typeof value !== "object" || value === null)
|
|
44136
|
+
return false;
|
|
44137
|
+
const page = value;
|
|
44138
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
44139
|
+
}
|
|
44140
|
+
function markdownEnvelopeNotes(data) {
|
|
44141
|
+
const envelope = data;
|
|
44142
|
+
const notes = [];
|
|
44143
|
+
const warning = envelope.Warning;
|
|
44144
|
+
if (typeof warning === "string" && warning !== "") {
|
|
44145
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
44146
|
+
}
|
|
44147
|
+
const instructions = envelope.Instructions;
|
|
44148
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
44149
|
+
notes.push(`> ${instructions}`);
|
|
44150
|
+
}
|
|
44151
|
+
const pagination = envelope.Pagination;
|
|
44152
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
44153
|
+
const body = markdownObject(pagination, 1);
|
|
44154
|
+
if (body !== "") {
|
|
44155
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
44156
|
+
|
|
44157
|
+
${body}`);
|
|
44158
|
+
}
|
|
44159
|
+
}
|
|
44160
|
+
const log = envelope.Log;
|
|
44161
|
+
if (typeof log === "string" && log !== "") {
|
|
44162
|
+
notes.push(`**Log:** ${log}`);
|
|
44163
|
+
}
|
|
44164
|
+
return notes;
|
|
44165
|
+
}
|
|
44166
|
+
function renderMarkdown(data) {
|
|
44167
|
+
if (data.Result !== RESULTS.Success) {
|
|
44168
|
+
const failure = data;
|
|
44169
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
44170
|
+
if (failure.Data != null) {
|
|
44171
|
+
sections.push(markdownPayload(failure.Data));
|
|
44172
|
+
}
|
|
44173
|
+
if (failure.Instructions) {
|
|
44174
|
+
sections.push(`> ${failure.Instructions}`);
|
|
44175
|
+
}
|
|
44176
|
+
return sections.filter((section) => section !== "").join(`
|
|
44177
|
+
|
|
44178
|
+
`);
|
|
44179
|
+
}
|
|
44180
|
+
if (!("Data" in data) || data.Data == null) {
|
|
44181
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
44182
|
+
}
|
|
44183
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
44184
|
+
|
|
44185
|
+
`);
|
|
44186
|
+
}
|
|
43624
44187
|
function toYaml(data) {
|
|
43625
44188
|
const codec = getYamlCodec();
|
|
43626
44189
|
if (!codec) {
|
|
@@ -44559,7 +45122,7 @@ var {
|
|
|
44559
45122
|
// package.json
|
|
44560
45123
|
var package_default = {
|
|
44561
45124
|
name: "@uipath/rpa-tool",
|
|
44562
|
-
version: "1.
|
|
45125
|
+
version: "1.203.0",
|
|
44563
45126
|
description: "Tool for creating and managing UiPath RPA projects",
|
|
44564
45127
|
keywords: [
|
|
44565
45128
|
"uipcli-tool",
|
|
@@ -44598,24 +45161,25 @@ var package_default = {
|
|
|
44598
45161
|
package: "bun run build && bun pm pack",
|
|
44599
45162
|
"generate-docs": "bun run scripts/generate-docs.ts",
|
|
44600
45163
|
"bump-uipath-alpha": "bun run scripts/bump-uipath-alpha.ts",
|
|
45164
|
+
"bump-uipath-release": "bun run scripts/bump-uipath-release.ts",
|
|
44601
45165
|
"bump-uipath-stable": "bun run scripts/bump-uipath-stable.ts",
|
|
44602
45166
|
test: "bun test",
|
|
44603
|
-
lint: "bunx @biomejs/biome check src",
|
|
44604
|
-
"lint:fix": "bunx @biomejs/biome check --write src"
|
|
45167
|
+
lint: "bunx @biomejs/biome check src scripts",
|
|
45168
|
+
"lint:fix": "bunx @biomejs/biome check --write src scripts"
|
|
44605
45169
|
},
|
|
44606
45170
|
devDependencies: {
|
|
44607
45171
|
"@biomejs/biome": "^2.4.12",
|
|
44608
45172
|
"@types/bun": "^1.3.12",
|
|
44609
45173
|
"@types/node": "^25.6.0",
|
|
44610
|
-
"@uipath/auth": "1.
|
|
44611
|
-
"@uipath/common": "1.
|
|
45174
|
+
"@uipath/auth": "1.203.0-dev.8641",
|
|
45175
|
+
"@uipath/common": "1.203.0-dev.8641",
|
|
44612
45176
|
"@uipath/coreipc": "2.5.2",
|
|
44613
|
-
"@uipath/filesystem": "1.
|
|
44614
|
-
"@uipath/packager-tool-workflowcompiler": "1.
|
|
44615
|
-
"@uipath/project-executor": "1.
|
|
44616
|
-
"@uipath/project-packager": "1.
|
|
44617
|
-
"@uipath/solution-sdk": "1.
|
|
44618
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
45177
|
+
"@uipath/filesystem": "1.203.0-dev.8641",
|
|
45178
|
+
"@uipath/packager-tool-workflowcompiler": "1.203.0-dev.8641",
|
|
45179
|
+
"@uipath/project-executor": "1.203.0-dev.8641",
|
|
45180
|
+
"@uipath/project-packager": "1.203.0-dev.8641",
|
|
45181
|
+
"@uipath/solution-sdk": "1.203.0-dev.8641",
|
|
45182
|
+
"@uipath/solutionpackager-tool-core": "1.203.0-dev.8641",
|
|
44619
45183
|
"camelcase-keys": "^10.0.2",
|
|
44620
45184
|
commander: "^14.0.3",
|
|
44621
45185
|
fflate: "^0.8.2",
|
|
@@ -44672,6 +45236,7 @@ function applyHelpBanner(cmd, text, scope = "subtree") {
|
|
|
44672
45236
|
}
|
|
44673
45237
|
|
|
44674
45238
|
// src/cli/wrapper-options.ts
|
|
45239
|
+
var FORMAT_OPTION_DESCRIPTION = `Output format (${OUTPUT_FORMATS.join(", ")})`;
|
|
44675
45240
|
var WRAPPER_OPTIONS = [
|
|
44676
45241
|
{
|
|
44677
45242
|
flags: "--project-dir <path>",
|
|
@@ -44688,7 +45253,12 @@ var WRAPPER_OPTIONS = [
|
|
|
44688
45253
|
{ flags: "--timeout <seconds>", description: "Timeout in seconds" },
|
|
44689
45254
|
{ flags: "--verbose", description: "Enable verbose logging" },
|
|
44690
45255
|
{ flags: "--use-studio", description: "Deprecated", hidden: true },
|
|
44691
|
-
{
|
|
45256
|
+
{
|
|
45257
|
+
flags: "--format <format>",
|
|
45258
|
+
description: FORMAT_OPTION_DESCRIPTION,
|
|
45259
|
+
hidden: true,
|
|
45260
|
+
choices: OUTPUT_FORMATS
|
|
45261
|
+
}
|
|
44692
45262
|
];
|
|
44693
45263
|
function longFlagOf(def) {
|
|
44694
45264
|
return def.flags.split(" ")[0];
|
|
@@ -44698,11 +45268,19 @@ function attachWrapperOptions(cmd) {
|
|
|
44698
45268
|
if (cmd.options.some((o) => o.long === longFlagOf(def)))
|
|
44699
45269
|
continue;
|
|
44700
45270
|
const opt = new Option2(def.flags, def.description);
|
|
45271
|
+
if (def.choices)
|
|
45272
|
+
opt.choices([...def.choices]);
|
|
44701
45273
|
if (def.hidden)
|
|
44702
45274
|
opt.hideHelp();
|
|
44703
45275
|
cmd.addOption(opt);
|
|
44704
45276
|
}
|
|
44705
45277
|
}
|
|
45278
|
+
function attachWrapperOptionsRecursively(root) {
|
|
45279
|
+
for (const sub2 of root.commands) {
|
|
45280
|
+
attachWrapperOptions(sub2);
|
|
45281
|
+
attachWrapperOptionsRecursively(sub2);
|
|
45282
|
+
}
|
|
45283
|
+
}
|
|
44706
45284
|
|
|
44707
45285
|
// src/commander-polyfill.ts
|
|
44708
45286
|
if (!Command2.prototype.trackedAction) {
|
|
@@ -45213,6 +45791,7 @@ var INTEROP_MANIFEST = "interop-manifest.json";
|
|
|
45213
45791
|
var STUDIO_EXE = "UiPath.Studio.exe";
|
|
45214
45792
|
var STUDIO_SUBDIR = "Studio";
|
|
45215
45793
|
var ROBOT_SUBDIR = "Robot";
|
|
45794
|
+
var HELM_DOTNET_MAJOR = 10;
|
|
45216
45795
|
var HELM_EXE = process.platform === "win32" ? "UiPath.Studio.Helm.exe" : "UiPath.Studio.Helm";
|
|
45217
45796
|
function normalizePath(path4) {
|
|
45218
45797
|
return normalize(path4).replace(/[\\/]+$/, "").toLowerCase();
|
|
@@ -45225,7 +45804,14 @@ function robotNugetConfigPath(robotDir) {
|
|
|
45225
45804
|
}
|
|
45226
45805
|
var ROBOT_WINDOWS_MARKER = "UiRobot.exe";
|
|
45227
45806
|
var ROBOT_MACOS_MARKER = "UiRobot.dll";
|
|
45228
|
-
var
|
|
45807
|
+
var MACOS_ASSISTANT_APP = "UiPath Assistant.app";
|
|
45808
|
+
var MACOS_CONNECTED_ASSISTANT_SUBDIR = "UiPath Connected/Assistant";
|
|
45809
|
+
var MACOS_CONNECTED_CURRENT = "current";
|
|
45810
|
+
var MACOS_BUNDLE_ROBOT_SUBDIRS = [
|
|
45811
|
+
"Contents/Resources/assistant/Robot",
|
|
45812
|
+
"Contents/Robot"
|
|
45813
|
+
];
|
|
45814
|
+
var byVersionDesc = (a, b) => b.localeCompare(a, undefined, { numeric: true });
|
|
45229
45815
|
var REGISTRY_HIVES = [
|
|
45230
45816
|
"HKCU\\Software\\UiPath\\UiPath Studio",
|
|
45231
45817
|
"HKLM\\Software\\UiPath\\UiPath Studio"
|
|
@@ -45250,6 +45836,32 @@ function resolveRobotComponentDir(installRoot, deps) {
|
|
|
45250
45836
|
const nested = win32.join(installRoot, ROBOT_SUBDIR);
|
|
45251
45837
|
return deps.fileExists(win32.join(nested, ROBOT_WINDOWS_MARKER)) ? nested : installRoot;
|
|
45252
45838
|
}
|
|
45839
|
+
function* macosRobotDirCandidates(deps) {
|
|
45840
|
+
const home = process.env.HOME;
|
|
45841
|
+
const appRoots = [
|
|
45842
|
+
"/Applications",
|
|
45843
|
+
...home ? [posix.join(home, "Applications")] : []
|
|
45844
|
+
];
|
|
45845
|
+
for (const appRoot of appRoots) {
|
|
45846
|
+
const connectedDir = posix.join(appRoot, MACOS_CONNECTED_ASSISTANT_SUBDIR);
|
|
45847
|
+
let versions;
|
|
45848
|
+
try {
|
|
45849
|
+
versions = deps.readDir(connectedDir).filter((entry) => entry !== MACOS_CONNECTED_CURRENT).sort(byVersionDesc);
|
|
45850
|
+
} catch {
|
|
45851
|
+
versions = [];
|
|
45852
|
+
}
|
|
45853
|
+
const bundles = [
|
|
45854
|
+
posix.join(connectedDir, MACOS_CONNECTED_CURRENT, MACOS_ASSISTANT_APP),
|
|
45855
|
+
...versions.map((version) => posix.join(connectedDir, version, MACOS_ASSISTANT_APP)),
|
|
45856
|
+
posix.join(appRoot, MACOS_ASSISTANT_APP)
|
|
45857
|
+
];
|
|
45858
|
+
for (const bundle of bundles) {
|
|
45859
|
+
for (const subdir of MACOS_BUNDLE_ROBOT_SUBDIRS) {
|
|
45860
|
+
yield posix.join(bundle, subdir);
|
|
45861
|
+
}
|
|
45862
|
+
}
|
|
45863
|
+
}
|
|
45864
|
+
}
|
|
45253
45865
|
function resolveRobotDir(cliPath, deps) {
|
|
45254
45866
|
if (cliPath) {
|
|
45255
45867
|
deps.log(`Using --robot-dir: ${cliPath}`);
|
|
@@ -45274,18 +45886,21 @@ function resolveRobotDir(cliPath, deps) {
|
|
|
45274
45886
|
}
|
|
45275
45887
|
}
|
|
45276
45888
|
if (process.platform === "darwin") {
|
|
45277
|
-
|
|
45278
|
-
deps.
|
|
45279
|
-
|
|
45889
|
+
for (const candidate of macosRobotDirCandidates(deps)) {
|
|
45890
|
+
if (deps.fileExists(posix.join(candidate, ROBOT_MACOS_MARKER))) {
|
|
45891
|
+
deps.log(`Found robot at well-known path: ${candidate}`);
|
|
45892
|
+
return candidate;
|
|
45893
|
+
}
|
|
45280
45894
|
}
|
|
45281
45895
|
}
|
|
45282
45896
|
deps.log("Robot dir not resolved — Robot must already be running");
|
|
45283
45897
|
return null;
|
|
45284
45898
|
}
|
|
45285
45899
|
var DOTNET_ROLL_FORWARD_ENV = {
|
|
45286
|
-
DOTNET_ROLL_FORWARD: "
|
|
45900
|
+
DOTNET_ROLL_FORWARD: "LatestMajor"
|
|
45287
45901
|
};
|
|
45288
|
-
var
|
|
45902
|
+
var DOTNET_ROOT_ARCH_ENV = `DOTNET_ROOT_${process.arch === "ia32" ? "X86" : process.arch.toUpperCase()}`;
|
|
45903
|
+
var MIN_BUNDLED_DOTNET_MAJOR = HELM_DOTNET_MAJOR;
|
|
45289
45904
|
var DOTNET_ROOT_ENV = "UIPATH_DOTNET_ROOT";
|
|
45290
45905
|
var RUNTIMES_SUBDIR = "Runtimes";
|
|
45291
45906
|
var dotnetExeName = () => process.platform === "win32" ? "dotnet.exe" : "dotnet";
|
|
@@ -45320,7 +45935,7 @@ function* rootsAtOrUnder(dir, deps) {
|
|
|
45320
45935
|
} catch {
|
|
45321
45936
|
return;
|
|
45322
45937
|
}
|
|
45323
|
-
for (const entry of entries.sort(
|
|
45938
|
+
for (const entry of entries.sort(byVersionDesc)) {
|
|
45324
45939
|
yield layoutPath().join(dir, entry);
|
|
45325
45940
|
}
|
|
45326
45941
|
}
|
|
@@ -45330,6 +45945,8 @@ function* dotnetRootCandidates(robotDir, deps) {
|
|
|
45330
45945
|
deps.log(`Using ${DOTNET_ROOT_ENV}: ${declaredRoot}`);
|
|
45331
45946
|
yield* rootsAtOrUnder(declaredRoot, deps);
|
|
45332
45947
|
}
|
|
45948
|
+
if (!robotDir)
|
|
45949
|
+
return;
|
|
45333
45950
|
if (process.platform !== "win32") {
|
|
45334
45951
|
yield layoutPath().join(robotDir, "dotnet");
|
|
45335
45952
|
return;
|
|
@@ -45338,8 +45955,6 @@ function* dotnetRootCandidates(robotDir, deps) {
|
|
|
45338
45955
|
yield* rootsAtOrUnder(win32.resolve(robotDir, "..", "..", RUNTIMES_SUBDIR), deps);
|
|
45339
45956
|
}
|
|
45340
45957
|
function resolveBundledDotnet(robotDir, deps) {
|
|
45341
|
-
if (!robotDir)
|
|
45342
|
-
return;
|
|
45343
45958
|
for (const dotnetRoot of dotnetRootCandidates(robotDir, deps)) {
|
|
45344
45959
|
const exePath = layoutPath().join(dotnetRoot, dotnetExeName());
|
|
45345
45960
|
if (!deps.fileExists(exePath))
|
|
@@ -45354,6 +45969,7 @@ function resolveBundledDotnet(robotDir, deps) {
|
|
|
45354
45969
|
exePath,
|
|
45355
45970
|
env: {
|
|
45356
45971
|
DOTNET_ROOT: dotnetRoot,
|
|
45972
|
+
[DOTNET_ROOT_ARCH_ENV]: dotnetRoot,
|
|
45357
45973
|
DOTNET_MULTILEVEL_LOOKUP: "0",
|
|
45358
45974
|
...DOTNET_ROLL_FORWARD_ENV
|
|
45359
45975
|
}
|
|
@@ -45835,6 +46451,9 @@ class RemoteConnectionServiceProxy {
|
|
|
45835
46451
|
ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream) {
|
|
45836
46452
|
throw null;
|
|
45837
46453
|
}
|
|
46454
|
+
SetLiveAuthoring(liveAuthoring) {
|
|
46455
|
+
throw null;
|
|
46456
|
+
}
|
|
45838
46457
|
EnableRemoteConnection(enabled) {
|
|
45839
46458
|
throw null;
|
|
45840
46459
|
}
|
|
@@ -45845,6 +46464,9 @@ class RemoteConnectionServiceProxy {
|
|
|
45845
46464
|
__legacyDecorateClassTS([
|
|
45846
46465
|
import_coreipc2.ipc.$operation
|
|
45847
46466
|
], RemoteConnectionServiceProxy.prototype, "ConfigureUnattendedRobot", null);
|
|
46467
|
+
__legacyDecorateClassTS([
|
|
46468
|
+
import_coreipc2.ipc.$operation
|
|
46469
|
+
], RemoteConnectionServiceProxy.prototype, "SetLiveAuthoring", null);
|
|
45848
46470
|
__legacyDecorateClassTS([
|
|
45849
46471
|
import_coreipc2.ipc.$operation
|
|
45850
46472
|
], RemoteConnectionServiceProxy.prototype, "EnableRemoteConnection", null);
|
|
@@ -45857,6 +46479,7 @@ RemoteConnectionServiceProxy = __legacyDecorateClassTS([
|
|
|
45857
46479
|
function adaptRemoteConnectionServiceProxy(proxy) {
|
|
45858
46480
|
return {
|
|
45859
46481
|
configureUnattendedRobot: (folderPath, robotName, machineName, runtimeName, enableLiveStream) => proxy.ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream),
|
|
46482
|
+
setLiveAuthoring: (liveAuthoring) => proxy.SetLiveAuthoring(liveAuthoring),
|
|
45860
46483
|
enableRemoteConnection: (enabled) => proxy.EnableRemoteConnection(enabled),
|
|
45861
46484
|
getRemoteConnection: () => proxy.GetRemoteConnection()
|
|
45862
46485
|
};
|
|
@@ -46181,7 +46804,10 @@ __legacyDecorateClassTS([
|
|
|
46181
46804
|
HelmRemoteCallbackProxy = __legacyDecorateClassTS([
|
|
46182
46805
|
import_coreipc4.ipc.$service({ endpoint: "IHelmRemoteCallback" })
|
|
46183
46806
|
], HelmRemoteCallbackProxy);
|
|
46184
|
-
class
|
|
46807
|
+
class HelmRemoteSessionServiceProxy {
|
|
46808
|
+
Echo(request) {
|
|
46809
|
+
throw null;
|
|
46810
|
+
}
|
|
46185
46811
|
ExecuteProcess(request) {
|
|
46186
46812
|
throw null;
|
|
46187
46813
|
}
|
|
@@ -46194,18 +46820,22 @@ class HelmRemoteServiceProxy {
|
|
|
46194
46820
|
}
|
|
46195
46821
|
__legacyDecorateClassTS([
|
|
46196
46822
|
import_coreipc4.ipc.$operation
|
|
46197
|
-
],
|
|
46823
|
+
], HelmRemoteSessionServiceProxy.prototype, "Echo", null);
|
|
46198
46824
|
__legacyDecorateClassTS([
|
|
46199
46825
|
import_coreipc4.ipc.$operation
|
|
46200
|
-
],
|
|
46826
|
+
], HelmRemoteSessionServiceProxy.prototype, "ExecuteProcess", null);
|
|
46201
46827
|
__legacyDecorateClassTS([
|
|
46202
46828
|
import_coreipc4.ipc.$operation
|
|
46203
|
-
],
|
|
46204
|
-
|
|
46205
|
-
import_coreipc4.ipc.$
|
|
46206
|
-
],
|
|
46207
|
-
|
|
46829
|
+
], HelmRemoteSessionServiceProxy.prototype, "UploadFile", null);
|
|
46830
|
+
__legacyDecorateClassTS([
|
|
46831
|
+
import_coreipc4.ipc.$operation
|
|
46832
|
+
], HelmRemoteSessionServiceProxy.prototype, "DownloadFile", null);
|
|
46833
|
+
HelmRemoteSessionServiceProxy = __legacyDecorateClassTS([
|
|
46834
|
+
import_coreipc4.ipc.$service({ endpoint: "IHelmRemoteSessionService" })
|
|
46835
|
+
], HelmRemoteSessionServiceProxy);
|
|
46836
|
+
function adaptHelmRemoteSessionServiceProxy(proxy) {
|
|
46208
46837
|
return {
|
|
46838
|
+
echo: (request) => proxy.Echo(request),
|
|
46209
46839
|
executeProcess: (request) => proxy.ExecuteProcess({ Payload: request }),
|
|
46210
46840
|
uploadFile: (request) => proxy.UploadFile(request),
|
|
46211
46841
|
downloadFile: (request) => proxy.DownloadFile(request)
|
|
@@ -46287,6 +46917,9 @@ class RemoteConnectionServiceProxy2 {
|
|
|
46287
46917
|
ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream) {
|
|
46288
46918
|
throw null;
|
|
46289
46919
|
}
|
|
46920
|
+
SetLiveAuthoring(liveAuthoring) {
|
|
46921
|
+
throw null;
|
|
46922
|
+
}
|
|
46290
46923
|
EnableRemoteConnection(enabled) {
|
|
46291
46924
|
throw null;
|
|
46292
46925
|
}
|
|
@@ -46297,6 +46930,9 @@ class RemoteConnectionServiceProxy2 {
|
|
|
46297
46930
|
__legacyDecorateClassTS([
|
|
46298
46931
|
import_coreipc4.ipc.$operation
|
|
46299
46932
|
], RemoteConnectionServiceProxy2.prototype, "ConfigureUnattendedRobot", null);
|
|
46933
|
+
__legacyDecorateClassTS([
|
|
46934
|
+
import_coreipc4.ipc.$operation
|
|
46935
|
+
], RemoteConnectionServiceProxy2.prototype, "SetLiveAuthoring", null);
|
|
46300
46936
|
__legacyDecorateClassTS([
|
|
46301
46937
|
import_coreipc4.ipc.$operation
|
|
46302
46938
|
], RemoteConnectionServiceProxy2.prototype, "EnableRemoteConnection", null);
|
|
@@ -46309,6 +46945,7 @@ RemoteConnectionServiceProxy2 = __legacyDecorateClassTS([
|
|
|
46309
46945
|
function adaptRemoteConnectionServiceProxy2(proxy) {
|
|
46310
46946
|
return {
|
|
46311
46947
|
configureUnattendedRobot: (folderPath, robotName, machineName, runtimeName, enableLiveStream) => proxy.ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream),
|
|
46948
|
+
setLiveAuthoring: (liveAuthoring) => proxy.SetLiveAuthoring(liveAuthoring),
|
|
46312
46949
|
enableRemoteConnection: (enabled) => proxy.EnableRemoteConnection(enabled),
|
|
46313
46950
|
getRemoteConnection: () => proxy.GetRemoteConnection()
|
|
46314
46951
|
};
|
|
@@ -46342,7 +46979,7 @@ class HelmServices {
|
|
|
46342
46979
|
authContext;
|
|
46343
46980
|
build;
|
|
46344
46981
|
lifecycle;
|
|
46345
|
-
|
|
46982
|
+
remoteSession;
|
|
46346
46983
|
run;
|
|
46347
46984
|
validation;
|
|
46348
46985
|
remoteConnection;
|
|
@@ -46353,7 +46990,7 @@ class HelmServices {
|
|
|
46353
46990
|
this.authContext = adaptHelmAuthContextServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmAuthContextServiceProxy));
|
|
46354
46991
|
this.build = adaptHelmBuildServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmBuildServiceProxy));
|
|
46355
46992
|
this.lifecycle = adaptHelmLifecycleServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmLifecycleServiceProxy));
|
|
46356
|
-
this.
|
|
46993
|
+
this.remoteSession = adaptHelmRemoteSessionServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmRemoteSessionServiceProxy));
|
|
46357
46994
|
this.run = adaptHelmRunServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmRunServiceProxy));
|
|
46358
46995
|
this.validation = adaptHelmValidationServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmValidationServiceProxy));
|
|
46359
46996
|
this.remoteConnection = adaptRemoteConnectionServiceProxy2(import_coreipc4.ipc.proxy.withAddress(addr).withService(RemoteConnectionServiceProxy2));
|
|
@@ -46395,6 +47032,8 @@ import { join as join9 } from "node:path";
|
|
|
46395
47032
|
var DEFAULT_MAX_SLOTS = 3;
|
|
46396
47033
|
var READY_MARKER = ".ready";
|
|
46397
47034
|
var STAGING_DIR = ".staging";
|
|
47035
|
+
var HELM_DEPS_JSON = "UiPath.Studio.Helm.deps.json";
|
|
47036
|
+
var PAYLOAD_NOT_SHIPPED = new Set(["System.Activities.ViewModels.dll"]);
|
|
46398
47037
|
var STALE_LOCK_MS = 5 * 60000;
|
|
46399
47038
|
var RECENT_USE_MS = 60000;
|
|
46400
47039
|
var STALE_STAGING_MS = 10 * 60000;
|
|
@@ -46453,6 +47092,31 @@ function releaseLock(lockPath) {
|
|
|
46453
47092
|
unlinkSync2(lockPath);
|
|
46454
47093
|
} catch {}
|
|
46455
47094
|
}
|
|
47095
|
+
function declaredRuntimeAssemblies(depsJsonPath) {
|
|
47096
|
+
const deps = JSON.parse(readFileSync3(depsJsonPath, "utf-8"));
|
|
47097
|
+
const names = new Set;
|
|
47098
|
+
for (const libraries of Object.values(deps.targets ?? {})) {
|
|
47099
|
+
for (const library of Object.values(libraries)) {
|
|
47100
|
+
for (const path4 of Object.keys(library.runtime ?? {})) {
|
|
47101
|
+
const name = path4.split("/").pop();
|
|
47102
|
+
if (name)
|
|
47103
|
+
names.add(name);
|
|
47104
|
+
}
|
|
47105
|
+
}
|
|
47106
|
+
}
|
|
47107
|
+
return names;
|
|
47108
|
+
}
|
|
47109
|
+
function assertPayloadComplete(dir) {
|
|
47110
|
+
const manifest = join9(dir, HELM_DEPS_JSON);
|
|
47111
|
+
if (!existsSync3(manifest)) {
|
|
47112
|
+
throw new Error(`the copy has no ${HELM_DEPS_JSON}, so its payload cannot be verified`);
|
|
47113
|
+
}
|
|
47114
|
+
const declared = declaredRuntimeAssemblies(manifest);
|
|
47115
|
+
const missing = [...declared].filter((name) => !PAYLOAD_NOT_SHIPPED.has(name) && !existsSync3(join9(dir, name))).sort();
|
|
47116
|
+
if (missing.length === 0)
|
|
47117
|
+
return;
|
|
47118
|
+
throw new Error(`the copy is missing ${missing.length} of the ${declared.size} assemblies ` + `declared by ${HELM_DEPS_JSON}: ${missing.slice(0, 5).join(", ")}` + `${missing.length > 5 ? ", …" : ""}`);
|
|
47119
|
+
}
|
|
46456
47120
|
function publishSlot(sourceToolsDir, slot2, root, version, log) {
|
|
46457
47121
|
const stagingRoot = join9(root, STAGING_DIR);
|
|
46458
47122
|
mkdirSync2(stagingRoot, { recursive: true });
|
|
@@ -46460,6 +47124,12 @@ function publishSlot(sourceToolsDir, slot2, root, version, log) {
|
|
|
46460
47124
|
rmSync2(staging, { recursive: true, force: true });
|
|
46461
47125
|
log(`Materializing Helm slot ${slot2} from ${sourceToolsDir}`);
|
|
46462
47126
|
cpSync(sourceToolsDir, staging, { recursive: true });
|
|
47127
|
+
try {
|
|
47128
|
+
assertPayloadComplete(staging);
|
|
47129
|
+
} catch (err) {
|
|
47130
|
+
rmSync2(staging, { recursive: true, force: true });
|
|
47131
|
+
throw err;
|
|
47132
|
+
}
|
|
46463
47133
|
const now = new Date;
|
|
46464
47134
|
const markerFd = openSync2(join9(staging, READY_MARKER), "w");
|
|
46465
47135
|
writeSync(markerFd, now.getTime().toString());
|
|
@@ -46923,8 +47593,15 @@ var OUTPUT_TYPES = [
|
|
|
46923
47593
|
"Objects",
|
|
46924
47594
|
"Template"
|
|
46925
47595
|
];
|
|
47596
|
+
function normalizeFormat(value) {
|
|
47597
|
+
const normalized = value.toLowerCase();
|
|
47598
|
+
if (!isOutputFormat(normalized)) {
|
|
47599
|
+
throw new InvalidArgumentError2(`Allowed choices are ${OUTPUT_FORMATS.join(", ")}.`);
|
|
47600
|
+
}
|
|
47601
|
+
return normalized;
|
|
47602
|
+
}
|
|
46926
47603
|
function addCommonPackagerOptions(cmd) {
|
|
46927
|
-
return cmd.option("--project-dir <path>", "Path to the UiPath project directory. Alternative to the positional argument; defaults to the current directory.").addOption(new Option2("--log-level <level>", "Log level").choices(LOG_LEVEL_NAMES).default("Warn")).option("--exclude-configured-sources", "Exclude user/machine configured NuGet sources").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--feed-folder <name>", "Resolve library dependencies from this Orchestrator folder's feed instead of every tenant feed. Accepts a folder name or fully qualified path.").addOption(new Option2("--format <format>", "Output format").choices([
|
|
47604
|
+
return cmd.option("--project-dir <path>", "Path to the UiPath project directory. Alternative to the positional argument; defaults to the current directory.").addOption(new Option2("--log-level <level>", "Log level").choices(LOG_LEVEL_NAMES).default("Warn")).option("--exclude-configured-sources", "Exclude user/machine configured NuGet sources").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--feed-folder <name>", "Resolve library dependencies from this Orchestrator folder's feed instead of every tenant feed. Accepts a folder name or fully qualified path.").addOption(new Option2("--format <format>", "Output format").choices([...OUTPUT_FORMATS]).argParser(normalizeFormat).default("json"));
|
|
46928
47605
|
}
|
|
46929
47606
|
async function createPackager() {
|
|
46930
47607
|
await loadPackagerTool();
|
|
@@ -49346,7 +50023,7 @@ function renderToolOutput(output) {
|
|
|
49346
50023
|
}
|
|
49347
50024
|
}
|
|
49348
50025
|
function renderAsTable(raw) {
|
|
49349
|
-
const simple =
|
|
50026
|
+
const simple = extractSingleMessage(raw);
|
|
49350
50027
|
if (simple !== null) {
|
|
49351
50028
|
console.log(simple);
|
|
49352
50029
|
return;
|
|
@@ -49364,17 +50041,6 @@ function renderAsTable(raw) {
|
|
|
49364
50041
|
}
|
|
49365
50042
|
OutputFormatter.success(new SuccessOutput("ToolResult", raw), { preserveDataKeys: true });
|
|
49366
50043
|
}
|
|
49367
|
-
function extractSimpleMessage(data) {
|
|
49368
|
-
if (typeof data !== "object" || data === null || Array.isArray(data)) {
|
|
49369
|
-
return null;
|
|
49370
|
-
}
|
|
49371
|
-
const keys = Object.keys(data);
|
|
49372
|
-
if (keys.length === 1 && keys[0] === "message") {
|
|
49373
|
-
const val = data.message;
|
|
49374
|
-
return typeof val === "string" ? val : null;
|
|
49375
|
-
}
|
|
49376
|
-
return null;
|
|
49377
|
-
}
|
|
49378
50044
|
function extractTableData(data) {
|
|
49379
50045
|
if (typeof data !== "object" || data === null || Array.isArray(data)) {
|
|
49380
50046
|
return null;
|
|
@@ -49399,6 +50065,7 @@ var ToolName = {
|
|
|
49399
50065
|
ShowRemoteConnection: "show-remote-connection",
|
|
49400
50066
|
EnableRemoteUia: "enable-remote-uia",
|
|
49401
50067
|
DisableRemoteUia: "disable-remote-uia",
|
|
50068
|
+
RemoteEcho: "remote-echo",
|
|
49402
50069
|
CreateProject: "create-project",
|
|
49403
50070
|
Diff: "diff",
|
|
49404
50071
|
DownloadFile: "download-file",
|
|
@@ -49469,6 +50136,7 @@ var CLI_ALIASES = {
|
|
|
49469
50136
|
[ToolName.ShowRemoteConnection]: ["remote", "status"],
|
|
49470
50137
|
[ToolName.EnableRemoteUia]: ["remote", "start"],
|
|
49471
50138
|
[ToolName.DisableRemoteUia]: ["remote", "stop"],
|
|
50139
|
+
[ToolName.RemoteEcho]: ["remote", "echo"],
|
|
49472
50140
|
[ToolName.ExecuteProcess]: ["remote", "exec"],
|
|
49473
50141
|
[ToolName.UploadFile]: ["remote", "upload-file"],
|
|
49474
50142
|
[ToolName.DownloadFile]: ["remote", "download-file"]
|
|
@@ -49722,6 +50390,21 @@ async function registerMcpCommands(program4, client) {
|
|
|
49722
50390
|
registerDerivedCommand(program4, baseTool, derived, groupCache, client);
|
|
49723
50391
|
}
|
|
49724
50392
|
}
|
|
50393
|
+
function withShadowedFlags(cmd, cliCmd, opts) {
|
|
50394
|
+
const merged = { ...opts };
|
|
50395
|
+
for (const flag of cliCmd.flags) {
|
|
50396
|
+
const key = kebabToCamel(flag.name);
|
|
50397
|
+
if (merged[key] !== undefined)
|
|
50398
|
+
continue;
|
|
50399
|
+
for (let ancestor = cmd.parent;ancestor; ancestor = ancestor.parent) {
|
|
50400
|
+
if (ancestor.getOptionValueSource(key) !== "cli")
|
|
50401
|
+
continue;
|
|
50402
|
+
merged[key] = ancestor.getOptionValue(key);
|
|
50403
|
+
break;
|
|
50404
|
+
}
|
|
50405
|
+
}
|
|
50406
|
+
return merged;
|
|
50407
|
+
}
|
|
49725
50408
|
function registerDerivedCommand(program4, baseTool, derived, cache, client) {
|
|
49726
50409
|
const baseCliCmd = toCliCommand(baseTool);
|
|
49727
50410
|
const visible = new Set(derived.visibleArgs);
|
|
@@ -49740,7 +50423,7 @@ function registerDerivedCommand(program4, baseTool, derived, cache, client) {
|
|
|
49740
50423
|
const usagePattern = buildUsagePattern(filteredCmd.flags);
|
|
49741
50424
|
usagePattern && sub3.usage(usagePattern);
|
|
49742
50425
|
sub3.trackedAction(processContext, async (opts) => {
|
|
49743
|
-
const userArgs = packToolCall(baseTool.name, filteredCmd, opts).arguments;
|
|
50426
|
+
const userArgs = packToolCall(baseTool.name, filteredCmd, withShadowedFlags(sub3, filteredCmd, opts)).arguments;
|
|
49744
50427
|
const merged = { ...derived.lockedArgs, ...userArgs };
|
|
49745
50428
|
const result = await client.callTool(baseTool.name, merged);
|
|
49746
50429
|
if (result === undefined) {
|
|
@@ -49784,7 +50467,7 @@ function registerSubcommand(program4, tool, cliCmd, hidden, client) {
|
|
|
49784
50467
|
const usagePattern = buildUsagePattern(cliCmd.flags);
|
|
49785
50468
|
usagePattern && sub3.usage(usagePattern);
|
|
49786
50469
|
sub3.trackedAction(processContext, async (opts) => {
|
|
49787
|
-
const request = packToolCall(tool.name, cliCmd, opts);
|
|
50470
|
+
const request = packToolCall(tool.name, cliCmd, withShadowedFlags(sub3, cliCmd, opts));
|
|
49788
50471
|
const result = await client.callTool(request.name, request.arguments);
|
|
49789
50472
|
if (result === undefined) {
|
|
49790
50473
|
throw new Error(`Tool '${request.name}' not found`);
|
|
@@ -50148,7 +50831,7 @@ async function startHelmAndWait(deps, timeoutMs = DEFAULT_TIMEOUT_MS2, options)
|
|
|
50148
50831
|
if (bundledDotnet) {
|
|
50149
50832
|
deps.log(`Bundled dotnet found, setting DOTNET_ROOT=${bundledDotnet.env.DOTNET_ROOT}`);
|
|
50150
50833
|
} else {
|
|
50151
|
-
deps.log("No bundled dotnet; launching Helm on PATH dotnet with DOTNET_ROLL_FORWARD=
|
|
50834
|
+
deps.log("No bundled dotnet; launching Helm on PATH dotnet with DOTNET_ROLL_FORWARD=LatestMajor.");
|
|
50152
50835
|
}
|
|
50153
50836
|
const bundledFeedEnv = resolveBundledFeedEnv(robotDir);
|
|
50154
50837
|
let helmEnv = {
|
|
@@ -50569,6 +51252,7 @@ var interop_manifest_default = {
|
|
|
50569
51252
|
],
|
|
50570
51253
|
IRemoteConnectionService: [
|
|
50571
51254
|
"configureUnattendedRobot",
|
|
51255
|
+
"setLiveAuthoring",
|
|
50572
51256
|
"enableRemoteConnection",
|
|
50573
51257
|
"getRemoteConnection"
|
|
50574
51258
|
],
|
|
@@ -51909,6 +52593,29 @@ function isJsonObject2(value) {
|
|
|
51909
52593
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
51910
52594
|
}
|
|
51911
52595
|
var IGNORED_LIVE_STREAM = false;
|
|
52596
|
+
function parseRemoteRobotMode(args) {
|
|
52597
|
+
const liveAuthoring = parseFlag(args.liveAuthoring, "--live-authoring");
|
|
52598
|
+
const remoteRunOnly = parseFlag(args.remoteRunOnly, "--remote-run-only");
|
|
52599
|
+
if (liveAuthoring && remoteRunOnly) {
|
|
52600
|
+
throw new Error("--live-authoring and --remote-run-only are the two modes of one connection; pass at most one.");
|
|
52601
|
+
}
|
|
52602
|
+
if (liveAuthoring) {
|
|
52603
|
+
return true;
|
|
52604
|
+
}
|
|
52605
|
+
if (remoteRunOnly) {
|
|
52606
|
+
return false;
|
|
52607
|
+
}
|
|
52608
|
+
return;
|
|
52609
|
+
}
|
|
52610
|
+
function parseFlag(value, flag) {
|
|
52611
|
+
if (value === undefined || value === null) {
|
|
52612
|
+
return false;
|
|
52613
|
+
}
|
|
52614
|
+
if (typeof value !== "boolean") {
|
|
52615
|
+
throw new Error(`${flag} is a switch and takes no value, but got ${typeLabel(value)}.`);
|
|
52616
|
+
}
|
|
52617
|
+
return value;
|
|
52618
|
+
}
|
|
51912
52619
|
var ARG_SPECS = {
|
|
51913
52620
|
folderPath: {
|
|
51914
52621
|
flag: "--folder-path",
|
|
@@ -51932,7 +52639,8 @@ function parseRemoteRobotTargetArgs(args) {
|
|
|
51932
52639
|
folderPath: optionalText(args.folderPath, ARG_SPECS.folderPath),
|
|
51933
52640
|
machine: requiredText(args.machine, ARG_SPECS.machine),
|
|
51934
52641
|
robot: optionalText(args.robot, ARG_SPECS.robot),
|
|
51935
|
-
runtime: optionalText(args.runtime, ARG_SPECS.runtime)
|
|
52642
|
+
runtime: optionalText(args.runtime, ARG_SPECS.runtime),
|
|
52643
|
+
liveAuthoring: parseRemoteRobotMode(args)
|
|
51936
52644
|
};
|
|
51937
52645
|
}
|
|
51938
52646
|
function requiredText(value, spec) {
|
|
@@ -51967,7 +52675,7 @@ function configureRemoteRobotTool(session) {
|
|
|
51967
52675
|
return createToolHandler(session, {
|
|
51968
52676
|
name: ToolName.ConfigureRemoteRobot,
|
|
51969
52677
|
title: "Configure Remote Robot",
|
|
51970
|
-
description: "Configure the remote (Orchestrator unattended robot)
|
|
52678
|
+
description: "Configure the remote (Orchestrator unattended robot) target: the folder plus the " + "robot, machine and runtime resolved in it, and its mode. --live-authoring serves " + "every remote command, run and debug session from one long-lived remote session job " + "and enables the remote UIA session; --remote-run-only (default) takes a job per " + "operation and has no remote UIA. Requires Orchestrator sign-in.",
|
|
51971
52679
|
requiresProject: true,
|
|
51972
52680
|
inputSchema: {
|
|
51973
52681
|
type: "object",
|
|
@@ -51987,6 +52695,14 @@ function configureRemoteRobotTool(session) {
|
|
|
51987
52695
|
runtime: {
|
|
51988
52696
|
type: "string",
|
|
51989
52697
|
description: "Connected runtime (host machine / session) name. Optional and ignored for " + "serverless machines; set it to target a specific connected session on a classic machine."
|
|
52698
|
+
},
|
|
52699
|
+
liveAuthoring: {
|
|
52700
|
+
type: "boolean",
|
|
52701
|
+
description: "Use the target for live authoring: one long-lived remote session job serves " + "every remote command, run and debug session, the remote UI Automation design " + "session becomes available, and the remote screen is streamed. Mutually " + "exclusive with --remote-run-only; pass neither to keep the stored mode."
|
|
52702
|
+
},
|
|
52703
|
+
remoteRunOnly: {
|
|
52704
|
+
type: "boolean",
|
|
52705
|
+
description: "Use the target for remote runs only: a run or debug session is an Orchestrator " + "job of its own and there is no remote UI Automation session. The default for a " + "target that has never had a mode stored."
|
|
51990
52706
|
}
|
|
51991
52707
|
},
|
|
51992
52708
|
required: ["machine"]
|
|
@@ -51994,21 +52710,22 @@ function configureRemoteRobotTool(session) {
|
|
|
51994
52710
|
}, async (session2, args) => {
|
|
51995
52711
|
try {
|
|
51996
52712
|
const target = parseRemoteRobotTargetArgs(args);
|
|
51997
|
-
const result = await session2.execute((instance) => {
|
|
52713
|
+
const result = await session2.execute(async (instance) => {
|
|
51998
52714
|
const remoteConnection = instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteConnection : instance.services.remoteConnection;
|
|
51999
|
-
|
|
52715
|
+
if (target.liveAuthoring !== undefined) {
|
|
52716
|
+
const modeResult = await remoteConnection.setLiveAuthoring(target.liveAuthoring);
|
|
52717
|
+
if (isFailure(modeResult)) {
|
|
52718
|
+
return modeResult;
|
|
52719
|
+
}
|
|
52720
|
+
}
|
|
52721
|
+
return await remoteConnection.configureUnattendedRobot(target.folderPath, target.robot, target.machine, target.runtime, IGNORED_LIVE_STREAM);
|
|
52000
52722
|
}, {
|
|
52001
52723
|
requiresProject: true,
|
|
52002
52724
|
backend: "any" /* Any */
|
|
52003
52725
|
});
|
|
52004
|
-
let isError = false;
|
|
52005
|
-
try {
|
|
52006
|
-
const payload = JSON.parse(result);
|
|
52007
|
-
isError = isJsonObject2(payload) && payload.success === false;
|
|
52008
|
-
} catch {}
|
|
52009
52726
|
return {
|
|
52010
52727
|
content: [{ type: "text", text: result }],
|
|
52011
|
-
isError
|
|
52728
|
+
isError: isFailure(result)
|
|
52012
52729
|
};
|
|
52013
52730
|
} catch (e) {
|
|
52014
52731
|
return {
|
|
@@ -52026,6 +52743,14 @@ function configureRemoteRobotTool(session) {
|
|
|
52026
52743
|
}
|
|
52027
52744
|
});
|
|
52028
52745
|
}
|
|
52746
|
+
function isFailure(result) {
|
|
52747
|
+
try {
|
|
52748
|
+
const payload = JSON.parse(result);
|
|
52749
|
+
return isJsonObject2(payload) && payload.success === false;
|
|
52750
|
+
} catch {
|
|
52751
|
+
return false;
|
|
52752
|
+
}
|
|
52753
|
+
}
|
|
52029
52754
|
|
|
52030
52755
|
// src/tools/local/create-project.ts
|
|
52031
52756
|
init_dist4();
|
|
@@ -60614,7 +61339,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
|
|
|
60614
61339
|
var package_default3 = {
|
|
60615
61340
|
name: "@uipath/solution-sdk",
|
|
60616
61341
|
license: "MIT",
|
|
60617
|
-
version: "1.
|
|
61342
|
+
version: "1.203.0-dev.8641",
|
|
60618
61343
|
repository: {
|
|
60619
61344
|
type: "git",
|
|
60620
61345
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -62368,6 +63093,7 @@ class TelemetryService3 {
|
|
|
62368
63093
|
return hex;
|
|
62369
63094
|
}
|
|
62370
63095
|
}
|
|
63096
|
+
init_src2();
|
|
62371
63097
|
var TIMINGS_ENV_VAR3 = "UIP_TIMINGS";
|
|
62372
63098
|
function createStorage23() {
|
|
62373
63099
|
const [error, mod22] = catchError4(() => __require5("node:async_hooks"));
|
|
@@ -62540,28 +63266,32 @@ function isPlainRecord3(value) {
|
|
|
62540
63266
|
const prototype = Object.getPrototypeOf(value);
|
|
62541
63267
|
return prototype === Object.prototype || prototype === null;
|
|
62542
63268
|
}
|
|
62543
|
-
function
|
|
63269
|
+
function splitPagedEnvelope3(value) {
|
|
62544
63270
|
if (Array.isArray(value) || !isPlainRecord3(value))
|
|
62545
63271
|
return null;
|
|
62546
|
-
const entries = Object.
|
|
63272
|
+
const entries = Object.entries(value);
|
|
62547
63273
|
if (entries.length === 0)
|
|
62548
63274
|
return null;
|
|
62549
|
-
let
|
|
62550
|
-
|
|
62551
|
-
for (const entry of entries) {
|
|
63275
|
+
let found = null;
|
|
63276
|
+
const meta = Object.create(null);
|
|
63277
|
+
for (const [key, entry] of entries) {
|
|
62552
63278
|
if (Array.isArray(entry)) {
|
|
62553
|
-
if (
|
|
63279
|
+
if (found !== null)
|
|
62554
63280
|
return null;
|
|
62555
|
-
|
|
63281
|
+
found = { key, rows: entry };
|
|
62556
63282
|
} else if (entry !== null && typeof entry === "object") {
|
|
62557
63283
|
return null;
|
|
62558
63284
|
} else {
|
|
62559
|
-
|
|
63285
|
+
meta[key] = entry;
|
|
62560
63286
|
}
|
|
62561
63287
|
}
|
|
62562
|
-
if (
|
|
63288
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
62563
63289
|
return null;
|
|
62564
|
-
return
|
|
63290
|
+
return { ...found, meta };
|
|
63291
|
+
}
|
|
63292
|
+
function extractPagedRows3(value) {
|
|
63293
|
+
const paged = splitPagedEnvelope3(value);
|
|
63294
|
+
return paged === null ? null : paged.rows;
|
|
62565
63295
|
}
|
|
62566
63296
|
function toLowerCamelCaseKey3(key) {
|
|
62567
63297
|
if (!key)
|
|
@@ -62665,6 +63395,9 @@ function printOutput3(data, format = "json", logFn, asciiSafe = false, tableRowS
|
|
|
62665
63395
|
}
|
|
62666
63396
|
break;
|
|
62667
63397
|
}
|
|
63398
|
+
case "markdown":
|
|
63399
|
+
logFn(renderMarkdown3(data));
|
|
63400
|
+
break;
|
|
62668
63401
|
default: {
|
|
62669
63402
|
const hasData = "Data" in data && data.Data != null;
|
|
62670
63403
|
const pagedRows = hasData ? extractPagedRows3(data.Data) : null;
|
|
@@ -62689,6 +63422,10 @@ function logOutput3(data, format = "json", tableRowStyle) {
|
|
|
62689
63422
|
printOutput3(data, format, (msg) => sink.writeOut(`${msg}
|
|
62690
63423
|
`), needsAsciiSafeJson3(sink), styleFn);
|
|
62691
63424
|
}
|
|
63425
|
+
var PLUMBING_KEYS3 = new Set(["code", "log"]);
|
|
63426
|
+
function isPlumbingKey3(key) {
|
|
63427
|
+
return PLUMBING_KEYS3.has(key.toLowerCase());
|
|
63428
|
+
}
|
|
62692
63429
|
function cellToString3(val) {
|
|
62693
63430
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
62694
63431
|
}
|
|
@@ -62704,7 +63441,7 @@ function wrapText3(text, width) {
|
|
|
62704
63441
|
function printTable3(data, logFn, externalLogValue, tableRowStyle) {
|
|
62705
63442
|
if (data.length === 0)
|
|
62706
63443
|
return;
|
|
62707
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
63444
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey3(key));
|
|
62708
63445
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString3(item[key]).length)));
|
|
62709
63446
|
const header = keys.map((key, i2) => key.padEnd(maxWidths[i2])).join(" | ");
|
|
62710
63447
|
logFn(header);
|
|
@@ -62726,7 +63463,7 @@ function isNonEmptyPlainObject3(value) {
|
|
|
62726
63463
|
}
|
|
62727
63464
|
var NESTED_INDENT3 = " ";
|
|
62728
63465
|
function printVerticalTable3(data, logFn = console.log, externalLogValue) {
|
|
62729
|
-
const keys = Object.keys(data).filter((key) => !
|
|
63466
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey3(key));
|
|
62730
63467
|
if (keys.length === 0)
|
|
62731
63468
|
return;
|
|
62732
63469
|
const isBlockValue = (value) => isPlainObjectArray3(value) || isNonEmptyPlainObject3(value);
|
|
@@ -62757,7 +63494,7 @@ function printVerticalTable3(data, logFn = console.log, externalLogValue) {
|
|
|
62757
63494
|
function printResizableTable3(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
62758
63495
|
if (data.length === 0)
|
|
62759
63496
|
return;
|
|
62760
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
63497
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey3(key));
|
|
62761
63498
|
if (keys.length === 0)
|
|
62762
63499
|
return;
|
|
62763
63500
|
if (!process.stdout.isTTY) {
|
|
@@ -62831,6 +63568,216 @@ function printResizableTable3(data, logFn = console.log, externalLogValue, avail
|
|
|
62831
63568
|
logFn(`Log: ${externalLogValue}`);
|
|
62832
63569
|
}
|
|
62833
63570
|
}
|
|
63571
|
+
var MARKDOWN_MAX_CELL3 = 200;
|
|
63572
|
+
var MARKDOWN_MAX_DEPTH3 = 3;
|
|
63573
|
+
function markdownHeading3(depth) {
|
|
63574
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
63575
|
+
}
|
|
63576
|
+
var BACKTICK_RUN3 = /`+/g;
|
|
63577
|
+
function fencedBlock3(text) {
|
|
63578
|
+
const first = text.trimStart()[0];
|
|
63579
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
63580
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN3), (match) => match[0].length));
|
|
63581
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
63582
|
+
return `${fence}${language}
|
|
63583
|
+
${text}
|
|
63584
|
+
${fence}`;
|
|
63585
|
+
}
|
|
63586
|
+
function markdownCell3(value) {
|
|
63587
|
+
const text = value instanceof Date ? value.toISOString() : cellToString3(value);
|
|
63588
|
+
return text.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
|
|
63589
|
+
}
|
|
63590
|
+
function markdownLabel3(key) {
|
|
63591
|
+
return key.replace(/\s*\n\s*/g, " ").replace(/[\\`*|]/g, "\\$&");
|
|
63592
|
+
}
|
|
63593
|
+
function withoutPlumbing3(record) {
|
|
63594
|
+
const kept = Object.create(null);
|
|
63595
|
+
for (const [key, value] of Object.entries(record)) {
|
|
63596
|
+
if (!isPlumbingKey3(key))
|
|
63597
|
+
kept[key] = value;
|
|
63598
|
+
}
|
|
63599
|
+
return kept;
|
|
63600
|
+
}
|
|
63601
|
+
function rowsWithoutPlumbing3(rows) {
|
|
63602
|
+
return rows.map((row) => isPlainRecord3(row) ? withoutPlumbing3(row) : row);
|
|
63603
|
+
}
|
|
63604
|
+
function markdownTable3(rows) {
|
|
63605
|
+
const columns = [];
|
|
63606
|
+
const seen = new Set;
|
|
63607
|
+
for (const row of rows) {
|
|
63608
|
+
for (const key of Object.keys(row)) {
|
|
63609
|
+
if (!seen.has(key)) {
|
|
63610
|
+
seen.add(key);
|
|
63611
|
+
columns.push(key);
|
|
63612
|
+
}
|
|
63613
|
+
}
|
|
63614
|
+
}
|
|
63615
|
+
if (columns.length === 0)
|
|
63616
|
+
return null;
|
|
63617
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell3(row[key])));
|
|
63618
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL3))) {
|
|
63619
|
+
return null;
|
|
63620
|
+
}
|
|
63621
|
+
return [
|
|
63622
|
+
`| ${columns.map(markdownLabel3).join(" | ")} |`,
|
|
63623
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
63624
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
63625
|
+
].join(`
|
|
63626
|
+
`);
|
|
63627
|
+
}
|
|
63628
|
+
function extractMessageSequence3(rows) {
|
|
63629
|
+
const messages = [];
|
|
63630
|
+
for (const row of rows) {
|
|
63631
|
+
const message = extractSingleMessage3(row);
|
|
63632
|
+
if (message === null)
|
|
63633
|
+
return null;
|
|
63634
|
+
messages.push(message);
|
|
63635
|
+
}
|
|
63636
|
+
return messages.join(`
|
|
63637
|
+
|
|
63638
|
+
`);
|
|
63639
|
+
}
|
|
63640
|
+
function markdownRows3(rows, depth) {
|
|
63641
|
+
if (rows.length === 0)
|
|
63642
|
+
return "(none)";
|
|
63643
|
+
if (!isPlainObjectArray3(rows)) {
|
|
63644
|
+
return rows.map((item) => `- ${markdownCell3(item)}`).join(`
|
|
63645
|
+
`);
|
|
63646
|
+
}
|
|
63647
|
+
const prose = extractMessageSequence3(rows);
|
|
63648
|
+
if (prose !== null)
|
|
63649
|
+
return prose;
|
|
63650
|
+
const table = markdownTable3(rows);
|
|
63651
|
+
if (table !== null)
|
|
63652
|
+
return table;
|
|
63653
|
+
if (depth >= MARKDOWN_MAX_DEPTH3) {
|
|
63654
|
+
return fencedBlock3(JSON.stringify(rows, null, 2));
|
|
63655
|
+
}
|
|
63656
|
+
return rows.map((row, index) => [
|
|
63657
|
+
`${markdownHeading3(depth)} ${index + 1}`,
|
|
63658
|
+
markdownObject3(row, depth + 1)
|
|
63659
|
+
].join(`
|
|
63660
|
+
|
|
63661
|
+
`)).join(`
|
|
63662
|
+
|
|
63663
|
+
`);
|
|
63664
|
+
}
|
|
63665
|
+
function markdownObject3(obj, depth) {
|
|
63666
|
+
const scalars = [];
|
|
63667
|
+
const blocks = [];
|
|
63668
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
63669
|
+
if (value === undefined)
|
|
63670
|
+
continue;
|
|
63671
|
+
const label = markdownLabel3(key);
|
|
63672
|
+
if (Array.isArray(value)) {
|
|
63673
|
+
blocks.push(`${markdownHeading3(depth)} ${label}
|
|
63674
|
+
|
|
63675
|
+
${markdownRows3(value, depth + 1)}`);
|
|
63676
|
+
} else if (isNonEmptyPlainObject3(value)) {
|
|
63677
|
+
const nested = depth < MARKDOWN_MAX_DEPTH3 ? markdownObject3(value, depth + 1) : fencedBlock3(JSON.stringify(value, null, 2));
|
|
63678
|
+
if (nested !== "") {
|
|
63679
|
+
blocks.push(`${markdownHeading3(depth)} ${label}
|
|
63680
|
+
|
|
63681
|
+
${nested}`);
|
|
63682
|
+
}
|
|
63683
|
+
} else if (typeof value === "string" && value.includes(`
|
|
63684
|
+
`)) {
|
|
63685
|
+
blocks.push(`**${label}:**
|
|
63686
|
+
|
|
63687
|
+
${fencedBlock3(value)}`);
|
|
63688
|
+
} else {
|
|
63689
|
+
scalars.push(`**${label}:** ${markdownCell3(value)}`);
|
|
63690
|
+
}
|
|
63691
|
+
}
|
|
63692
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
63693
|
+
`)] : [];
|
|
63694
|
+
sections.push(...blocks);
|
|
63695
|
+
return sections.join(`
|
|
63696
|
+
|
|
63697
|
+
`);
|
|
63698
|
+
}
|
|
63699
|
+
function extractSingleMessage3(payload) {
|
|
63700
|
+
if (!isPlainRecord3(payload))
|
|
63701
|
+
return null;
|
|
63702
|
+
const keys = Object.keys(payload);
|
|
63703
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
63704
|
+
return null;
|
|
63705
|
+
const value = payload[keys[0]];
|
|
63706
|
+
return typeof value === "string" ? value : null;
|
|
63707
|
+
}
|
|
63708
|
+
function markdownPayload3(payload) {
|
|
63709
|
+
const message = extractSingleMessage3(payload);
|
|
63710
|
+
if (message !== null)
|
|
63711
|
+
return message;
|
|
63712
|
+
if (Array.isArray(payload)) {
|
|
63713
|
+
return markdownRows3(rowsWithoutPlumbing3(payload), 0);
|
|
63714
|
+
}
|
|
63715
|
+
const visible = withoutPlumbing3(payload);
|
|
63716
|
+
const paged = splitPagedEnvelope3(visible);
|
|
63717
|
+
if (paged !== null) {
|
|
63718
|
+
const meta = markdownObject3(paged.meta, 0);
|
|
63719
|
+
const rows = `${markdownHeading3(0)} ${markdownLabel3(paged.key)}
|
|
63720
|
+
|
|
63721
|
+
${markdownRows3(rowsWithoutPlumbing3(paged.rows), 1)}`;
|
|
63722
|
+
return meta === "" ? rows : `${meta}
|
|
63723
|
+
|
|
63724
|
+
${rows}`;
|
|
63725
|
+
}
|
|
63726
|
+
return markdownObject3(visible, 0);
|
|
63727
|
+
}
|
|
63728
|
+
function isPaginationWorthShowing3(value) {
|
|
63729
|
+
if (typeof value !== "object" || value === null)
|
|
63730
|
+
return false;
|
|
63731
|
+
const page = value;
|
|
63732
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
63733
|
+
}
|
|
63734
|
+
function markdownEnvelopeNotes3(data) {
|
|
63735
|
+
const envelope = data;
|
|
63736
|
+
const notes = [];
|
|
63737
|
+
const warning = envelope.Warning;
|
|
63738
|
+
if (typeof warning === "string" && warning !== "") {
|
|
63739
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
63740
|
+
}
|
|
63741
|
+
const instructions = envelope.Instructions;
|
|
63742
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
63743
|
+
notes.push(`> ${instructions}`);
|
|
63744
|
+
}
|
|
63745
|
+
const pagination = envelope.Pagination;
|
|
63746
|
+
if (isPaginationWorthShowing3(pagination)) {
|
|
63747
|
+
const body = markdownObject3(pagination, 1);
|
|
63748
|
+
if (body !== "") {
|
|
63749
|
+
notes.push(`${markdownHeading3(0)} Pagination
|
|
63750
|
+
|
|
63751
|
+
${body}`);
|
|
63752
|
+
}
|
|
63753
|
+
}
|
|
63754
|
+
const log = envelope.Log;
|
|
63755
|
+
if (typeof log === "string" && log !== "") {
|
|
63756
|
+
notes.push(`**Log:** ${log}`);
|
|
63757
|
+
}
|
|
63758
|
+
return notes;
|
|
63759
|
+
}
|
|
63760
|
+
function renderMarkdown3(data) {
|
|
63761
|
+
if (data.Result !== RESULTS3.Success) {
|
|
63762
|
+
const failure = data;
|
|
63763
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
63764
|
+
if (failure.Data != null) {
|
|
63765
|
+
sections.push(markdownPayload3(failure.Data));
|
|
63766
|
+
}
|
|
63767
|
+
if (failure.Instructions) {
|
|
63768
|
+
sections.push(`> ${failure.Instructions}`);
|
|
63769
|
+
}
|
|
63770
|
+
return sections.filter((section) => section !== "").join(`
|
|
63771
|
+
|
|
63772
|
+
`);
|
|
63773
|
+
}
|
|
63774
|
+
if (!("Data" in data) || data.Data == null) {
|
|
63775
|
+
return markdownObject3(withoutPlumbing3(data), 0);
|
|
63776
|
+
}
|
|
63777
|
+
return [markdownPayload3(data.Data), ...markdownEnvelopeNotes3(data)].filter((section) => section !== "").join(`
|
|
63778
|
+
|
|
63779
|
+
`);
|
|
63780
|
+
}
|
|
62834
63781
|
function toYaml3(data) {
|
|
62835
63782
|
const codec = getYamlCodec3();
|
|
62836
63783
|
if (!codec) {
|
|
@@ -64358,7 +65305,7 @@ function executeProcessTool(session) {
|
|
|
64358
65305
|
return createToolHandler(session, {
|
|
64359
65306
|
name: ToolName.ExecuteProcess,
|
|
64360
65307
|
title: "Remote Exec",
|
|
64361
|
-
description: "Execute a shell command on the configured remote agent (Orchestrator unattended robot) " + "through the OS shell (cmd.exe /c on Windows, /bin/sh -c otherwise).
|
|
65308
|
+
description: "Execute a shell command on the configured remote agent (Orchestrator unattended robot) " + "through the OS shell (cmd.exe /c on Windows, /bin/sh -c otherwise). Live Authoring runs it " + "on the shared RemoteSessionAgent; Remote Run Only, the default, as an Orchestrator job of its " + "own. --package-id/--package-version restore a NuGet package and run from its folder. " + "Output streams live; --timeout kills it.",
|
|
64362
65309
|
requiresProject: true,
|
|
64363
65310
|
inputSchema: {
|
|
64364
65311
|
type: "object",
|
|
@@ -64397,10 +65344,9 @@ function executeProcessTool(session) {
|
|
|
64397
65344
|
return errorResult("--package-id and --package-version must be provided together.");
|
|
64398
65345
|
}
|
|
64399
65346
|
try {
|
|
64400
|
-
await session2.execute((instance) => instance.helmServices.remoteConnection.enableRemoteConnection(true), { requiresProject: true, backend: "helm" /* Helm */ });
|
|
64401
65347
|
const rawResult = await session2.execute((inst) => {
|
|
64402
65348
|
import_coreipc5.ipc.callback.forAddress(import_coreipc5.ipc.namedPipe(inst.ipcEndpointName)).forService("IHelmRemoteCallback").is(new HelmRemoteCallbackHandler);
|
|
64403
|
-
return inst.helmServices.
|
|
65349
|
+
return inst.helmServices.remoteSession.executeProcess({
|
|
64404
65350
|
commandLine: command,
|
|
64405
65351
|
workingDirectory: workingDirectory ?? null,
|
|
64406
65352
|
timeoutMilliseconds: timeoutMs ?? null,
|
|
@@ -66010,12 +66956,58 @@ function openProjectTool(session) {
|
|
|
66010
66956
|
});
|
|
66011
66957
|
}
|
|
66012
66958
|
|
|
66959
|
+
// src/tools/local/remote-echo.ts
|
|
66960
|
+
function remoteEchoTool(session) {
|
|
66961
|
+
return createToolHandler(session, {
|
|
66962
|
+
name: ToolName.RemoteEcho,
|
|
66963
|
+
title: "Remote Echo",
|
|
66964
|
+
description: "Echo a message off the RemoteSessionAgent running on the configured remote agent " + "(Orchestrator unattended robot) and print the reply. Live Authoring only - Remote Run Only, " + "the default, has no agent to answer. Starts the agent on first use; every echo travels on a " + "channel of its own. Configure the target first with `rpa remote configure --live-authoring`.",
|
|
66965
|
+
requiresProject: true,
|
|
66966
|
+
inputSchema: {
|
|
66967
|
+
type: "object",
|
|
66968
|
+
properties: {
|
|
66969
|
+
message: {
|
|
66970
|
+
type: "string",
|
|
66971
|
+
description: "Text the RemoteSessionAgent echoes back, so concurrent callers can tell their replies apart."
|
|
66972
|
+
}
|
|
66973
|
+
},
|
|
66974
|
+
required: ["message"]
|
|
66975
|
+
}
|
|
66976
|
+
}, async (session2, args) => {
|
|
66977
|
+
const message = args.message;
|
|
66978
|
+
try {
|
|
66979
|
+
const result = await session2.execute((instance) => instance.helmServices.remoteSession.echo({ message }), { requiresProject: true, backend: "helm" /* Helm */ });
|
|
66980
|
+
let isError = false;
|
|
66981
|
+
try {
|
|
66982
|
+
isError = JSON.parse(result)?.success === false;
|
|
66983
|
+
} catch {}
|
|
66984
|
+
return {
|
|
66985
|
+
content: [{ type: "text", text: result }],
|
|
66986
|
+
isError
|
|
66987
|
+
};
|
|
66988
|
+
} catch (e) {
|
|
66989
|
+
return errorResult2(e instanceof Error ? e.message : String(e));
|
|
66990
|
+
}
|
|
66991
|
+
});
|
|
66992
|
+
}
|
|
66993
|
+
function errorResult2(error) {
|
|
66994
|
+
return {
|
|
66995
|
+
content: [
|
|
66996
|
+
{
|
|
66997
|
+
type: "text",
|
|
66998
|
+
text: JSON.stringify({ success: false, error })
|
|
66999
|
+
}
|
|
67000
|
+
],
|
|
67001
|
+
isError: true
|
|
67002
|
+
};
|
|
67003
|
+
}
|
|
67004
|
+
|
|
66013
67005
|
// src/tools/local/remote-uia-session.ts
|
|
66014
67006
|
function enableRemoteUiaTool(session) {
|
|
66015
67007
|
return createToolHandler(session, {
|
|
66016
67008
|
name: ToolName.EnableRemoteUia,
|
|
66017
|
-
title: "
|
|
66018
|
-
description: "Start remote
|
|
67009
|
+
title: "Start Remote Session",
|
|
67010
|
+
description: "Start the remote session: bring up the app on the remote agent (Orchestrator " + "unattended robot) that remote runs, debug sessions and commands travel over. " + "Configure the target first with `rpa remote configure`, or this fails. Starting one " + "already running is a no-op; reconfiguring restarts it. The UI Automation design " + "host is not started here - the first `uia --remote` command sets it up.",
|
|
66019
67011
|
requiresProject: true,
|
|
66020
67012
|
inputSchema: {
|
|
66021
67013
|
type: "object",
|
|
@@ -66026,8 +67018,8 @@ function enableRemoteUiaTool(session) {
|
|
|
66026
67018
|
function disableRemoteUiaTool(session) {
|
|
66027
67019
|
return createToolHandler(session, {
|
|
66028
67020
|
name: ToolName.DisableRemoteUia,
|
|
66029
|
-
title: "
|
|
66030
|
-
description: "Stop
|
|
67021
|
+
title: "Stop Remote Session",
|
|
67022
|
+
description: "Stop the remote session: tear down the connection to the remote agent and release " + "it, including the UI Automation design host when one was started. A later `rpa " + "remote start`, or a `uia` command with --remote, brings a session up again. " + "Succeeds when no session is running or the previous target is no longer configured.",
|
|
66031
67023
|
requiresProject: true,
|
|
66032
67024
|
inputSchema: {
|
|
66033
67025
|
type: "object",
|
|
@@ -67863,7 +68855,7 @@ function uploadFileTool(session) {
|
|
|
67863
68855
|
return createToolHandler(session, {
|
|
67864
68856
|
name: ToolName.UploadFile,
|
|
67865
68857
|
title: "Upload File",
|
|
67866
|
-
description: "Upload a local file to the configured remote agent (Orchestrator unattended robot). " + "Configure the target first with `rpa remote configure`.
|
|
68858
|
+
description: "Upload a local file to the configured remote agent (Orchestrator unattended robot). " + "Configure the target first with `rpa remote configure`. Live Authoring runs it on the shared " + "RemoteSessionAgent; Remote Run Only, the default, as an Orchestrator job of its own. The file " + "travels through a temporary Orchestrator bucket that is deleted afterwards.",
|
|
67867
68859
|
requiresProject: true,
|
|
67868
68860
|
inputSchema: {
|
|
67869
68861
|
type: "object",
|
|
@@ -67888,7 +68880,7 @@ function downloadFileTool(session) {
|
|
|
67888
68880
|
return createToolHandler(session, {
|
|
67889
68881
|
name: ToolName.DownloadFile,
|
|
67890
68882
|
title: "Download File",
|
|
67891
|
-
description: "Download a file from the configured remote agent (Orchestrator unattended robot) to a " + "local path. Configure the target first with `rpa remote configure`.
|
|
68883
|
+
description: "Download a file from the configured remote agent (Orchestrator unattended robot) to a " + "local path. Configure the target first with `rpa remote configure`. Live Authoring runs it on " + "the shared RemoteSessionAgent; Remote Run Only, the default, as an Orchestrator job of its own. " + "The file travels through a temporary Orchestrator bucket that is deleted afterwards.",
|
|
67892
68884
|
requiresProject: true,
|
|
67893
68885
|
inputSchema: {
|
|
67894
68886
|
type: "object",
|
|
@@ -67911,7 +68903,7 @@ function downloadFileTool(session) {
|
|
|
67911
68903
|
}
|
|
67912
68904
|
async function transferFile(session, command, paths) {
|
|
67913
68905
|
try {
|
|
67914
|
-
const rawResult = await session.execute((inst) => command === "UploadFile" ? inst.helmServices.
|
|
68906
|
+
const rawResult = await session.execute((inst) => command === "UploadFile" ? inst.helmServices.remoteSession.uploadFile(paths) : inst.helmServices.remoteSession.downloadFile(paths), { requiresProject: true, backend: "helm" /* Helm */ });
|
|
67915
68907
|
return {
|
|
67916
68908
|
content: [{ type: "text", text: rawResult }],
|
|
67917
68909
|
isError: resultHasErrors(rawResult)
|
|
@@ -67942,6 +68934,7 @@ function createAllLocalTools(session, cloudClient, hostStudioPid) {
|
|
|
67942
68934
|
closeProjectTool(session),
|
|
67943
68935
|
configureRemoteRobotTool(session),
|
|
67944
68936
|
showRemoteConnectionTool(session),
|
|
68937
|
+
remoteEchoTool(session),
|
|
67945
68938
|
enableRemoteUiaTool(session),
|
|
67946
68939
|
disableRemoteUiaTool(session),
|
|
67947
68940
|
executeProcessTool(session),
|
|
@@ -68078,12 +69071,6 @@ var registerCommands = async (program5, options) => {
|
|
|
68078
69071
|
}, undefined, session, format, { resolverDeps, robotDir: resolved.robotDir });
|
|
68079
69072
|
const toolProvider = resolveToolProvider(resolved, session);
|
|
68080
69073
|
await registerMcpCommands(program5, toolProvider);
|
|
68081
|
-
const attachWrapperOptionsRecursively = (cmd) => {
|
|
68082
|
-
for (const sub4 of cmd.commands) {
|
|
68083
|
-
attachWrapperOptions(sub4);
|
|
68084
|
-
attachWrapperOptionsRecursively(sub4);
|
|
68085
|
-
}
|
|
68086
|
-
};
|
|
68087
69074
|
attachWrapperOptionsRecursively(program5);
|
|
68088
69075
|
program5.on("command:*", (operands) => {
|
|
68089
69076
|
console.error(`Unknown command: ${operands[0]}`);
|