@uipath/cli 1.203.0-preview.205 → 1.204.0-preview.206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -112
- package/dist/THIRD-PARTY-NOTICES.md +21 -2
- package/dist/{cli-akjte1tb.js → cli-rzsqfejn.js} +4 -4
- package/dist/{index-eb9q7r0k.js → index-45h1c7ad.js} +159 -13
- package/dist/{index-7pvwjzsq.js → index-kyn5nn3d.js} +575 -74
- package/dist/{index-hgvsratt.js → index-mttdq2yn.js} +4 -2
- package/dist/{index-59rge93d.js → index-nh7w4ccm.js} +507 -149
- package/dist/{index-vmn69waj.js → index-zwnedwxc.js} +21 -6
- package/dist/index.js +5 -5
- package/dist/{server-w65r13bn.js → server-x6j9cv7f.js} +3 -3
- package/dist/{telemetry-drain-zkrm8xja.js → telemetry-drain-4sk6ezgk.js} +1 -1
- package/dist/{updateService-txkkjjcq.js → updateService-r03h6d1b.js} +2 -2
- package/package.json +2 -2
|
@@ -732,6 +732,11 @@ var pickName = (claims) => {
|
|
|
732
732
|
const username = asString(claims?.preferred_username);
|
|
733
733
|
return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
|
|
734
734
|
};
|
|
735
|
+
var pickScopes = (claims) => {
|
|
736
|
+
const raw = claims?.scope;
|
|
737
|
+
const scopes = Array.isArray(raw) ? raw.filter((entry) => asString(entry) !== undefined) : typeof raw === "string" ? raw.split(/\s+/).filter(Boolean) : [];
|
|
738
|
+
return scopes.length > 0 ? scopes : undefined;
|
|
739
|
+
};
|
|
735
740
|
var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
736
741
|
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
737
742
|
const email = pickEmail(claims);
|
|
@@ -757,6 +762,7 @@ var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
|
757
762
|
identity.clientId = clientId;
|
|
758
763
|
return identity;
|
|
759
764
|
};
|
|
765
|
+
var readTokenScopes = (accessToken) => accessToken ? pickScopes(decodeClaims(accessToken)) : undefined;
|
|
760
766
|
|
|
761
767
|
// ../auth/src/envAuth.ts
|
|
762
768
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
@@ -829,6 +835,7 @@ var readAuthFromEnv = () => {
|
|
|
829
835
|
const expiration = getTokenExpiration(accessToken);
|
|
830
836
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
831
837
|
const identity = resolveSessionIdentity(accessToken);
|
|
838
|
+
const scopes = readTokenScopes(accessToken);
|
|
832
839
|
return {
|
|
833
840
|
loginStatus,
|
|
834
841
|
accessToken,
|
|
@@ -839,7 +846,8 @@ var readAuthFromEnv = () => {
|
|
|
839
846
|
tenantId,
|
|
840
847
|
expiration,
|
|
841
848
|
source: "env-vars" /* EnvironmentVariables */,
|
|
842
|
-
...identity ? { identity } : {}
|
|
849
|
+
...identity ? { identity } : {},
|
|
850
|
+
...scopes ? { scopes } : {}
|
|
843
851
|
};
|
|
844
852
|
};
|
|
845
853
|
|
|
@@ -1487,10 +1495,15 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1487
1495
|
}
|
|
1488
1496
|
function identityFields(accessToken, credentials) {
|
|
1489
1497
|
const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
1490
|
-
|
|
1498
|
+
const scopes = readTokenScopes(accessToken);
|
|
1499
|
+
return {
|
|
1500
|
+
...identity ? { identity } : {},
|
|
1501
|
+
...scopes ? { scopes } : {}
|
|
1502
|
+
};
|
|
1491
1503
|
}
|
|
1492
1504
|
function buildRobotStatus(robotCreds) {
|
|
1493
1505
|
const identity = resolveSessionIdentity(robotCreds.accessToken);
|
|
1506
|
+
const scopes = readTokenScopes(robotCreds.accessToken);
|
|
1494
1507
|
return {
|
|
1495
1508
|
loginStatus: "Logged in",
|
|
1496
1509
|
accessToken: robotCreds.accessToken,
|
|
@@ -1502,7 +1515,8 @@ function buildRobotStatus(robotCreds) {
|
|
|
1502
1515
|
issuer: robotCreds.issuer,
|
|
1503
1516
|
expiration: getTokenExpiration(robotCreds.accessToken),
|
|
1504
1517
|
source: "robot" /* Robot */,
|
|
1505
|
-
...identity ? { identity } : {}
|
|
1518
|
+
...identity ? { identity } : {},
|
|
1519
|
+
...scopes ? { scopes } : {}
|
|
1506
1520
|
};
|
|
1507
1521
|
}
|
|
1508
1522
|
var isFileNotFoundError = (error) => {
|
|
@@ -1769,7 +1783,8 @@ var getAuthContext = async (options = {}) => {
|
|
|
1769
1783
|
organizationId: status.organizationId,
|
|
1770
1784
|
organizationName: status.organizationName,
|
|
1771
1785
|
tenantId: status.tenantId,
|
|
1772
|
-
tenantName
|
|
1786
|
+
tenantName,
|
|
1787
|
+
identity: status.identity
|
|
1773
1788
|
};
|
|
1774
1789
|
};
|
|
1775
1790
|
var getAuthEnv = async (options = {}) => {
|
|
@@ -2437,6 +2452,6 @@ var authenticate = async ({
|
|
|
2437
2452
|
});
|
|
2438
2453
|
};
|
|
2439
2454
|
|
|
2440
|
-
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, getAuthProfilesRootPath, resolveAuthProfileDirPath, listAuthProfileNamesAsync, authProfileExistsAsync, deleteAuthProfileAsync, parseJWT, parseAuthFlow, resolveSessionIdentity, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, AUTH_FLOW_ENV_VAR, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync, CredentialSource, getLoginStatusAsync, getLoginStatusWithDeps, getAuthContext, getAuthEnv, describeAuthProfilesAsync, ClientCredentialsAuthenticationError, clientCredentialsLogin, JWT_BEARER_ASSERTION_TYPE, FederatedCredentialsAuthenticationError, federatedCredentialsLogin, fetchTenantsAndOrganizations, TENANT_SELECTION_REQUIRED_CODE, INVALID_TENANT_CODE, TenantSelectionError, TenantSelectionRequiredError, InvalidTenantError, isTenantSelectionError, selectTenantWithDeps, interactiveLoginWithDeps, interactiveLogin, logoutWithDeps, logout, authenticate };
|
|
2455
|
+
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, getAuthProfilesRootPath, resolveAuthProfileDirPath, listAuthProfileNamesAsync, authProfileExistsAsync, deleteAuthProfileAsync, parseJWT, parseAuthFlow, resolveSessionIdentity, readTokenScopes, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, AUTH_FLOW_ENV_VAR, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync, CredentialSource, getLoginStatusAsync, getLoginStatusWithDeps, getAuthContext, getAuthEnv, describeAuthProfilesAsync, ClientCredentialsAuthenticationError, clientCredentialsLogin, JWT_BEARER_ASSERTION_TYPE, FederatedCredentialsAuthenticationError, federatedCredentialsLogin, fetchTenantsAndOrganizations, TENANT_SELECTION_REQUIRED_CODE, INVALID_TENANT_CODE, TenantSelectionError, TenantSelectionRequiredError, InvalidTenantError, isTenantSelectionError, selectTenantWithDeps, interactiveLoginWithDeps, interactiveLogin, logoutWithDeps, logout, authenticate };
|
|
2441
2456
|
|
|
2442
|
-
//# debugId=
|
|
2457
|
+
//# debugId=C2A7396F2D34604964756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runNode
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-nh7w4ccm.js";
|
|
5
5
|
import {
|
|
6
6
|
registerRobotClientLoader
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-zwnedwxc.js";
|
|
8
|
+
import"./index-45h1c7ad.js";
|
|
9
9
|
import {
|
|
10
10
|
TELEMETRY_DRAIN_ARGV,
|
|
11
11
|
configureLogger,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
setProcessContextPollSignal,
|
|
19
19
|
setProxyAuthHttpsAgent,
|
|
20
20
|
setTelemetrySidecarEntry
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-kyn5nn3d.js";
|
|
22
22
|
import"./index-g8ck9tv6.js";
|
|
23
23
|
import"./index-hrt7fpkk.js";
|
|
24
24
|
import"./index-d3w0wn6k.js";
|
|
@@ -192,7 +192,7 @@ var isMain = __require.main == __require.module ?? process.argv[1] === currentFi
|
|
|
192
192
|
if (isMain) {
|
|
193
193
|
setTelemetrySidecarEntry(currentFile);
|
|
194
194
|
if (process.argv[2] === TELEMETRY_DRAIN_ARGV) {
|
|
195
|
-
const { drainPendingTelemetry } = await import("./telemetry-drain-
|
|
195
|
+
const { drainPendingTelemetry } = await import("./telemetry-drain-4sk6ezgk.js");
|
|
196
196
|
await drainPendingTelemetry();
|
|
197
197
|
process.exit(0);
|
|
198
198
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithAuthProfile
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-zwnedwxc.js";
|
|
4
4
|
import {
|
|
5
5
|
OUTPUT_FORMATS,
|
|
6
6
|
catchError,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
logger,
|
|
10
10
|
runWithSink,
|
|
11
11
|
setGlobalSink
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-kyn5nn3d.js";
|
|
13
13
|
import"./index-g8ck9tv6.js";
|
|
14
14
|
import {
|
|
15
15
|
exports_external
|
|
@@ -84,7 +84,7 @@ async function executeCommand(command) {
|
|
|
84
84
|
const previousSink = getOutputSink();
|
|
85
85
|
setGlobalSink(sink);
|
|
86
86
|
const [error] = await catchError(async () => {
|
|
87
|
-
const { run } = await import("./cli-
|
|
87
|
+
const { run } = await import("./cli-rzsqfejn.js");
|
|
88
88
|
await runWithAuthProfile(undefined, () => runWithSink(sink, () => run(context)));
|
|
89
89
|
});
|
|
90
90
|
if (error) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.204.0-preview.206",
|
|
6
6
|
"description": "Cross platform CLI for UiPath",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"kerberos": "7.0.0",
|
|
37
37
|
"node-expose-sspi": "0.1.60"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ea7fd32a02acccf14e8e83522e69101430627b83"
|
|
40
40
|
}
|