flakiness 0.223.0 → 0.225.0

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/lib/cli/cli.js CHANGED
@@ -1021,7 +1021,7 @@ var WireTypes;
1021
1021
  })(WireTypes || (WireTypes = {}));
1022
1022
 
1023
1023
  // src/cli/cli.ts
1024
- import chalk5 from "chalk";
1024
+ import { styleText as styleText5 } from "node:util";
1025
1025
  import { Command, Option } from "commander";
1026
1026
  import debug2 from "debug";
1027
1027
  import fs7 from "fs";
@@ -1030,7 +1030,7 @@ import path7 from "path";
1030
1030
  // ../package.json
1031
1031
  var package_default = {
1032
1032
  name: "@flakiness/monorepo",
1033
- version: "0.223.0",
1033
+ version: "0.225.0",
1034
1034
  type: "module",
1035
1035
  private: true,
1036
1036
  scripts: {
@@ -1367,7 +1367,7 @@ var UserSession = class _UserSession {
1367
1367
  };
1368
1368
 
1369
1369
  // src/cli/cmd-access.ts
1370
- import chalk from "chalk";
1370
+ import { styleText } from "node:util";
1371
1371
 
1372
1372
  // src/authenticate.ts
1373
1373
  import { GithubOIDC } from "@flakiness/sdk";
@@ -1418,11 +1418,11 @@ async function cmdAccess(options) {
1418
1418
  if (options.json) {
1419
1419
  console.log(JSON.stringify(result, null, 2));
1420
1420
  } else if (!options.quiet) {
1421
- console.log(chalk.bold(`Project: `) + `${orgSlug}/${projectSlug}`);
1422
- console.log(chalk.bold(`Auth: `) + (result.auth ?? chalk.dim("none")));
1423
- console.log(chalk.bold(`Access: `) + (result.access ? chalk.green("granted") : chalk.red("denied")));
1421
+ console.log(styleText("bold", `Project: `) + `${orgSlug}/${projectSlug}`);
1422
+ console.log(styleText("bold", `Auth: `) + (result.auth ?? styleText("dim", "none")));
1423
+ console.log(styleText("bold", `Access: `) + (result.access ? styleText("green", "granted") : styleText("red", "denied")));
1424
1424
  if (result.permissions.length)
1425
- console.log(chalk.bold(`Perms: `) + result.permissions.join(", "));
1425
+ console.log(styleText("bold", `Perms: `) + result.permissions.join(", "));
1426
1426
  }
1427
1427
  if (!result.access)
1428
1428
  process.exitCode = 1;
@@ -1450,7 +1450,7 @@ async function cmdAuthLogout() {
1450
1450
  }
1451
1451
 
1452
1452
  // src/cli/cmd-auth-whoami.ts
1453
- import chalk2 from "chalk";
1453
+ import { styleText as styleText2 } from "node:util";
1454
1454
  async function cmdAuthWhoami() {
1455
1455
  const session = await UserSession.load();
1456
1456
  if (!session || !await printLoggedInUser(session)) {
@@ -1461,9 +1461,9 @@ async function cmdAuthWhoami() {
1461
1461
  async function printLoggedInUser(session) {
1462
1462
  try {
1463
1463
  const user = await session.api.user.whoami.GET();
1464
- const superUser = user.isSuperUser ? " " + chalk2.red.bold("[SUPERUSER]") : "";
1465
- console.log(`Logged in as ${chalk2.bold(user.userName)} (${user.userLogin})${superUser}`);
1466
- console.log(`Endpoint: ${chalk2.cyan(session.endpoint())}`);
1464
+ const superUser = user.isSuperUser ? " " + styleText2(["red", "bold"], "[SUPERUSER]") : "";
1465
+ console.log(`Logged in as ${styleText2("bold", user.userName)} (${user.userLogin})${superUser}`);
1466
+ console.log(`Endpoint: ${styleText2("cyan", session.endpoint())}`);
1467
1467
  return true;
1468
1468
  } catch (e2) {
1469
1469
  return false;
@@ -2162,7 +2162,7 @@ function asInlineCode(text) {
2162
2162
 
2163
2163
  // src/cli/cmd-skills-install.ts
2164
2164
  import { execSync } from "child_process";
2165
- import chalk3 from "chalk";
2165
+ import { styleText as styleText3 } from "node:util";
2166
2166
  import fs5 from "fs";
2167
2167
  import os3 from "os";
2168
2168
  import path5 from "path";
@@ -2208,19 +2208,19 @@ async function cmdSkillsInstall(options) {
2208
2208
  await fs5.promises.mkdir(path5.dirname(filePath), { recursive: true });
2209
2209
  await fs5.promises.writeFile(filePath, file.content);
2210
2210
  }
2211
- console.log(`${chalk3.green("\u2713")} Installed ${chalk3.bold(skill.name)} \u2192 ${chalk3.dim(dest)}`);
2211
+ console.log(`${styleText3("green", "\u2713")} Installed ${styleText3("bold", skill.name)} \u2192 ${styleText3("dim", dest)}`);
2212
2212
  }
2213
2213
  console.log("\nRestart your agent to pick up new skills.");
2214
2214
  }
2215
2215
 
2216
2216
  // src/cli/cmd-upload.ts
2217
2217
  import { readReport, uploadReport } from "@flakiness/sdk";
2218
- import chalk4 from "chalk";
2218
+ import { styleText as styleText4 } from "node:util";
2219
2219
  import fs6 from "fs/promises";
2220
2220
  import ora2 from "ora";
2221
2221
  import path6 from "path";
2222
- var warn = (txt) => console.warn(chalk4.yellow(`[flakiness.io] WARN: ${txt}`));
2223
- var err = (txt) => console.error(chalk4.red(`[flakiness.io] Error: ${txt}`));
2222
+ var warn = (txt) => console.warn(styleText4("yellow", `[flakiness.io] WARN: ${txt}`));
2223
+ var err = (txt) => console.error(styleText4("red", `[flakiness.io] Error: ${txt}`));
2224
2224
  async function cmdUpload(relativePaths, options) {
2225
2225
  const total = relativePaths.length;
2226
2226
  const spinner = options.progress ? ora2("Uploading reports:").start() : void 0;
@@ -2418,9 +2418,9 @@ var optViewerUrl = new Option("-e, --viewer-url <url>", "A URL where report view
2418
2418
  program.command("show").description("Show flakiness report").argument("[relative-path]", "Path to the folder that contains `report.json`", "flakiness-report").addOption(optViewerUrl).action(async (arg, options) => runCommand(async () => {
2419
2419
  const dir = path7.resolve(arg ?? "flakiness-report");
2420
2420
  if (!fs7.existsSync(dir))
2421
- throw new Error(`Directory ${chalk5.bold(dir)} does not exist`);
2421
+ throw new Error(`Directory ${styleText5("bold", dir)} does not exist`);
2422
2422
  if (!fs7.existsSync(path7.join(dir, "report.json")))
2423
- throw new Error(`The folder ${chalk5.bold(dir)} does not contain report.json - is this a Flakiness report folder?`);
2423
+ throw new Error(`The folder ${styleText5("bold", dir)} does not contain report.json - is this a Flakiness report folder?`);
2424
2424
  await showReport(dir, {
2425
2425
  reportViewerUrl: options.viewerUrl
2426
2426
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flakiness",
3
- "version": "0.223.0",
3
+ "version": "0.225.0",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "flakiness": "./lib/cli/cli.js"
@@ -23,14 +23,13 @@
23
23
  "@types/debug": "^4.1.12",
24
24
  "@types/express": "^4.17.20",
25
25
  "gray-matter": "^4.0.3",
26
- "@flakiness/server": "0.223.0",
27
- "@flakiness/shared": "0.223.0"
26
+ "@flakiness/server": "0.225.0",
27
+ "@flakiness/shared": "0.225.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "@flakiness/flakiness-report": "^0.28.0",
31
- "@flakiness/sdk": "^2.2.1",
31
+ "@flakiness/sdk": "^2.4.0",
32
32
  "@rgrove/parse-xml": "^4.2.0",
33
- "chalk": "^5.6.2",
34
33
  "commander": "^14.0.0",
35
34
  "debug": "^4.4.3",
36
35
  "mime": "^4.1.0",