@uipath/test-manager-tool 1.197.0-preview.65 → 1.197.0-preview.67
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/tool.js +578 -9
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
|
|
|
21230
21230
|
var package_default = {
|
|
21231
21231
|
name: "@uipath/test-manager-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.197.0-preview.
|
|
21233
|
+
version: "1.197.0-preview.67",
|
|
21234
21234
|
description: "Manage test cases, test sets, executions, and results.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -26619,9 +26619,228 @@ function getOutputFilter() {
|
|
|
26619
26619
|
return filterSlot.get();
|
|
26620
26620
|
}
|
|
26621
26621
|
|
|
26622
|
+
// ../common/src/telemetry/command-terminal.ts
|
|
26623
|
+
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
26624
|
+
var AUTH_ERROR_CODES = new Set([
|
|
26625
|
+
"authentication_required",
|
|
26626
|
+
"permission_denied"
|
|
26627
|
+
]);
|
|
26628
|
+
var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
|
|
26629
|
+
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
26630
|
+
"network_error",
|
|
26631
|
+
"rate_limited",
|
|
26632
|
+
"server_error",
|
|
26633
|
+
"not_found",
|
|
26634
|
+
"method_not_allowed"
|
|
26635
|
+
]);
|
|
26636
|
+
var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
|
|
26637
|
+
var NETWORK_OS_ERROR_CODES = new Set([
|
|
26638
|
+
"ECONNREFUSED",
|
|
26639
|
+
"ECONNRESET",
|
|
26640
|
+
"ENOTFOUND",
|
|
26641
|
+
"EAI_AGAIN",
|
|
26642
|
+
"EPIPE",
|
|
26643
|
+
"EHOSTUNREACH",
|
|
26644
|
+
"ENETUNREACH",
|
|
26645
|
+
"EAI_FAIL"
|
|
26646
|
+
]);
|
|
26647
|
+
var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
26648
|
+
var TLS_ERROR_CODES2 = new Set([
|
|
26649
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
26650
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
26651
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
26652
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
26653
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
26654
|
+
"CERT_HAS_EXPIRED",
|
|
26655
|
+
"CERT_UNTRUSTED",
|
|
26656
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
26657
|
+
]);
|
|
26658
|
+
var MISSING_DEPENDENCY_CODES = new Set([
|
|
26659
|
+
"MODULE_NOT_FOUND",
|
|
26660
|
+
"ERR_MODULE_NOT_FOUND"
|
|
26661
|
+
]);
|
|
26662
|
+
var INTERNAL_ERROR_NAMES = new Set([
|
|
26663
|
+
"TypeError",
|
|
26664
|
+
"ReferenceError",
|
|
26665
|
+
"SyntaxError",
|
|
26666
|
+
"RangeError"
|
|
26667
|
+
]);
|
|
26668
|
+
function isRecord(value) {
|
|
26669
|
+
return value !== null && typeof value === "object";
|
|
26670
|
+
}
|
|
26671
|
+
function stringField(value, field) {
|
|
26672
|
+
if (!isRecord(value)) {
|
|
26673
|
+
return;
|
|
26674
|
+
}
|
|
26675
|
+
const raw = value[field];
|
|
26676
|
+
return typeof raw === "string" ? raw : undefined;
|
|
26677
|
+
}
|
|
26678
|
+
function numberField(value, field) {
|
|
26679
|
+
if (!isRecord(value)) {
|
|
26680
|
+
return;
|
|
26681
|
+
}
|
|
26682
|
+
const raw = value[field];
|
|
26683
|
+
return typeof raw === "number" ? raw : undefined;
|
|
26684
|
+
}
|
|
26685
|
+
function findStringInCauseChain(error, field) {
|
|
26686
|
+
let current = error;
|
|
26687
|
+
for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
|
|
26688
|
+
const value = stringField(current, field);
|
|
26689
|
+
if (value) {
|
|
26690
|
+
return value;
|
|
26691
|
+
}
|
|
26692
|
+
current = current.cause;
|
|
26693
|
+
}
|
|
26694
|
+
return;
|
|
26695
|
+
}
|
|
26696
|
+
function findCodeInCauseChain(error) {
|
|
26697
|
+
return findStringInCauseChain(error, "code");
|
|
26698
|
+
}
|
|
26699
|
+
function isSpawnEnoent(error) {
|
|
26700
|
+
const code = findCodeInCauseChain(error);
|
|
26701
|
+
if (code !== "ENOENT") {
|
|
26702
|
+
return false;
|
|
26703
|
+
}
|
|
26704
|
+
const syscall = findStringInCauseChain(error, "syscall");
|
|
26705
|
+
return syscall?.startsWith("spawn") === true;
|
|
26706
|
+
}
|
|
26707
|
+
function isCancellationError(error, exitCode, pollSignal) {
|
|
26708
|
+
if (exitCode === 130) {
|
|
26709
|
+
return true;
|
|
26710
|
+
}
|
|
26711
|
+
if (!isRecord(error)) {
|
|
26712
|
+
return false;
|
|
26713
|
+
}
|
|
26714
|
+
if (numberField(error, "exitCode") === 130) {
|
|
26715
|
+
return true;
|
|
26716
|
+
}
|
|
26717
|
+
const name = stringField(error, "name");
|
|
26718
|
+
if (name === "ExitPromptError") {
|
|
26719
|
+
return true;
|
|
26720
|
+
}
|
|
26721
|
+
if (name === "AbortError" && pollSignal?.aborted) {
|
|
26722
|
+
return true;
|
|
26723
|
+
}
|
|
26724
|
+
const message = stringField(error, "message");
|
|
26725
|
+
return message?.includes("SIGINT") === true;
|
|
26726
|
+
}
|
|
26727
|
+
function terminalSignalFor(input, outcome) {
|
|
26728
|
+
if (input.recordedFailure?.terminalSignal) {
|
|
26729
|
+
return input.recordedFailure.terminalSignal;
|
|
26730
|
+
}
|
|
26731
|
+
const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
|
|
26732
|
+
if (explicit) {
|
|
26733
|
+
return explicit;
|
|
26734
|
+
}
|
|
26735
|
+
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
26736
|
+
}
|
|
26737
|
+
function classifyHttpStatus(status) {
|
|
26738
|
+
if (status === 401 || status === 403) {
|
|
26739
|
+
return "auth";
|
|
26740
|
+
}
|
|
26741
|
+
if (status === 400 || status === 409 || status === 422) {
|
|
26742
|
+
return "validation";
|
|
26743
|
+
}
|
|
26744
|
+
if (status === 408) {
|
|
26745
|
+
return "timeout";
|
|
26746
|
+
}
|
|
26747
|
+
return "network_http";
|
|
26748
|
+
}
|
|
26749
|
+
function classifyFromResult(result) {
|
|
26750
|
+
switch (result) {
|
|
26751
|
+
case "AuthenticationError":
|
|
26752
|
+
return "auth";
|
|
26753
|
+
case "ValidationError":
|
|
26754
|
+
return "validation";
|
|
26755
|
+
case "TimeoutError":
|
|
26756
|
+
return "timeout";
|
|
26757
|
+
default:
|
|
26758
|
+
return;
|
|
26759
|
+
}
|
|
26760
|
+
}
|
|
26761
|
+
function classifyFromErrorCode(errorCode) {
|
|
26762
|
+
if (!errorCode) {
|
|
26763
|
+
return;
|
|
26764
|
+
}
|
|
26765
|
+
if (AUTH_ERROR_CODES.has(errorCode)) {
|
|
26766
|
+
return "auth";
|
|
26767
|
+
}
|
|
26768
|
+
if (VALIDATION_ERROR_CODES.has(errorCode)) {
|
|
26769
|
+
return "validation";
|
|
26770
|
+
}
|
|
26771
|
+
if (TIMEOUT_ERROR_CODES.has(errorCode)) {
|
|
26772
|
+
return "timeout";
|
|
26773
|
+
}
|
|
26774
|
+
if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
|
|
26775
|
+
return "network_http";
|
|
26776
|
+
}
|
|
26777
|
+
return;
|
|
26778
|
+
}
|
|
26779
|
+
function classifyFromError(error) {
|
|
26780
|
+
const code = findCodeInCauseChain(error);
|
|
26781
|
+
if (code) {
|
|
26782
|
+
if (code.startsWith("commander.")) {
|
|
26783
|
+
return "validation";
|
|
26784
|
+
}
|
|
26785
|
+
if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
|
|
26786
|
+
return "network_http";
|
|
26787
|
+
}
|
|
26788
|
+
if (TIMEOUT_OS_ERROR_CODES.has(code)) {
|
|
26789
|
+
return "timeout";
|
|
26790
|
+
}
|
|
26791
|
+
if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
|
|
26792
|
+
return "missing_dependency";
|
|
26793
|
+
}
|
|
26794
|
+
}
|
|
26795
|
+
const message = stringField(error, "message");
|
|
26796
|
+
if (message?.includes("fetch failed") === true) {
|
|
26797
|
+
return "network_http";
|
|
26798
|
+
}
|
|
26799
|
+
const name = stringField(error, "name");
|
|
26800
|
+
if (name && INTERNAL_ERROR_NAMES.has(name)) {
|
|
26801
|
+
return "internal";
|
|
26802
|
+
}
|
|
26803
|
+
return;
|
|
26804
|
+
}
|
|
26805
|
+
function classifyError2(input) {
|
|
26806
|
+
const recorded = input.recordedFailure;
|
|
26807
|
+
if (recorded?.errorClass) {
|
|
26808
|
+
return recorded.errorClass;
|
|
26809
|
+
}
|
|
26810
|
+
const status = recorded?.context?.httpStatus;
|
|
26811
|
+
if (status !== undefined) {
|
|
26812
|
+
return classifyHttpStatus(status);
|
|
26813
|
+
}
|
|
26814
|
+
return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
|
|
26815
|
+
}
|
|
26816
|
+
function recordCommandFailureTelemetry(failure) {
|
|
26817
|
+
recordedFailureSlot.set(failure);
|
|
26818
|
+
}
|
|
26819
|
+
function clearRecordedCommandFailureTelemetry() {
|
|
26820
|
+
recordedFailureSlot.clear();
|
|
26821
|
+
}
|
|
26822
|
+
function takeRecordedCommandFailureTelemetry() {
|
|
26823
|
+
const failure = recordedFailureSlot.get();
|
|
26824
|
+
recordedFailureSlot.clear();
|
|
26825
|
+
return failure;
|
|
26826
|
+
}
|
|
26827
|
+
function buildCommandTerminalTelemetryProperties(input) {
|
|
26828
|
+
const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
|
|
26829
|
+
const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
|
|
26830
|
+
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
|
|
26831
|
+
const terminalSignal = terminalSignalFor(input, outcome);
|
|
26832
|
+
return {
|
|
26833
|
+
exit_code: input.exitCode,
|
|
26834
|
+
terminal_outcome: outcome,
|
|
26835
|
+
...errorClass ? { error_class: errorClass } : {},
|
|
26836
|
+
...terminalSignal ? { terminal_signal: terminalSignal } : {}
|
|
26837
|
+
};
|
|
26838
|
+
}
|
|
26839
|
+
|
|
26622
26840
|
// ../common/src/telemetry/telemetry-events.ts
|
|
26623
26841
|
var CommonTelemetryEvents = {
|
|
26624
|
-
Error: "uip.error"
|
|
26842
|
+
Error: "uip.error",
|
|
26843
|
+
ShipSucceeded: "ship_succeeded"
|
|
26625
26844
|
};
|
|
26626
26845
|
|
|
26627
26846
|
// ../common/src/registry.ts
|
|
@@ -26688,6 +26907,136 @@ function formatMessage(category, name, properties) {
|
|
|
26688
26907
|
}
|
|
26689
26908
|
return message;
|
|
26690
26909
|
}
|
|
26910
|
+
// ../common/src/telemetry/detect-agent.ts
|
|
26911
|
+
var KNOWN_AGENTS = [
|
|
26912
|
+
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
26913
|
+
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
26914
|
+
{ envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
|
|
26915
|
+
{ envVar: "CODEX_THREAD_ID", id: "codex" },
|
|
26916
|
+
{ envVar: "CODEX_SANDBOX", id: "codex" },
|
|
26917
|
+
{ envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
|
|
26918
|
+
{ envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
|
|
26919
|
+
];
|
|
26920
|
+
function detectAgentFromEnv(env) {
|
|
26921
|
+
for (const agent of KNOWN_AGENTS) {
|
|
26922
|
+
const envValue = env[agent.envVar];
|
|
26923
|
+
if (agent.value !== undefined) {
|
|
26924
|
+
if (envValue === agent.value)
|
|
26925
|
+
return agent.id;
|
|
26926
|
+
} else {
|
|
26927
|
+
if (envValue)
|
|
26928
|
+
return agent.id;
|
|
26929
|
+
}
|
|
26930
|
+
}
|
|
26931
|
+
const agentEnv = env.AGENT;
|
|
26932
|
+
if (agentEnv) {
|
|
26933
|
+
if (agentEnv === "1" || agentEnv === "true")
|
|
26934
|
+
return "unknown";
|
|
26935
|
+
if (agentEnv.length <= 32)
|
|
26936
|
+
return agentEnv.toLowerCase();
|
|
26937
|
+
}
|
|
26938
|
+
return;
|
|
26939
|
+
}
|
|
26940
|
+
// ../common/src/telemetry/environment-info.ts
|
|
26941
|
+
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
26942
|
+
// ../common/src/telemetry/execution-context.ts
|
|
26943
|
+
var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
|
|
26944
|
+
var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
26945
|
+
var isEqual = (value, expected) => value?.toLowerCase() === expected;
|
|
26946
|
+
var CI_SIGNATURES = [
|
|
26947
|
+
{
|
|
26948
|
+
provider: "github_actions",
|
|
26949
|
+
matches: (env) => isTruthy(env.GITHUB_ACTIONS),
|
|
26950
|
+
isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
|
|
26951
|
+
},
|
|
26952
|
+
{
|
|
26953
|
+
provider: "azure_devops",
|
|
26954
|
+
matches: (env) => isTruthy(env.TF_BUILD),
|
|
26955
|
+
isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
|
|
26956
|
+
},
|
|
26957
|
+
{
|
|
26958
|
+
provider: "gitlab",
|
|
26959
|
+
matches: (env) => isTruthy(env.GITLAB_CI),
|
|
26960
|
+
isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
|
|
26961
|
+
},
|
|
26962
|
+
{
|
|
26963
|
+
provider: "circleci",
|
|
26964
|
+
matches: (env) => isTruthy(env.CIRCLECI),
|
|
26965
|
+
isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
|
|
26966
|
+
},
|
|
26967
|
+
{
|
|
26968
|
+
provider: "jenkins",
|
|
26969
|
+
matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
|
|
26970
|
+
},
|
|
26971
|
+
{
|
|
26972
|
+
provider: "teamcity",
|
|
26973
|
+
matches: (env) => isTruthy(env.TEAMCITY_VERSION)
|
|
26974
|
+
},
|
|
26975
|
+
{
|
|
26976
|
+
provider: "buildkite",
|
|
26977
|
+
matches: (env) => isTruthy(env.BUILDKITE),
|
|
26978
|
+
isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
|
|
26979
|
+
},
|
|
26980
|
+
{
|
|
26981
|
+
provider: "bitbucket",
|
|
26982
|
+
matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
|
|
26983
|
+
},
|
|
26984
|
+
{
|
|
26985
|
+
provider: "travis",
|
|
26986
|
+
matches: (env) => isTruthy(env.TRAVIS)
|
|
26987
|
+
},
|
|
26988
|
+
{
|
|
26989
|
+
provider: "appveyor",
|
|
26990
|
+
matches: (env) => isTruthy(env.APPVEYOR)
|
|
26991
|
+
},
|
|
26992
|
+
{
|
|
26993
|
+
provider: "generic",
|
|
26994
|
+
matches: (env) => isTruthy(env.CI)
|
|
26995
|
+
}
|
|
26996
|
+
];
|
|
26997
|
+
function currentEnv() {
|
|
26998
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
26999
|
+
}
|
|
27000
|
+
function currentTtyState() {
|
|
27001
|
+
if (typeof process === "undefined")
|
|
27002
|
+
return false;
|
|
27003
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
27004
|
+
}
|
|
27005
|
+
function detectCi(env) {
|
|
27006
|
+
const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
|
|
27007
|
+
if (!signature)
|
|
27008
|
+
return;
|
|
27009
|
+
return {
|
|
27010
|
+
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
27011
|
+
ciProvider: signature.provider
|
|
27012
|
+
};
|
|
27013
|
+
}
|
|
27014
|
+
function detectExecutionContext(options = {}) {
|
|
27015
|
+
const env = options.env ?? currentEnv();
|
|
27016
|
+
const ci = detectCi(env);
|
|
27017
|
+
if (ci)
|
|
27018
|
+
return ci;
|
|
27019
|
+
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
27020
|
+
if (agent) {
|
|
27021
|
+
return { executionContext: "agent" };
|
|
27022
|
+
}
|
|
27023
|
+
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
27024
|
+
if (authSignal === "service_account") {
|
|
27025
|
+
return { executionContext: "service_account" };
|
|
27026
|
+
}
|
|
27027
|
+
const isTty = options.isTty ?? currentTtyState();
|
|
27028
|
+
if (isTty) {
|
|
27029
|
+
return { executionContext: "manual" };
|
|
27030
|
+
}
|
|
27031
|
+
return { executionContext: "unknown" };
|
|
27032
|
+
}
|
|
27033
|
+
function getExecutionContextTelemetryProperties() {
|
|
27034
|
+
const detected = detectExecutionContext();
|
|
27035
|
+
return {
|
|
27036
|
+
execution_context: detected.executionContext,
|
|
27037
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
27038
|
+
};
|
|
27039
|
+
}
|
|
26691
27040
|
// ../common/src/telemetry/node-context-storage.ts
|
|
26692
27041
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
26693
27042
|
|
|
@@ -26700,6 +27049,26 @@ class NodeContextStorage {
|
|
|
26700
27049
|
return this.storage.getStore();
|
|
26701
27050
|
}
|
|
26702
27051
|
}
|
|
27052
|
+
// ../common/src/telemetry/session-id.ts
|
|
27053
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
27054
|
+
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
27055
|
+
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
27056
|
+
function getProcessEnv() {
|
|
27057
|
+
return globalThis.process?.env;
|
|
27058
|
+
}
|
|
27059
|
+
function normalizeSessionId(value) {
|
|
27060
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
27061
|
+
return;
|
|
27062
|
+
}
|
|
27063
|
+
const trimmed = String(value).trim();
|
|
27064
|
+
return trimmed || undefined;
|
|
27065
|
+
}
|
|
27066
|
+
function getConfiguredTelemetrySessionId() {
|
|
27067
|
+
return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
27068
|
+
}
|
|
27069
|
+
function resolveTelemetrySessionId(existingSessionId) {
|
|
27070
|
+
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
27071
|
+
}
|
|
26703
27072
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
26704
27073
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
26705
27074
|
function getGlobalTelemetryProperties() {
|
|
@@ -26784,12 +27153,22 @@ class TelemetryService {
|
|
|
26784
27153
|
return this.contextStorage.getContext();
|
|
26785
27154
|
}
|
|
26786
27155
|
enrichPropertiesWithContext(properties, context) {
|
|
26787
|
-
|
|
26788
|
-
|
|
27156
|
+
const globalProperties = getGlobalTelemetryProperties();
|
|
27157
|
+
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27158
|
+
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
27159
|
+
const enriched = {
|
|
27160
|
+
...getExecutionContextTelemetryProperties(),
|
|
27161
|
+
...globalProperties,
|
|
26789
27162
|
...this.defaultProperties,
|
|
26790
27163
|
...properties,
|
|
26791
27164
|
...context
|
|
26792
27165
|
};
|
|
27166
|
+
if (sessionId === undefined) {
|
|
27167
|
+
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27168
|
+
} else {
|
|
27169
|
+
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
27170
|
+
}
|
|
27171
|
+
return enriched;
|
|
26793
27172
|
}
|
|
26794
27173
|
generateId() {
|
|
26795
27174
|
return crypto.randomUUID().replaceAll("-", "");
|
|
@@ -27265,8 +27644,24 @@ var OutputFormatter;
|
|
|
27265
27644
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
27266
27645
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
27267
27646
|
process.exitCode = EXIT_CODES[data.Result] ?? 1;
|
|
27268
|
-
|
|
27269
|
-
|
|
27647
|
+
recordCommandFailureTelemetry({
|
|
27648
|
+
result: data.Result,
|
|
27649
|
+
errorCode: data.ErrorCode,
|
|
27650
|
+
retry: data.Retry,
|
|
27651
|
+
message: data.Message,
|
|
27652
|
+
context: data.Context,
|
|
27653
|
+
exitCode: process.exitCode,
|
|
27654
|
+
errorClass: data.TelemetryErrorClass,
|
|
27655
|
+
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
27656
|
+
terminalSignal: data.TelemetryTerminalSignal
|
|
27657
|
+
});
|
|
27658
|
+
const suppressTelemetry = data.SuppressTelemetry === true;
|
|
27659
|
+
const envelope = { ...data };
|
|
27660
|
+
delete envelope.SuppressTelemetry;
|
|
27661
|
+
delete envelope.TelemetryErrorClass;
|
|
27662
|
+
delete envelope.TelemetryTerminalOutcome;
|
|
27663
|
+
delete envelope.TelemetryTerminalSignal;
|
|
27664
|
+
if (!suppressTelemetry) {
|
|
27270
27665
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
27271
27666
|
result: data.Result,
|
|
27272
27667
|
errorCode: data.ErrorCode,
|
|
@@ -27329,6 +27724,158 @@ var OutputFormatter;
|
|
|
27329
27724
|
OutputFormatter.formatToString = formatToString;
|
|
27330
27725
|
})(OutputFormatter ||= {});
|
|
27331
27726
|
|
|
27727
|
+
// ../common/src/telemetry/command-attribution.ts
|
|
27728
|
+
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
27729
|
+
var MAX_SKILL_NAME_LENGTH = 80;
|
|
27730
|
+
var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
27731
|
+
function productMode(productArea, mode) {
|
|
27732
|
+
return { product_area: productArea, mode };
|
|
27733
|
+
}
|
|
27734
|
+
function attributionRecord(groups) {
|
|
27735
|
+
const record = {};
|
|
27736
|
+
for (const [productArea, mode, names] of groups) {
|
|
27737
|
+
const attribution = productMode(productArea, mode);
|
|
27738
|
+
for (const name of names) {
|
|
27739
|
+
record[name] = attribution;
|
|
27740
|
+
}
|
|
27741
|
+
}
|
|
27742
|
+
return record;
|
|
27743
|
+
}
|
|
27744
|
+
function commandAttribution(groups) {
|
|
27745
|
+
const entries = [];
|
|
27746
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
27747
|
+
const attribution = productMode(productArea, mode);
|
|
27748
|
+
for (const prefix of prefixes) {
|
|
27749
|
+
entries.push({ prefix, attribution });
|
|
27750
|
+
}
|
|
27751
|
+
}
|
|
27752
|
+
return entries;
|
|
27753
|
+
}
|
|
27754
|
+
var SKILL_ATTRIBUTION = attributionRecord([
|
|
27755
|
+
["admin", "operate", ["uipath-admin"]],
|
|
27756
|
+
["agents", "build", ["uipath-agents"]],
|
|
27757
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
27758
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
27759
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
27760
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
27761
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
27762
|
+
["governance", "operate", ["uipath-governance"]],
|
|
27763
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
27764
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
27765
|
+
[
|
|
27766
|
+
"maestro",
|
|
27767
|
+
"build",
|
|
27768
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
27769
|
+
],
|
|
27770
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
27771
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
27772
|
+
["platform", "operate", ["uipath-platform"]],
|
|
27773
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
27774
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
27775
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
27776
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
27777
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
27778
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
27779
|
+
]);
|
|
27780
|
+
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
27781
|
+
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
27782
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
27783
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
27784
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
27785
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
27786
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
27787
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
27788
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
27789
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
27790
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
27791
|
+
["functions", "build", ["uip.functions"]],
|
|
27792
|
+
["solution", "build", ["uip.solution"]],
|
|
27793
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
27794
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
27795
|
+
["platform", "operate", ["uip.platform"]],
|
|
27796
|
+
["admin", "operate", ["uip.admin"]],
|
|
27797
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
27798
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
27799
|
+
["governance", "operate", ["uip.gov"]],
|
|
27800
|
+
["insights", "operate", ["uip.insights"]],
|
|
27801
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
27802
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
27803
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
27804
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
27805
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
27806
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
27807
|
+
["integration-service", "build", ["uip.is"]],
|
|
27808
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
27809
|
+
[
|
|
27810
|
+
"cli",
|
|
27811
|
+
"operate",
|
|
27812
|
+
[
|
|
27813
|
+
"uip.login",
|
|
27814
|
+
"uip.logout",
|
|
27815
|
+
"uip.user",
|
|
27816
|
+
"uip.config",
|
|
27817
|
+
"uip.tools",
|
|
27818
|
+
"uip.skills",
|
|
27819
|
+
"uip.completion",
|
|
27820
|
+
"uip.update",
|
|
27821
|
+
"uip.mcp",
|
|
27822
|
+
"uip.track"
|
|
27823
|
+
]
|
|
27824
|
+
]
|
|
27825
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
27826
|
+
function normalizeCommandPath(value) {
|
|
27827
|
+
if (typeof value !== "string") {
|
|
27828
|
+
return;
|
|
27829
|
+
}
|
|
27830
|
+
const trimmed = value.trim().toLowerCase();
|
|
27831
|
+
if (!trimmed) {
|
|
27832
|
+
return;
|
|
27833
|
+
}
|
|
27834
|
+
const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
|
|
27835
|
+
if (tokens.length === 0) {
|
|
27836
|
+
return;
|
|
27837
|
+
}
|
|
27838
|
+
const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
|
|
27839
|
+
return commandTokens.join(".");
|
|
27840
|
+
}
|
|
27841
|
+
function getCommandProductModeAttribution(commandPath) {
|
|
27842
|
+
const normalized = normalizeCommandPath(commandPath);
|
|
27843
|
+
if (!normalized) {
|
|
27844
|
+
return;
|
|
27845
|
+
}
|
|
27846
|
+
return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
|
|
27847
|
+
}
|
|
27848
|
+
function normalizeSkillNameWithOptions(value, options) {
|
|
27849
|
+
if (typeof value !== "string") {
|
|
27850
|
+
return;
|
|
27851
|
+
}
|
|
27852
|
+
const normalized = value.trim().toLowerCase();
|
|
27853
|
+
if (!normalized) {
|
|
27854
|
+
return;
|
|
27855
|
+
}
|
|
27856
|
+
const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
|
|
27857
|
+
if (hasLegacyNamespace && !options.allowLegacyNamespace) {
|
|
27858
|
+
return;
|
|
27859
|
+
}
|
|
27860
|
+
const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
|
|
27861
|
+
if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
|
|
27862
|
+
return;
|
|
27863
|
+
}
|
|
27864
|
+
return skillName;
|
|
27865
|
+
}
|
|
27866
|
+
function normalizeSkillName(value) {
|
|
27867
|
+
return normalizeSkillNameWithOptions(value, {
|
|
27868
|
+
allowLegacyNamespace: false
|
|
27869
|
+
});
|
|
27870
|
+
}
|
|
27871
|
+
function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
27872
|
+
const skillName = normalizeSkillName(skillSource);
|
|
27873
|
+
return {
|
|
27874
|
+
...skillName ? { skill_name: skillName } : {},
|
|
27875
|
+
...getCommandProductModeAttribution(commandPath)
|
|
27876
|
+
};
|
|
27877
|
+
}
|
|
27878
|
+
|
|
27332
27879
|
// ../common/src/telemetry/pii-redactor.ts
|
|
27333
27880
|
var REDACTED = "[REDACTED]";
|
|
27334
27881
|
var MAX_VALUE_LENGTH = 200;
|
|
@@ -27514,6 +28061,12 @@ function commandHelpHint(commandPath) {
|
|
|
27514
28061
|
const command = commandPath.replace(/\./g, " ");
|
|
27515
28062
|
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
27516
28063
|
}
|
|
28064
|
+
function isPromptCancellation(error) {
|
|
28065
|
+
return error instanceof Error && error.name === "ExitPromptError";
|
|
28066
|
+
}
|
|
28067
|
+
function exitCodeFromProcess(fallback) {
|
|
28068
|
+
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
28069
|
+
}
|
|
27517
28070
|
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
27518
28071
|
const command = this;
|
|
27519
28072
|
return this.action(async (...args) => {
|
|
@@ -27521,6 +28074,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27521
28074
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
27522
28075
|
const startTime = performance.now();
|
|
27523
28076
|
let errorMessage;
|
|
28077
|
+
let fallbackExitCode = EXIT_CODES.Success;
|
|
28078
|
+
clearRecordedCommandFailureTelemetry();
|
|
27524
28079
|
const [error] = await catchError(fn(...args));
|
|
27525
28080
|
if (error) {
|
|
27526
28081
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -27535,6 +28090,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27535
28090
|
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
27536
28091
|
const typedContext = typed.context ?? typed.Context;
|
|
27537
28092
|
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
28093
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
28094
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
27538
28095
|
OutputFormatter.error({
|
|
27539
28096
|
Result: finalResult,
|
|
27540
28097
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
@@ -27543,16 +28100,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27543
28100
|
...customRetry ? { Retry: customRetry } : {},
|
|
27544
28101
|
...customContext ? { Context: customContext } : {}
|
|
27545
28102
|
});
|
|
27546
|
-
context.exit(
|
|
28103
|
+
context.exit(fallbackExitCode);
|
|
27547
28104
|
}
|
|
27548
28105
|
const durationMs = performance.now() - startTime;
|
|
27549
|
-
const
|
|
28106
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
28107
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
28108
|
+
const success = !error && exitCode === 0;
|
|
28109
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
28110
|
+
error,
|
|
28111
|
+
exitCode,
|
|
28112
|
+
recordedFailure,
|
|
28113
|
+
pollSignal: context.pollSignal
|
|
28114
|
+
});
|
|
27550
28115
|
telemetry.trackEvent(telemetryName, redactProperties({
|
|
27551
28116
|
...extractCommandParams(command),
|
|
27552
28117
|
...props,
|
|
28118
|
+
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
27553
28119
|
command: "true",
|
|
27554
28120
|
duration: String(durationMs),
|
|
27555
28121
|
success: String(success),
|
|
28122
|
+
...terminalTelemetry,
|
|
27556
28123
|
...errorMessage ? { errorMessage } : {}
|
|
27557
28124
|
}));
|
|
27558
28125
|
});
|
|
@@ -28228,6 +28795,8 @@ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
|
28228
28795
|
function installSdkCodingAgentHeader(BaseApiClass) {
|
|
28229
28796
|
installRequestHeaderForwarding(BaseApiClass, codingAgentPatchKey(), (headers) => addSdkCodingAgentHeader(headers));
|
|
28230
28797
|
}
|
|
28798
|
+
// ../common/src/telemetry/ship-succeeded.ts
|
|
28799
|
+
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
28231
28800
|
// ../common/src/tool-provider.ts
|
|
28232
28801
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
28233
28802
|
// src/commands/attachment.ts
|
|
@@ -46804,4 +47373,4 @@ export {
|
|
|
46804
47373
|
metadata
|
|
46805
47374
|
};
|
|
46806
47375
|
|
|
46807
|
-
//# debugId=
|
|
47376
|
+
//# debugId=FDC6AC30B895DD3364756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/test-manager-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.197.0-preview.
|
|
4
|
+
"version": "1.197.0-preview.67",
|
|
5
5
|
"description": "Manage test cases, test sets, executions, and results.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "579e7d41cb100fcb8130eec8ed1c9b5b55feaf0b"
|
|
30
30
|
}
|