Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antora/cli

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/cli - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5

13

lib/cli.js

@@ -8,3 +8,2 @@ #!/usr/bin/env node

const configSchema = require('@antora/playbook-builder/lib/config/schema')
const fs = require('fs')
const ospath = require('path')

@@ -22,5 +21,9 @@ const solitaryConvict = require('@antora/playbook-builder/lib/solitary-convict')

function requireSiteGenerator (name) {
const localPath = ospath.resolve('node_modules', name)
return require(fs.existsSync(ospath.join(localPath, 'package.json')) ? localPath : name)
function requireSiteGenerator (name, playbookDir) {
try {
// QUESTION should we remove the leading ./ ? (makes it a broader search)
const searchPath = '.' + ospath.sep + ospath.relative('.', ospath.join(playbookDir, 'node_modules'))
name = require.resolve(name, { paths: [searchPath] })
} catch (e) {}
return require(name)
}

@@ -43,3 +46,3 @@

// TODO honor --generator option (or auto-detect)
generateSite = requireSiteGenerator('@antora/site-generator-default')
generateSite = requireSiteGenerator('@antora/site-generator-default', ospath.resolve(playbookFile, '..'))
} catch (e) {

@@ -46,0 +49,0 @@ console.error('error: No site generator found. Try installing @antora/site-generator-default.')

{
"name": "@antora/cli",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"description": "The command line interface for Antora.",

@@ -21,3 +21,3 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/playbook-builder": "1.0.0-alpha.4",
"@antora/playbook-builder": "1.0.0-alpha.5",
"commander": "^2.13.0"

@@ -24,0 +24,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc