@uipath/test-manager-tool 1.206.0-preview.306 → 1.207.0-preview.307
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 +52 -389
- package/dist/{attachment.input-77h243bm.js → attachment.input-e3t82ag2.js} +3 -3
- package/dist/{index-zy5jpz1m.js → index-9m2pakfb.js} +2 -2
- package/dist/index-cwvh8262.js +6 -0
- package/dist/{index-8tsnwy9w.js → index-q9vmbp0w.js} +3 -3
- package/dist/index.js +11 -8
- package/dist/local-test-package-6ce2nqvj.js +228 -0
- package/dist/{migration-import-run-eazzhh0h.js → migration-import-run-29hzw92p.js} +17 -421
- package/dist/node-jh0df6sp.js +5622 -0
- package/dist/{tool-967s3mts.js → tool-246df0cd.js} +142 -12
- package/dist/{tool-0650qfw3.js → tool-4xdq18pz.js} +389 -163
- package/dist/tool-b24ehgnz.js +9087 -0
- package/dist/tool-begvxz7a.js +1291 -0
- package/dist/tool-bvkzq6jr.js +401 -0
- package/dist/{tool-6mpkbszw.js → tool-f4ytsjzn.js} +6 -4
- package/dist/{tool-1nkyed5m.js → tool-hm0kg56c.js} +3 -3
- package/dist/tool-mphfxa9g.js +915 -0
- package/dist/{tool-584bn9db.js → tool-w2tgc8pr.js} +70 -427
- package/dist/{tool-2x5ssmh2.js → tool-we9qwvqr.js} +684 -10831
- package/dist/{tool-vgc9gpy6.js → tool-y8kmsg4w.js} +1 -1
- package/dist/tool.js +11 -8
- package/package.json +2 -2
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RESULTS,
|
|
3
|
+
isCliErrorCode,
|
|
4
|
+
isRetryHint,
|
|
5
|
+
isHtmlDocument,
|
|
6
|
+
extractErrorDetails2,
|
|
7
|
+
InvalidArgumentError,
|
|
8
|
+
logger,
|
|
9
|
+
OutputFormatter,
|
|
10
|
+
processContext,
|
|
11
|
+
resolveDeprecatedOptionAlias,
|
|
12
|
+
warnDeprecatedOptionAlias
|
|
13
|
+
} from "./tool-4xdq18pz.js";
|
|
14
|
+
|
|
15
|
+
// src/utils/shared.ts
|
|
16
|
+
var ENCODING_MARKERS = [
|
|
17
|
+
"\uFEFF",
|
|
18
|
+
"",
|
|
19
|
+
"+/v8",
|
|
20
|
+
"+/v9",
|
|
21
|
+
"+/v+",
|
|
22
|
+
"+/v/"
|
|
23
|
+
];
|
|
24
|
+
function stripEncodingMarkers(content) {
|
|
25
|
+
for (const marker of ENCODING_MARKERS) {
|
|
26
|
+
if (content.startsWith(marker)) {
|
|
27
|
+
return content.slice(marker.length);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return content;
|
|
31
|
+
}
|
|
32
|
+
var ROBOT_LOG_LEVELS = [
|
|
33
|
+
"Trace",
|
|
34
|
+
"Info",
|
|
35
|
+
"Warn",
|
|
36
|
+
"Error",
|
|
37
|
+
"Fatal"
|
|
38
|
+
];
|
|
39
|
+
var TERMINAL_STATUSES = new Set(["finished", "cancelled"]);
|
|
40
|
+
function msToDuration(ms) {
|
|
41
|
+
const totalSec = Math.floor(ms / 1000);
|
|
42
|
+
const h = Math.floor(totalSec / 3600);
|
|
43
|
+
const m = Math.floor(totalSec % 3600 / 60);
|
|
44
|
+
const s = totalSec % 60;
|
|
45
|
+
return [h, m, s].map((v) => String(v).padStart(2, "0")).join(":");
|
|
46
|
+
}
|
|
47
|
+
function calcPassRate(passed, failed) {
|
|
48
|
+
const executed = passed + failed;
|
|
49
|
+
return executed > 0 ? Math.round(passed / executed * 1000) / 10 : 0;
|
|
50
|
+
}
|
|
51
|
+
var DEFAULT_TEST_CASE_VERSION = "1.0.0";
|
|
52
|
+
var PROJECT_CONFIG_FORBIDDEN_MESSAGE = "Forbidden (403). Exporting project configuration is a Test Cloud only feature, and this tenant is not a Test Cloud tenant. This is a licence limit, not a permissions problem.";
|
|
53
|
+
var SCHEMA_FORBIDDEN_MESSAGE = "Forbidden (403). Reading migration schemas needs the TM.Users or TM.Users.Read scope, which the other migration commands do not. Check the scopes on the token or external app you logged in with.";
|
|
54
|
+
var PROJECT_CONFIG_IMPORT_FORBIDDEN_MESSAGE = "Forbidden (403). Importing project configuration is a Test Cloud only feature, and this tenant is not a Test Cloud tenant. This is a licence limit, not a permissions problem.";
|
|
55
|
+
var TM_FORBIDDEN_MESSAGE = "Forbidden (403). The account lacks the Test Manager permission for this operation, or the token carries no Test Manager (TM.*) scope. Run `uip login status --detailed` to see the token's scopes; an external application needs the TM scopes granted on the app itself.";
|
|
56
|
+
var TM_LICENSED_USER_FORBIDDEN_MESSAGE = "Forbidden (403). This operation requires a Test Manager license. Contact your tenant admin to assign a license, or use a read-only command.";
|
|
57
|
+
var TM_TEST_CLOUD_FORBIDDEN_MESSAGE = "Forbidden (403). Group-by needs a Test Cloud licence for this account and the StructuredViewsGroupBy feature on the tenant, and the token must carry the TM.TestCases scope. On a tenant not yet on the current Test Manager build, an external application (client-credentials) token cannot call group-by at all; use a user login (`uip login`). Run `uip login status --detailed` to see the token's scopes, or ask your tenant admin about the licence.";
|
|
58
|
+
var TM_NOT_AVAILABLE_MESSAGE = "Test Manager is not enabled for this tenant.";
|
|
59
|
+
var TM_NOT_AVAILABLE_INSTRUCTIONS = "Enable Test Manager for this tenant, or rerun the command against a tenant where Test Manager is already provisioned.";
|
|
60
|
+
var TAGGED_UPLOAD_NOT_SUPPORTED_INSTRUCTIONS = "Test Manager refused the tagged upload with featureDisabled: --source and --attachment-type go to the tagged-upload endpoint, which needs a Test Manager feature the connected environment does not turn on. Drop --source and --attachment-type to attach the file untagged, or run the command against an environment where tagged uploads are turned on.";
|
|
61
|
+
function makeEnumParser(map) {
|
|
62
|
+
const allowed = Object.keys(map).join(", ");
|
|
63
|
+
return (raw) => {
|
|
64
|
+
if (!Object.hasOwn(map, raw)) {
|
|
65
|
+
throw new InvalidArgumentError(`Invalid value "${raw}". Must be one of: ${allowed}.`);
|
|
66
|
+
}
|
|
67
|
+
return map[raw];
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
var CUSTOMFIELD_OBJECT_TYPE_MAP = {
|
|
71
|
+
Requirement: "requirement",
|
|
72
|
+
TestCase: "testCase",
|
|
73
|
+
TestSet: "testSet"
|
|
74
|
+
};
|
|
75
|
+
var parseCustomFieldObjectType = makeEnumParser(CUSTOMFIELD_OBJECT_TYPE_MAP);
|
|
76
|
+
var CUSTOMFIELD_DATA_TYPE_MAP = {
|
|
77
|
+
Text: "text",
|
|
78
|
+
Label: "label"
|
|
79
|
+
};
|
|
80
|
+
var parseCustomFieldDataType = makeEnumParser(CUSTOMFIELD_DATA_TYPE_MAP);
|
|
81
|
+
function validateIdentity(spec) {
|
|
82
|
+
if (spec.naturalKey.length === 0) {
|
|
83
|
+
throw new Error("validateIdentity: naturalKey must contain at least one field.");
|
|
84
|
+
}
|
|
85
|
+
const hasPrimary = Array.isArray(spec.primary.value) ? spec.primary.value.length > 0 : spec.primary.value !== undefined && spec.primary.value !== "";
|
|
86
|
+
const naturalFlags = spec.naturalKey.map((f) => f.flag).join(" + ");
|
|
87
|
+
const supplied = spec.naturalKey.filter((f) => f.value !== undefined && f.value !== "");
|
|
88
|
+
const hasFullNatural = supplied.length === spec.naturalKey.length;
|
|
89
|
+
const hasAnyNatural = supplied.length > 0;
|
|
90
|
+
const hasPartialNatural = hasAnyNatural && !hasFullNatural;
|
|
91
|
+
if (!hasPrimary && !hasAnyNatural) {
|
|
92
|
+
return {
|
|
93
|
+
Result: "ValidationError",
|
|
94
|
+
Message: `Provide ${spec.primary.flag}, or ${naturalFlags}.`,
|
|
95
|
+
Instructions: `Pass ${spec.primary.flag}, or ${naturalFlags} to identify by natural key.`
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
if (hasPrimary && hasAnyNatural) {
|
|
99
|
+
return {
|
|
100
|
+
Result: "ValidationError",
|
|
101
|
+
Message: `${spec.primary.flag} and ${naturalFlags} are mutually exclusive identities.`,
|
|
102
|
+
Instructions: `Pass either ${spec.primary.flag}, or ${naturalFlags} — not both.`
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (hasPartialNatural) {
|
|
106
|
+
return {
|
|
107
|
+
Result: "ValidationError",
|
|
108
|
+
Message: `${naturalFlags} must all be supplied together.`,
|
|
109
|
+
Instructions: `Pass all of ${naturalFlags} to identify by natural key.`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
async function findExactByNamePaged(fetchPage, match, options = {}) {
|
|
115
|
+
const pageSize = options.pageSize ?? 200;
|
|
116
|
+
const maxPages = options.maxPages ?? 20;
|
|
117
|
+
for (let pageIndex = 0;pageIndex < maxPages; pageIndex++) {
|
|
118
|
+
const page = await fetchPage(pageSize, pageIndex * pageSize);
|
|
119
|
+
const items = page.data ?? [];
|
|
120
|
+
const found = items.find(match);
|
|
121
|
+
if (found)
|
|
122
|
+
return found;
|
|
123
|
+
if (items.length < pageSize)
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
function splitKeys(raw) {
|
|
129
|
+
return raw.flatMap((k) => k.split(",")).map((k) => k.trim()).filter((k) => k.length > 0);
|
|
130
|
+
}
|
|
131
|
+
function parseTop(raw, flagName = "--top") {
|
|
132
|
+
const parsed = Number(raw);
|
|
133
|
+
if (raw.trim() === "" || Number.isNaN(parsed) || !Number.isInteger(parsed) || parsed < 0) {
|
|
134
|
+
throw new Error(`Invalid value for ${flagName}: "${raw}" must be a non-negative integer.`);
|
|
135
|
+
}
|
|
136
|
+
return parsed;
|
|
137
|
+
}
|
|
138
|
+
function parseSkip(raw, flagName = "--skip") {
|
|
139
|
+
const parsed = Number(raw);
|
|
140
|
+
if (raw.trim() === "" || Number.isNaN(parsed) || !Number.isInteger(parsed) || parsed < 0) {
|
|
141
|
+
throw new Error(`Invalid value for ${flagName}: "${raw}" must be a non-negative integer.`);
|
|
142
|
+
}
|
|
143
|
+
return parsed;
|
|
144
|
+
}
|
|
145
|
+
function resolvePaginationOptions(options, defaults = {
|
|
146
|
+
limit: "50",
|
|
147
|
+
offset: "0"
|
|
148
|
+
}) {
|
|
149
|
+
const limit = resolveDeprecatedOptionAlias({
|
|
150
|
+
preferredValue: options.limit,
|
|
151
|
+
deprecatedValue: options.top,
|
|
152
|
+
preferredFlag: "--limit",
|
|
153
|
+
deprecatedFlag: "--top"
|
|
154
|
+
});
|
|
155
|
+
if (limit.error) {
|
|
156
|
+
return { top: 0, skip: 0, error: limit.error };
|
|
157
|
+
}
|
|
158
|
+
const offset = resolveDeprecatedOptionAlias({
|
|
159
|
+
preferredValue: options.offset,
|
|
160
|
+
deprecatedValue: options.skip,
|
|
161
|
+
preferredFlag: "--offset",
|
|
162
|
+
deprecatedFlag: "--skip"
|
|
163
|
+
});
|
|
164
|
+
if (offset.error) {
|
|
165
|
+
return { top: 0, skip: 0, error: offset.error };
|
|
166
|
+
}
|
|
167
|
+
if (limit.usedDeprecated) {
|
|
168
|
+
warnDeprecatedOptionAlias("--top", "--limit");
|
|
169
|
+
}
|
|
170
|
+
if (offset.usedDeprecated) {
|
|
171
|
+
warnDeprecatedOptionAlias("--skip", "--offset");
|
|
172
|
+
}
|
|
173
|
+
const limitFlag = limit.usedDeprecated ? "--top" : "--limit";
|
|
174
|
+
const offsetFlag = offset.usedDeprecated ? "--skip" : "--offset";
|
|
175
|
+
try {
|
|
176
|
+
return {
|
|
177
|
+
top: parseTop(limit.value ?? defaults.limit, limitFlag),
|
|
178
|
+
skip: parseSkip(offset.value ?? defaults.offset, offsetFlag)
|
|
179
|
+
};
|
|
180
|
+
} catch (err) {
|
|
181
|
+
return {
|
|
182
|
+
top: 0,
|
|
183
|
+
skip: 0,
|
|
184
|
+
error: {
|
|
185
|
+
message: err instanceof Error ? err.message : String(err),
|
|
186
|
+
instructions: "Pass a non-negative integer, e.g. --limit 50 --offset 0."
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function toPascalCase(key) {
|
|
192
|
+
if (!key)
|
|
193
|
+
return key;
|
|
194
|
+
return key.charAt(0).toUpperCase() + key.slice(1);
|
|
195
|
+
}
|
|
196
|
+
function toPascalCaseKeys(value) {
|
|
197
|
+
if (value === null || value === undefined)
|
|
198
|
+
return value;
|
|
199
|
+
if (Array.isArray(value))
|
|
200
|
+
return value.map(toPascalCaseKeys);
|
|
201
|
+
if (typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
|
|
202
|
+
const result = {};
|
|
203
|
+
for (const [k, v] of Object.entries(value)) {
|
|
204
|
+
result[toPascalCase(k)] = toPascalCaseKeys(v);
|
|
205
|
+
}
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
return value;
|
|
209
|
+
}
|
|
210
|
+
function hasText(value) {
|
|
211
|
+
return value !== null && value !== undefined && value.trim() !== "";
|
|
212
|
+
}
|
|
213
|
+
function sameGuid(a, b) {
|
|
214
|
+
return typeof a === "string" && typeof b === "string" && a.toLowerCase() === b.toLowerCase();
|
|
215
|
+
}
|
|
216
|
+
var TIMER_MAX_MS = 2147483647;
|
|
217
|
+
function resolveWaitTiming(options) {
|
|
218
|
+
const timeoutRaw = options.timeout ?? "";
|
|
219
|
+
const intervalRaw = options.pollInterval ?? "";
|
|
220
|
+
for (const [flag, raw] of [
|
|
221
|
+
["--timeout", timeoutRaw],
|
|
222
|
+
["--poll-interval", intervalRaw]
|
|
223
|
+
]) {
|
|
224
|
+
if (raw.trim().length === 0) {
|
|
225
|
+
OutputFormatter.error({
|
|
226
|
+
Result: RESULTS.Failure,
|
|
227
|
+
Message: `${flag} was empty.`,
|
|
228
|
+
Instructions: `Pass a number of seconds, e.g. ${flag} ${flag === "--timeout" ? "1800" : "10"}.`,
|
|
229
|
+
ErrorCode: "invalid_argument",
|
|
230
|
+
Retry: "RetryWillNotFix"
|
|
231
|
+
});
|
|
232
|
+
processContext.exit(1);
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
const timeoutS = Number(timeoutRaw);
|
|
237
|
+
if (!Number.isFinite(timeoutS) || timeoutS < 0) {
|
|
238
|
+
OutputFormatter.error({
|
|
239
|
+
Result: RESULTS.Failure,
|
|
240
|
+
Message: `Invalid --timeout value: '${String(options.timeout)}'. Must be a non-negative number.`,
|
|
241
|
+
Instructions: "Pass seconds, e.g. --timeout 1800",
|
|
242
|
+
ErrorCode: "invalid_argument",
|
|
243
|
+
Retry: "RetryWillNotFix"
|
|
244
|
+
});
|
|
245
|
+
processContext.exit(1);
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
const intervalS = Number(intervalRaw);
|
|
249
|
+
if (!Number.isFinite(intervalS) || intervalS <= 0) {
|
|
250
|
+
OutputFormatter.error({
|
|
251
|
+
Result: RESULTS.Failure,
|
|
252
|
+
Message: `Invalid --poll-interval value: '${String(options.pollInterval)}'. Must be a positive number.`,
|
|
253
|
+
Instructions: "Pass seconds, e.g. --poll-interval 10",
|
|
254
|
+
ErrorCode: "invalid_argument",
|
|
255
|
+
Retry: "RetryWillNotFix"
|
|
256
|
+
});
|
|
257
|
+
processContext.exit(1);
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
const timeoutMs = timeoutS * 1000;
|
|
261
|
+
const intervalMs = intervalS * 1000;
|
|
262
|
+
if (intervalMs > TIMER_MAX_MS) {
|
|
263
|
+
OutputFormatter.error({
|
|
264
|
+
Result: RESULTS.Failure,
|
|
265
|
+
Message: `--poll-interval value '${intervalS}' is larger than the longest delay a timer can hold (${Math.floor(TIMER_MAX_MS / 1000)} seconds).`,
|
|
266
|
+
Instructions: "Pass a smaller number of seconds, e.g. --poll-interval 10.",
|
|
267
|
+
ErrorCode: "invalid_argument",
|
|
268
|
+
Retry: "RetryWillNotFix"
|
|
269
|
+
});
|
|
270
|
+
processContext.exit(1);
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
for (const [flag, seconds, ms] of [
|
|
274
|
+
["--timeout", timeoutS, timeoutMs],
|
|
275
|
+
["--poll-interval", intervalS, intervalMs]
|
|
276
|
+
]) {
|
|
277
|
+
if (!Number.isFinite(ms)) {
|
|
278
|
+
OutputFormatter.error({
|
|
279
|
+
Result: RESULTS.Failure,
|
|
280
|
+
Message: `${flag} value '${seconds}' is too large to use as a duration.`,
|
|
281
|
+
Instructions: flag === "--timeout" ? "Pass a smaller number of seconds, e.g. --timeout 14400, or --timeout 0 for no ceiling." : "Pass a smaller number of seconds, e.g. --poll-interval 10.",
|
|
282
|
+
ErrorCode: "invalid_argument",
|
|
283
|
+
Retry: "RetryWillNotFix"
|
|
284
|
+
});
|
|
285
|
+
processContext.exit(1);
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return { intervalMs, timeoutMs };
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// src/utils/error-handler.ts
|
|
293
|
+
var TM_NOT_AVAILABLE_PATTERNS = [/testmanager not found in organization/i];
|
|
294
|
+
var FEATURE_DISABLED_PATTERN = /\bfeatureDisabled\b/i;
|
|
295
|
+
var TM_PORTAL_ROUTE_PATTERN = /\/portal_\//i;
|
|
296
|
+
var TM_PORTAL_SHELL_PATTERNS = [
|
|
297
|
+
/portalShellLoaded/i,
|
|
298
|
+
/window\.PortalShell\.initialize/i
|
|
299
|
+
];
|
|
300
|
+
function hasKnownPortalShellMarkers(body) {
|
|
301
|
+
return TM_PORTAL_SHELL_PATTERNS.every((pattern) => pattern.test(body));
|
|
302
|
+
}
|
|
303
|
+
function isPortalShellDocument(body) {
|
|
304
|
+
return TM_PORTAL_ROUTE_PATTERN.test(body) && hasKnownPortalShellMarkers(body);
|
|
305
|
+
}
|
|
306
|
+
function shouldWarnAboutPortalShellDrift(result) {
|
|
307
|
+
return result.context?.httpStatus === 200 && isHtmlDocument(result.details) && TM_PORTAL_ROUTE_PATTERN.test(result.details) && !hasKnownPortalShellMarkers(result.details);
|
|
308
|
+
}
|
|
309
|
+
function isTmNotAvailableError(result) {
|
|
310
|
+
if (TM_NOT_AVAILABLE_PATTERNS.some((pattern) => pattern.test(result.details))) {
|
|
311
|
+
return true;
|
|
312
|
+
}
|
|
313
|
+
return result.context?.httpStatus === 200 && isHtmlDocument(result.details) && isPortalShellDocument(result.details);
|
|
314
|
+
}
|
|
315
|
+
function isFeatureDisabledError(result) {
|
|
316
|
+
return result.context?.httpStatus === 403 && FEATURE_DISABLED_PATTERN.test(`${result.context?.errorCode ?? ""} ${result.details}`);
|
|
317
|
+
}
|
|
318
|
+
async function extractErrorDetails(error, options) {
|
|
319
|
+
const result = await extractErrorDetails2(error, {
|
|
320
|
+
...options,
|
|
321
|
+
forbiddenMessage: options?.forbiddenMessage ?? TM_FORBIDDEN_MESSAGE
|
|
322
|
+
});
|
|
323
|
+
if (isTmNotAvailableError(result)) {
|
|
324
|
+
return {
|
|
325
|
+
...result,
|
|
326
|
+
message: TM_NOT_AVAILABLE_MESSAGE,
|
|
327
|
+
details: TM_NOT_AVAILABLE_INSTRUCTIONS
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
if (shouldWarnAboutPortalShellDrift(result)) {
|
|
331
|
+
logger.warn("Test Manager returned portal HTML with the expected route but without known shell markers. The Test Manager availability detector may need updating.");
|
|
332
|
+
}
|
|
333
|
+
return result;
|
|
334
|
+
}
|
|
335
|
+
async function emitTmFailure(error, options) {
|
|
336
|
+
const { instructionsSuffix, ...extractOptions } = options ?? {};
|
|
337
|
+
const classified = await extractErrorDetails(error, {
|
|
338
|
+
...extractOptions,
|
|
339
|
+
forbiddenMessage: extractOptions.forbiddenMessage ?? TM_FORBIDDEN_MESSAGE
|
|
340
|
+
});
|
|
341
|
+
emitTmFailureDetails(classified, instructionsSuffix);
|
|
342
|
+
}
|
|
343
|
+
function emitTmFailureDetails(classified, instructionsSuffix) {
|
|
344
|
+
const { result, message, details, errorCode, retry } = classified;
|
|
345
|
+
const suffix = typeof instructionsSuffix === "function" ? instructionsSuffix(errorCode) : instructionsSuffix;
|
|
346
|
+
OutputFormatter.error({
|
|
347
|
+
Result: result,
|
|
348
|
+
ErrorCode: errorCode,
|
|
349
|
+
Message: message,
|
|
350
|
+
Instructions: suffix ? `${details} ${suffix}`.trim() : details,
|
|
351
|
+
Retry: retry
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
async function refuseUnexpectedContentType(response, accept, expected, what) {
|
|
355
|
+
const contentType = response.raw.headers.get("content-type") ?? "";
|
|
356
|
+
if (contentType.trim() === "" || accept.test(contentType))
|
|
357
|
+
return false;
|
|
358
|
+
const responseError = Object.assign(new Error(`${what} returned content-type "${contentType || "<empty>"}"; expected ${expected}.`), { response: response.raw.clone() });
|
|
359
|
+
await emitTmFailure(responseError);
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
function emitInvalidArgument(message, instructions) {
|
|
363
|
+
OutputFormatter.error({
|
|
364
|
+
Result: RESULTS.ValidationError,
|
|
365
|
+
ErrorCode: "invalid_argument",
|
|
366
|
+
Message: message,
|
|
367
|
+
Instructions: instructions,
|
|
368
|
+
Retry: "RetryWillNotFix"
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
function emitAttachmentNotFound(attachmentId, objectType) {
|
|
372
|
+
OutputFormatter.error({
|
|
373
|
+
Result: RESULTS.Failure,
|
|
374
|
+
ErrorCode: "not_found",
|
|
375
|
+
Message: `Attachment '${attachmentId}' was not found for object type '${objectType}'.`,
|
|
376
|
+
Instructions: "Run 'uip tm attachment list' on the parent object to find its attachment ids, and check --object-type matches the object the file is attached to.",
|
|
377
|
+
Retry: "RetryWillNotFix"
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
function instructiveError(message, instructions, errorCode, retry = "RetryWillNotFix") {
|
|
381
|
+
const error = new Error(message);
|
|
382
|
+
error.instructions = instructions;
|
|
383
|
+
error.errorCode = errorCode;
|
|
384
|
+
error.retry = retry;
|
|
385
|
+
return error;
|
|
386
|
+
}
|
|
387
|
+
function readInstructions(error) {
|
|
388
|
+
const candidate = error;
|
|
389
|
+
return typeof candidate?.instructions === "string" ? candidate.instructions : undefined;
|
|
390
|
+
}
|
|
391
|
+
function readClassification(error) {
|
|
392
|
+
const candidate = error;
|
|
393
|
+
return {
|
|
394
|
+
errorCode: isCliErrorCode(candidate?.errorCode) ? candidate.errorCode : undefined,
|
|
395
|
+
retry: isRetryHint(candidate?.retry) ? candidate.retry : undefined
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export { stripEncodingMarkers, ROBOT_LOG_LEVELS, TERMINAL_STATUSES, msToDuration, calcPassRate, DEFAULT_TEST_CASE_VERSION, PROJECT_CONFIG_FORBIDDEN_MESSAGE, SCHEMA_FORBIDDEN_MESSAGE, PROJECT_CONFIG_IMPORT_FORBIDDEN_MESSAGE, TM_FORBIDDEN_MESSAGE, TM_LICENSED_USER_FORBIDDEN_MESSAGE, TM_TEST_CLOUD_FORBIDDEN_MESSAGE, TM_NOT_AVAILABLE_MESSAGE, TM_NOT_AVAILABLE_INSTRUCTIONS, TAGGED_UPLOAD_NOT_SUPPORTED_INSTRUCTIONS, parseCustomFieldObjectType, parseCustomFieldDataType, validateIdentity, findExactByNamePaged, splitKeys, resolvePaginationOptions, toPascalCaseKeys, hasText, sameGuid, resolveWaitTiming, isPortalShellDocument, isFeatureDisabledError, extractErrorDetails, emitTmFailure, emitTmFailureDetails, refuseUnexpectedContentType, emitInvalidArgument, emitAttachmentNotFound, instructiveError, readInstructions, readClassification };
|
|
400
|
+
|
|
401
|
+
//# debugId=A0D2FBC60AB4599664756E2164756E21
|
|
@@ -40,13 +40,15 @@ var ProjectDimensions = {
|
|
|
40
40
|
SolutionKey: "SolutionKey",
|
|
41
41
|
SolutionProjectKey: "SolutionProjectKey",
|
|
42
42
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
43
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
43
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
44
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
44
45
|
};
|
|
45
46
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
46
47
|
ProjectDimensions.ProjectKey,
|
|
47
48
|
ProjectDimensions.SolutionKey,
|
|
48
49
|
ProjectDimensions.SolutionProjectKey,
|
|
49
|
-
ProjectDimensions.PreviousSolutionKey
|
|
50
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
51
|
+
ProjectDimensions.PreviousProjectKey
|
|
50
52
|
]);
|
|
51
53
|
var ShipDimensions = {
|
|
52
54
|
ShipKind: "ShipKind",
|
|
@@ -311,6 +313,6 @@ function installSdkCodingAgentHeader(BaseApiClass) {
|
|
|
311
313
|
installRequestHeaderForwarding(BaseApiClass, codingAgentPatchKey(), (headers) => addSdkCodingAgentHeader(headers));
|
|
312
314
|
}
|
|
313
315
|
|
|
314
|
-
export { BaseDimensions, CommandDimensions, ProjectDimensions, GUID_KEY_DIMENSIONS, ErrorDimensions, SkillsDimensions, lowercaseIdDimensionValues, singleton, getGlobalTelemetryProperties, isProjectTelemetryDisabled, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, installSdkCodingAgentHeader };
|
|
316
|
+
export { BaseDimensions, CommandDimensions, ProjectDimensions, GUID_KEY_DIMENSIONS, ErrorDimensions, SkillsDimensions, PackagerDimensions, lowercaseIdDimensionValues, singleton, getGlobalTelemetryProperties, isProjectTelemetryDisabled, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, installSdkCodingAgentHeader };
|
|
315
317
|
|
|
316
|
-
//# debugId=
|
|
318
|
+
//# debugId=ED9ED53A0441F3F364756E2164756E21
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getSdkUserAgentToken,
|
|
3
3
|
installSdkUserAgentHeader,
|
|
4
4
|
installSdkCodingAgentHeader
|
|
5
|
-
} from "./tool-
|
|
5
|
+
} from "./tool-f4ytsjzn.js";
|
|
6
6
|
|
|
7
7
|
// ../test-manager-sdk/generated/src/runtime.ts
|
|
8
8
|
var BASE_PATH = "/{organizationId}/{tenantName}/testmanager_".replace(/\/+$/, "");
|
|
@@ -303,7 +303,7 @@ var package_default = {
|
|
|
303
303
|
name: "@uipath/test-manager-sdk",
|
|
304
304
|
author: "UiPath",
|
|
305
305
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
306
|
-
version: "1.
|
|
306
|
+
version: "1.207.0",
|
|
307
307
|
repository: {
|
|
308
308
|
type: "git",
|
|
309
309
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -13256,4 +13256,4 @@ function enc(segment) {
|
|
|
13256
13256
|
}
|
|
13257
13257
|
export { Configuration2, ResponseError2, UiPathTestManagementHubAISolutionsAbstractionsEnumsModeOfUse2, UiPathTestManagementHubAttachmentAbstractionsEnumsAttachmentSource2, UiPathTestManagementHubCommonEnumsObjectType2, UiPathTestManagementHubAttachmentAbstractionsDTOsAttachmentDtoFromJSON2, UiPathTestManagementHubAttachmentAbstractionsEnumsAttachmentType2, UiPathTestManagementHubAttachmentAbstractionsEnumsAttachmentUploadSource2, UiPathTestManagementHubCommonEnumsFieldType2, UiPathTestManagementHubCommonEnumsDirection2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsScenarioExecutionType2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsScenarioExecutionStatus2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsResponsiveness2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsApplicationType2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsPerformanceTestType2, UiPathTestManagementHubProjectMigrationAbstractionsEnumsMigrationJobType2, UiPathTestManagementHubProjectMigrationAbstractionsEnumsMigrationJobStatus2, UiPathTestManagementHubCommonEnumsCustomFieldDataType2, UiPathTestManagementHubTestManagementAbstractionsEnumsParameterType2, UiPathTestManagementHubCommonEnumsRobotType2, UiPathTestManagementHubCommonEnumsExecutionType2, UiPathTestManagementHubTestManagementAbstractionsDTOsResult2, UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus2, UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus2, UiPathTestManagementHubTestManagementAbstractionsEnumsRecurrenceType2, UiPathTestManagementHubCommonEnumsLabelType2, UiPathTestManagementHubPerformanceServiceAbstractionsEnumsLoadGroupRobotType2, UiPathTestManagementHubTestManagementAbstractionsDTOsBulkDeleteResponseDtoFromJSON2, UiPathTestManagementHubTestManagementAbstractionsEnumsFilterType2, UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod2, UiPathTestManagementHubTestManagementAbstractionsEnumsFileExportType2, UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionFinishedInterval2, AttachmentsApi2, CustomFieldDefinitionsApi2, CustomFieldLabelsApi2, CustomFieldValuesApi2, DefectsApi2, FileExportJobsApi2, LoadGroupApi2, LoadGroupLogApi2, ObjectFiltersApi2, ObjectLabelsApi2, OrchestratorApi2, ParametersApi2, ProjectMigrationAttachmentApi2, ProjectMigrationJobApi2, ProjectMigrationSchemaApi2, ProjectPermissionsApi2, ProjectSettingsApi2, ProjectsApi2, PromptsApi2, RequirementsApi2, ScenarioApi2, ScenarioExecutionApi2, TestCaseLogArtifactsApi2, TestCaseLogsApi2, TestCasesApi2, TestExecutionsApi2, TestSetSchedulesApi2, TestSetsApi2, TestStepLogsApi2, TestStepsApi2, UserAuthApi2, RequirementsAIApi2, LlmActivityApi2, TestSetHiddenRoutesApi2, TransientTestSetsApi2 };
|
|
13258
13258
|
|
|
13259
|
-
//# debugId=
|
|
13259
|
+
//# debugId=A451A782277895D264756E2164756E21
|