Update cli.js

This commit is contained in:
2024-11-20 13:35:54 +00:00
parent 9c26d3f39b
commit 1f80df68cc

View File

@@ -261,7 +261,7 @@ var setCcVersion = (v) => {
}; };
var cypressPkg = require2("cypress/package.json"); var cypressPkg = require2("cypress/package.json");
var pkg = require2("@krivega/cc/package.json"); var pkg = require2("@bart/cc/package.json");
initCapture(); initCapture();
setCypressVersion(cypressPkg.version); setCypressVersion(cypressPkg.version);
setCcVersion(pkg.version); setCcVersion(pkg.version);
@@ -479,7 +479,7 @@ var bootCypress = async (params) => {
try { try {
const f = import_fs.default.readFileSync(tempFilePath, "utf-8"); const f = import_fs.default.readFileSync(tempFilePath, "utf-8");
if (!f) { if (!f) {
throw new Error("Is @krivega/cc/plugin installed?"); throw new Error("Is @bart/cc/plugin installed?");
} }
debug5("cypress config '%s': '%s'", tempFilePath, f); debug5("cypress config '%s': '%s'", tempFilePath, f);
return JSON.parse(f); return JSON.parse(f);
@@ -488,7 +488,7 @@ var bootCypress = async (params) => {
info(bold("Cypress stdout:\n"), stdout2); info(bold("Cypress stdout:\n"), stdout2);
info(bold("Cypress stderr:\n"), stderr); info(bold("Cypress stderr:\n"), stderr);
throw new ValidationError(`Unable to resolve cypress configuration throw new ValidationError(`Unable to resolve cypress configuration
- make sure that '@krivega/cc/plugin' is installed - make sure that '@bart/cc/plugin' is installed
- report the issue together with cypress stdout and stderr - report the issue together with cypress stdout and stderr
`); `);
} }
@@ -815,7 +815,7 @@ async function getClient() {
"x-cypress-request-attempt": config["axios-retry"]?.retryCount ?? 0, "x-cypress-request-attempt": config["axios-retry"]?.retryCount ?? 0,
"x-cypress-version": _cypressVersion ?? "0.0.0", "x-cypress-version": _cypressVersion ?? "0.0.0",
"x-ccy-version": ccyVerson, "x-ccy-version": ccyVerson,
"User-Agent": `@krivega/cc/${ccyVerson}` "User-Agent": `@bart/cc/${ccyVerson}`
}; };
if (_runId) { if (_runId) {
headers["x-cypress-run-id"] = _runId; headers["x-cypress-run-id"] = _runId;
@@ -1540,7 +1540,7 @@ var SpecAfterResult = class _SpecAfterResult {
static getDummyTestAttemptError(attemptState) { static getDummyTestAttemptError(attemptState) {
return (0, import_ts_pattern4.match)(attemptState).with("failed", () => ({ return (0, import_ts_pattern4.match)(attemptState).with("failed", () => ({
name: "Error", name: "Error",
message: "[@krivega/cc] Could not get cypress attempt error details", message: "[@bart/cc] Could not get cypress attempt error details",
stack: "", stack: "",
codeFrame: null codeFrame: null
})).with("skipped", () => ({ })).with("skipped", () => ({
@@ -3344,7 +3344,7 @@ async function run(params = {}) {
config, config,
browser: validatedParams.browser browser: validatedParams.browser
}); });
info(`@krivega/cc version: ${dim(_ccVersion)}`); info(`@bart/cc version: ${dim(_ccVersion)}`);
info(`Cypress version: ${dim(_cypressVersion)}`); info(`Cypress version: ${dim(_cypressVersion)}`);
info("Discovered %d spec files", specs.length); info("Discovered %d spec files", specs.length);
info( info(
@@ -3497,7 +3497,7 @@ var toBoolean = (value) => {
init_cjs_shims(); init_cjs_shims();
var import_extra_typings = __toESM(require_extra_typings()); var import_extra_typings = __toESM(require_extra_typings());
var createProgram = (command = new import_extra_typings.Command()) => command.name("@krivega/cc").description( var createProgram = (command = new import_extra_typings.Command()) => command.name("@bart/cc").description(
` `
Run Cypress tests on CI using https://cc.dev or https://sorry-cypress.dev as an orchestration and reporting service Run Cypress tests on CI using https://cc.dev or https://sorry-cypress.dev as an orchestration and reporting service
@@ -3569,12 +3569,12 @@ ${getLegalNotice()}
).addOption( ).addOption(
new import_extra_typings.Option( new import_extra_typings.Option(
"--cloud-config-file <path>", "--cloud-config-file <path>",
"Specify the config file for @krivega/cc, defaults to 'cc.config.js' and will be searched in the project root, unless an aboslue path is provided" "Specify the config file for @bart/cc, defaults to 'cc.config.js' and will be searched in the project root, unless an aboslue path is provided"
).default(void 0) ).default(void 0)
).addOption( ).addOption(
new import_extra_typings.Option( new import_extra_typings.Option(
`--cloud-debug [true | string]`, `--cloud-debug [true | string]`,
`Enable debug mode for @krivega/cc, this will print out logs for troubleshooting. Values: [true | ${Object.values( `Enable debug mode for @bart/cc, this will print out logs for troubleshooting. Values: [true | ${Object.values(
DebugMode DebugMode
).join( ).join(
" | " " | "