careervivid 1.1.12 → 1.2.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/dist/api.d.ts CHANGED
@@ -51,5 +51,22 @@ export declare function pingAuth(): Promise<{
51
51
  ok: boolean;
52
52
  error?: string;
53
53
  }>;
54
+ export declare function initPortfolio(title?: string, templateId?: string): Promise<{
55
+ success: boolean;
56
+ portfolioId: string;
57
+ url: string;
58
+ } | ApiError>;
59
+ export declare function updatePortfolioProjects(portfolioId: string, projects: any[], techStack?: string[]): Promise<{
60
+ success: boolean;
61
+ message: string;
62
+ } | ApiError>;
63
+ export declare function updatePortfolioHero(portfolioId: string, hero?: any, theme?: any, seoMetadata?: any): Promise<{
64
+ success: boolean;
65
+ message: string;
66
+ } | ApiError>;
67
+ export declare function uploadPortfolioAsset(image: string, path: string, mimeType: string): Promise<{
68
+ success: boolean;
69
+ downloadUrl: string;
70
+ } | ApiError>;
54
71
  export declare function isApiError(v: unknown): v is ApiError;
55
72
  //# sourceMappingURL=api.d.ts.map
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAA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IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAAC,CAEnJ;AAED,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAAC,CAEnK;AAED,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAAC,CAEpK;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAAC,CAEvJ;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAEpD"}
package/dist/api.js CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { getApiKey, getApiUrl } from "./config.js";
8
8
  // ── Helpers ───────────────────────────────────────────────────────────────────
9
- const CLI_VERSION = "1.1.12";
9
+ const CLI_VERSION = "1.1.13";
10
10
  function requireApiKey() {
11
11
  const key = getApiKey();
12
12
  if (!key) {
@@ -130,6 +130,18 @@ export async function pingAuth() {
130
130
  }
131
131
  return { ok: true };
132
132
  }
133
+ export async function initPortfolio(title, templateId) {
134
+ return apiRequest("POST", "initPortfolio", { title, templateId });
135
+ }
136
+ export async function updatePortfolioProjects(portfolioId, projects, techStack) {
137
+ return apiRequest("PATCH", "updatePortfolioProjects", { portfolioId, projects, techStack });
138
+ }
139
+ export async function updatePortfolioHero(portfolioId, hero, theme, seoMetadata) {
140
+ return apiRequest("PATCH", "updatePortfolioHero", { portfolioId, hero, theme, seoMetadata });
141
+ }
142
+ export async function uploadPortfolioAsset(image, path, mimeType) {
143
+ return apiRequest("POST", "uploadPortfolioAsset", { image, path, mimeType });
144
+ }
133
145
  export function isApiError(v) {
134
146
  return typeof v === "object" && v !== null && v.isError === true;
135
147
  }
package/dist/branding.js CHANGED
@@ -41,7 +41,7 @@ ${chalk.white("• cv help")} Show all commands
41
41
  margin: 1,
42
42
  borderStyle: "round",
43
43
  borderColor: COLORS.primary,
44
- title: chalk.bold.blue(" v1.1.4 "),
44
+ title: chalk.bold.blue(" v1.1.13 "),
45
45
  titleAlignment: "right",
46
46
  }));
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiK3D"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoK3D"}
@@ -47,8 +47,11 @@ export function registerLoginCommand(program) {
47
47
  <title>CareerVivid CLI</title>
48
48
  </head>
49
49
  <body style="font-family:sans-serif;text-align:center;padding:60px;background:#0f172a;color:#e2e8f0;">
50
- <h1 style="color:#3b82f6">✅ CLI Authorized!</h1>
51
- <p>You can close this tab and return to your terminal.</p>
50
+ <h1 style="color:#10b981">Authentication Successful!</h1>
51
+ <p>You can safely close this tab and return to your terminal.</p>
52
+ <script>
53
+ setTimeout(() => { window.close(); }, 2000);
54
+ </script>
52
55
  </body>
53
56
  </html>
54
57
  `);
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function registerPortfolioCommand(program: Command): void;
3
+ //# sourceMappingURL=portfolio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../../src/commands/portfolio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,QA4ExD"}
@@ -0,0 +1,72 @@
1
+ import * as fs from "fs";
2
+ import * as api from "../api.js";
3
+ import { printSuccess, printError } from "../output.js";
4
+ export function registerPortfolioCommand(program) {
5
+ const portfolioCmd = program
6
+ .command("portfolio")
7
+ .description("Manage your CareerVivid developer portfolio");
8
+ portfolioCmd
9
+ .command("init")
10
+ .description("Create a foundational portfolio site")
11
+ .option("-t, --title <title>", "Brand title for the portfolio")
12
+ .option("--template <name>", "Template ID (e.g. minimalist, developer)")
13
+ .action(async (options) => {
14
+ const isJson = process.argv.includes("--json");
15
+ if (!isJson)
16
+ console.log("Initializing your CareerVivid portfolio...");
17
+ const result = await api.initPortfolio(options.title, options.template);
18
+ if (api.isApiError(result)) {
19
+ printError(`Init failed: ${result.message}`, result.fields, isJson);
20
+ process.exit(1);
21
+ }
22
+ printSuccess({ "URL": result.url, "ID": result.portfolioId }, isJson);
23
+ if (!isJson)
24
+ console.log(`\nYou can now use AI agents via MCP to sync projects to this ID.`);
25
+ });
26
+ portfolioCmd
27
+ .command("add-project")
28
+ .description("Sync project data to a portfolio")
29
+ .argument("<file>", "Path to a JSON file containing an array of project objects")
30
+ .requiredOption("--id <id>", "The portfolio ID to update")
31
+ .action(async (file, options) => {
32
+ const isJson = process.argv.includes("--json");
33
+ if (!fs.existsSync(file)) {
34
+ printError(`File not found: ${file}`, undefined, isJson);
35
+ process.exit(1);
36
+ }
37
+ let data;
38
+ try {
39
+ data = JSON.parse(fs.readFileSync(file, "utf8"));
40
+ }
41
+ catch (err) {
42
+ printError(`Error parsing JSON: ${err.message}`, undefined, isJson);
43
+ process.exit(1);
44
+ }
45
+ const projects = Array.isArray(data) ? data : [data];
46
+ if (!isJson)
47
+ console.log(`Syncing ${projects.length} project(s) to portfolio ${options.id}...`);
48
+ const result = await api.updatePortfolioProjects(options.id, projects);
49
+ if (api.isApiError(result)) {
50
+ printError(`Sync failed: ${result.message}`, result.fields, isJson);
51
+ process.exit(1);
52
+ }
53
+ printSuccess({ "Message": "Projects successfully synced to portfolio!" }, isJson);
54
+ });
55
+ portfolioCmd
56
+ .command("preview")
57
+ .description("Get a preview URL for your active portfolio")
58
+ .requiredOption("--id <id>", "The portfolio ID")
59
+ .action((options) => {
60
+ const isJson = process.argv.includes("--json");
61
+ printSuccess({ "URL": `https://careervivid.app/portfolio/edit/${options.id}` }, isJson);
62
+ });
63
+ portfolioCmd
64
+ .command("publish")
65
+ .description("Mark your drafts as live")
66
+ .action(() => {
67
+ const isJson = process.argv.includes("--json");
68
+ if (!isJson)
69
+ console.log("Publishing via CLI is mocked for now. Real-time syncs apply immediately on the web.");
70
+ printSuccess({ "Message": "Portfolio synced to live!" }, isJson);
71
+ });
72
+ }
package/dist/index.js CHANGED
@@ -30,11 +30,12 @@ import { registerConfigCommand } from "./commands/config.js";
30
30
  import { registerUpdateCommand } from "./commands/update.js";
