careervivid 1.1.13 → 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
@@ -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
  }
@@ -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,6 +30,7 @@ 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")
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careervivid",
3
- "version": "1.1.13",
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": {