@antora/pdf-extension 1.0.0-rc.2 → 1.0.0-rc.4

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.
Files changed (2) hide show
  1. package/lib/converter.js +5 -3
  2. package/package.json +2 -2
package/lib/converter.js CHANGED
@@ -8,6 +8,7 @@ const PACKAGE_NAME = require('../package.json').name
8
8
 
9
9
  async function convert (file, convertAttributes, buildConfig, { logCommand, runCommand }) {
10
10
  const { command, cwd = process.cwd(), attributeOptionFlag, outputOptionFlag, stderr = 'print' } = buildConfig
11
+ if (!command) return null
11
12
  const extraArgs = convertAttributes.toArgs(attributeOptionFlag || '-a')
12
13
  const stdout =
13
14
  outputOptionFlag === false
@@ -17,10 +18,11 @@ async function convert (file, convertAttributes, buildConfig, { logCommand, runC
17
18
  return runCommand(command, extraArgs.concat('-'), { parse: true, cwd, stdin: file.contents, stdout, stderr })
18
19
  }
19
20
 
20
- function getDefaultCommand (cwd) {
21
+ function getDefaultCommand (cwd, playbook) {
22
+ const defaultCommand = playbook?.runtime.stacktrace ? `${DEFAULT_COMMAND} --trace` : DEFAULT_COMMAND
21
23
  return fsp.access(ospath.join(cwd, 'Gemfile.lock')).then(
22
- () => `bundle exec ${DEFAULT_COMMAND}`,
23
- () => DEFAULT_COMMAND
24
+ () => `bundle exec ${defaultCommand}`,
25
+ () => defaultCommand
24
26
  )
25
27
  }
26
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/pdf-extension",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "An Antora extension that uses Assembler to merge pages into assembly files, export them to the PDF format, and publish them with the site.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "OpenDevise Inc. (https://opendevise.com)",
@@ -32,7 +32,7 @@
32
32
  "#package": "./package.json"
33
33
  },
34
34
  "dependencies": {
35
- "@antora/assembler": "1.0.0-rc.2"
35
+ "@antora/assembler": "1.0.0-rc.4"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=20.0.0"