31
31
  import { checkForUpdates } from "./updates.js";
32
32
  import { registerWhiteboardCommand, registerNewCommand, registerListTemplatesCommand, } from "./commands/whiteboard.js";
33
+ import { registerPortfolioCommand } from "./commands/portfolio.js";
33
34
  const program = new Command();
34
35
  program
35
36
  .name("cv")
36
37
  .description("CareerVivid CLI — publish articles, diagrams, and portfolio updates from your terminal or AI agent")
37
- .version("1.1.12", "-v, --version", "Print CLI version")
38
+ .version("1.1.13", "-v, --version", "Print CLI version")
38
39
  .addHelpText("before", getHelpHeader())
39
40
  .helpOption("-h, --help", "Show help");
40
41
  registerAuthCommand(program);
@@ -43,6 +44,7 @@ registerPublishCommand(program);
43
44
  registerConfigCommand(program);
44
45
  registerUpdateCommand(program);
45
46
  registerWhiteboardCommand(program);
47
+ registerPortfolioCommand(program);
46
48
  // Shortcuts for whiteboard creation
47
49
  registerNewCommand(program);
48
50
  registerListTemplatesCommand(program);
@@ -7,13 +7,13 @@
7
7
  import chalk from "chalk";
8
8
  import boxen from "boxen";
9
9
  import { getHelpHeader } from "./branding.js";
10
- const VERSION = "1.1.8";
10
+ const VERSION = "1.1.13";
11
11
  const CHANGELOG = [
12
- `${chalk.bold.green("NEW")} Browser-based Login: Run ${chalk.cyan("cv login")} to authenticate securely!`,
13
- `${chalk.bold.blue("NEW")} Author Attribution: Posts now show your real name and avatar from CareerVivid.`,
14
- `${chalk.bold.yellow("NEW")} Official Flag: Admins can use ${chalk.cyan("--official")} to publish as the community.`,
15
- `${chalk.bold.magenta("FIX")} Improved error messages and interactive prompt handling.`,
16
- `${chalk.bold.white("IMP")} Faster startup and built-in update notifications.`,
12
+ `${chalk.bold.green("NEW")} Auto-Close Tabs: Browser authentication tabs now auto-close after 2s!`,
13
+ `${chalk.bold.blue("FIX")} User Identity: Reliable name/avatar fetching during login (no more Anonymous).`,
14
+ `${chalk.bold.yellow("FIX")} Deployment Sync: Automatic recovery from stale JS module import errors.`,
15
+ `${chalk.bold.magenta("NEW")} Profile Editor: Update your display name directly from the settings page.`,
16
+ `${chalk.bold.white("IMP")} Polished login success UI with CareerVivid branding.`,
17
17
  ];
18
18
  export function printPostInstall() {
19
19
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careervivid",
3
- "version": "1.1.12",
3
+ "version": "1.2.0",
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": {