@uipath/solution-sdk 1.206.0-preview.303 → 1.207.0-preview.305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deployment-search.js +5 -5
- package/dist/{index-t1evhtnh.js → index-1bffghc6.js} +88 -21
- package/dist/{index-0b3srjv7.js → index-3stpkr4a.js} +30 -8
- package/dist/{index-7g313657.js → index-56m247xv.js} +8 -4
- package/dist/{index-y9qx7901.js → index-93ee30d0.js} +248 -132
- package/dist/index-b4cns9y6.js +48 -0
- package/dist/{index-xnrbg4x3.js → index-knpm888a.js} +4 -2
- package/dist/{index-bpn15jyk.js → index-mgaz5jpa.js} +48 -6
- package/dist/{index-dfmtrvrq.js → index-tt6bptj4.js} +4 -4
- package/dist/index.js +57 -13
- package/dist/invocation-graph.js +82 -0
- package/dist/{jmespath-x4na7sj8.js → jmespath-d7vwhn8r.js} +1 -1
- package/dist/package-search.js +5 -5
- package/dist/project-context.js +3 -3
- package/dist/resources/index.js +176 -57
- package/dist/solution-auth.js +3 -3
- package/dist/src/index.d.ts +2 -2
- package/dist/src/invocation-graph.d.ts +107 -0
- package/dist/src/resources/services/local-resource-matcher.d.ts +23 -0
- package/dist/src/resources/services/remote-resources.d.ts +11 -0
- package/dist/src/resources/services/resource-name.d.ts +6 -0
- package/dist/src/resources/services/resource-refresh-service.d.ts +8 -0
- package/dist/src/resources/services/sync-resources-from-bindings.d.ts +7 -1
- package/dist/src/solution-auth.d.ts +3 -0
- package/dist/src/solution-file.d.ts +36 -6
- package/dist/src/studio-web-compat.d.ts +19 -16
- package/dist/src/types.d.ts +8 -0
- package/package.json +6 -2
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__exportCjs,
|
|
5
5
|
__require,
|
|
6
6
|
getFileSystem
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3stpkr4a.js";
|
|
8
8
|
|
|
9
9
|
// ../../node_modules/commander/lib/error.js
|
|
10
10
|
var require_error = __commonJS(function(exports) {
|
|
@@ -2121,13 +2121,15 @@ var ProjectDimensions = {
|
|
|
2121
2121
|
SolutionKey: "SolutionKey",
|
|
2122
2122
|
SolutionProjectKey: "SolutionProjectKey",
|
|
2123
2123
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
2124
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
2124
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
2125
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
2125
2126
|
};
|
|
2126
2127
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
2127
2128
|
ProjectDimensions.ProjectKey,
|
|
2128
2129
|
ProjectDimensions.SolutionKey,
|
|
2129
2130
|
ProjectDimensions.SolutionProjectKey,
|
|
2130
|
-
ProjectDimensions.PreviousSolutionKey
|
|
2131
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
2132
|
+
ProjectDimensions.PreviousProjectKey
|
|
2131
2133
|
]);
|
|
2132
2134
|
var ShipDimensions = {
|
|
2133
2135
|
ShipKind: "ShipKind",
|
|
@@ -2290,9 +2292,7 @@ async function withinProjectIdentityBudget(work, onTimeout) {
|
|
|
2290
2292
|
}
|
|
2291
2293
|
}
|
|
2292
2294
|
|
|
2293
|
-
// ../common/src/
|
|
2294
|
-
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
2295
|
-
var PSEUDONYM_HEX_LENGTH = 32;
|
|
2295
|
+
// ../common/src/sha256.ts
|
|
2296
2296
|
var SHA256_K = new Uint32Array([
|
|
2297
2297
|
1116352408,
|
|
2298
2298
|
1899447441,
|
|
@@ -2372,7 +2372,7 @@ var SHA256_INITIAL_STATE = new Uint32Array([
|
|
|
2372
2372
|
function rotr(value, bits) {
|
|
2373
2373
|
return (value >>> bits | value << 32 - bits) >>> 0;
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2375
|
+
function sha256Words(input) {
|
|
2376
2376
|
const bytes = new TextEncoder().encode(input);
|
|
2377
2377
|
const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
|
|
2378
2378
|
const buffer = new Uint8Array(paddedLength);
|
|
@@ -2428,12 +2428,19 @@ function sha256Hex(input) {
|
|
|
2428
2428
|
state[6] = state[6] + g >>> 0;
|
|
2429
2429
|
state[7] = state[7] + h >>> 0;
|
|
2430
2430
|
}
|
|
2431
|
+
return state;
|
|
2432
|
+
}
|
|
2433
|
+
function sha256Hex(input) {
|
|
2431
2434
|
let hex = "";
|
|
2432
|
-
for (const word of
|
|
2435
|
+
for (const word of sha256Words(input)) {
|
|
2433
2436
|
hex += word.toString(16).padStart(8, "0");
|
|
2434
2437
|
}
|
|
2435
2438
|
return hex;
|
|
2436
2439
|
}
|
|
2440
|
+
|
|
2441
|
+
// ../common/src/telemetry/pseudonymize.ts
|
|
2442
|
+
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
2443
|
+
var PSEUDONYM_HEX_LENGTH = 32;
|
|
2437
2444
|
function resolveSha256Hex() {
|
|
2438
2445
|
try {
|
|
2439
2446
|
const nodeCrypto = __require("node:crypto");
|
|
@@ -3046,13 +3053,25 @@ function getLogFilePath() {
|
|
|
3046
3053
|
return logger.getLogFilePath();
|
|
3047
3054
|
}
|
|
3048
3055
|
|
|
3056
|
+
// ../common/src/result-types.ts
|
|
3057
|
+
var RESULTS = {
|
|
3058
|
+
Success: "Success",
|
|
3059
|
+
Failure: "Failure",
|
|
3060
|
+
ConfigError: "ConfigError",
|
|
3061
|
+
AuthenticationError: "AuthenticationError",
|
|
3062
|
+
ValidationError: "ValidationError",
|
|
3063
|
+
TimeoutError: "TimeoutError"
|
|
3064
|
+
};
|
|
3065
|
+
|
|
3049
3066
|
// ../common/src/error-codes.ts
|
|
3050
3067
|
var CLI_ERROR_CODES = [
|
|
3051
3068
|
"invalid_argument",
|
|
3069
|
+
"confirmation_required",
|
|
3052
3070
|
"authentication_required",
|
|
3053
3071
|
"permission_denied",
|
|
3054
3072
|
"local_permission_denied",
|
|
3055
3073
|
"not_found",
|
|
3074
|
+
"not_enabled",
|
|
3056
3075
|
"rate_limited",
|
|
3057
3076
|
"network_error",
|
|
3058
3077
|
"timeout",
|
|
@@ -3091,6 +3110,12 @@ function carriedRetry(error) {
|
|
|
3091
3110
|
const retry = error.retry;
|
|
3092
3111
|
return isRetryHint(retry) ? retry : undefined;
|
|
3093
3112
|
}
|
|
3113
|
+
function carriedResult(error) {
|
|
3114
|
+
if (!error || typeof error !== "object")
|
|
3115
|
+
return;
|
|
3116
|
+
const result = error.result;
|
|
3117
|
+
return typeof result === "string" && result !== RESULTS.Success && Object.values(RESULTS).includes(result) ? result : undefined;
|
|
3118
|
+
}
|
|
3094
3119
|
function defaultRetryForErrorCode(errorCode) {
|
|
3095
3120
|
switch (errorCode) {
|
|
3096
3121
|
case "network_error":
|
|
@@ -3489,6 +3514,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3489
3514
|
}
|
|
3490
3515
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
3491
3516
|
context.errorCode = parsedBody.errorCode;
|
|
3517
|
+
} else if (typeof parsedBody?.errorCode === "number") {
|
|
3518
|
+
context.errorCode = String(parsedBody.errorCode);
|
|
3492
3519
|
} else if (parsedBody?.code && typeof parsedBody.code === "string") {
|
|
3493
3520
|
context.errorCode = parsedBody.code;
|
|
3494
3521
|
}
|
|
@@ -3566,16 +3593,6 @@ function parseAuthChallenge(header) {
|
|
|
3566
3593
|
description: description || undefined
|
|
3567
3594
|
};
|
|
3568
3595
|
}
|
|
3569
|
-
// ../common/src/result-types.ts
|
|
3570
|
-
var RESULTS = {
|
|
3571
|
-
Success: "Success",
|
|
3572
|
-
Failure: "Failure",
|
|
3573
|
-
ConfigError: "ConfigError",
|
|
3574
|
-
AuthenticationError: "AuthenticationError",
|
|
3575
|
-
ValidationError: "ValidationError",
|
|
3576
|
-
TimeoutError: "TimeoutError"
|
|
3577
|
-
};
|
|
3578
|
-
|
|
3579
3596
|
// ../common/src/classified-failure.ts
|
|
3580
3597
|
var MAX_QUOTED_BODY_CHARS = 200;
|
|
3581
3598
|
function summarizePlatformBody(body) {
|
|
@@ -3752,7 +3769,7 @@ async function loadOutputCodecsAsync(needed) {
|
|
|
3752
3769
|
}));
|
|
3753
3770
|
}
|
|
3754
3771
|
if (needed.filter && jmespathSlot.get() === undefined) {
|
|
3755
|
-
loads.push(import("./jmespath-
|
|
3772
|
+
loads.push(import("./jmespath-d7vwhn8r.js").then((m)=>__toESM(m.default,1)).then((mod) => {
|
|
3756
3773
|
jmespathSlot.set(mod);
|
|
3757
3774
|
}));
|
|
3758
3775
|
}
|
|
@@ -3786,7 +3803,10 @@ var AUTH_ERROR_CODES = new Set([
|
|
|
3786
3803
|
var LOCAL_PERMISSION_CLI_ERROR_CODES = new Set([
|
|
3787
3804
|
"local_permission_denied"
|
|
3788
3805
|
]);
|
|
3789
|
-
var VALIDATION_ERROR_CODES = new Set([
|
|
3806
|
+
var VALIDATION_ERROR_CODES = new Set([
|
|
3807
|
+
"invalid_argument",
|
|
3808
|
+
"confirmation_required"
|
|
3809
|
+
]);
|
|
3790
3810
|
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
3791
3811
|
"network_error",
|
|
3792
3812
|
"rate_limited",
|
|
@@ -4012,6 +4032,109 @@ var CommonTelemetryEvents = {
|
|
|
4012
4032
|
ShipSucceeded: "Cli.ShipSucceeded"
|
|
4013
4033
|
};
|
|
4014
4034
|
|
|
4035
|
+
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
4036
|
+
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
4037
|
+
function getGlobalTelemetryProperties() {
|
|
4038
|
+
return telemetryPropsSlot.get();
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
// ../common/src/telemetry/trace-context.ts
|
|
4042
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
4043
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
4044
|
+
function getProcessEnv() {
|
|
4045
|
+
return globalThis.process?.env;
|
|
4046
|
+
}
|
|
4047
|
+
function parseInboundTraceparent(value) {
|
|
4048
|
+
if (!value) {
|
|
4049
|
+
return;
|
|
4050
|
+
}
|
|
4051
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
4052
|
+
if (!match) {
|
|
4053
|
+
return;
|
|
4054
|
+
}
|
|
4055
|
+
const [, traceId, parentSpanId] = match;
|
|
4056
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
4057
|
+
return;
|
|
4058
|
+
}
|
|
4059
|
+
return { traceId, parentSpanId };
|
|
4060
|
+
}
|
|
4061
|
+
function getInboundTraceContext() {
|
|
4062
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
// ../common/src/telemetry/session-id.ts
|
|
4066
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
4067
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
4068
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
4069
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "SessionIdSource";
|
|
4070
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
4071
|
+
var INHERITED_SESSION_SOURCES = [
|
|
4072
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
4073
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
4074
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
4075
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
4076
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
4077
|
+
];
|
|
4078
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
4079
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
4080
|
+
function getProcessEnv2() {
|
|
4081
|
+
return globalThis.process?.env;
|
|
4082
|
+
}
|
|
4083
|
+
function normalizeSessionId(value) {
|
|
4084
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
4085
|
+
return;
|
|
4086
|
+
}
|
|
4087
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
4088
|
+
return cleaned || undefined;
|
|
4089
|
+
}
|
|
4090
|
+
function getConfiguredTelemetrySessionId() {
|
|
4091
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
4092
|
+
}
|
|
4093
|
+
function getInheritedSession(env) {
|
|
4094
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
4095
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
4096
|
+
if (handle) {
|
|
4097
|
+
return { id: handle, source: candidate.source };
|
|
4098
|
+
}
|
|
4099
|
+
}
|
|
4100
|
+
return;
|
|
4101
|
+
}
|
|
4102
|
+
function generateRandomSession() {
|
|
4103
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
4104
|
+
crypto.getRandomValues(bytes);
|
|
4105
|
+
let hex = "";
|
|
4106
|
+
for (const byte of bytes) {
|
|
4107
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
4108
|
+
}
|
|
4109
|
+
return { id: hex, source: "random" };
|
|
4110
|
+
}
|
|
4111
|
+
function resolveTelemetrySession() {
|
|
4112
|
+
const existing = telemetrySessionSlot.get();
|
|
4113
|
+
if (existing) {
|
|
4114
|
+
return existing;
|
|
4115
|
+
}
|
|
4116
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
4117
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
4118
|
+
telemetrySessionSlot.set(resolved);
|
|
4119
|
+
return resolved;
|
|
4120
|
+
}
|
|
4121
|
+
function getTelemetrySessionId() {
|
|
4122
|
+
return resolveTelemetrySession().id;
|
|
4123
|
+
}
|
|
4124
|
+
function getTelemetrySessionSource() {
|
|
4125
|
+
return resolveTelemetrySession().source;
|
|
4126
|
+
}
|
|
4127
|
+
function getTelemetryOperationId() {
|
|
4128
|
+
const existing = telemetryOperationIdSlot.get();
|
|
4129
|
+
if (existing) {
|
|
4130
|
+
return existing;
|
|
4131
|
+
}
|
|
4132
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
4133
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
4134
|
+
telemetryOperationIdSlot.set(generated);
|
|
4135
|
+
return generated;
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4015
4138
|
// ../common/src/registry.ts
|
|
4016
4139
|
import { execFileSync } from "node:child_process";
|
|
4017
4140
|
function readRegistryValue(keyPath, valueName) {
|
|
@@ -4233,108 +4356,6 @@ class NodeContextStorage {
|
|
|
4233
4356
|
return this.storage.getStore();
|
|
4234
4357
|
}
|
|
4235
4358
|
}
|
|
4236
|
-
// ../common/src/telemetry/trace-context.ts
|
|
4237
|
-
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
4238
|
-
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
4239
|
-
function getProcessEnv() {
|
|
4240
|
-
return globalThis.process?.env;
|
|
4241
|
-
}
|
|
4242
|
-
function parseInboundTraceparent(value) {
|
|
4243
|
-
if (!value) {
|
|
4244
|
-
return;
|
|
4245
|
-
}
|
|
4246
|
-
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
4247
|
-
if (!match) {
|
|
4248
|
-
return;
|
|
4249
|
-
}
|
|
4250
|
-
const [, traceId, parentSpanId] = match;
|
|
4251
|
-
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
4252
|
-
return;
|
|
4253
|
-
}
|
|
4254
|
-
return { traceId, parentSpanId };
|
|
4255
|
-
}
|
|
4256
|
-
function getInboundTraceContext() {
|
|
4257
|
-
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
|
-
// ../common/src/telemetry/session-id.ts
|
|
4261
|
-
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
4262
|
-
var SESSION_ID_MAX_LENGTH = 64;
|
|
4263
|
-
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
4264
|
-
var TELEMETRY_SESSION_SOURCE_PROPERTY = "SessionIdSource";
|
|
4265
|
-
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
4266
|
-
var INHERITED_SESSION_SOURCES = [
|
|
4267
|
-
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
4268
|
-
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
4269
|
-
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
4270
|
-
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
4271
|
-
{ envVar: "WT_SESSION", source: "terminal" }
|
|
4272
|
-
];
|
|
4273
|
-
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
4274
|
-
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
4275
|
-
function getProcessEnv2() {
|
|
4276
|
-
return globalThis.process?.env;
|
|
4277
|
-
}
|
|
4278
|
-
function normalizeSessionId(value) {
|
|
4279
|
-
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
4280
|
-
return;
|
|
4281
|
-
}
|
|
4282
|
-
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
4283
|
-
return cleaned || undefined;
|
|
4284
|
-
}
|
|
4285
|
-
function getConfiguredTelemetrySessionId() {
|
|
4286
|
-
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
4287
|
-
}
|
|
4288
|
-
function getInheritedSession(env) {
|
|
4289
|
-
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
4290
|
-
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
4291
|
-
if (handle) {
|
|
4292
|
-
return { id: handle, source: candidate.source };
|
|
4293
|
-
}
|
|
4294
|
-
}
|
|
4295
|
-
return;
|
|
4296
|
-
}
|
|
4297
|
-
function generateRandomSession() {
|
|
4298
|
-
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
4299
|
-
crypto.getRandomValues(bytes);
|
|
4300
|
-
let hex = "";
|
|
4301
|
-
for (const byte of bytes) {
|
|
4302
|
-
hex += byte.toString(16).padStart(2, "0");
|
|
4303
|
-
}
|
|
4304
|
-
return { id: hex, source: "random" };
|
|
4305
|
-
}
|
|
4306
|
-
function resolveTelemetrySession() {
|
|
4307
|
-
const existing = telemetrySessionSlot.get();
|
|
4308
|
-
if (existing) {
|
|
4309
|
-
return existing;
|
|
4310
|
-
}
|
|
4311
|
-
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
4312
|
-
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
4313
|
-
telemetrySessionSlot.set(resolved);
|
|
4314
|
-
return resolved;
|
|
4315
|
-
}
|
|
4316
|
-
function getTelemetrySessionId() {
|
|
4317
|
-
return resolveTelemetrySession().id;
|
|
4318
|
-
}
|
|
4319
|
-
function getTelemetrySessionSource() {
|
|
4320
|
-
return resolveTelemetrySession().source;
|
|
4321
|
-
}
|
|
4322
|
-
function getTelemetryOperationId() {
|
|
4323
|
-
const existing = telemetryOperationIdSlot.get();
|
|
4324
|
-
if (existing) {
|
|
4325
|
-
return existing;
|
|
4326
|
-
}
|
|
4327
|
-
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
4328
|
-
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
4329
|
-
telemetryOperationIdSlot.set(generated);
|
|
4330
|
-
return generated;
|
|
4331
|
-
}
|
|
4332
|
-
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
4333
|
-
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
4334
|
-
function getGlobalTelemetryProperties() {
|
|
4335
|
-
return telemetryPropsSlot.get();
|
|
4336
|
-
}
|
|
4337
|
-
|
|
4338
4359
|
// ../common/src/telemetry/span-clock.ts
|
|
4339
4360
|
function startSpanClock() {
|
|
4340
4361
|
const started = performance.now();
|
|
@@ -4548,6 +4569,7 @@ var MAX_SPOOL_AGE_MS = 72 * 60 * 60 * 1000;
|
|
|
4548
4569
|
// ../common/src/telemetry/telemetry-init.ts
|
|
4549
4570
|
var telemetryInstanceSlot = singleton("TelemetryService");
|
|
4550
4571
|
var DEFAULT_AI_CONNECTION_STRING = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
4572
|
+
var browserProviderSlot = singleton("BrowserAppInsightsTelemetryProvider");
|
|
4551
4573
|
function getGlobalTelemetryInstance() {
|
|
4552
4574
|
const existing = telemetryInstanceSlot.get();
|
|
4553
4575
|
if (existing && typeof existing === "object" && "trackEvent" in existing && typeof existing.trackEvent === "function") {
|
|
@@ -4731,7 +4753,7 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
4731
4753
|
const pagedRows = extractPagedRows(data.Data);
|
|
4732
4754
|
const items = pagedRows ?? (Array.isArray(data.Data) ? data.Data : [data.Data]);
|
|
4733
4755
|
items.forEach((item) => {
|
|
4734
|
-
const values = Object.values(item).map((v) => v ?? "").join("\t");
|
|
4756
|
+
const values = item === null || typeof item !== "object" ? String(item ?? "") : Object.values(item).map((v) => v ?? "").join("\t");
|
|
4735
4757
|
logFn(values);
|
|
4736
4758
|
});
|
|
4737
4759
|
} else {
|
|
@@ -4746,7 +4768,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
4746
4768
|
default: {
|
|
4747
4769
|
const hasData = "Data" in data && data.Data != null;
|
|
4748
4770
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
4749
|
-
const
|
|
4771
|
+
const resolvedRows = pagedRows ? pagedRows : Array.isArray(data.Data) ? data.Data : null;
|
|
4772
|
+
const rows = resolvedRows && isPrimitiveArray(resolvedRows) ? resolvedRows.map((entry) => ({ Value: entry })) : resolvedRows;
|
|
4750
4773
|
if (hasData && !(rows !== null && rows.length === 0)) {
|
|
4751
4774
|
const logValue = data.Log;
|
|
4752
4775
|
if (rows !== null) {
|
|
@@ -4803,6 +4826,9 @@ function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
|
4803
4826
|
function isPlainObjectArray(value) {
|
|
4804
4827
|
return Array.isArray(value) && value.length > 0 && value.every(isPlainRecord);
|
|
4805
4828
|
}
|
|
4829
|
+
function isPrimitiveArray(value) {
|
|
4830
|
+
return Array.isArray(value) && value.length > 0 && value.every((entry) => entry === null || typeof entry !== "object");
|
|
4831
|
+
}
|
|
4806
4832
|
function isNonEmptyPlainObject(value) {
|
|
4807
4833
|
return isPlainRecord(value) && Object.keys(value).length > 0;
|
|
4808
4834
|
}
|
|
@@ -5149,12 +5175,12 @@ class FilterEvaluationError extends Error {
|
|
|
5149
5175
|
instructions;
|
|
5150
5176
|
retry = "RetryWillNotFix";
|
|
5151
5177
|
result = RESULTS.ValidationError;
|
|
5152
|
-
constructor(filter, cause) {
|
|
5178
|
+
constructor(filter, cause, hint) {
|
|
5153
5179
|
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
5154
|
-
super(`Filter '${filter}' failed to evaluate: ${underlying}`);
|
|
5180
|
+
super(`Filter '${filter}' failed to evaluate: ${underlying}` + (hint ? ` ${hint.detail}` : ""));
|
|
5155
5181
|
this.name = "FilterEvaluationError";
|
|
5156
5182
|
this.filter = filter;
|
|
5157
|
-
this.instructions = `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
5183
|
+
this.instructions = (hint ? `${hint.instructions} ` : "") + `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
5158
5184
|
}
|
|
5159
5185
|
}
|
|
5160
5186
|
|
|
@@ -5276,6 +5302,93 @@ function nameList(names, cap = 12) {
|
|
|
5276
5302
|
const rest = names.length - shown.length;
|
|
5277
5303
|
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
5278
5304
|
}
|
|
5305
|
+
function notFieldsOn(names, scope) {
|
|
5306
|
+
return `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
5307
|
+
}
|
|
5308
|
+
function failingFieldRead(ast, isList, fn, argIndex) {
|
|
5309
|
+
const [left, right, condition] = ast.children ?? [];
|
|
5310
|
+
let scopes = [];
|
|
5311
|
+
if (!isList) {
|
|
5312
|
+
scopes = [ast];
|
|
5313
|
+
} else if (ast.type === "FilterProjection" && left?.type === "Identity") {
|
|
5314
|
+
scopes = [condition, right];
|
|
5315
|
+
} else if (ast.type === "Projection" && (left?.type === "Identity" || left?.type === "Flatten" && left.children?.[0]?.type === "Identity")) {
|
|
5316
|
+
scopes = [right];
|
|
5317
|
+
}
|
|
5318
|
+
const reads = new Set;
|
|
5319
|
+
let tracked = 0;
|
|
5320
|
+
const visit = (node) => {
|
|
5321
|
+
if (!node)
|
|
5322
|
+
return;
|
|
5323
|
+
switch (node.type) {
|
|
5324
|
+
case "Function": {
|
|
5325
|
+
const arg = node.children?.[argIndex - 1];
|
|
5326
|
+
if (node.name === fn && arg?.type === "Field" && arg.name) {
|
|
5327
|
+
reads.add(arg.name);
|
|
5328
|
+
tracked++;
|
|
5329
|
+
}
|
|
5330
|
+
node.children?.forEach(visit);
|
|
5331
|
+
return;
|
|
5332
|
+
}
|
|
5333
|
+
case "AndExpression":
|
|
5334
|
+
case "OrExpression":
|
|
5335
|
+
case "NotExpression":
|
|
5336
|
+
case "Comparator":
|
|
5337
|
+
case "MultiSelectList":
|
|
5338
|
+
case "MultiSelectHash":
|
|
5339
|
+
node.children?.forEach(visit);
|
|
5340
|
+
return;
|
|
5341
|
+
case "KeyValuePair":
|
|
5342
|
+
visit(node.value);
|
|
5343
|
+
return;
|
|
5344
|
+
}
|
|
5345
|
+
};
|
|
5346
|
+
scopes.forEach(visit);
|
|
5347
|
+
const calls = (node) => {
|
|
5348
|
+
if (node === null || typeof node !== "object")
|
|
5349
|
+
return 0;
|
|
5350
|
+
const own = node.type === "Function" && node.name === fn ? 1 : 0;
|
|
5351
|
+
const next = node.type === "KeyValuePair" ? [node.value] : node.children ?? [];
|
|
5352
|
+
return own + next.reduce((sum, child) => sum + calls(child), 0);
|
|
5353
|
+
};
|
|
5354
|
+
return reads.size === 1 && tracked === calls(ast) ? [...reads][0] : undefined;
|
|
5355
|
+
}
|
|
5356
|
+
function fieldExpression(name) {
|
|
5357
|
+
return /^[A-Za-z_]\w*$/.test(name) ? name : JSON.stringify(name);
|
|
5358
|
+
}
|
|
5359
|
+
function evaluationHint(codec, filter, data, cause) {
|
|
5360
|
+
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
5361
|
+
const failure = /\b(\w+)\(\) expected argument (\d+) to be type (\S+) but received type null\b/.exec(underlying);
|
|
5362
|
+
if (!failure)
|
|
5363
|
+
return;
|
|
5364
|
+
const [, fn, position, expected] = failure;
|
|
5365
|
+
const name = failingFieldRead(codec.compile(filter), Array.isArray(data), fn, Number(position));
|
|
5366
|
+
if (name === undefined)
|
|
5367
|
+
return;
|
|
5368
|
+
const present = availableFields(data);
|
|
5369
|
+
if (present.length === 0)
|
|
5370
|
+
return;
|
|
5371
|
+
const scope = `${countRecords(data)} record(s)`;
|
|
5372
|
+
if (!present.includes(name)) {
|
|
5373
|
+
return {
|
|
5374
|
+
detail: `${notFieldsOn([name], scope)}. Available fields: ${nameList(present)}.`,
|
|
5375
|
+
instructions: "Use a field the records have; names are case-sensitive."
|
|
5376
|
+
};
|
|
5377
|
+
}
|
|
5378
|
+
const records = Array.isArray(data) ? data : [data];
|
|
5379
|
+
const unset = records.filter((r) => r?.[name] == null).length;
|
|
5380
|
+
const field = fieldExpression(name);
|
|
5381
|
+
let fallback;
|
|
5382
|
+
if (expected.split(",").includes("string")) {
|
|
5383
|
+
fallback = "''";
|
|
5384
|
+
} else if (expected.split(",").includes("array")) {
|
|
5385
|
+
fallback = "`[]`";
|
|
5386
|
+
}
|
|
5387
|
+
return {
|
|
5388
|
+
detail: `\`${name}\` is null or missing on ${unset} of the ${scope} it read.`,
|
|
5389
|
+
instructions: fallback ? `Give it a default where ${fn}() reads it, e.g. \`${field} || ${fallback}\`.` : `Filter out the records where \`${name}\` is null before ${fn}() reads it.`
|
|
5390
|
+
};
|
|
5391
|
+
}
|
|
5279
5392
|
function buildFilterWarning(filter, data, outcome) {
|
|
5280
5393
|
const present = availableFields(data);
|
|
5281
5394
|
const refs = referencedFields(filter);
|
|
@@ -5283,7 +5396,7 @@ function buildFilterWarning(filter, data, outcome) {
|
|
|
5283
5396
|
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
5284
5397
|
const count = countRecords(data);
|
|
5285
5398
|
const scope = `${count} record(s)`;
|
|
5286
|
-
const isNotAField = (names) =>
|
|
5399
|
+
const isNotAField = (names) => notFieldsOn(names, scope);
|
|
5287
5400
|
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
5288
5401
|
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
5289
5402
|
let detail;
|
|
@@ -5334,7 +5447,8 @@ function applyFilter(data, filter, onWarning) {
|
|
|
5334
5447
|
try {
|
|
5335
5448
|
result = codec.search(data, filter);
|
|
5336
5449
|
} catch (err) {
|
|
5337
|
-
|
|
5450
|
+
const [, hint] = catchError(() => evaluationHint(codec, filter, data, err));
|
|
5451
|
+
throw new FilterEvaluationError(filter, err, hint);
|
|
5338
5452
|
}
|
|
5339
5453
|
const inputCount = countRecords(data);
|
|
5340
5454
|
const warn = (outcome) => {
|
|
@@ -6217,7 +6331,7 @@ Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
|
6217
6331
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
6218
6332
|
const typed = error;
|
|
6219
6333
|
const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
|
|
6220
|
-
const customResult =
|
|
6334
|
+
const customResult = carriedResult(error);
|
|
6221
6335
|
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
6222
6336
|
const classified = cancellationExitCode === undefined ? await extractErrorDetails(error) : undefined;
|
|
6223
6337
|
const finalResult = customResult ?? classified?.result ?? RESULTS.Failure;
|
|
@@ -6584,6 +6698,8 @@ var FAILURE_STATUSES = new Set([
|
|
|
6584
6698
|
"canceled",
|
|
6585
6699
|
"stopped"
|
|
6586
6700
|
]);
|
|
6701
|
+
// ../common/src/relayed-output.ts
|
|
6702
|
+
var RELAYED_OUTPUT_SYMBOL = Symbol.for("@uipath/common/relayed-output");
|
|
6587
6703
|
// ../common/src/screen-logger.ts
|
|
6588
6704
|
var ScreenLogger;
|
|
6589
6705
|
((ScreenLogger) => {
|
|
@@ -6684,6 +6800,6 @@ function unsupportedSolutionProjectType(projectType) {
|
|
|
6684
6800
|
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
6685
6801
|
// ../common/src/tool-provider.ts
|
|
6686
6802
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
6687
|
-
export { ProjectDimensions, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, solutionIdentityProperties, projectKey, catchError, httpStatusOf, extractErrorMessage, redactTokens, parseAuthChallenge,
|
|
6803
|
+
export { ProjectDimensions, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, solutionIdentityProperties, projectKey, catchError, RESULTS, httpStatusOf, extractErrorMessage, redactTokens, parseAuthChallenge, summarizePlatformBody, logger, isGuid, quoteForShell, unsupportedSolutionProjectType };
|
|
6688
6804
|
|
|
6689
|
-
//# debugId=
|
|
6805
|
+
//# debugId=DC33A3606413EFC164756E2164756E21
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/resources/services/resource-name.ts
|
|
2
|
+
var MAX_RESOURCE_NAME_LENGTH2 = 256;
|
|
3
|
+
var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
|
|
4
|
+
function hasControlChar(value) {
|
|
5
|
+
for (let i = 0;i < value.length; i++) {
|
|
6
|
+
if (value.charCodeAt(i) < 32)
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
function hasUnsafeNameChars2(name) {
|
|
12
|
+
return UNSAFE_NAME_CHARS.test(name) || hasControlChar(name);
|
|
13
|
+
}
|
|
14
|
+
function validateResourceName2(name, options = {}) {
|
|
15
|
+
const optionName = options.optionName ?? "--name";
|
|
16
|
+
if (name.trim() === "") {
|
|
17
|
+
return {
|
|
18
|
+
ok: false,
|
|
19
|
+
message: `${optionName} must not be blank`,
|
|
20
|
+
instructions: "Pass a non-empty resource name."
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (name.length > MAX_RESOURCE_NAME_LENGTH2) {
|
|
24
|
+
return {
|
|
25
|
+
ok: false,
|
|
26
|
+
message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH2}-character limit (got ${name.length})`,
|
|
27
|
+
instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
if (hasUnsafeNameChars2(name)) {
|
|
31
|
+
return {
|
|
32
|
+
ok: false,
|
|
33
|
+
message: `${optionName} contains unsafe characters`,
|
|
34
|
+
instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return { ok: true };
|
|
38
|
+
}
|
|
39
|
+
function assertValidResourceName2(name, options = {}) {
|
|
40
|
+
const result = validateResourceName2(name, options);
|
|
41
|
+
if (!result.ok) {
|
|
42
|
+
throw new Error(`${result.message}. ${result.instructions}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { MAX_RESOURCE_NAME_LENGTH2, hasUnsafeNameChars2, validateResourceName2, assertValidResourceName2 };
|
|
47
|
+
|
|
48
|
+
//# debugId=A8C4605ECB68DF1D64756E2164756E21
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthContext
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-mgaz5jpa.js";
|
|
4
4
|
|
|
5
5
|
// src/solution-auth.ts
|
|
6
6
|
async function getSolutionAuthContext2(options) {
|
|
@@ -16,6 +16,8 @@ async function getSolutionAuthContext2(options) {
|
|
|
16
16
|
return {
|
|
17
17
|
accessToken: ctx.accessToken,
|
|
18
18
|
basePath,
|
|
19
|
+
baseUrl: ctx.baseUrl,
|
|
20
|
+
organizationName: ctx.organizationName,
|
|
19
21
|
organizationId,
|
|
20
22
|
tenantName,
|
|
21
23
|
identity: ctx.identity
|
|
@@ -24,4 +26,4 @@ async function getSolutionAuthContext2(options) {
|
|
|
24
26
|
|
|
25
27
|
export { getSolutionAuthContext2 };
|
|
26
28
|
|
|
27
|
-
//# debugId=
|
|
29
|
+
//# debugId=B1DB15643BD4930364756E2164756E21
|