@uipath/test-manager-tool 1.201.0-preview.115 → 1.201.0-preview.122
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/index.js +1 -1
- package/dist/{tool-f9cxs2yf.js → tool-gr7rnsea.js} +164 -71
- package/dist/tool.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11191,7 +11191,7 @@ var require_lib3 = __commonJS((exports, module) => {
|
|
|
11191
11191
|
var package_default = {
|
|
11192
11192
|
name: "@uipath/test-manager-tool",
|
|
11193
11193
|
license: "MIT",
|
|
11194
|
-
version: "1.201.0-preview.
|
|
11194
|
+
version: "1.201.0-preview.122",
|
|
11195
11195
|
description: "Manage test cases, test sets, executions, and results.",
|
|
11196
11196
|
private: false,
|
|
11197
11197
|
repository: {
|
|
@@ -11295,17 +11295,18 @@ var TLS_ERROR_CODES = new Set([
|
|
|
11295
11295
|
]);
|
|
11296
11296
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
11297
11297
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
11298
|
+
var LOCAL_PERMISSION_ERROR_CODES = new Set(["EACCES", "EPERM", "EROFS"]);
|
|
11299
|
+
var LOCAL_PERMISSION_MESSAGE_PATTERN = /\b(EACCES|EPERM|EROFS)\b/;
|
|
11300
|
+
function localPermissionInstructions(code, path) {
|
|
11301
|
+
const target = path !== undefined ? `'${path}'` : "a local file or resource";
|
|
11302
|
+
if (code === "EROFS") {
|
|
11303
|
+
return `The filesystem containing ${target} is read-only (EROFS), so the ` + "CLI could not write to it. This is a local environment problem, " + "not a UiPath service error — retrying will not help. Use a " + "writable location, or give this environment write access to the " + "path.";
|
|
11304
|
+
}
|
|
11305
|
+
const remedy = process.platform === "win32" ? "Re-run from an elevated terminal, close any program holding " + "the file open, or grant your user access to the path." : "Grant this user (or the sandbox the command runs in) access " + "to the path, or run the command outside the sandbox.";
|
|
11306
|
+
return `The operating system denied access to ${target} (${code}). This is ` + "a local permission problem, not a UiPath service error — retrying " + `without a permission change will not help. ${remedy}`;
|
|
11307
|
+
}
|
|
11298
11308
|
function describeConnectivityError(error) {
|
|
11299
|
-
const
|
|
11300
|
-
const seen = new Set;
|
|
11301
|
-
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
11302
|
-
const current = queue.shift();
|
|
11303
|
-
if (current === null || typeof current !== "object")
|
|
11304
|
-
continue;
|
|
11305
|
-
if (seen.has(current))
|
|
11306
|
-
continue;
|
|
11307
|
-
seen.add(current);
|
|
11308
|
-
const cur = current;
|
|
11309
|
+
for (const cur of walkErrorGraph(error)) {
|
|
11309
11310
|
const code = typeof cur.code === "string" ? cur.code : undefined;
|
|
11310
11311
|
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
11311
11312
|
if (code && TLS_ERROR_CODES.has(code)) {
|
|
@@ -11324,6 +11325,49 @@ function describeConnectivityError(error) {
|
|
|
11324
11325
|
instructions: NETWORK_INSTRUCTIONS
|
|
11325
11326
|
};
|
|
11326
11327
|
}
|
|
11328
|
+
}
|
|
11329
|
+
return;
|
|
11330
|
+
}
|
|
11331
|
+
function describePermissionError(error) {
|
|
11332
|
+
for (const cur of walkErrorGraph(error)) {
|
|
11333
|
+
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
11334
|
+
const code = matchLocalPermissionCode(cur.code, message);
|
|
11335
|
+
if (!code)
|
|
11336
|
+
continue;
|
|
11337
|
+
const path = localPermissionPath(cur.path, message);
|
|
11338
|
+
return {
|
|
11339
|
+
code,
|
|
11340
|
+
message: message ?? code,
|
|
11341
|
+
...path !== undefined ? { path } : {},
|
|
11342
|
+
instructions: localPermissionInstructions(code, path)
|
|
11343
|
+
};
|
|
11344
|
+
}
|
|
11345
|
+
return;
|
|
11346
|
+
}
|
|
11347
|
+
function matchLocalPermissionCode(code, message) {
|
|
11348
|
+
if (typeof code === "string" && LOCAL_PERMISSION_ERROR_CODES.has(code)) {
|
|
11349
|
+
return code;
|
|
11350
|
+
}
|
|
11351
|
+
const match = message ? LOCAL_PERMISSION_MESSAGE_PATTERN.exec(message) : null;
|
|
11352
|
+
return match ? match[1] : undefined;
|
|
11353
|
+
}
|
|
11354
|
+
function localPermissionPath(path, message) {
|
|
11355
|
+
if (typeof path === "string")
|
|
11356
|
+
return path;
|
|
11357
|
+
return message ? /'([^']+)'/.exec(message)?.[1] : undefined;
|
|
11358
|
+
}
|
|
11359
|
+
function* walkErrorGraph(error) {
|
|
11360
|
+
const queue = [error];
|
|
11361
|
+
const seen = new Set;
|
|
11362
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
11363
|
+
const current = queue.shift();
|
|
11364
|
+
if (current === null || typeof current !== "object")
|
|
11365
|
+
continue;
|
|
11366
|
+
if (seen.has(current))
|
|
11367
|
+
continue;
|
|
11368
|
+
seen.add(current);
|
|
11369
|
+
const cur = current;
|
|
11370
|
+
yield cur;
|
|
11327
11371
|
if (cur.cause !== undefined)
|
|
11328
11372
|
queue.push(cur.cause);
|
|
11329
11373
|
if (Array.isArray(cur.errors))
|
|
@@ -11384,6 +11428,12 @@ function classifyError(status, error) {
|
|
|
11384
11428
|
if (status !== undefined && status >= 500 && status < 600) {
|
|
11385
11429
|
return { errorCode: "server_error", retry: "RetryLater" };
|
|
11386
11430
|
}
|
|
11431
|
+
if (status === undefined && describePermissionError(error)) {
|
|
11432
|
+
return {
|
|
11433
|
+
errorCode: "local_permission_denied",
|
|
11434
|
+
retry: "RetryWillNotFix"
|
|
11435
|
+
};
|
|
11436
|
+
}
|
|
11387
11437
|
const connectivity = describeConnectivityError(error);
|
|
11388
11438
|
if (connectivity) {
|
|
11389
11439
|
return {
|
|
@@ -11486,6 +11536,16 @@ async function extractErrorDetails(error, options) {
|
|
|
11486
11536
|
message = `${message}: ${connectivity.message}`;
|
|
11487
11537
|
}
|
|
11488
11538
|
}
|
|
11539
|
+
const permission = status === undefined ? describePermissionError(error) : undefined;
|
|
11540
|
+
if (permission) {
|
|
11541
|
+
if (permission.message !== message && !message.includes(permission.message)) {
|
|
11542
|
+
message = `${message}: ${permission.message}`;
|
|
11543
|
+
}
|
|
11544
|
+
if (!message.includes(permission.instructions)) {
|
|
11545
|
+
const punctuated = message.endsWith(".") ? message : `${message}.`;
|
|
11546
|
+
message = `${punctuated} ${permission.instructions}`;
|
|
11547
|
+
}
|
|
11548
|
+
}
|
|
11489
11549
|
let details = rawMessage;
|
|
11490
11550
|
if (rawBody) {
|
|
11491
11551
|
if (parsedBody) {
|
|
@@ -11525,6 +11585,9 @@ async function extractErrorDetails(error, options) {
|
|
|
11525
11585
|
if (parsedBody?.traceId && typeof parsedBody.traceId === "string") {
|
|
11526
11586
|
context.traceId = parsedBody.traceId;
|
|
11527
11587
|
}
|
|
11588
|
+
if (permission?.path !== undefined) {
|
|
11589
|
+
context.path = permission.path;
|
|
11590
|
+
}
|
|
11528
11591
|
if (status === 429) {
|
|
11529
11592
|
const resp = response;
|
|
11530
11593
|
const headersObj = resp?.headers;
|
|
@@ -12784,6 +12847,7 @@ var CLI_ERROR_CODES = [
|
|
|
12784
12847
|
"invalid_argument",
|
|
12785
12848
|
"authentication_required",
|
|
12786
12849
|
"permission_denied",
|
|
12850
|
+
"local_permission_denied",
|
|
12787
12851
|
"not_found",
|
|
12788
12852
|
"rate_limited",
|
|
12789
12853
|
"network_error",
|
|
@@ -13219,12 +13283,16 @@ function defaultErrorCodeForHttpStatus(status) {
|
|
|
13219
13283
|
return "server_error";
|
|
13220
13284
|
return;
|
|
13221
13285
|
}
|
|
13286
|
+
var LOCAL_PERMISSION_TEXT_PATTERN = /(?:\b|\()(?:EACCES|EPERM|EROFS)(?::\s|\))/;
|
|
13222
13287
|
function defaultErrorCodeForFailure(data) {
|
|
13223
13288
|
if (data.Result === RESULTS.Failure) {
|
|
13224
13289
|
const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage2(data.Message);
|
|
13225
13290
|
const errorCode = defaultErrorCodeForHttpStatus(status);
|
|
13226
13291
|
if (errorCode)
|
|
13227
13292
|
return errorCode;
|
|
13293
|
+
if (status === undefined && (LOCAL_PERMISSION_TEXT_PATTERN.test(data.Message) || LOCAL_PERMISSION_TEXT_PATTERN.test(data.Instructions))) {
|
|
13294
|
+
return "local_permission_denied";
|
|
13295
|
+
}
|
|
13228
13296
|
}
|
|
13229
13297
|
return defaultErrorCodeForResult(data.Result);
|
|
13230
13298
|
}
|
|
@@ -13668,7 +13736,10 @@ function extractHttpStatus(err) {
|
|
|
13668
13736
|
if (!err || typeof err !== "object")
|
|
13669
13737
|
return;
|
|
13670
13738
|
const e = err;
|
|
13671
|
-
|
|
13739
|
+
const structured = e.response?.status ?? e.status ?? e.statusCode;
|
|
13740
|
+
if (structured !== undefined)
|
|
13741
|
+
return structured;
|
|
13742
|
+
return typeof e.message === "string" ? parseHttpStatusFromMessage(e.message) : undefined;
|
|
13672
13743
|
}
|
|
13673
13744
|
var GENERIC = "Check authentication and parameters";
|
|
13674
13745
|
function instructionsFor(ctx, err) {
|
|
@@ -13702,6 +13773,10 @@ function instructionsFor(ctx, err) {
|
|
|
13702
13773
|
if (status !== undefined && status >= 500 && status < 600) {
|
|
13703
13774
|
return "Orchestrator returned a server error — retry; if it persists, check service status";
|
|
13704
13775
|
}
|
|
13776
|
+
const permission = describePermissionError(err);
|
|
13777
|
+
if (permission) {
|
|
13778
|
+
return permission.instructions;
|
|
13779
|
+
}
|
|
13705
13780
|
const connectivity = describeConnectivityError(err);
|
|
13706
13781
|
if (connectivity) {
|
|
13707
13782
|
return connectivity.instructions;
|
|
@@ -14320,11 +14395,10 @@ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
|
14320
14395
|
function installSdkCodingAgentHeader(BaseApiClass) {
|
|
14321
14396
|
installRequestHeaderForwarding(BaseApiClass, codingAgentPatchKey(), (headers) => addSdkCodingAgentHeader(headers));
|
|
14322
14397
|
}
|
|
14323
|
-
// ../common/src/tool-provider.ts
|
|
14324
|
-
var factorySlot = singleton("PackagerFactoryProvider");
|
|
14325
|
-
var moduleSlot = singleton("ToolModuleProvider");
|
|
14326
14398
|
// ../common/src/telemetry/ship-succeeded.ts
|
|
14327
14399
|
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
14400
|
+
// ../common/src/tool-provider.ts
|
|
14401
|
+
var factorySlot = singleton("PackagerFactoryProvider");
|
|
14328
14402
|
// ../test-manager-sdk/generated/src/runtime.ts
|
|
14329
14403
|
var BASE_PATH = "/{organizationId}/{tenantName}/testmanager_".replace(/\/+$/, "");
|
|
14330
14404
|
|
|
@@ -22641,6 +22715,9 @@ var getAuthContext = async (options = {}) => {
|
|
|
22641
22715
|
tenantName
|
|
22642
22716
|
};
|
|
22643
22717
|
};
|
|
22718
|
+
// ../auth/src/tenantSelection.ts
|
|
22719
|
+
var IDENTIFIER_STATUSES = new Set([400, 403, 404]);
|
|
22720
|
+
|
|
22644
22721
|
// ../auth/src/selectTenant.ts
|
|
22645
22722
|
var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
|
|
22646
22723
|
var INVALID_TENANT_CODE = "INVALID_TENANT";
|
|
@@ -26002,6 +26079,8 @@ var MESSAGES = {
|
|
|
26002
26079
|
LOCKFILE_MISSING: "No supported lockfile found at the project root (package-lock.json, npm-shrinkwrap.json, bun.lock, bun.lockb, yarn.lock, or pnpm-lock.yaml). The robot uses the lockfile for a deterministic install — commit one before packing.",
|
|
26003
26080
|
runnerDependencyMissing: (keys) => `None of the framework's test-runner packages (${keys.join(", ")}) is declared in package.json dependencies or devDependencies. Add the runner to your project before packing.`,
|
|
26004
26081
|
TMH_PROJECT_KEY_REQUIRED: "--project-key is required when --create-test-cases is enabled (the default). Pass --project-key <ProjectKey> with the destination TestManager project's URL prefix, or pass --no-create-test-cases to skip auto-creation.",
|
|
26082
|
+
tmhProjectKeyInvalid: (key) => `--project-key '${key}' is not a valid Test Manager project key. Keys are uppercase letters and digits only (A-Z, 0-9) — check the URL prefix of the destination project. Packing is offline, so a key that is well-formed but does not exist is only detected when the package is ingested.`,
|
|
26083
|
+
PLAYWRIGHT_CONFIG_MISSING: "No playwright.config file found at the project root (looked for playwright.config.{ts,js,mts,cts,mjs,cjs}). Playwright projects are read from that config; without it every test packs with an empty projects list and --playwright-projects has nothing to select at run time.",
|
|
26005
26084
|
PACK_FAILED: "Failed to create package"
|
|
26006
26085
|
},
|
|
26007
26086
|
SUCCESS: {
|
|
@@ -26015,58 +26094,6 @@ var MESSAGES = {
|
|
|
26015
26094
|
}
|
|
26016
26095
|
};
|
|
26017
26096
|
|
|
26018
|
-
// src/pack/actions/pack-manifest.ts
|
|
26019
|
-
async function detectBuildTool(projectPath, buildTools) {
|
|
26020
|
-
const fs = getFileSystem();
|
|
26021
|
-
for (const tool of buildTools) {
|
|
26022
|
-
const present = await Promise.all(tool.lockfiles.map((name) => fs.exists(fs.path.join(projectPath, name))));
|
|
26023
|
-
if (present.some(Boolean)) {
|
|
26024
|
-
return tool;
|
|
26025
|
-
}
|
|
26026
|
-
}
|
|
26027
|
-
return null;
|
|
26028
|
-
}
|
|
26029
|
-
async function validatePackageManifest(projectPath, buildTools, runnerDependencyKeys) {
|
|
26030
|
-
const fs = getFileSystem();
|
|
26031
|
-
const packageJsonPath = fs.path.join(projectPath, "package.json");
|
|
26032
|
-
if (!await fs.exists(packageJsonPath)) {
|
|
26033
|
-
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_MISSING };
|
|
26034
|
-
}
|
|
26035
|
-
const buildTool = await detectBuildTool(projectPath, buildTools);
|
|
26036
|
-
if (buildTool === null) {
|
|
26037
|
-
return { ok: false, message: MESSAGES.ERRORS.LOCKFILE_MISSING };
|
|
26038
|
-
}
|
|
26039
|
-
const raw = await fs.readFile(packageJsonPath, "utf-8");
|
|
26040
|
-
if (raw === null) {
|
|
26041
|
-
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_MISSING };
|
|
26042
|
-
}
|
|
26043
|
-
let parsed;
|
|
26044
|
-
try {
|
|
26045
|
-
parsed = JSON.parse(raw);
|
|
26046
|
-
} catch {
|
|
26047
|
-
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_INVALID };
|
|
26048
|
-
}
|
|
26049
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
26050
|
-
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_INVALID };
|
|
26051
|
-
}
|
|
26052
|
-
const pkg = parsed;
|
|
26053
|
-
for (const key of runnerDependencyKeys) {
|
|
26054
|
-
const version = pkg.dependencies?.[key] ?? pkg.devDependencies?.[key];
|
|
26055
|
-
if (typeof version === "string" && version.length > 0) {
|
|
26056
|
-
return {
|
|
26057
|
-
ok: true,
|
|
26058
|
-
runnerPackage: key,
|
|
26059
|
-
runnerVersion: version,
|
|
26060
|
-
buildTool: buildTool.name
|
|
26061
|
-
};
|
|
26062
|
-
}
|
|
26063
|
-
}
|
|
26064
|
-
return {
|
|
26065
|
-
ok: false,
|
|
26066
|
-
message: MESSAGES.ERRORS.runnerDependencyMissing(runnerDependencyKeys)
|
|
26067
|
-
};
|
|
26068
|
-
}
|
|
26069
|
-
|
|
26070
26097
|
// src/pack/discovery/run-subprocess.ts
|
|
26071
26098
|
import { spawn } from "node:child_process";
|
|
26072
26099
|
function runSubprocess(command, args, options) {
|
|
@@ -26242,6 +26269,58 @@ function normalizeStringArray(value) {
|
|
|
26242
26269
|
return;
|
|
26243
26270
|
}
|
|
26244
26271
|
|
|
26272
|
+
// src/pack/actions/pack-manifest.ts
|
|
26273
|
+
async function detectBuildTool(projectPath, buildTools) {
|
|
26274
|
+
const fs = getFileSystem();
|
|
26275
|
+
for (const tool of buildTools) {
|
|
26276
|
+
const present = await Promise.all(tool.lockfiles.map((name) => fs.exists(fs.path.join(projectPath, name))));
|
|
26277
|
+
if (present.some(Boolean)) {
|
|
26278
|
+
return tool;
|
|
26279
|
+
}
|
|
26280
|
+
}
|
|
26281
|
+
return null;
|
|
26282
|
+
}
|
|
26283
|
+
async function validatePackageManifest(projectPath, buildTools, runnerDependencyKeys) {
|
|
26284
|
+
const fs = getFileSystem();
|
|
26285
|
+
const packageJsonPath = fs.path.join(projectPath, "package.json");
|
|
26286
|
+
if (!await fs.exists(packageJsonPath)) {
|
|
26287
|
+
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_MISSING };
|
|
26288
|
+
}
|
|
26289
|
+
const buildTool = await detectBuildTool(projectPath, buildTools);
|
|
26290
|
+
if (buildTool === null) {
|
|
26291
|
+
return { ok: false, message: MESSAGES.ERRORS.LOCKFILE_MISSING };
|
|
26292
|
+
}
|
|
26293
|
+
const raw = await fs.readFile(packageJsonPath, "utf-8");
|
|
26294
|
+
if (raw === null) {
|
|
26295
|
+
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_MISSING };
|
|
26296
|
+
}
|
|
26297
|
+
let parsed;
|
|
26298
|
+
try {
|
|
26299
|
+
parsed = JSON.parse(raw);
|
|
26300
|
+
} catch {
|
|
26301
|
+
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_INVALID };
|
|
26302
|
+
}
|
|
26303
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
26304
|
+
return { ok: false, message: MESSAGES.ERRORS.PACKAGE_JSON_INVALID };
|
|
26305
|
+
}
|
|
26306
|
+
const pkg = parsed;
|
|
26307
|
+
for (const key of runnerDependencyKeys) {
|
|
26308
|
+
const version = pkg.dependencies?.[key] ?? pkg.devDependencies?.[key];
|
|
26309
|
+
if (typeof version === "string" && version.length > 0) {
|
|
26310
|
+
return {
|
|
26311
|
+
ok: true,
|
|
26312
|
+
runnerPackage: key,
|
|
26313
|
+
runnerVersion: version,
|
|
26314
|
+
buildTool: buildTool.name
|
|
26315
|
+
};
|
|
26316
|
+
}
|
|
26317
|
+
}
|
|
26318
|
+
return {
|
|
26319
|
+
ok: false,
|
|
26320
|
+
message: MESSAGES.ERRORS.runnerDependencyMissing(runnerDependencyKeys)
|
|
26321
|
+
};
|
|
26322
|
+
}
|
|
26323
|
+
|
|
26245
26324
|
// src/pack/discovery/playwright-list.ts
|
|
26246
26325
|
var SPAWN_TIMEOUT_MS = 60000;
|
|
26247
26326
|
var WIN_CLI_REL = [
|
|
@@ -26578,6 +26657,8 @@ function isSecretFile(entryName) {
|
|
|
26578
26657
|
}
|
|
26579
26658
|
|
|
26580
26659
|
// src/pack/actions/pack.ts
|
|
26660
|
+
var TMH_PROJECT_KEY_PATTERN = /^[A-Z0-9]+$/;
|
|
26661
|
+
var TMH_PROJECT_KEY_MAX_LENGTH = 255;
|
|
26581
26662
|
async function executePack(options) {
|
|
26582
26663
|
const fs = getFileSystem();
|
|
26583
26664
|
const absoluteProjectPath = fs.path.resolve(options.projectPath);
|
|
@@ -26606,12 +26687,18 @@ async function executePack(options) {
|
|
|
26606
26687
|
message: MESSAGES.ERRORS.INVALID_PROJECT_PATH
|
|
26607
26688
|
};
|
|
26608
26689
|
}
|
|
26609
|
-
if (
|
|
26690
|
+
if (options.createTestCases && (options.tmhProjectKey === undefined || options.tmhProjectKey.trim().length === 0)) {
|
|
26610
26691
|
return {
|
|
26611
26692
|
success: false,
|
|
26612
26693
|
message: MESSAGES.ERRORS.TMH_PROJECT_KEY_REQUIRED
|
|
26613
26694
|
};
|
|
26614
26695
|
}
|
|
26696
|
+
if (options.tmhProjectKey !== undefined && options.tmhProjectKey.trim().length > 0 && (!TMH_PROJECT_KEY_PATTERN.test(options.tmhProjectKey.trim()) || options.tmhProjectKey.trim().length > TMH_PROJECT_KEY_MAX_LENGTH)) {
|
|
26697
|
+
return {
|
|
26698
|
+
success: false,
|
|
26699
|
+
message: MESSAGES.ERRORS.tmhProjectKeyInvalid(options.tmhProjectKey.trim())
|
|
26700
|
+
};
|
|
26701
|
+
}
|
|
26615
26702
|
const stat = await fs.stat(absoluteProjectPath);
|
|
26616
26703
|
if (!stat?.isDirectory()) {
|
|
26617
26704
|
return {
|
|
@@ -26624,6 +26711,12 @@ async function executePack(options) {
|
|
|
26624
26711
|
return { success: false, message: manifest.message };
|
|
26625
26712
|
}
|
|
26626
26713
|
logger.info(`Detected build tool: ${manifest.buildTool}`);
|
|
26714
|
+
if (framework.type === "playwright" && await findConfigFile(absoluteProjectPath) === null) {
|
|
26715
|
+
return {
|
|
26716
|
+
success: false,
|
|
26717
|
+
message: MESSAGES.ERRORS.PLAYWRIGHT_CONFIG_MISSING
|
|
26718
|
+
};
|
|
26719
|
+
}
|
|
26627
26720
|
logger.info(MESSAGES.INFO.DISCOVERING_TESTS);
|
|
26628
26721
|
const { tests } = await language.discoverTests(absoluteProjectPath, packageName);
|
|
26629
26722
|
if (tests.length === 0) {
|
|
@@ -26907,7 +27000,7 @@ var PACK_EXAMPLES = [
|
|
|
26907
27000
|
},
|
|
26908
27001
|
{
|
|
26909
27002
|
Description: "Preview what would be discovered and packaged, without writing anything",
|
|
26910
|
-
Command: "uip tm pack --project-path ./e2e --type playwright --dry-run",
|
|
27003
|
+
Command: "uip tm pack --project-path ./e2e --type playwright --project-key DEMO --dry-run",
|
|
26911
27004
|
Output: {
|
|
26912
27005
|
Code: "ExternalTestPackDryRun",
|
|
26913
27006
|
Data: {
|
|
@@ -26918,7 +27011,7 @@ var PACK_EXAMPLES = [
|
|
|
26918
27011
|
}
|
|
26919
27012
|
];
|
|
26920
27013
|
var registerPackCommand = (program2) => {
|
|
26921
|
-
program2.command("pack").description("Pack a Playwright test suite into a UiPath .nupkg for Test Manager. " + "For UiPath Studio test automation projects, use `rpa-legacy pack` instead.").requiredOption("--project-path <path>", "Path to the test project root (for playwright: the directory containing package.json, a lockfile, and playwright.config)").addOption(new Option("--type <type>", "Test framework").choices(SUPPORTED_TYPES).makeOptionMandatory()).option("-n, --name <name>", "Package name (default: project folder name)").option("--package-version <version>", "Package version", DEFAULT_VERSION).option("-o, --output <dir>", "Output directory", DEFAULT_OUTPUT_DIR).option("--author <author>", "Package author", DEFAULT_AUTHOR).option("--description <desc>", "Package description").option("--no-create-test-cases", "Do not auto-create Test Cases in Test Manager when this package is uploaded. Per-test label metadata is still embedded, so labels can be applied later when Test Cases are created.").option("--project-key <key>", "Test Manager project key that auto-created Test Cases land in (e.g. MYPROJ). Required when --create-test-cases is on (the default).").option("--dry-run", "Preview what would be packaged without creating").examples(PACK_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27014
|
+
program2.command("pack").description("Pack a Playwright test suite into a UiPath .nupkg for Test Manager. " + "For UiPath Studio test automation projects, use `rpa-legacy pack` instead.").requiredOption("--project-path <path>", "Path to the test project root (for playwright: the directory containing package.json, a lockfile, and playwright.config). All three are required — the config is what defines the Playwright projects that --playwright-projects can later select.").addOption(new Option("--type <type>", "Test framework").choices(SUPPORTED_TYPES).makeOptionMandatory()).option("-n, --name <name>", "Package name (default: project folder name)").option("--package-version <version>", "Package version", DEFAULT_VERSION).option("-o, --output <dir>", "Output directory", DEFAULT_OUTPUT_DIR).option("--author <author>", "Package author", DEFAULT_AUTHOR).option("--description <desc>", "Package description").option("--no-create-test-cases", "Do not auto-create Test Cases in Test Manager when this package is uploaded. Per-test label metadata is still embedded, so labels can be applied later when Test Cases are created.").option("--project-key <key>", "Test Manager project key that auto-created Test Cases land in (e.g. MYPROJ) - uppercase letters and digits only. Required when --create-test-cases is on (the default). Packing is offline, so the format is checked here; whether the project exists is confirmed when the package is ingested.").option("--dry-run", "Preview what would be packaged without creating it. Applies the same validation as a real pack, so a dry run that succeeds will pack.").examples(PACK_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26922
27015
|
const [error, result] = await catchError2(executePack({
|
|
26923
27016
|
projectPath: options.projectPath,
|
|
26924
27017
|
type: options.type,
|
|
@@ -34519,4 +34612,4 @@ var registerCommands = async (program2) => {
|
|
|
34519
34612
|
|
|
34520
34613
|
export { Command, metadata, registerCommands };
|
|
34521
34614
|
|
|
34522
|
-
//# debugId=
|
|
34615
|
+
//# debugId=ACC3CC627A5318FD64756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/test-manager-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.201.0-preview.
|
|
4
|
+
"version": "1.201.0-preview.122",
|
|
5
5
|
"description": "Manage test cases, test sets, executions, and results.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "6c56f56100be96231fccbaa59e99d64d94808d58"
|
|
30
30
|
}
|