careervivid 1.12.46 → 1.12.48

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.
@@ -1 +1 @@
1
- {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAMF,eAAO,MAAM,UAAU,sXAMtB,CAAC;AAEF,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAID,wBAAgB,YAAY,IAAI,IAAI,CA0BnC;AAID,wBAAgB,aAAa,IAAI,MAAM,CAOtC"}
1
+ {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAMF,eAAO,MAAM,UAAU,sXAMtB,CAAC;AAEF,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAID,wBAAgB,YAAY,IAAI,IAAI,CA6BnC;AAID,wBAAgB,aAAa,IAAI,MAAM,CAOtC"}
package/dist/branding.js CHANGED
@@ -1,6 +1,11 @@
1
1
  import chalk from "chalk";
2
2
  import boxen from "boxen";
3
3
  import gradient from "gradient-string";
4
+ import { readFileSync } from "fs";
5
+ import { join, dirname } from "path";
6
+ import { fileURLToPath } from "url";
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const pkg = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
4
9
  // ── Colors ───────────────────────────────────────────────────────────────────
5
10
  export const COLORS = {
6
11
  primary: "#3b82f6", // Blue-500
@@ -26,22 +31,25 @@ export function printWelcome() {
26
31
  const logo = getBrandedLogo();
27
32
  const content = `
28
33
  ${chalk.bold("Welcome to the CareerVivid CLI!")}
29
- ${chalk.dim("Your command-center for personal brand building.")}
34
+ ${chalk.dim("Your AI-powered career management command-center.")}
30
35
 
31
36
  ${chalk.white("To get started, run:")}
32
- ${chalk.cyan(" cv auth login")}
37
+ ${chalk.cyan(" cv login")}
33
38
 
34
39
  ${chalk.dim("Quick Commands:")}
35
- ${chalk.white("• cv new")} Scaffold a new diagram
36
- ${chalk.white("• cv publish <file>")} Publish to your portfolio
37
- ${chalk.white("• cv help")} Show all commands
40
+ ${chalk.white("• cv agent")} Start the AI career agent
41
+ ${chalk.white("• cv jobs hunt")} Search & score job openings
42
+ ${chalk.white("• cv resumes list")} View your AI-parsed resumes
43
+ ${chalk.white("• cv referral")} View your referral dashboard
44
+ ${chalk.white("• cv publish <file>")} Publish to CareerVivid
45
+ ${chalk.white("• cv help")} Show all commands
38
46
  `;
39
47
  console.log(boxen(logo + "\n" + content, {
40
48
  padding: 1,
41
49
  margin: 1,
42
50
  borderStyle: "round",
43
51
  borderColor: COLORS.primary,
44
- title: chalk.bold.blue(" v1.1.13 "),
52
+ title: chalk.bold.blue(` v${pkg?.version ?? "latest"} `),
45
53
  titleAlignment: "right",
46
54
  }));
47
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/commands/referral.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAiFvD"}
1
+ {"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/commands/referral.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAsGvD"}
@@ -1,3 +1,4 @@
1
+ import boxen from "boxen";
1
2
  import chalk from "chalk";
2
3
  import ora from "ora";
3
4
  import { getReferralStats, isApiError } from "../api.js";
@@ -8,75 +9,84 @@ function getProgressBar(current, total, width = 30) {
8
9
  const emptyLength = width - filledLength;
9
10
  const filledBar = '█'.repeat(filledLength);
10
11
  const emptyBar = '░'.repeat(emptyLength);
11
- return `[${chalk.green(filledBar)}${chalk.dim(emptyBar)}]`;
12
+ return `[${chalk.cyan(filledBar)}${chalk.dim(emptyBar)}]`;
12
13
  }
13
14
  export function registerReferralCommand(program) {
14
15
  const referralCmd = program
15
16
  .command("referral")
16
17
  .description("Manage your CareerVivid referral code, track progress, and view rewards")
17
- .option("--code", "Print your referral code")
18
- .option("--link", "Print your full referral link")
19
- .option("--draft-message", "Print a pre-written shareable message")
20
- .option("--status", "Show your referral progress and rewards")
21
- .option("--list", "List your successfully referred users")
18
+ .option("-c, --code", "Retrieve and display your unique referral code")
19
+ .option("-l, --link", "Generate and display your full shareable referral URL")
20
+ .option("-d, --draft-message", "Generate a highly-converting draft message for your network")
21
+ .option("-s, --status", "Display current state of active referrals (clicks, signups, progress)")
22
+ .option("-i, --list", "Output a detailed list of your historical referral data")
22
23
  .option("--json", "Output raw JSON data")
23
24
  .action(async (opts) => {
24
25
  const isJson = opts.json ?? process.argv.includes("--json");
25
- const spinner = ora("Fetching referral stats…").start();
26
+ const spinner = ora({
27
+ text: chalk.dim("Fetching referral ecosystem data..."),
28
+ color: "cyan"
29
+ }).start();
26
30
  const result = await getReferralStats();
27
31
  if (isApiError(result)) {
28
- spinner.fail("Failed to get referral stats.");
32
+ spinner.fail(chalk.red("Failed to sync referral data."));
29
33
  printError(result.message, undefined, isJson);
30
34
  process.exit(1);
31
35
  }
32
- spinner.stop();
33
- const baseUrl = "https://careervivid.app/register?ref=";
36
+ spinner.succeed(chalk.dim("Referral data synchronized successfully."));
37
+ const baseUrl = "https://careervivid.app/referral?ref=";
34
38
  const fullLink = `${baseUrl}${result.code}`;
35
39
  if (isJson) {
36
- console.log(JSON.stringify({ ...result, fullLink }));
40
+ console.log(JSON.stringify({ ...result, fullLink }, null, 2));
37
41
  return;
38
42
  }
39
- // Fallback to show all if no specific flags provided
40
- const showAll = !opts.code && !opts.link && !opts.draftMessage && !opts.status && !opts.list;
41
- if (opts.code || showAll) {
42
- console.log(`\n ${chalk.cyan.bold("Your Referral Code:")} ${chalk.white.bold(result.code)}`);
43
+ // If no specific flag is provided, show the summary dashboard
44
+ const showSummary = !opts.code && !opts.link && !opts.draftMessage && !opts.status && !opts.list;
45
+ console.log(""); // Spacer
46
+ // ── Flag: --code ──────────────────────────────────────────────────
47
+ if (opts.code) {
48
+ console.log(boxen(`${chalk.cyan.bold("REFERRAL CODE")}\n\n${chalk.white.bold.bgCyan(" " + result.code + " ")}`, { padding: 1, margin: 0, borderStyle: "round", borderColor: "cyan" }));
43
49
  }
44
- if (opts.link || showAll) {
45
- console.log(`\n ${chalk.cyan.bold("Your Referral Link:")} ${chalk.underline.blue(fullLink)}`);
50
+ // ── Flag: --link ──────────────────────────────────────────────────
51
+ if (opts.link) {
52
+ console.log(boxen(`${chalk.cyan.bold("SHAREABLE LINK")}\n\n${chalk.underline.blue(fullLink)}`, { padding: 1, margin: 0, borderStyle: "round", borderColor: "blue" }));
46
53
  }
47
- if (opts.draftMessage || showAll) {
48
- console.log(`\n ${chalk.magenta.bold("Share Message:")}`);
49
- console.log(chalk.dim(` --------------------------------------------------`));
50
- console.log(` Accelerate Your Career Path with CareerVivid! 🚀`);
51
- console.log();
52
- console.log(` Use my exclusive code ${chalk.bold(result.code)} to get 2 Months of Premium for free.`);
53
- console.log();
54
- console.log(` Sign up here: ${fullLink}`);
55
- console.log(chalk.dim(` --------------------------------------------------`));
54
+ // ── Flag: --draft-message ─────────────────────────────────────────
55
+ if (opts.draftMessage) {
56
+ const message = `Accelerate Your Career Path with CareerVivid! 🚀\n\nI've been using CareerVivid to automate my job tracker and resume building. It's a game-changer.\n\nUse my exclusive code ${result.code} to get 2 MONTHS of PRO for FREE.\n\nClaim it here: ${fullLink}`;
57
+ console.log(boxen(`${chalk.magenta.bold("HIGH-CONVERTING DRAFT")}\n\n${chalk.white(message)}`, { padding: 1, margin: 0, borderStyle: "round", borderColor: "magenta", title: "Copy & Paste" }));
56
58
  }
57
- if (opts.status || showAll) {
58
- const remaining = result.maxReferrals - result.totalReferred;
59
- console.log(`\n ${chalk.yellow.bold("Redemption Progress:")}`);
60
- console.log(` ${getProgressBar(result.totalReferred, result.maxReferrals)} ${chalk.white.bold(`${result.totalReferred}/${result.maxReferrals}`)}`);
61
- console.log(` ${chalk.dim(`${remaining} referrals remaining\n`)}`);
62
- console.log(` ${chalk.cyan.bold("The Rewards:")}`);
63
- console.log(` ${chalk.green.bold("They Get:")} 2 months free Premium, 1000 AI credits/month, All premium templates`);
64
- console.log(` ${chalk.green.bold("You Get:")} 1 month free Premium per successful referral (Up to 5 months)`);
59
+ // ── Flag: --status ───────────────────────────────────────────────
60
+ if (opts.status || showSummary) {
61
+ const remaining = Math.max(0, result.maxReferrals - result.totalReferred);
62
+ const statusContent = [
63
+ `${chalk.yellow.bold("REDEMPTION PROGRESS")}`,
64
+ `${getProgressBar(result.totalReferred, result.maxReferrals)} ${chalk.bold(`${result.totalReferred}/${result.maxReferrals}`)}`,
65
+ `${chalk.dim(`${remaining} referrals remaining to maximize rewards`)}`,
66
+ "",
67
+ `${chalk.cyan.bold("ACTIVE REWARDS")}`,
68
+ `${chalk.green("✔")} ${chalk.white("THEY GET:")} 2 Months Pro + 1000 AI Credits`,
69
+ `${chalk.green("✔")} ${chalk.white("YOU GET:")} 1 Month Pro extension per signup`
70
+ ].join("\n");
71
+ console.log(boxen(statusContent, { padding: 1, borderStyle: "double", borderColor: "yellow" }));
65
72
  }
66
- if (opts.list || showAll) {
67
- console.log(`\n ${chalk.blue.bold("Referred Users:")}`);
73
+ // ── Flag: --list ──────────────────────────────────────────────────
74
+ if (opts.list) {
75
+ const listTitle = chalk.blue.bold("REFERRAL HISTORY");
68
76
  if (result.referredUsers.length === 0) {
69
- console.log(` ${chalk.dim("No referrals yet. Share your code to get started!")}`);
77
+ console.log(boxen(`${listTitle}\n\n${chalk.dim("No successful referrals recorded yet.\nStart sharing to earn Pro extensions!")}`, { padding: 1, borderStyle: "round", borderColor: "blue" }));
70
78
  }
71
79
  else {
72
- result.referredUsers.forEach((u, i) => {
73
- const date = u.signupDate
74
- ? new Date(u.signupDate).toLocaleDateString()
75
- : "Recently";
76
- console.log(` ${chalk.dim(`${i + 1}.`)} ${chalk.white(u.email)} ${chalk.dim(`(Joined: ${date})`)} ${chalk.green('✓ active')}`);
80
+ const rows = result.referredUsers.map((u, i) => {
81
+ const date = u.signupDate ? new Date(u.signupDate).toLocaleDateString() : "Recently";
82
+ return `${chalk.dim(`${i + 1}.`)} ${chalk.white(u.email.padEnd(25))} ${chalk.dim(`[${date}]`)} ${chalk.green("● active")}`;
77
83
  });
84
+ console.log(boxen(`${listTitle}\n\n${rows.join("\n")}`, { padding: 1, borderStyle: "round", borderColor: "blue" }));
78
85
  }
79
86
  }
80
- console.log("\n");
87
+ if (showSummary) {
88
+ console.log(chalk.dim(` Use ${chalk.cyan('cv referral --help')} to see all available flags.`));
89
+ }
90
+ console.log(""); // Final spacer
81
91
  });
82
92
  }
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ const pkg = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8")
58
58
  const program = new Command();
59
59
  program
60
60
  .name("cv")
61
- .description("CareerVivid CLI — publish articles, diagrams, and portfolio updates from your terminal or AI agent")
61
+ .description("CareerVivid CLI — AI-powered career management: job hunting, resume building, referrals, and portfolio publishing.")
62
62
  .version(pkg.version, "-v, --version", "Print CLI version")
63
63
  .addHelpText("before", getHelpHeader())
64
64
  .helpOption("-h, --help", "Show help");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careervivid",
3
- "version": "1.12.46",
3
+ "version": "1.12.48",
4
4
  "description": "Official CLI for CareerVivid — publish articles, diagrams, and portfolio updates from your terminal or AI agent",
5
5
  "type": "module",
6
6
  "bin": {