This is an automated email from the ASF dual-hosted git repository. djencks pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new 6eb46a0 Add requires attribute to playbook 6eb46a0 is described below commit 6eb46a075bbe6c80b9e95031c59281769171627d Author: David Jencks <djen...@apache.org> AuthorDate: Thu Oct 14 09:04:50 2021 -0700 Add requires attribute to playbook Update dependencies Update util script used by requires Correct typo in groovy script --- docs/.pnp.js | 10 +++++----- docs/antora-playbook.yml | 4 ++-- docs/package.json | 2 +- docs/util/jsonpath-util.js | 24 +++++++++++++++++------- docs/yarn.lock | 10 +++++----- tooling/scripts/update-antora-config.groovy | 2 +- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/docs/.pnp.js b/docs/.pnp.js index 60bc4cb..b98fb70 100755 --- a/docs/.pnp.js +++ b/docs/.pnp.js @@ -39,7 +39,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@antora/cli", "npm:3.0.0-alpha.9"], ["@antora/site-generator-default", "npm:3.0.0-alpha.9"], - ["@djencks/asciidoctor-antora-indexer", "npm:0.0.6"], + ["@djencks/asciidoctor-antora-indexer", "npm:0.0.7"], ["@djencks/asciidoctor-jsonpath", "npm:0.0.4"], ["lite-server", "npm:2.5.4"], ["pino-pretty", "npm:5.1.3"] @@ -278,10 +278,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }] ]], ["@djencks/asciidoctor-antora-indexer", [ - ["npm:0.0.6", { - "packageLocation": "./.yarn/cache/@djencks-asciidoctor-antora-indexer-npm-0.0.6-4db3f3a720-70a23e1885.zip/node_modules/@djencks/asciidoctor-antora-indexer/", + ["npm:0.0.7", { + "packageLocation": "./.yarn/cache/@djencks-asciidoctor-antora-indexer-npm-0.0.7-b6037c8242-d25279cdb2.zip/node_modules/@djencks/asciidoctor-antora-indexer/", "packageDependencies": [ - ["@djencks/asciidoctor-antora-indexer", "npm:0.0.6"], + ["@djencks/asciidoctor-antora-indexer", "npm:0.0.7"], ["camelcase-keys", "npm:6.2.2"], ["esprima", "npm:4.0.1"], ["picomatch", "npm:2.1.1"], @@ -968,7 +968,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["camel-quarkus-docs", "workspace:."], ["@antora/cli", "npm:3.0.0-alpha.9"], ["@antora/site-generator-default", "npm:3.0.0-alpha.9"], - ["@djencks/asciidoctor-antora-indexer", "npm:0.0.6"], + ["@djencks/asciidoctor-antora-indexer", "npm:0.0.7"], ["@djencks/asciidoctor-jsonpath", "npm:0.0.4"], ["lite-server", "npm:2.5.4"], ["pino-pretty", "npm:5.1.3"] diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index 57a67e3..880abf2 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -54,10 +54,10 @@ content: start_path: docs/components asciidoc: + attributes: + requires@: "'util=util/jsonpath-util.js'" extensions: - "@djencks/asciidoctor-antora-indexer" - attributes: - eip-vc: latest@components ui: bundle: diff --git a/docs/package.json b/docs/package.json index f1cd251..4c7aea5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@antora/cli": "^3.0.0-alpha.9", "@antora/site-generator-default": "^3.0.0-alpha.9", - "@djencks/asciidoctor-antora-indexer": "^0.0.6", + "@djencks/asciidoctor-antora-indexer": "^0.0.7", "@djencks/asciidoctor-jsonpath": "^0.0.4", "lite-server": "^2.4.0", "pino-pretty": "^5.0.0" diff --git a/docs/util/jsonpath-util.js b/docs/util/jsonpath-util.js index e0b7d7d..d80d1b6 100644 --- a/docs/util/jsonpath-util.js +++ b/docs/util/jsonpath-util.js @@ -27,14 +27,20 @@ module.exports = { return '' }, + boldLink: (text, idPrefix, suffix = '') => { + const idText = `_${idPrefix}_${text.split('.').join('_')}` + text = suffix ? `*${text}* (${suffix})` : `*${text}*` + return `[#${idText}]\nxref:#${idText}['',role=anchor]${text}` + }, + description: (value) => { try { - return module.exports.strong(value, "Autowired") - + module.exports.strong(value, "Required") - + module.exports.strong(value, "Deprecated") - + module.exports.escapeAttributes(value.description) + (value.description.endsWith(".") ? "" : ".") - + (value.deprecatedNote ? `\n\nNOTE: ${value.deprecatedNote}` : "") - + (value.enum ? `${["\n\nEnum values:\n"].concat(value.enum).join("\n* ")}` : "") + return module.exports.strong(value, 'Autowired') + + module.exports.strong(value, 'Required') + + module.exports.strong(value, 'Deprecated') + + (value.description ? module.exports.escapeAttributes(value.description) + (value.description.endsWith('.') ? '' : '.') : '') + + (value.deprecatedNote ? `\n\nNOTE: ${value.deprecatedNote}` : '') + + (value.enum ? `${['\n\nEnum values:\n'].concat(value.enum).join('\n* ')}` : '') } catch (e) { console.log('error', e) return e.msg() @@ -42,7 +48,7 @@ module.exports = { }, escapeAttributes: (text) => { - return text.split('{').join('\\{') + return text ? text.split('{').join('\\{') : text }, formatSignature: (signature) => { @@ -72,6 +78,10 @@ module.exports = { strong: (data, text) => { return data[text.toLowerCase()] ? `*${text}* ` : '' }, + + valueAsString: (value) => { + return value === undefined ? '' : `${value}` + }, } function splitOnce (querySpec, token = '=') { diff --git a/docs/yarn.lock b/docs/yarn.lock index 74410cd..e627a0b 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -219,15 +219,15 @@ __metadata: languageName: node linkType: hard -"@djencks/asciidoctor-antora-indexer@npm:^0.0.6": - version: 0.0.6 - resolution: "@djencks/asciidoctor-antora-indexer@npm:0.0.6" +"@djencks/asciidoctor-antora-indexer@npm:^0.0.7": + version: 0.0.7 + resolution: "@djencks/asciidoctor-antora-indexer@npm:0.0.7" dependencies: camelcase-keys: ^6.2.2 esprima: ^4.0.1 picomatch: ~2.1 static-eval: ^2.1.0 - checksum: 70a23e188556933524608702c30635400852e8b0d59940f74d41fdc0220f667510d3d98681f94eb11c8d6fc60209da1216b93667852a36099de35b0b774b69d2 + checksum: d25279cdb2906d003c0db2e9a2c5ffc7fbad9ea9761b6420046030f30825235f27bc788a22a50acb39997ccef240eefa79ff03abf2e9254a9eed17282411e411 languageName: node linkType: hard @@ -822,7 +822,7 @@ __metadata: dependencies: "@antora/cli": ^3.0.0-alpha.9 "@antora/site-generator-default": ^3.0.0-alpha.9 - "@djencks/asciidoctor-antora-indexer": ^0.0.6 + "@djencks/asciidoctor-antora-indexer": ^0.0.7 "@djencks/asciidoctor-jsonpath": ^0.0.4 lite-server: ^2.4.0 pino-pretty: ^5.0.0 diff --git a/tooling/scripts/update-antora-config.groovy b/tooling/scripts/update-antora-config.groovy index 36f96e2..63a642b 100644 --- a/tooling/scripts/update-antora-config.groovy +++ b/tooling/scripts/update-antora-config.groovy @@ -61,7 +61,7 @@ replaceInFiles.each { path -> if (path.getFileName().toString().equals('antora.yml')) { final String versionReplacement = 'version: ' + (project.version.endsWith('-SNAPSHOT') ? 'latest' : project.version) - println ' - seting '+ versionReplacement + println ' - setting '+ versionReplacement final Pattern versionPattern = ~'version: [^\\s]+' newContentString = versionPattern.matcher(newContentString).replaceFirst(versionReplacement) }