New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antora/playbook-builder

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/playbook-builder - npm Package Compare versions

Comparing version 1.0.0-rc.1 to 1.0.0-rc.2

36

lib/build-playbook.js

@@ -34,28 +34,18 @@ 'use strict'

const specFileRelPath = config.get('playbook')
if (specFileRelPath) {
let specFileAbsPath = ospath.resolve(specFileRelPath)
if (ospath.extname(specFileAbsPath)) {
if (!fs.existsSync(specFileAbsPath)) throw new Error('playbook file does not exist')
} else if (fs.existsSync(specFileAbsPath + '.yml')) {
specFileAbsPath += '.yml'
} else if (fs.existsSync(specFileAbsPath + '.json')) {
specFileAbsPath += '.json'
} else if (fs.existsSync(specFileAbsPath + '.cson')) {
specFileAbsPath += '.cson'
const relSpecFilePath = config.get('playbook')
if (relSpecFilePath) {
let absSpecFilePath = ospath.resolve(relSpecFilePath)
if (ospath.extname(absSpecFilePath)) {
if (!fs.existsSync(absSpecFilePath)) throw new Error('playbook file does not exist')
} else if (fs.existsSync(absSpecFilePath + '.yml')) {
absSpecFilePath += '.yml'
} else if (fs.existsSync(absSpecFilePath + '.json')) {
absSpecFilePath += '.json'
} else if (fs.existsSync(absSpecFilePath + '.cson')) {
absSpecFilePath += '.cson'
} else {
throw new Error('playbook file could not be resolved')
}
const playbookData = parseSpecFile(specFileAbsPath)
// temporary migration
if ('ui' in playbookData && typeof playbookData.ui.bundle === 'string') {
playbookData.ui.bundle = { url: playbookData.ui.bundle }
if ('start_path' in playbookData.ui) {
playbookData.ui.bundle.start_path = playbookData.ui.start_path
delete playbookData.ui.start_path
}
}
// end temporary migration
config.load(playbookData)
if (specFileRelPath !== specFileAbsPath) config.set('playbook', specFileAbsPath)
config.load(parseSpecFile(absSpecFilePath))
if (relSpecFilePath !== absSpecFilePath) config.set('playbook', absSpecFilePath)
}

@@ -62,0 +52,0 @@

{
"name": "@antora/playbook-builder",
"version": "1.0.0-rc.1",
"version": "1.0.0-rc.2",
"description": "Builds a playbook object from user input for configuring successive documentation components in an Antora pipeline.",

@@ -5,0 +5,0 @@ "license": "MPL-2.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