@antora/assembler 1.0.0-beta.1 → 1.0.0-beta.2
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/assemble-content.js +7 -6
- package/package.json +1 -1
package/lib/assemble-content.js
CHANGED
|
@@ -99,24 +99,25 @@ async function assembleContent (playbook, contentCatalog, converter, { configSou
|
|
|
99
99
|
})
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function createResolveAssemblyModel (context, contentCatalog,
|
|
102
|
+
function createResolveAssemblyModel (context, contentCatalog, shared, intrinsicAttributes, navigationCatalog) {
|
|
103
103
|
const { assemblerProfiles } = context.getVariables()
|
|
104
|
-
const { insertStartPage, rootLevel, sectionMergeStrategy } = defaults
|
|
105
104
|
if (!assemblerProfiles) {
|
|
106
105
|
return (componentVersion) => {
|
|
107
106
|
const navigation =
|
|
108
107
|
navigationCatalog?.getNavigation(componentVersion.name, componentVersion.version) ?? componentVersion.navigation
|
|
109
|
-
return {
|
|
108
|
+
return Object.assign({}, shared, { navigation })
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
const boundSendToLog = sendToLog.bind(context.getLogger ? context.getLogger(PACKAGE_NAME) : undefined)
|
|
113
112
|
const { buildNavigation = require('@antora/navigation-builder') } = context.getFunctions()
|
|
114
113
|
return (componentVersion) => {
|
|
115
114
|
const componentVersionProfiles = assemblerProfiles.get(componentVersion.version + '@' + componentVersion.name)
|
|
116
|
-
const
|
|
117
|
-
{ insertStartPage, rootLevel, sectionMergeStrategy },
|
|
115
|
+
const overrides =
|
|
118
116
|
componentVersionProfiles?.get(intrinsicAttributes['assembler-profile']) ?? componentVersionProfiles?.get()
|
|
119
|
-
|
|
117
|
+
const { navFiles, messages } = overrides
|
|
118
|
+
const model = Object.assign({}, shared, overrides)
|
|
119
|
+
delete model.navFiles
|
|
120
|
+
delete model.messages
|
|
120
121
|
const navigationOverride = navigationCatalog?.getNavigation(componentVersion.name, componentVersion.version)
|
|
121
122
|
if (navigationOverride) return Object.assign(model, { navigation: navigationOverride })
|
|
122
123
|
messages?.forEach(boundSendToLog)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/assembler",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "A JavaScript library that merges AsciiDoc content from multiple pages in an Antora site into assembly files and delegates to an exporter to convert those files to another format, such as PDF.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "OpenDevise Inc. (https://opendevise.com)",
|