@antora/html-single-extension 1.0.0-rc.4 → 1.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/converter.js CHANGED
@@ -31,13 +31,11 @@ async function convert (file, convertAttributes, buildConfig, { logCommand, runC
31
31
  if (exts.length) extDslTypes.forEach((type) => (Opal.const_get_local(Extensions, type).$$iclasses.length = 0))
32
32
  }
33
33
  } else {
34
- const { command, cwd = process.cwd(), attributeOptionFlag, outputOptionFlag, stderr = 'print' } = buildConfig
34
+ const { command, cwd = process.cwd(), attributeOptionFlag, stderr = 'print' } = buildConfig
35
35
  if (!command) return null
36
- const extraArgs = convertAttributes.toArgs(attributeOptionFlag || '-a')
37
- const stdout =
38
- outputOptionFlag === false
39
- ? 'buffer'
40
- : extraArgs.push(outputOptionFlag || '-o', convertAttributes.outfile) && 'print'
36
+ const outputOptionFlag = buildConfig.outputOptionFlag || (buildConfig.outputOptionFlag === false ? false : '-o')
37
+ const extraArgs = convertAttributes.toArgs(attributeOptionFlag || '-a', outputOptionFlag)
38
+ const stdout = outputOptionFlag ? 'print' : 'buffer'
41
39
  logCommand?.(command, extraArgs, file, convertAttributes)
42
40
  return runCommand(command, extraArgs.concat('-'), { parse: true, cwd, stdin: file.contents, stdout, stderr })
43
41
  }
@@ -45,7 +43,8 @@ async function convert (file, convertAttributes, buildConfig, { logCommand, runC
45
43
 
46
44
  function getDefaultCommand (cwd, playbook) {
47
45
  const defaultCommand = playbook?.runtime.stacktrace ? `${DEFAULT_COMMAND} --trace` : DEFAULT_COMMAND
48
- return fsp.access(ospath.join(cwd, 'Gemfile.lock')).then(
46
+ const bundleLockfile = playbook?.env.BUNDLE_LOCKFILE ?? `${playbook?.env.BUNDLE_GEMFILE ?? 'Gemfile'}.lock`
47
+ return fsp.access(ospath.resolve(cwd, bundleLockfile)).then(
49
48
  () => `bundle exec ${defaultCommand}`,
50
49
  () => defaultCommand
51
50
  )
package/lib/index.js CHANGED
@@ -3,12 +3,5 @@
3
3
  const converter = require('./converter')
4
4
 
5
5
  module.exports.register = function ({ config }, providers) {
6
- requireAssembler(this).configure(this, converter, config, providers)
7
- }
8
-
9
- function requireAssembler (context, packageName = '@antora/assembler') {
10
- try {
11
- return context.require(packageName) // when installed with Antora
12
- } catch {}
13
- return require(packageName) // when installed separate from Antora, perhaps in project
6
+ this.require('@antora/assembler', { require }).configure(this, converter, config, providers)
14
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/html-single-extension",
3
- "version": "1.0.0-rc.4",
3
+ "version": "1.0.0-rc.6",
4
4
  "description": "An Antora extension that uses Assembler to merge pages into assembly files, export them to standalone HTML documents, 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.4"
35
+ "@antora/assembler": "1.0.0-rc.6"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=20.0.0"