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

@antora/content-classifier

Package Overview
Dependencies
Maintainers
2
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/content-classifier - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

20

lib/classify-content.js

@@ -119,10 +119,14 @@ 'use strict'

const rel = contentCatalog.resolvePage(pageSpec)
if (!rel) throw new Error('Specified start page for site not found: ' + pageSpec)
const src = Object.assign({}, START_PAGE_ID, {
family: 'alias',
basename: 'index.adoc',
stem: 'index',
mediaType: 'text/asciidoc',
})
contentCatalog.addFile({ src, rel })
if (rel) {
const src = Object.assign({}, START_PAGE_ID, {
family: 'alias',
basename: 'index.adoc',
stem: 'index',
mediaType: 'text/asciidoc',
})
contentCatalog.addFile({ src, rel })
} else {
console.warn('Start page specified for site not found: ' + pageSpec)
//throw new Error('Start page specified for site not found: ' + pageSpec)
}
}

@@ -129,0 +133,0 @@

3

lib/content-catalog.js

@@ -28,3 +28,4 @@ 'use strict'

if (!startPage) {
if (startPageSpec) throw new Error(`Start page specified for ${version}@${name} not found: ` + startPageSpec)
//if (startPageSpec) throw new Error(`Start page specified for ${version}@${name} not found: ` + startPageSpec)
if (startPageSpec) console.warn(`Start page specified for ${version}@${name} not found: ` + startPageSpec)
// TODO throw error or report warning; for now, we're just faking it

@@ -31,0 +32,0 @@ //throw new Error(`Start page for ${version}@${name} not specified and no index page found.`)

@@ -5,3 +5,3 @@ 'use strict'

// ex. 1.0@antora:asciidoc:syntax/lists.adoc
const RESOURCE_ID_RX = /^(?:([^@:$]+)@)?(?:(?:([^@:$]+):)?(?:([^@:$]+))?:)?(?:([^@:$]+)\$)?([^@:$]+)$/
const RESOURCE_ID_RX = /^(?:([^@:$]+)@)?(?:(?:([^@:$]+):)?(?:([^@:$]+))?:)?(?:([^@:$]+)\$)?([^:$][^@:$]*)$/
const RESOURCE_ID_RX_GROUP = { version: 1, component: 2, module: 3, family: 4, relative: 5 }

@@ -46,2 +46,3 @@

let relative = match[RESOURCE_ID_RX_GROUP.relative]
if (~relative.indexOf('/')) relative = relative.split('/').filter((it) => it && it !== '.' && it !== '..').join('/')
if (family === 'page' && !relative.endsWith('.adoc')) relative += '.adoc'

@@ -48,0 +49,0 @@

{
"name": "@antora/content-classifier",
"version": "2.0.0",
"version": "2.0.1",
"description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.",

@@ -19,10 +19,10 @@ "license": "MPL-2.0",

"dependencies": {
"lodash": "^4.17.11",
"vinyl": "^2.2.0"
"lodash": "~4.17",
"vinyl": "~2.2"
},
"devDependencies": {
"@antora/content-aggregator": "2.0.0"
"@antora/content-aggregator": "2.0.1"
},
"engines": {
"node": ">= 8.0.0"
"node": ">=8.11.0"
},

@@ -29,0 +29,0 @@ "files": [

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