@antora/content-classifier
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -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 @@ |
@@ -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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25425
584
Updatedlodash@~4.17
Updatedvinyl@~2.2