yamlresume 0.15.1 → 0.15.2

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,11 +1,11 @@
1
- import {Command,InvalidArgumentError}from'commander';import M from'fs';import {joinNonEmptyString,YAMLResumeError,getErrorMessage,LOCALE_LANGUAGE_OPTIONS,getLocaleLanguageDetail,LATEX_TEMPLATE_OPTIONS,getLatexTemplateDetail,HTML_TEMPLATE_OPTIONS,getHtmlTemplateDetail,DOCX_TEMPLATE_OPTIONS,getDocxTemplateDetail}from'@yamlresume/core';import {LATEX_COMPILE_TIMEOUT,readResume,buildResume,watchResume,generateResume,newResume}from'@yamlresume/node';import C,{consola}from'consola';import a from'chalk';import Q from'envinfo';import {execa}from'execa';import {getFonts}from'font-list';import se from'ora';import {markdownTable}from'markdown-table';import {listSampleResumes}from'@yamlresume/samples';import {box}from'consola/utils';var k={version:"0.15.1"};function d(e,o,t){let i=t.replace(/\r\n/g,`
1
+ import {Command,InvalidArgumentError}from'commander';import M from'fs';import {joinNonEmptyString,YAMLResumeError,getErrorMessage,LOCALE_LANGUAGE_OPTIONS,getLocaleLanguageDetail,LATEX_TEMPLATE_OPTIONS,getLatexTemplateDetail,HTML_TEMPLATE_OPTIONS,getHtmlTemplateDetail,DOCX_TEMPLATE_OPTIONS,getDocxTemplateDetail}from'@yamlresume/core';import {LATEX_COMPILE_TIMEOUT,readResumeFile,buildResumeFile,watchResumeFile,generateResumeFile,newResumeFile}from'@yamlresume/node';import C,{consola}from'consola';import a from'chalk';import Q from'envinfo';import {execa}from'execa';import {getFonts}from'font-list';import se from'ora';import {markdownTable}from'markdown-table';import {listSampleResumes}from'@yamlresume/samples';import {box}from'consola/utils';var k={version:"0.15.2"};function d(e,o,t){let i=t.replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `)[e.line-1]||"",r=`${" ".repeat(e.column-1)}^`,c=a.white.bold(`${o}:${e.line}:${e.column}`),f=a.red.bold("warning"),g=a.white(e.message),_=a.white(i),y=a.green.bold(r);return [`${c}: ${f}: ${g}`,`${_}`,`${y}`].join(`
4
4
  `)}function p(e,o,t){let n=e.match(/at line (\d+), column (\d+)/);if(!n)return [a.white.bold(o),a.red.bold("error"),`${a.white(e)}.`].join(": ");let i=Number.parseInt(n[1],10),r=Number.parseInt(n[2],10),f=t.replace(/\r\n/g,`
5
5
  `).split(`
6
- `)[i-1]||"",g=`${" ".repeat(r-1)}^`,_=a.white.bold(`${o}:${i}:${r}`),y=a.red.bold("error"),P=a.white(e.split(`
7
- `)[0].replace(/ at line \d+, column \d+:?/,".").trim()),Y=a.white(f),F=a.green.bold(g);return [`${_}: ${y}: ${P}`,`${Y}`,`${F}`].join(`
8
- `)}function G(e){let o=Number(e);return Number.isNaN(o)||o<0?(consola.warn(joinNonEmptyString([`Invalid timeout value: "${e}".`,`Using default timeout: ${LATEX_COMPILE_TIMEOUT}s.`,"Timeout must be a non-negative number in seconds (0 to disable)."]," ")),LATEX_COMPILE_TIMEOUT):o}function b(){return new Command().name("build").description("build a resume to Docx, HTML, Markdown or LaTeX/PDF").argument("<resume-path>","the resume file path").option("--no-pdf","only generate TeX file without PDF (for LaTeX layouts)").option("--no-validate","skip resume schema validation").option("-o, --output <dir>","output directory for generated files").option("-t, --timeout <seconds>",joinNonEmptyString(["timeout for LaTeX compilation in seconds",`(default: ${LATEX_COMPILE_TIMEOUT}, 0 to disable)`]," "),e=>G(e)).action(async(e,o)=>{try{let{validated:t,errors:n}=readResume(e,{validate:o.validate});if(t==="failed"&&n){let i=M.readFileSync(e,"utf8");for(let r of n)consola.log(d(r,e,i));}await buildResume(e,{...o,validate:!1,logger:consola});}catch(t){if(t instanceof YAMLResumeError){if(t.code==="INVALID_YAML"){let n=M.readFileSync(e,"utf8");consola.log(p(t.message,e,n));}consola.error(t.message),process.exit(t.errno);return}consola.error(t.message),process.exit(1);return}})}function h(){return new Command().name("dev").description("build a resume on file changes (watch mode)").argument("<resume-path>","the resume file path").option("--no-pdf","only generate TeX file without PDF").option("--no-validate","skip resume schema validation").option("-o, --output <dir>","output directory for generated files").action((e,o)=>{watchResume(e,{...o,logger:consola});})}async function W(){let e=await Q.run({System:["OS","CPU"],Binaries:["Node","Yarn","npm","pnpm","Bun"]},{json:false,showNotFound:true});console.log(e);}async function Z(){C.info("Checking XeTeX...");try{let{stdout:e}=await execa("xelatex",["--version"]);console.log(` XeTeX: ${e.split(`
6
+ `)[i-1]||"",g=`${" ".repeat(r-1)}^`,_=a.white.bold(`${o}:${i}:${r}`),y=a.red.bold("error"),F=a.white(e.split(`
7
+ `)[0].replace(/ at line \d+, column \d+:?/,".").trim()),P=a.white(f),Y=a.green.bold(g);return [`${_}: ${y}: ${F}`,`${P}`,`${Y}`].join(`
8
+ `)}function G(e){let o=Number(e);return Number.isNaN(o)||o<0?(consola.warn(joinNonEmptyString([`Invalid timeout value: "${e}".`,`Using default timeout: ${LATEX_COMPILE_TIMEOUT}s.`,"Timeout must be a non-negative number in seconds (0 to disable)."]," ")),LATEX_COMPILE_TIMEOUT):o}function b(){return new Command().name("build").description("build a resume to Docx, HTML, Markdown or LaTeX/PDF").argument("<resume-path>","the resume file path").option("--no-pdf","only generate TeX file without PDF (for LaTeX layouts)").option("--no-validate","skip resume schema validation").option("-o, --output <dir>","output directory for generated files").option("-t, --timeout <seconds>",joinNonEmptyString(["timeout for LaTeX compilation in seconds",`(default: ${LATEX_COMPILE_TIMEOUT}, 0 to disable)`]," "),e=>G(e)).action(async(e,o)=>{try{let{validated:t,errors:n}=readResumeFile(e,{validate:o.validate});if(t==="failed"&&n){let i=M.readFileSync(e,"utf8");for(let r of n)consola.log(d(r,e,i));}await buildResumeFile(e,{...o,validate:!1,logger:consola});}catch(t){if(t instanceof YAMLResumeError){if(t.code==="INVALID_YAML"){let n=M.readFileSync(e,"utf8");consola.log(p(t.message,e,n));}consola.error(t.message),process.exit(t.errno);return}consola.error(t.message),process.exit(1);return}})}function h(){return new Command().name("dev").description("build a resume on file changes (watch mode)").argument("<resume-path>","the resume file path").option("--no-pdf","only generate TeX file without PDF").option("--no-validate","skip resume schema validation").option("-o, --output <dir>","output directory for generated files").action((e,o)=>{watchResumeFile(e,{...o,logger:consola});})}async function W(){let e=await Q.run({System:["OS","CPU"],Binaries:["Node","Yarn","npm","pnpm","Bun"]},{json:false,showNotFound:true});console.log(e);}async function Z(){C.info("Checking XeTeX...");try{let{stdout:e}=await execa("xelatex",["--version"]);console.log(` XeTeX: ${e.split(`
9
9
  `)[0]}
10
10
  `);}catch{console.log(` XeTeX: Not Found
11
11
  `);}}async function ee(){C.info("Checking Tectonic...");try{let{stdout:e}=await execa("tectonic",["--version"]);console.log(` Tectonic: ${e.split(`
@@ -23,16 +23,16 @@ Environment variables:
23
23
  OLLAMA_HOST Ollama host for local models
24
24
  YAMLRESUME_AI_MODEL model override (overridden by --model)
25
25
  YAMLRESUME_AI_BASE_URL API base URL override (overridden by --base-url)
26
- `).action(async function(e,o){let t,n="",i={start:r=>{t=se(r).start();},success:r=>{t?.succeed(r),consola.success(`Generated ${e} successfully.`);},debug:consola.debug,info:consola.info,log:consola.log,warn:consola.warn,error:()=>{}};try{await generateResume(e,o.position,o.language,{model:o.model,baseURL:o.baseUrl,maxRetries:o.retry,onChunk:r=>{n+=r,t&&(t.text=`Generating resume...
27
- ${n.slice(-200)}`);},logger:i});}catch(r){t?.fail("Failed to generate resume");let c=getErrorMessage(r);consola.error(c),consola.level>=4&&r instanceof Error&&r.stack&&consola.error(r.stack),this.error(c,{exitCode:r instanceof YAMLResumeError?r.errno:1});}})}function ue(){return markdownTable([["locale.language","Language Name"],...LOCALE_LANGUAGE_OPTIONS.map(e=>[e,getLocaleLanguageDetail(e).name])])}function v(){let e=new Command().name("languages").description("i18n and l10n support");return e.command("list").description("list all supported languages").action(()=>{C.log(ue());}),e}var we="software-engineer";function T(){return new Command().name("new").description("create a new resume").argument("[filename]","output filename","resume.yml").option("--sample <id>","create from a curated sample resume").option("--language <language>","locale language for the sample","en").action((e,o)=>{try{newResume(e,o.sample??we,o.language,{showSampleSource:!!o.sample,logger:consola});}catch(t){if(t instanceof YAMLResumeError){consola.error(t.message),process.exit(t.errno);return}consola.error(t.message),consola.info(`Available samples:
26
+ `).action(async function(e,o){let t,n="",i={start:r=>{t=se(r).start();},success:r=>{t?.succeed(r),consola.success(`Generated ${e} successfully.`);},debug:consola.debug,info:consola.info,log:consola.log,warn:consola.warn,error:()=>{}};try{await generateResumeFile(e,o.position,o.language,{model:o.model,baseURL:o.baseUrl,maxRetries:o.retry,onChunk:r=>{n+=r,t&&(t.text=`Generating resume...
27
+ ${n.slice(-200)}`);},logger:i});}catch(r){t?.fail("Failed to generate resume");let c=getErrorMessage(r);consola.error(c),consola.level>=4&&r instanceof Error&&r.stack&&consola.error(r.stack),this.error(c,{exitCode:r instanceof YAMLResumeError?r.errno:1});}})}function ue(){return markdownTable([["locale.language","Language Name"],...LOCALE_LANGUAGE_OPTIONS.map(e=>[e,getLocaleLanguageDetail(e).name])])}function v(){let e=new Command().name("languages").description("i18n and l10n support");return e.command("list").description("list all supported languages").action(()=>{C.log(ue());}),e}var we="software-engineer";function T(){return new Command().name("new").description("create a new resume").argument("[filename]","output filename","resume.yml").option("--sample <id>","create from a curated sample resume").option("--language <language>","locale language for the sample","en").action((e,o)=>{try{newResumeFile(e,o.sample??we,o.language,{showSampleSource:!!o.sample,logger:consola});}catch(t){if(t instanceof YAMLResumeError){consola.error(t.message),process.exit(t.errno);return}consola.error(t.message),consola.info(`Available samples:
28
28
  ${listSampleResumes().map(n=>` - ${n.id}: ${n.title}`).join(`
29
- `)}`),process.exit(1);}})}function Le(){let e=listSampleResumes();return markdownTable([["ID","Position","Title","Category"],...e.map(o=>[o.id,o.position,o.title,o.category])])}function xe(){return new Command().name("list").description("list all sample resumes").action(()=>{C.log(Le());})}function A(){return new Command().name("samples").description("manage sample resumes").addCommand(xe())}function Re(){let e=[...LATEX_TEMPLATE_OPTIONS.map(o=>{let t=getLatexTemplateDetail(o);return [o,t.engine,t.name,t.description]}),...HTML_TEMPLATE_OPTIONS.map(o=>{let t=getHtmlTemplateDetail(o);return [o,t.engine,t.name,t.description]}),...DOCX_TEMPLATE_OPTIONS.map(o=>{let t=getDocxTemplateDetail(o);return [o,t.engine,t.name,t.description]})];return markdownTable([["layouts.[].template","Engine","Template Name","Description"],...e])}function E(){let e=new Command().name("templates").description("manage resume templates");return e.command("list").description("list all supported templates").action(()=>{C.log(Re());}),e}function S(){return new Command().name("validate").description("validate a resume against the YAMLResume schema").argument("<resume-path>","the resume file path").action(async e=>{try{let{validated:o,errors:t}=readResume(e,{validate:!0});if(o==="success"){consola.success("Resume validation passed.");return}if(o==="failed"&&t){let n=M.readFileSync(e,"utf8");for(let i of t)consola.log(d(i,e,n));consola.fail("Resume validation failed.");}}catch(o){if(o instanceof YAMLResumeError){if(o.code==="INVALID_YAML"){let t=M.readFileSync(e,"utf8");consola.log(p(o.message,e,t));}consola.error(o.message),process.exit(o.errno);return}consola.error(o.message),process.exit(1);return}})}var Ye=["New in v0.15.0: sample resumes!","Create one: yamlresume new --sample <sample-id>","Browse all: yamlresume samples list"].join(`
30
- `);function I(){return box(Ye)}function N(e){C.level=e?4:3;}function lt(){let e=new Command;return e.name("yamlresume").description(["YAMLResume \u2014 Resume as Code in YAML",`
29
+ `)}`),process.exit(1);}})}function Le(){let e=listSampleResumes();return markdownTable([["ID","Position","Title","Category"],...e.map(o=>[o.id,o.position,o.title,o.category])])}function xe(){return new Command().name("list").description("list all sample resumes").action(()=>{C.log(Le());})}function A(){return new Command().name("samples").description("manage sample resumes").addCommand(xe())}function Re(){let e=[...LATEX_TEMPLATE_OPTIONS.map(o=>{let t=getLatexTemplateDetail(o);return [o,t.engine,t.name,t.description]}),...HTML_TEMPLATE_OPTIONS.map(o=>{let t=getHtmlTemplateDetail(o);return [o,t.engine,t.name,t.description]}),...DOCX_TEMPLATE_OPTIONS.map(o=>{let t=getDocxTemplateDetail(o);return [o,t.engine,t.name,t.description]})];return markdownTable([["layouts.[].template","Engine","Template Name","Description"],...e])}function E(){let e=new Command().name("templates").description("manage resume templates");return e.command("list").description("list all supported templates").action(()=>{C.log(Re());}),e}function S(){return new Command().name("validate").description("validate a resume against the YAMLResume schema").argument("<resume-path>","the resume file path").action(async e=>{try{let{validated:o,errors:t}=readResumeFile(e,{validate:!0});if(o==="success"){consola.success("Resume validation passed.");return}if(o==="failed"&&t){let n=M.readFileSync(e,"utf8");for(let i of t)consola.log(d(i,e,n));consola.fail("Resume validation failed.");}}catch(o){if(o instanceof YAMLResumeError){if(o.code==="INVALID_YAML"){let t=M.readFileSync(e,"utf8");consola.log(p(o.message,e,t));}consola.error(o.message),process.exit(o.errno);return}consola.error(o.message),process.exit(1);return}})}var Pe=["New in v0.15.0: sample resumes!","Create one: yamlresume new --sample <sample-id>","Browse all: yamlresume samples list"].join(`
30
+ `);function I(){return box(Pe)}function N(e){C.level=e?4:3;}function lt(){let e=new Command;return e.name("yamlresume").description(["YAMLResume \u2014 Resume as Code in YAML",`
31
31
  __ __ _ __ __ _ ____
32
32
  \\ \\ / // \\ | \\/ | | | _ \\ ___ ___ _ _ ___ ___ ___
33
33
  \\ V // _ \\ | |\\/| | | | |_) / _ \\/ __| | | / _ \\/ _ \\ / _ \\
34
34
  | |/ ___ \\| | | | |___| _ < __/\\__ \\ |_| | | | | | | __/
35
35
  |_/_/ \\_\\_| |_|_____|_| \\_\\___||___/\\____|_| |_| |_|\\___|
36
36
  `].join(`
37
- `)).version(k.version).option("-v, --verbose","verbose output").addHelpText("before",I()).hook("preAction",t=>{N(t.opts().verbose);}),e.addCommand(b()),e.addCommand(x()),e.addCommand(h()),e.addCommand(L()),e.addCommand(v()),e.addCommand(T()),e.addCommand(A()),e.addCommand(E()),e.addCommand(S()),e}export{b as a,h as b,L as c,x as d,v as e,T as f,A as g,E as h,S as i,lt as j};//# sourceMappingURL=chunk-ALTVHJ4K.js.map
38
- //# sourceMappingURL=chunk-ALTVHJ4K.js.map
37
+ `)).version(k.version).option("-v, --verbose","verbose output").addHelpText("before",I()).hook("preAction",t=>{N(t.opts().verbose);}),e.addCommand(b()),e.addCommand(x()),e.addCommand(h()),e.addCommand(L()),e.addCommand(v()),e.addCommand(T()),e.addCommand(A()),e.addCommand(E()),e.addCommand(S()),e}export{b as a,h as b,L as c,x as d,v as e,T as f,A as g,E as h,S as i,lt as j};//# sourceMappingURL=chunk-D2JA5U3Z.js.map
38
+ //# sourceMappingURL=chunk-D2JA5U3Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json","../src/utils/format.ts","../src/commands/build.ts","../src/commands/dev.ts","../src/commands/doctor.ts","../src/commands/generate.ts","../src/commands/languages.ts","../src/commands/new.ts","../src/commands/samples.ts","../src/commands/templates.ts","../src/commands/validate.ts","../src/utils/banner.ts","../src/utils/consola.ts","../src/program.ts"],"names":["package_default","prettifySchemaValidationError","error","resumePath","resumeStr","lineContent","pointer","filePath","chalk","errorType","message","codeLine","pointerLine","prettifyYamlParseError","errorMessage","lineMatch","line","column","parseTimeout","value","num","consola","joinNonEmptyString","LATEX_COMPILE_TIMEOUT","createBuildCommand","Command","options","validated","errors","readResumeFile","fs","buildResumeFile","YAMLResumeError","createDevCommand","watchResumeFile","checkSystem","info","envinfo","checkXeTeX","stdout","execa","checkTectonic","checkFonts","installedFonts","getFonts","fonts","font","status","f","createDoctorCommand","createGenerateCommand","parsed","InvalidArgumentError","filename","spinner","streamedText","logger","ora","generateResumeFile","chunk","getErrorMessage","listLanguages","markdownTable","LOCALE_LANGUAGE_OPTIONS","getLocaleLanguageDetail","createLanguagesCommand","cmd","DEFAULT_SAMPLE_ID","createNewCommand","newResumeFile","listSampleResumes","sample","listSamples","samples","createSamplesListCommand","createSamplesCommand","listTemplates","templates","LATEX_TEMPLATE_OPTIONS","details","getLatexTemplateDetail","HTML_TEMPLATE_OPTIONS","getHtmlTemplateDetail","DOCX_TEMPLATE_OPTIONS","getDocxTemplateDetail","createTemplatesCommand","createValidateCommand","ANNOUNCEMENT","showBan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esContent":["{\n \"name\": \"yamlresume\",\n \"version\": \"0.15.2\",\n \"description\": \"The CLI interface for YAMLResume's engine\",\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"YAMLResume\",\n \"email\": \"support@yamlresume.com\",\n \"url\": \"https://yamlresume.dev\"\n },\n \"keywords\": [\n \"YAMLResume\",\n \"CV\",\n \"Resume\",\n \"LaTeX\",\n \"Typesetting\",\n \"PDF\",\n \"YAML\",\n \"JSON\"\n ],\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n }\n },\n \"bin\": {\n \"yamlresume\": \"./dist/cli.js\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"build:clean\": \"rm -rf dist\",\n \"build:prod\": \"tsup --dts --minify --sourcemap\",\n \"prepublishOnly\": \"pnpm test\",\n \"dev\": \"tsx src/cli.ts\",\n \"test\": \"vitest --run\",\n \"test:cov\": \"vitest --coverage --run\",\n \"test:watch\": \"vitest\",\n \"typedoc\": \"typedoc\"\n },\n \"dependencies\": {\n \"@yamlresume/ai\": \"workspace:*\",\n \"@yamlresume/core\": \"workspace:*\",\n \"@yamlresume/node\": \"workspace:*\",\n \"@yamlresume/samples\": \"workspace:*\",\n \"chalk\": \"^5.6.2\",\n \"commander\": \"^15.0.0\",\n \"consola\": \"^3.4.2\",\n \"envinfo\": \"^7.21.0\",\n \"execa\": \"^10.0.0\",\n \"extensionless\": \"^2.0.6\",\n \"font-list\": \"^2.1.0\",\n \"lodash-es\": \"^4.18.1\",\n \"markdown-table\": \"^3.0.4\",\n \"ora\": \"^8.0.0\",\n \"tslib\": \"^2.8.1\",\n \"which\": \"^7.0.0\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@types/envinfo\": \"^7.8.4\",\n \"@types/node\": \"^26.1.1\",\n \"@types/which\": \"^3.0.4\",\n \"@yamlresume/testing\": \"workspace:*\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/yamlresume/yamlresume.git\",\n \"directory\": \"packages/cli\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/yamlresume/yamlresume/issues\"\n },\n \"homepage\": \"https://yamlresume.dev/docs/cli\",\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport type { PositionalError } from '@yamlresume/node'\nimport chalk from 'chalk'\n\n/**\n * Formats a schema validation error in clang-style with line number, column\n * pointer, and message.\n *\n * @param error - The positional error to format.\n * @param resumePath - The source file path.\n * @param resumeStr - The content of the source file for line display.\n * @returns Formatted error string in clang style.\n */\nexport function prettifySchemaValidationError(\n error: PositionalError,\n resumePath: string,\n resumeStr: string\n): string {\n // Normalize CRLF to LF for cross-platform consistency\n const lines = resumeStr.replace(/\\r\\n/g, '\\n').split('\\n')\n const lineContent = lines[error.line - 1] || ''\n\n // Create the pointer line with spaces and caret\n const pointer = `${' '.repeat(error.column - 1)}^`\n\n // Color scheme similar to clang with enhanced visibility\n const filePath = chalk.white.bold(\n `${resumePath}:${error.line}:${error.column}`\n )\n const errorType = chalk.red.bold('warning')\n const message = chalk.white(error.message)\n const codeLine = chalk.white(lineContent)\n const pointerLine = chalk.green.bold(pointer)\n\n return [\n `${filePath}: ${errorType}: ${message}`,\n `${codeLine}`,\n `${pointerLine}`,\n ].join('\\n')\n}\n\n/**\n * Parses YAML parsing error messages and extracts line/column information.\n *\n * @param errorMessage - The error message from `yaml.parse`.\n * @param resumePath - The source file path.\n * @param resumeStr - The content of the source file for line display.\n * @returns Formatted error string in clang style.\n */\nexport function prettifyYamlParseError(\n errorMessage: string,\n resumePath: string,\n resumeStr: string\n): string {\n // parse the error message to extract line and column\n // example:\n // \"Nested mappings are not allowed in compact mappings at line 6, column 10\"\n const lineMatch = errorMessage.match(/at line (\\d+), column (\\d+)/)\n\n if (!lineMatch) {\n // if we can't parse the error, return a simple formatted message\n return [\n chalk.white.bold(resumePath),\n chalk.red.bold('error'),\n `${chalk.white(errorMessage)}.`,\n ].join(': ')\n }\n\n const line = Number.parseInt(lineMatch[1], 10)\n const column = Number.parseInt(lineMatch[2], 10)\n // Normalize CRLF to LF for cross-platform consistency\n const lines = resumeStr.replace(/\\r\\n/g, '\\n').split('\\n')\n const lineContent = lines[line - 1] || ''\n\n // create the pointer line with spaces and caret\n const pointer = `${' '.repeat(column - 1)}^`\n\n // color scheme similar to clang with enhanced visibility\n const filePath = chalk.white.bold(`${resumePath}:${line}:${column}`)\n const errorType = chalk.red.bold('error')\n const message = chalk.white(\n errorMessage\n .split('\\n')[0]\n .replace(/ at line \\d+, column \\d+:?/, '.')\n .trim()\n )\n const codeLine = chalk.white(lineContent)\n const pointerLine = chalk.green.bold(pointer)\n\n return [\n `${filePath}: ${errorType}: ${message}`,\n `${codeLine}`,\n `${pointerLine}`,\n ].join('\\n')\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport fs from 'node:fs'\nimport { joinNonEmptyString, YAMLResumeError } from '@yamlresume/core'\nimport {\n buildResumeFile,\n LATEX_COMPILE_TIMEOUT,\n readResumeFile,\n} from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nimport {\n prettifySchemaValidationError,\n prettifyYamlParseError,\n} from '../utils/format'\n\n/**\n * Parse and validate the timeout option.\n *\n * If the value is invalid, logs a warning and returns the default timeout.\n *\n * @param value - The timeout value in seconds as a string.\n * @returns The parsed timeout in seconds.\n */\nexport function parseTimeout(value: string): number {\n const num = Number(value)\n\n if (Number.isNaN(num) || num < 0) {\n consola.warn(\n joinNonEmptyString(\n [\n `Invalid timeout value: \"${value}\".`,\n `Using default timeout: ${LATEX_COMPILE_TIMEOUT}s.`,\n 'Timeout must be a non-negative number in seconds (0 to disable).',\n ],\n ' '\n )\n )\n return LATEX_COMPILE_TIMEOUT\n }\n\n return num\n}\n\n/**\n * Create a command instance to build a YAML resume to LaTeX and PDF\n */\nexport function createBuildCommand() {\n return new Command()\n .name('build')\n .description('build a resume to Docx, HTML, Markdown or LaTeX/PDF')\n .argument('<resume-path>', 'the resume file path')\n .option(\n '--no-pdf',\n 'only generate TeX file without PDF (for LaTeX layouts)'\n )\n .option('--no-validate', 'skip resume schema validation')\n .option('-o, --output <dir>', 'output directory for generated files')\n .option(\n '-t, --timeout <seconds>',\n joinNonEmptyString(\n [\n 'timeout for LaTeX compilation in seconds',\n `(default: ${LATEX_COMPILE_TIMEOUT}, 0 to disable)`,\n ],\n ' '\n ),\n (value) => parseTimeout(value)\n )\n .action(\n async (\n resumePath: string,\n options: {\n pdf: boolean\n validate: boolean\n output?: string\n timeout: number\n }\n ) => {\n try {\n const { validated, errors } = readResumeFile(resumePath, {\n validate: options.validate,\n })\n\n if (validated === 'failed' && errors) {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n for (const error of errors) {\n consola.log(\n prettifySchemaValidationError(error, resumePath, resumeStr)\n )\n }\n }\n\n await buildResumeFile(resumePath, {\n ...options,\n validate: false,\n logger: consola,\n })\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n if (error.code === 'INVALID_YAML') {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n consola.log(\n prettifyYamlParseError(error.message, resumePath, resumeStr)\n )\n }\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n process.exit(1)\n return\n }\n }\n )\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { watchResumeFile } from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\n/**\n * Create a command instance to run in watch mode\n */\nexport function createDevCommand() {\n return new Command()\n .name('dev')\n .description('build a resume on file changes (watch mode)')\n .argument('<resume-path>', 'the resume file path')\n .option('--no-pdf', 'only generate TeX file without PDF')\n .option('--no-validate', 'skip resume schema validation')\n .option('-o, --output <dir>', 'output directory for generated files')\n .action(\n (\n resumePath: string,\n options: { pdf: boolean; validate: boolean; output?: string }\n ) => {\n watchResumeFile(resumePath, { ...options, logger: consola })\n }\n )\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport envinfo from 'envinfo'\nimport { execa } from 'execa'\nimport { getFonts } from 'font-list'\n\n/**\n * Check system information\n */\nexport async function checkSystem() {\n const info = await envinfo.run(\n {\n System: ['OS', 'CPU'],\n Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'Bun'],\n },\n { json: false, showNotFound: true }\n )\n console.log(info)\n}\n\n/**\n * Check if XeTeX is installed\n */\nexport async function checkXeTeX() {\n consola.info('Checking XeTeX...')\n try {\n const { stdout } = await execa('xelatex', ['--version'])\n console.log(` XeTeX: ${stdout.split('\\n')[0]}\\n`)\n } catch {\n console.log(' XeTeX: Not Found\\n')\n }\n}\n\n/**\n * Check if Tectonic is installed\n */\nexport async function checkTectonic() {\n consola.info('Checking Tectonic...')\n try {\n const { stdout } = await execa('tectonic', ['--version'])\n console.log(` Tectonic: ${stdout.split('\\n')[0]}\\n`)\n } catch {\n console.log(' Tectonic: Not Found\\n')\n }\n}\n\n/**\n * Check if required fonts are installed\n */\nexport async function checkFonts() {\n consola.info('Checking Fonts...')\n const installedFonts = await getFonts({ disableQuoting: true })\n const fonts = [\n 'Linux Libertine O',\n 'Linux Libertine',\n 'Noto Serif CJK SC',\n 'Noto Sans CJK SC',\n ]\n\n for (const font of fonts) {\n // font-list returns fonts like \"Arial\" or \"Times New Roman\" in an array\n // We check if the required font is included in the list\n // The checking is case-insensitive\n const isInstalled = installedFonts.some((f) =>\n f.toLowerCase().includes(font.toLowerCase())\n )\n const status = isInstalled ? 'Installed' : 'Not Installed'\n console.log(` ${font}: ${status}`)\n }\n}\n\n/**\n * Create a command instance to check the environment\n */\nexport function createDoctorCommand() {\n return new Command()\n .name('doctor')\n .description('check environment for YAMLResume dependencies')\n .action(async () => {\n await checkSystem()\n await checkXeTeX()\n await checkTectonic()\n await checkFonts()\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { getErrorMessage, type Logger, YAMLResumeError } from '@yamlresume/core'\nimport { generateResumeFile } from '@yamlresume/node'\nimport { Command, InvalidArgumentError } from 'commander'\nimport { consola } from 'consola'\nimport type { Ora } from 'ora'\nimport ora from 'ora'\n\n/**\n * Create a command instance to generate a resume with AI.\n */\nexport function createGenerateCommand() {\n return new Command()\n .name('generate')\n .description('generate a new resume with AI')\n .requiredOption('-p, --position <position>', 'target position or job title')\n .requiredOption('-l, --language <language>', 'target locale language')\n .option('-m, --model <model>', 'AI provider model to use')\n .option('-b, --base-url <url>', 'AI provider base URL')\n .option(\n '-r, --retry <count>',\n 'maximum retries when validation fails (default: 2)',\n (value) => {\n const parsed = Number.parseInt(value, 10)\n if (Number.isNaN(parsed) || parsed < 0) {\n throw new InvalidArgumentError(\n 'Retry count must be a non-negative integer.'\n )\n }\n return parsed\n }\n )\n .argument('<filename>', 'output filename')\n .addHelpText(\n 'after',\n `\nEnvironment variables:\n\n Required (one API key for the selected cloud provider):\n DEEPSEEK_API_KEY DeepSeek API key\n OPENAI_API_KEY OpenAI API key\n MOONSHOT_API_KEY Kimi (Moonshot AI) API key\n\n Optional:\n OLLAMA_HOST Ollama host for local models\n YAMLRESUME_AI_MODEL model override (overridden by --model)\n YAMLRESUME_AI_BASE_URL API base URL override (overridden by --base-url)\n`\n )\n .action(async function (\n this: Command,\n filename: string,\n options: {\n position: string\n language: string\n model?: string\n baseUrl?: string\n retry?: number\n }\n ) {\n let spinner: Ora | undefined\n let streamedText = ''\n\n const logger: Logger = {\n start: (message) => {\n spinner = ora(message).start()\n },\n success: (message) => {\n spinner?.succeed(message)\n consola.success(`Generated ${filename} successfully.`)\n },\n debug: consola.debug,\n info: consola.info,\n log: consola.log,\n warn: consola.warn,\n error: () => {},\n }\n\n try {\n await generateResumeFile(filename, options.position, options.language, {\n model: options.model,\n baseURL: options.baseUrl,\n maxRetries: options.retry,\n onChunk: (chunk) => {\n streamedText += chunk\n if (spinner) {\n spinner.text = `Generating resume...\\n${streamedText.slice(-200)}`\n }\n },\n logger,\n })\n } catch (error) {\n spinner?.fail('Failed to generate resume')\n\n const message = getErrorMessage(error)\n consola.error(message)\n\n if (consola.level >= 4 && error instanceof Error && error.stack) {\n consola.error(error.stack)\n }\n\n this.error(message, {\n exitCode: error instanceof YAMLResumeError ? error.errno : 1,\n })\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n getLocaleLanguageDetail,\n LOCALE_LANGUAGE_OPTIONS,\n} from '@yamlresume/core'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all supported locale languages.\n *\n * The table includes columns for the language code and the language name.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listLanguages() {\n return markdownTable([\n ['locale.language', 'Language Name'],\n ...LOCALE_LANGUAGE_OPTIONS.map((value) => [\n value,\n getLocaleLanguageDetail(value).name,\n ]),\n ])\n}\n\n/**\n * Create a command instance to list supported languages\n */\n\nexport function createLanguagesCommand() {\n const cmd = new Command()\n .name('languages')\n .description('i18n and l10n support')\n\n cmd\n .command('list')\n .description('list all supported languages')\n .action(() => {\n consola.log(listLanguages())\n })\n\n return cmd\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { YAMLResumeError } from '@yamlresume/core'\nimport { newResumeFile } from '@yamlresume/node'\nimport { listSampleResumes } from '@yamlresume/samples'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nconst DEFAULT_SAMPLE_ID = 'software-engineer'\n\n/**\n * Create a command instance to create a new YAML resume\n */\nexport function createNewCommand() {\n return new Command()\n .name('new')\n .description('create a new resume')\n .argument('[filename]', 'output filename', 'resume.yml')\n .option('--sample <id>', 'create from a curated sample resume')\n .option('--language <language>', 'locale language for the sample', 'en')\n .action((filename, options) => {\n try {\n newResumeFile(\n filename,\n options.sample ?? DEFAULT_SAMPLE_ID,\n options.language,\n { showSampleSource: Boolean(options.sample), logger: consola }\n )\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n consola.info(\n `Available samples:\\n${listSampleResumes()\n .map((sample) => ` - ${sample.id}: ${sample.title}`)\n .join('\\n')}`\n )\n process.exit(1)\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { listSampleResumes } from '@yamlresume/samples'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all available sample resumes.\n *\n * The table includes columns for the sample id, position, title, and category.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listSamples() {\n const samples = listSampleResumes()\n\n return markdownTable([\n ['ID', 'Position', 'Title', 'Category'],\n ...samples.map((sample) => [\n sample.id,\n sample.position,\n sample.title,\n sample.category,\n ]),\n ])\n}\n\n/**\n * Create a command instance to list sample resumes.\n */\nexport function createSamplesListCommand() {\n return new Command()\n .name('list')\n .description('list all sample resumes')\n .action(() => {\n consola.log(listSamples())\n })\n}\n\nexport function createSamplesCommand() {\n return new Command()\n .name('samples')\n .description('manage sample resumes')\n .addCommand(createSamplesListCommand())\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n DOCX_TEMPLATE_OPTIONS,\n getDocxTemplateDetail,\n getHtmlTemplateDetail,\n getLatexTemplateDetail,\n HTML_TEMPLATE_OPTIONS,\n LATEX_TEMPLATE_OPTIONS,\n} from '@yamlresume/core'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all supported templates.\n *\n * The table includes columns for the template id, name and description.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listTemplates() {\n const templates = [\n ...LATEX_TEMPLATE_OPTIONS.map((value) => {\n const details = getLatexTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ...HTML_TEMPLATE_OPTIONS.map((value) => {\n const details = getHtmlTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ...DOCX_TEMPLATE_OPTIONS.map((value) => {\n const details = getDocxTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ]\n\n return markdownTable([\n ['layouts.[].template', 'Engine', 'Template Name', 'Description'],\n ...templates,\n ])\n}\n\n/**\n * Create a command instance to list supported templates\n */\nexport function createTemplatesCommand() {\n const cmd = new Command()\n .name('templates')\n .description('manage resume templates')\n\n cmd\n .command('list')\n .description('list all supported templates')\n .action(() => {\n consola.log(listTemplates())\n })\n\n return cmd\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport fs from 'node:fs'\nimport { YAMLResumeError } from '@yamlresume/core'\nimport { readResumeFile } from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nimport {\n prettifySchemaValidationError,\n prettifyYamlParseError,\n} from '../utils/format'\n\n/**\n * Create a command instance to validate a YAML resume\n */\nexport function createValidateCommand() {\n return new Command()\n .name('validate')\n .description('validate a resume against the YAMLResume schema')\n .argument('<resume-path>', 'the resume file path')\n .action(async (resumePath: string) => {\n try {\n const { validated, errors } = readResumeFile(resumePath, {\n validate: true,\n })\n\n if (validated === 'success') {\n consola.success('Resume validation passed.')\n return\n }\n\n if (validated === 'failed' && errors) {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n for (const error of errors) {\n consola.log(\n prettifySchemaValidationError(error, resumePath, resumeStr)\n )\n }\n consola.fail('Resume validation failed.')\n }\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n if (error.code === 'INVALID_YAML') {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n consola.log(\n prettifyYamlParseError(error.message, resumePath, resumeStr)\n )\n }\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n process.exit(1)\n return\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { box } from 'consola/utils'\n\n/**\n * Announcement shown in the root help output.\n *\n * Update this constant when there is something new to announce and clear it\n * when the announcement becomes stale.\n */\nconst ANNOUNCEMENT = [\n 'New in v0.15.0: sample resumes!',\n 'Create one: yamlresume new --sample <sample-id>',\n 'Browse all: yamlresume samples list',\n].join('\\n')\n\n/**\n * Get the announcement banner for the current release.\n *\n * @returns The boxed announcement banner.\n */\nexport function showBanner(): string {\n return box(ANNOUNCEMENT)\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport consola from 'consola'\n\n/**\n * Set the verbose mode for consola\n *\n * @param verbose - Whether to enable verbose mode\n * @see https://github.com/unjs/consola?tab=readme-ov-file#log-level\n */\nexport function setVerboseLog(verbose: boolean) {\n consola.level = verbose ? 4 : 3\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Command } from 'commander'\n\nimport packageJson from '../package.json' with { type: 'json' }\nimport {\n createBuildCommand,\n createDevCommand,\n createDoctorCommand,\n createGenerateCommand,\n createLanguagesCommand,\n createNewCommand,\n createSamplesCommand,\n createTemplatesCommand,\n createValidateCommand,\n} from './commands'\nimport { setVerboseLog, showBanner } from './utils'\n\n/**\n * Create the CLI program.\n *\n * @returns The CLI program.\n */\nexport function createProgram(): Command {\n const program = new Command()\n\n const banner = `\n __ __ _ __ __ _ ____\n \\\\ \\\\ / // \\\\ | \\\\/ | | | _ \\\\ ___ ___ _ _ ___ ___ ___\n \\\\ V // _ \\\\ | |\\\\/| | | | |_) / _ \\\\/ __| | | / _ \\\\/ _ \\\\ / _ \\\\\n | |/ ___ \\\\| | | | |___| _ < __/\\\\__ \\\\ |_| | | | | | | __/\n |_/_/ \\\\_\\\\_| |_|_____|_| \\\\_\\\\___||___/\\\\____|_| |_| |_|\\\\___|\n`\n\n program\n .name('yamlresume')\n .description(['YAMLResume — Resume as Code in YAML', banner].join('\\n'))\n .version(packageJson.version)\n .option('-v, --verbose', 'verbose output')\n .addHelpText('before', showBanner())\n .hook('preAction', (thisCommand) => {\n setVerboseLog(thisCommand.opts().verbose)\n })\n\n program.addCommand(createBuildCommand())\n program.addCommand(createGenerateCommand())\n program.addCommand(createDevCommand())\n program.addCommand(createDoctorCommand())\n program.addCommand(createLanguagesCommand())\n program.addCommand(createNewCommand())\n program.addCommand(createSamplesCommand())\n program.addCommand(createTemplatesCommand())\n program.addCommand(createValidateCommand())\n\n return program\n}\n"]}
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import'@yamlresume/core/suppress-warnings';var{createProgram:r}=await import('./program-VDS3I6H6.js');r().parse();//# sourceMappingURL=cli.js.map
2
+ import'@yamlresume/core/suppress-warnings';var{createProgram:r}=await import('./program-6V5APSSF.js');r().parse();//# sourceMappingURL=cli.js.map
3
3
  //# sourceMappingURL=cli.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as createBuildCommand,b as createDevCommand,c as createDoctorCommand,d as createGenerateCommand,e as createLanguagesCommand,f as createNewCommand,j as createProgram,g as createSamplesCommand,h as createTemplatesCommand,i as createValidateCommand}from'./chunk-ALTVHJ4K.js';//# sourceMappingURL=index.js.map
1
+ export{a as createBuildCommand,b as createDevCommand,c as createDoctorCommand,d as createGenerateCommand,e as createLanguagesCommand,f as createNewCommand,j as createProgram,g as createSamplesCommand,h as createTemplatesCommand,i as createValidateCommand}from'./chunk-D2JA5U3Z.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export{j as createProgram}from'./chunk-D2JA5U3Z.js';//# sourceMappingURL=program-6V5APSSF.js.map
2
+ //# sourceMappingURL=program-6V5APSSF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"program-VDS3I6H6.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"program-6V5APSSF.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yamlresume",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "The CLI interface for YAMLResume's engine",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -49,16 +49,16 @@
49
49
  "tslib": "^2.8.1",
50
50
  "which": "^7.0.0",
51
51
  "yaml": "^2.9.0",
52
- "@yamlresume/ai": "0.15.1",
53
- "@yamlresume/node": "0.15.1",
54
- "@yamlresume/core": "0.15.1",
55
- "@yamlresume/samples": "0.15.1"
52
+ "@yamlresume/core": "0.15.2",
53
+ "@yamlresume/ai": "0.15.2",
54
+ "@yamlresume/node": "0.15.2",
55
+ "@yamlresume/samples": "0.15.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/envinfo": "^7.8.4",
59
59
  "@types/node": "^26.1.1",
60
60
  "@types/which": "^3.0.4",
61
- "@yamlresume/testing": "0.15.1"
61
+ "@yamlresume/testing": "0.15.2"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../package.json","../src/utils/format.ts","../src/commands/build.ts","../src/commands/dev.ts","../src/commands/doctor.ts","../src/commands/generate.ts","../src/commands/languages.ts","../src/commands/new.ts","../src/commands/samples.ts","../src/commands/templates.ts","../src/commands/validate.ts","../src/utils/banner.ts","../src/utils/consola.ts","../src/program.ts"],"names":["package_default","prettifySchemaValidationError","error","resumePath","resumeStr","lineContent","pointer","filePath","chalk","errorType","message","codeLine","pointerLine","prettifyYamlParseError","errorMessage","lineMatch","line","column","parseTimeout","value","num","consola","joinNonEmptyString","LATEX_COMPILE_TIMEOUT","createBuildCommand","Command","options","validated","errors","readResume","fs","buildResume","YAMLResumeError","createDevCommand","watchResume","checkSystem","info","envinfo","checkXeTeX","stdout","execa","checkTectonic","checkFonts","installedFonts","getFonts","fonts","font","status","f","createDoctorCommand","createGenerateCommand","parsed","InvalidArgumentError","filename","spinner","streamedText","logger","ora","generateResume","chunk","getErrorMessage","listLanguages","markdownTable","LOCALE_LANGUAGE_OPTIONS","getLocaleLanguageDetail","createLanguagesCommand","cmd","DEFAULT_SAMPLE_ID","createNewCommand","newResume","listSampleResumes","sample","listSamples","samples","createSamplesListCommand","createSamplesCommand","listTemplates","templates","LATEX_TEMPLATE_OPTIONS","details","getLatexTemplateDetail","HTML_TEMPLATE_OPTIONS","getHtmlTemplateDetail","DOCX_TEMPLATE_OPTIONS","getDocxTemplateDetail","createTemplatesCommand","createValidateCommand","ANNOUNCEMENT","showBanner","box","setVerboseLog","verbose","createProgram","program","thisCommand"],"mappings":"0tBAAA,IAAAA,EAAA,CAEE,OAAA,CAAW,QAuFb,CAAA,CCrDO,SAASC,CAAAA,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACQ,CAGR,IAAMC,CAAAA,CADQD,CAAAA,CAAU,OAAA,CAAQ,OAAA,CAAS;AAAA,CAAI,EAAE,KAAA,CAAM;AAAA,CAAI,CAAA,CAC/BF,CAAAA,CAAM,IAAA,CAAO,CAAC,GAAK,EAAA,CAGvCI,CAAAA,CAAU,CAAA,EAAG,GAAA,CAAI,MAAA,CAAOJ,CAAAA,CAAM,MAAA,CAAS,CAAC,CAAC,CAAA,CAAA,CAAA,CAGzCK,CAAAA,CAAWC,CAAAA,CAAM,KAAA,CAAM,IAAA,CAC3B,CAAA,EAAGL,CAAU,CAAA,CAAA,EAAID,EAAM,IAAI,CAAA,CAAA,EAAIA,CAAAA,CAAM,MAAM,CAAA,CAC7C,CAAA,CACMO,CAAAA,CAAYD,CAAAA,CAAM,IAAI,IAAA,CAAK,SAAS,CAAA,CACpCE,CAAAA,CAAUF,CAAAA,CAAM,KAAA,CAAMN,CAAAA,CAAM,OAAO,EACnCS,CAAAA,CAAWH,CAAAA,CAAM,KAAA,CAAMH,CAAW,CAAA,CAClCO,CAAAA,CAAcJ,CAAAA,CAAM,KAAA,CAAM,KAAKF,CAAO,CAAA,CAE5C,OAAO,CACL,CAAA,EAAGC,CAAQ,CAAA,EAAA,EAAKE,CAAS,KAAKC,CAAO,CAAA,CAAA,CAC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AAW5B,CAAAA,EAAwB,CAAA,CAC3C4B,EAAQ,UAAA,CAAWzB,CAAAA,EAAkB,CAAA,CACrCyB,CAAAA,CAAQ,UAAA,CAAWlB,CAAAA,EAAsB,EACzCkB,CAAAA,CAAQ,UAAA,CAAWR,CAAAA,EAAwB,EAC3CQ,CAAAA,CAAQ,UAAA,CAAWP,CAAAA,EAAuB,EAEnCO,CACT","file":"chunk-ALTVHJ4K.js","sourcesContent":["{\n \"name\": \"yamlresume\",\n \"version\": \"0.15.1\",\n \"description\": \"The CLI interface for YAMLResume's engine\",\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"YAMLResume\",\n \"email\": \"support@yamlresume.com\",\n \"url\": \"https://yamlresume.dev\"\n },\n \"keywords\": [\n \"YAMLResume\",\n \"CV\",\n \"Resume\",\n \"LaTeX\",\n \"Typesetting\",\n \"PDF\",\n \"YAML\",\n \"JSON\"\n ],\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n }\n },\n \"bin\": {\n \"yamlresume\": \"./dist/cli.js\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"build:clean\": \"rm -rf dist\",\n \"build:prod\": \"tsup --dts --minify --sourcemap\",\n \"prepublishOnly\": \"pnpm test\",\n \"dev\": \"tsx src/cli.ts\",\n \"test\": \"vitest --run\",\n \"test:cov\": \"vitest --coverage --run\",\n \"test:watch\": \"vitest\",\n \"typedoc\": \"typedoc\"\n },\n \"dependencies\": {\n \"@yamlresume/ai\": \"workspace:*\",\n \"@yamlresume/core\": \"workspace:*\",\n \"@yamlresume/node\": \"workspace:*\",\n \"@yamlresume/samples\": \"workspace:*\",\n \"chalk\": \"^5.6.2\",\n \"commander\": \"^15.0.0\",\n \"consola\": \"^3.4.2\",\n \"envinfo\": \"^7.21.0\",\n \"execa\": \"^10.0.0\",\n \"extensionless\": \"^2.0.6\",\n \"font-list\": \"^2.1.0\",\n \"lodash-es\": \"^4.18.1\",\n \"markdown-table\": \"^3.0.4\",\n \"ora\": \"^8.0.0\",\n \"tslib\": \"^2.8.1\",\n \"which\": \"^7.0.0\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@types/envinfo\": \"^7.8.4\",\n \"@types/node\": \"^26.1.1\",\n \"@types/which\": \"^3.0.4\",\n \"@yamlresume/testing\": \"workspace:*\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/yamlresume/yamlresume.git\",\n \"directory\": \"packages/cli\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/yamlresume/yamlresume/issues\"\n },\n \"homepage\": \"https://yamlresume.dev/docs/cli\",\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport type { PositionalError } from '@yamlresume/node'\nimport chalk from 'chalk'\n\n/**\n * Formats a schema validation error in clang-style with line number, column\n * pointer, and message.\n *\n * @param error - The positional error to format.\n * @param resumePath - The source file path.\n * @param resumeStr - The content of the source file for line display.\n * @returns Formatted error string in clang style.\n */\nexport function prettifySchemaValidationError(\n error: PositionalError,\n resumePath: string,\n resumeStr: string\n): string {\n // Normalize CRLF to LF for cross-platform consistency\n const lines = resumeStr.replace(/\\r\\n/g, '\\n').split('\\n')\n const lineContent = lines[error.line - 1] || ''\n\n // Create the pointer line with spaces and caret\n const pointer = `${' '.repeat(error.column - 1)}^`\n\n // Color scheme similar to clang with enhanced visibility\n const filePath = chalk.white.bold(\n `${resumePath}:${error.line}:${error.column}`\n )\n const errorType = chalk.red.bold('warning')\n const message = chalk.white(error.message)\n const codeLine = chalk.white(lineContent)\n const pointerLine = chalk.green.bold(pointer)\n\n return [\n `${filePath}: ${errorType}: ${message}`,\n `${codeLine}`,\n `${pointerLine}`,\n ].join('\\n')\n}\n\n/**\n * Parses YAML parsing error messages and extracts line/column information.\n *\n * @param errorMessage - The error message from `yaml.parse`.\n * @param resumePath - The source file path.\n * @param resumeStr - The content of the source file for line display.\n * @returns Formatted error string in clang style.\n */\nexport function prettifyYamlParseError(\n errorMessage: string,\n resumePath: string,\n resumeStr: string\n): string {\n // parse the error message to extract line and column\n // example:\n // \"Nested mappings are not allowed in compact mappings at line 6, column 10\"\n const lineMatch = errorMessage.match(/at line (\\d+), column (\\d+)/)\n\n if (!lineMatch) {\n // if we can't parse the error, return a simple formatted message\n return [\n chalk.white.bold(resumePath),\n chalk.red.bold('error'),\n `${chalk.white(errorMessage)}.`,\n ].join(': ')\n }\n\n const line = Number.parseInt(lineMatch[1], 10)\n const column = Number.parseInt(lineMatch[2], 10)\n // Normalize CRLF to LF for cross-platform consistency\n const lines = resumeStr.replace(/\\r\\n/g, '\\n').split('\\n')\n const lineContent = lines[line - 1] || ''\n\n // create the pointer line with spaces and caret\n const pointer = `${' '.repeat(column - 1)}^`\n\n // color scheme similar to clang with enhanced visibility\n const filePath = chalk.white.bold(`${resumePath}:${line}:${column}`)\n const errorType = chalk.red.bold('error')\n const message = chalk.white(\n errorMessage\n .split('\\n')[0]\n .replace(/ at line \\d+, column \\d+:?/, '.')\n .trim()\n )\n const codeLine = chalk.white(lineContent)\n const pointerLine = chalk.green.bold(pointer)\n\n return [\n `${filePath}: ${errorType}: ${message}`,\n `${codeLine}`,\n `${pointerLine}`,\n ].join('\\n')\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport fs from 'node:fs'\nimport { joinNonEmptyString, YAMLResumeError } from '@yamlresume/core'\nimport {\n buildResume,\n LATEX_COMPILE_TIMEOUT,\n readResume,\n} from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nimport {\n prettifySchemaValidationError,\n prettifyYamlParseError,\n} from '../utils/format'\n\n/**\n * Parse and validate the timeout option.\n *\n * If the value is invalid, logs a warning and returns the default timeout.\n *\n * @param value - The timeout value in seconds as a string.\n * @returns The parsed timeout in seconds.\n */\nexport function parseTimeout(value: string): number {\n const num = Number(value)\n\n if (Number.isNaN(num) || num < 0) {\n consola.warn(\n joinNonEmptyString(\n [\n `Invalid timeout value: \"${value}\".`,\n `Using default timeout: ${LATEX_COMPILE_TIMEOUT}s.`,\n 'Timeout must be a non-negative number in seconds (0 to disable).',\n ],\n ' '\n )\n )\n return LATEX_COMPILE_TIMEOUT\n }\n\n return num\n}\n\n/**\n * Create a command instance to build a YAML resume to LaTeX and PDF\n */\nexport function createBuildCommand() {\n return new Command()\n .name('build')\n .description('build a resume to Docx, HTML, Markdown or LaTeX/PDF')\n .argument('<resume-path>', 'the resume file path')\n .option(\n '--no-pdf',\n 'only generate TeX file without PDF (for LaTeX layouts)'\n )\n .option('--no-validate', 'skip resume schema validation')\n .option('-o, --output <dir>', 'output directory for generated files')\n .option(\n '-t, --timeout <seconds>',\n joinNonEmptyString(\n [\n 'timeout for LaTeX compilation in seconds',\n `(default: ${LATEX_COMPILE_TIMEOUT}, 0 to disable)`,\n ],\n ' '\n ),\n (value) => parseTimeout(value)\n )\n .action(\n async (\n resumePath: string,\n options: {\n pdf: boolean\n validate: boolean\n output?: string\n timeout: number\n }\n ) => {\n try {\n const { validated, errors } = readResume(resumePath, {\n validate: options.validate,\n })\n\n if (validated === 'failed' && errors) {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n for (const error of errors) {\n consola.log(\n prettifySchemaValidationError(error, resumePath, resumeStr)\n )\n }\n }\n\n await buildResume(resumePath, {\n ...options,\n validate: false,\n logger: consola,\n })\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n if (error.code === 'INVALID_YAML') {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n consola.log(\n prettifyYamlParseError(error.message, resumePath, resumeStr)\n )\n }\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n process.exit(1)\n return\n }\n }\n )\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { watchResume } from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\n/**\n * Create a command instance to run in watch mode\n */\nexport function createDevCommand() {\n return new Command()\n .name('dev')\n .description('build a resume on file changes (watch mode)')\n .argument('<resume-path>', 'the resume file path')\n .option('--no-pdf', 'only generate TeX file without PDF')\n .option('--no-validate', 'skip resume schema validation')\n .option('-o, --output <dir>', 'output directory for generated files')\n .action(\n (\n resumePath: string,\n options: { pdf: boolean; validate: boolean; output?: string }\n ) => {\n watchResume(resumePath, { ...options, logger: consola })\n }\n )\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport envinfo from 'envinfo'\nimport { execa } from 'execa'\nimport { getFonts } from 'font-list'\n\n/**\n * Check system information\n */\nexport async function checkSystem() {\n const info = await envinfo.run(\n {\n System: ['OS', 'CPU'],\n Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'Bun'],\n },\n { json: false, showNotFound: true }\n )\n console.log(info)\n}\n\n/**\n * Check if XeTeX is installed\n */\nexport async function checkXeTeX() {\n consola.info('Checking XeTeX...')\n try {\n const { stdout } = await execa('xelatex', ['--version'])\n console.log(` XeTeX: ${stdout.split('\\n')[0]}\\n`)\n } catch {\n console.log(' XeTeX: Not Found\\n')\n }\n}\n\n/**\n * Check if Tectonic is installed\n */\nexport async function checkTectonic() {\n consola.info('Checking Tectonic...')\n try {\n const { stdout } = await execa('tectonic', ['--version'])\n console.log(` Tectonic: ${stdout.split('\\n')[0]}\\n`)\n } catch {\n console.log(' Tectonic: Not Found\\n')\n }\n}\n\n/**\n * Check if required fonts are installed\n */\nexport async function checkFonts() {\n consola.info('Checking Fonts...')\n const installedFonts = await getFonts({ disableQuoting: true })\n const fonts = [\n 'Linux Libertine O',\n 'Linux Libertine',\n 'Noto Serif CJK SC',\n 'Noto Sans CJK SC',\n ]\n\n for (const font of fonts) {\n // font-list returns fonts like \"Arial\" or \"Times New Roman\" in an array\n // We check if the required font is included in the list\n // The checking is case-insensitive\n const isInstalled = installedFonts.some((f) =>\n f.toLowerCase().includes(font.toLowerCase())\n )\n const status = isInstalled ? 'Installed' : 'Not Installed'\n console.log(` ${font}: ${status}`)\n }\n}\n\n/**\n * Create a command instance to check the environment\n */\nexport function createDoctorCommand() {\n return new Command()\n .name('doctor')\n .description('check environment for YAMLResume dependencies')\n .action(async () => {\n await checkSystem()\n await checkXeTeX()\n await checkTectonic()\n await checkFonts()\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { getErrorMessage, type Logger, YAMLResumeError } from '@yamlresume/core'\nimport { generateResume } from '@yamlresume/node'\nimport { Command, InvalidArgumentError } from 'commander'\nimport { consola } from 'consola'\nimport type { Ora } from 'ora'\nimport ora from 'ora'\n\n/**\n * Create a command instance to generate a resume with AI.\n */\nexport function createGenerateCommand() {\n return new Command()\n .name('generate')\n .description('generate a new resume with AI')\n .requiredOption('-p, --position <position>', 'target position or job title')\n .requiredOption('-l, --language <language>', 'target locale language')\n .option('-m, --model <model>', 'AI provider model to use')\n .option('-b, --base-url <url>', 'AI provider base URL')\n .option(\n '-r, --retry <count>',\n 'maximum retries when validation fails (default: 2)',\n (value) => {\n const parsed = Number.parseInt(value, 10)\n if (Number.isNaN(parsed) || parsed < 0) {\n throw new InvalidArgumentError(\n 'Retry count must be a non-negative integer.'\n )\n }\n return parsed\n }\n )\n .argument('<filename>', 'output filename')\n .addHelpText(\n 'after',\n `\nEnvironment variables:\n\n Required (one API key for the selected cloud provider):\n DEEPSEEK_API_KEY DeepSeek API key\n OPENAI_API_KEY OpenAI API key\n MOONSHOT_API_KEY Kimi (Moonshot AI) API key\n\n Optional:\n OLLAMA_HOST Ollama host for local models\n YAMLRESUME_AI_MODEL model override (overridden by --model)\n YAMLRESUME_AI_BASE_URL API base URL override (overridden by --base-url)\n`\n )\n .action(async function (\n this: Command,\n filename: string,\n options: {\n position: string\n language: string\n model?: string\n baseUrl?: string\n retry?: number\n }\n ) {\n let spinner: Ora | undefined\n let streamedText = ''\n\n const logger: Logger = {\n start: (message) => {\n spinner = ora(message).start()\n },\n success: (message) => {\n spinner?.succeed(message)\n consola.success(`Generated ${filename} successfully.`)\n },\n debug: consola.debug,\n info: consola.info,\n log: consola.log,\n warn: consola.warn,\n error: () => {},\n }\n\n try {\n await generateResume(filename, options.position, options.language, {\n model: options.model,\n baseURL: options.baseUrl,\n maxRetries: options.retry,\n onChunk: (chunk) => {\n streamedText += chunk\n if (spinner) {\n spinner.text = `Generating resume...\\n${streamedText.slice(-200)}`\n }\n },\n logger,\n })\n } catch (error) {\n spinner?.fail('Failed to generate resume')\n\n const message = getErrorMessage(error)\n consola.error(message)\n\n if (consola.level >= 4 && error instanceof Error && error.stack) {\n consola.error(error.stack)\n }\n\n this.error(message, {\n exitCode: error instanceof YAMLResumeError ? error.errno : 1,\n })\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n getLocaleLanguageDetail,\n LOCALE_LANGUAGE_OPTIONS,\n} from '@yamlresume/core'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all supported locale languages.\n *\n * The table includes columns for the language code and the language name.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listLanguages() {\n return markdownTable([\n ['locale.language', 'Language Name'],\n ...LOCALE_LANGUAGE_OPTIONS.map((value) => [\n value,\n getLocaleLanguageDetail(value).name,\n ]),\n ])\n}\n\n/**\n * Create a command instance to list supported languages\n */\n\nexport function createLanguagesCommand() {\n const cmd = new Command()\n .name('languages')\n .description('i18n and l10n support')\n\n cmd\n .command('list')\n .description('list all supported languages')\n .action(() => {\n consola.log(listLanguages())\n })\n\n return cmd\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { YAMLResumeError } from '@yamlresume/core'\nimport { newResume } from '@yamlresume/node'\nimport { listSampleResumes } from '@yamlresume/samples'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nconst DEFAULT_SAMPLE_ID = 'software-engineer'\n\n/**\n * Create a command instance to create a new YAML resume\n */\nexport function createNewCommand() {\n return new Command()\n .name('new')\n .description('create a new resume')\n .argument('[filename]', 'output filename', 'resume.yml')\n .option('--sample <id>', 'create from a curated sample resume')\n .option('--language <language>', 'locale language for the sample', 'en')\n .action((filename, options) => {\n try {\n newResume(\n filename,\n options.sample ?? DEFAULT_SAMPLE_ID,\n options.language,\n { showSampleSource: Boolean(options.sample), logger: consola }\n )\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n consola.info(\n `Available samples:\\n${listSampleResumes()\n .map((sample) => ` - ${sample.id}: ${sample.title}`)\n .join('\\n')}`\n )\n process.exit(1)\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { listSampleResumes } from '@yamlresume/samples'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all available sample resumes.\n *\n * The table includes columns for the sample id, position, title, and category.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listSamples() {\n const samples = listSampleResumes()\n\n return markdownTable([\n ['ID', 'Position', 'Title', 'Category'],\n ...samples.map((sample) => [\n sample.id,\n sample.position,\n sample.title,\n sample.category,\n ]),\n ])\n}\n\n/**\n * Create a command instance to list sample resumes.\n */\nexport function createSamplesListCommand() {\n return new Command()\n .name('list')\n .description('list all sample resumes')\n .action(() => {\n consola.log(listSamples())\n })\n}\n\nexport function createSamplesCommand() {\n return new Command()\n .name('samples')\n .description('manage sample resumes')\n .addCommand(createSamplesListCommand())\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n DOCX_TEMPLATE_OPTIONS,\n getDocxTemplateDetail,\n getHtmlTemplateDetail,\n getLatexTemplateDetail,\n HTML_TEMPLATE_OPTIONS,\n LATEX_TEMPLATE_OPTIONS,\n} from '@yamlresume/core'\nimport { Command } from 'commander'\nimport consola from 'consola'\nimport { markdownTable } from 'markdown-table'\n\n/**\n * Generates a markdown table listing all supported templates.\n *\n * The table includes columns for the template id, name and description.\n *\n * @returns A string containing the formatted markdown table.\n */\nexport function listTemplates() {\n const templates = [\n ...LATEX_TEMPLATE_OPTIONS.map((value) => {\n const details = getLatexTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ...HTML_TEMPLATE_OPTIONS.map((value) => {\n const details = getHtmlTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ...DOCX_TEMPLATE_OPTIONS.map((value) => {\n const details = getDocxTemplateDetail(value)\n return [value, details.engine, details.name, details.description]\n }),\n ]\n\n return markdownTable([\n ['layouts.[].template', 'Engine', 'Template Name', 'Description'],\n ...templates,\n ])\n}\n\n/**\n * Create a command instance to list supported templates\n */\nexport function createTemplatesCommand() {\n const cmd = new Command()\n .name('templates')\n .description('manage resume templates')\n\n cmd\n .command('list')\n .description('list all supported templates')\n .action(() => {\n consola.log(listTemplates())\n })\n\n return cmd\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport fs from 'node:fs'\nimport { YAMLResumeError } from '@yamlresume/core'\nimport { readResume } from '@yamlresume/node'\nimport { Command } from 'commander'\nimport { consola } from 'consola'\n\nimport {\n prettifySchemaValidationError,\n prettifyYamlParseError,\n} from '../utils/format'\n\n/**\n * Create a command instance to validate a YAML resume\n */\nexport function createValidateCommand() {\n return new Command()\n .name('validate')\n .description('validate a resume against the YAMLResume schema')\n .argument('<resume-path>', 'the resume file path')\n .action(async (resumePath: string) => {\n try {\n const { validated, errors } = readResume(resumePath, {\n validate: true,\n })\n\n if (validated === 'success') {\n consola.success('Resume validation passed.')\n return\n }\n\n if (validated === 'failed' && errors) {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n for (const error of errors) {\n consola.log(\n prettifySchemaValidationError(error, resumePath, resumeStr)\n )\n }\n consola.fail('Resume validation failed.')\n }\n } catch (error) {\n if (error instanceof YAMLResumeError) {\n if (error.code === 'INVALID_YAML') {\n const resumeStr = fs.readFileSync(resumePath, 'utf8')\n consola.log(\n prettifyYamlParseError(error.message, resumePath, resumeStr)\n )\n }\n consola.error(error.message)\n process.exit(error.errno)\n return\n }\n\n consola.error(error.message)\n process.exit(1)\n return\n }\n })\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { box } from 'consola/utils'\n\n/**\n * Announcement shown in the root help output.\n *\n * Update this constant when there is something new to announce and clear it\n * when the announcement becomes stale.\n */\nconst ANNOUNCEMENT = [\n 'New in v0.15.0: sample resumes!',\n 'Create one: yamlresume new --sample <sample-id>',\n 'Browse all: yamlresume samples list',\n].join('\\n')\n\n/**\n * Get the announcement banner for the current release.\n *\n * @returns The boxed announcement banner.\n */\nexport function showBanner(): string {\n return box(ANNOUNCEMENT)\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport consola from 'consola'\n\n/**\n * Set the verbose mode for consola\n *\n * @param verbose - Whether to enable verbose mode\n * @see https://github.com/unjs/consola?tab=readme-ov-file#log-level\n */\nexport function setVerboseLog(verbose: boolean) {\n consola.level = verbose ? 4 : 3\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2023–Present PPResume (https://ppresume.com)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Command } from 'commander'\n\nimport packageJson from '../package.json' with { type: 'json' }\nimport {\n createBuildCommand,\n createDevCommand,\n createDoctorCommand,\n createGenerateCommand,\n createLanguagesCommand,\n createNewCommand,\n createSamplesCommand,\n createTemplatesCommand,\n createValidateCommand,\n} from './commands'\nimport { setVerboseLog, showBanner } from './utils'\n\n/**\n * Create the CLI program.\n *\n * @returns The CLI program.\n */\nexport function createProgram(): Command {\n const program = new Command()\n\n const banner = `\n __ __ _ __ __ _ ____\n \\\\ \\\\ / // \\\\ | \\\\/ | | | _ \\\\ ___ ___ _ _ ___ ___ ___\n \\\\ V // _ \\\\ | |\\\\/| | | | |_) / _ \\\\/ __| | | / _ \\\\/ _ \\\\ / _ \\\\\n | |/ ___ \\\\| | | | |___| _ < __/\\\\__ \\\\ |_| | | | | | | __/\n |_/_/ \\\\_\\\\_| |_|_____|_| \\\\_\\\\___||___/\\\\____|_| |_| |_|\\\\___|\n`\n\n program\n .name('yamlresume')\n .description(['YAMLResume — Resume as Code in YAML', banner].join('\\n'))\n .version(packageJson.version)\n .option('-v, --verbose', 'verbose output')\n .addHelpText('before', showBanner())\n .hook('preAction', (thisCommand) => {\n setVerboseLog(thisCommand.opts().verbose)\n })\n\n program.addCommand(createBuildCommand())\n program.addCommand(createGenerateCommand())\n program.addCommand(createDevCommand())\n program.addCommand(createDoctorCommand())\n program.addCommand(createLanguagesCommand())\n program.addCommand(createNewCommand())\n program.addCommand(createSamplesCommand())\n program.addCommand(createTemplatesCommand())\n program.addCommand(createValidateCommand())\n\n return program\n}\n"]}
@@ -1,2 +0,0 @@
1
- export{j as createProgram}from'./chunk-ALTVHJ4K.js';//# sourceMappingURL=program-VDS3I6H6.js.map
2
- //# sourceMappingURL=program-VDS3I6H6.js.map