@uipath/solution-tool 1.197.0-preview.65 → 1.197.0-preview.66
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/deploy.js +582 -13
- package/dist/init.js +577 -8
- package/dist/pack.js +1294 -23
- package/dist/publish.js +578 -9
- package/dist/resource.js +577 -8
- package/dist/tool.js +1446 -31
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -24882,8 +24882,8 @@ var require_util_map_includes = __commonJS((exports) => {
|
|
|
24882
24882
|
const { uniqueKeys } = ctx.options;
|
|
24883
24883
|
if (uniqueKeys === false)
|
|
24884
24884
|
return false;
|
|
24885
|
-
const
|
|
24886
|
-
return items.some((pair) =>
|
|
24885
|
+
const isEqual2 = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value;
|
|
24886
|
+
return items.some((pair) => isEqual2(pair.key, search2));
|
|
24887
24887
|
}
|
|
24888
24888
|
exports.mapIncludes = mapIncludes;
|
|
24889
24889
|
});
|
|
@@ -35630,7 +35630,7 @@ var toolsFactoryRepository2 = _global2[REGISTRY_KEY2];
|
|
|
35630
35630
|
var package_default = {
|
|
35631
35631
|
name: "@uipath/solution-tool",
|
|
35632
35632
|
license: "MIT",
|
|
35633
|
-
version: "1.197.0-preview.
|
|
35633
|
+
version: "1.197.0-preview.66",
|
|
35634
35634
|
description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
|
|
35635
35635
|
repository: {
|
|
35636
35636
|
type: "git",
|
|
@@ -42253,9 +42253,228 @@ function getOutputFilter() {
|
|
|
42253
42253
|
return filterSlot.get();
|
|
42254
42254
|
}
|
|
42255
42255
|
|
|
42256
|
+
// ../common/src/telemetry/command-terminal.ts
|
|
42257
|
+
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
42258
|
+
var AUTH_ERROR_CODES = new Set([
|
|
42259
|
+
"authentication_required",
|
|
42260
|
+
"permission_denied"
|
|
42261
|
+
]);
|
|
42262
|
+
var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
|
|
42263
|
+
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
42264
|
+
"network_error",
|
|
42265
|
+
"rate_limited",
|
|
42266
|
+
"server_error",
|
|
42267
|
+
"not_found",
|
|
42268
|
+
"method_not_allowed"
|
|
42269
|
+
]);
|
|
42270
|
+
var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
|
|
42271
|
+
var NETWORK_OS_ERROR_CODES = new Set([
|
|
42272
|
+
"ECONNREFUSED",
|
|
42273
|
+
"ECONNRESET",
|
|
42274
|
+
"ENOTFOUND",
|
|
42275
|
+
"EAI_AGAIN",
|
|
42276
|
+
"EPIPE",
|
|
42277
|
+
"EHOSTUNREACH",
|
|
42278
|
+
"ENETUNREACH",
|
|
42279
|
+
"EAI_FAIL"
|
|
42280
|
+
]);
|
|
42281
|
+
var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
42282
|
+
var TLS_ERROR_CODES2 = new Set([
|
|
42283
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
42284
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
42285
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
42286
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
42287
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
42288
|
+
"CERT_HAS_EXPIRED",
|
|
42289
|
+
"CERT_UNTRUSTED",
|
|
42290
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
42291
|
+
]);
|
|
42292
|
+
var MISSING_DEPENDENCY_CODES = new Set([
|
|
42293
|
+
"MODULE_NOT_FOUND",
|
|
42294
|
+
"ERR_MODULE_NOT_FOUND"
|
|
42295
|
+
]);
|
|
42296
|
+
var INTERNAL_ERROR_NAMES = new Set([
|
|
42297
|
+
"TypeError",
|
|
42298
|
+
"ReferenceError",
|
|
42299
|
+
"SyntaxError",
|
|
42300
|
+
"RangeError"
|
|
42301
|
+
]);
|
|
42302
|
+
function isRecord(value) {
|
|
42303
|
+
return value !== null && typeof value === "object";
|
|
42304
|
+
}
|
|
42305
|
+
function stringField(value, field) {
|
|
42306
|
+
if (!isRecord(value)) {
|
|
42307
|
+
return;
|
|
42308
|
+
}
|
|
42309
|
+
const raw = value[field];
|
|
42310
|
+
return typeof raw === "string" ? raw : undefined;
|
|
42311
|
+
}
|
|
42312
|
+
function numberField(value, field) {
|
|
42313
|
+
if (!isRecord(value)) {
|
|
42314
|
+
return;
|
|
42315
|
+
}
|
|
42316
|
+
const raw = value[field];
|
|
42317
|
+
return typeof raw === "number" ? raw : undefined;
|
|
42318
|
+
}
|
|
42319
|
+
function findStringInCauseChain(error, field) {
|
|
42320
|
+
let current = error;
|
|
42321
|
+
for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
|
|
42322
|
+
const value = stringField(current, field);
|
|
42323
|
+
if (value) {
|
|
42324
|
+
return value;
|
|
42325
|
+
}
|
|
42326
|
+
current = current.cause;
|
|
42327
|
+
}
|
|
42328
|
+
return;
|
|
42329
|
+
}
|
|
42330
|
+
function findCodeInCauseChain(error) {
|
|
42331
|
+
return findStringInCauseChain(error, "code");
|
|
42332
|
+
}
|
|
42333
|
+
function isSpawnEnoent(error) {
|
|
42334
|
+
const code = findCodeInCauseChain(error);
|
|
42335
|
+
if (code !== "ENOENT") {
|
|
42336
|
+
return false;
|
|
42337
|
+
}
|
|
42338
|
+
const syscall = findStringInCauseChain(error, "syscall");
|
|
42339
|
+
return syscall?.startsWith("spawn") === true;
|
|
42340
|
+
}
|
|
42341
|
+
function isCancellationError(error, exitCode, pollSignal) {
|
|
42342
|
+
if (exitCode === 130) {
|
|
42343
|
+
return true;
|
|
42344
|
+
}
|
|
42345
|
+
if (!isRecord(error)) {
|
|
42346
|
+
return false;
|
|
42347
|
+
}
|
|
42348
|
+
if (numberField(error, "exitCode") === 130) {
|
|
42349
|
+
return true;
|
|
42350
|
+
}
|
|
42351
|
+
const name = stringField(error, "name");
|
|
42352
|
+
if (name === "ExitPromptError") {
|
|
42353
|
+
return true;
|
|
42354
|
+
}
|
|
42355
|
+
if (name === "AbortError" && pollSignal?.aborted) {
|
|
42356
|
+
return true;
|
|
42357
|
+
}
|
|
42358
|
+
const message = stringField(error, "message");
|
|
42359
|
+
return message?.includes("SIGINT") === true;
|
|
42360
|
+
}
|
|
42361
|
+
function terminalSignalFor(input, outcome) {
|
|
42362
|
+
if (input.recordedFailure?.terminalSignal) {
|
|
42363
|
+
return input.recordedFailure.terminalSignal;
|
|
42364
|
+
}
|
|
42365
|
+
const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
|
|
42366
|
+
if (explicit) {
|
|
42367
|
+
return explicit;
|
|
42368
|
+
}
|
|
42369
|
+
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
42370
|
+
}
|
|
42371
|
+
function classifyHttpStatus(status) {
|
|
42372
|
+
if (status === 401 || status === 403) {
|
|
42373
|
+
return "auth";
|
|
42374
|
+
}
|
|
42375
|
+
if (status === 400 || status === 409 || status === 422) {
|
|
42376
|
+
return "validation";
|
|
42377
|
+
}
|
|
42378
|
+
if (status === 408) {
|
|
42379
|
+
return "timeout";
|
|
42380
|
+
}
|
|
42381
|
+
return "network_http";
|
|
42382
|
+
}
|
|
42383
|
+
function classifyFromResult(result) {
|
|
42384
|
+
switch (result) {
|
|
42385
|
+
case "AuthenticationError":
|
|
42386
|
+
return "auth";
|
|
42387
|
+
case "ValidationError":
|
|
42388
|
+
return "validation";
|
|
42389
|
+
case "TimeoutError":
|
|
42390
|
+
return "timeout";
|
|
42391
|
+
default:
|
|
42392
|
+
return;
|
|
42393
|
+
}
|
|
42394
|
+
}
|
|
42395
|
+
function classifyFromErrorCode(errorCode2) {
|
|
42396
|
+
if (!errorCode2) {
|
|
42397
|
+
return;
|
|
42398
|
+
}
|
|
42399
|
+
if (AUTH_ERROR_CODES.has(errorCode2)) {
|
|
42400
|
+
return "auth";
|
|
42401
|
+
}
|
|
42402
|
+
if (VALIDATION_ERROR_CODES.has(errorCode2)) {
|
|
42403
|
+
return "validation";
|
|
42404
|
+
}
|
|
42405
|
+
if (TIMEOUT_ERROR_CODES.has(errorCode2)) {
|
|
42406
|
+
return "timeout";
|
|
42407
|
+
}
|
|
42408
|
+
if (NETWORK_HTTP_ERROR_CODES.has(errorCode2)) {
|
|
42409
|
+
return "network_http";
|
|
42410
|
+
}
|
|
42411
|
+
return;
|
|
42412
|
+
}
|
|
42413
|
+
function classifyFromError(error) {
|
|
42414
|
+
const code = findCodeInCauseChain(error);
|
|
42415
|
+
if (code) {
|
|
42416
|
+
if (code.startsWith("commander.")) {
|
|
42417
|
+
return "validation";
|
|
42418
|
+
}
|
|
42419
|
+
if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
|
|
42420
|
+
return "network_http";
|
|
42421
|
+
}
|
|
42422
|
+
if (TIMEOUT_OS_ERROR_CODES.has(code)) {
|
|
42423
|
+
return "timeout";
|
|
42424
|
+
}
|
|
42425
|
+
if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
|
|
42426
|
+
return "missing_dependency";
|
|
42427
|
+
}
|
|
42428
|
+
}
|
|
42429
|
+
const message = stringField(error, "message");
|
|
42430
|
+
if (message?.includes("fetch failed") === true) {
|
|
42431
|
+
return "network_http";
|
|
42432
|
+
}
|
|
42433
|
+
const name = stringField(error, "name");
|
|
42434
|
+
if (name && INTERNAL_ERROR_NAMES.has(name)) {
|
|
42435
|
+
return "internal";
|
|
42436
|
+
}
|
|
42437
|
+
return;
|
|
42438
|
+
}
|
|
42439
|
+
function classifyError2(input) {
|
|
42440
|
+
const recorded = input.recordedFailure;
|
|
42441
|
+
if (recorded?.errorClass) {
|
|
42442
|
+
return recorded.errorClass;
|
|
42443
|
+
}
|
|
42444
|
+
const status = recorded?.context?.httpStatus;
|
|
42445
|
+
if (status !== undefined) {
|
|
42446
|
+
return classifyHttpStatus(status);
|
|
42447
|
+
}
|
|
42448
|
+
return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
|
|
42449
|
+
}
|
|
42450
|
+
function recordCommandFailureTelemetry(failure) {
|
|
42451
|
+
recordedFailureSlot.set(failure);
|
|
42452
|
+
}
|
|
42453
|
+
function clearRecordedCommandFailureTelemetry() {
|
|
42454
|
+
recordedFailureSlot.clear();
|
|
42455
|
+
}
|
|
42456
|
+
function takeRecordedCommandFailureTelemetry() {
|
|
42457
|
+
const failure = recordedFailureSlot.get();
|
|
42458
|
+
recordedFailureSlot.clear();
|
|
42459
|
+
return failure;
|
|
42460
|
+
}
|
|
42461
|
+
function buildCommandTerminalTelemetryProperties(input) {
|
|
42462
|
+
const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
|
|
42463
|
+
const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
|
|
42464
|
+
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
|
|
42465
|
+
const terminalSignal = terminalSignalFor(input, outcome);
|
|
42466
|
+
return {
|
|
42467
|
+
exit_code: input.exitCode,
|
|
42468
|
+
terminal_outcome: outcome,
|
|
42469
|
+
...errorClass ? { error_class: errorClass } : {},
|
|
42470
|
+
...terminalSignal ? { terminal_signal: terminalSignal } : {}
|
|
42471
|
+
};
|
|
42472
|
+
}
|
|
42473
|
+
|
|
42256
42474
|
// ../common/src/telemetry/telemetry-events.ts
|
|
42257
42475
|
var CommonTelemetryEvents = {
|
|
42258
|
-
Error: "uip.error"
|
|
42476
|
+
Error: "uip.error",
|
|
42477
|
+
ShipSucceeded: "ship_succeeded"
|
|
42259
42478
|
};
|
|
42260
42479
|
|
|
42261
42480
|
// ../common/src/registry.ts
|
|
@@ -42322,6 +42541,136 @@ function formatMessage(category, name, properties) {
|
|
|
42322
42541
|
}
|
|
42323
42542
|
return message;
|
|
42324
42543
|
}
|
|
42544
|
+
// ../common/src/telemetry/detect-agent.ts
|
|
42545
|
+
var KNOWN_AGENTS = [
|
|
42546
|
+
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
42547
|
+
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
42548
|
+
{ envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
|
|
42549
|
+
{ envVar: "CODEX_THREAD_ID", id: "codex" },
|
|
42550
|
+
{ envVar: "CODEX_SANDBOX", id: "codex" },
|
|
42551
|
+
{ envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
|
|
42552
|
+
{ envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
|
|
42553
|
+
];
|
|
42554
|
+
function detectAgentFromEnv(env) {
|
|
42555
|
+
for (const agent of KNOWN_AGENTS) {
|
|
42556
|
+
const envValue = env[agent.envVar];
|
|
42557
|
+
if (agent.value !== undefined) {
|
|
42558
|
+
if (envValue === agent.value)
|
|
42559
|
+
return agent.id;
|
|
42560
|
+
} else {
|
|
42561
|
+
if (envValue)
|
|
42562
|
+
return agent.id;
|
|
42563
|
+
}
|
|
42564
|
+
}
|
|
42565
|
+
const agentEnv = env.AGENT;
|
|
42566
|
+
if (agentEnv) {
|
|
42567
|
+
if (agentEnv === "1" || agentEnv === "true")
|
|
42568
|
+
return "unknown";
|
|
42569
|
+
if (agentEnv.length <= 32)
|
|
42570
|
+
return agentEnv.toLowerCase();
|
|
42571
|
+
}
|
|
42572
|
+
return;
|
|
42573
|
+
}
|
|
42574
|
+
// ../common/src/telemetry/environment-info.ts
|
|
42575
|
+
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
42576
|
+
// ../common/src/telemetry/execution-context.ts
|
|
42577
|
+
var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
|
|
42578
|
+
var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
42579
|
+
var isEqual = (value, expected) => value?.toLowerCase() === expected;
|
|
42580
|
+
var CI_SIGNATURES = [
|
|
42581
|
+
{
|
|
42582
|
+
provider: "github_actions",
|
|
42583
|
+
matches: (env) => isTruthy(env.GITHUB_ACTIONS),
|
|
42584
|
+
isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
|
|
42585
|
+
},
|
|
42586
|
+
{
|
|
42587
|
+
provider: "azure_devops",
|
|
42588
|
+
matches: (env) => isTruthy(env.TF_BUILD),
|
|
42589
|
+
isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
|
|
42590
|
+
},
|
|
42591
|
+
{
|
|
42592
|
+
provider: "gitlab",
|
|
42593
|
+
matches: (env) => isTruthy(env.GITLAB_CI),
|
|
42594
|
+
isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
|
|
42595
|
+
},
|
|
42596
|
+
{
|
|
42597
|
+
provider: "circleci",
|
|
42598
|
+
matches: (env) => isTruthy(env.CIRCLECI),
|
|
42599
|
+
isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
|
|
42600
|
+
},
|
|
42601
|
+
{
|
|
42602
|
+
provider: "jenkins",
|
|
42603
|
+
matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
|
|
42604
|
+
},
|
|
42605
|
+
{
|
|
42606
|
+
provider: "teamcity",
|
|
42607
|
+
matches: (env) => isTruthy(env.TEAMCITY_VERSION)
|
|
42608
|
+
},
|
|
42609
|
+
{
|
|
42610
|
+
provider: "buildkite",
|
|
42611
|
+
matches: (env) => isTruthy(env.BUILDKITE),
|
|
42612
|
+
isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
|
|
42613
|
+
},
|
|
42614
|
+
{
|
|
42615
|
+
provider: "bitbucket",
|
|
42616
|
+
matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
|
|
42617
|
+
},
|
|
42618
|
+
{
|
|
42619
|
+
provider: "travis",
|
|
42620
|
+
matches: (env) => isTruthy(env.TRAVIS)
|
|
42621
|
+
},
|
|
42622
|
+
{
|
|
42623
|
+
provider: "appveyor",
|
|
42624
|
+
matches: (env) => isTruthy(env.APPVEYOR)
|
|
42625
|
+
},
|
|
42626
|
+
{
|
|
42627
|
+
provider: "generic",
|
|
42628
|
+
matches: (env) => isTruthy(env.CI)
|
|
42629
|
+
}
|
|
42630
|
+
];
|
|
42631
|
+
function currentEnv() {
|
|
42632
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
42633
|
+
}
|
|
42634
|
+
function currentTtyState() {
|
|
42635
|
+
if (typeof process === "undefined")
|
|
42636
|
+
return false;
|
|
42637
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
42638
|
+
}
|
|
42639
|
+
function detectCi(env) {
|
|
42640
|
+
const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
|
|
42641
|
+
if (!signature)
|
|
42642
|
+
return;
|
|
42643
|
+
return {
|
|
42644
|
+
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
42645
|
+
ciProvider: signature.provider
|
|
42646
|
+
};
|
|
42647
|
+
}
|
|
42648
|
+
function detectExecutionContext(options = {}) {
|
|
42649
|
+
const env = options.env ?? currentEnv();
|
|
42650
|
+
const ci = detectCi(env);
|
|
42651
|
+
if (ci)
|
|
42652
|
+
return ci;
|
|
42653
|
+
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
42654
|
+
if (agent) {
|
|
42655
|
+
return { executionContext: "agent" };
|
|
42656
|
+
}
|
|
42657
|
+
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
42658
|
+
if (authSignal === "service_account") {
|
|
42659
|
+
return { executionContext: "service_account" };
|
|
42660
|
+
}
|
|
42661
|
+
const isTty = options.isTty ?? currentTtyState();
|
|
42662
|
+
if (isTty) {
|
|
42663
|
+
return { executionContext: "manual" };
|
|
42664
|
+
}
|
|
42665
|
+
return { executionContext: "unknown" };
|
|
42666
|
+
}
|
|
42667
|
+
function getExecutionContextTelemetryProperties() {
|
|
42668
|
+
const detected = detectExecutionContext();
|
|
42669
|
+
return {
|
|
42670
|
+
execution_context: detected.executionContext,
|
|
42671
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
42672
|
+
};
|
|
42673
|
+
}
|
|
42325
42674
|
// ../common/src/telemetry/node-context-storage.ts
|
|
42326
42675
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
42327
42676
|
|
|
@@ -42334,6 +42683,26 @@ class NodeContextStorage {
|
|
|
42334
42683
|
return this.storage.getStore();
|
|
42335
42684
|
}
|
|
42336
42685
|
}
|
|
42686
|
+
// ../common/src/telemetry/session-id.ts
|
|
42687
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
42688
|
+
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
42689
|
+
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
42690
|
+
function getProcessEnv() {
|
|
42691
|
+
return globalThis.process?.env;
|
|
42692
|
+
}
|
|
42693
|
+
function normalizeSessionId(value) {
|
|
42694
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
42695
|
+
return;
|
|
42696
|
+
}
|
|
42697
|
+
const trimmed = String(value).trim();
|
|
42698
|
+
return trimmed || undefined;
|
|
42699
|
+
}
|
|
42700
|
+
function getConfiguredTelemetrySessionId() {
|
|
42701
|
+
return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
42702
|
+
}
|
|
42703
|
+
function resolveTelemetrySessionId(existingSessionId) {
|
|
42704
|
+
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
42705
|
+
}
|
|
42337
42706
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
42338
42707
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
42339
42708
|
function getGlobalTelemetryProperties() {
|
|
@@ -42418,12 +42787,22 @@ class TelemetryService {
|
|
|
42418
42787
|
return this.contextStorage.getContext();
|
|
42419
42788
|
}
|
|
42420
42789
|
enrichPropertiesWithContext(properties, context) {
|
|
42421
|
-
|
|
42422
|
-
|
|
42790
|
+
const globalProperties = getGlobalTelemetryProperties();
|
|
42791
|
+
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
42792
|
+
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
42793
|
+
const enriched = {
|
|
42794
|
+
...getExecutionContextTelemetryProperties(),
|
|
42795
|
+
...globalProperties,
|
|
42423
42796
|
...this.defaultProperties,
|
|
42424
42797
|
...properties,
|
|
42425
42798
|
...context
|
|
42426
42799
|
};
|
|
42800
|
+
if (sessionId === undefined) {
|
|
42801
|
+
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
42802
|
+
} else {
|
|
42803
|
+
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
42804
|
+
}
|
|
42805
|
+
return enriched;
|
|
42427
42806
|
}
|
|
42428
42807
|
generateId() {
|
|
42429
42808
|
return crypto.randomUUID().replaceAll("-", "");
|
|
@@ -42914,8 +43293,24 @@ var OutputFormatter;
|
|
|
42914
43293
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
42915
43294
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
42916
43295
|
process.exitCode = EXIT_CODES[data.Result] ?? 1;
|
|
42917
|
-
|
|
42918
|
-
|
|
43296
|
+
recordCommandFailureTelemetry({
|
|
43297
|
+
result: data.Result,
|
|
43298
|
+
errorCode: data.ErrorCode,
|
|
43299
|
+
retry: data.Retry,
|
|
43300
|
+
message: data.Message,
|
|
43301
|
+
context: data.Context,
|
|
43302
|
+
exitCode: process.exitCode,
|
|
43303
|
+
errorClass: data.TelemetryErrorClass,
|
|
43304
|
+
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
43305
|
+
terminalSignal: data.TelemetryTerminalSignal
|
|
43306
|
+
});
|
|
43307
|
+
const suppressTelemetry = data.SuppressTelemetry === true;
|
|
43308
|
+
const envelope = { ...data };
|
|
43309
|
+
delete envelope.SuppressTelemetry;
|
|
43310
|
+
delete envelope.TelemetryErrorClass;
|
|
43311
|
+
delete envelope.TelemetryTerminalOutcome;
|
|
43312
|
+
delete envelope.TelemetryTerminalSignal;
|
|
43313
|
+
if (!suppressTelemetry) {
|
|
42919
43314
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
42920
43315
|
result: data.Result,
|
|
42921
43316
|
errorCode: data.ErrorCode,
|
|
@@ -42978,6 +43373,158 @@ var OutputFormatter;
|
|
|
42978
43373
|
OutputFormatter.formatToString = formatToString;
|
|
42979
43374
|
})(OutputFormatter ||= {});
|
|
42980
43375
|
|
|
43376
|
+
// ../common/src/telemetry/command-attribution.ts
|
|
43377
|
+
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
43378
|
+
var MAX_SKILL_NAME_LENGTH = 80;
|
|
43379
|
+
var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
43380
|
+
function productMode(productArea, mode) {
|
|
43381
|
+
return { product_area: productArea, mode };
|
|
43382
|
+
}
|
|
43383
|
+
function attributionRecord(groups) {
|
|
43384
|
+
const record = {};
|
|
43385
|
+
for (const [productArea, mode, names] of groups) {
|
|
43386
|
+
const attribution = productMode(productArea, mode);
|
|
43387
|
+
for (const name of names) {
|
|
43388
|
+
record[name] = attribution;
|
|
43389
|
+
}
|
|
43390
|
+
}
|
|
43391
|
+
return record;
|
|
43392
|
+
}
|
|
43393
|
+
function commandAttribution(groups) {
|
|
43394
|
+
const entries = [];
|
|
43395
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
43396
|
+
const attribution = productMode(productArea, mode);
|
|
43397
|
+
for (const prefix of prefixes) {
|
|
43398
|
+
entries.push({ prefix, attribution });
|
|
43399
|
+
}
|
|
43400
|
+
}
|
|
43401
|
+
return entries;
|
|
43402
|
+
}
|
|
43403
|
+
var SKILL_ATTRIBUTION = attributionRecord([
|
|
43404
|
+
["admin", "operate", ["uipath-admin"]],
|
|
43405
|
+
["agents", "build", ["uipath-agents"]],
|
|
43406
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
43407
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
43408
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
43409
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
43410
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
43411
|
+
["governance", "operate", ["uipath-governance"]],
|
|
43412
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
43413
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
43414
|
+
[
|
|
43415
|
+
"maestro",
|
|
43416
|
+
"build",
|
|
43417
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
43418
|
+
],
|
|
43419
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
43420
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
43421
|
+
["platform", "operate", ["uipath-platform"]],
|
|
43422
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
43423
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
43424
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
43425
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
43426
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
43427
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
43428
|
+
]);
|
|
43429
|
+
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
43430
|
+
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
43431
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
43432
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
43433
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
43434
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
43435
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
43436
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
43437
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
43438
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
43439
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
43440
|
+
["functions", "build", ["uip.functions"]],
|
|
43441
|
+
["solution", "build", ["uip.solution"]],
|
|
43442
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
43443
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
43444
|
+
["platform", "operate", ["uip.platform"]],
|
|
43445
|
+
["admin", "operate", ["uip.admin"]],
|
|
43446
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
43447
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
43448
|
+
["governance", "operate", ["uip.gov"]],
|
|
43449
|
+
["insights", "operate", ["uip.insights"]],
|
|
43450
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
43451
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
43452
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
43453
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
43454
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
43455
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
43456
|
+
["integration-service", "build", ["uip.is"]],
|
|
43457
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
43458
|
+
[
|
|
43459
|
+
"cli",
|
|
43460
|
+
"operate",
|
|
43461
|
+
[
|
|
43462
|
+
"uip.login",
|
|
43463
|
+
"uip.logout",
|
|
43464
|
+
"uip.user",
|
|
43465
|
+
"uip.config",
|
|
43466
|
+
"uip.tools",
|
|
43467
|
+
"uip.skills",
|
|
43468
|
+
"uip.completion",
|
|
43469
|
+
"uip.update",
|
|
43470
|
+
"uip.mcp",
|
|
43471
|
+
"uip.track"
|
|
43472
|
+
]
|
|
43473
|
+
]
|
|
43474
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
43475
|
+
function normalizeCommandPath(value) {
|
|
43476
|
+
if (typeof value !== "string") {
|
|
43477
|
+
return;
|
|
43478
|
+
}
|
|
43479
|
+
const trimmed = value.trim().toLowerCase();
|
|
43480
|
+
if (!trimmed) {
|
|
43481
|
+
return;
|
|
43482
|
+
}
|
|
43483
|
+
const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
|
|
43484
|
+
if (tokens.length === 0) {
|
|
43485
|
+
return;
|
|
43486
|
+
}
|
|
43487
|
+
const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
|
|
43488
|
+
return commandTokens.join(".");
|
|
43489
|
+
}
|
|
43490
|
+
function getCommandProductModeAttribution(commandPath) {
|
|
43491
|
+
const normalized = normalizeCommandPath(commandPath);
|
|
43492
|
+
if (!normalized) {
|
|
43493
|
+
return;
|
|
43494
|
+
}
|
|
43495
|
+
return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
|
|
43496
|
+
}
|
|
43497
|
+
function normalizeSkillNameWithOptions(value, options) {
|
|
43498
|
+
if (typeof value !== "string") {
|
|
43499
|
+
return;
|
|
43500
|
+
}
|
|
43501
|
+
const normalized = value.trim().toLowerCase();
|
|
43502
|
+
if (!normalized) {
|
|
43503
|
+
return;
|
|
43504
|
+
}
|
|
43505
|
+
const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
|
|
43506
|
+
if (hasLegacyNamespace && !options.allowLegacyNamespace) {
|
|
43507
|
+
return;
|
|
43508
|
+
}
|
|
43509
|
+
const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
|
|
43510
|
+
if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
|
|
43511
|
+
return;
|
|
43512
|
+
}
|
|
43513
|
+
return skillName;
|
|
43514
|
+
}
|
|
43515
|
+
function normalizeSkillName(value) {
|
|
43516
|
+
return normalizeSkillNameWithOptions(value, {
|
|
43517
|
+
allowLegacyNamespace: false
|
|
43518
|
+
});
|
|
43519
|
+
}
|
|
43520
|
+
function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
43521
|
+
const skillName = normalizeSkillName(skillSource);
|
|
43522
|
+
return {
|
|
43523
|
+
...skillName ? { skill_name: skillName } : {},
|
|
43524
|
+
...getCommandProductModeAttribution(commandPath)
|
|
43525
|
+
};
|
|
43526
|
+
}
|
|
43527
|
+
|
|
42981
43528
|
// ../common/src/telemetry/pii-redactor.ts
|
|
42982
43529
|
var REDACTED = "[REDACTED]";
|
|
42983
43530
|
var MAX_VALUE_LENGTH = 200;
|
|
@@ -43163,6 +43710,12 @@ function commandHelpHint(commandPath) {
|
|
|
43163
43710
|
const command = commandPath.replace(/\./g, " ");
|
|
43164
43711
|
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
43165
43712
|
}
|
|
43713
|
+
function isPromptCancellation(error) {
|
|
43714
|
+
return error instanceof Error && error.name === "ExitPromptError";
|
|
43715
|
+
}
|
|
43716
|
+
function exitCodeFromProcess(fallback) {
|
|
43717
|
+
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
43718
|
+
}
|
|
43166
43719
|
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
43167
43720
|
const command = this;
|
|
43168
43721
|
return this.action(async (...args) => {
|
|
@@ -43170,6 +43723,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
43170
43723
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
43171
43724
|
const startTime = performance.now();
|
|
43172
43725
|
let errorMessage2;
|
|
43726
|
+
let fallbackExitCode = EXIT_CODES.Success;
|
|
43727
|
+
clearRecordedCommandFailureTelemetry();
|
|
43173
43728
|
const [error] = await catchError2(fn(...args));
|
|
43174
43729
|
if (error) {
|
|
43175
43730
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
@@ -43184,6 +43739,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
43184
43739
|
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
43185
43740
|
const typedContext = typed.context ?? typed.Context;
|
|
43186
43741
|
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
43742
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
43743
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
43187
43744
|
OutputFormatter.error({
|
|
43188
43745
|
Result: finalResult,
|
|
43189
43746
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
@@ -43192,16 +43749,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
43192
43749
|
...customRetry ? { Retry: customRetry } : {},
|
|
43193
43750
|
...customContext ? { Context: customContext } : {}
|
|
43194
43751
|
});
|
|
43195
|
-
context.exit(
|
|
43752
|
+
context.exit(fallbackExitCode);
|
|
43196
43753
|
}
|
|
43197
43754
|
const durationMs = performance.now() - startTime;
|
|
43198
|
-
const
|
|
43755
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
43756
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
43757
|
+
const success = !error && exitCode === 0;
|
|
43758
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
43759
|
+
error,
|
|
43760
|
+
exitCode,
|
|
43761
|
+
recordedFailure,
|
|
43762
|
+
pollSignal: context.pollSignal
|
|
43763
|
+
});
|
|
43199
43764
|
telemetry.trackEvent(telemetryName, redactProperties({
|
|
43200
43765
|
...extractCommandParams(command),
|
|
43201
43766
|
...props,
|
|
43767
|
+
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
43202
43768
|
command: "true",
|
|
43203
43769
|
duration: String(durationMs),
|
|
43204
43770
|
success: String(success),
|
|
43771
|
+
...terminalTelemetry,
|
|
43205
43772
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
43206
43773
|
}));
|
|
43207
43774
|
});
|
|
@@ -43857,6 +44424,36 @@ function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
|
|
|
43857
44424
|
function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
43858
44425
|
installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
|
|
43859
44426
|
}
|
|
44427
|
+
// ../common/src/telemetry/ship-succeeded.ts
|
|
44428
|
+
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
44429
|
+
function getShippedKeys() {
|
|
44430
|
+
const existing = shippedKeysSlot.get();
|
|
44431
|
+
if (existing) {
|
|
44432
|
+
return existing;
|
|
44433
|
+
}
|
|
44434
|
+
const keys = new Set;
|
|
44435
|
+
shippedKeysSlot.set(keys);
|
|
44436
|
+
return keys;
|
|
44437
|
+
}
|
|
44438
|
+
function dedupeKey(payload) {
|
|
44439
|
+
return [
|
|
44440
|
+
payload.command_name,
|
|
44441
|
+
payload.ship_kind,
|
|
44442
|
+
payload.target,
|
|
44443
|
+
payload.project_type,
|
|
44444
|
+
payload.artifact_correlation_key ?? payload.package_version_key ?? payload.deployment_key ?? payload.solution_id ?? payload.package_name ?? ""
|
|
44445
|
+
].join("|");
|
|
44446
|
+
}
|
|
44447
|
+
function trackShipSucceeded(payload) {
|
|
44448
|
+
const keys = getShippedKeys();
|
|
44449
|
+
const key = dedupeKey(payload);
|
|
44450
|
+
if (keys.has(key)) {
|
|
44451
|
+
return false;
|
|
44452
|
+
}
|
|
44453
|
+
keys.add(key);
|
|
44454
|
+
telemetry.trackEvent(CommonTelemetryEvents.ShipSucceeded, redactProperties({ ...payload }));
|
|
44455
|
+
return true;
|
|
44456
|
+
}
|
|
43860
44457
|
// ../common/src/tool-provider.ts
|
|
43861
44458
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
43862
44459
|
async function ensurePackagerFactory(verb) {
|
|
@@ -45294,7 +45891,7 @@ function coerceWorkflowErrorMessage(raw) {
|
|
|
45294
45891
|
const trimmed = raw.trim();
|
|
45295
45892
|
return trimmed ? { errorMessage: trimmed } : undefined;
|
|
45296
45893
|
}
|
|
45297
|
-
if (!
|
|
45894
|
+
if (!isRecord2(raw)) {
|
|
45298
45895
|
return { errorMessage: String(raw) };
|
|
45299
45896
|
}
|
|
45300
45897
|
if (typeof raw.errorMessage === "string" && raw.errorMessage.trim()) {
|
|
@@ -45307,7 +45904,7 @@ function coerceWorkflowErrorMessage(raw) {
|
|
|
45307
45904
|
}
|
|
45308
45905
|
return { errorMessage: stringifyUnexpectedWorkflowError(raw) };
|
|
45309
45906
|
}
|
|
45310
|
-
function
|
|
45907
|
+
function isRecord2(value) {
|
|
45311
45908
|
return typeof value === "object" && value !== null;
|
|
45312
45909
|
}
|
|
45313
45910
|
function stringifyUnexpectedWorkflowError(value) {
|
|
@@ -45706,7 +46303,7 @@ class TextApiResponse2 {
|
|
|
45706
46303
|
var package_default3 = {
|
|
45707
46304
|
name: "@uipath/solution-sdk",
|
|
45708
46305
|
license: "MIT",
|
|
45709
|
-
version: "1.197.0-preview.
|
|
46306
|
+
version: "1.197.0-preview.66",
|
|
45710
46307
|
repository: {
|
|
45711
46308
|
type: "git",
|
|
45712
46309
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -46649,7 +47246,7 @@ async function readUipxFile(fs7, solutionDir) {
|
|
|
46649
47246
|
return { uipx, uipxFileName };
|
|
46650
47247
|
}
|
|
46651
47248
|
function validateUipxFile(parsed, uipxFileName) {
|
|
46652
|
-
if (!
|
|
47249
|
+
if (!isRecord3(parsed)) {
|
|
46653
47250
|
throw new Error(`Invalid .uipx file: ${uipxFileName} must contain a JSON object.`);
|
|
46654
47251
|
}
|
|
46655
47252
|
if (typeof parsed.SolutionId !== "string" || !parsed.SolutionId.trim()) {
|
|
@@ -46659,7 +47256,7 @@ function validateUipxFile(parsed, uipxFileName) {
|
|
|
46659
47256
|
throw new Error("Invalid .uipx file: missing Projects.");
|
|
46660
47257
|
}
|
|
46661
47258
|
for (const [index, project] of parsed.Projects.entries()) {
|
|
46662
|
-
if (!
|
|
47259
|
+
if (!isRecord3(project)) {
|
|
46663
47260
|
throw new Error(`Invalid .uipx file: Projects[${index}] must be an object.`);
|
|
46664
47261
|
}
|
|
46665
47262
|
if (typeof project.ProjectRelativePath !== "string" || !project.ProjectRelativePath.trim()) {
|
|
@@ -46669,7 +47266,7 @@ function validateUipxFile(parsed, uipxFileName) {
|
|
|
46669
47266
|
}
|
|
46670
47267
|
return parsed;
|
|
46671
47268
|
}
|
|
46672
|
-
function
|
|
47269
|
+
function isRecord3(value) {
|
|
46673
47270
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
46674
47271
|
}
|
|
46675
47272
|
function resolveSolutionDir(fs7, inputPath) {
|
|
@@ -53806,6 +54403,16 @@ var registerDeployRunCommand = (program2) => {
|
|
|
53806
54403
|
NextSteps: result.nextSteps
|
|
53807
54404
|
}
|
|
53808
54405
|
});
|
|
54406
|
+
trackShipSucceeded({
|
|
54407
|
+
ship_kind: "deploy",
|
|
54408
|
+
target: options.personalWorkspace ? "personal_workspace_orchestrator" : "orchestrator",
|
|
54409
|
+
project_type: "solution",
|
|
54410
|
+
command_name: "uip.solution.deploy.run",
|
|
54411
|
+
artifact_correlation_key: result.deploymentKey ?? result.pipelineDeploymentId ?? result.deploymentName,
|
|
54412
|
+
deployment_key: result.deploymentKey,
|
|
54413
|
+
package_name: options.packageName,
|
|
54414
|
+
package_version: options.packageVersion
|
|
54415
|
+
});
|
|
53809
54416
|
});
|
|
53810
54417
|
};
|
|
53811
54418
|
|
|
@@ -77430,7 +78037,7 @@ var NETWORK_ERROR_CODES2 = new Set([
|
|
|
77430
78037
|
"ENETUNREACH",
|
|
77431
78038
|
"EAI_FAIL"
|
|
77432
78039
|
]);
|
|
77433
|
-
var
|
|
78040
|
+
var TLS_ERROR_CODES3 = new Set([
|
|
77434
78041
|
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
77435
78042
|
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
77436
78043
|
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
@@ -77678,6 +78285,148 @@ var ScreenLogger2;
|
|
|
77678
78285
|
})(ScreenLogger2 ||= {});
|
|
77679
78286
|
var telemetryPropsSlot2 = singleton3("TelemetryDefaultProps");
|
|
77680
78287
|
var sdkUserAgentHostToken2 = singleton3("SdkUserAgentHostToken");
|
|
78288
|
+
function productMode2(productArea, mode) {
|
|
78289
|
+
return { product_area: productArea, mode };
|
|
78290
|
+
}
|
|
78291
|
+
function attributionRecord2(groups) {
|
|
78292
|
+
const record = {};
|
|
78293
|
+
for (const [productArea, mode, names] of groups) {
|
|
78294
|
+
const attribution = productMode2(productArea, mode);
|
|
78295
|
+
for (const name of names) {
|
|
78296
|
+
record[name] = attribution;
|
|
78297
|
+
}
|
|
78298
|
+
}
|
|
78299
|
+
return record;
|
|
78300
|
+
}
|
|
78301
|
+
function commandAttribution2(groups) {
|
|
78302
|
+
const entries = [];
|
|
78303
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
78304
|
+
const attribution = productMode2(productArea, mode);
|
|
78305
|
+
for (const prefix of prefixes) {
|
|
78306
|
+
entries.push({ prefix, attribution });
|
|
78307
|
+
}
|
|
78308
|
+
}
|
|
78309
|
+
return entries;
|
|
78310
|
+
}
|
|
78311
|
+
var SKILL_ATTRIBUTION2 = attributionRecord2([
|
|
78312
|
+
["admin", "operate", ["uipath-admin"]],
|
|
78313
|
+
["agents", "build", ["uipath-agents"]],
|
|
78314
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
78315
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
78316
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
78317
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
78318
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
78319
|
+
["governance", "operate", ["uipath-governance"]],
|
|
78320
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
78321
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
78322
|
+
[
|
|
78323
|
+
"maestro",
|
|
78324
|
+
"build",
|
|
78325
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
78326
|
+
],
|
|
78327
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
78328
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
78329
|
+
["platform", "operate", ["uipath-platform"]],
|
|
78330
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
78331
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
78332
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
78333
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
78334
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
78335
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
78336
|
+
]);
|
|
78337
|
+
var KNOWN_SKILL_NAMES2 = new Set(Object.keys(SKILL_ATTRIBUTION2));
|
|
78338
|
+
var COMMAND_ATTRIBUTION2 = commandAttribution2([
|
|
78339
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
78340
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
78341
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
78342
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
78343
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
78344
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
78345
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
78346
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
78347
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
78348
|
+
["functions", "build", ["uip.functions"]],
|
|
78349
|
+
["solution", "build", ["uip.solution"]],
|
|
78350
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
78351
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
78352
|
+
["platform", "operate", ["uip.platform"]],
|
|
78353
|
+
["admin", "operate", ["uip.admin"]],
|
|
78354
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
78355
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
78356
|
+
["governance", "operate", ["uip.gov"]],
|
|
78357
|
+
["insights", "operate", ["uip.insights"]],
|
|
78358
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
78359
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
78360
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
78361
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
78362
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
78363
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
78364
|
+
["integration-service", "build", ["uip.is"]],
|
|
78365
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
78366
|
+
[
|
|
78367
|
+
"cli",
|
|
78368
|
+
"operate",
|
|
78369
|
+
[
|
|
78370
|
+
"uip.login",
|
|
78371
|
+
"uip.logout",
|
|
78372
|
+
"uip.user",
|
|
78373
|
+
"uip.config",
|
|
78374
|
+
"uip.tools",
|
|
78375
|
+
"uip.skills",
|
|
78376
|
+
"uip.completion",
|
|
78377
|
+
"uip.update",
|
|
78378
|
+
"uip.mcp",
|
|
78379
|
+
"uip.track"
|
|
78380
|
+
]
|
|
78381
|
+
]
|
|
78382
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
78383
|
+
var recordedFailureSlot2 = singleton3("CommandTelemetryFailure");
|
|
78384
|
+
var AUTH_ERROR_CODES2 = new Set([
|
|
78385
|
+
"authentication_required",
|
|
78386
|
+
"permission_denied"
|
|
78387
|
+
]);
|
|
78388
|
+
var VALIDATION_ERROR_CODES2 = new Set(["invalid_argument"]);
|
|
78389
|
+
var NETWORK_HTTP_ERROR_CODES2 = new Set([
|
|
78390
|
+
"network_error",
|
|
78391
|
+
"rate_limited",
|
|
78392
|
+
"server_error",
|
|
78393
|
+
"not_found",
|
|
78394
|
+
"method_not_allowed"
|
|
78395
|
+
]);
|
|
78396
|
+
var TIMEOUT_ERROR_CODES2 = new Set(["timeout"]);
|
|
78397
|
+
var NETWORK_OS_ERROR_CODES2 = new Set([
|
|
78398
|
+
"ECONNREFUSED",
|
|
78399
|
+
"ECONNRESET",
|
|
78400
|
+
"ENOTFOUND",
|
|
78401
|
+
"EAI_AGAIN",
|
|
78402
|
+
"EPIPE",
|
|
78403
|
+
"EHOSTUNREACH",
|
|
78404
|
+
"ENETUNREACH",
|
|
78405
|
+
"EAI_FAIL"
|
|
78406
|
+
]);
|
|
78407
|
+
var TIMEOUT_OS_ERROR_CODES2 = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
78408
|
+
var TLS_ERROR_CODES22 = new Set([
|
|
78409
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
78410
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
78411
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
78412
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
78413
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
78414
|
+
"CERT_HAS_EXPIRED",
|
|
78415
|
+
"CERT_UNTRUSTED",
|
|
78416
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
78417
|
+
]);
|
|
78418
|
+
var MISSING_DEPENDENCY_CODES2 = new Set([
|
|
78419
|
+
"MODULE_NOT_FOUND",
|
|
78420
|
+
"ERR_MODULE_NOT_FOUND"
|
|
78421
|
+
]);
|
|
78422
|
+
var INTERNAL_ERROR_NAMES2 = new Set([
|
|
78423
|
+
"TypeError",
|
|
78424
|
+
"ReferenceError",
|
|
78425
|
+
"SyntaxError",
|
|
78426
|
+
"RangeError"
|
|
78427
|
+
]);
|
|
78428
|
+
var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
|
|
78429
|
+
var authSignalSlot2 = singleton3("TelemetryExecutionContextAuthSignal");
|
|
77681
78430
|
var factorySlot2 = singleton3("PackagerFactoryProvider");
|
|
77682
78431
|
var RulesConfigFileType;
|
|
77683
78432
|
((RulesConfigFileType2) => {
|
|
@@ -77786,7 +78535,7 @@ class ToolLogger {
|
|
|
77786
78535
|
var package_default5 = {
|
|
77787
78536
|
name: "@uipath/project-packager",
|
|
77788
78537
|
license: "MIT",
|
|
77789
|
-
version: "1.197.0-preview.
|
|
78538
|
+
version: "1.197.0-preview.66",
|
|
77790
78539
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
77791
78540
|
type: "module",
|
|
77792
78541
|
main: "./dist/index.js",
|
|
@@ -82384,7 +83133,7 @@ var NETWORK_ERROR_CODES3 = new Set([
|
|
|
82384
83133
|
"ENETUNREACH",
|
|
82385
83134
|
"EAI_FAIL"
|
|
82386
83135
|
]);
|
|
82387
|
-
var
|
|
83136
|
+
var TLS_ERROR_CODES4 = new Set([
|
|
82388
83137
|
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
82389
83138
|
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
82390
83139
|
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
@@ -87386,8 +88135,225 @@ function getOutputFormat2() {
|
|
|
87386
88135
|
function getOutputFilter2() {
|
|
87387
88136
|
return filterSlot3.get();
|
|
87388
88137
|
}
|
|
88138
|
+
var recordedFailureSlot3 = singleton4("CommandTelemetryFailure");
|
|
88139
|
+
var AUTH_ERROR_CODES3 = new Set([
|
|
88140
|
+
"authentication_required",
|
|
88141
|
+
"permission_denied"
|
|
88142
|
+
]);
|
|
88143
|
+
var VALIDATION_ERROR_CODES3 = new Set(["invalid_argument"]);
|
|
88144
|
+
var NETWORK_HTTP_ERROR_CODES3 = new Set([
|
|
88145
|
+
"network_error",
|
|
88146
|
+
"rate_limited",
|
|
88147
|
+
"server_error",
|
|
88148
|
+
"not_found",
|
|
88149
|
+
"method_not_allowed"
|
|
88150
|
+
]);
|
|
88151
|
+
var TIMEOUT_ERROR_CODES3 = new Set(["timeout"]);
|
|
88152
|
+
var NETWORK_OS_ERROR_CODES3 = new Set([
|
|
88153
|
+
"ECONNREFUSED",
|
|
88154
|
+
"ECONNRESET",
|
|
88155
|
+
"ENOTFOUND",
|
|
88156
|
+
"EAI_AGAIN",
|
|
88157
|
+
"EPIPE",
|
|
88158
|
+
"EHOSTUNREACH",
|
|
88159
|
+
"ENETUNREACH",
|
|
88160
|
+
"EAI_FAIL"
|
|
88161
|
+
]);
|
|
88162
|
+
var TIMEOUT_OS_ERROR_CODES3 = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
88163
|
+
var TLS_ERROR_CODES23 = new Set([
|
|
88164
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
88165
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
88166
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
88167
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
88168
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
88169
|
+
"CERT_HAS_EXPIRED",
|
|
88170
|
+
"CERT_UNTRUSTED",
|
|
88171
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
88172
|
+
]);
|
|
88173
|
+
var MISSING_DEPENDENCY_CODES3 = new Set([
|
|
88174
|
+
"MODULE_NOT_FOUND",
|
|
88175
|
+
"ERR_MODULE_NOT_FOUND"
|
|
88176
|
+
]);
|
|
88177
|
+
var INTERNAL_ERROR_NAMES3 = new Set([
|
|
88178
|
+
"TypeError",
|
|
88179
|
+
"ReferenceError",
|
|
88180
|
+
"SyntaxError",
|
|
88181
|
+
"RangeError"
|
|
88182
|
+
]);
|
|
88183
|
+
function isRecord4(value) {
|
|
88184
|
+
return value !== null && typeof value === "object";
|
|
88185
|
+
}
|
|
88186
|
+
function stringField2(value, field) {
|
|
88187
|
+
if (!isRecord4(value)) {
|
|
88188
|
+
return;
|
|
88189
|
+
}
|
|
88190
|
+
const raw = value[field];
|
|
88191
|
+
return typeof raw === "string" ? raw : undefined;
|
|
88192
|
+
}
|
|
88193
|
+
function numberField2(value, field) {
|
|
88194
|
+
if (!isRecord4(value)) {
|
|
88195
|
+
return;
|
|
88196
|
+
}
|
|
88197
|
+
const raw = value[field];
|
|
88198
|
+
return typeof raw === "number" ? raw : undefined;
|
|
88199
|
+
}
|
|
88200
|
+
function findStringInCauseChain2(error, field) {
|
|
88201
|
+
let current = error;
|
|
88202
|
+
for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
|
|
88203
|
+
const value = stringField2(current, field);
|
|
88204
|
+
if (value) {
|
|
88205
|
+
return value;
|
|
88206
|
+
}
|
|
88207
|
+
current = current.cause;
|
|
88208
|
+
}
|
|
88209
|
+
return;
|
|
88210
|
+
}
|
|
88211
|
+
function findCodeInCauseChain2(error) {
|
|
88212
|
+
return findStringInCauseChain2(error, "code");
|
|
88213
|
+
}
|
|
88214
|
+
function isSpawnEnoent2(error) {
|
|
88215
|
+
const code2 = findCodeInCauseChain2(error);
|
|
88216
|
+
if (code2 !== "ENOENT") {
|
|
88217
|
+
return false;
|
|
88218
|
+
}
|
|
88219
|
+
const syscall = findStringInCauseChain2(error, "syscall");
|
|
88220
|
+
return syscall?.startsWith("spawn") === true;
|
|
88221
|
+
}
|
|
88222
|
+
function isCancellationError2(error, exitCode, pollSignal) {
|
|
88223
|
+
if (exitCode === 130) {
|
|
88224
|
+
return true;
|
|
88225
|
+
}
|
|
88226
|
+
if (!isRecord4(error)) {
|
|
88227
|
+
return false;
|
|
88228
|
+
}
|
|
88229
|
+
if (numberField2(error, "exitCode") === 130) {
|
|
88230
|
+
return true;
|
|
88231
|
+
}
|
|
88232
|
+
const name = stringField2(error, "name");
|
|
88233
|
+
if (name === "ExitPromptError") {
|
|
88234
|
+
return true;
|
|
88235
|
+
}
|
|
88236
|
+
if (name === "AbortError" && pollSignal?.aborted) {
|
|
88237
|
+
return true;
|
|
88238
|
+
}
|
|
88239
|
+
const message = stringField2(error, "message");
|
|
88240
|
+
return message?.includes("SIGINT") === true;
|
|
88241
|
+
}
|
|
88242
|
+
function terminalSignalFor2(input, outcome) {
|
|
88243
|
+
if (input.recordedFailure?.terminalSignal) {
|
|
88244
|
+
return input.recordedFailure.terminalSignal;
|
|
88245
|
+
}
|
|
88246
|
+
const explicit = findStringInCauseChain2(input.error, "terminalSignal") ?? findStringInCauseChain2(input.error, "signal");
|
|
88247
|
+
if (explicit) {
|
|
88248
|
+
return explicit;
|
|
88249
|
+
}
|
|
88250
|
+
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
88251
|
+
}
|
|
88252
|
+
function classifyHttpStatus2(status) {
|
|
88253
|
+
if (status === 401 || status === 403) {
|
|
88254
|
+
return "auth";
|
|
88255
|
+
}
|
|
88256
|
+
if (status === 400 || status === 409 || status === 422) {
|
|
88257
|
+
return "validation";
|
|
88258
|
+
}
|
|
88259
|
+
if (status === 408) {
|
|
88260
|
+
return "timeout";
|
|
88261
|
+
}
|
|
88262
|
+
return "network_http";
|
|
88263
|
+
}
|
|
88264
|
+
function classifyFromResult2(result) {
|
|
88265
|
+
switch (result) {
|
|
88266
|
+
case "AuthenticationError":
|
|
88267
|
+
return "auth";
|
|
88268
|
+
case "ValidationError":
|
|
88269
|
+
return "validation";
|
|
88270
|
+
case "TimeoutError":
|
|
88271
|
+
return "timeout";
|
|
88272
|
+
default:
|
|
88273
|
+
return;
|
|
88274
|
+
}
|
|
88275
|
+
}
|
|
88276
|
+
function classifyFromErrorCode2(errorCode2) {
|
|
88277
|
+
if (!errorCode2) {
|
|
88278
|
+
return;
|
|
88279
|
+
}
|
|
88280
|
+
if (AUTH_ERROR_CODES3.has(errorCode2)) {
|
|
88281
|
+
return "auth";
|
|
88282
|
+
}
|
|
88283
|
+
if (VALIDATION_ERROR_CODES3.has(errorCode2)) {
|
|
88284
|
+
return "validation";
|
|
88285
|
+
}
|
|
88286
|
+
if (TIMEOUT_ERROR_CODES3.has(errorCode2)) {
|
|
88287
|
+
return "timeout";
|
|
88288
|
+
}
|
|
88289
|
+
if (NETWORK_HTTP_ERROR_CODES3.has(errorCode2)) {
|
|
88290
|
+
return "network_http";
|
|
88291
|
+
}
|
|
88292
|
+
return;
|
|
88293
|
+
}
|
|
88294
|
+
function classifyFromError2(error) {
|
|
88295
|
+
const code2 = findCodeInCauseChain2(error);
|
|
88296
|
+
if (code2) {
|
|
88297
|
+
if (code2.startsWith("commander.")) {
|
|
88298
|
+
return "validation";
|
|
88299
|
+
}
|
|
88300
|
+
if (NETWORK_OS_ERROR_CODES3.has(code2) || TLS_ERROR_CODES23.has(code2)) {
|
|
88301
|
+
return "network_http";
|
|
88302
|
+
}
|
|
88303
|
+
if (TIMEOUT_OS_ERROR_CODES3.has(code2)) {
|
|
88304
|
+
return "timeout";
|
|
88305
|
+
}
|
|
88306
|
+
if (MISSING_DEPENDENCY_CODES3.has(code2) || isSpawnEnoent2(error)) {
|
|
88307
|
+
return "missing_dependency";
|
|
88308
|
+
}
|
|
88309
|
+
}
|
|
88310
|
+
const message = stringField2(error, "message");
|
|
88311
|
+
if (message?.includes("fetch failed") === true) {
|
|
88312
|
+
return "network_http";
|
|
88313
|
+
}
|
|
88314
|
+
const name = stringField2(error, "name");
|
|
88315
|
+
if (name && INTERNAL_ERROR_NAMES3.has(name)) {
|
|
88316
|
+
return "internal";
|
|
88317
|
+
}
|
|
88318
|
+
return;
|
|
88319
|
+
}
|
|
88320
|
+
function classifyError22(input) {
|
|
88321
|
+
const recorded = input.recordedFailure;
|
|
88322
|
+
if (recorded?.errorClass) {
|
|
88323
|
+
return recorded.errorClass;
|
|
88324
|
+
}
|
|
88325
|
+
const status = recorded?.context?.httpStatus;
|
|
88326
|
+
if (status !== undefined) {
|
|
88327
|
+
return classifyHttpStatus2(status);
|
|
88328
|
+
}
|
|
88329
|
+
return classifyFromResult2(recorded?.result) ?? classifyFromErrorCode2(recorded?.errorCode) ?? classifyFromError2(input.error) ?? "unknown";
|
|
88330
|
+
}
|
|
88331
|
+
function recordCommandFailureTelemetry2(failure) {
|
|
88332
|
+
recordedFailureSlot3.set(failure);
|
|
88333
|
+
}
|
|
88334
|
+
function clearRecordedCommandFailureTelemetry2() {
|
|
88335
|
+
recordedFailureSlot3.clear();
|
|
88336
|
+
}
|
|
88337
|
+
function takeRecordedCommandFailureTelemetry2() {
|
|
88338
|
+
const failure = recordedFailureSlot3.get();
|
|
88339
|
+
recordedFailureSlot3.clear();
|
|
88340
|
+
return failure;
|
|
88341
|
+
}
|
|
88342
|
+
function buildCommandTerminalTelemetryProperties2(input) {
|
|
88343
|
+
const cancelled = isCancellationError2(input.error, input.exitCode, input.pollSignal);
|
|
88344
|
+
const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
|
|
88345
|
+
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError22(input);
|
|
88346
|
+
const terminalSignal = terminalSignalFor2(input, outcome);
|
|
88347
|
+
return {
|
|
88348
|
+
exit_code: input.exitCode,
|
|
88349
|
+
terminal_outcome: outcome,
|
|
88350
|
+
...errorClass ? { error_class: errorClass } : {},
|
|
88351
|
+
...terminalSignal ? { terminal_signal: terminalSignal } : {}
|
|
88352
|
+
};
|
|
88353
|
+
}
|
|
87389
88354
|
var CommonTelemetryEvents2 = {
|
|
87390
|
-
Error: "uip.error"
|
|
88355
|
+
Error: "uip.error",
|
|
88356
|
+
ShipSucceeded: "ship_succeeded"
|
|
87391
88357
|
};
|
|
87392
88358
|
function readRegistryValue2(keyPath, valueName) {
|
|
87393
88359
|
if (process.platform !== "win32") {
|
|
@@ -87465,6 +88431,133 @@ class DebugTelemetryProvider2 {
|
|
|
87465
88431
|
logger4.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
87466
88432
|
}
|
|
87467
88433
|
}
|
|
88434
|
+
var KNOWN_AGENTS2 = [
|
|
88435
|
+
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
88436
|
+
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
88437
|
+
{ envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
|
|
88438
|
+
{ envVar: "CODEX_THREAD_ID", id: "codex" },
|
|
88439
|
+
{ envVar: "CODEX_SANDBOX", id: "codex" },
|
|
88440
|
+
{ envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
|
|
88441
|
+
{ envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
|
|
88442
|
+
];
|
|
88443
|
+
function detectAgentFromEnv2(env2) {
|
|
88444
|
+
for (const agent of KNOWN_AGENTS2) {
|
|
88445
|
+
const envValue = env2[agent.envVar];
|
|
88446
|
+
if (agent.value !== undefined) {
|
|
88447
|
+
if (envValue === agent.value)
|
|
88448
|
+
return agent.id;
|
|
88449
|
+
} else {
|
|
88450
|
+
if (envValue)
|
|
88451
|
+
return agent.id;
|
|
88452
|
+
}
|
|
88453
|
+
}
|
|
88454
|
+
const agentEnv = env2.AGENT;
|
|
88455
|
+
if (agentEnv) {
|
|
88456
|
+
if (agentEnv === "1" || agentEnv === "true")
|
|
88457
|
+
return "unknown";
|
|
88458
|
+
if (agentEnv.length <= 32)
|
|
88459
|
+
return agentEnv.toLowerCase();
|
|
88460
|
+
}
|
|
88461
|
+
return;
|
|
88462
|
+
}
|
|
88463
|
+
var LOCAL_HOSTS2 = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
88464
|
+
var authSignalSlot3 = singleton4("TelemetryExecutionContextAuthSignal");
|
|
88465
|
+
var isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
88466
|
+
var isEqual2 = (value, expected) => value?.toLowerCase() === expected;
|
|
88467
|
+
var CI_SIGNATURES2 = [
|
|
88468
|
+
{
|
|
88469
|
+
provider: "github_actions",
|
|
88470
|
+
matches: (env2) => isTruthy2(env2.GITHUB_ACTIONS),
|
|
88471
|
+
isScheduler: (env2) => env2.GITHUB_EVENT_NAME === "schedule"
|
|
88472
|
+
},
|
|
88473
|
+
{
|
|
88474
|
+
provider: "azure_devops",
|
|
88475
|
+
matches: (env2) => isTruthy2(env2.TF_BUILD),
|
|
88476
|
+
isScheduler: (env2) => isEqual2(env2.BUILD_REASON, "schedule")
|
|
88477
|
+
},
|
|
88478
|
+
{
|
|
88479
|
+
provider: "gitlab",
|
|
88480
|
+
matches: (env2) => isTruthy2(env2.GITLAB_CI),
|
|
88481
|
+
isScheduler: (env2) => env2.CI_PIPELINE_SOURCE === "schedule"
|
|
88482
|
+
},
|
|
88483
|
+
{
|
|
88484
|
+
provider: "circleci",
|
|
88485
|
+
matches: (env2) => isTruthy2(env2.CIRCLECI),
|
|
88486
|
+
isScheduler: (env2) => env2.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
|
|
88487
|
+
},
|
|
88488
|
+
{
|
|
88489
|
+
provider: "jenkins",
|
|
88490
|
+
matches: (env2) => isTruthy2(env2.JENKINS_URL) || isTruthy2(env2.JENKINS_HOME)
|
|
88491
|
+
},
|
|
88492
|
+
{
|
|
88493
|
+
provider: "teamcity",
|
|
88494
|
+
matches: (env2) => isTruthy2(env2.TEAMCITY_VERSION)
|
|
88495
|
+
},
|
|
88496
|
+
{
|
|
88497
|
+
provider: "buildkite",
|
|
88498
|
+
matches: (env2) => isTruthy2(env2.BUILDKITE),
|
|
88499
|
+
isScheduler: (env2) => env2.BUILDKITE_SOURCE === "schedule"
|
|
88500
|
+
},
|
|
88501
|
+
{
|
|
88502
|
+
provider: "bitbucket",
|
|
88503
|
+
matches: (env2) => isTruthy2(env2.BITBUCKET_BUILD_NUMBER)
|
|
88504
|
+
},
|
|
88505
|
+
{
|
|
88506
|
+
provider: "travis",
|
|
88507
|
+
matches: (env2) => isTruthy2(env2.TRAVIS)
|
|
88508
|
+
},
|
|
88509
|
+
{
|
|
88510
|
+
provider: "appveyor",
|
|
88511
|
+
matches: (env2) => isTruthy2(env2.APPVEYOR)
|
|
88512
|
+
},
|
|
88513
|
+
{
|
|
88514
|
+
provider: "generic",
|
|
88515
|
+
matches: (env2) => isTruthy2(env2.CI)
|
|
88516
|
+
}
|
|
88517
|
+
];
|
|
88518
|
+
function currentEnv2() {
|
|
88519
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
88520
|
+
}
|
|
88521
|
+
function currentTtyState2() {
|
|
88522
|
+
if (typeof process === "undefined")
|
|
88523
|
+
return false;
|
|
88524
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
88525
|
+
}
|
|
88526
|
+
function detectCi2(env2) {
|
|
88527
|
+
const signature = CI_SIGNATURES2.find((candidate) => candidate.matches(env2));
|
|
88528
|
+
if (!signature)
|
|
88529
|
+
return;
|
|
88530
|
+
return {
|
|
88531
|
+
executionContext: signature.isScheduler?.(env2) ? "scheduler" : "ci",
|
|
88532
|
+
ciProvider: signature.provider
|
|
88533
|
+
};
|
|
88534
|
+
}
|
|
88535
|
+
function detectExecutionContext2(options = {}) {
|
|
88536
|
+
const env2 = options.env ?? currentEnv2();
|
|
88537
|
+
const ci = detectCi2(env2);
|
|
88538
|
+
if (ci)
|
|
88539
|
+
return ci;
|
|
88540
|
+
const agent = options.agent ?? detectAgentFromEnv2(env2);
|
|
88541
|
+
if (agent) {
|
|
88542
|
+
return { executionContext: "agent" };
|
|
88543
|
+
}
|
|
88544
|
+
const authSignal = options.authSignal ?? authSignalSlot3.get();
|
|
88545
|
+
if (authSignal === "service_account") {
|
|
88546
|
+
return { executionContext: "service_account" };
|
|
88547
|
+
}
|
|
88548
|
+
const isTty = options.isTty ?? currentTtyState2();
|
|
88549
|
+
if (isTty) {
|
|
88550
|
+
return { executionContext: "manual" };
|
|
88551
|
+
}
|
|
88552
|
+
return { executionContext: "unknown" };
|
|
88553
|
+
}
|
|
88554
|
+
function getExecutionContextTelemetryProperties2() {
|
|
88555
|
+
const detected = detectExecutionContext2();
|
|
88556
|
+
return {
|
|
88557
|
+
execution_context: detected.executionContext,
|
|
88558
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
88559
|
+
};
|
|
88560
|
+
}
|
|
87468
88561
|
|
|
87469
88562
|
class NodeContextStorage2 {
|
|
87470
88563
|
storage = new AsyncLocalStorage2;
|
|
@@ -87475,6 +88568,25 @@ class NodeContextStorage2 {
|
|
|
87475
88568
|
return this.storage.getStore();
|
|
87476
88569
|
}
|
|
87477
88570
|
}
|
|
88571
|
+
var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
|
|
88572
|
+
var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
|
|
88573
|
+
var telemetrySessionIdSlot3 = singleton4("TelemetrySessionId");
|
|
88574
|
+
function getProcessEnv2() {
|
|
88575
|
+
return globalThis.process?.env;
|
|
88576
|
+
}
|
|
88577
|
+
function normalizeSessionId2(value) {
|
|
88578
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
88579
|
+
return;
|
|
88580
|
+
}
|
|
88581
|
+
const trimmed = String(value).trim();
|
|
88582
|
+
return trimmed || undefined;
|
|
88583
|
+
}
|
|
88584
|
+
function getConfiguredTelemetrySessionId2() {
|
|
88585
|
+
return normalizeSessionId2(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV2]);
|
|
88586
|
+
}
|
|
88587
|
+
function resolveTelemetrySessionId2(existingSessionId) {
|
|
88588
|
+
return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
|
|
88589
|
+
}
|
|
87478
88590
|
var telemetryPropsSlot3 = singleton4("TelemetryDefaultProps");
|
|
87479
88591
|
function getGlobalTelemetryProperties2() {
|
|
87480
88592
|
return telemetryPropsSlot3.get();
|
|
@@ -87557,12 +88669,22 @@ class TelemetryService2 {
|
|
|
87557
88669
|
return this.contextStorage.getContext();
|
|
87558
88670
|
}
|
|
87559
88671
|
enrichPropertiesWithContext(properties, context) {
|
|
87560
|
-
|
|
87561
|
-
|
|
88672
|
+
const globalProperties = getGlobalTelemetryProperties2();
|
|
88673
|
+
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY2] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY2] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY2];
|
|
88674
|
+
const sessionId = resolveTelemetrySessionId2(existingSessionId);
|
|
88675
|
+
const enriched = {
|
|
88676
|
+
...getExecutionContextTelemetryProperties2(),
|
|
88677
|
+
...globalProperties,
|
|
87562
88678
|
...this.defaultProperties,
|
|
87563
88679
|
...properties,
|
|
87564
88680
|
...context
|
|
87565
88681
|
};
|
|
88682
|
+
if (sessionId === undefined) {
|
|
88683
|
+
delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
|
|
88684
|
+
} else {
|
|
88685
|
+
enriched[TELEMETRY_SESSION_ID_PROPERTY2] = sessionId;
|
|
88686
|
+
}
|
|
88687
|
+
return enriched;
|
|
87566
88688
|
}
|
|
87567
88689
|
generateId() {
|
|
87568
88690
|
return crypto.randomUUID().replaceAll("-", "");
|
|
@@ -88029,8 +89151,24 @@ var OutputFormatter2;
|
|
|
88029
89151
|
data.ErrorCode ??= defaultErrorCodeForFailure2(data);
|
|
88030
89152
|
data.Retry ??= defaultRetryForErrorCode2(data.ErrorCode);
|
|
88031
89153
|
process.exitCode = EXIT_CODES2[data.Result] ?? 1;
|
|
88032
|
-
|
|
88033
|
-
|
|
89154
|
+
recordCommandFailureTelemetry2({
|
|
89155
|
+
result: data.Result,
|
|
89156
|
+
errorCode: data.ErrorCode,
|
|
89157
|
+
retry: data.Retry,
|
|
89158
|
+
message: data.Message,
|
|
89159
|
+
context: data.Context,
|
|
89160
|
+
exitCode: process.exitCode,
|
|
89161
|
+
errorClass: data.TelemetryErrorClass,
|
|
89162
|
+
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
89163
|
+
terminalSignal: data.TelemetryTerminalSignal
|
|
89164
|
+
});
|
|
89165
|
+
const suppressTelemetry = data.SuppressTelemetry === true;
|
|
89166
|
+
const envelope = { ...data };
|
|
89167
|
+
delete envelope.SuppressTelemetry;
|
|
89168
|
+
delete envelope.TelemetryErrorClass;
|
|
89169
|
+
delete envelope.TelemetryTerminalOutcome;
|
|
89170
|
+
delete envelope.TelemetryTerminalSignal;
|
|
89171
|
+
if (!suppressTelemetry) {
|
|
88034
89172
|
telemetry2.trackEvent(CommonTelemetryEvents2.Error, {
|
|
88035
89173
|
result: data.Result,
|
|
88036
89174
|
errorCode: data.ErrorCode,
|
|
@@ -88092,6 +89230,156 @@ var OutputFormatter2;
|
|
|
88092
89230
|
}
|
|
88093
89231
|
OutputFormatter22.formatToString = formatToString;
|
|
88094
89232
|
})(OutputFormatter2 ||= {});
|
|
89233
|
+
var LEGACY_SKILL_NAMESPACE2 = "uipath:";
|
|
89234
|
+
var MAX_SKILL_NAME_LENGTH2 = 80;
|
|
89235
|
+
var SKILL_NAME_PATTERN2 = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
89236
|
+
function productMode3(productArea, mode) {
|
|
89237
|
+
return { product_area: productArea, mode };
|
|
89238
|
+
}
|
|
89239
|
+
function attributionRecord3(groups) {
|
|
89240
|
+
const record = {};
|
|
89241
|
+
for (const [productArea, mode, names] of groups) {
|
|
89242
|
+
const attribution = productMode3(productArea, mode);
|
|
89243
|
+
for (const name of names) {
|
|
89244
|
+
record[name] = attribution;
|
|
89245
|
+
}
|
|
89246
|
+
}
|
|
89247
|
+
return record;
|
|
89248
|
+
}
|
|
89249
|
+
function commandAttribution3(groups) {
|
|
89250
|
+
const entries = [];
|
|
89251
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
89252
|
+
const attribution = productMode3(productArea, mode);
|
|
89253
|
+
for (const prefix of prefixes) {
|
|
89254
|
+
entries.push({ prefix, attribution });
|
|
89255
|
+
}
|
|
89256
|
+
}
|
|
89257
|
+
return entries;
|
|
89258
|
+
}
|
|
89259
|
+
var SKILL_ATTRIBUTION3 = attributionRecord3([
|
|
89260
|
+
["admin", "operate", ["uipath-admin"]],
|
|
89261
|
+
["agents", "build", ["uipath-agents"]],
|
|
89262
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
89263
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
89264
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
89265
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
89266
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
89267
|
+
["governance", "operate", ["uipath-governance"]],
|
|
89268
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
89269
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
89270
|
+
[
|
|
89271
|
+
"maestro",
|
|
89272
|
+
"build",
|
|
89273
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
89274
|
+
],
|
|
89275
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
89276
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
89277
|
+
["platform", "operate", ["uipath-platform"]],
|
|
89278
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
89279
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
89280
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
89281
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
89282
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
89283
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
89284
|
+
]);
|
|
89285
|
+
var KNOWN_SKILL_NAMES3 = new Set(Object.keys(SKILL_ATTRIBUTION3));
|
|
89286
|
+
var COMMAND_ATTRIBUTION3 = commandAttribution3([
|
|
89287
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
89288
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
89289
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
89290
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
89291
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
89292
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
89293
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
89294
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
89295
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
89296
|
+
["functions", "build", ["uip.functions"]],
|
|
89297
|
+
["solution", "build", ["uip.solution"]],
|
|
89298
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
89299
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
89300
|
+
["platform", "operate", ["uip.platform"]],
|
|
89301
|
+
["admin", "operate", ["uip.admin"]],
|
|
89302
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
89303
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
89304
|
+
["governance", "operate", ["uip.gov"]],
|
|
89305
|
+
["insights", "operate", ["uip.insights"]],
|
|
89306
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
89307
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
89308
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
89309
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
89310
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
89311
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
89312
|
+
["integration-service", "build", ["uip.is"]],
|
|
89313
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
89314
|
+
[
|
|
89315
|
+
"cli",
|
|
89316
|
+
"operate",
|
|
89317
|
+
[
|
|
89318
|
+
"uip.login",
|
|
89319
|
+
"uip.logout",
|
|
89320
|
+
"uip.user",
|
|
89321
|
+
"uip.config",
|
|
89322
|
+
"uip.tools",
|
|
89323
|
+
"uip.skills",
|
|
89324
|
+
"uip.completion",
|
|
89325
|
+
"uip.update",
|
|
89326
|
+
"uip.mcp",
|
|
89327
|
+
"uip.track"
|
|
89328
|
+
]
|
|
89329
|
+
]
|
|
89330
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
89331
|
+
function normalizeCommandPath2(value) {
|
|
89332
|
+
if (typeof value !== "string") {
|
|
89333
|
+
return;
|
|
89334
|
+
}
|
|
89335
|
+
const trimmed = value.trim().toLowerCase();
|
|
89336
|
+
if (!trimmed) {
|
|
89337
|
+
return;
|
|
89338
|
+
}
|
|
89339
|
+
const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
|
|
89340
|
+
if (tokens.length === 0) {
|
|
89341
|
+
return;
|
|
89342
|
+
}
|
|
89343
|
+
const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
|
|
89344
|
+
return commandTokens.join(".");
|
|
89345
|
+
}
|
|
89346
|
+
function getCommandProductModeAttribution2(commandPath) {
|
|
89347
|
+
const normalized = normalizeCommandPath2(commandPath);
|
|
89348
|
+
if (!normalized) {
|
|
89349
|
+
return;
|
|
89350
|
+
}
|
|
89351
|
+
return COMMAND_ATTRIBUTION3.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
|
|
89352
|
+
}
|
|
89353
|
+
function normalizeSkillNameWithOptions2(value, options) {
|
|
89354
|
+
if (typeof value !== "string") {
|
|
89355
|
+
return;
|
|
89356
|
+
}
|
|
89357
|
+
const normalized = value.trim().toLowerCase();
|
|
89358
|
+
if (!normalized) {
|
|
89359
|
+
return;
|
|
89360
|
+
}
|
|
89361
|
+
const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE2);
|
|
89362
|
+
if (hasLegacyNamespace && !options.allowLegacyNamespace) {
|
|
89363
|
+
return;
|
|
89364
|
+
}
|
|
89365
|
+
const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE2.length) : normalized;
|
|
89366
|
+
if (skillName.length > MAX_SKILL_NAME_LENGTH2 || !SKILL_NAME_PATTERN2.test(skillName) || !KNOWN_SKILL_NAMES3.has(skillName)) {
|
|
89367
|
+
return;
|
|
89368
|
+
}
|
|
89369
|
+
return skillName;
|
|
89370
|
+
}
|
|
89371
|
+
function normalizeSkillName2(value) {
|
|
89372
|
+
return normalizeSkillNameWithOptions2(value, {
|
|
89373
|
+
allowLegacyNamespace: false
|
|
89374
|
+
});
|
|
89375
|
+
}
|
|
89376
|
+
function buildCommandTelemetryAttribution2(commandPath, skillSource) {
|
|
89377
|
+
const skillName = normalizeSkillName2(skillSource);
|
|
89378
|
+
return {
|
|
89379
|
+
...skillName ? { skill_name: skillName } : {},
|
|
89380
|
+
...getCommandProductModeAttribution2(commandPath)
|
|
89381
|
+
};
|
|
89382
|
+
}
|
|
88095
89383
|
var REDACTED2 = "[REDACTED]";
|
|
88096
89384
|
var MAX_VALUE_LENGTH2 = 200;
|
|
88097
89385
|
var SENSITIVE_NAME_TOKENS2 = new Set([
|
|
@@ -88266,6 +89554,12 @@ function commandHelpHint2(commandPath) {
|
|
|
88266
89554
|
const command = commandPath.replace(/\./g, " ");
|
|
88267
89555
|
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
88268
89556
|
}
|
|
89557
|
+
function isPromptCancellation2(error) {
|
|
89558
|
+
return error instanceof Error && error.name === "ExitPromptError";
|
|
89559
|
+
}
|
|
89560
|
+
function exitCodeFromProcess2(fallback) {
|
|
89561
|
+
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
89562
|
+
}
|
|
88269
89563
|
Command4.prototype.trackedAction = function(context, fn, properties) {
|
|
88270
89564
|
const command = this;
|
|
88271
89565
|
return this.action(async (...args) => {
|
|
@@ -88273,6 +89567,8 @@ Command4.prototype.trackedAction = function(context, fn, properties) {
|
|
|
88273
89567
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
88274
89568
|
const startTime = performance.now();
|
|
88275
89569
|
let errorMessage3;
|
|
89570
|
+
let fallbackExitCode = EXIT_CODES2.Success;
|
|
89571
|
+
clearRecordedCommandFailureTelemetry2();
|
|
88276
89572
|
const [error] = await catchError4(fn(...args));
|
|
88277
89573
|
if (error) {
|
|
88278
89574
|
errorMessage3 = error instanceof Error ? error.message : String(error);
|
|
@@ -88287,6 +89583,8 @@ Command4.prototype.trackedAction = function(context, fn, properties) {
|
|
|
88287
89583
|
const customRetry = isRetryHint2(typedRetry) ? typedRetry : undefined;
|
|
88288
89584
|
const typedContext = typed.context ?? typed.Context;
|
|
88289
89585
|
const customContext = isErrorContext2(typedContext) ? typedContext : undefined;
|
|
89586
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation2(error) ? 130 : undefined;
|
|
89587
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES2[finalResult];
|
|
88290
89588
|
OutputFormatter2.error({
|
|
88291
89589
|
Result: finalResult,
|
|
88292
89590
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
@@ -88295,16 +89593,26 @@ Command4.prototype.trackedAction = function(context, fn, properties) {
|
|
|
88295
89593
|
...customRetry ? { Retry: customRetry } : {},
|
|
88296
89594
|
...customContext ? { Context: customContext } : {}
|
|
88297
89595
|
});
|
|
88298
|
-
context.exit(
|
|
89596
|
+
context.exit(fallbackExitCode);
|
|
88299
89597
|
}
|
|
88300
89598
|
const durationMs = performance.now() - startTime;
|
|
88301
|
-
const
|
|
89599
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess2(fallbackExitCode);
|
|
89600
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry2();
|
|
89601
|
+
const success = !error && exitCode === 0;
|
|
89602
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties2({
|
|
89603
|
+
error,
|
|
89604
|
+
exitCode,
|
|
89605
|
+
recordedFailure,
|
|
89606
|
+
pollSignal: context.pollSignal
|
|
89607
|
+
});
|
|
88302
89608
|
telemetry2.trackEvent(telemetryName, redactProperties2({
|
|
88303
89609
|
...extractCommandParams2(command),
|
|
88304
89610
|
...props,
|
|
89611
|
+
...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
|
|
88305
89612
|
command: "true",
|
|
88306
89613
|
duration: String(durationMs),
|
|
88307
89614
|
success: String(success),
|
|
89615
|
+
...terminalTelemetry,
|
|
88308
89616
|
...errorMessage3 ? { errorMessage: errorMessage3 } : {}
|
|
88309
89617
|
}));
|
|
88310
89618
|
});
|
|
@@ -88362,6 +89670,7 @@ var ScreenLogger3;
|
|
|
88362
89670
|
ScreenLogger22.progress = progress;
|
|
88363
89671
|
})(ScreenLogger3 ||= {});
|
|
88364
89672
|
var sdkUserAgentHostToken3 = singleton4("SdkUserAgentHostToken");
|
|
89673
|
+
var shippedKeysSlot2 = singleton4("ShipSucceededDedupeKeys");
|
|
88365
89674
|
var factorySlot3 = singleton4("PackagerFactoryProvider");
|
|
88366
89675
|
var globalLogHandler2 = (logMessage) => {
|
|
88367
89676
|
const formattedMessage = logMessage.toFormattedString();
|
|
@@ -88748,7 +90057,7 @@ var PublishDestinationKind2;
|
|
|
88748
90057
|
var package_default6 = {
|
|
88749
90058
|
name: "@uipath/project-packager",
|
|
88750
90059
|
license: "MIT",
|
|
88751
|
-
version: "1.197.0-preview.
|
|
90060
|
+
version: "1.197.0-preview.66",
|
|
88752
90061
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
88753
90062
|
type: "module",
|
|
88754
90063
|
main: "./dist/index.js",
|
|
@@ -89524,7 +90833,7 @@ class SolutionLoader {
|
|
|
89524
90833
|
}
|
|
89525
90834
|
}
|
|
89526
90835
|
function validateSolutionFile(parsed, solutionFilePath) {
|
|
89527
|
-
if (!
|
|
90836
|
+
if (!isRecord5(parsed)) {
|
|
89528
90837
|
throw new Error(translate.t("solutionpackager.solutionLoader.errors.invalidSolution", {
|
|
89529
90838
|
path: solutionFilePath
|
|
89530
90839
|
}));
|
|
@@ -89535,7 +90844,7 @@ function validateSolutionFile(parsed, solutionFilePath) {
|
|
|
89535
90844
|
}));
|
|
89536
90845
|
}
|
|
89537
90846
|
for (const [index, project] of parsed.Projects.entries()) {
|
|
89538
|
-
if (!
|
|
90847
|
+
if (!isRecord5(project)) {
|
|
89539
90848
|
throw new Error(translate.t("solutionpackager.solutionLoader.errors.projectMustBeObject", {
|
|
89540
90849
|
path: solutionFilePath,
|
|
89541
90850
|
index
|
|
@@ -89552,7 +90861,7 @@ function validateSolutionFile(parsed, solutionFilePath) {
|
|
|
89552
90861
|
}
|
|
89553
90862
|
return parsed;
|
|
89554
90863
|
}
|
|
89555
|
-
function
|
|
90864
|
+
function isRecord5(value) {
|
|
89556
90865
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
89557
90866
|
}
|
|
89558
90867
|
|
|
@@ -105516,6 +106825,90 @@ async function mapUploadError(uploadError) {
|
|
|
105516
106825
|
};
|
|
105517
106826
|
}
|
|
105518
106827
|
|
|
106828
|
+
// src/services/ship-telemetry.ts
|
|
106829
|
+
init_src();
|
|
106830
|
+
var PROJECT_TYPE_MAP = {
|
|
106831
|
+
Agent: "low_code_agent",
|
|
106832
|
+
Api: "api_workflow",
|
|
106833
|
+
AppV2: "coded_app",
|
|
106834
|
+
CaseManagement: "case",
|
|
106835
|
+
Flow: "flow",
|
|
106836
|
+
Process: "rpa",
|
|
106837
|
+
ProcessOrchestration: "bpmn",
|
|
106838
|
+
WebApp: "coded_app",
|
|
106839
|
+
processOrchestration: "bpmn"
|
|
106840
|
+
};
|
|
106841
|
+
function isRecord6(value) {
|
|
106842
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
106843
|
+
}
|
|
106844
|
+
function normalizeShipProjectType(projectType) {
|
|
106845
|
+
return PROJECT_TYPE_MAP[projectType] ?? projectType.trim().toLowerCase();
|
|
106846
|
+
}
|
|
106847
|
+
function summarizeShipProjectTypes(projectTypes) {
|
|
106848
|
+
const normalized = [
|
|
106849
|
+
...new Set(projectTypes.map((projectType) => projectType.trim()).filter(Boolean).map(normalizeShipProjectType))
|
|
106850
|
+
];
|
|
106851
|
+
if (normalized.length === 0) {
|
|
106852
|
+
return { projectType: "unknown" };
|
|
106853
|
+
}
|
|
106854
|
+
if (normalized.length === 1) {
|
|
106855
|
+
return { projectType: normalized[0] };
|
|
106856
|
+
}
|
|
106857
|
+
const sortedProjectTypes = [...normalized];
|
|
106858
|
+
sortedProjectTypes.sort((left, right) => left.localeCompare(right));
|
|
106859
|
+
return {
|
|
106860
|
+
projectType: "mixed",
|
|
106861
|
+
projectTypes: sortedProjectTypes.join(",")
|
|
106862
|
+
};
|
|
106863
|
+
}
|
|
106864
|
+
function readProjectTypesFromUipx(content) {
|
|
106865
|
+
const parsed = JSON.parse(content);
|
|
106866
|
+
if (!isRecord6(parsed) || !Array.isArray(parsed.Projects)) {
|
|
106867
|
+
return [];
|
|
106868
|
+
}
|
|
106869
|
+
return parsed.Projects.map((project) => {
|
|
106870
|
+
if (!isRecord6(project)) {
|
|
106871
|
+
return;
|
|
106872
|
+
}
|
|
106873
|
+
return typeof project.Type === "string" ? project.Type : undefined;
|
|
106874
|
+
}).filter((projectType) => projectType !== undefined);
|
|
106875
|
+
}
|
|
106876
|
+
async function inspectSolutionPackageProjectTypes(packagePath) {
|
|
106877
|
+
const fs9 = getFileSystem();
|
|
106878
|
+
const [readError, archive] = await catchError2(fs9.readFile(packagePath));
|
|
106879
|
+
if (readError || !archive) {
|
|
106880
|
+
logger.debug(`[ship_succeeded] Could not read solution package for project type telemetry: ${readError?.message ?? "empty archive"}`);
|
|
106881
|
+
return { projectType: "unknown" };
|
|
106882
|
+
}
|
|
106883
|
+
const [unzipError, entries] = await catchError2(Promise.resolve().then(() => unzipSync(new Uint8Array(archive))));
|
|
106884
|
+
if (unzipError) {
|
|
106885
|
+
logger.debug(`[ship_succeeded] Could not inspect solution package zip: ${unzipError.message}`);
|
|
106886
|
+
return { projectType: "unknown" };
|
|
106887
|
+
}
|
|
106888
|
+
const decoder = new TextDecoder;
|
|
106889
|
+
const projectTypes = [];
|
|
106890
|
+
for (const [entryName, entryBytes] of Object.entries(entries)) {
|
|
106891
|
+
if (!entryName.endsWith(".uipx")) {
|
|
106892
|
+
continue;
|
|
106893
|
+
}
|
|
106894
|
+
const [parseError, parsedTypes] = await catchError2(Promise.resolve().then(() => readProjectTypesFromUipx(decoder.decode(entryBytes))));
|
|
106895
|
+
if (parseError) {
|
|
106896
|
+
logger.debug(`[ship_succeeded] Could not parse ${entryName} for project type telemetry: ${parseError.message}`);
|
|
106897
|
+
continue;
|
|
106898
|
+
}
|
|
106899
|
+
projectTypes.push(...parsedTypes);
|
|
106900
|
+
}
|
|
106901
|
+
return summarizeShipProjectTypes(projectTypes);
|
|
106902
|
+
}
|
|
106903
|
+
function trackSolutionShipSucceeded(payload) {
|
|
106904
|
+
const { projectTypeSummary, ...rest } = payload;
|
|
106905
|
+
return trackShipSucceeded({
|
|
106906
|
+
...rest,
|
|
106907
|
+
project_type: projectTypeSummary.projectType,
|
|
106908
|
+
project_types: projectTypeSummary.projectTypes
|
|
106909
|
+
});
|
|
106910
|
+
}
|
|
106911
|
+
|
|
105519
106912
|
// src/commands/publish.ts
|
|
105520
106913
|
var PUBLISHED_STATUS = "Package is published to Orchestrator but not yet deployed";
|
|
105521
106914
|
var NEXT_STEPS_MESSAGE = "Package is published to Orchestrator but not yet deployed. " + "Deploy/activate it into an Orchestrator folder before it appears in the " + "processes list or can be started as a job.";
|
|
@@ -105607,6 +107000,17 @@ var registerPublishCommand = (program4) => {
|
|
|
105607
107000
|
NextSteps: NEXT_STEPS_MESSAGE
|
|
105608
107001
|
}
|
|
105609
107002
|
});
|
|
107003
|
+
const projectTypeSummary = await inspectSolutionPackageProjectTypes(packagePath);
|
|
107004
|
+
trackSolutionShipSucceeded({
|
|
107005
|
+
ship_kind: "publish",
|
|
107006
|
+
target: options.personalWorkspace ? "personal_workspace_solution_feed" : "tenant_solution_feed",
|
|
107007
|
+
command_name: "uip.solution.publish",
|
|
107008
|
+
artifact_correlation_key: result.packageVersionKey,
|
|
107009
|
+
package_version_key: result.packageVersionKey,
|
|
107010
|
+
package_name: result.packageName,
|
|
107011
|
+
package_version: result.packageVersion,
|
|
107012
|
+
projectTypeSummary
|
|
107013
|
+
});
|
|
105610
107014
|
});
|
|
105611
107015
|
};
|
|
105612
107016
|
|
|
@@ -107065,6 +108469,7 @@ var registerUploadCommand = (program4) => {
|
|
|
107065
108469
|
let solutionId;
|
|
107066
108470
|
let uipxPath;
|
|
107067
108471
|
let tempDir;
|
|
108472
|
+
let bundledProjectTypes = [];
|
|
107068
108473
|
const pathStat = await fs9.stat(resolvedPath);
|
|
107069
108474
|
if (!pathStat) {
|
|
107070
108475
|
outputError(`Path not found: ${resolvedPath}`);
|
|
@@ -107091,6 +108496,7 @@ var registerUploadCommand = (program4) => {
|
|
|
107091
108496
|
uisPath = bundleResult.uisPath;
|
|
107092
108497
|
solutionId = bundleResult.solutionId;
|
|
107093
108498
|
uipxPath = bundleResult.uipxPath;
|
|
108499
|
+
bundledProjectTypes = bundleResult.projects.map((project) => project.Type);
|
|
107094
108500
|
logger.info(`Bundled solution to ${uisPath} (SolutionId: ${solutionId})`);
|
|
107095
108501
|
} else {
|
|
107096
108502
|
outputError(`Unsupported path: ${resolvedPath}. Provide a solution directory, .uipx file, or .uis file.`);
|
|
@@ -107157,6 +108563,15 @@ var registerUploadCommand = (program4) => {
|
|
|
107157
108563
|
Response: result
|
|
107158
108564
|
}
|
|
107159
108565
|
});
|
|
108566
|
+
const projectTypeSummary = bundledProjectTypes.length > 0 ? summarizeShipProjectTypes(bundledProjectTypes) : await inspectSolutionPackageProjectTypes(uisPath);
|
|
108567
|
+
trackSolutionShipSucceeded({
|
|
108568
|
+
ship_kind: "upload",
|
|
108569
|
+
target: "studio_web",
|
|
108570
|
+
command_name: "uip.solution.upload",
|
|
108571
|
+
artifact_correlation_key: returnedSolutionId,
|
|
108572
|
+
solution_id: returnedSolutionId,
|
|
108573
|
+
projectTypeSummary
|
|
108574
|
+
});
|
|
107160
108575
|
} finally {
|
|
107161
108576
|
if (tempDir) {
|
|
107162
108577
|
const [cleanupError] = await catchError2(fs9.rm(tempDir));
|
|
@@ -107205,4 +108620,4 @@ export {
|
|
|
107205
108620
|
metadata
|
|
107206
108621
|
};
|
|
107207
108622
|
|
|
107208
|
-
//# debugId=
|
|
108623
|
+
//# debugId=106519A28C7FCEED64756E2164756E21
|