@uipath/test-manager-tool 1.204.0 → 1.205.0-preview.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -13
- package/dist/THIRD-PARTY-NOTICES.md +32 -1
- package/dist/attachment.input-jpcea4mp.js +36 -0
- package/dist/index-ah3hzwzh.js +3173 -0
- package/dist/index-sa6fzfmt.js +2808 -0
- package/dist/index.js +10 -3
- package/dist/migration-import-run-g9g9c5x3.js +849 -0
- package/dist/tool-2a68c3s5.js +62 -0
- package/dist/tool-7hy7vvfk.js +22083 -0
- package/dist/tool-8b7p4csj.js +296 -0
- package/dist/tool-cpdm080k.js +18358 -0
- package/dist/tool-dmhckpj3.js +32699 -0
- package/dist/tool-e3prtphw.js +8376 -0
- package/dist/tool-fxj3gn2v.js +1676 -0
- package/dist/tool.js +8 -2
- package/package.json +2 -2
- package/dist/tool-2wbsjmen.js +0 -40698
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
// ../common/src/singleton.ts
|
|
2
|
+
var PREFIX = "@uipath/common/";
|
|
3
|
+
var _g = globalThis;
|
|
4
|
+
function singleton(ctorOrName) {
|
|
5
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
6
|
+
const key = Symbol.for(PREFIX + name);
|
|
7
|
+
return {
|
|
8
|
+
get(fallback) {
|
|
9
|
+
return _g[key] ?? fallback;
|
|
10
|
+
},
|
|
11
|
+
set(value) {
|
|
12
|
+
_g[key] = value;
|
|
13
|
+
},
|
|
14
|
+
clear() {
|
|
15
|
+
delete _g[key];
|
|
16
|
+
},
|
|
17
|
+
getOrInit(factory, guard) {
|
|
18
|
+
const existing = _g[key];
|
|
19
|
+
if (existing != null && typeof existing === "object") {
|
|
20
|
+
if (!guard || guard(existing)) {
|
|
21
|
+
return existing;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const instance = factory();
|
|
25
|
+
_g[key] = instance;
|
|
26
|
+
return instance;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// ../common/src/telemetry/telemetry-dimensions.ts
|
|
32
|
+
var BaseDimensions = {
|
|
33
|
+
ApplicationName: "ApplicationName",
|
|
34
|
+
ProductVersion: "ProductVersion",
|
|
35
|
+
InstallationId: "InstallationId",
|
|
36
|
+
CloudUserId: "CloudUserId",
|
|
37
|
+
CloudTenantId: "CloudTenantId",
|
|
38
|
+
CloudOrganizationId: "CloudOrganizationId",
|
|
39
|
+
IsInternalUser: "IsInternalUser",
|
|
40
|
+
Environment: "Environment",
|
|
41
|
+
BaseUrl: "BaseUrl",
|
|
42
|
+
Region: "Region",
|
|
43
|
+
Agent: "Agent",
|
|
44
|
+
AgentVersion: "AgentVersion",
|
|
45
|
+
AgentModel: "AgentModel",
|
|
46
|
+
ToolName: "ToolName",
|
|
47
|
+
ToolVersion: "ToolVersion",
|
|
48
|
+
ExecutionContext: "ExecutionContext",
|
|
49
|
+
CiProvider: "CiProvider",
|
|
50
|
+
SessionIdSource: "SessionIdSource",
|
|
51
|
+
SessionId: "SessionId"
|
|
52
|
+
};
|
|
53
|
+
var CommandDimensions = {
|
|
54
|
+
IsCommand: "IsCommand",
|
|
55
|
+
IsReexec: "IsReexec",
|
|
56
|
+
CommandName: "CommandName",
|
|
57
|
+
ExitCode: "ExitCode",
|
|
58
|
+
TerminalOutcome: "TerminalOutcome",
|
|
59
|
+
ErrorClass: "ErrorClass",
|
|
60
|
+
TerminalSignal: "TerminalSignal",
|
|
61
|
+
ErrorMessage: "ErrorMessage",
|
|
62
|
+
SkillName: "SkillName",
|
|
63
|
+
ProductArea: "ProductArea",
|
|
64
|
+
Mode: "Mode"
|
|
65
|
+
};
|
|
66
|
+
var ShipDimensions = {
|
|
67
|
+
ShipKind: "ShipKind",
|
|
68
|
+
Target: "Target",
|
|
69
|
+
ProjectType: "ProjectType",
|
|
70
|
+
ProjectTypes: "ProjectTypes",
|
|
71
|
+
ArtifactCorrelationKey: "ArtifactCorrelationKey",
|
|
72
|
+
PackageName: "PackageName",
|
|
73
|
+
PackageVersion: "PackageVersion",
|
|
74
|
+
PackageVersionKey: "PackageVersionKey",
|
|
75
|
+
DeploymentKey: "DeploymentKey",
|
|
76
|
+
SolutionId: "SolutionId",
|
|
77
|
+
FolderKey: "FolderKey",
|
|
78
|
+
FeedId: "FeedId"
|
|
79
|
+
};
|
|
80
|
+
var ErrorDimensions = {
|
|
81
|
+
Result: "Result",
|
|
82
|
+
ErrorCode: "ErrorCode",
|
|
83
|
+
Retry: "Retry",
|
|
84
|
+
ErrorMessage: "ErrorMessage",
|
|
85
|
+
HttpStatus: "HttpStatus",
|
|
86
|
+
UpstreamErrorCode: "UpstreamErrorCode"
|
|
87
|
+
};
|
|
88
|
+
var AuthDimensions = {
|
|
89
|
+
AuthenticationMethod: "AuthenticationMethod",
|
|
90
|
+
Success: "Success",
|
|
91
|
+
Reason: "Reason"
|
|
92
|
+
};
|
|
93
|
+
var SkillsDimensions = {
|
|
94
|
+
SchemaVersion: "SchemaVersion",
|
|
95
|
+
AgentType: "AgentType",
|
|
96
|
+
SkillsVersion: "SkillsVersion",
|
|
97
|
+
UipSubcommand: "UipSubcommand",
|
|
98
|
+
FileExtension: "FileExtension",
|
|
99
|
+
SubagentModel: "SubagentModel",
|
|
100
|
+
SubagentType: "SubagentType",
|
|
101
|
+
PermissionMode: "PermissionMode",
|
|
102
|
+
EffortLevel: "EffortLevel",
|
|
103
|
+
SessionSource: "SessionSource",
|
|
104
|
+
Outcome: "Outcome",
|
|
105
|
+
DurationMs: "DurationMs",
|
|
106
|
+
Source: "Source"
|
|
107
|
+
};
|
|
108
|
+
var PackagerDimensions = {
|
|
109
|
+
ProjectId: "ProjectId",
|
|
110
|
+
ProjectType: "ProjectType",
|
|
111
|
+
SolutionId: "SolutionId"
|
|
112
|
+
};
|
|
113
|
+
var ScopeDimensions = {
|
|
114
|
+
FolderId: "FolderId"
|
|
115
|
+
};
|
|
116
|
+
var ID_DIMENSIONS = new Set([
|
|
117
|
+
BaseDimensions.CloudUserId,
|
|
118
|
+
BaseDimensions.CloudTenantId,
|
|
119
|
+
BaseDimensions.CloudOrganizationId,
|
|
120
|
+
BaseDimensions.InstallationId,
|
|
121
|
+
ShipDimensions.ArtifactCorrelationKey,
|
|
122
|
+
ShipDimensions.PackageVersionKey,
|
|
123
|
+
ShipDimensions.DeploymentKey,
|
|
124
|
+
ShipDimensions.SolutionId,
|
|
125
|
+
ShipDimensions.FolderKey,
|
|
126
|
+
ShipDimensions.FeedId,
|
|
127
|
+
PackagerDimensions.ProjectId
|
|
128
|
+
]);
|
|
129
|
+
var NON_IDENTIFIER_PLACEHOLDER_PATTERN = /^(?:\[[A-Z_]+\]|<[^>]+>)$/;
|
|
130
|
+
var RESERVED_DIMENSION_NAMES = new Set([
|
|
131
|
+
...Object.values(BaseDimensions),
|
|
132
|
+
...Object.values(CommandDimensions),
|
|
133
|
+
...Object.values(ShipDimensions),
|
|
134
|
+
...Object.values(ErrorDimensions),
|
|
135
|
+
...Object.values(AuthDimensions),
|
|
136
|
+
...Object.values(SkillsDimensions),
|
|
137
|
+
...Object.values(PackagerDimensions),
|
|
138
|
+
...Object.values(ScopeDimensions)
|
|
139
|
+
]);
|
|
140
|
+
var CURATED_DIMENSIONS = new Set([
|
|
141
|
+
BaseDimensions.ApplicationName,
|
|
142
|
+
BaseDimensions.ProductVersion,
|
|
143
|
+
BaseDimensions.InstallationId,
|
|
144
|
+
BaseDimensions.CloudUserId,
|
|
145
|
+
BaseDimensions.CloudTenantId,
|
|
146
|
+
BaseDimensions.CloudOrganizationId,
|
|
147
|
+
BaseDimensions.IsInternalUser,
|
|
148
|
+
BaseDimensions.Environment,
|
|
149
|
+
BaseDimensions.BaseUrl,
|
|
150
|
+
BaseDimensions.Region,
|
|
151
|
+
BaseDimensions.Agent,
|
|
152
|
+
BaseDimensions.AgentVersion,
|
|
153
|
+
BaseDimensions.ToolVersion,
|
|
154
|
+
BaseDimensions.ExecutionContext,
|
|
155
|
+
BaseDimensions.CiProvider,
|
|
156
|
+
BaseDimensions.SessionIdSource,
|
|
157
|
+
BaseDimensions.SessionId,
|
|
158
|
+
...Object.values(CommandDimensions),
|
|
159
|
+
...Object.values(ShipDimensions)
|
|
160
|
+
]);
|
|
161
|
+
function lowercaseIdDimensionValues(properties) {
|
|
162
|
+
let changed = false;
|
|
163
|
+
const result = {
|
|
164
|
+
...properties
|
|
165
|
+
};
|
|
166
|
+
for (const key of Object.keys(result)) {
|
|
167
|
+
const value = result[key];
|
|
168
|
+
if (!ID_DIMENSIONS.has(key) || typeof value !== "string" || NON_IDENTIFIER_PLACEHOLDER_PATTERN.test(value)) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const lowered = value.toLowerCase();
|
|
172
|
+
if (lowered !== value) {
|
|
173
|
+
result[key] = lowered;
|
|
174
|
+
changed = true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return changed ? result : properties;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
181
|
+
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
182
|
+
function getGlobalTelemetryProperties() {
|
|
183
|
+
return telemetryPropsSlot.get();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ../common/src/telemetry/telemetry-config.ts
|
|
187
|
+
function isTelemetryDisabled() {
|
|
188
|
+
const value = process.env.UIPATH_TELEMETRY_DISABLED;
|
|
189
|
+
return value === "1" || value === "true";
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ../common/src/sdk-user-agent.ts
|
|
193
|
+
var USER_AGENT_HEADER = "User-Agent";
|
|
194
|
+
var CODING_AGENT_HEADER = "x-coding-agent-info";
|
|
195
|
+
var AGENT_PROPERTY = BaseDimensions.Agent;
|
|
196
|
+
var CODING_AGENT_PROPERTY = "CodingAgent";
|
|
197
|
+
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
198
|
+
function userAgentPatchKey(userAgent) {
|
|
199
|
+
return Symbol.for(`@uipath/common/sdk-user-agent/${userAgent}`);
|
|
200
|
+
}
|
|
201
|
+
function codingAgentPatchKey() {
|
|
202
|
+
return Symbol.for("@uipath/common/sdk-coding-agent");
|
|
203
|
+
}
|
|
204
|
+
function splitUserAgentTokens(value) {
|
|
205
|
+
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
206
|
+
}
|
|
207
|
+
function appendUserAgentToken(value, userAgent) {
|
|
208
|
+
const tokens = splitUserAgentTokens(value);
|
|
209
|
+
const seen = new Set(tokens);
|
|
210
|
+
for (const token of splitUserAgentTokens(userAgent)) {
|
|
211
|
+
if (!seen.has(token)) {
|
|
212
|
+
tokens.push(token);
|
|
213
|
+
seen.add(token);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return tokens.join(" ");
|
|
217
|
+
}
|
|
218
|
+
function getEffectiveUserAgent(userAgent) {
|
|
219
|
+
return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
|
|
220
|
+
}
|
|
221
|
+
function getHeaderName(headers, headerName) {
|
|
222
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
223
|
+
}
|
|
224
|
+
function getSdkAgentInfo() {
|
|
225
|
+
if (isTelemetryDisabled()) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const agent = getGlobalTelemetryProperties()?.[AGENT_PROPERTY];
|
|
229
|
+
return agent === undefined ? undefined : String(agent);
|
|
230
|
+
}
|
|
231
|
+
function getSdkUserAgentToken(pkg) {
|
|
232
|
+
const packageName = pkg.name.replace(/^@uipath\//, "");
|
|
233
|
+
return getEffectiveUserAgent(`${packageName}/${pkg.version}`);
|
|
234
|
+
}
|
|
235
|
+
function addSdkUserAgentHeader(headers, userAgent) {
|
|
236
|
+
const result = { ...headers ?? {} };
|
|
237
|
+
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
238
|
+
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
239
|
+
return result;
|
|
240
|
+
}
|
|
241
|
+
function addSdkCodingAgentHeader(headers, agent = getSdkAgentInfo()) {
|
|
242
|
+
const result = { ...headers ?? {} };
|
|
243
|
+
if (agent === undefined) {
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
const headerName = getHeaderName(result, CODING_AGENT_HEADER);
|
|
247
|
+
result[headerName ?? CODING_AGENT_HEADER] = JSON.stringify({
|
|
248
|
+
[CODING_AGENT_PROPERTY]: agent
|
|
249
|
+
});
|
|
250
|
+
return result;
|
|
251
|
+
}
|
|
252
|
+
function asHeaderRecord(headers) {
|
|
253
|
+
return typeof headers === "object" && headers !== null ? { ...headers } : {};
|
|
254
|
+
}
|
|
255
|
+
function withForwardedHeadersInitOverride(initOverrides, forward) {
|
|
256
|
+
return async (requestContext) => {
|
|
257
|
+
const initWithHeaders = {
|
|
258
|
+
...requestContext.init,
|
|
259
|
+
headers: forward(asHeaderRecord(requestContext.init.headers))
|
|
260
|
+
};
|
|
261
|
+
const override = typeof initOverrides === "function" ? await initOverrides({
|
|
262
|
+
...requestContext,
|
|
263
|
+
init: initWithHeaders
|
|
264
|
+
}) : initOverrides;
|
|
265
|
+
return {
|
|
266
|
+
...override ?? {},
|
|
267
|
+
headers: forward(asHeaderRecord(override?.headers ?? initWithHeaders.headers))
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
|
|
272
|
+
const prototype = BaseApiClass.prototype;
|
|
273
|
+
if (prototype[patchKey]) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (typeof prototype.request !== "function") {
|
|
277
|
+
throw new Error("Generated BaseAPI request function not found.");
|
|
278
|
+
}
|
|
279
|
+
const originalRequest = prototype.request;
|
|
280
|
+
prototype.request = function requestWithForwardedHeaders(context, initOverrides) {
|
|
281
|
+
return originalRequest.call(this, context, withForwardedHeadersInitOverride(initOverrides, forward));
|
|
282
|
+
};
|
|
283
|
+
Object.defineProperty(prototype, patchKey, {
|
|
284
|
+
value: true
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
288
|
+
installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
|
|
289
|
+
}
|
|
290
|
+
function installSdkCodingAgentHeader(BaseApiClass) {
|
|
291
|
+
installRequestHeaderForwarding(BaseApiClass, codingAgentPatchKey(), (headers) => addSdkCodingAgentHeader(headers));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export { singleton, BaseDimensions, CommandDimensions, ErrorDimensions, SkillsDimensions, lowercaseIdDimensionValues, getGlobalTelemetryProperties, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, installSdkCodingAgentHeader };
|
|
295
|
+
|
|
296
|
+
//# debugId=5705087D3E87E4F964756E2164756E21
|