@uipath/solution-sdk 1.200.0-preview.109 → 1.201.0-preview.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7896 -7778
- package/dist/resources/index.js +8219 -8037
- package/dist/solution-auth.js +118 -18
- package/dist/src/search-package-versions.d.ts +5 -4
- package/dist/src/solution-file.d.ts +3 -1
- package/package.json +2 -2
package/dist/solution-auth.js
CHANGED
|
@@ -30,6 +30,19 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
33
46
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
34
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
35
48
|
|
|
@@ -417,6 +430,12 @@ var init_is_in_ssh = __esm(() => {
|
|
|
417
430
|
});
|
|
418
431
|
|
|
419
432
|
// ../../node_modules/open/index.js
|
|
433
|
+
var exports_open = {};
|
|
434
|
+
__export(exports_open, {
|
|
435
|
+
openApp: () => openApp,
|
|
436
|
+
default: () => open_default,
|
|
437
|
+
apps: () => apps
|
|
438
|
+
});
|
|
420
439
|
import process8 from "node:process";
|
|
421
440
|
import path from "node:path";
|
|
422
441
|
import { fileURLToPath } from "node:url";
|
|
@@ -650,6 +669,21 @@ var fallbackAttemptSymbol, __dirname2, localXdgOpenPath, platform, arch, tryEach
|
|
|
650
669
|
...options,
|
|
651
670
|
target
|
|
652
671
|
});
|
|
672
|
+
}, openApp = (name, options) => {
|
|
673
|
+
if (typeof name !== "string" && !Array.isArray(name)) {
|
|
674
|
+
throw new TypeError("Expected a valid `name`");
|
|
675
|
+
}
|
|
676
|
+
const { arguments: appArguments = [] } = options ?? {};
|
|
677
|
+
if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
|
|
678
|
+
throw new TypeError("Expected `appArguments` as Array type");
|
|
679
|
+
}
|
|
680
|
+
return baseOpen({
|
|
681
|
+
...options,
|
|
682
|
+
app: {
|
|
683
|
+
name,
|
|
684
|
+
arguments: appArguments
|
|
685
|
+
}
|
|
686
|
+
});
|
|
653
687
|
}, apps, open_default;
|
|
654
688
|
var init_open = __esm(() => {
|
|
655
689
|
init_wsl_utils();
|
|
@@ -729,7 +763,8 @@ class NodeFileSystem {
|
|
|
729
763
|
};
|
|
730
764
|
utils = {
|
|
731
765
|
open: async (url) => {
|
|
732
|
-
await
|
|
766
|
+
const { default: open2 } = await Promise.resolve().then(() => (init_open(), exports_open));
|
|
767
|
+
await open2(url);
|
|
733
768
|
}
|
|
734
769
|
};
|
|
735
770
|
async readFile(path3, options) {
|
|
@@ -924,9 +959,7 @@ class NodeFileSystem {
|
|
|
924
959
|
}
|
|
925
960
|
}
|
|
926
961
|
var LOCK_HEARTBEAT_MS = 5000, LOCK_STALE_MS = 15000, LOCK_MAX_WAIT_MS = 20000, LOCK_MAX_HOLD_MS = 60000, LOCK_RETRY_MIN_MS = 100, LOCK_RETRY_JITTER_MS = 200;
|
|
927
|
-
var init_node =
|
|
928
|
-
init_open();
|
|
929
|
-
});
|
|
962
|
+
var init_node = () => {};
|
|
930
963
|
// ../filesystem/src/index.ts
|
|
931
964
|
var fsInstance, getFileSystem = () => fsInstance;
|
|
932
965
|
var init_src = __esm(() => {
|
|
@@ -934,10 +967,6 @@ var init_src = __esm(() => {
|
|
|
934
967
|
init_node();
|
|
935
968
|
fsInstance = new NodeFileSystem;
|
|
936
969
|
});
|
|
937
|
-
// ../auth/src/server.ts
|
|
938
|
-
var init_server = __esm(() => {
|
|
939
|
-
init_constants();
|
|
940
|
-
});
|
|
941
970
|
|
|
942
971
|
// ../auth/src/config.ts
|
|
943
972
|
init_constants();
|
|
@@ -1177,6 +1206,67 @@ var getTokenExpiration = (accessToken) => {
|
|
|
1177
1206
|
}
|
|
1178
1207
|
};
|
|
1179
1208
|
|
|
1209
|
+
// ../auth/src/sessionIdentity.ts
|
|
1210
|
+
var parseAuthFlow = (value) => value === "authorization_code" || value === "client_credentials" || value === "federated_credentials" ? value : undefined;
|
|
1211
|
+
var decodeClaims = (accessToken) => {
|
|
1212
|
+
const [error, claims] = catchError(() => parseJWT(accessToken));
|
|
1213
|
+
return error ? undefined : claims;
|
|
1214
|
+
};
|
|
1215
|
+
var asString = (value) => typeof value === "string" && value.length > 0 ? value : undefined;
|
|
1216
|
+
var resolveIdentityType = (claims, authFlow, email) => {
|
|
1217
|
+
const subType = asString(claims?.sub_type);
|
|
1218
|
+
if (subType) {
|
|
1219
|
+
return subType.startsWith("service") ? "Application" : "User";
|
|
1220
|
+
}
|
|
1221
|
+
if (authFlow) {
|
|
1222
|
+
return authFlow === "authorization_code" ? "User" : "Application";
|
|
1223
|
+
}
|
|
1224
|
+
if (email)
|
|
1225
|
+
return "User";
|
|
1226
|
+
if (asString(claims?.client_id) && !asString(claims?.sub)) {
|
|
1227
|
+
return "Application";
|
|
1228
|
+
}
|
|
1229
|
+
return;
|
|
1230
|
+
};
|
|
1231
|
+
var looksLikeEmail = (value) => value?.includes("@") ?? false;
|
|
1232
|
+
var pickEmail = (claims) => {
|
|
1233
|
+
for (const candidate of [claims?.email, claims?.preferred_username]) {
|
|
1234
|
+
const value = asString(candidate);
|
|
1235
|
+
if (looksLikeEmail(value))
|
|
1236
|
+
return value;
|
|
1237
|
+
}
|
|
1238
|
+
return;
|
|
1239
|
+
};
|
|
1240
|
+
var pickName = (claims) => {
|
|
1241
|
+
const username = asString(claims?.preferred_username);
|
|
1242
|
+
return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
|
|
1243
|
+
};
|
|
1244
|
+
var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
1245
|
+
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
1246
|
+
const email = pickEmail(claims);
|
|
1247
|
+
const type = resolveIdentityType(claims, authFlow, email);
|
|
1248
|
+
if (!type)
|
|
1249
|
+
return;
|
|
1250
|
+
const identity = { type };
|
|
1251
|
+
if (authFlow)
|
|
1252
|
+
identity.authFlow = authFlow;
|
|
1253
|
+
if (type === "User") {
|
|
1254
|
+
const userId = asString(claims?.sub);
|
|
1255
|
+
if (userId)
|
|
1256
|
+
identity.userId = userId;
|
|
1257
|
+
if (email)
|
|
1258
|
+
identity.userEmail = email;
|
|
1259
|
+
const name = pickName(claims);
|
|
1260
|
+
if (name)
|
|
1261
|
+
identity.userName = name;
|
|
1262
|
+
return identity;
|
|
1263
|
+
}
|
|
1264
|
+
const clientId = asString(claims?.client_id);
|
|
1265
|
+
if (clientId)
|
|
1266
|
+
identity.clientId = clientId;
|
|
1267
|
+
return identity;
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1180
1270
|
// ../auth/src/envAuth.ts
|
|
1181
1271
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
1182
1272
|
var ENFORCE_ROBOT_AUTH_VAR = "UIPATH_CLI_ENFORCE_ROBOT_AUTH";
|
|
@@ -1226,6 +1316,7 @@ var readAuthFromEnv = () => {
|
|
|
1226
1316
|
}
|
|
1227
1317
|
const expiration = getTokenExpiration(accessToken);
|
|
1228
1318
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
1319
|
+
const identity = resolveSessionIdentity(accessToken);
|
|
1229
1320
|
return {
|
|
1230
1321
|
loginStatus,
|
|
1231
1322
|
accessToken,
|
|
@@ -1235,7 +1326,8 @@ var readAuthFromEnv = () => {
|
|
|
1235
1326
|
tenantName,
|
|
1236
1327
|
tenantId,
|
|
1237
1328
|
expiration,
|
|
1238
|
-
source: "env" /*
|
|
1329
|
+
source: "env-vars" /* EnvironmentVariables */,
|
|
1330
|
+
...identity ? { identity } : {}
|
|
1239
1331
|
};
|
|
1240
1332
|
};
|
|
1241
1333
|
|
|
@@ -1488,6 +1580,9 @@ var refreshAccessToken = async ({
|
|
|
1488
1580
|
return { accessToken: newAccessToken, refreshToken: newRefreshToken };
|
|
1489
1581
|
};
|
|
1490
1582
|
|
|
1583
|
+
// ../auth/src/types.ts
|
|
1584
|
+
var AUTH_FLOW_ENV_VAR = "UIPATH_AUTH_FLOW";
|
|
1585
|
+
|
|
1491
1586
|
// ../auth/src/utils/envFile.ts
|
|
1492
1587
|
init_src();
|
|
1493
1588
|
init_constants();
|
|
@@ -1855,7 +1950,8 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1855
1950
|
tenantName: credentials.UIPATH_TENANT_NAME,
|
|
1856
1951
|
tenantId: credentials.UIPATH_TENANT_ID,
|
|
1857
1952
|
expiration: tokens.expiration,
|
|
1858
|
-
source: "
|
|
1953
|
+
source: "saved-login" /* SavedLogin */,
|
|
1954
|
+
...identityFields(tokens.accessToken, credentials),
|
|
1859
1955
|
...tokens.persistenceWarning ? { hint: tokens.persistenceWarning, persistenceFailed: true } : {},
|
|
1860
1956
|
...tokens.lockReleaseFailed ? { lockReleaseFailed: true } : {},
|
|
1861
1957
|
...tokens.tokenRefresh ? { tokenRefresh: tokens.tokenRefresh } : {}
|
|
@@ -1868,7 +1964,12 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1868
1964
|
}
|
|
1869
1965
|
return result;
|
|
1870
1966
|
}
|
|
1967
|
+
function identityFields(accessToken, credentials) {
|
|
1968
|
+
const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
1969
|
+
return identity ? { identity } : {};
|
|
1970
|
+
}
|
|
1871
1971
|
function buildRobotStatus(robotCreds) {
|
|
1972
|
+
const identity = resolveSessionIdentity(robotCreds.accessToken);
|
|
1872
1973
|
return {
|
|
1873
1974
|
loginStatus: "Logged in",
|
|
1874
1975
|
accessToken: robotCreds.accessToken,
|
|
@@ -1879,7 +1980,8 @@ function buildRobotStatus(robotCreds) {
|
|
|
1879
1980
|
tenantId: robotCreds.tenantId,
|
|
1880
1981
|
issuer: robotCreds.issuer,
|
|
1881
1982
|
expiration: getTokenExpiration(robotCreds.accessToken),
|
|
1882
|
-
source: "robot" /* Robot
|
|
1983
|
+
source: "robot" /* Robot */,
|
|
1984
|
+
...identity ? { identity } : {}
|
|
1883
1985
|
};
|
|
1884
1986
|
}
|
|
1885
1987
|
var isFileNotFoundError = (error) => {
|
|
@@ -1930,7 +2032,8 @@ async function circuitBreakerShortCircuit(ctx) {
|
|
|
1930
2032
|
tenantName: credentials.UIPATH_TENANT_NAME,
|
|
1931
2033
|
tenantId: credentials.UIPATH_TENANT_ID,
|
|
1932
2034
|
expiration,
|
|
1933
|
-
source: "
|
|
2035
|
+
source: "saved-login" /* SavedLogin */,
|
|
2036
|
+
...identityFields(accessToken, credentials)
|
|
1934
2037
|
} : {},
|
|
1935
2038
|
hint: globalHint ?? (tokenIsDead ? deadHint : backoffHint),
|
|
1936
2039
|
refreshCircuitOpen: true,
|
|
@@ -1952,7 +2055,8 @@ async function lockAcquireFailureStatus(ctx, error) {
|
|
|
1952
2055
|
tenantName: ctx.credentials.UIPATH_TENANT_NAME,
|
|
1953
2056
|
tenantId: ctx.credentials.UIPATH_TENANT_ID,
|
|
1954
2057
|
expiration: ctx.expiration,
|
|
1955
|
-
source: "
|
|
2058
|
+
source: "saved-login" /* SavedLogin */,
|
|
2059
|
+
...identityFields(ctx.accessToken, ctx.credentials),
|
|
1956
2060
|
hint: globalHint,
|
|
1957
2061
|
tokenRefresh: {
|
|
1958
2062
|
attempted: false,
|
|
@@ -2162,10 +2266,6 @@ var TENANT_SELECTION_CODES = new Set([
|
|
|
2162
2266
|
]);
|
|
2163
2267
|
// ../auth/src/logout.ts
|
|
2164
2268
|
init_src();
|
|
2165
|
-
|
|
2166
|
-
// ../auth/src/index.ts
|
|
2167
|
-
init_server();
|
|
2168
|
-
|
|
2169
2269
|
// src/solution-auth.ts
|
|
2170
2270
|
async function getSolutionAuthContext(options) {
|
|
2171
2271
|
const ctx = await getAuthContext({
|
|
@@ -2189,4 +2289,4 @@ export {
|
|
|
2189
2289
|
getSolutionAuthContext
|
|
2190
2290
|
};
|
|
2191
2291
|
|
|
2192
|
-
//# debugId=
|
|
2292
|
+
//# debugId=A8D037BD2594097C64756E2164756E21
|
|
@@ -35,11 +35,12 @@ export interface PackageVersionSearchRow {
|
|
|
35
35
|
/**
|
|
36
36
|
* Search a package's published versions within a feed.
|
|
37
37
|
*
|
|
38
|
-
* `feedFolderKey` is sent as `X-UIPATH-FolderKey` so results
|
|
39
|
-
* that feed, matching the package search.
|
|
40
|
-
* generated runtime's
|
|
38
|
+
* When `feedFolderKey` is set, it is sent as `X-UIPATH-FolderKey` so results
|
|
39
|
+
* are scoped to that feed, matching the package search. Omitting it searches
|
|
40
|
+
* the tenant feed. Non-2xx responses throw the generated runtime's
|
|
41
|
+
* {@link ResponseError}.
|
|
41
42
|
*/
|
|
42
|
-
export declare function searchPackageVersions(config: PackageVersionsClientConfig, packageKey: string, filter: PackageVersionSearchFilter, feedFolderKey
|
|
43
|
+
export declare function searchPackageVersions(config: PackageVersionsClientConfig, packageKey: string, filter: PackageVersionSearchFilter, feedFolderKey?: string): Promise<{
|
|
43
44
|
count?: number;
|
|
44
45
|
values: PackageVersionSearchRow[];
|
|
45
46
|
}>;
|
|
@@ -11,7 +11,9 @@ import type { UipxFile, UipxProject } from "./types";
|
|
|
11
11
|
* - `AlreadyRegistered` — Project was already in Projects[]; no write performed.
|
|
12
12
|
* - `Skipped` — A candidate solution was found but registration was deliberately
|
|
13
13
|
* not attempted (ambiguous: multiple `.uipx` in same dir, or the
|
|
14
|
-
* project dir sits outside the discovered solution dir
|
|
14
|
+
* project dir sits outside the discovered solution dir, or the
|
|
15
|
+
* project's type cannot live in a solution — see
|
|
16
|
+
* {@link unsupportedSolutionProjectType}).
|
|
15
17
|
* - `Failed` — Registration was attempted and an error occurred (read/write/parse).
|
|
16
18
|
* - `NotInSolution` — No `.uipx` file was found by walking ancestor directories. The
|
|
17
19
|
* project was created in standalone mode. This is the explicit
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/solution-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.201.0-preview.115",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/UiPath/cli.git",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"private": false,
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc"
|
|
43
43
|
}
|