careervivid 1.1.5 → 1.1.6
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/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +2 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +3 -2
- package/dist/commands/whiteboard.d.ts.map +1 -1
- package/dist/commands/whiteboard.js +6 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqJ1D"}
|
package/dist/commands/auth.js
CHANGED
|
@@ -34,7 +34,8 @@ export function registerAuthCommand(program) {
|
|
|
34
34
|
console.log();
|
|
35
35
|
console.log(` ${chalk.bold("Get your API key at:")} ${chalk.cyan("https://careervivid.app/#/developer")}`);
|
|
36
36
|
console.log();
|
|
37
|
-
const
|
|
37
|
+
const enquirer = (await import("enquirer"));
|
|
38
|
+
const prompt = enquirer.default?.prompt || enquirer.prompt;
|
|
38
39
|
const answers = await prompt({
|
|
39
40
|
type: "password",
|
|
40
41
|
name: "key",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqJ7D"}
|
package/dist/commands/publish.js
CHANGED
|
@@ -80,7 +80,7 @@ export function registerPublishCommand(program) {
|
|
|
80
80
|
(filePath !== "stdin" ? inferFormat(filePath) : "markdown");
|
|
81
81
|
const type = opts.type || inferType(format);
|
|
82
82
|
// ── Infer title from first heading if not provided ─────────────────────
|
|
83
|
-
let title = opts.title;
|
|
83
|
+
let title = opts.title || "";
|
|
84
84
|
if (!title && format === "markdown") {
|
|
85
85
|
const firstHeading = content.match(/^#\s+(.+)$/m);
|
|
86
86
|
if (firstHeading) {
|
|
@@ -93,7 +93,8 @@ export function registerPublishCommand(program) {
|
|
|
93
93
|
process.exit(1);
|
|
94
94
|
}
|
|
95
95
|
// Interactive prompt fallback
|
|
96
|
-
const
|
|
96
|
+
const enquirer = (await import("enquirer"));
|
|
97
|
+
const prompt = enquirer.default?.prompt || enquirer.prompt;
|
|
97
98
|
const answers = await prompt({
|
|
98
99
|
type: "input",
|
|
99
100
|
name: "title",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whiteboard.d.ts","sourceRoot":"","sources":["../../src/commands/whiteboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"whiteboard.d.ts","sourceRoot":"","sources":["../../src/commands/whiteboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiNpC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,CAqE/D;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,CAMzE;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgFhE"}
|
|
@@ -181,7 +181,8 @@ function printTemplateList() {
|
|
|
181
181
|
console.log();
|
|
182
182
|
}
|
|
183
183
|
async function promptInteractive() {
|
|
184
|
-
const
|
|
184
|
+
const enquirer = (await import("enquirer"));
|
|
185
|
+
const prompt = enquirer.default?.prompt || enquirer.prompt;
|
|
185
186
|
const { template } = await prompt({
|
|
186
187
|
type: "select",
|
|
187
188
|
name: "template",
|
|
@@ -197,7 +198,7 @@ async function promptInteractive() {
|
|
|
197
198
|
message: "Output filename (without extension)",
|
|
198
199
|
initial: `my-${template}`,
|
|
199
200
|
});
|
|
200
|
-
return { name: name.trim() || `my-${template}`, template };
|
|
201
|
+
return { name: name.trim() || `my-${template}`, template: template };
|
|
201
202
|
}
|
|
202
203
|
// ── Command Registration ──────────────────────────────────────────────────────
|
|
203
204
|
export function registerNewCommand(program) {
|
|
@@ -294,13 +295,14 @@ export function registerWhiteboardCommand(program) {
|
|
|
294
295
|
process.exit(1);
|
|
295
296
|
}
|
|
296
297
|
// Require title
|
|
297
|
-
let title = opts.title;
|
|
298
|
+
let title = opts.title || "";
|
|
298
299
|
if (!title) {
|
|
299
300
|
if (jsonMode) {
|
|
300
301
|
printError("--title is required when using --json.", undefined, true);
|
|
301
302
|
process.exit(1);
|
|
302
303
|
}
|
|
303
|
-
const
|
|
304
|
+
const enquirer = (await import("enquirer"));
|
|
305
|
+
const prompt = enquirer.default?.prompt || enquirer.prompt;
|
|
304
306
|
const ans = await prompt({
|
|
305
307
|
type: "input",
|
|
306
308
|
name: "title",
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ const program = new Command();
|
|
|
27
27
|
program
|
|
28
28
|
.name("cv")
|
|
29
29
|
.description("CareerVivid CLI — publish articles, diagrams, and portfolio updates from your terminal or AI agent")
|
|
30
|
-
.version("1.1.
|
|
30
|
+
.version("1.1.6", "-v, --version", "Print CLI version")
|
|
31
31
|
.addHelpText("before", getHelpHeader())
|
|
32
32
|
.helpOption("-h, --help", "Show help");
|
|
33
33
|
registerAuthCommand(program);
|