@uipath/cli 1.204.0-preview.255 → 1.205.0-preview.256
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 +1 -3
- package/dist/{cli-7xq6r3rc.js → cli-xekt99dc.js} +5 -5
- package/dist/{index-zwnedwxc.js → index-30618bjs.js} +124 -58
- package/dist/{index-mttdq2yn.js → index-7tshyfxx.js} +2 -2
- package/dist/{index-xdxr3ync.js → index-hdxtgckw.js} +11 -1
- package/dist/{index-7px8p2cq.js → index-krbz0qa3.js} +410 -428
- package/dist/{index-hhsf00x8.js → index-ngs0a2he.js} +1 -1
- package/dist/{index-trd07rnv.js → index-pj3g8ftz.js} +15 -6
- package/dist/{index-p0f7rv7t.js → index-yx2tptr8.js} +145 -148
- package/dist/index.js +9 -41
- package/dist/{node-strategy-zj25w5zz.js → node-strategy-ggx3nmyj.js} +1 -1
- package/dist/{server-056jpday.js → server-fywgvr0v.js} +48 -7
- package/dist/{telemetry-drain-368b7rp3.js → telemetry-drain-r92f0e4r.js} +2 -2
- package/dist/{updateService-xrszjfh3.js → updateService-s1d7wrsy.js} +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-hdxtgckw.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
6
|
__require,
|
|
@@ -2645,6 +2645,9 @@ function getExitCode() {
|
|
|
2645
2645
|
const code = process.exitCode;
|
|
2646
2646
|
return typeof code === "number" ? code : 0;
|
|
2647
2647
|
}
|
|
2648
|
+
function resetExitCode() {
|
|
2649
|
+
process.exitCode = 0;
|
|
2650
|
+
}
|
|
2648
2651
|
|
|
2649
2652
|
// ../common/src/output-context.ts
|
|
2650
2653
|
function createStorage() {
|
|
@@ -2698,7 +2701,7 @@ var LogLevel;
|
|
|
2698
2701
|
LogLevel2[LogLevel2["WARN"] = 2] = "WARN";
|
|
2699
2702
|
LogLevel2[LogLevel2["ERROR"] = 3] = "ERROR";
|
|
2700
2703
|
})(LogLevel ||= {});
|
|
2701
|
-
var DEFAULT_LOG_LEVEL =
|
|
2704
|
+
var DEFAULT_LOG_LEVEL = 2 /* WARN */;
|
|
2702
2705
|
|
|
2703
2706
|
class SimpleLogger {
|
|
2704
2707
|
__brand = "SimpleLogger";
|
|
@@ -3185,7 +3188,9 @@ var ErrorDimensions = {
|
|
|
3185
3188
|
Result: "Result",
|
|
3186
3189
|
ErrorCode: "ErrorCode",
|
|
3187
3190
|
Retry: "Retry",
|
|
3188
|
-
ErrorMessage: "ErrorMessage"
|
|
3191
|
+
ErrorMessage: "ErrorMessage",
|
|
3192
|
+
HttpStatus: "HttpStatus",
|
|
3193
|
+
UpstreamErrorCode: "UpstreamErrorCode"
|
|
3189
3194
|
};
|
|
3190
3195
|
var AuthDimensions = {
|
|
3191
3196
|
AuthenticationMethod: "AuthenticationMethod",
|
|
@@ -5010,7 +5015,9 @@ var CLI_ERROR_CODES = [
|
|
|
5010
5015
|
"timeout",
|
|
5011
5016
|
"server_error",
|
|
5012
5017
|
"method_not_allowed",
|
|
5018
|
+
"not_supported",
|
|
5013
5019
|
"configuration_error",
|
|
5020
|
+
"execution_failed",
|
|
5014
5021
|
"unknown_error"
|
|
5015
5022
|
];
|
|
5016
5023
|
var RETRY_HINTS = [
|
|
@@ -6021,7 +6028,9 @@ var OutputFormatter;
|
|
|
6021
6028
|
[ErrorDimensions.Result]: data.Result,
|
|
6022
6029
|
[ErrorDimensions.ErrorCode]: data.ErrorCode,
|
|
6023
6030
|
[ErrorDimensions.Retry]: data.Retry,
|
|
6024
|
-
[ErrorDimensions.ErrorMessage]: data.Message
|
|
6031
|
+
[ErrorDimensions.ErrorMessage]: data.Message,
|
|
6032
|
+
[ErrorDimensions.HttpStatus]: data.Context?.httpStatus?.toString(),
|
|
6033
|
+
[ErrorDimensions.UpstreamErrorCode]: data.Context?.errorCode
|
|
6025
6034
|
});
|
|
6026
6035
|
}
|
|
6027
6036
|
logOutput(normalizeOutputKeys(envelope), getOutputFormat());
|
|
@@ -7258,6 +7267,6 @@ var factorySlot = singleton("PackagerFactoryProvider");
|
|
|
7258
7267
|
function setPackagerFactoryProvider(provider) {
|
|
7259
7268
|
factorySlot.set(provider);
|
|
7260
7269
|
}
|
|
7261
|
-
export { redactProperties, catchError, carriedInstructions, formatErrorChain, describeConnectivityError, extractErrorMessageSync, setExitCode, getExitCode, runWithSink, getOutputSink, setGlobalSink, LogLevel, logger, configureLogger, loadOutputCodecsAsync, setOutputFormat, getOutputFormat, setOutputFormatExplicit, getOutputFormatExplicit, setHelpRequested, getHelpRequested, setOutputFilter, OUTPUT_FORMATS, isOutputFormat, CLI_APPLICATION_NAME, BaseDimensions, CommandDimensions, AuthDimensions, SkillsDimensions, assertNoCuratedDimensionTargets, takeRecordedCommandFailureTelemetry, buildCommandTerminalTelemetryProperties, CommonTelemetryEvents, detectAgent, detectAgentVersion, buildEnvironmentProperties, setExecutionContextAuthSignal, setGlobalTelemetryProperties, runWithTimings, setTimingCommand, recordExitCode, suppressTimingReport, makeTrackedFetch, setProxyAuthHttpsAgent, isTelemetryDisabled, TELEMETRY_DRAIN_ARGV, setTelemetrySidecarEntry, claimPendingSpoolFiles, releaseClaimedSpoolFile, discardClaimedSpoolFile, sweepTelemetrySpool, getTelemetryIngestionOrigin, telemetry, telemetryInit, telemetryFlushAndShutdown, telemetryShutdownWithoutFlush, carriedErrorCode, carriedRetry, RESULTS, EXIT_CODES, Pagination, validateOutputFilter, OutputFormatter, Command, Option, setPreviewBuild, buildSkillEventTelemetryAttribution, sanitizeTelemetryToken, commandTelemetryName, commandInvocationPath, runWithInvocationRequest, emitInvocationRequest, processContext, setProcessContextPollSignal, TELEMETRY_ARG_VALUE_WITHHELD, extractCommandHelp, collectCommands, getCompleter, requireConfirmation, installConsoleGuard, UIPATH_HOME_DIR, CONFIG_FILENAME, DEFAULT_FETCH_TIMEOUT_MS, resolveEnvReference, setInteractivityMode, setInteractiveFlag, wasInteractiveFlagPassed, canPrompt, parseBoundedInt, splitScopeList, REGISTER_EXPORT, createPollAbortController, setSdkUserAgentHostToken, readStdinWithTimeout, setPackagerFactoryProvider };
|
|
7270
|
+
export { redactProperties, catchError, carriedInstructions, formatErrorChain, describeConnectivityError, extractErrorMessageSync, setExitCode, getExitCode, resetExitCode, runWithSink, getOutputSink, setGlobalSink, LogLevel, logger, configureLogger, loadOutputCodecsAsync, setOutputFormat, getOutputFormat, setOutputFormatExplicit, getOutputFormatExplicit, setHelpRequested, getHelpRequested, setOutputFilter, OUTPUT_FORMATS, isOutputFormat, CLI_APPLICATION_NAME, BaseDimensions, CommandDimensions, AuthDimensions, SkillsDimensions, assertNoCuratedDimensionTargets, takeRecordedCommandFailureTelemetry, buildCommandTerminalTelemetryProperties, CommonTelemetryEvents, detectAgent, detectAgentVersion, buildEnvironmentProperties, setExecutionContextAuthSignal, setGlobalTelemetryProperties, runWithTimings, setTimingCommand, recordExitCode, suppressTimingReport, makeTrackedFetch, setProxyAuthHttpsAgent, isTelemetryDisabled, TELEMETRY_DRAIN_ARGV, setTelemetrySidecarEntry, claimPendingSpoolFiles, releaseClaimedSpoolFile, discardClaimedSpoolFile, sweepTelemetrySpool, getTelemetryIngestionOrigin, telemetry, telemetryInit, telemetryFlushAndShutdown, telemetryShutdownWithoutFlush, carriedErrorCode, carriedRetry, RESULTS, EXIT_CODES, Pagination, validateOutputFilter, OutputFormatter, Command, Option, setPreviewBuild, buildSkillEventTelemetryAttribution, sanitizeTelemetryToken, commandTelemetryName, commandInvocationPath, runWithInvocationRequest, emitInvocationRequest, processContext, setProcessContextPollSignal, TELEMETRY_ARG_VALUE_WITHHELD, extractCommandHelp, collectCommands, getCompleter, requireConfirmation, installConsoleGuard, UIPATH_HOME_DIR, CONFIG_FILENAME, DEFAULT_FETCH_TIMEOUT_MS, resolveEnvReference, setInteractivityMode, setInteractiveFlag, wasInteractiveFlagPassed, canPrompt, parseBoundedInt, splitScopeList, REGISTER_EXPORT, createPollAbortController, setSdkUserAgentHostToken, readStdinWithTimeout, setPackagerFactoryProvider };
|
|
7262
7271
|
|
|
7263
|
-
//# debugId=
|
|
7272
|
+
//# debugId=81DE228B4015217B64756E2164756E21
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
logger,
|
|
12
12
|
processContext,
|
|
13
13
|
wasInteractiveFlagPassed
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-pj3g8ftz.js";
|
|
15
15
|
import {
|
|
16
16
|
exports_external
|
|
17
17
|
} from "./index-hrt7fpkk.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./index-d3w0wn6k.js";
|
|
21
21
|
import {
|
|
22
22
|
getFileSystem
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-hdxtgckw.js";
|
|
24
24
|
import {
|
|
25
25
|
__commonJS,
|
|
26
26
|
__require,
|
|
@@ -551,7 +551,7 @@ var package_default = {
|
|
|
551
551
|
name: "@uipath/cli",
|
|
552
552
|
author: "UiPath",
|
|
553
553
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
554
|
-
version: "1.
|
|
554
|
+
version: "1.205.0-preview.256",
|
|
555
555
|
description: "Cross platform CLI for UiPath",
|
|
556
556
|
repository: {
|
|
557
557
|
type: "git",
|
|
@@ -614,9 +614,6 @@ var package_default = {
|
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
|
|
617
|
-
// src/config/loadConfig.ts
|
|
618
|
-
import { randomUUID } from "node:crypto";
|
|
619
|
-
|
|
620
617
|
// src/services/channels.ts
|
|
621
618
|
var CHANNELS = ["stable", "preview", "dev"];
|
|
622
619
|
var VALID_CHANNELS = new Set(CHANNELS);
|
|
@@ -625,8 +622,9 @@ var PUBLIC_CHANNELS = CHANNELS.filter((channel) => !HIDDEN_CHANNELS.includes(cha
|
|
|
625
622
|
var CHANNEL_PLACEHOLDER = `<${PUBLIC_CHANNELS.join("|")}>`;
|
|
626
623
|
|
|
627
624
|
// src/config/configLock.ts
|
|
625
|
+
import { randomUUID } from "node:crypto";
|
|
628
626
|
async function withConfigLock(targetPath, fn) {
|
|
629
|
-
const { getFileSystemAsync } = await import("./index-
|
|
627
|
+
const { getFileSystemAsync } = await import("./index-ngs0a2he.js");
|
|
630
628
|
const fs = await getFileSystemAsync();
|
|
631
629
|
const dir = fs.path.dirname(targetPath);
|
|
632
630
|
const [mkdirErr] = await catchError(fs.mkdir(dir));
|
|
@@ -640,6 +638,35 @@ async function withConfigLock(targetPath, fn) {
|
|
|
640
638
|
await catchError(release());
|
|
641
639
|
}
|
|
642
640
|
}
|
|
641
|
+
async function readConfigFileAt(path) {
|
|
642
|
+
const { getFileSystem: getFileSystem2 } = await import("./index-ngs0a2he.js");
|
|
643
|
+
const fs = getFileSystem2();
|
|
644
|
+
if (!await fs.exists(path)) {
|
|
645
|
+
return {};
|
|
646
|
+
}
|
|
647
|
+
const content = await fs.readFile(path, "utf-8");
|
|
648
|
+
if (content === null) {
|
|
649
|
+
return {};
|
|
650
|
+
}
|
|
651
|
+
const parsed = JSON.parse(content);
|
|
652
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
653
|
+
return {};
|
|
654
|
+
}
|
|
655
|
+
return parsed;
|
|
656
|
+
}
|
|
657
|
+
async function writeConfigFileAt(path, config) {
|
|
658
|
+
const { getFileSystem: getFileSystem2 } = await import("./index-ngs0a2he.js");
|
|
659
|
+
const fs = getFileSystem2();
|
|
660
|
+
const dir = fs.path.dirname(path);
|
|
661
|
+
await fs.mkdir(dir);
|
|
662
|
+
const tempPath = `${path}.${randomUUID()}.tmp`;
|
|
663
|
+
await fs.writeFile(tempPath, JSON.stringify(config, null, 4));
|
|
664
|
+
const [renameErr] = await catchError(fs.rename(tempPath, path));
|
|
665
|
+
if (renameErr) {
|
|
666
|
+
await catchError(fs.rm(tempPath));
|
|
667
|
+
throw renameErr;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
643
670
|
|
|
644
671
|
// src/config/loadConfig.ts
|
|
645
672
|
var VERSION_PIN_RE = /^(\d+)\.(\d+)(?:\.(\d+))?$/;
|
|
@@ -652,8 +679,6 @@ var ConfigSchema = exports_external.object({
|
|
|
652
679
|
version: exports_external.string().regex(VERSION_PIN_RE, "must be major.minor or major.minor.patch (e.g. 1.2 or 1.2.3)").optional()
|
|
653
680
|
}).optional(),
|
|
654
681
|
auth: exports_external.object({
|
|
655
|
-
clientId: exports_external.string().min(1).optional(),
|
|
656
|
-
clientSecret: exports_external.string().min(1).optional(),
|
|
657
682
|
scopes: exports_external.array(exports_external.string().min(1)).optional(),
|
|
658
683
|
authority: exports_external.string().url().optional()
|
|
659
684
|
}).optional(),
|
|
@@ -662,9 +687,6 @@ var ConfigSchema = exports_external.object({
|
|
|
662
687
|
localToolPaths: exports_external.array(exports_external.string().min(1)).optional()
|
|
663
688
|
}).optional()
|
|
664
689
|
});
|
|
665
|
-
var SECRET_FIELD_PATHS = [
|
|
666
|
-
["auth", "clientSecret"]
|
|
667
|
-
];
|
|
668
690
|
var formatZodError = (error) => {
|
|
669
691
|
const issues = error.issues.map((issue) => {
|
|
670
692
|
const path = issue.path.join(".") || "config";
|
|
@@ -700,124 +722,26 @@ var validateConfig = (parsed) => {
|
|
|
700
722
|
}
|
|
701
723
|
return result.data;
|
|
702
724
|
};
|
|
703
|
-
var
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
|
|
725
|
+
var CREDENTIAL_AUTH_KEYS = ["clientId", "clientSecret"];
|
|
726
|
+
var hasCredentialAuthKeys = (parsed) => {
|
|
727
|
+
const auth = parsed?.auth;
|
|
728
|
+
return typeof auth === "object" && auth !== null && CREDENTIAL_AUTH_KEYS.some((key) => (key in auth));
|
|
707
729
|
};
|
|
708
|
-
var
|
|
709
|
-
|
|
710
|
-
await
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
};
|
|
719
|
-
var parseRawConfigObject = (content) => {
|
|
720
|
-
if (!content)
|
|
721
|
-
return null;
|
|
722
|
-
const [, parsed] = catchError(() => JSON.parse(content));
|
|
723
|
-
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
724
|
-
return null;
|
|
725
|
-
}
|
|
726
|
-
return parsed;
|
|
727
|
-
};
|
|
728
|
-
var readRawCoreSection = async (absolutePath) => {
|
|
729
|
-
const fs = await getFs();
|
|
730
|
-
const [, content] = await catchError(fs.readFile(absolutePath, "utf-8"));
|
|
731
|
-
const raw = parseRawConfigObject(content ?? null);
|
|
732
|
-
const core = raw?.core;
|
|
733
|
-
if (core === null || typeof core !== "object" || Array.isArray(core)) {
|
|
734
|
-
return null;
|
|
735
|
-
}
|
|
736
|
-
return core;
|
|
737
|
-
};
|
|
738
|
-
var migrateVersionConfig = async (installedVersion) => {
|
|
739
|
-
const [err, result] = await catchError(runVersionConfigMigration(installedVersion));
|
|
740
|
-
if (err) {
|
|
741
|
-
logger.debug(`Version config migration skipped: ${err.message}`);
|
|
742
|
-
return { removedAutoVersionSync: false, frozenByExactPin: false };
|
|
743
|
-
}
|
|
744
|
-
return result;
|
|
745
|
-
};
|
|
746
|
-
var versionMigrationNotice = (migration) => {
|
|
747
|
-
if (migration.frozeAtInstalledVersion) {
|
|
748
|
-
return "core.autoVersionSync is no longer supported. To preserve your " + `opt-out, the CLI is now pinned to ${migration.frozeAtInstalledVersion}. ` + "Clear it with `uip config clear version` to resume auto-updates.\n";
|
|
749
|
-
}
|
|
750
|
-
if (migration.frozenByExactPin) {
|
|
751
|
-
return "core.autoVersionSync is no longer supported. Your exact version " + "pin keeps the CLI frozen; clear it with `uip config clear " + "version` to resume auto-updates.\n";
|
|
752
|
-
}
|
|
753
|
-
return "core.autoVersionSync is no longer supported; auto-update is on. " + "To freeze the CLI, pin an exact version: " + "`uip config set version <major.minor.patch>`.\n";
|
|
754
|
-
};
|
|
755
|
-
var hasLegacyKeys = (core) => core !== null && (("versionSource" in core) || ("autoVersionSync" in core) || core.output === "text");
|
|
756
|
-
var isExactPinValue = (version) => typeof version === "string" && VERSION_PIN_RE.exec(version.trim())?.[3] !== undefined;
|
|
757
|
-
var toInstalledExactPin = (version) => {
|
|
758
|
-
const core = version.split("-")[0].trim();
|
|
759
|
-
return VERSION_PIN_RE.exec(core)?.[3] !== undefined ? core : null;
|
|
760
|
-
};
|
|
761
|
-
var runVersionConfigMigration = async (installedVersion) => {
|
|
762
|
-
const none = { removedAutoVersionSync: false, frozenByExactPin: false };
|
|
763
|
-
const { absolutePath, exists } = await resolveConfigFilePathAsync();
|
|
764
|
-
if (!absolutePath || !exists)
|
|
765
|
-
return none;
|
|
766
|
-
if (!hasLegacyKeys(await readRawCoreSection(absolutePath)))
|
|
767
|
-
return none;
|
|
768
|
-
const result = await withConfigLock(absolutePath, async () => {
|
|
769
|
-
const fs = await getFs();
|
|
770
|
-
const [, content] = await catchError(fs.readFile(absolutePath, "utf-8"));
|
|
771
|
-
const raw = parseRawConfigObject(content ?? null);
|
|
772
|
-
const core = raw?.core;
|
|
773
|
-
if (!raw || core === null || typeof core !== "object" || Array.isArray(core)) {
|
|
774
|
-
return none;
|
|
775
|
-
}
|
|
776
|
-
const coreObj = core;
|
|
777
|
-
const hadSource = "versionSource" in coreObj;
|
|
778
|
-
const hadAutoSync = "autoVersionSync" in coreObj;
|
|
779
|
-
const hadTextOutput = coreObj.output === "text";
|
|
780
|
-
if (!hadSource && !hadAutoSync && !hadTextOutput) {
|
|
781
|
-
return none;
|
|
782
|
-
}
|
|
783
|
-
const optedOut = coreObj.autoVersionSync === "false";
|
|
784
|
-
const clearedEnvPin = coreObj.versionSource === "environment";
|
|
785
|
-
if (clearedEnvPin) {
|
|
786
|
-
delete coreObj.version;
|
|
787
|
-
}
|
|
788
|
-
delete coreObj.versionSource;
|
|
789
|
-
delete coreObj.autoVersionSync;
|
|
790
|
-
if (hadTextOutput)
|
|
791
|
-
coreObj.output = "plain";
|
|
792
|
-
let frozeAtInstalledVersion;
|
|
793
|
-
if (optedOut && !isExactPinValue(coreObj.version)) {
|
|
794
|
-
const exact = toInstalledExactPin(installedVersion);
|
|
795
|
-
if (exact) {
|
|
796
|
-
coreObj.version = exact;
|
|
797
|
-
frozeAtInstalledVersion = exact;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
raw.core = coreObj;
|
|
801
|
-
await atomicWriteConfig(absolutePath, raw);
|
|
802
|
-
const removed = [
|
|
803
|
-
hadSource ? "versionSource" : null,
|
|
804
|
-
hadAutoSync ? "autoVersionSync" : null,
|
|
805
|
-
clearedEnvPin ? "env-written version" : null,
|
|
806
|
-
hadTextOutput ? "output=text→plain" : null
|
|
807
|
-
].filter(Boolean);
|
|
808
|
-
logger.info(`Migrated legacy config (${removed.join(", ")}` + `${frozeAtInstalledVersion ? `; froze at ${frozeAtInstalledVersion}` : ""}).`);
|
|
809
|
-
return {
|
|
810
|
-
removedAutoVersionSync: hadAutoSync,
|
|
811
|
-
frozenByExactPin: isExactPinValue(coreObj.version),
|
|
812
|
-
frozeAtInstalledVersion
|
|
813
|
-
};
|
|
730
|
+
var cachedConfig = null;
|
|
731
|
+
var deleteCredentialAuthKeys = async (absolutePath) => {
|
|
732
|
+
await withConfigLock(absolutePath, async () => {
|
|
733
|
+
const raw = await readConfigFileAt(absolutePath);
|
|
734
|
+
if (!hasCredentialAuthKeys(raw))
|
|
735
|
+
return;
|
|
736
|
+
const { auth, ...rest } = raw;
|
|
737
|
+
for (const key of CREDENTIAL_AUTH_KEYS)
|
|
738
|
+
delete auth[key];
|
|
739
|
+
await writeConfigFileAt(absolutePath, Object.keys(auth).length === 0 ? rest : raw);
|
|
814
740
|
});
|
|
815
|
-
invalidateConfigCache();
|
|
816
|
-
await catchError(loadConfigAsync());
|
|
817
|
-
return result;
|
|
818
741
|
};
|
|
742
|
+
var getCachedConfig = () => cachedConfig ?? {};
|
|
819
743
|
var getFs = async () => {
|
|
820
|
-
const { getFileSystemAsync } = await import("./index-
|
|
744
|
+
const { getFileSystemAsync } = await import("./index-ngs0a2he.js");
|
|
821
745
|
return getFileSystemAsync();
|
|
822
746
|
};
|
|
823
747
|
var LOCAL_CONFIG_REL = `${UIPATH_HOME_DIR}/${CONFIG_FILENAME}`;
|
|
@@ -882,6 +806,12 @@ Please ensure your config file contains valid JSON.`);
|
|
|
882
806
|
}
|
|
883
807
|
throw parseErr;
|
|
884
808
|
}
|
|
809
|
+
if (hasCredentialAuthKeys(parsed)) {
|
|
810
|
+
const [removeErr] = await catchError(deleteCredentialAuthKeys(absolutePath));
|
|
811
|
+
if (removeErr) {
|
|
812
|
+
logger.debug(`Could not remove auth.clientId / auth.clientSecret: ${removeErr.message}`);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
885
815
|
cachedConfig = validateConfig(parsed);
|
|
886
816
|
return cachedConfig;
|
|
887
817
|
};
|
|
@@ -923,6 +853,45 @@ function parsePrereleaseTag(version) {
|
|
|
923
853
|
// src/services/cliInstaller.ts
|
|
924
854
|
import { fileURLToPath } from "node:url";
|
|
925
855
|
|
|
856
|
+
// src/system-ca.ts
|
|
857
|
+
function installSystemCaTrust(tlsModule) {
|
|
858
|
+
const getCertificates = tlsModule.getCACertificates;
|
|
859
|
+
const setDefaultCertificates = tlsModule.setDefaultCACertificates;
|
|
860
|
+
if (typeof getCertificates !== "function" || typeof setDefaultCertificates !== "function") {
|
|
861
|
+
return "unsupported";
|
|
862
|
+
}
|
|
863
|
+
try {
|
|
864
|
+
const system = getCertificates.call(tlsModule, "system");
|
|
865
|
+
if (!Array.isArray(system) || system.length === 0) {
|
|
866
|
+
return "empty";
|
|
867
|
+
}
|
|
868
|
+
const current = getCertificates.call(tlsModule, "default") ?? [];
|
|
869
|
+
setDefaultCertificates.call(tlsModule, [...current, ...system]);
|
|
870
|
+
return "applied";
|
|
871
|
+
} catch {
|
|
872
|
+
return "error";
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
var loadNodeTls = async () => await import("node:tls");
|
|
876
|
+
var cachedResult = "deferred";
|
|
877
|
+
var inFlight;
|
|
878
|
+
async function ensureSystemCaTrustAsync(loadTls = loadNodeTls) {
|
|
879
|
+
if (cachedResult !== "deferred") {
|
|
880
|
+
return cachedResult;
|
|
881
|
+
}
|
|
882
|
+
inFlight ??= (async () => {
|
|
883
|
+
cachedResult = installSystemCaTrust(await loadTls());
|
|
884
|
+
logger.debug(`OS certificate-store trust: ${cachedResult}`);
|
|
885
|
+
return cachedResult;
|
|
886
|
+
})();
|
|
887
|
+
return inFlight;
|
|
888
|
+
}
|
|
889
|
+
var NODE_USE_SYSTEM_CA_ENV = "NODE_USE_SYSTEM_CA";
|
|
890
|
+
function withSystemCaEnv(env = process.env) {
|
|
891
|
+
const alreadySet = Object.keys(env).some((key) => process.platform === "win32" ? key.toUpperCase() === NODE_USE_SYSTEM_CA_ENV : key === NODE_USE_SYSTEM_CA_ENV);
|
|
892
|
+
return alreadySet ? env : { ...env, [NODE_USE_SYSTEM_CA_ENV]: "1" };
|
|
893
|
+
}
|
|
894
|
+
|
|
926
895
|
// src/utils/globalNpmRoot.ts
|
|
927
896
|
var NPM_ROOT_TIMEOUT_MS = 5000;
|
|
928
897
|
var cachedLookup = null;
|
|
@@ -1082,8 +1051,6 @@ function npmGlobalRootParent(prefix, platform = process.platform) {
|
|
|
1082
1051
|
|
|
1083
1052
|
// src/services/bundleDistribution.ts
|
|
1084
1053
|
var BUNDLE_PACKAGE_NAME = "uipath-cli-bundle";
|
|
1085
|
-
var DISABLE_AUTOINSTALL_ENV = "UIPATH_CLI_DISABLE_AUTOINSTALL";
|
|
1086
|
-
var DISABLE_TOOL_LINE_CHECK_ENV = "UIPATH_CLI_DISABLE_TOOL_LINE_CHECK";
|
|
1087
1054
|
|
|
1088
1055
|
class InstallRefusedError extends Error {
|
|
1089
1056
|
instructions;
|
|
@@ -1120,19 +1087,6 @@ async function detectBundleManifest(prefixPath) {
|
|
|
1120
1087
|
}
|
|
1121
1088
|
return isBundle;
|
|
1122
1089
|
}
|
|
1123
|
-
function isAutoInstallDisabled() {
|
|
1124
|
-
return isTruthyEnv(DISABLE_AUTOINSTALL_ENV);
|
|
1125
|
-
}
|
|
1126
|
-
function isToolLineCheckDisabled() {
|
|
1127
|
-
return isTruthyEnv(DISABLE_TOOL_LINE_CHECK_ENV);
|
|
1128
|
-
}
|
|
1129
|
-
function isTruthyEnv(name) {
|
|
1130
|
-
const value = getFileSystem().env.getenv(name);
|
|
1131
|
-
if (!value)
|
|
1132
|
-
return false;
|
|
1133
|
-
const v = value.trim().toLowerCase();
|
|
1134
|
-
return v !== "" && v !== "0" && v !== "false" && v !== "no";
|
|
1135
|
-
}
|
|
1136
1090
|
|
|
1137
1091
|
// src/services/installArch.ts
|
|
1138
1092
|
function archPinEnv(host) {
|
|
@@ -1578,7 +1532,9 @@ async function spawnPackageManager(executable, args, cwd, label, extraEnv) {
|
|
|
1578
1532
|
}
|
|
1579
1533
|
const { spawn } = await loadChildProcess();
|
|
1580
1534
|
const isWindows = process.platform === "win32";
|
|
1581
|
-
const envOpt =
|
|
1535
|
+
const envOpt = {
|
|
1536
|
+
env: withSystemCaEnv(extraEnv ? mergeEnvCaseInsensitive(process.env, extraEnv) : process.env)
|
|
1537
|
+
};
|
|
1582
1538
|
return new Promise((resolve, reject) => {
|
|
1583
1539
|
let proc;
|
|
1584
1540
|
if (isWindows) {
|
|
@@ -1690,7 +1646,9 @@ class NodeToolService {
|
|
|
1690
1646
|
const args = ["view", packageName, "--json"];
|
|
1691
1647
|
const { spawn } = await loadChildProcess();
|
|
1692
1648
|
const isWindows = process.platform === "win32";
|
|
1693
|
-
const spawnOpts = {
|
|
1649
|
+
const spawnOpts = {
|
|
1650
|
+
env: withSystemCaEnv()
|
|
1651
|
+
};
|
|
1694
1652
|
const { stdout } = await new Promise((resolve, reject) => {
|
|
1695
1653
|
let proc;
|
|
1696
1654
|
if (isWindows) {
|
|
@@ -2118,7 +2076,7 @@ async function spawnPackageManagerAdd(packageManager, target, installPath, globa
|
|
|
2118
2076
|
});
|
|
2119
2077
|
}
|
|
2120
2078
|
async function isBunProject(installPath) {
|
|
2121
|
-
const { getFileSystem: getFileSystem2 } = await import("./index-
|
|
2079
|
+
const { getFileSystem: getFileSystem2 } = await import("./index-ngs0a2he.js");
|
|
2122
2080
|
const fs = getFileSystem2();
|
|
2123
2081
|
const bunLock = fs.path.join(installPath, "bun.lock");
|
|
2124
2082
|
const bunLockb = fs.path.join(installPath, "bun.lockb");
|
|
@@ -2144,12 +2102,14 @@ async function spawnSelfUpdateCommand({
|
|
|
2144
2102
|
}
|
|
2145
2103
|
proc = spawn(commandLine, [], {
|
|
2146
2104
|
cwd,
|
|
2105
|
+
env: withSystemCaEnv(),
|
|
2147
2106
|
shell: true,
|
|
2148
2107
|
stdio: ["inherit", "pipe", "pipe"]
|
|
2149
2108
|
});
|
|
2150
2109
|
} else {
|
|
2151
2110
|
proc = spawn(executable, args, {
|
|
2152
2111
|
cwd,
|
|
2112
|
+
env: withSystemCaEnv(),
|
|
2153
2113
|
stdio: ["inherit", "pipe", "pipe"]
|
|
2154
2114
|
});
|
|
2155
2115
|
}
|
|
@@ -2732,9 +2692,21 @@ async function fetchSkillsFromLocalDir(targetPath, localDir) {
|
|
|
2732
2692
|
if (rel === "" || !rel.startsWith("..") && !fs.path.isAbsolute(rel)) {
|
|
2733
2693
|
throw new SkillSourceError(`Local skills repo ${localDir} encloses the target store; pick a folder that does not contain the install target.`, "Point --repo at a dedicated skills folder, not a parent of the install target.");
|
|
2734
2694
|
}
|
|
2735
|
-
logger.info(`Copying skills from ${localDir}...`);
|
|
2736
2695
|
const parentDir = fs.path.dirname(targetPath);
|
|
2737
2696
|
await fs.mkdir(parentDir);
|
|
2697
|
+
const gitCwd = await fs.getTempDir();
|
|
2698
|
+
let missing;
|
|
2699
|
+
try {
|
|
2700
|
+
missing = await missingTrackedFiles(localDir, gitCwd);
|
|
2701
|
+
} finally {
|
|
2702
|
+
await catchError(fs.rm(gitCwd));
|
|
2703
|
+
}
|
|
2704
|
+
if (missing.length > 0) {
|
|
2705
|
+
const shown = missing.slice(0, 3).join(", ");
|
|
2706
|
+
const more = missing.length > 3 ? `, and ${missing.length - 3} more` : "";
|
|
2707
|
+
throw new SkillSourceError(`Local skills repo ${localDir} is missing ${missing.length} file(s) that git tracks (${shown}${more}), so installing from it would leave skills out.`, "Finish the checkout, then re-run. On Windows this is usually paths longer than 260 characters: in the clone run `git config core.longpaths true`. Back up or stash any local edits before `git restore --source=HEAD :/`: it resets every tracked file in the clone. If you removed the files on purpose, commit the removal.");
|
|
2708
|
+
}
|
|
2709
|
+
logger.info(`Copying skills from ${localDir}...`);
|
|
2738
2710
|
const stagingPath = fs.path.join(parentDir, `.staging-${randomUUID2()}`);
|
|
2739
2711
|
const manifestPath = fs.path.join(targetPath, MANIFEST_NAME);
|
|
2740
2712
|
let savedManifest = null;
|
|
@@ -2805,6 +2777,31 @@ async function runGit(args, cwd) {
|
|
|
2805
2777
|
});
|
|
2806
2778
|
});
|
|
2807
2779
|
}
|
|
2780
|
+
async function missingTrackedFiles(dir, trustedCwd) {
|
|
2781
|
+
const [error, output] = await catchError(runGit([
|
|
2782
|
+
"-C",
|
|
2783
|
+
dir,
|
|
2784
|
+
"ls-tree",
|
|
2785
|
+
"-r",
|
|
2786
|
+
"-z",
|
|
2787
|
+
"--name-only",
|
|
2788
|
+
"HEAD",
|
|
2789
|
+
"--",
|
|
2790
|
+
"."
|
|
2791
|
+
], trustedCwd));
|
|
2792
|
+
if (error || !output)
|
|
2793
|
+
return [];
|
|
2794
|
+
const fs = getFileSystem();
|
|
2795
|
+
const missing = [];
|
|
2796
|
+
for (const relative of output.split("\x00")) {
|
|
2797
|
+
if (relative.length === 0)
|
|
2798
|
+
continue;
|
|
2799
|
+
if (!await fs.exists(fs.path.join(dir, relative))) {
|
|
2800
|
+
missing.push(relative);
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
return missing;
|
|
2804
|
+
}
|
|
2808
2805
|
async function downloadAndExtractZip(storePath, source) {
|
|
2809
2806
|
const fs = getFileSystem();
|
|
2810
2807
|
if (!source.zipUrl) {
|
|
@@ -3246,7 +3243,7 @@ async function runPmCommand(pm, args, label, timeoutMs, cwd, extraEnv) {
|
|
|
3246
3243
|
validatePmArguments(args);
|
|
3247
3244
|
const { spawn: spawn2 } = await loadChildProcess2();
|
|
3248
3245
|
const isWindows = process.platform === "win32";
|
|
3249
|
-
const env = extraEnv ? { ...process.env, ...extraEnv } :
|
|
3246
|
+
const env = withSystemCaEnv(extraEnv ? { ...process.env, ...extraEnv } : process.env);
|
|
3250
3247
|
return await new Promise((resolve, reject) => {
|
|
3251
3248
|
let proc;
|
|
3252
3249
|
if (isWindows) {
|
|
@@ -9865,6 +9862,6 @@ function getManualCommandForInstallError(error, fallback) {
|
|
|
9865
9862
|
return error instanceof CliSelfUpdateError ? error.manualCommand : fallback;
|
|
9866
9863
|
}
|
|
9867
9864
|
|
|
9868
|
-
export { package_default, VALID_CHANNELS, HIDDEN_CHANNELS, PUBLIC_CHANNELS, withConfigLock,
|
|
9865
|
+
export { ensureSystemCaTrustAsync, package_default, VALID_CHANNELS, HIDDEN_CHANNELS, PUBLIC_CHANNELS, withConfigLock, readConfigFileAt, writeConfigFileAt, resolveConfigFilePathAsync, loadConfigAsync, resolveUpdateChannel, resolveRuntimeChannel, isPreviewVersion, isValidVersionPin, majorOf, resolvePinnedVersion, isExactPin, versionLinePrefix, formatVersionPin, dist_default5 as dist_default, dist_default6 as dist_default1, dist_default7 as dist_default2, getGlobalNpmUipathDir, refreshGlobalNpmUipathDir, TOOLS_DIRS_ENV_VAR, getEnvToolsDirsDeclaration, resolveNpmPrefixForToolsDir, InstallRefusedError, isBundledDistribution, TOOLS_WHITELIST, COMMAND_ALIASES, ALIASES_BY_COMMAND, WHITELIST_BY_COMMAND, WHITELIST_BY_SHORT_NAME, isValidSemver, compareSemver, resolveToolPackageName, parsePackageSpec, describeCandidateFailure, getEffectiveRegistry, isDevMode, HostOwnedToolError, truncateVersionsForDisplay, toolService, SkillSourceError, SkillsRegistryAuthError, resolveSkillSource, getContentStoreForRead, getAvailableSkills, readManifest, removeFromManifest, readExtraFiles, AGENT_DEFS, getSkillsDir, getSkillsDestinationHint, hasDistinctGlobalPath, skillOwnerOf, uninstallExtraFolders, uninstallSkill, rejectIfGlobalOnly, getSkillsSourceFailureDetails, buildSkillCatalog, removeSkillCatalog, searchSkillCatalog, ALL_AGENTS, AGENT_DISPLAY_NAMES, promptAgentSelection, SkillsError, resolveSkillsTargetVersion, resolveRootDir, resolveSkillsContext, runAgentInstalls, runSkillsUpdate, getInstalledTools, toolFailureRemediation, collapsePinnedLineErrors, todayLocal, readState, recordToolUpdateDate, mergeState, TOOLS_UPDATE_PHASES, runToolsUpdate, runUpdate };
|
|
9869
9866
|
|
|
9870
|
-
//# debugId=
|
|
9867
|
+
//# debugId=B335D9070D55201B64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runNode
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-krbz0qa3.js";
|
|
5
5
|
import {
|
|
6
6
|
registerRobotClientLoader
|
|
7
|
-
} from "./index-
|
|
8
|
-
import
|
|
7
|
+
} from "./index-30618bjs.js";
|
|
8
|
+
import {
|
|
9
|
+
ensureSystemCaTrustAsync
|
|
10
|
+
} from "./index-yx2tptr8.js";
|
|
9
11
|
import {
|
|
10
12
|
TELEMETRY_DRAIN_ARGV,
|
|
11
13
|
configureLogger,
|
|
@@ -18,13 +20,13 @@ import {
|
|
|
18
20
|
setProcessContextPollSignal,
|
|
19
21
|
setProxyAuthHttpsAgent,
|
|
20
22
|
setTelemetrySidecarEntry
|
|
21
|
-
} from "./index-
|
|
23
|
+
} from "./index-pj3g8ftz.js";
|
|
22
24
|
import"./index-g8ck9tv6.js";
|
|
23
25
|
import"./index-hrt7fpkk.js";
|
|
24
26
|
import"./index-d3w0wn6k.js";
|
|
25
27
|
import"./index-0gctz400.js";
|
|
26
28
|
import"./index-qa9gftnj.js";
|
|
27
|
-
import"./index-
|
|
29
|
+
import"./index-hdxtgckw.js";
|
|
28
30
|
import"./index-yc4kw997.js";
|
|
29
31
|
import {
|
|
30
32
|
__require,
|
|
@@ -41,40 +43,6 @@ process.emitWarning = (...args) => {
|
|
|
41
43
|
return originalEmitWarning.apply(process, args);
|
|
42
44
|
};
|
|
43
45
|
|
|
44
|
-
// src/system-ca.ts
|
|
45
|
-
function installSystemCaTrust(tlsModule) {
|
|
46
|
-
const getCertificates = tlsModule.getCACertificates;
|
|
47
|
-
const setDefaultCertificates = tlsModule.setDefaultCACertificates;
|
|
48
|
-
if (typeof getCertificates !== "function" || typeof setDefaultCertificates !== "function") {
|
|
49
|
-
return "unsupported";
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
const system = getCertificates.call(tlsModule, "system");
|
|
53
|
-
if (!Array.isArray(system) || system.length === 0) {
|
|
54
|
-
return "empty";
|
|
55
|
-
}
|
|
56
|
-
const current = getCertificates.call(tlsModule, "default") ?? [];
|
|
57
|
-
setDefaultCertificates.call(tlsModule, [...current, ...system]);
|
|
58
|
-
return "applied";
|
|
59
|
-
} catch {
|
|
60
|
-
return "error";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
var loadNodeTls = async () => await import("node:tls");
|
|
64
|
-
var cachedResult = "deferred";
|
|
65
|
-
var inFlight;
|
|
66
|
-
async function ensureSystemCaTrustAsync(loadTls = loadNodeTls) {
|
|
67
|
-
if (cachedResult !== "deferred") {
|
|
68
|
-
return cachedResult;
|
|
69
|
-
}
|
|
70
|
-
inFlight ??= (async () => {
|
|
71
|
-
cachedResult = installSystemCaTrust(await loadTls());
|
|
72
|
-
logger.debug(`OS certificate-store trust: ${cachedResult}`);
|
|
73
|
-
return cachedResult;
|
|
74
|
-
})();
|
|
75
|
-
return inFlight;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
46
|
// src/tracked-fetch-install.ts
|
|
79
47
|
var realFetch = globalThis.fetch;
|
|
80
48
|
if (typeof realFetch === "function") {
|
|
@@ -192,7 +160,7 @@ var isMain = __require.main == __require.module ?? process.argv[1] === currentFi
|
|
|
192
160
|
if (isMain) {
|
|
193
161
|
setTelemetrySidecarEntry(currentFile);
|
|
194
162
|
if (process.argv[2] === TELEMETRY_DRAIN_ARGV) {
|
|
195
|
-
const { drainPendingTelemetry } = await import("./telemetry-drain-
|
|
163
|
+
const { drainPendingTelemetry } = await import("./telemetry-drain-r92f0e4r.js");
|
|
196
164
|
await drainPendingTelemetry();
|
|
197
165
|
process.exit(0);
|
|
198
166
|
}
|
|
@@ -203,4 +171,4 @@ export {
|
|
|
203
171
|
run
|
|
204
172
|
};
|
|
205
173
|
|
|
206
|
-
//# debugId=
|
|
174
|
+
//# debugId=91184DEA89EACF1D64756E2164756E21
|