@vivliostyle/cli
Advanced tools
Comparing version 3.5.2 to 4.0.0
@@ -0,7 +1,26 @@ | ||
# [4.0.0](https://github.com/vivliostyle/vivliostyle-cli/compare/v3.5.2...v4.0.0) (2021-08-28) | ||
### chore | ||
* Update node engines ([30abdfa](https://github.com/vivliostyle/vivliostyle-cli/commit/30abdfac9d7bb563c9831059d8b564bee55ec358)) | ||
### Features | ||
* Add render mode supports docker ([b2931b3](https://github.com/vivliostyle/vivliostyle-cli/commit/b2931b3e4c230633acb794c673e79cde93bd6d3d)) | ||
* Lazy install chromium ([966f02c](https://github.com/vivliostyle/vivliostyle-cli/commit/966f02ca4c406155bab69c9d65c9c6b4d2f2ea17)) | ||
* Support preflight options ([1c78975](https://github.com/vivliostyle/vivliostyle-cli/commit/1c789753dff747fe1f23e8eb3ca573ce7214944f)) | ||
### BREAKING CHANGES | ||
* Node v12 is now the minimum supported version | ||
* Switched to use puppeteer-core rather than puppeteer. If you're using vivliostyle-cli in any containers, you should run puppeteer's install.js and contain the browser runtime. | ||
## [3.5.2](https://github.com/vivliostyle/vivliostyle-cli/compare/v3.5.1...v3.5.2) (2021-07-23) | ||
### Bug Fixes | ||
* VFM frontmatter not processed ([68deef2](https://github.com/vivliostyle/vivliostyle-cli/commit/68deef2effdec36252ef4548b30867438bdd4d5a)), closes [#196](https://github.com/vivliostyle/vivliostyle-cli/issues/196) | ||
- VFM frontmatter not processed ([68deef2](https://github.com/vivliostyle/vivliostyle-cli/commit/68deef2effdec36252ef4548b30867438bdd4d5a)), closes [#196](https://github.com/vivliostyle/vivliostyle-cli/issues/196) | ||
@@ -8,0 +27,0 @@ ## [3.5.1](https://github.com/vivliostyle/vivliostyle-cli/compare/v3.5.0...v3.5.1) (2021-07-14) |
@@ -8,11 +8,7 @@ #!/usr/bin/env node | ||
const commander_1 = __importDefault(require("commander")); | ||
const fs_1 = __importDefault(require("fs")); | ||
const resolve_pkg_1 = __importDefault(require("resolve-pkg")); | ||
const upath_1 = require("upath"); | ||
const util_1 = require("./util"); | ||
const { version: cliVersion } = util_1.readJSON(upath_1.join(__dirname, '../package.json')); | ||
const { version: coreVersion } = JSON.parse(fs_1.default.readFileSync(resolve_pkg_1.default('@vivliostyle/viewer', { cwd: __dirname }) + '/package.json', 'utf8')); | ||
const version = `cli: ${cliVersion} | ||
core: ${coreVersion}`; | ||
commander_1.default | ||
const const_1 = require("./const"); | ||
const version = `cli: ${const_1.cliVersion} | ||
core: ${const_1.coreVersion}`; | ||
const program = new commander_1.default.Command(); | ||
program | ||
.name('vivliostyle') | ||
@@ -19,0 +15,0 @@ .version(version, '-v, --version') |
@@ -12,4 +12,6 @@ "use strict"; | ||
const upath_1 = __importDefault(require("upath")); | ||
const browser_1 = require("../browser"); | ||
const builder_1 = require("../builder"); | ||
const config_1 = require("../config"); | ||
const container_1 = require("../container"); | ||
const pdf_1 = require("../pdf"); | ||
@@ -36,2 +38,5 @@ const util_1 = require("../util"); | ||
pressReady: options.pressReady, | ||
renderMode: options.renderMode || 'local', | ||
preflight: options.preflight, | ||
preflightOption: options.preflightOption, | ||
verbose: options.verbose, | ||
@@ -41,2 +46,4 @@ timeout: options.timeout, | ||
executableChromium: options.executableChromium, | ||
image: options.image, | ||
bypassedPdfBuilderOption: options.bypassedPdfBuilderOption, | ||
}).catch(util_1.gracefulError); | ||
@@ -48,4 +55,16 @@ } | ||
async function build(cliFlags) { | ||
var _a, _b; | ||
util_1.startLogging('Collecting build config'); | ||
var _a, _b, _c, _d; | ||
if (cliFlags.bypassedPdfBuilderOption) { | ||
const option = JSON.parse(cliFlags.bypassedPdfBuilderOption); | ||
// Host doesn't know inside path of chromium path | ||
option.executableChromium = browser_1.getExecutableBrowserPath(); | ||
util_1.debug('bypassedPdfBuilderOption', option); | ||
await pdf_1.buildPDF(option); | ||
util_1.log(); | ||
process_1.default.exit(0); | ||
} | ||
const isInContainer = container_1.checkContainerEnvironment(); | ||
if (!isInContainer) { | ||
util_1.startLogging('Collecting build config'); | ||
} | ||
const loadedConf = config_1.collectVivliostyleConfig(cliFlags); | ||
@@ -70,10 +89,16 @@ const { vivliostyleConfig, vivliostyleConfigPath } = loadedConf; | ||
if (target.format === 'pdf') { | ||
output = await pdf_1.buildPDF({ | ||
...config, | ||
input: ((_b = (_a = config.manifestPath) !== null && _a !== void 0 ? _a : config.webbookEntryPath) !== null && _b !== void 0 ? _b : config.epubOpfPath), | ||
output: target.path, | ||
customStyle: config.customStyle, | ||
customUserStyle: config.customUserStyle, | ||
singleDoc: config.singleDoc, | ||
}); | ||
if (!isInContainer && target.renderMode === 'docker') { | ||
output = await pdf_1.buildPDFWithContainer({ | ||
...config, | ||
input: ((_b = (_a = config.manifestPath) !== null && _a !== void 0 ? _a : config.webbookEntryPath) !== null && _b !== void 0 ? _b : config.epubOpfPath), | ||
target, | ||
}); | ||
} | ||
else { | ||
output = await pdf_1.buildPDF({ | ||
...config, | ||
input: ((_d = (_c = config.manifestPath) !== null && _c !== void 0 ? _c : config.webbookEntryPath) !== null && _d !== void 0 ? _d : config.epubOpfPath), | ||
target, | ||
}); | ||
} | ||
} | ||
@@ -97,3 +122,5 @@ else if (target.format === 'webpub') { | ||
} | ||
util_1.stopLogging('Built successfully.', '🎉'); | ||
if (!isInContainer) { | ||
util_1.stopLogging('Built successfully.', '🎉'); | ||
} | ||
process_1.default.exit(0); | ||
@@ -100,0 +127,0 @@ } |
@@ -9,2 +9,3 @@ import commander from 'commander'; | ||
}[]; | ||
bypassedPdfBuilderOption?: string; | ||
} | ||
@@ -15,3 +16,3 @@ export declare function setupBuildParserProgram(): commander.Command; | ||
format?: string; | ||
}[]): OutputFormat[]; | ||
}[]): Pick<OutputFormat, 'path' | 'format'>[]; | ||
//# sourceMappingURL=build.parser.d.ts.map |
@@ -52,3 +52,4 @@ "use strict"; | ||
.option('-d, --single-doc', 'single HTML document input') | ||
.option('-p, --press-ready', `make generated PDF compatible with press ready PDF/X-1a [false]`) | ||
.option('-p, --press-ready', `make generated PDF compatible with press ready PDF/X-1a [false] | ||
This option is equivalent with "--preflight press-ready"`) | ||
.option('-t, --timeout <seconds>', `timeout limit for waiting Vivliostyle process [60s]`, config_1.validateTimeoutFlag) | ||
@@ -59,5 +60,12 @@ .option('-T, --theme <theme>', 'theme path or package name') | ||
.option('-l, --language <language>', 'language') | ||
.addOption(new commander_1.default.Option('--render-mode <mode>', 'if docker is set, Vivliostyle try to render PDF on Docker container [local]').choices(['local', 'docker'])) | ||
.addOption(new commander_1.default.Option('--preflight <mode>', 'apply the process to generate PDF for printing').choices(['press-ready', 'press-ready-local'])) | ||
.option('--preflight-option <options...>', `options for preflight process (ex: gray-scale, enforce-outline) | ||
Please refer the document of press-ready for further information. | ||
https://github.com/vibranthq/press-ready`) | ||
.option('--verbose', 'verbose log output') | ||
.option('--no-sandbox', `launch chrome without sandbox. use this option when ECONNREFUSED error occurred.`) | ||
.option('--executable-chromium <path>', 'specify a path of executable Chrome (or Chromium) you installed') | ||
.option('--image <image>', 'specify a docker image to render') | ||
.addOption(new commander_1.default.Option('--bypassed-pdf-builder-option <json>').hideHelp()) | ||
.action((_arg, option) => { | ||
@@ -75,9 +83,7 @@ option.targets = inferenceTargetsOption(targets); | ||
} | ||
if (!format) { | ||
return output_1.detectOutputFormat(output); | ||
} | ||
else if (!output_1.availableOutputFormat.includes(format)) { | ||
const detectedFormat = format !== null && format !== void 0 ? format : output_1.detectOutputFormat(output); | ||
if (!output_1.checkOutputFormat(detectedFormat)) { | ||
throw new Error(`Unknown format: ${format}`); | ||
} | ||
return { path: output, format }; | ||
return { path: output, format: detectedFormat }; | ||
}); | ||
@@ -84,0 +90,0 @@ } |
@@ -9,2 +9,3 @@ "use strict"; | ||
const upath_1 = __importDefault(require("upath")); | ||
const container_1 = require("../container"); | ||
const util_1 = require("../util"); | ||
@@ -39,2 +40,3 @@ const init_parser_1 = require("./init.parser"); | ||
${cliFlags.theme ? '' : '// '}theme: '${cliFlags.theme || ''}', // .css or local dir or npm package. default to undefined | ||
image: '${container_1.CONTAINER_IMAGE}', | ||
entry: [ // **required field** | ||
@@ -41,0 +43,0 @@ // 'introduction.md', // 'title' is automatically guessed from the file (frontmatter > first heading) |
@@ -8,4 +8,4 @@ "use strict"; | ||
const chokidar_1 = __importDefault(require("chokidar")); | ||
const puppeteer_1 = __importDefault(require("puppeteer")); | ||
const upath_1 = __importDefault(require("upath")); | ||
const browser_1 = require("../browser"); | ||
const builder_1 = require("../builder"); | ||
@@ -44,3 +44,3 @@ const config_1 = require("../config"); | ||
var _a, _b; | ||
util_1.startLogging('Preparing preview'); | ||
util_1.startLogging('Collecting preview config'); | ||
const loadedConf = config_1.collectVivliostyleConfig(cliFlags); | ||
@@ -53,2 +53,3 @@ const { vivliostyleConfig, vivliostyleConfigPath } = loadedConf; | ||
let config = await config_1.mergeConfig(cliFlags, vivliostyleConfig, context); | ||
util_1.startLogging('Preparing preview'); | ||
// build artifacts | ||
@@ -67,8 +68,6 @@ if (config.manifestPath) { | ||
}); | ||
util_1.debug(`Executing Chromium path: ${config.executableChromium || | ||
puppeteer_1.default.executablePath()}`); | ||
const browser = await util_1.launchBrowser({ | ||
util_1.debug(`Executing Chromium path: ${config.executableChromium}`); | ||
const browser = await browser_1.launchBrowser({ | ||
headless: false, | ||
executablePath: config.executableChromium || | ||
puppeteer_1.default.executablePath(), | ||
executablePath: config.executableChromium, | ||
args: [ | ||
@@ -75,0 +74,0 @@ '--allow-file-access-from-files', |
@@ -42,3 +42,3 @@ import { InputFormat, ManuscriptMediaType } from './input'; | ||
configPath?: string; | ||
targets?: OutputFormat[]; | ||
targets?: Pick<OutputFormat, 'path' | 'format'>[]; | ||
theme?: string; | ||
@@ -56,4 +56,8 @@ size?: string; | ||
timeout?: number; | ||
renderMode?: 'local' | 'docker'; | ||
preflight?: 'press-ready' | 'press-ready-local'; | ||
preflightOption?: string[]; | ||
sandbox?: boolean; | ||
executableChromium?: string; | ||
image?: string; | ||
} | ||
@@ -95,3 +99,2 @@ export interface WebPublicationManifestConfig { | ||
quick: boolean; | ||
pressReady: boolean; | ||
language: string | null; | ||
@@ -107,2 +110,3 @@ vfmOptions: { | ||
executableChromium: string; | ||
image: string; | ||
} & ManifestConfig; | ||
@@ -109,0 +113,0 @@ export declare function validateTimeoutFlag(val: string): number; |
@@ -12,7 +12,8 @@ "use strict"; | ||
const fs_1 = __importDefault(require("fs")); | ||
const puppeteer_1 = __importDefault(require("puppeteer")); | ||
const resolve_pkg_1 = __importDefault(require("resolve-pkg")); | ||
const upath_1 = __importDefault(require("upath")); | ||
const url_1 = require("url"); | ||
const browser_1 = require("./browser"); | ||
const const_1 = require("./const"); | ||
const container_1 = require("./container"); | ||
const epub_1 = require("./epub"); | ||
@@ -181,3 +182,3 @@ const input_1 = require("./input"); | ||
async function mergeConfig(cliFlags, config, context) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; | ||
util_1.debug('context directory', context); | ||
@@ -218,12 +219,16 @@ util_1.debug('cliFlags', cliFlags); | ||
const pressReady = (_k = (_j = cliFlags.pressReady) !== null && _j !== void 0 ? _j : config === null || config === void 0 ? void 0 : config.pressReady) !== null && _k !== void 0 ? _k : false; | ||
const renderMode = (_l = cliFlags.renderMode) !== null && _l !== void 0 ? _l : 'local'; | ||
const preflight = (_m = cliFlags.preflight) !== null && _m !== void 0 ? _m : (pressReady ? 'press-ready' : null); | ||
const preflightOption = (_o = cliFlags.preflightOption) !== null && _o !== void 0 ? _o : []; | ||
const vfmOptions = { | ||
hardLineBreaks: (_m = (_l = config === null || config === void 0 ? void 0 : config.vfm) === null || _l === void 0 ? void 0 : _l.hardLineBreaks) !== null && _m !== void 0 ? _m : false, | ||
disableFormatHtml: (_p = (_o = config === null || config === void 0 ? void 0 : config.vfm) === null || _o === void 0 ? void 0 : _o.disableFormatHtml) !== null && _p !== void 0 ? _p : false, | ||
hardLineBreaks: (_q = (_p = config === null || config === void 0 ? void 0 : config.vfm) === null || _p === void 0 ? void 0 : _p.hardLineBreaks) !== null && _q !== void 0 ? _q : false, | ||
disableFormatHtml: (_s = (_r = config === null || config === void 0 ? void 0 : config.vfm) === null || _r === void 0 ? void 0 : _r.disableFormatHtml) !== null && _s !== void 0 ? _s : false, | ||
}; | ||
const verbose = (_q = cliFlags.verbose) !== null && _q !== void 0 ? _q : false; | ||
const timeout = (_s = (_r = cliFlags.timeout) !== null && _r !== void 0 ? _r : config === null || config === void 0 ? void 0 : config.timeout) !== null && _s !== void 0 ? _s : DEFAULT_TIMEOUT; | ||
const sandbox = (_t = cliFlags.sandbox) !== null && _t !== void 0 ? _t : true; | ||
const executableChromium = (_u = cliFlags.executableChromium) !== null && _u !== void 0 ? _u : puppeteer_1.default.executablePath(); | ||
const verbose = (_t = cliFlags.verbose) !== null && _t !== void 0 ? _t : false; | ||
const timeout = (_v = (_u = cliFlags.timeout) !== null && _u !== void 0 ? _u : config === null || config === void 0 ? void 0 : config.timeout) !== null && _v !== void 0 ? _v : DEFAULT_TIMEOUT; | ||
const sandbox = (_w = cliFlags.sandbox) !== null && _w !== void 0 ? _w : true; | ||
const executableChromium = (_x = cliFlags.executableChromium) !== null && _x !== void 0 ? _x : browser_1.getExecutableBrowserPath(); | ||
const image = (_z = (_y = cliFlags.image) !== null && _y !== void 0 ? _y : config === null || config === void 0 ? void 0 : config.image) !== null && _z !== void 0 ? _z : container_1.CONTAINER_IMAGE; | ||
const themeIndexes = []; | ||
const rootTheme = (_v = parseTheme(cliFlags.theme, util_1.cwd, workspaceDir)) !== null && _v !== void 0 ? _v : parseTheme(config === null || config === void 0 ? void 0 : config.theme, context, workspaceDir); | ||
const rootTheme = (_0 = parseTheme(cliFlags.theme, util_1.cwd, workspaceDir)) !== null && _0 !== void 0 ? _0 : parseTheme(config === null || config === void 0 ? void 0 : config.theme, context, workspaceDir); | ||
if (rootTheme) { | ||
@@ -235,6 +240,19 @@ themeIndexes.push(rootTheme); | ||
if ((_a = cliFlags.targets) === null || _a === void 0 ? void 0 : _a.length) { | ||
return cliFlags.targets.map(({ path: outputPath, format }) => ({ | ||
path: upath_1.default.resolve(outputPath), | ||
format, | ||
})); | ||
return cliFlags.targets.map(({ path: outputPath, format }) => { | ||
if (format === 'pdf') { | ||
return { | ||
path: upath_1.default.resolve(outputPath), | ||
format, | ||
renderMode, | ||
preflight, | ||
preflightOption, | ||
}; | ||
} | ||
else { | ||
return { | ||
path: upath_1.default.resolve(outputPath), | ||
format, | ||
}; | ||
} | ||
}); | ||
} | ||
@@ -245,13 +263,31 @@ if (config === null || config === void 0 ? void 0 : config.output) { | ||
: [config.output]).map((target) => { | ||
if (typeof target === 'string') { | ||
return output_1.detectOutputFormat(upath_1.default.resolve(context, target)); | ||
var _a, _b, _c, _d; | ||
const targetObj = typeof target === 'string' ? { path: target } : target; | ||
const outputPath = upath_1.default.resolve(context, targetObj.path); | ||
const format = (_a = targetObj.format) !== null && _a !== void 0 ? _a : output_1.detectOutputFormat(outputPath); | ||
if (!output_1.checkOutputFormat(format)) { | ||
throw new Error(`Unknown format: ${format}`); | ||
} | ||
const outputPath = upath_1.default.resolve(context, target.path); | ||
if (!target.format) { | ||
return { ...target, ...output_1.detectOutputFormat(outputPath) }; | ||
if (format === 'pdf') { | ||
const outputRenderMode = (_b = targetObj.renderMode) !== null && _b !== void 0 ? _b : renderMode; | ||
const outputPreflight = (_c = targetObj.preflight) !== null && _c !== void 0 ? _c : preflight; | ||
if (!output_1.checkRenderMode(outputRenderMode)) { | ||
throw new Error(`Unknown renderMode: ${outputRenderMode}`); | ||
} | ||
if (outputPreflight !== null && | ||
!output_1.checkPreflightMode(outputPreflight)) { | ||
throw new Error(`Unknown preflight: ${outputPreflight}`); | ||
} | ||
return { | ||
...targetObj, | ||
path: outputPath, | ||
format, | ||
renderMode: outputRenderMode, | ||
preflight: outputPreflight, | ||
preflightOption: (_d = targetObj.preflightOption) !== null && _d !== void 0 ? _d : preflightOption, | ||
}; | ||
} | ||
if (!output_1.availableOutputFormat.includes(target.format)) { | ||
throw new Error(`Unknown format: ${target.format}`); | ||
else { | ||
return { ...targetObj, path: outputPath, format }; | ||
} | ||
return { ...target, path: outputPath }; | ||
}); | ||
@@ -265,2 +301,5 @@ } | ||
format: 'pdf', | ||
renderMode, | ||
preflight, | ||
preflightOption, | ||
}, | ||
@@ -275,3 +314,2 @@ ]; | ||
themeIndexes, | ||
pressReady, | ||
size, | ||
@@ -289,2 +327,3 @@ customStyle, | ||
executableChromium, | ||
image, | ||
}; | ||
@@ -291,0 +330,0 @@ if (!cliFlags.input && !config) { |
export declare const MANIFEST_FILENAME = "publication.json"; | ||
export declare const TOC_FILENAME = "index.html"; | ||
export declare const TOC_TITLE = "Table of Contents"; | ||
export declare const cliVersion: string; | ||
export declare const coreVersion: string; | ||
//# sourceMappingURL=const.d.ts.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TOC_TITLE = exports.TOC_FILENAME = exports.MANIFEST_FILENAME = void 0; | ||
exports.coreVersion = exports.cliVersion = exports.TOC_TITLE = exports.TOC_FILENAME = exports.MANIFEST_FILENAME = void 0; | ||
const fs_1 = __importDefault(require("fs")); | ||
const resolve_pkg_1 = __importDefault(require("resolve-pkg")); | ||
const upath_1 = require("upath"); | ||
const util_1 = require("./util"); | ||
exports.MANIFEST_FILENAME = 'publication.json'; | ||
exports.TOC_FILENAME = 'index.html'; | ||
exports.TOC_TITLE = 'Table of Contents'; | ||
exports.cliVersion = util_1.readJSON(upath_1.join(__dirname, '../package.json')).version; | ||
exports.coreVersion = JSON.parse(fs_1.default.readFileSync(resolve_pkg_1.default('@vivliostyle/viewer', { cwd: __dirname }) + '/package.json', 'utf8')).version; | ||
//# sourceMappingURL=const.js.map |
@@ -7,2 +7,5 @@ interface OutputFormatTrait<T extends string = string> { | ||
path: string; | ||
renderMode: 'local' | 'docker'; | ||
preflight: 'press-ready' | 'press-ready-local' | null; | ||
preflightOption: string[]; | ||
} | ||
@@ -14,5 +17,7 @@ /** A directory including publication.json, series of (X)HTML files and assets */ | ||
export declare type OutputFormat = PdfOutput | WebPublicationOutput; | ||
export declare const availableOutputFormat: ReadonlyArray<OutputFormat['format']>; | ||
export declare function detectOutputFormat(outputPath: string): OutputFormat; | ||
export declare const checkOutputFormat: (v: unknown) => v is "pdf" | "webpub"; | ||
export declare const checkRenderMode: (v: unknown) => v is "docker" | "local"; | ||
export declare const checkPreflightMode: (v: unknown) => v is "press-ready" | "press-ready-local" | null; | ||
export declare function detectOutputFormat(outputPath: string): OutputFormat['format']; | ||
export {}; | ||
//# sourceMappingURL=output.d.ts.map |
@@ -6,15 +6,23 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.detectOutputFormat = exports.availableOutputFormat = void 0; | ||
exports.detectOutputFormat = exports.checkPreflightMode = exports.checkRenderMode = exports.checkOutputFormat = void 0; | ||
const upath_1 = __importDefault(require("upath")); | ||
exports.availableOutputFormat = [ | ||
'pdf', | ||
'webpub', | ||
]; | ||
const checkOutputFormat = (v) => { | ||
return ['pdf', 'webpub'].includes(v); | ||
}; | ||
exports.checkOutputFormat = checkOutputFormat; | ||
const checkRenderMode = (v) => { | ||
return ['local', 'docker'].includes(v); | ||
}; | ||
exports.checkRenderMode = checkRenderMode; | ||
const checkPreflightMode = (v) => { | ||
return ['press-ready', 'press-ready-local'].includes(v); | ||
}; | ||
exports.checkPreflightMode = checkPreflightMode; | ||
function detectOutputFormat(outputPath) { | ||
const lowerCasedExt = upath_1.default.extname(outputPath); | ||
if (lowerCasedExt === '.pdf') { | ||
return { format: 'pdf', path: outputPath }; | ||
return 'pdf'; | ||
} | ||
else { | ||
return { format: 'webpub', path: outputPath }; | ||
return 'webpub'; | ||
} | ||
@@ -21,0 +29,0 @@ } |
import { MergedConfig } from './config'; | ||
import { PdfOutput } from './output'; | ||
export declare type BuildPdfOptions = Omit<MergedConfig, 'outputs' | 'input'> & { | ||
input: string; | ||
output: string; | ||
target: PdfOutput; | ||
}; | ||
export declare function buildPDF({ input, output, workspaceDir, size, customStyle, customUserStyle, singleDoc, executableChromium, sandbox, verbose, timeout, pressReady, entryContextDir, entries, }: BuildPdfOptions): Promise<string>; | ||
export declare function buildPDFWithContainer(option: BuildPdfOptions): Promise<string | null>; | ||
export declare function buildPDF({ input, target, workspaceDir, size, customStyle, customUserStyle, singleDoc, executableChromium, image, sandbox, verbose, timeout, entryContextDir, entries, }: BuildPdfOptions): Promise<string | null>; | ||
//# sourceMappingURL=pdf.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildPDF = void 0; | ||
exports.buildPDF = exports.buildPDFWithContainer = void 0; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
@@ -13,6 +13,38 @@ const shelljs_1 = __importDefault(require("shelljs")); | ||
const url_1 = require("url"); | ||
const browser_1 = require("./browser"); | ||
const container_1 = require("./container"); | ||
const postprocess_1 = require("./postprocess"); | ||
const server_1 = require("./server"); | ||
const util_1 = require("./util"); | ||
async function buildPDF({ input, output, workspaceDir, size, customStyle, customUserStyle, singleDoc, executableChromium, sandbox, verbose, timeout, pressReady, entryContextDir, entries, }) { | ||
async function buildPDFWithContainer(option) { | ||
const bypassedOption = { | ||
...option, | ||
input: container_1.toContainerPath(option.input), | ||
target: { | ||
...option.target, | ||
path: container_1.toContainerPath(option.target.path), | ||
}, | ||
entryContextDir: container_1.toContainerPath(option.entryContextDir), | ||
workspaceDir: container_1.toContainerPath(option.workspaceDir), | ||
customStyle: option.customStyle && container_1.toContainerPath(option.customStyle), | ||
customUserStyle: option.customUserStyle && container_1.toContainerPath(option.customUserStyle), | ||
sandbox: false, | ||
}; | ||
await container_1.runContainer({ | ||
image: option.image, | ||
userVolumeArgs: container_1.collectVolumeArgs([ | ||
option.workspaceDir, | ||
upath_1.default.dirname(option.target.path), | ||
]), | ||
commandArgs: [ | ||
'build', | ||
'--bypassed-pdf-builder-option', | ||
JSON.stringify(bypassedOption), | ||
], | ||
}); | ||
return option.target.path; | ||
} | ||
exports.buildPDFWithContainer = buildPDFWithContainer; | ||
async function buildPDF({ input, target, workspaceDir, size, customStyle, customUserStyle, singleDoc, executableChromium, image, sandbox, verbose, timeout, entryContextDir, entries, }) { | ||
const isInContainer = container_1.checkContainerEnvironment(); | ||
util_1.logUpdate(`Launching build environment`); | ||
@@ -29,10 +61,23 @@ const navigateURL = server_1.getBrokerUrl({ | ||
util_1.debug(`Executing Chromium path: ${executableChromium}`); | ||
const browser = await util_1.launchBrowser({ | ||
if (!browser_1.checkBrowserAvailability(executableChromium)) { | ||
const puppeteerDir = upath_1.default.dirname(require.resolve('puppeteer-core/package.json')); | ||
if (!upath_1.default.relative(puppeteerDir, executableChromium).startsWith('..')) { | ||
// The browser on puppeteer-core isn't downloaded first time starting CLI so try to download it | ||
await browser_1.downloadBrowser(); | ||
} | ||
else { | ||
// executableChromium seems to be specified explicitly | ||
throw new Error(`Cannot find the browser. Please check the executable chromium path: ${executableChromium}`); | ||
} | ||
} | ||
const browser = await browser_1.launchBrowser({ | ||
headless: true, | ||
executablePath: executableChromium, | ||
// Why `--no-sandbox` flag? Running Chrome as root without --no-sandbox is not supported. See https://crbug.com/638180. | ||
args: [ | ||
'--allow-file-access-from-files', | ||
// FIXME: We seem have to disable sandbox now | ||
// https://github.com/vivliostyle/vivliostyle-cli/issues/186 | ||
sandbox ? '' : '--no-sandbox', | ||
'--disable-web-security', | ||
isInContainer ? '--disable-dev-shm-usage' : '', | ||
], | ||
@@ -43,2 +88,5 @@ }); | ||
util_1.logUpdate('Building pages'); | ||
// FIXME: This issue was reported but all workaround didn't fix | ||
// https://github.com/puppeteer/puppeteer/issues/4039 | ||
await new Promise((res) => setTimeout(res, 1000)); | ||
const page = await browser.newPage(); | ||
@@ -139,8 +187,12 @@ page.on('pageerror', (error) => { | ||
util_1.logUpdate('Processing PDF'); | ||
shelljs_1.default.mkdir('-p', upath_1.default.dirname(output)); | ||
shelljs_1.default.mkdir('-p', upath_1.default.dirname(target.path)); | ||
const post = await postprocess_1.PostProcess.load(pdf); | ||
await post.metadata(metadata); | ||
await post.toc(toc); | ||
await post.save(output, { pressReady }); | ||
return output; | ||
await post.save(target.path, { | ||
preflight: target.preflight, | ||
preflightOption: target.preflightOption, | ||
image, | ||
}); | ||
return target.path; | ||
} | ||
@@ -147,0 +199,0 @@ exports.buildPDF = buildPDF; |
/// <reference types="node" /> | ||
import { Meta, TOCItem } from './broker'; | ||
export interface SaveOption { | ||
pressReady: boolean; | ||
} | ||
import { MergedConfig } from './config'; | ||
import { PdfOutput } from './output'; | ||
export declare type SaveOption = Pick<PdfOutput, 'preflight' | 'preflightOption'> & Pick<MergedConfig, 'image'>; | ||
export declare function pressReadyWithContainer({ input, output, preflightOption, image, }: { | ||
input: string; | ||
output: string; | ||
preflightOption: string[]; | ||
image: string; | ||
}): Promise<void>; | ||
export declare class PostProcess { | ||
@@ -10,3 +16,3 @@ private document; | ||
private constructor(); | ||
save(output: string, { pressReady }: SaveOption): Promise<void>; | ||
save(output: string, { preflight, preflightOption, image }: SaveOption): Promise<void>; | ||
metadata(tree: Meta): Promise<void>; | ||
@@ -13,0 +19,0 @@ toc(items: TOCItem[]): Promise<void>; |
@@ -25,3 +25,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PostProcess = void 0; | ||
exports.PostProcess = exports.pressReadyWithContainer = void 0; | ||
const decamelize_1 = __importDefault(require("decamelize")); | ||
const fs_1 = __importDefault(require("fs")); | ||
@@ -33,2 +34,3 @@ const os_1 = __importDefault(require("os")); | ||
const uuid_1 = require("uuid"); | ||
const container_1 = require("./container"); | ||
const util_1 = require("./util"); | ||
@@ -50,2 +52,23 @@ const prefixes = { | ||
}; | ||
async function pressReadyWithContainer({ input, output, preflightOption, image, }) { | ||
await container_1.runContainer({ | ||
image, | ||
entrypoint: 'press-ready', | ||
userVolumeArgs: container_1.collectVolumeArgs([ | ||
upath_1.default.dirname(input), | ||
upath_1.default.dirname(output), | ||
]), | ||
commandArgs: [ | ||
'build', | ||
'-i', | ||
container_1.toContainerPath(input), | ||
'-o', | ||
container_1.toContainerPath(output), | ||
...preflightOption | ||
.map((opt) => `--${decamelize_1.default(opt, { separator: '-' })}`) | ||
.filter((str) => /^[\w-]+/.test(str)), | ||
], | ||
}); | ||
} | ||
exports.pressReadyWithContainer = pressReadyWithContainer; | ||
class PostProcess { | ||
@@ -59,4 +82,5 @@ constructor(document) { | ||
} | ||
async save(output, { pressReady = false }) { | ||
const input = pressReady | ||
async save(output, { preflight, preflightOption, image }) { | ||
const isInContainer = container_1.checkContainerEnvironment(); | ||
const input = preflight | ||
? upath_1.default.join(os_1.default.tmpdir(), `vivliostyle-cli-${uuid_1.v1()}.pdf`) | ||
@@ -66,7 +90,33 @@ : output; | ||
await fs_1.default.promises.writeFile(input, pdf); | ||
if (pressReady) { | ||
if (preflight === 'press-ready-local' || | ||
(preflight === 'press-ready' && isInContainer)) { | ||
util_1.stopLogging('Running press-ready', '🚀'); | ||
await pressReadyModule.build({ input, output }); | ||
await pressReadyModule.build({ | ||
...preflightOption.reduce((acc, opt) => { | ||
const optName = decamelize_1.default(opt, { separator: '-' }); | ||
return optName.startsWith('no-') | ||
? { | ||
...acc, | ||
[optName.slice(3)]: false, | ||
} | ||
: { | ||
...acc, | ||
[optName]: true, | ||
}; | ||
}, {}), | ||
input, | ||
output, | ||
}); | ||
util_1.startLogging(); | ||
} | ||
else if (preflight === 'press-ready') { | ||
util_1.stopLogging('Running press-ready', '🚀'); | ||
await pressReadyWithContainer({ | ||
input, | ||
output, | ||
preflightOption, | ||
image, | ||
}); | ||
util_1.startLogging(); | ||
} | ||
} | ||
@@ -73,0 +123,0 @@ async metadata(tree) { |
@@ -45,3 +45,9 @@ { | ||
"path": { "type": "string" }, | ||
"format": { "type": "string" } | ||
"format": { "type": "string" }, | ||
"renderMode": { "type": "string" }, | ||
"preflight": { "type": "string" }, | ||
"preflightOption": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
} | ||
}, | ||
@@ -173,2 +179,6 @@ "required": ["path"], | ||
"additionalProperties": false | ||
}, | ||
"image": { | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
@@ -175,0 +185,0 @@ } |
/// <reference types="node" /> | ||
import debugConstructor from 'debug'; | ||
import fs from 'fs'; | ||
import puppeteer from 'puppeteer'; | ||
export declare const debug: debugConstructor.Debugger; | ||
export declare const cwd: string; | ||
export declare let beforeExitHandlers: (() => void)[]; | ||
export declare function startLogging(text?: string): void; | ||
@@ -18,5 +18,2 @@ export declare function stopLogging(text?: string, symbol?: string): void; | ||
export declare function inflateZip(filePath: string, dest: string): Promise<void>; | ||
declare type PuppeteerLaunchOptions = Parameters<typeof puppeteer.launch>[0]; | ||
declare type Browser = ReturnType<typeof puppeteer.launch>; | ||
export declare function launchBrowser(options?: PuppeteerLaunchOptions): Browser; | ||
export declare function useTmpDirectory(): Promise<[string, () => void]>; | ||
@@ -26,3 +23,2 @@ export declare function touchTmpFile(path: string): Promise<() => void>; | ||
export declare function isUrlString(str: string): boolean; | ||
export {}; | ||
//# sourceMappingURL=util.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isUrlString = exports.pathStartsWith = exports.touchTmpFile = exports.useTmpDirectory = exports.launchBrowser = exports.inflateZip = exports.statFile = exports.readJSON = exports.gracefulError = exports.logInfo = exports.logError = exports.logSuccess = exports.logUpdate = exports.log = exports.stopLogging = exports.startLogging = exports.cwd = exports.debug = void 0; | ||
exports.isUrlString = exports.pathStartsWith = exports.touchTmpFile = exports.useTmpDirectory = exports.inflateZip = exports.statFile = exports.readJSON = exports.gracefulError = exports.logInfo = exports.logError = exports.logSuccess = exports.logUpdate = exports.log = exports.stopLogging = exports.startLogging = exports.beforeExitHandlers = exports.cwd = exports.debug = void 0; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
@@ -13,3 +13,2 @@ const debug_1 = __importDefault(require("debug")); | ||
const ora_1 = __importDefault(require("ora")); | ||
const puppeteer_1 = __importDefault(require("puppeteer")); | ||
const shelljs_1 = __importDefault(require("shelljs")); | ||
@@ -22,3 +21,3 @@ const tmp_1 = __importDefault(require("tmp")); | ||
const ora = ora_1.default({ color: 'blue', spinner: 'circle' }); | ||
let beforeExitHandlers = []; | ||
exports.beforeExitHandlers = []; | ||
const exitSignals = ['exit', 'SIGINT', 'SIGTERM', 'SIGHUP']; | ||
@@ -28,5 +27,5 @@ exitSignals.forEach((sig) => { | ||
var _a; | ||
while (beforeExitHandlers.length) { | ||
while (exports.beforeExitHandlers.length) { | ||
try { | ||
(_a = beforeExitHandlers.shift()) === null || _a === void 0 ? void 0 : _a(); | ||
(_a = exports.beforeExitHandlers.shift()) === null || _a === void 0 ? void 0 : _a(); | ||
} | ||
@@ -131,17 +130,2 @@ catch (e) { | ||
exports.inflateZip = inflateZip; | ||
async function launchBrowser(options) { | ||
// process listener of puppeteer won't handle signal | ||
// because it doesn't support subprocess which is spawned by CLI | ||
const browser = await puppeteer_1.default.launch({ | ||
handleSIGINT: false, | ||
handleSIGTERM: false, | ||
handleSIGHUP: false, | ||
...options, | ||
}); | ||
beforeExitHandlers.push(() => { | ||
browser.close(); | ||
}); | ||
return browser; | ||
} | ||
exports.launchBrowser = launchBrowser; | ||
function useTmpDirectory() { | ||
@@ -160,3 +144,3 @@ return new Promise((res, rej) => { | ||
}; | ||
beforeExitHandlers.push(callback); | ||
exports.beforeExitHandlers.push(callback); | ||
res([path, callback]); | ||
@@ -174,3 +158,3 @@ }); | ||
}; | ||
beforeExitHandlers.push(callback); | ||
exports.beforeExitHandlers.push(callback); | ||
return callback; | ||
@@ -177,0 +161,0 @@ } |
{ | ||
"name": "@vivliostyle/cli", | ||
"description": "Save the pdf file via Headless Chrome and Vivliostyle.", | ||
"version": "3.5.2", | ||
"version": "4.0.0", | ||
"author": "spring_raining <harusamex.com@gmail.com>", | ||
@@ -16,3 +16,3 @@ "scripts": { | ||
"example": "yarn --cwd example build", | ||
"pretest": "yarn build", | ||
"pretest": "yarn build && node ./node_modules/puppeteer-core/install.js", | ||
"release": "release-it", | ||
@@ -23,11 +23,14 @@ "release:pre": "release-it --preRelease --npm.tag=next", | ||
"dependencies": { | ||
"@vivliostyle/vfm": "v1.0.0-alpha.27", | ||
"@vivliostyle/vfm": "1.0.2", | ||
"@vivliostyle/viewer": "2.8.1", | ||
"ajv": "^7.0.4", | ||
"ajv-formats": "^1.5.1", | ||
"chalk": "^4.1.1", | ||
"cheerio": "^1.0.0-rc.6", | ||
"chokidar": "^3.5.1", | ||
"commander": "^7.2.0", | ||
"debug": "^4.3.1", | ||
"chalk": "^4.1.2", | ||
"cheerio": "^1.0.0-rc.10", | ||
"chokidar": "^3.5.2", | ||
"command-exists": "1.2.9", | ||
"commander": "^8.1.0", | ||
"debug": "^4.3.2", | ||
"decamelize": "5.0.0", | ||
"execa": "^5.1.1", | ||
"fast-xml-parser": "^3.19.0", | ||
@@ -37,10 +40,11 @@ "globby": "^11.0.3", | ||
"hastscript": "^6.0.0", | ||
"image-size": "^0.9.4", | ||
"mime-types": "^2.1.30", | ||
"node-stream-zip": "^1.13.3", | ||
"ora": "^5.4.0", | ||
"image-size": "^1.0.0", | ||
"is-interactive": "1.0.0", | ||
"mime-types": "^2.1.32", | ||
"node-stream-zip": "^1.14.0", | ||
"ora": "^5.4.1", | ||
"pdf-lib": "^1.16.0", | ||
"press-ready": "^4.0.3", | ||
"prettier": "^2.2.1", | ||
"puppeteer": "9.0.0", | ||
"prettier": "^2.3.2", | ||
"puppeteer-core": "10.2.0", | ||
"resolve-pkg": "^2.0.0", | ||
@@ -50,3 +54,2 @@ "shelljs": "^0.8.4", | ||
"tmp": "^0.2.1", | ||
"to-vfile": "^6.1.0", | ||
"upath": "^2.0.1", | ||
@@ -57,25 +60,25 @@ "uuid": "^8.3.2", | ||
"devDependencies": { | ||
"@release-it/conventional-changelog": "^2.0.1", | ||
"@types/debug": "^4.1.5", | ||
"@types/jest": "^26.0.23", | ||
"@types/jsdom": "^16.2.10", | ||
"@types/mime-types": "^2.1.0", | ||
"@types/node": "^15.0.1", | ||
"@types/tmp": "^0.2.0", | ||
"@types/uuid": "^8.3.0", | ||
"execa": "^5.0.0", | ||
"file-type": "^16.3.0", | ||
"@release-it/conventional-changelog": "^3.3.0", | ||
"@types/command-exists": "1.2.0", | ||
"@types/debug": "^4.1.7", | ||
"@types/jest": "^27.0.1", | ||
"@types/jsdom": "^16.2.13", | ||
"@types/mime-types": "^2.1.1", | ||
"@types/node": "^16.7.2", | ||
"@types/tmp": "^0.2.1", | ||
"@types/uuid": "^8.3.1", | ||
"file-type": "^16.5.3", | ||
"husky": "^4.3.8", | ||
"jest": "^26.6.3", | ||
"jsdom": "^16.5.3", | ||
"jest": "^27.0.6", | ||
"jsdom": "^17.0.0", | ||
"json-schema-to-typescript": "^10.1.4", | ||
"lint-staged": "^10.5.4", | ||
"nodemon": "^2.0.7", | ||
"lint-staged": "^11.1.2", | ||
"nodemon": "^2.0.12", | ||
"npm-run-all": "^4.1.5", | ||
"prettier-plugin-organize-imports": "^1.1.1", | ||
"pretty-quick": "^3.1.0", | ||
"release-it": "^14.6.1", | ||
"prettier-plugin-organize-imports": "^2.3.3", | ||
"pretty-quick": "^3.1.1", | ||
"release-it": "^14.11.5", | ||
"shx": "^0.3.3", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.2.4" | ||
"ts-jest": "^27.0.5", | ||
"typescript": "^4.3.5" | ||
}, | ||
@@ -108,4 +111,4 @@ "types": "dist/index.d.ts", | ||
"engines": { | ||
"node": ">=10 <=12 || >=14.1.0" | ||
"node": ">=12" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
313406
118
3892
32
15
+ Addedcommand-exists@1.2.9
+ Addeddecamelize@5.0.0
+ Addedexeca@^5.1.1
+ Addedis-interactive@1.0.0
+ Addedpuppeteer-core@10.2.0
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/mdast@3.0.15(transitive)
+ Added@types/minimist@1.2.5(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Added@types/parse5@5.0.3(transitive)
+ Added@vivliostyle/vfm@1.0.2(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedbail@1.0.5(transitive)
+ Addedbcp-47-match@1.0.3(transitive)
+ Addedcamelcase-keys@6.2.2(transitive)
+ Addedcharacter-entities@1.2.4(transitive)
+ Addedcharacter-reference-invalid@1.1.4(transitive)
+ Addedcollapse-white-space@1.0.6(transitive)
+ Addedcommand-exists@1.2.9(transitive)
+ Addedcommander@8.3.0(transitive)
+ Addedcss-selector-parser@1.4.1(transitive)
+ Addeddebug@4.3.1(transitive)
+ Addeddecamelize@5.0.0(transitive)
+ Addeddecamelize-keys@1.1.1(transitive)
+ Addeddevtools-protocol@0.0.901419(transitive)
+ Addeddirection@1.0.4(transitive)
+ Addeddoctype@2.0.4(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedexeca@5.1.1(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedfault@1.0.4(transitive)
+ Addedformat@0.2.2(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedgithub-slugger@1.5.0(transitive)
+ Addedhard-rejection@2.1.0(transitive)
+ Addedhast-to-hyperscript@9.0.1(transitive)
+ Addedhast-util-embedded@1.0.6(transitive)
+ Addedhast-util-find-and-replace@3.2.1(transitive)
+ Addedhast-util-from-parse5@6.0.1(transitive)
+ Addedhast-util-has-property@1.0.4(transitive)
+ Addedhast-util-is-body-ok-link@1.0.4(transitive)
+ Addedhast-util-phrasing@1.0.5(transitive)
+ Addedhast-util-raw@6.1.0(transitive)
+ Addedhast-util-select@4.0.2(transitive)
+ Addedhast-util-to-parse5@6.0.0(transitive)
+ Addedhast-util-to-string@1.0.4(transitive)
+ Addedhosted-git-info@2.8.94.1.0(transitive)
+ Addedhtml-element-attributes@2.3.0(transitive)
+ Addedhtml-whitespace-sensitive-tag-names@1.0.3(transitive)
+ Addedhttps-proxy-agent@5.0.0(transitive)
+ Addedhuman-signals@2.1.0(transitive)
+ Addedimage-size@1.2.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedinline-style-parser@0.1.1(transitive)
+ Addedis-alphabetical@1.0.4(transitive)
+ Addedis-alphanumerical@1.0.4(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-decimal@1.0.4(transitive)
+ Addedis-hexadecimal@1.0.4(transitive)
+ Addedis-plain-obj@1.1.02.1.0(transitive)
+ Addedis-whitespace-character@1.0.4(transitive)
+ Addedis-word-character@1.0.4(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedkind-of@6.0.3(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedmap-obj@1.0.14.3.0(transitive)
+ Addedmarkdown-escapes@1.0.4(transitive)
+ Addedmd-attr-parser@1.3.0(transitive)
+ Addedmdast-util-definitions@4.0.0(transitive)
+ Addedmdast-util-find-and-replace@1.1.1(transitive)
+ Addedmdast-util-to-hast@10.2.0(transitive)
+ Addedmdast-util-to-string@2.0.0(transitive)
+ Addedmdurl@1.0.1(transitive)
+ Addedmeow@9.0.0(transitive)
+ Addedmin-indent@1.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedminimist-options@4.1.0(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.1.2(transitive)
+ Addednode-fetch@2.6.1(transitive)
+ Addednormalize-package-data@2.5.03.0.3(transitive)
+ Addednot@0.1.0(transitive)
+ Addedparse-entities@2.0.0(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedparse5@6.0.1(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedprismjs@1.27.0(transitive)
+ Addedprogress@2.0.1(transitive)
+ Addedpuppeteer-core@10.2.0(transitive)
+ Addedquick-lru@4.0.1(transitive)
+ Addedread-pkg@5.2.0(transitive)
+ Addedread-pkg-up@7.0.1(transitive)
+ Addedredent@3.0.0(transitive)
+ Addedrefractor@3.6.0(transitive)
+ Addedrehype-format@3.1.0(transitive)
+ Addedrehype-minify-whitespace@4.0.5(transitive)
+ Addedrehype-raw@5.1.0(transitive)
+ Addedrehype-stringify@8.0.0(transitive)
+ Addedremark-attr@0.11.1(transitive)
+ Addedremark-breaks@1.0.5(transitive)
+ Addedremark-footnotes@1.0.02.0.0(transitive)
+ Addedremark-frontmatter@2.0.0(transitive)
+ Addedremark-parse@8.0.3(transitive)
+ Addedremark-rehype@8.1.0(transitive)
+ Addedremark-shortcodes@0.3.1(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedsemver@5.7.27.7.1(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.21(transitive)
+ Addedstate-toggle@1.0.3(transitive)
+ Addedstrip-indent@3.0.0(transitive)
+ Addedstyle-to-object@0.3.0(transitive)
+ Addedtar-fs@2.0.0(transitive)
+ Addedtrim@0.0.1(transitive)
+ Addedtrim-newlines@3.0.1(transitive)
+ Addedtrim-trailing-lines@1.1.4(transitive)
+ Addedtrough@1.0.5(transitive)
+ Addedtype-fest@0.18.10.6.00.8.1(transitive)
+ Addedunbzip2-stream@1.3.3(transitive)
+ Addedunherit@1.1.3(transitive)
+ Addedunified@9.2.2(transitive)
+ Addedunist-builder@2.0.3(transitive)
+ Addedunist-util-filter@2.0.3(transitive)
+ Addedunist-util-find-after@3.0.0(transitive)
+ Addedunist-util-generated@1.1.6(transitive)
+ Addedunist-util-inspect@6.0.1(transitive)
+ Addedunist-util-position@3.1.0(transitive)
+ Addedunist-util-remove@2.1.0(transitive)
+ Addedunist-util-remove-position@2.0.1(transitive)
+ Addedunist-util-select@3.0.4(transitive)
+ Addedunist-util-visit@2.0.3(transitive)
+ Addedunist-util-visit-parents@3.1.1(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedvfile-location@3.2.0(transitive)
+ Addedweb-namespaces@1.1.4(transitive)
+ Addedws@7.4.6(transitive)
+ Addedyallist@4.0.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
+ Addedzwitch@1.0.5(transitive)
- Removedpuppeteer@9.0.0
- Removedto-vfile@^6.1.0
- Removedcommander@7.2.0(transitive)
- Removeddevtools-protocol@0.0.869402(transitive)
- Removedhttps-proxy-agent@5.0.1(transitive)
- Removedimage-size@0.9.7(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedprogress@2.0.3(transitive)
- Removedpuppeteer@9.0.0(transitive)
- Removedtar-fs@2.1.2(transitive)
- Removedtr46@0.0.3(transitive)
- Removedunbzip2-stream@1.4.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedws@7.5.10(transitive)
Updated@vivliostyle/vfm@1.0.2
Updatedchalk@^4.1.2
Updatedcheerio@^1.0.0-rc.10
Updatedchokidar@^3.5.2
Updatedcommander@^8.1.0
Updateddebug@^4.3.2
Updatedimage-size@^1.0.0
Updatedmime-types@^2.1.32
Updatednode-stream-zip@^1.14.0
Updatedora@^5.4.1
Updatedprettier@^2.3.2