@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/executor-tool.js
CHANGED
|
@@ -10283,6 +10283,7 @@ __export(exports_dist, {
|
|
|
10283
10283
|
resolveEnvFilePathAsync: () => resolveEnvFilePathAsync,
|
|
10284
10284
|
resolveEnvFileLocationAsync: () => resolveEnvFileLocationAsync,
|
|
10285
10285
|
resolveAuthProfileFilePath: () => resolveAuthProfileFilePath,
|
|
10286
|
+
resolveAuthProfileDirPath: () => resolveAuthProfileDirPath,
|
|
10286
10287
|
registerRobotClientLoader: () => registerRobotClientLoader,
|
|
10287
10288
|
refreshTokenFingerprint: () => refreshTokenFingerprint,
|
|
10288
10289
|
refreshAccessToken: () => refreshAccessToken,
|
|
@@ -10294,6 +10295,7 @@ __export(exports_dist, {
|
|
|
10294
10295
|
logout: () => logout,
|
|
10295
10296
|
loadRefreshBreaker: () => loadRefreshBreaker,
|
|
10296
10297
|
loadEnvFileAsync: () => loadEnvFileAsync,
|
|
10298
|
+
listAuthProfileNamesAsync: () => listAuthProfileNamesAsync,
|
|
10297
10299
|
isTokenRefreshOAuthFailure: () => isTokenRefreshOAuthFailure,
|
|
10298
10300
|
isTenantSelectionError: () => isTenantSelectionError,
|
|
10299
10301
|
isRobotAuthEnforced: () => isRobotAuthEnforced,
|
|
@@ -10304,16 +10306,20 @@ __export(exports_dist, {
|
|
|
10304
10306
|
interactiveLogin: () => interactiveLogin,
|
|
10305
10307
|
getLoginStatusWithDeps: () => getLoginStatusWithDeps,
|
|
10306
10308
|
getLoginStatusAsync: () => getLoginStatusAsync,
|
|
10309
|
+
getAuthProfilesRootPath: () => getAuthProfilesRootPath,
|
|
10307
10310
|
getAuthEnv: () => getAuthEnv,
|
|
10308
10311
|
getAuthContext: () => getAuthContext,
|
|
10309
10312
|
getActiveAuthProfileFilePath: () => getActiveAuthProfileFilePath,
|
|
10310
10313
|
getActiveAuthProfile: () => getActiveAuthProfile,
|
|
10311
10314
|
fetchTenantsAndOrganizations: () => fetchTenantsAndOrganizations,
|
|
10312
10315
|
federatedCredentialsLogin: () => federatedCredentialsLogin,
|
|
10316
|
+
describeAuthProfilesAsync: () => describeAuthProfilesAsync,
|
|
10317
|
+
deleteAuthProfileAsync: () => deleteAuthProfileAsync,
|
|
10313
10318
|
clientCredentialsLogin: () => clientCredentialsLogin,
|
|
10314
10319
|
clearRefreshBreaker: () => clearRefreshBreaker,
|
|
10315
10320
|
clearActiveAuthProfile: () => clearActiveAuthProfile,
|
|
10316
10321
|
authenticate: () => authenticate,
|
|
10322
|
+
authProfileExistsAsync: () => authProfileExistsAsync,
|
|
10317
10323
|
TokenRefreshOAuthError: () => TokenRefreshOAuthError,
|
|
10318
10324
|
TenantSelectionRequiredError: () => TenantSelectionRequiredError,
|
|
10319
10325
|
TenantSelectionError: () => TenantSelectionError,
|
|
@@ -11097,6 +11103,63 @@ function getActiveAuthProfileFilePath() {
|
|
|
11097
11103
|
const profile = getActiveAuthProfile();
|
|
11098
11104
|
return profile ? resolveAuthProfileFilePath(profile) : undefined;
|
|
11099
11105
|
}
|
|
11106
|
+
function getAuthProfilesRootPath() {
|
|
11107
|
+
const fs7 = getFileSystem();
|
|
11108
|
+
return fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR);
|
|
11109
|
+
}
|
|
11110
|
+
function resolveAuthProfileDirPath(profile) {
|
|
11111
|
+
const normalized = normalizeAuthProfileName(profile);
|
|
11112
|
+
if (normalized === undefined) {
|
|
11113
|
+
throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile directory.`);
|
|
11114
|
+
}
|
|
11115
|
+
const fs7 = getFileSystem();
|
|
11116
|
+
return fs7.path.join(getAuthProfilesRootPath(), normalized);
|
|
11117
|
+
}
|
|
11118
|
+
async function listAuthProfileNamesAsync() {
|
|
11119
|
+
const fs7 = getFileSystem();
|
|
11120
|
+
const root = getAuthProfilesRootPath();
|
|
11121
|
+
if (!await fs7.exists(root)) {
|
|
11122
|
+
return [];
|
|
11123
|
+
}
|
|
11124
|
+
const [readError, entries] = await catchError(fs7.readdir(root));
|
|
11125
|
+
if (readError || !entries) {
|
|
11126
|
+
return [];
|
|
11127
|
+
}
|
|
11128
|
+
const names = [];
|
|
11129
|
+
for (const entry of entries) {
|
|
11130
|
+
if (!PROFILE_NAME_RE.test(entry) || entry === DEFAULT_AUTH_PROFILE) {
|
|
11131
|
+
continue;
|
|
11132
|
+
}
|
|
11133
|
+
const stats = await fs7.stat(fs7.path.join(root, entry));
|
|
11134
|
+
if (stats?.isDirectory()) {
|
|
11135
|
+
names.push(entry);
|
|
11136
|
+
}
|
|
11137
|
+
}
|
|
11138
|
+
return names.sort((a, b) => a.localeCompare(b));
|
|
11139
|
+
}
|
|
11140
|
+
async function authProfileExistsAsync(profile) {
|
|
11141
|
+
const fs7 = getFileSystem();
|
|
11142
|
+
const [pathError, dir] = catchError(() => resolveAuthProfileDirPath(profile));
|
|
11143
|
+
if (pathError || dir === undefined) {
|
|
11144
|
+
return false;
|
|
11145
|
+
}
|
|
11146
|
+
const stats = await fs7.stat(dir);
|
|
11147
|
+
return stats?.isDirectory() === true;
|
|
11148
|
+
}
|
|
11149
|
+
async function deleteAuthProfileAsync(profile) {
|
|
11150
|
+
const dir = resolveAuthProfileDirPath(profile);
|
|
11151
|
+
const fs7 = getFileSystem();
|
|
11152
|
+
const relativeToRoot = fs7.path.relative(getAuthProfilesRootPath(), dir);
|
|
11153
|
+
if (relativeToRoot === "" || relativeToRoot.startsWith("..") || fs7.path.isAbsolute(relativeToRoot)) {
|
|
11154
|
+
throw new AuthProfileValidationError(`Refusing to delete "${profile}": resolved path escapes the profiles directory.`);
|
|
11155
|
+
}
|
|
11156
|
+
const stats = await fs7.stat(dir);
|
|
11157
|
+
if (stats?.isDirectory() !== true) {
|
|
11158
|
+
return;
|
|
11159
|
+
}
|
|
11160
|
+
await fs7.rm(dir);
|
|
11161
|
+
return dir;
|
|
11162
|
+
}
|
|
11100
11163
|
async function refreshTokenFingerprint(refreshToken) {
|
|
11101
11164
|
const bytes = new TextEncoder().encode(refreshToken);
|
|
11102
11165
|
if (globalThis.crypto?.subtle) {
|
|
@@ -11544,6 +11607,56 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
11544
11607
|
function errorMessage(error) {
|
|
11545
11608
|
return error instanceof Error ? error.message : String(error);
|
|
11546
11609
|
}
|
|
11610
|
+
function statusFromToken(accessToken) {
|
|
11611
|
+
if (!accessToken) {
|
|
11612
|
+
return { status: "Not logged in" };
|
|
11613
|
+
}
|
|
11614
|
+
const expiration = getTokenExpiration(accessToken);
|
|
11615
|
+
if (expiration === undefined) {
|
|
11616
|
+
return { status: "Logged in" };
|
|
11617
|
+
}
|
|
11618
|
+
return {
|
|
11619
|
+
status: expiration.getTime() <= Date.now() ? "Expired" : "Logged in",
|
|
11620
|
+
expiresAt: expiration.toISOString()
|
|
11621
|
+
};
|
|
11622
|
+
}
|
|
11623
|
+
async function describeAuthProfileAsync(name, filePath, active) {
|
|
11624
|
+
const base = {
|
|
11625
|
+
name,
|
|
11626
|
+
active,
|
|
11627
|
+
...filePath ? { path: filePath } : {}
|
|
11628
|
+
};
|
|
11629
|
+
if (!filePath) {
|
|
11630
|
+
return { ...base, status: "Not logged in" };
|
|
11631
|
+
}
|
|
11632
|
+
const fs7 = getFileSystem();
|
|
11633
|
+
const [readError, content] = await catchError(fs7.readFile(filePath, "utf-8"));
|
|
11634
|
+
if (readError) {
|
|
11635
|
+
return { ...base, status: "Unreadable" };
|
|
11636
|
+
}
|
|
11637
|
+
if (content === null || content === undefined) {
|
|
11638
|
+
return { ...base, status: "Not logged in" };
|
|
11639
|
+
}
|
|
11640
|
+
const values = parseEnvContent(content);
|
|
11641
|
+
return {
|
|
11642
|
+
...base,
|
|
11643
|
+
...values[ORGANIZATION_NAME_KEY] ? { organizationName: values[ORGANIZATION_NAME_KEY] } : {},
|
|
11644
|
+
...values[TENANT_NAME_KEY] ? { tenantName: values[TENANT_NAME_KEY] } : {},
|
|
11645
|
+
...values[URL_KEY] ? { url: values[URL_KEY] } : {},
|
|
11646
|
+
...statusFromToken(values[ACCESS_TOKEN_KEY])
|
|
11647
|
+
};
|
|
11648
|
+
}
|
|
11649
|
+
async function describeAuthProfilesAsync() {
|
|
11650
|
+
const activeProfile = getActiveAuthProfile();
|
|
11651
|
+
const [defaultPathError, defaultLocation] = await catchError(resolveEnvFilePathAsync());
|
|
11652
|
+
const rows = [
|
|
11653
|
+
await describeAuthProfileAsync(DEFAULT_AUTH_PROFILE, defaultPathError ? undefined : defaultLocation?.absolutePath, activeProfile === undefined)
|
|
11654
|
+
];
|
|
11655
|
+
for (const name of await listAuthProfileNamesAsync()) {
|
|
11656
|
+
rows.push(await describeAuthProfileAsync(name, resolveAuthProfileFilePath(name), activeProfile === name));
|
|
11657
|
+
}
|
|
11658
|
+
return rows;
|
|
11659
|
+
}
|
|
11547
11660
|
function isTenantSelectionError(error) {
|
|
11548
11661
|
if (!(error instanceof Object) || !("code" in error)) {
|
|
11549
11662
|
return false;
|
|
@@ -12795,16 +12908,7 @@ var __defProp2, __returnValue2 = (v) => v, __export2 = (target, all) => {
|
|
|
12795
12908
|
absolutePath: undefined,
|
|
12796
12909
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
12797
12910
|
};
|
|
12798
|
-
},
|
|
12799
|
-
const fs7 = getFileSystem();
|
|
12800
|
-
const absolutePath = fs7.path.isAbsolute(envPath) ? envPath : fs7.path.join(fs7.env.cwd(), envPath);
|
|
12801
|
-
if (!await fs7.exists(absolutePath)) {
|
|
12802
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
12803
|
-
}
|
|
12804
|
-
const content = await fs7.readFile(absolutePath, "utf-8");
|
|
12805
|
-
if (content === null) {
|
|
12806
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
12807
|
-
}
|
|
12911
|
+
}, parseEnvContent = (content) => {
|
|
12808
12912
|
const env = {};
|
|
12809
12913
|
for (const line of content.split(`
|
|
12810
12914
|
`)) {
|
|
@@ -12824,6 +12928,17 @@ var __defProp2, __returnValue2 = (v) => v, __export2 = (target, all) => {
|
|
|
12824
12928
|
env[key] = value;
|
|
12825
12929
|
}
|
|
12826
12930
|
return env;
|
|
12931
|
+
}, loadEnvFileAsync = async ({ envPath }) => {
|
|
12932
|
+
const fs7 = getFileSystem();
|
|
12933
|
+
const absolutePath = fs7.path.isAbsolute(envPath) ? envPath : fs7.path.join(fs7.env.cwd(), envPath);
|
|
12934
|
+
if (!await fs7.exists(absolutePath)) {
|
|
12935
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
12936
|
+
}
|
|
12937
|
+
const content = await fs7.readFile(absolutePath, "utf-8");
|
|
12938
|
+
if (content === null) {
|
|
12939
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
12940
|
+
}
|
|
12941
|
+
return parseEnvContent(content);
|
|
12827
12942
|
}, saveEnvFileAsync = async ({
|
|
12828
12943
|
envPath,
|
|
12829
12944
|
data,
|
|
@@ -12990,7 +13105,7 @@ var __defProp2, __returnValue2 = (v) => v, __export2 = (target, all) => {
|
|
|
12990
13105
|
authEnv.UIPATH_TENANT_NAME = status.tenantName;
|
|
12991
13106
|
}
|
|
12992
13107
|
return { authEnv, loginStatus: status };
|
|
12993
|
-
}, requestClientCredentialsToken = async ({
|
|
13108
|
+
}, ORGANIZATION_NAME_KEY = "UIPATH_ORGANIZATION_NAME", TENANT_NAME_KEY = "UIPATH_TENANT_NAME", URL_KEY = "UIPATH_URL", ACCESS_TOKEN_KEY = "UIPATH_ACCESS_TOKEN", requestClientCredentialsToken = async ({
|
|
12994
13109
|
tokenEndpoint,
|
|
12995
13110
|
baseUrl,
|
|
12996
13111
|
params,
|
|
@@ -13889,6 +14004,7 @@ The identity server that issued this token is not the one you pointed --authorit
|
|
|
13889
14004
|
CredentialSource2["Robot"] = "robot";
|
|
13890
14005
|
CredentialSource2["EnvironmentVariables"] = "env-vars";
|
|
13891
14006
|
})(CredentialSource ||= {});
|
|
14007
|
+
init_src();
|
|
13892
14008
|
ClientCredentialsAuthenticationError = class ClientCredentialsAuthenticationError extends Error {
|
|
13893
14009
|
status;
|
|
13894
14010
|
constructor(message, status) {
|
|
@@ -14112,6 +14228,7 @@ var INTEROP_MANIFEST = "interop-manifest.json";
|
|
|
14112
14228
|
var STUDIO_EXE = "UiPath.Studio.exe";
|
|
14113
14229
|
var STUDIO_SUBDIR = "Studio";
|
|
14114
14230
|
var ROBOT_SUBDIR = "Robot";
|
|
14231
|
+
var HELM_DOTNET_MAJOR = 10;
|
|
14115
14232
|
var HELM_EXE = process.platform === "win32" ? "UiPath.Studio.Helm.exe" : "UiPath.Studio.Helm";
|
|
14116
14233
|
function normalizePath(path) {
|
|
14117
14234
|
return normalize(path).replace(/[\\/]+$/, "").toLowerCase();
|
|
@@ -14822,6 +14939,9 @@ class RemoteConnectionServiceProxy {
|
|
|
14822
14939
|
ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream) {
|
|
14823
14940
|
throw null;
|
|
14824
14941
|
}
|
|
14942
|
+
SetLiveAuthoring(liveAuthoring) {
|
|
14943
|
+
throw null;
|
|
14944
|
+
}
|
|
14825
14945
|
EnableRemoteConnection(enabled) {
|
|
14826
14946
|
throw null;
|
|
14827
14947
|
}
|
|
@@ -14832,6 +14952,9 @@ class RemoteConnectionServiceProxy {
|
|
|
14832
14952
|
__legacyDecorateClassTS([
|
|
14833
14953
|
import_coreipc2.ipc.$operation
|
|
14834
14954
|
], RemoteConnectionServiceProxy.prototype, "ConfigureUnattendedRobot", null);
|
|
14955
|
+
__legacyDecorateClassTS([
|
|
14956
|
+
import_coreipc2.ipc.$operation
|
|
14957
|
+
], RemoteConnectionServiceProxy.prototype, "SetLiveAuthoring", null);
|
|
14835
14958
|
__legacyDecorateClassTS([
|
|
14836
14959
|
import_coreipc2.ipc.$operation
|
|
14837
14960
|
], RemoteConnectionServiceProxy.prototype, "EnableRemoteConnection", null);
|
|
@@ -14844,6 +14967,7 @@ RemoteConnectionServiceProxy = __legacyDecorateClassTS([
|
|
|
14844
14967
|
function adaptRemoteConnectionServiceProxy(proxy) {
|
|
14845
14968
|
return {
|
|
14846
14969
|
configureUnattendedRobot: (folderPath, robotName, machineName, runtimeName, enableLiveStream) => proxy.ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream),
|
|
14970
|
+
setLiveAuthoring: (liveAuthoring) => proxy.SetLiveAuthoring(liveAuthoring),
|
|
14847
14971
|
enableRemoteConnection: (enabled) => proxy.EnableRemoteConnection(enabled),
|
|
14848
14972
|
getRemoteConnection: () => proxy.GetRemoteConnection()
|
|
14849
14973
|
};
|
|
@@ -15168,7 +15292,10 @@ __legacyDecorateClassTS([
|
|
|
15168
15292
|
HelmRemoteCallbackProxy = __legacyDecorateClassTS([
|
|
15169
15293
|
import_coreipc4.ipc.$service({ endpoint: "IHelmRemoteCallback" })
|
|
15170
15294
|
], HelmRemoteCallbackProxy);
|
|
15171
|
-
class
|
|
15295
|
+
class HelmRemoteSessionServiceProxy {
|
|
15296
|
+
Echo(request) {
|
|
15297
|
+
throw null;
|
|
15298
|
+
}
|
|
15172
15299
|
ExecuteProcess(request) {
|
|
15173
15300
|
throw null;
|
|
15174
15301
|
}
|
|
@@ -15181,18 +15308,22 @@ class HelmRemoteServiceProxy {
|
|
|
15181
15308
|
}
|
|
15182
15309
|
__legacyDecorateClassTS([
|
|
15183
15310
|
import_coreipc4.ipc.$operation
|
|
15184
|
-
],
|
|
15311
|
+
], HelmRemoteSessionServiceProxy.prototype, "Echo", null);
|
|
15312
|
+
__legacyDecorateClassTS([
|
|
15313
|
+
import_coreipc4.ipc.$operation
|
|
15314
|
+
], HelmRemoteSessionServiceProxy.prototype, "ExecuteProcess", null);
|
|
15185
15315
|
__legacyDecorateClassTS([
|
|
15186
15316
|
import_coreipc4.ipc.$operation
|
|
15187
|
-
],
|
|
15317
|
+
], HelmRemoteSessionServiceProxy.prototype, "UploadFile", null);
|
|
15188
15318
|
__legacyDecorateClassTS([
|
|
15189
15319
|
import_coreipc4.ipc.$operation
|
|
15190
|
-
],
|
|
15191
|
-
|
|
15192
|
-
import_coreipc4.ipc.$service({ endpoint: "
|
|
15193
|
-
],
|
|
15194
|
-
function
|
|
15320
|
+
], HelmRemoteSessionServiceProxy.prototype, "DownloadFile", null);
|
|
15321
|
+
HelmRemoteSessionServiceProxy = __legacyDecorateClassTS([
|
|
15322
|
+
import_coreipc4.ipc.$service({ endpoint: "IHelmRemoteSessionService" })
|
|
15323
|
+
], HelmRemoteSessionServiceProxy);
|
|
15324
|
+
function adaptHelmRemoteSessionServiceProxy(proxy) {
|
|
15195
15325
|
return {
|
|
15326
|
+
echo: (request) => proxy.Echo(request),
|
|
15196
15327
|
executeProcess: (request) => proxy.ExecuteProcess({ Payload: request }),
|
|
15197
15328
|
uploadFile: (request) => proxy.UploadFile(request),
|
|
15198
15329
|
downloadFile: (request) => proxy.DownloadFile(request)
|
|
@@ -15274,6 +15405,9 @@ class RemoteConnectionServiceProxy2 {
|
|
|
15274
15405
|
ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream) {
|
|
15275
15406
|
throw null;
|
|
15276
15407
|
}
|
|
15408
|
+
SetLiveAuthoring(liveAuthoring) {
|
|
15409
|
+
throw null;
|
|
15410
|
+
}
|
|
15277
15411
|
EnableRemoteConnection(enabled) {
|
|
15278
15412
|
throw null;
|
|
15279
15413
|
}
|
|
@@ -15284,6 +15418,9 @@ class RemoteConnectionServiceProxy2 {
|
|
|
15284
15418
|
__legacyDecorateClassTS([
|
|
15285
15419
|
import_coreipc4.ipc.$operation
|
|
15286
15420
|
], RemoteConnectionServiceProxy2.prototype, "ConfigureUnattendedRobot", null);
|
|
15421
|
+
__legacyDecorateClassTS([
|
|
15422
|
+
import_coreipc4.ipc.$operation
|
|
15423
|
+
], RemoteConnectionServiceProxy2.prototype, "SetLiveAuthoring", null);
|
|
15287
15424
|
__legacyDecorateClassTS([
|
|
15288
15425
|
import_coreipc4.ipc.$operation
|
|
15289
15426
|
], RemoteConnectionServiceProxy2.prototype, "EnableRemoteConnection", null);
|
|
@@ -15296,6 +15433,7 @@ RemoteConnectionServiceProxy2 = __legacyDecorateClassTS([
|
|
|
15296
15433
|
function adaptRemoteConnectionServiceProxy2(proxy) {
|
|
15297
15434
|
return {
|
|
15298
15435
|
configureUnattendedRobot: (folderPath, robotName, machineName, runtimeName, enableLiveStream) => proxy.ConfigureUnattendedRobot(folderPath, robotName, machineName, runtimeName, enableLiveStream),
|
|
15436
|
+
setLiveAuthoring: (liveAuthoring) => proxy.SetLiveAuthoring(liveAuthoring),
|
|
15299
15437
|
enableRemoteConnection: (enabled) => proxy.EnableRemoteConnection(enabled),
|
|
15300
15438
|
getRemoteConnection: () => proxy.GetRemoteConnection()
|
|
15301
15439
|
};
|
|
@@ -15329,7 +15467,7 @@ class HelmServices {
|
|
|
15329
15467
|
authContext;
|
|
15330
15468
|
build;
|
|
15331
15469
|
lifecycle;
|
|
15332
|
-
|
|
15470
|
+
remoteSession;
|
|
15333
15471
|
run;
|
|
15334
15472
|
validation;
|
|
15335
15473
|
remoteConnection;
|
|
@@ -15340,7 +15478,7 @@ class HelmServices {
|
|
|
15340
15478
|
this.authContext = adaptHelmAuthContextServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmAuthContextServiceProxy));
|
|
15341
15479
|
this.build = adaptHelmBuildServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmBuildServiceProxy));
|
|
15342
15480
|
this.lifecycle = adaptHelmLifecycleServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmLifecycleServiceProxy));
|
|
15343
|
-
this.
|
|
15481
|
+
this.remoteSession = adaptHelmRemoteSessionServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmRemoteSessionServiceProxy));
|
|
15344
15482
|
this.run = adaptHelmRunServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmRunServiceProxy));
|
|
15345
15483
|
this.validation = adaptHelmValidationServiceProxy(import_coreipc4.ipc.proxy.withAddress(addr).withService(HelmValidationServiceProxy));
|
|
15346
15484
|
this.remoteConnection = adaptRemoteConnectionServiceProxy2(import_coreipc4.ipc.proxy.withAddress(addr).withService(RemoteConnectionServiceProxy2));
|
|
@@ -15462,6 +15600,8 @@ import { join as join6 } from "node:path";
|
|
|
15462
15600
|
var DEFAULT_MAX_SLOTS = 3;
|
|
15463
15601
|
var READY_MARKER = ".ready";
|
|
15464
15602
|
var STAGING_DIR = ".staging";
|
|
15603
|
+
var HELM_DEPS_JSON = "UiPath.Studio.Helm.deps.json";
|
|
15604
|
+
var PAYLOAD_NOT_SHIPPED = new Set(["System.Activities.ViewModels.dll"]);
|
|
15465
15605
|
var STALE_LOCK_MS = 5 * 60000;
|
|
15466
15606
|
var RECENT_USE_MS = 60000;
|
|
15467
15607
|
var STALE_STAGING_MS = 10 * 60000;
|
|
@@ -15520,6 +15660,31 @@ function releaseLock(lockPath) {
|
|
|
15520
15660
|
unlinkSync2(lockPath);
|
|
15521
15661
|
} catch {}
|
|
15522
15662
|
}
|
|
15663
|
+
function declaredRuntimeAssemblies(depsJsonPath) {
|
|
15664
|
+
const deps = JSON.parse(readFileSync(depsJsonPath, "utf-8"));
|
|
15665
|
+
const names = new Set;
|
|
15666
|
+
for (const libraries of Object.values(deps.targets ?? {})) {
|
|
15667
|
+
for (const library of Object.values(libraries)) {
|
|
15668
|
+
for (const path3 of Object.keys(library.runtime ?? {})) {
|
|
15669
|
+
const name = path3.split("/").pop();
|
|
15670
|
+
if (name)
|
|
15671
|
+
names.add(name);
|
|
15672
|
+
}
|
|
15673
|
+
}
|
|
15674
|
+
}
|
|
15675
|
+
return names;
|
|
15676
|
+
}
|
|
15677
|
+
function assertPayloadComplete(dir) {
|
|
15678
|
+
const manifest = join6(dir, HELM_DEPS_JSON);
|
|
15679
|
+
if (!existsSync2(manifest)) {
|
|
15680
|
+
throw new Error(`the copy has no ${HELM_DEPS_JSON}, so its payload cannot be verified`);
|
|
15681
|
+
}
|
|
15682
|
+
const declared = declaredRuntimeAssemblies(manifest);
|
|
15683
|
+
const missing = [...declared].filter((name) => !PAYLOAD_NOT_SHIPPED.has(name) && !existsSync2(join6(dir, name))).sort();
|
|
15684
|
+
if (missing.length === 0)
|
|
15685
|
+
return;
|
|
15686
|
+
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 ? ", …" : ""}`);
|
|
15687
|
+
}
|
|
15523
15688
|
function publishSlot(sourceToolsDir, slot, root, version, log) {
|
|
15524
15689
|
const stagingRoot = join6(root, STAGING_DIR);
|
|
15525
15690
|
mkdirSync2(stagingRoot, { recursive: true });
|
|
@@ -15527,6 +15692,12 @@ function publishSlot(sourceToolsDir, slot, root, version, log) {
|
|
|
15527
15692
|
rmSync2(staging, { recursive: true, force: true });
|
|
15528
15693
|
log(`Materializing Helm slot ${slot} from ${sourceToolsDir}`);
|
|
15529
15694
|
cpSync(sourceToolsDir, staging, { recursive: true });
|
|
15695
|
+
try {
|
|
15696
|
+
assertPayloadComplete(staging);
|
|
15697
|
+
} catch (err) {
|
|
15698
|
+
rmSync2(staging, { recursive: true, force: true });
|
|
15699
|
+
throw err;
|
|
15700
|
+
}
|
|
15530
15701
|
const now = new Date;
|
|
15531
15702
|
const markerFd = openSync2(join6(staging, READY_MARKER), "w");
|
|
15532
15703
|
writeSync(markerFd, now.getTime().toString());
|
|
@@ -25900,28 +26071,32 @@ function isPlainRecord(value) {
|
|
|
25900
26071
|
const prototype = Object.getPrototypeOf(value);
|
|
25901
26072
|
return prototype === Object.prototype || prototype === null;
|
|
25902
26073
|
}
|
|
25903
|
-
function
|
|
26074
|
+
function splitPagedEnvelope(value) {
|
|
25904
26075
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
25905
26076
|
return null;
|
|
25906
|
-
const entries = Object.
|
|
26077
|
+
const entries = Object.entries(value);
|
|
25907
26078
|
if (entries.length === 0)
|
|
25908
26079
|
return null;
|
|
25909
|
-
let
|
|
25910
|
-
|
|
25911
|
-
for (const entry of entries) {
|
|
26080
|
+
let found = null;
|
|
26081
|
+
const meta = Object.create(null);
|
|
26082
|
+
for (const [key, entry] of entries) {
|
|
25912
26083
|
if (Array.isArray(entry)) {
|
|
25913
|
-
if (
|
|
26084
|
+
if (found !== null)
|
|
25914
26085
|
return null;
|
|
25915
|
-
|
|
26086
|
+
found = { key, rows: entry };
|
|
25916
26087
|
} else if (entry !== null && typeof entry === "object") {
|
|
25917
26088
|
return null;
|
|
25918
26089
|
} else {
|
|
25919
|
-
|
|
26090
|
+
meta[key] = entry;
|
|
25920
26091
|
}
|
|
25921
26092
|
}
|
|
25922
|
-
if (
|
|
26093
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
25923
26094
|
return null;
|
|
25924
|
-
return
|
|
26095
|
+
return { ...found, meta };
|
|
26096
|
+
}
|
|
26097
|
+
function extractPagedRows(value) {
|
|
26098
|
+
const paged = splitPagedEnvelope(value);
|
|
26099
|
+
return paged === null ? null : paged.rows;
|
|
25925
26100
|
}
|
|
25926
26101
|
function toLowerCamelCaseKey(key) {
|
|
25927
26102
|
if (!key)
|
|
@@ -26025,6 +26200,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
26025
26200
|
}
|
|
26026
26201
|
break;
|
|
26027
26202
|
}
|
|
26203
|
+
case "markdown":
|
|
26204
|
+
logFn(renderMarkdown(data));
|
|
26205
|
+
break;
|
|
26028
26206
|
default: {
|
|
26029
26207
|
const hasData = "Data" in data && data.Data != null;
|
|
26030
26208
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -26049,6 +26227,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
26049
26227
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
26050
26228
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
26051
26229
|
}
|
|
26230
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
26231
|
+
function isPlumbingKey(key) {
|
|
26232
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
26233
|
+
}
|
|
26052
26234
|
function cellToString(val) {
|
|
26053
26235
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
26054
26236
|
}
|
|
@@ -26064,7 +26246,7 @@ function wrapText(text, width) {
|
|
|
26064
26246
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
26065
26247
|
if (data.length === 0)
|
|
26066
26248
|
return;
|
|
26067
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
26249
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
26068
26250
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
26069
26251
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
26070
26252
|
logFn(header);
|
|
@@ -26086,7 +26268,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
26086
26268
|
}
|
|
26087
26269
|
var NESTED_INDENT = " ";
|
|
26088
26270
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
26089
|
-
const keys = Object.keys(data).filter((key) => !
|
|
26271
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
26090
26272
|
if (keys.length === 0)
|
|
26091
26273
|
return;
|
|
26092
26274
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -26117,7 +26299,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
26117
26299
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
26118
26300
|
if (data.length === 0)
|
|
26119
26301
|
return;
|
|
26120
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
26302
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
26121
26303
|
if (keys.length === 0)
|
|
26122
26304
|
return;
|
|
26123
26305
|
if (!process.stdout.isTTY) {
|
|
@@ -26191,6 +26373,216 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
26191
26373
|
logFn(`Log: ${externalLogValue}`);
|
|
26192
26374
|
}
|
|
26193
26375
|
}
|
|
26376
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
26377
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
26378
|
+
function markdownHeading(depth) {
|
|
26379
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
26380
|
+
}
|
|
26381
|
+
var BACKTICK_RUN = /`+/g;
|
|
26382
|
+
function fencedBlock(text) {
|
|
26383
|
+
const first = text.trimStart()[0];
|
|
26384
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
26385
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
26386
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
26387
|
+
return `${fence}${language}
|
|
26388
|
+
${text}
|
|
26389
|
+
${fence}`;
|
|
26390
|
+
}
|
|
26391
|
+
function markdownCell(value) {
|
|
26392
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
26393
|
+
return text.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
|
|
26394
|
+
}
|
|
26395
|
+
function markdownLabel(key) {
|
|
26396
|
+
return key.replace(/\s*\n\s*/g, " ").replace(/[\\`*|]/g, "\\$&");
|
|
26397
|
+
}
|
|
26398
|
+
function withoutPlumbing(record) {
|
|
26399
|
+
const kept = Object.create(null);
|
|
26400
|
+
for (const [key, value] of Object.entries(record)) {
|
|
26401
|
+
if (!isPlumbingKey(key))
|
|
26402
|
+
kept[key] = value;
|
|
26403
|
+
}
|
|
26404
|
+
return kept;
|
|
26405
|
+
}
|
|
26406
|
+
function rowsWithoutPlumbing(rows) {
|
|
26407
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
26408
|
+
}
|
|
26409
|
+
function markdownTable(rows) {
|
|
26410
|
+
const columns = [];
|
|
26411
|
+
const seen = new Set;
|
|
26412
|
+
for (const row of rows) {
|
|
26413
|
+
for (const key of Object.keys(row)) {
|
|
26414
|
+
if (!seen.has(key)) {
|
|
26415
|
+
seen.add(key);
|
|
26416
|
+
columns.push(key);
|
|
26417
|
+
}
|
|
26418
|
+
}
|
|
26419
|
+
}
|
|
26420
|
+
if (columns.length === 0)
|
|
26421
|
+
return null;
|
|
26422
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
26423
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
26424
|
+
return null;
|
|
26425
|
+
}
|
|
26426
|
+
return [
|
|
26427
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
26428
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
26429
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
26430
|
+
].join(`
|
|
26431
|
+
`);
|
|
26432
|
+
}
|
|
26433
|
+
function extractMessageSequence(rows) {
|
|
26434
|
+
const messages = [];
|
|
26435
|
+
for (const row of rows) {
|
|
26436
|
+
const message = extractSingleMessage(row);
|
|
26437
|
+
if (message === null)
|
|
26438
|
+
return null;
|
|
26439
|
+
messages.push(message);
|
|
26440
|
+
}
|
|
26441
|
+
return messages.join(`
|
|
26442
|
+
|
|
26443
|
+
`);
|
|
26444
|
+
}
|
|
26445
|
+
function markdownRows(rows, depth) {
|
|
26446
|
+
if (rows.length === 0)
|
|
26447
|
+
return "(none)";
|
|
26448
|
+
if (!isPlainObjectArray(rows)) {
|
|
26449
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
26450
|
+
`);
|
|
26451
|
+
}
|
|
26452
|
+
const prose = extractMessageSequence(rows);
|
|
26453
|
+
if (prose !== null)
|
|
26454
|
+
return prose;
|
|
26455
|
+
const table = markdownTable(rows);
|
|
26456
|
+
if (table !== null)
|
|
26457
|
+
return table;
|
|
26458
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
26459
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
26460
|
+
}
|
|
26461
|
+
return rows.map((row, index) => [
|
|
26462
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
26463
|
+
markdownObject(row, depth + 1)
|
|
26464
|
+
].join(`
|
|
26465
|
+
|
|
26466
|
+
`)).join(`
|
|
26467
|
+
|
|
26468
|
+
`);
|
|
26469
|
+
}
|
|
26470
|
+
function markdownObject(obj, depth) {
|
|
26471
|
+
const scalars = [];
|
|
26472
|
+
const blocks = [];
|
|
26473
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
26474
|
+
if (value === undefined)
|
|
26475
|
+
continue;
|
|
26476
|
+
const label = markdownLabel(key);
|
|
26477
|
+
if (Array.isArray(value)) {
|
|
26478
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
26479
|
+
|
|
26480
|
+
${markdownRows(value, depth + 1)}`);
|
|
26481
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
26482
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
26483
|
+
if (nested !== "") {
|
|
26484
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
26485
|
+
|
|
26486
|
+
${nested}`);
|
|
26487
|
+
}
|
|
26488
|
+
} else if (typeof value === "string" && value.includes(`
|
|
26489
|
+
`)) {
|
|
26490
|
+
blocks.push(`**${label}:**
|
|
26491
|
+
|
|
26492
|
+
${fencedBlock(value)}`);
|
|
26493
|
+
} else {
|
|
26494
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
26495
|
+
}
|
|
26496
|
+
}
|
|
26497
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
26498
|
+
`)] : [];
|
|
26499
|
+
sections.push(...blocks);
|
|
26500
|
+
return sections.join(`
|
|
26501
|
+
|
|
26502
|
+
`);
|
|
26503
|
+
}
|
|
26504
|
+
function extractSingleMessage(payload) {
|
|
26505
|
+
if (!isPlainRecord(payload))
|
|
26506
|
+
return null;
|
|
26507
|
+
const keys = Object.keys(payload);
|
|
26508
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
26509
|
+
return null;
|
|
26510
|
+
const value = payload[keys[0]];
|
|
26511
|
+
return typeof value === "string" ? value : null;
|
|
26512
|
+
}
|
|
26513
|
+
function markdownPayload(payload) {
|
|
26514
|
+
const message = extractSingleMessage(payload);
|
|
26515
|
+
if (message !== null)
|
|
26516
|
+
return message;
|
|
26517
|
+
if (Array.isArray(payload)) {
|
|
26518
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
26519
|
+
}
|
|
26520
|
+
const visible = withoutPlumbing(payload);
|
|
26521
|
+
const paged = splitPagedEnvelope(visible);
|
|
26522
|
+
if (paged !== null) {
|
|
26523
|
+
const meta = markdownObject(paged.meta, 0);
|
|
26524
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
26525
|
+
|
|
26526
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
26527
|
+
return meta === "" ? rows : `${meta}
|
|
26528
|
+
|
|
26529
|
+
${rows}`;
|
|
26530
|
+
}
|
|
26531
|
+
return markdownObject(visible, 0);
|
|
26532
|
+
}
|
|
26533
|
+
function isPaginationWorthShowing(value) {
|
|
26534
|
+
if (typeof value !== "object" || value === null)
|
|
26535
|
+
return false;
|
|
26536
|
+
const page = value;
|
|
26537
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
26538
|
+
}
|
|
26539
|
+
function markdownEnvelopeNotes(data) {
|
|
26540
|
+
const envelope = data;
|
|
26541
|
+
const notes = [];
|
|
26542
|
+
const warning = envelope.Warning;
|
|
26543
|
+
if (typeof warning === "string" && warning !== "") {
|
|
26544
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
26545
|
+
}
|
|
26546
|
+
const instructions = envelope.Instructions;
|
|
26547
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
26548
|
+
notes.push(`> ${instructions}`);
|
|
26549
|
+
}
|
|
26550
|
+
const pagination = envelope.Pagination;
|
|
26551
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
26552
|
+
const body = markdownObject(pagination, 1);
|
|
26553
|
+
if (body !== "") {
|
|
26554
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
26555
|
+
|
|
26556
|
+
${body}`);
|
|
26557
|
+
}
|
|
26558
|
+
}
|
|
26559
|
+
const log = envelope.Log;
|
|
26560
|
+
if (typeof log === "string" && log !== "") {
|
|
26561
|
+
notes.push(`**Log:** ${log}`);
|
|
26562
|
+
}
|
|
26563
|
+
return notes;
|
|
26564
|
+
}
|
|
26565
|
+
function renderMarkdown(data) {
|
|
26566
|
+
if (data.Result !== RESULTS.Success) {
|
|
26567
|
+
const failure = data;
|
|
26568
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
26569
|
+
if (failure.Data != null) {
|
|
26570
|
+
sections.push(markdownPayload(failure.Data));
|
|
26571
|
+
}
|
|
26572
|
+
if (failure.Instructions) {
|
|
26573
|
+
sections.push(`> ${failure.Instructions}`);
|
|
26574
|
+
}
|
|
26575
|
+
return sections.filter((section) => section !== "").join(`
|
|
26576
|
+
|
|
26577
|
+
`);
|
|
26578
|
+
}
|
|
26579
|
+
if (!("Data" in data) || data.Data == null) {
|
|
26580
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
26581
|
+
}
|
|
26582
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
26583
|
+
|
|
26584
|
+
`);
|
|
26585
|
+
}
|
|
26194
26586
|
function toYaml(data) {
|
|
26195
26587
|
const codec = getYamlCodec();
|
|
26196
26588
|
if (!codec) {
|
|
@@ -27110,7 +27502,14 @@ function robotNugetConfigPath(robotDir) {
|
|
|
27110
27502
|
}
|
|
27111
27503
|
var ROBOT_WINDOWS_MARKER = "UiRobot.exe";
|
|
27112
27504
|
var ROBOT_MACOS_MARKER = "UiRobot.dll";
|
|
27113
|
-
var
|
|
27505
|
+
var MACOS_ASSISTANT_APP = "UiPath Assistant.app";
|
|
27506
|
+
var MACOS_CONNECTED_ASSISTANT_SUBDIR = "UiPath Connected/Assistant";
|
|
27507
|
+
var MACOS_CONNECTED_CURRENT = "current";
|
|
27508
|
+
var MACOS_BUNDLE_ROBOT_SUBDIRS = [
|
|
27509
|
+
"Contents/Resources/assistant/Robot",
|
|
27510
|
+
"Contents/Robot"
|
|
27511
|
+
];
|
|
27512
|
+
var byVersionDesc = (a, b) => b.localeCompare(a, undefined, { numeric: true });
|
|
27114
27513
|
var REGISTRY_HIVES2 = [
|
|
27115
27514
|
"HKCU\\Software\\UiPath\\UiPath Studio",
|
|
27116
27515
|
"HKLM\\Software\\UiPath\\UiPath Studio"
|
|
@@ -27135,6 +27534,32 @@ function resolveRobotComponentDir(installRoot, deps) {
|
|
|
27135
27534
|
const nested = win322.join(installRoot, ROBOT_SUBDIR);
|
|
27136
27535
|
return deps.fileExists(win322.join(nested, ROBOT_WINDOWS_MARKER)) ? nested : installRoot;
|
|
27137
27536
|
}
|
|
27537
|
+
function* macosRobotDirCandidates(deps) {
|
|
27538
|
+
const home = process.env.HOME;
|
|
27539
|
+
const appRoots = [
|
|
27540
|
+
"/Applications",
|
|
27541
|
+
...home ? [posix.join(home, "Applications")] : []
|
|
27542
|
+
];
|
|
27543
|
+
for (const appRoot of appRoots) {
|
|
27544
|
+
const connectedDir = posix.join(appRoot, MACOS_CONNECTED_ASSISTANT_SUBDIR);
|
|
27545
|
+
let versions;
|
|
27546
|
+
try {
|
|
27547
|
+
versions = deps.readDir(connectedDir).filter((entry) => entry !== MACOS_CONNECTED_CURRENT).sort(byVersionDesc);
|
|
27548
|
+
} catch {
|
|
27549
|
+
versions = [];
|
|
27550
|
+
}
|
|
27551
|
+
const bundles = [
|
|
27552
|
+
posix.join(connectedDir, MACOS_CONNECTED_CURRENT, MACOS_ASSISTANT_APP),
|
|
27553
|
+
...versions.map((version) => posix.join(connectedDir, version, MACOS_ASSISTANT_APP)),
|
|
27554
|
+
posix.join(appRoot, MACOS_ASSISTANT_APP)
|
|
27555
|
+
];
|
|
27556
|
+
for (const bundle of bundles) {
|
|
27557
|
+
for (const subdir of MACOS_BUNDLE_ROBOT_SUBDIRS) {
|
|
27558
|
+
yield posix.join(bundle, subdir);
|
|
27559
|
+
}
|
|
27560
|
+
}
|
|
27561
|
+
}
|
|
27562
|
+
}
|
|
27138
27563
|
function resolveRobotDir(cliPath, deps) {
|
|
27139
27564
|
if (cliPath) {
|
|
27140
27565
|
deps.log(`Using --robot-dir: ${cliPath}`);
|
|
@@ -27159,18 +27584,21 @@ function resolveRobotDir(cliPath, deps) {
|
|
|
27159
27584
|
}
|
|
27160
27585
|
}
|
|
27161
27586
|
if (process.platform === "darwin") {
|
|
27162
|
-
|
|
27163
|
-
deps.
|
|
27164
|
-
|
|
27587
|
+
for (const candidate of macosRobotDirCandidates(deps)) {
|
|
27588
|
+
if (deps.fileExists(posix.join(candidate, ROBOT_MACOS_MARKER))) {
|
|
27589
|
+
deps.log(`Found robot at well-known path: ${candidate}`);
|
|
27590
|
+
return candidate;
|
|
27591
|
+
}
|
|
27165
27592
|
}
|
|
27166
27593
|
}
|
|
27167
27594
|
deps.log("Robot dir not resolved — Robot must already be running");
|
|
27168
27595
|
return null;
|
|
27169
27596
|
}
|
|
27170
27597
|
var DOTNET_ROLL_FORWARD_ENV = {
|
|
27171
|
-
DOTNET_ROLL_FORWARD: "
|
|
27598
|
+
DOTNET_ROLL_FORWARD: "LatestMajor"
|
|
27172
27599
|
};
|
|
27173
|
-
var
|
|
27600
|
+
var DOTNET_ROOT_ARCH_ENV = `DOTNET_ROOT_${process.arch === "ia32" ? "X86" : process.arch.toUpperCase()}`;
|
|
27601
|
+
var MIN_BUNDLED_DOTNET_MAJOR = HELM_DOTNET_MAJOR;
|
|
27174
27602
|
var DOTNET_ROOT_ENV = "UIPATH_DOTNET_ROOT";
|
|
27175
27603
|
var RUNTIMES_SUBDIR = "Runtimes";
|
|
27176
27604
|
var dotnetExeName = () => process.platform === "win32" ? "dotnet.exe" : "dotnet";
|
|
@@ -27205,7 +27633,7 @@ function* rootsAtOrUnder(dir, deps) {
|
|
|
27205
27633
|
} catch {
|
|
27206
27634
|
return;
|
|
27207
27635
|
}
|
|
27208
|
-
for (const entry of entries.sort(
|
|
27636
|
+
for (const entry of entries.sort(byVersionDesc)) {
|
|
27209
27637
|
yield layoutPath().join(dir, entry);
|
|
27210
27638
|
}
|
|
27211
27639
|
}
|
|
@@ -27215,6 +27643,8 @@ function* dotnetRootCandidates(robotDir, deps) {
|
|
|
27215
27643
|
deps.log(`Using ${DOTNET_ROOT_ENV}: ${declaredRoot}`);
|
|
27216
27644
|
yield* rootsAtOrUnder(declaredRoot, deps);
|
|
27217
27645
|
}
|
|
27646
|
+
if (!robotDir)
|
|
27647
|
+
return;
|
|
27218
27648
|
if (process.platform !== "win32") {
|
|
27219
27649
|
yield layoutPath().join(robotDir, "dotnet");
|
|
27220
27650
|
return;
|
|
@@ -27223,8 +27653,6 @@ function* dotnetRootCandidates(robotDir, deps) {
|
|
|
27223
27653
|
yield* rootsAtOrUnder(win322.resolve(robotDir, "..", "..", RUNTIMES_SUBDIR), deps);
|
|
27224
27654
|
}
|
|
27225
27655
|
function resolveBundledDotnet(robotDir, deps) {
|
|
27226
|
-
if (!robotDir)
|
|
27227
|
-
return;
|
|
27228
27656
|
for (const dotnetRoot of dotnetRootCandidates(robotDir, deps)) {
|
|
27229
27657
|
const exePath = layoutPath().join(dotnetRoot, dotnetExeName());
|
|
27230
27658
|
if (!deps.fileExists(exePath))
|
|
@@ -27239,6 +27667,7 @@ function resolveBundledDotnet(robotDir, deps) {
|
|
|
27239
27667
|
exePath,
|
|
27240
27668
|
env: {
|
|
27241
27669
|
DOTNET_ROOT: dotnetRoot,
|
|
27670
|
+
[DOTNET_ROOT_ARCH_ENV]: dotnetRoot,
|
|
27242
27671
|
DOTNET_MULTILEVEL_LOOKUP: "0",
|
|
27243
27672
|
...DOTNET_ROLL_FORWARD_ENV
|
|
27244
27673
|
}
|
|
@@ -27349,7 +27778,7 @@ async function startHelmAndWait(deps, timeoutMs = DEFAULT_TIMEOUT_MS, options) {
|
|
|
27349
27778
|
if (bundledDotnet) {
|
|
27350
27779
|
deps.log(`Bundled dotnet found, setting DOTNET_ROOT=${bundledDotnet.env.DOTNET_ROOT}`);
|
|
27351
27780
|
} else {
|
|
27352
|
-
deps.log("No bundled dotnet; launching Helm on PATH dotnet with DOTNET_ROLL_FORWARD=
|
|
27781
|
+
deps.log("No bundled dotnet; launching Helm on PATH dotnet with DOTNET_ROLL_FORWARD=LatestMajor.");
|
|
27353
27782
|
}
|
|
27354
27783
|
const bundledFeedEnv = resolveBundledFeedEnv(robotDir);
|
|
27355
27784
|
let helmEnv = {
|
|
@@ -27715,6 +28144,7 @@ var ToolName = {
|
|
|
27715
28144
|
ShowRemoteConnection: "show-remote-connection",
|
|
27716
28145
|
EnableRemoteUia: "enable-remote-uia",
|
|
27717
28146
|
DisableRemoteUia: "disable-remote-uia",
|
|
28147
|
+
RemoteEcho: "remote-echo",
|
|
27718
28148
|
CreateProject: "create-project",
|
|
27719
28149
|
Diff: "diff",
|
|
27720
28150
|
DownloadFile: "download-file",
|
|
@@ -27785,6 +28215,7 @@ var CLI_ALIASES = {
|
|
|
27785
28215
|
[ToolName.ShowRemoteConnection]: ["remote", "status"],
|
|
27786
28216
|
[ToolName.EnableRemoteUia]: ["remote", "start"],
|
|
27787
28217
|
[ToolName.DisableRemoteUia]: ["remote", "stop"],
|
|
28218
|
+
[ToolName.RemoteEcho]: ["remote", "echo"],
|
|
27788
28219
|
[ToolName.ExecuteProcess]: ["remote", "exec"],
|
|
27789
28220
|
[ToolName.UploadFile]: ["remote", "upload-file"],
|
|
27790
28221
|
[ToolName.DownloadFile]: ["remote", "download-file"]
|
|
@@ -28012,6 +28443,7 @@ var interop_manifest_default = {
|
|
|
28012
28443
|
],
|
|
28013
28444
|
IRemoteConnectionService: [
|
|
28014
28445
|
"configureUnattendedRobot",
|
|
28446
|
+
"setLiveAuthoring",
|
|
28015
28447
|
"enableRemoteConnection",
|
|
28016
28448
|
"getRemoteConnection"
|
|
28017
28449
|
],
|