@uipath/cli 1.206.0-preview.301 → 1.207.0-preview.305
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 +48 -0
- package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
- package/dist/cli-10857d67.js +28 -0
- package/dist/cliInstaller-3dxg6fbd.js +23 -0
- package/dist/{contentStore-cd7gxxmj.js → contentStore-z3t1yt3n.js} +7 -6
- package/dist/{environmentInfo-mbanfdjh.js → environmentInfo-dyhpheza.js} +6 -6
- package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
- package/dist/forcedUpdate-5hd8cp9x.js +21 -0
- package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
- package/dist/index-2f6vv7yr.js +81 -0
- package/dist/{index-hweqs8nn.js → index-2g332j2f.js} +8 -12
- package/dist/index-319vtrwd.js +264 -0
- package/dist/{index-nn9v5yjd.js → index-3vkb4j13.js} +26 -17
- package/dist/index-5j78gm9c.js +41 -0
- package/dist/index-5ygg5mrs.js +1272 -0
- package/dist/{index-99emfvtm.js → index-65pyx6c9.js} +4 -2
- package/dist/{index-rr5hdtcy.js → index-81197qe5.js} +15 -17
- package/dist/{index-2mm750yx.js → index-8n0z4r6f.js} +69 -13
- package/dist/{index-8zhmg5tz.js → index-8pk6n4t9.js} +2 -2
- package/dist/{index-7wmyb1v6.js → index-9v7334md.js} +1 -1
- package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
- package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
- package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
- package/dist/index-ej6eeger.js +23 -0
- package/dist/index-evcsjfyy.js +248 -0
- package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
- package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
- package/dist/index-jk7em40j.js +37 -0
- package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
- package/dist/{index-h9f8kms8.js → index-kmacaa53.js} +2130 -834
- package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
- package/dist/{index-24ffa480.js → index-md27nny8.js} +7 -10
- package/dist/{index-zj63x8ca.js → index-nex3q8cg.js} +2 -2
- package/dist/index-nyx7fh45.js +331 -0
- package/dist/index-nzfpbep9.js +14 -0
- package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
- package/dist/{index-3aymb07j.js → index-t6hrzpm7.js} +30 -14
- package/dist/index-v7yphxb8.js +118 -0
- package/dist/index-vrfbee4d.js +340 -0
- package/dist/{index-69mcde3n.js → index-xw81b1gn.js} +196 -81
- package/dist/{index-wg3cne7n.js → index-xxms6rt8.js} +24 -5
- package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
- package/dist/{index-dst4pf6j.js → index-z3q16ts7.js} +81 -58
- package/dist/{index-fdztq951.js → index-zhp702kh.js} +393 -82
- package/dist/index.js +23 -18
- package/dist/{install-kgcwdbqs.js → install-h76qyy1e.js} +6 -7
- package/dist/{node-strategy-p1n8wr5s.js → node-strategy-9t0ttffv.js} +2 -2
- package/dist/{project-context-caht70an.js → project-context-rc4ghykm.js} +13 -5
- package/dist/{prompt-8emxd7jz.js → prompt-66bnttv7.js} +5 -5
- package/dist/{server-pzt8qbff.js → server-pxfn9w9m.js} +5 -5
- package/dist/{skillCatalog-ppk9wtx1.js → skillCatalog-7gh14b4s.js} +8 -7
- package/dist/skillsService-wz3c21qb.js +35 -0
- package/dist/{telemetry-drain-rt346cfz.js → telemetry-drain-8qr5tzmf.js} +2 -2
- package/dist/tree-fk9gwh4v.js +16 -0
- package/dist/updateService-ybs9274t.js +377 -0
- package/dist/updateService.cli-xtqp78g7.js +15 -0
- package/dist/updateService.skills-pgst1fyj.js +27 -0
- package/dist/updateService.tools-m58m2fbt.js +19 -0
- package/package.json +2 -2
- package/dist/cli-5679d26y.js +0 -23
- package/dist/index-3qp7d08f.js +0 -240
- package/dist/index-3zf0ywpb.js +0 -95
- package/dist/index-753mncpq.js +0 -271
- package/dist/index-7sm7r2tj.js +0 -45
- package/dist/skillsService-mzk0y9kz.js +0 -29
- package/dist/tree-4dhk82fh.js +0 -17
- package/dist/updateService-7bygdrjv.js +0 -522
- package/dist/updateService.skills-3rpemp0h.js +0 -22
- package/dist/updateService.tools-3zfct9yk.js +0 -16
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// ../auth/src/constants.ts
|
|
2
2
|
var UIPATH_HOME_DIR2 = ".uipath";
|
|
3
3
|
var AUTH_FILENAME = ".auth";
|
|
4
|
+
var AUTH_FILE_MODE = 384;
|
|
5
|
+
var AUTH_DIR_MODE = 448;
|
|
4
6
|
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
5
7
|
var DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
6
8
|
var AUTH_TIMEOUT_ERROR_CODE2 = "EAUTHTIMEOUT";
|
|
@@ -8,6 +10,6 @@ var AUTH_CANCELLED_ERROR_CODE2 = "EAUTHCANCELLED";
|
|
|
8
10
|
var AUTH_RECLAIMED_ERROR_CODE2 = "EAUTHRECLAIMED";
|
|
9
11
|
var DEFAULT_REDIRECT_URI = "http://localhost:8104/oidc/login";
|
|
10
12
|
|
|
11
|
-
export { UIPATH_HOME_DIR2, AUTH_FILENAME, DEFAULT_BASE_URL, DEFAULT_AUTH_TIMEOUT_MS2, AUTH_TIMEOUT_ERROR_CODE2, AUTH_CANCELLED_ERROR_CODE2, AUTH_RECLAIMED_ERROR_CODE2, DEFAULT_REDIRECT_URI };
|
|
13
|
+
export { UIPATH_HOME_DIR2, AUTH_FILENAME, AUTH_FILE_MODE, AUTH_DIR_MODE, DEFAULT_BASE_URL, DEFAULT_AUTH_TIMEOUT_MS2, AUTH_TIMEOUT_ERROR_CODE2, AUTH_CANCELLED_ERROR_CODE2, AUTH_RECLAIMED_ERROR_CODE2, DEFAULT_REDIRECT_URI };
|
|
12
14
|
|
|
13
|
-
//# debugId=
|
|
15
|
+
//# debugId=2785918410A7056B64756E2164756E21
|
|
@@ -28,63 +28,61 @@ var promptSelect = async (options, message) => {
|
|
|
28
28
|
// src/services/auth.ts
|
|
29
29
|
class NodeAuth {
|
|
30
30
|
async interactiveLogin(options) {
|
|
31
|
-
const { interactiveLogin } = await import("./index-
|
|
31
|
+
const { interactiveLogin } = await import("./index-e82sznr2.js");
|
|
32
32
|
return await interactiveLogin({
|
|
33
33
|
...options,
|
|
34
34
|
selectFromList: promptSelect
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async clientCredentialsLogin(options) {
|
|
38
|
-
const { clientCredentialsLogin } = await import("./index-
|
|
38
|
+
const { clientCredentialsLogin } = await import("./index-e82sznr2.js");
|
|
39
39
|
return await clientCredentialsLogin(options);
|
|
40
40
|
}
|
|
41
41
|
async getLoginStatus(options) {
|
|
42
|
-
const { getLoginStatusAsync } = await import("./index-
|
|
42
|
+
const { getLoginStatusAsync } = await import("./index-e82sznr2.js");
|
|
43
43
|
return getLoginStatusAsync(options);
|
|
44
44
|
}
|
|
45
45
|
async fetchTenants(baseUrl, accessToken, organizationId) {
|
|
46
|
-
const { fetchTenantsAndOrganizations } = await import("./index-
|
|
46
|
+
const { fetchTenantsAndOrganizations } = await import("./index-e82sznr2.js");
|
|
47
47
|
return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
|
|
48
48
|
}
|
|
49
49
|
async saveTenantSelection(envFilePath, tenantName, tenantId) {
|
|
50
|
-
const {
|
|
51
|
-
await
|
|
50
|
+
const { updateEnvFileLockedAsync } = await import("./index-e82sznr2.js");
|
|
51
|
+
await updateEnvFileLockedAsync({
|
|
52
52
|
envPath: envFilePath,
|
|
53
53
|
data: {
|
|
54
54
|
UIPATH_TENANT_NAME: tenantName,
|
|
55
55
|
UIPATH_TENANT_ID: tenantId
|
|
56
|
-
}
|
|
57
|
-
merge: true
|
|
56
|
+
}
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
class BrowserAuth {
|
|
63
62
|
async interactiveLogin(options) {
|
|
64
|
-
const { interactiveLogin } = await import("./index-
|
|
63
|
+
const { interactiveLogin } = await import("./index-e82sznr2.js");
|
|
65
64
|
return await interactiveLogin(options);
|
|
66
65
|
}
|
|
67
66
|
async clientCredentialsLogin(options) {
|
|
68
|
-
const { clientCredentialsLogin } = await import("./index-
|
|
67
|
+
const { clientCredentialsLogin } = await import("./index-e82sznr2.js");
|
|
69
68
|
return await clientCredentialsLogin(options);
|
|
70
69
|
}
|
|
71
70
|
async getLoginStatus(options) {
|
|
72
|
-
const { getLoginStatusAsync } = await import("./index-
|
|
71
|
+
const { getLoginStatusAsync } = await import("./index-e82sznr2.js");
|
|
73
72
|
return getLoginStatusAsync(options);
|
|
74
73
|
}
|
|
75
74
|
async fetchTenants(baseUrl, accessToken, organizationId) {
|
|
76
|
-
const { fetchTenantsAndOrganizations } = await import("./index-
|
|
75
|
+
const { fetchTenantsAndOrganizations } = await import("./index-e82sznr2.js");
|
|
77
76
|
return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
|
|
78
77
|
}
|
|
79
78
|
async saveTenantSelection(envFilePath, tenantName, tenantId) {
|
|
80
|
-
const {
|
|
81
|
-
await
|
|
79
|
+
const { updateEnvFileLockedAsync } = await import("./index-e82sznr2.js");
|
|
80
|
+
await updateEnvFileLockedAsync({
|
|
82
81
|
envPath: envFilePath,
|
|
83
82
|
data: {
|
|
84
83
|
UIPATH_TENANT_NAME: tenantName,
|
|
85
84
|
UIPATH_TENANT_ID: tenantId
|
|
86
|
-
}
|
|
87
|
-
merge: true
|
|
85
|
+
}
|
|
88
86
|
});
|
|
89
87
|
}
|
|
90
88
|
}
|
|
@@ -92,4 +90,4 @@ var auth = isBrowser2() ? new BrowserAuth : new NodeAuth;
|
|
|
92
90
|
|
|
93
91
|
export { auth };
|
|
94
92
|
|
|
95
|
-
//# debugId=
|
|
93
|
+
//# debugId=E38A0F5800658FC664756E2164756E21
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UIPATH_HOME_DIR2,
|
|
3
3
|
AUTH_FILENAME,
|
|
4
|
+
AUTH_FILE_MODE,
|
|
5
|
+
AUTH_DIR_MODE,
|
|
4
6
|
DEFAULT_BASE_URL,
|
|
5
7
|
DEFAULT_REDIRECT_URI
|
|
6
|
-
} from "./index-
|
|
8
|
+
} from "./index-65pyx6c9.js";
|
|
7
9
|
import {
|
|
8
10
|
getFileSystem2
|
|
9
|
-
} from "./index-
|
|
11
|
+
} from "./index-p64w2wrt.js";
|
|
10
12
|
import {
|
|
11
13
|
isBrowser2,
|
|
12
14
|
getGlobalThis
|
|
@@ -1272,7 +1274,39 @@ var loadEnvFileAsync2 = async ({ envPath }) => {
|
|
|
1272
1274
|
}
|
|
1273
1275
|
return parseEnvContent(content);
|
|
1274
1276
|
};
|
|
1275
|
-
var
|
|
1277
|
+
var findAuthHomeDir = (fs, dir) => {
|
|
1278
|
+
let current = dir;
|
|
1279
|
+
for (;; ) {
|
|
1280
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
1281
|
+
return current;
|
|
1282
|
+
const parent = fs.path.dirname(current);
|
|
1283
|
+
if (parent === current)
|
|
1284
|
+
return;
|
|
1285
|
+
current = parent;
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
var TEMP_FILE_ATTEMPTS = 5;
|
|
1289
|
+
var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
|
|
1290
|
+
var writeTempFile = async (fs, targetPath, content) => {
|
|
1291
|
+
for (let attempt = 1;; attempt++) {
|
|
1292
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
1293
|
+
try {
|
|
1294
|
+
await fs.writeFile(tempPath, content, {
|
|
1295
|
+
mode: AUTH_FILE_MODE,
|
|
1296
|
+
exclusive: true
|
|
1297
|
+
});
|
|
1298
|
+
return tempPath;
|
|
1299
|
+
} catch (error) {
|
|
1300
|
+
if (!isFileExists(error)) {
|
|
1301
|
+
await fs.rm(tempPath).catch(() => {});
|
|
1302
|
+
throw error;
|
|
1303
|
+
}
|
|
1304
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
1305
|
+
throw error;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
var saveEnvFileAsync = async ({
|
|
1276
1310
|
envPath,
|
|
1277
1311
|
data,
|
|
1278
1312
|
merge = true
|
|
@@ -1299,10 +1333,18 @@ var saveEnvFileAsync2 = async ({
|
|
|
1299
1333
|
`)}
|
|
1300
1334
|
`;
|
|
1301
1335
|
const dir = fs.path.dirname(absolutePath);
|
|
1302
|
-
await fs.mkdir(dir);
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
|
|
1336
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
1337
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
1338
|
+
if (authHomeDir !== undefined) {
|
|
1339
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
1340
|
+
}
|
|
1341
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
1342
|
+
try {
|
|
1343
|
+
await fs.rename(tempPath, absolutePath);
|
|
1344
|
+
} catch (error) {
|
|
1345
|
+
await fs.rm(tempPath).catch(() => {});
|
|
1346
|
+
throw error;
|
|
1347
|
+
}
|
|
1306
1348
|
};
|
|
1307
1349
|
|
|
1308
1350
|
// ../auth/src/loginStatus.ts
|
|
@@ -1321,7 +1363,7 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
|
|
|
1321
1363
|
const {
|
|
1322
1364
|
resolveEnvFilePath = resolveEnvFilePathAsync2,
|
|
1323
1365
|
loadEnvFile = loadEnvFileAsync2,
|
|
1324
|
-
saveEnvFile =
|
|
1366
|
+
saveEnvFile = saveEnvFileAsync,
|
|
1325
1367
|
getFs = getFileSystem2,
|
|
1326
1368
|
refreshToken: refreshTokenFn = refreshAccessToken,
|
|
1327
1369
|
resolveConfig = resolveConfigAsync,
|
|
@@ -2158,7 +2200,7 @@ var interactiveLoginWithDeps = async (options, deps) => {
|
|
|
2158
2200
|
clientCredentials = clientCredentialsLogin2,
|
|
2159
2201
|
federatedCredentials = federatedCredentialsLogin,
|
|
2160
2202
|
auth = authenticate2,
|
|
2161
|
-
saveEnvFile =
|
|
2203
|
+
saveEnvFile = saveEnvFileAsync,
|
|
2162
2204
|
loadEnvFile = loadEnvFileAsync2,
|
|
2163
2205
|
getFs = getFileSystem2,
|
|
2164
2206
|
jwtParser = parseJWT2,
|
|
@@ -2378,6 +2420,20 @@ async function logoutWithDeps(options, deps = {}) {
|
|
|
2378
2420
|
async function logout2(options) {
|
|
2379
2421
|
return logoutWithDeps(options);
|
|
2380
2422
|
}
|
|
2423
|
+
// ../auth/src/utils/lockedEnvFile.ts
|
|
2424
|
+
var updateEnvFileLockedAsync2 = async ({
|
|
2425
|
+
envPath,
|
|
2426
|
+
data
|
|
2427
|
+
}) => {
|
|
2428
|
+
const fs = getFileSystem2();
|
|
2429
|
+
const absolutePath = fs.path.isAbsolute(envPath) ? envPath : fs.path.join(fs.env.homedir(), envPath);
|
|
2430
|
+
const release = await fs.acquireLock(absolutePath);
|
|
2431
|
+
try {
|
|
2432
|
+
await saveEnvFileAsync({ envPath: absolutePath, data, merge: true });
|
|
2433
|
+
} finally {
|
|
2434
|
+
await release().catch(() => {});
|
|
2435
|
+
}
|
|
2436
|
+
};
|
|
2381
2437
|
|
|
2382
2438
|
// ../auth/src/index.ts
|
|
2383
2439
|
var authenticate2 = async ({
|
|
@@ -2435,10 +2491,10 @@ var authenticate2 = async ({
|
|
|
2435
2491
|
const authUrl = `${authorizationEndpoint}?${authParams.toString()}`;
|
|
2436
2492
|
let strategy;
|
|
2437
2493
|
if (isBrowser2()) {
|
|
2438
|
-
const { BrowserAuthStrategy } = await import("./browser-strategy-
|
|
2494
|
+
const { BrowserAuthStrategy } = await import("./browser-strategy-5rfwnk5q.js");
|
|
2439
2495
|
strategy = new BrowserAuthStrategy;
|
|
2440
2496
|
} else {
|
|
2441
|
-
const { NodeAuthStrategy } = await import("./node-strategy-
|
|
2497
|
+
const { NodeAuthStrategy } = await import("./node-strategy-9t0ttffv.js");
|
|
2442
2498
|
strategy = new NodeAuthStrategy;
|
|
2443
2499
|
}
|
|
2444
2500
|
const code = await strategy.execute(authUrl, effectiveRedirectUriUrl, state, {
|
|
@@ -2458,6 +2514,6 @@ var authenticate2 = async ({
|
|
|
2458
2514
|
});
|
|
2459
2515
|
};
|
|
2460
2516
|
|
|
2461
|
-
export { setAuthFileConfig2, DEFAULT_AUTH_PROFILE2, INHERITED_AUTH_PROFILE_ENV2, AuthProfileValidationError2, normalizeAuthProfileName2, setActiveAuthProfile2, getActiveAuthProfile2, runWithAuthProfile2, getActiveAuthProfileFilePath2, listAuthProfileNamesAsync2, authProfileExistsAsync2, deleteAuthProfileAsync2, parseJWT2, parseAuthFlow2, ENV_AUTH_ENABLE_VAR2, ENV_AUTH_VARS2, EnvAuthConfigError2, isEnvAuthEnabled2, readAuthFromEnv2, registerRobotClientLoader2, fetchTenantsAndOrganizations2, AUTH_FLOW_ENV_VAR2, DEFAULT_AUTH_FILENAME2, DEFAULT_ENV_FILENAME2, resolveEnvFileLocationAsync2, resolveEnvFilePathAsync2, loadEnvFileAsync2,
|
|
2517
|
+
export { setAuthFileConfig2, DEFAULT_AUTH_PROFILE2, INHERITED_AUTH_PROFILE_ENV2, AuthProfileValidationError2, normalizeAuthProfileName2, setActiveAuthProfile2, getActiveAuthProfile2, runWithAuthProfile2, getActiveAuthProfileFilePath2, listAuthProfileNamesAsync2, authProfileExistsAsync2, deleteAuthProfileAsync2, parseJWT2, parseAuthFlow2, ENV_AUTH_ENABLE_VAR2, ENV_AUTH_VARS2, EnvAuthConfigError2, isEnvAuthEnabled2, readAuthFromEnv2, registerRobotClientLoader2, fetchTenantsAndOrganizations2, AUTH_FLOW_ENV_VAR2, DEFAULT_AUTH_FILENAME2, DEFAULT_ENV_FILENAME2, resolveEnvFileLocationAsync2, resolveEnvFilePathAsync2, loadEnvFileAsync2, CredentialSource2, getLoginStatusAsync2, describeAuthProfilesAsync2, clientCredentialsLogin2, isTenantSelectionError2, interactiveLogin2, logout2, updateEnvFileLockedAsync2, authenticate2 };
|
|
2462
2518
|
|
|
2463
|
-
//# debugId=
|
|
2519
|
+
//# debugId=64FE9E26C099C86A64756E2164756E21
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-p64w2wrt.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
6
|
DEFAULT_FETCH_TIMEOUT_MS
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-zhp702kh.js";
|
|
8
8
|
|
|
9
9
|
// src/services/markdownToJiraWiki.ts
|
|
10
10
|
var SENTINEL = "\x00";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
AGENT_DISPLAY_NAMES,
|
|
7
7
|
AGENT_DEFS,
|
|
8
8
|
getSkillsDestinationHint
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-2g332j2f.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/skills/prompt.ts
|
|
12
12
|
async function promptAgentSelection2(operation, isLocal, preselected = [], isDefaultSource = true) {
|
|
@@ -29,6 +29,16 @@ function isSkillsPackageMetadataError(error) {
|
|
|
29
29
|
return error instanceof SkillsPackageMetadataError || error.name === "SkillsPackageMetadataError";
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
class SkillsPinNotPublishedError extends Error {
|
|
33
|
+
constructor(message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = "SkillsPinNotPublishedError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function isSkillsPinNotPublishedError(error) {
|
|
39
|
+
return error instanceof SkillsPinNotPublishedError || error.name === "SkillsPinNotPublishedError";
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
class SkillsPackOutputError extends Error {
|
|
33
43
|
constructor(message) {
|
|
34
44
|
super(message);
|
|
@@ -39,6 +49,6 @@ function isSkillsPackOutputError(error) {
|
|
|
39
49
|
return error instanceof SkillsPackOutputError || error.name === "SkillsPackOutputError";
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
export { SkillSourceError, SkillsRegistryAuthError, isSkillsRegistryAuthError, SkillsPackageMetadataError, isSkillsPackageMetadataError, SkillsPackOutputError, isSkillsPackOutputError };
|
|
52
|
+
export { SkillSourceError, SkillsRegistryAuthError, isSkillsRegistryAuthError, SkillsPackageMetadataError, isSkillsPackageMetadataError, SkillsPinNotPublishedError, isSkillsPinNotPublishedError, SkillsPackOutputError, isSkillsPackOutputError };
|
|
43
53
|
|
|
44
|
-
//# debugId=
|
|
54
|
+
//# debugId=B8D50B8DE45E3DF964756E2164756E21
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CHANNEL_PLACEHOLDER
|
|
3
|
-
|
|
4
|
-
} from "./index-753mncpq.js";
|
|
2
|
+
CHANNEL_PLACEHOLDER
|
|
3
|
+
} from "./index-ej6eeger.js";
|
|
5
4
|
import {
|
|
6
5
|
getFileSystem2
|
|
7
|
-
} from "./index-
|
|
6
|
+
} from "./index-p64w2wrt.js";
|
|
8
7
|
import {
|
|
9
8
|
catchError,
|
|
10
9
|
logger,
|
|
11
10
|
UIPATH_HOME_DIR
|
|
12
|
-
} from "./index-
|
|
11
|
+
} from "./index-zhp702kh.js";
|
|
12
|
+
import {
|
|
13
|
+
refreshGlobalNpmUipathDir,
|
|
14
|
+
getEnvToolsDirsDeclaration
|
|
15
|
+
} from "./index-xw81b1gn.js";
|
|
13
16
|
|
|
14
17
|
// src/commands/tools/tool-helpers.ts
|
|
15
18
|
function getInstalledTools(state) {
|
|
@@ -17,70 +20,34 @@ function getInstalledTools(state) {
|
|
|
17
20
|
name: d.toolName,
|
|
18
21
|
version: d.version,
|
|
19
22
|
description: d.description,
|
|
20
|
-
commandPrefix: d.commandPrefix
|
|
23
|
+
commandPrefix: d.commandPrefix,
|
|
24
|
+
path: d.toolPath
|
|
21
25
|
}));
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
// src/services/updateFailureFormat.ts
|
|
25
|
-
var PINNED_LINE_REMEDIATION = "Pin a published version line with `uip config set version <major.minor>`, " + `switch channels with \`uip config set updateChannel ${CHANNEL_PLACEHOLDER}\`, ` + "or clear the pin with `uip config clear version` to track the latest " + "release, then re-run `uip update`.";
|
|
26
|
-
var LATEST_LINE_REMEDIATION = "Pin a published version line with `uip config set version <major.minor>`, " + `or switch channels with \`uip config set updateChannel ${CHANNEL_PLACEHOLDER}\`, ` + "then re-run `uip update`.";
|
|
27
|
-
function pinnedLineRemediation(origin) {
|
|
28
|
-
if (origin === "latest")
|
|
29
|
-
return LATEST_LINE_REMEDIATION;
|
|
30
|
-
return PINNED_LINE_REMEDIATION;
|
|
31
|
-
}
|
|
32
29
|
function toolFailureRemediation(origin) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return error.Kind === "pinned-line-missing";
|
|
30
|
+
if (origin === "latest") {
|
|
31
|
+
return `Check that the tool works with this CLI version, or run \`uip config set updateChannel ${CHANNEL_PLACEHOLDER}\` to switch release channels.`;
|
|
32
|
+
}
|
|
33
|
+
return `Check that the tool works with this CLI version, or run \`uip config set updateChannel ${CHANNEL_PLACEHOLDER} --force\` to switch release channels.`;
|
|
38
34
|
}
|
|
39
35
|
function describeSearchedRegistry(registry) {
|
|
40
36
|
return registry ? ` (searched ${registry})` : "";
|
|
41
37
|
}
|
|
42
|
-
function describeMissingLine(opts) {
|
|
43
|
-
const { pin, origin, targetLine, searched } = opts;
|
|
44
|
-
const suffix = describeSearchedRegistry(searched);
|
|
45
|
-
if (origin === "latest") {
|
|
46
|
-
return `No version found in the latest ${targetLine} line${suffix}`;
|
|
47
|
-
}
|
|
48
|
-
return `No version found matching pinned ${formatVersionPin(pin)} in the ${targetLine} line${suffix}`;
|
|
49
|
-
}
|
|
50
38
|
function describeDowngradeReason(origin) {
|
|
51
39
|
if (origin === "latest")
|
|
52
40
|
return "the latest version line";
|
|
53
41
|
return "the pinned version";
|
|
54
42
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return parts.length > 0 ? parts.join(" and ") : "the pinned line";
|
|
64
|
-
}
|
|
65
|
-
function describePinnedLine(target) {
|
|
66
|
-
if (!target?.pin)
|
|
67
|
-
return "the pinned version line";
|
|
68
|
-
const line = `${target.pin.major}.${target.pin.minor}`;
|
|
69
|
-
if (target.origin === "latest") {
|
|
70
|
-
return `the latest version line ${line}`;
|
|
71
|
-
}
|
|
72
|
-
return `the pinned version line ${line}`;
|
|
73
|
-
}
|
|
74
|
-
function collapsePinnedLineErrors(report, target) {
|
|
75
|
-
const missing = report.Errors.filter(isPinnedLineMissing);
|
|
76
|
-
if (missing.length <= 1) {
|
|
77
|
-
return { collapsed: null, individual: report.Errors };
|
|
78
|
-
}
|
|
79
|
-
const searched = missing.find((e) => e.Registry)?.Registry;
|
|
80
|
-
return {
|
|
81
|
-
collapsed: `No published release found for ${describeMissing(missing)} on ` + `${describePinnedLine(target)} (channel: ${report.Channel}${searched ? `; searched ${searched}` : ""}). ` + pinnedLineRemediation(target?.origin),
|
|
82
|
-
individual: report.Errors.filter((e) => !isPinnedLineMissing(e))
|
|
83
|
-
};
|
|
43
|
+
|
|
44
|
+
// src/utils/globalInstallDir.ts
|
|
45
|
+
async function globalInstallDirFor(location) {
|
|
46
|
+
if (!location.global || location.prefix)
|
|
47
|
+
return null;
|
|
48
|
+
if (await getEnvToolsDirsDeclaration())
|
|
49
|
+
return null;
|
|
50
|
+
return refreshGlobalNpmUipathDir();
|
|
84
51
|
}
|
|
85
52
|
|
|
86
53
|
// src/services/versionSyncState.ts
|
|
@@ -107,6 +74,9 @@ async function readState(fs = getFileSystem2()) {
|
|
|
107
74
|
if (typeof parsed.lastUpdateDate === "string") {
|
|
108
75
|
state.lastUpdateDate = parsed.lastUpdateDate;
|
|
109
76
|
}
|
|
77
|
+
if (typeof parsed.frozenEnvWarningDate === "string") {
|
|
78
|
+
state.frozenEnvWarningDate = parsed.frozenEnvWarningDate;
|
|
79
|
+
}
|
|
110
80
|
if (isPlainRecord(parsed.toolUpdateDates)) {
|
|
111
81
|
const dates = {};
|
|
112
82
|
for (const [name, date] of Object.entries(parsed.toolUpdateDates)) {
|
|
@@ -136,6 +106,18 @@ async function mergeState(patch, fs = getFileSystem2()) {
|
|
|
136
106
|
return next;
|
|
137
107
|
}, fs);
|
|
138
108
|
}
|
|
109
|
+
async function claimFrozenEnvWarning(today, fs = getFileSystem2()) {
|
|
110
|
+
if ((await readState(fs)).frozenEnvWarningDate === today)
|
|
111
|
+
return false;
|
|
112
|
+
let claimed = false;
|
|
113
|
+
const persisted = await updateState((current) => {
|
|
114
|
+
if (current.frozenEnvWarningDate === today)
|
|
115
|
+
return current;
|
|
116
|
+
claimed = true;
|
|
117
|
+
return { ...current, frozenEnvWarningDate: today };
|
|
118
|
+
}, fs);
|
|
119
|
+
return claimed && persisted;
|
|
120
|
+
}
|
|
139
121
|
async function updateState(mutate, fs) {
|
|
140
122
|
const target = stateFilePath(fs);
|
|
141
123
|
await catchError(fs.mkdir(fs.path.dirname(target)));
|
|
@@ -166,6 +148,6 @@ async function updateState(mutate, fs) {
|
|
|
166
148
|
}
|
|
167
149
|
}
|
|
168
150
|
|
|
169
|
-
export { getInstalledTools,
|
|
151
|
+
export { getInstalledTools, toolFailureRemediation, describeSearchedRegistry, describeDowngradeReason, globalInstallDirFor, todayLocal, readState, recordToolUpdateDate, mergeState, claimFrozenEnvWarning };
|
|
170
152
|
|
|
171
|
-
//# debugId=
|
|
153
|
+
//# debugId=E5213B2D4F35F19364756E2164756E21
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
resolveEnvFileLocationAsync2,
|
|
27
27
|
resolveEnvFilePathAsync2,
|
|
28
28
|
loadEnvFileAsync2,
|
|
29
|
-
saveEnvFileAsync2,
|
|
30
29
|
CredentialSource2,
|
|
31
30
|
getLoginStatusAsync2,
|
|
32
31
|
describeAuthProfilesAsync2,
|
|
@@ -34,18 +33,19 @@ import {
|
|
|
34
33
|
isTenantSelectionError2,
|
|
35
34
|
interactiveLogin2,
|
|
36
35
|
logout2,
|
|
36
|
+
updateEnvFileLockedAsync2,
|
|
37
37
|
authenticate2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-8n0z4r6f.js";
|
|
39
39
|
import {
|
|
40
40
|
isBrowser2
|
|
41
41
|
} from "./index-zdqbp34f.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-p64w2wrt.js";
|
|
43
43
|
import {
|
|
44
44
|
DEFAULT_AUTH_TIMEOUT_MS2,
|
|
45
45
|
AUTH_TIMEOUT_ERROR_CODE2,
|
|
46
46
|
AUTH_CANCELLED_ERROR_CODE2,
|
|
47
47
|
AUTH_RECLAIMED_ERROR_CODE2
|
|
48
|
-
} from "./index-
|
|
48
|
+
} from "./index-65pyx6c9.js";
|
|
49
49
|
export {
|
|
50
50
|
AUTH_CANCELLED_ERROR_CODE2 as AUTH_CANCELLED_ERROR_CODE,
|
|
51
51
|
AUTH_FLOW_ENV_VAR2 as AUTH_FLOW_ENV_VAR,
|
|
@@ -85,9 +85,9 @@ export {
|
|
|
85
85
|
resolveEnvFileLocationAsync2 as resolveEnvFileLocationAsync,
|
|
86
86
|
resolveEnvFilePathAsync2 as resolveEnvFilePathAsync,
|
|
87
87
|
runWithAuthProfile2 as runWithAuthProfile,
|
|
88
|
-
saveEnvFileAsync2 as saveEnvFileAsync,
|
|
89
88
|
setActiveAuthProfile2 as setActiveAuthProfile,
|
|
90
|
-
setAuthFileConfig2 as setAuthFileConfig
|
|
89
|
+
setAuthFileConfig2 as setAuthFileConfig,
|
|
90
|
+
updateEnvFileLockedAsync2 as updateEnvFileLockedAsync
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
//# debugId=
|
|
93
|
+
//# debugId=178347A5F87C5B2964756E2164756E21
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/services/channels.ts
|
|
2
|
+
var CHANNELS = ["stable", "preview", "dev"];
|
|
3
|
+
var VALID_CHANNELS = new Set(CHANNELS);
|
|
4
|
+
var HIDDEN_CHANNELS = ["dev"];
|
|
5
|
+
var PUBLIC_CHANNELS = CHANNELS.filter((channel) => !HIDDEN_CHANNELS.includes(channel));
|
|
6
|
+
var CHANNEL_PLACEHOLDER = `<${PUBLIC_CHANNELS.join("|")}>`;
|
|
7
|
+
function versionChannel(cliVersion) {
|
|
8
|
+
const prerelease = parsePrereleaseTag(cliVersion);
|
|
9
|
+
if (prerelease && VALID_CHANNELS.has(prerelease)) {
|
|
10
|
+
return prerelease;
|
|
11
|
+
}
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
function parsePrereleaseTag(version) {
|
|
15
|
+
const dashIdx = version.indexOf("-");
|
|
16
|
+
if (dashIdx === -1)
|
|
17
|
+
return;
|
|
18
|
+
return version.slice(dashIdx + 1).split(".")[0];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { CHANNELS, VALID_CHANNELS, HIDDEN_CHANNELS, PUBLIC_CHANNELS, CHANNEL_PLACEHOLDER, versionChannel, parsePrereleaseTag };
|
|
22
|
+
|
|
23
|
+
//# debugId=5888AF5FC772513064756E2164756E21
|