@antora/playbook-builder
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -71,3 +71,3 @@ 'use strict' | ||
function getModel (name = '') { | ||
function getModel (name) { | ||
let config = this | ||
@@ -83,7 +83,7 @@ const data = config.get(name) | ||
if (!name) { | ||
Object.defineProperty(model, 'env', { value: config.getEnv() }) | ||
model.dir = model.playbook ? ospath.dirname((model.file = model.playbook)) : process.cwd() | ||
model.env = config.getEnv() | ||
delete model.playbook | ||
} | ||
return deepFreeze(model) | ||
return deepFreeze(model, name ? '.' + name : '') | ||
} | ||
@@ -104,4 +104,4 @@ | ||
function deepFreeze (o) { | ||
for (const v of Object.values(o)) Object.isFrozen(v) || deepFreeze(v) | ||
function deepFreeze (o, p) { | ||
for (const [k, v] of Object.entries(o)) Object.isFrozen(v) || (k === 'env' && !p) || deepFreeze(v, p + '.' + k) | ||
return Object.freeze(o) | ||
@@ -108,0 +108,0 @@ } |
{ | ||
"name": "@antora/playbook-builder", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Builds a playbook object from user input for configuring successive documentation components in an Antora pipeline.", | ||
@@ -42,3 +42,3 @@ "license": "MPL-2.0", | ||
], | ||
"gitHead": "63554bf217f1d8deb2276ecd2a8d9c37ee8b460d" | ||
"gitHead": "e8e6f6ba33b1ab3f796907b5a256893a64844cd1" | ||
} |
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
39922