@codacy/verity-cli 0.34.5-experimental.ae6a95c → 0.34.5-experimental.e9e114a
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/bin/verity.js +15 -14
- package/package.json +1 -1
package/bin/verity.js
CHANGED
|
@@ -25455,30 +25455,30 @@ function registerStandardCommands(program2) {
|
|
|
25455
25455
|
const globals = program2.opts();
|
|
25456
25456
|
const tokenResult = await resolveToken(globals.token);
|
|
25457
25457
|
if (!tokenResult.ok) {
|
|
25458
|
-
printError(tokenResult.error);
|
|
25458
|
+
printError(terminalText(tokenResult.error, 300));
|
|
25459
25459
|
process.exit(1);
|
|
25460
25460
|
}
|
|
25461
25461
|
const urlResult = await resolveServiceUrl(globals.serviceUrl);
|
|
25462
25462
|
if (!urlResult.ok) {
|
|
25463
|
-
printError(urlResult.error);
|
|
25463
|
+
printError(terminalText(urlResult.error, 300));
|
|
25464
25464
|
process.exit(1);
|
|
25465
25465
|
}
|
|
25466
25466
|
let yamlContent;
|
|
25467
25467
|
try {
|
|
25468
25468
|
yamlContent = await (0, import_promises10.readFile)(opts.file, "utf-8");
|
|
25469
25469
|
} catch {
|
|
25470
|
-
printError(`Cannot read ${opts.file}`);
|
|
25470
|
+
printError(`Cannot read ${terminalText(opts.file, 200)}`);
|
|
25471
25471
|
process.exit(1);
|
|
25472
25472
|
}
|
|
25473
25473
|
let content;
|
|
25474
25474
|
try {
|
|
25475
25475
|
content = (0, import_yaml6.parse)(yamlContent);
|
|
25476
25476
|
} catch (err2) {
|
|
25477
|
-
printError(`Invalid YAML in ${opts.file}: ${err2.message}`);
|
|
25477
|
+
printError(`Invalid YAML in ${terminalText(opts.file, 200)}: ${terminalText(err2.message, 300)}`);
|
|
25478
25478
|
process.exit(1);
|
|
25479
25479
|
}
|
|
25480
25480
|
const upload = buildStandardUpload(content, readVerityIgnoreRaw());
|
|
25481
|
-
if (upload.warning) printWarn(upload.warning);
|
|
25481
|
+
if (upload.warning) printWarn(terminalText(upload.warning, 600));
|
|
25482
25482
|
const result = await apiRequest({
|
|
25483
25483
|
method: "POST",
|
|
25484
25484
|
path: "/standards",
|
|
@@ -25494,16 +25494,16 @@ function registerStandardCommands(program2) {
|
|
|
25494
25494
|
printInfo(`Standard uploaded (version ${versionText(result.data.version)})`);
|
|
25495
25495
|
printJson(result.data);
|
|
25496
25496
|
});
|
|
25497
|
-
standard.command("get").description("Get the current Standard from the service").option("--version <n>", "Specific version number").action(async (opts) => {
|
|
25497
|
+
standard.command("get").description("Get the current Standard from the service").option("--version <n>", "Specific version number").option("--resolved", "Show it as a review reads it: the catalogue packs in `extends` expanded into patterns").action(async (opts) => {
|
|
25498
25498
|
const globals = program2.opts();
|
|
25499
25499
|
const tokenResult = await resolveToken(globals.token);
|
|
25500
25500
|
if (!tokenResult.ok) {
|
|
25501
|
-
printError(tokenResult.error);
|
|
25501
|
+
printError(terminalText(tokenResult.error, 300));
|
|
25502
25502
|
process.exit(1);
|
|
25503
25503
|
}
|
|
25504
25504
|
const urlResult = await resolveServiceUrl(globals.serviceUrl);
|
|
25505
25505
|
if (!urlResult.ok) {
|
|
25506
|
-
printError(urlResult.error);
|
|
25506
|
+
printError(terminalText(urlResult.error, 300));
|
|
25507
25507
|
process.exit(1);
|
|
25508
25508
|
}
|
|
25509
25509
|
let path = "/standards/latest";
|
|
@@ -25515,6 +25515,7 @@ function registerStandardCommands(program2) {
|
|
|
25515
25515
|
}
|
|
25516
25516
|
path = `/standards/${version}`;
|
|
25517
25517
|
}
|
|
25518
|
+
if (opts.resolved) path += "?resolved=1";
|
|
25518
25519
|
const result = await apiRequest({
|
|
25519
25520
|
method: "GET",
|
|
25520
25521
|
path,
|
|
@@ -25532,12 +25533,12 @@ function registerStandardCommands(program2) {
|
|
|
25532
25533
|
const globals = program2.opts();
|
|
25533
25534
|
const tokenResult = await resolveToken(globals.token);
|
|
25534
25535
|
if (!tokenResult.ok) {
|
|
25535
|
-
printError(tokenResult.error);
|
|
25536
|
+
printError(terminalText(tokenResult.error, 300));
|
|
25536
25537
|
process.exit(1);
|
|
25537
25538
|
}
|
|
25538
25539
|
const urlResult = await resolveServiceUrl(globals.serviceUrl);
|
|
25539
25540
|
if (!urlResult.ok) {
|
|
25540
|
-
printError(urlResult.error);
|
|
25541
|
+
printError(terminalText(urlResult.error, 300));
|
|
25541
25542
|
process.exit(1);
|
|
25542
25543
|
}
|
|
25543
25544
|
const result = await apiRequest({
|
|
@@ -28703,7 +28704,7 @@ function channelSilence(input) {
|
|
|
28703
28704
|
// src/lib/cli-version.ts
|
|
28704
28705
|
function cliVersion() {
|
|
28705
28706
|
try {
|
|
28706
|
-
return true ? "0.34.5-experimental.
|
|
28707
|
+
return true ? "0.34.5-experimental.e9e114a" : "dev";
|
|
28707
28708
|
} catch {
|
|
28708
28709
|
return "dev";
|
|
28709
28710
|
}
|
|
@@ -43086,7 +43087,7 @@ async function recordAnswers(ui, momentIds, telemetry) {
|
|
|
43086
43087
|
await writeSetupState({
|
|
43087
43088
|
moments: momentIds,
|
|
43088
43089
|
...telemetry ? { telemetry } : {},
|
|
43089
|
-
init: { completed_at: (/* @__PURE__ */ new Date()).toISOString(), cli_version: true ? "0.34.5-experimental.
|
|
43090
|
+
init: { completed_at: (/* @__PURE__ */ new Date()).toISOString(), cli_version: true ? "0.34.5-experimental.e9e114a" : "dev" }
|
|
43090
43091
|
});
|
|
43091
43092
|
} catch (err2) {
|
|
43092
43093
|
ui.rail.line(`Could not record the setup answers: ${terminalText(err2.message, 200)}`, "warn");
|
|
@@ -45071,10 +45072,10 @@ function registerLeanCommand(program2) {
|
|
|
45071
45072
|
}
|
|
45072
45073
|
|
|
45073
45074
|
// src/cli.ts
|
|
45074
|
-
program.name("verity").description("CLI for Verity quality gate service").version("0.34.5-experimental.
|
|
45075
|
+
program.name("verity").description("CLI for Verity quality gate service").version("0.34.5-experimental.e9e114a").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
|
|
45075
45076
|
const isTelemetryHelper = actionCommand.name() === "headers" && actionCommand.parent?.name() === "telemetry";
|
|
45076
45077
|
if (!isTelemetryHelper) {
|
|
45077
|
-
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.5-experimental.
|
|
45078
|
+
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.5-experimental.e9e114a");
|
|
45078
45079
|
}
|
|
45079
45080
|
setUserNamedServiceUrl(program.opts().serviceUrl);
|
|
45080
45081
|
try {
|
package/package.json
CHANGED