openvibers/openvibe.publishing Commits
openvibe-shared v4.186.0 (was v4.179.0) (#206)
Changes
@@@ -429,5 +429,5 @@ eval "$(node_modules/openvibe-sdk/scripts/test-services.sh up)" && fnm exec --us<!-- versions:start -->- openvibe-contracts: v0.384.0- openvibe-sdk: v0.125.0--- openvibe-shared: v4.179.0++- openvibe-shared: v4.186.0<!-- versions:end -->@@@ -52,7 +52,7 @@"exitProof": "examples/two-products + test/two-products.test.js","contracts": "openvibe-contracts v0.384.0 (devDependency): emits search.index-document@1 and events.event-envelope@1 (validated in tests)","sdk": "openvibe-sdk v0.125.0",-- "shared": "openvibe-shared v4.179.0",++ "shared": "openvibe-shared v4.186.0","dependsOn": ["openvibe-sdk >=0.15.0 (peer; tests pin v0.60.0)","openvibe-shared >=1.5.0 (optional peer; tests pin v4.4.0; layout needs >=2.6.0)",@@@ -52,6 +52,15 @@ function renderDocument(o = {}) {const site = o.site;const service = o.service || site;const navbar = { service, ...(o.navbar || {}) };++ // openvibe-shared 4.184.0 puts the bar's links in the first HTML (frame.serverNav) from navbar.links,++ // while the no-JavaScript bar used to get navLinks. Keep every navLink there when the scripted bar is++ // given a different list: a hidden link is visible in the server nav and not in the scripted bar.++ const navLinks = Array.isArray(o.navLinks) ? o.navLinks.filter((l) => l && l.href) : [];++ if (Array.isArray(navbar.links) && navLinks.length) {++ const present = new Set(navbar.links.map((l) => l && l.href));++ const extra = navLinks.filter((l) => !present.has(l.href)).map((l) => ({ ...l, hidden: true }));++ if (extra.length) navbar.links = [...navbar.links, ...extra];++ }const footer = o.footer || { service, variant: 'compact' };const mainId = o.mainId || 'main';const mainClass = o.mainClass == null ? 'page' : o.mainClass;@@@ -14,7 +14,7 @@"ajv-formats": "^3.0.1","openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0","openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0","pg": "^8.23.0"},"engines": {@@@ -563,9 +563,9 @@}},"node_modules/openvibe-shared": {-- "version": "4.179.0",-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",-- "integrity": "sha512-Fjffjq3gLINhiXTqQJwsKQT/QbV4TYvsmz6GTp5hBJ8xA6KUQgu0wDgCQ3BRxCZ0ehmn0HGVAHUI+5m0LtPQCQ==",++ "version": "4.186.0",++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0",++ "integrity": "sha512-wD4net+UjO0a6OG73W+RR1z5MIWtPgj407xLEWphiVWgLTQ4V1r76+DtLOfSf6RfEda/ALizRu1zmxbvuGGZOw==","dev": true,"license": "MIT","dependencies": {@@@ -58,7 +58,7 @@"ajv-formats": "^3.0.1","openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0","openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0","pg": "^8.23.0"}}@@@ -45,7 +45,7 @@ test('renderDocument composes one whole document through openvibe-shared/shell',assert.match(out, /<a class="skip" href="#main">Skip to content<\/a>\n<div id="navbar-mount"><\/div>/);assert.match(out, /<noscript><div class="account-bar"[^>]*><a href="\/auth\/login">Sign in with OpenVibe<\/a><\/div><\/noscript>/);assert.match(out, /<main id="main" class="page">\n<h1>A story<\/h1>\n<\/main>/);-- assert.match(out, /<noscript><nav aria-label="Site"[^>]*><a href="\/"[^>]*>OpenVibe\.News<\/a><a href="\/">News<\/a><a href="\/topics">Topics<\/a>/);++ assert.match(out, /<div id="navbar-mount"><nav class="openvibe-navbar"[^>]*data-ov-server-nav="true"[^>]*><a href="\/"[^>]*>OpenVibe\.News<\/a><a data-ov-nav-link="true" href="\/">News<\/a><a data-ov-nav-link="true" href="\/topics">Topics<\/a>/);});test('robots always comes from the decision, and a decision canonical wins over o.canonical', () => {
@@ -429,5 +429,5 @@ eval "$(node_modules/openvibe-sdk/scripts/test-services.sh up)" && fnm exec --us
@@ -429,5 +429,5 @@ eval "$(node_modules/openvibe-sdk/scripts/test-services.sh up)" && fnm exec --us
<!-- versions:start -->
<!-- versions:start -->
- openvibe-contracts: v0.384.0
- openvibe-contracts: v0.384.0
- openvibe-sdk: v0.125.0
- openvibe-sdk: v0.125.0
-- openvibe-shared: v4.179.0
+- openvibe-shared: v4.186.0
<!-- versions:end -->
<!-- versions:end -->
@@ -52,7 +52,7 @@
@@ -52,7 +52,7 @@
"exitProof": "examples/two-products + test/two-products.test.js",
"exitProof": "examples/two-products + test/two-products.test.js",
"contracts": "openvibe-contracts v0.384.0 (devDependency): emits search.index-document@1 and events.event-envelope@1 (validated in tests)",
"contracts": "openvibe-contracts v0.384.0 (devDependency): emits search.index-document@1 and events.event-envelope@1 (validated in tests)",
"sdk": "openvibe-sdk v0.125.0",
"sdk": "openvibe-sdk v0.125.0",
- "shared": "openvibe-shared v4.179.0",
+ "shared": "openvibe-shared v4.186.0",
"dependsOn": [
"dependsOn": [
"openvibe-sdk >=0.15.0 (peer; tests pin v0.60.0)",
"openvibe-sdk >=0.15.0 (peer; tests pin v0.60.0)",
"openvibe-shared >=1.5.0 (optional peer; tests pin v4.4.0; layout needs >=2.6.0)",
"openvibe-shared >=1.5.0 (optional peer; tests pin v4.4.0; layout needs >=2.6.0)",
@@ -52,6 +52,15 @@ function renderDocument(o = {}) {
@@ -52,6 +52,15 @@ function renderDocument(o = {}) {
const site = o.site;
const site = o.site;
const service = o.service || site;
const service = o.service || site;
const navbar = { service, ...(o.navbar || {}) };
const navbar = { service, ...(o.navbar || {}) };
+ // openvibe-shared 4.184.0 puts the bar's links in the first HTML (frame.serverNav) from navbar.links,
+ // while the no-JavaScript bar used to get navLinks. Keep every navLink there when the scripted bar is
+ // given a different list: a hidden link is visible in the server nav and not in the scripted bar.
+ const navLinks = Array.isArray(o.navLinks) ? o.navLinks.filter((l) => l && l.href) : [];
+ if (Array.isArray(navbar.links) && navLinks.length) {
+ const present = new Set(navbar.links.map((l) => l && l.href));
+ const extra = navLinks.filter((l) => !present.has(l.href)).map((l) => ({ ...l, hidden: true }));
+ if (extra.length) navbar.links = [...navbar.links, ...extra];
+ }
const footer = o.footer || { service, variant: 'compact' };
const footer = o.footer || { service, variant: 'compact' };
const mainId = o.mainId || 'main';
const mainId = o.mainId || 'main';
const mainClass = o.mainClass == null ? 'page' : o.mainClass;
const mainClass = o.mainClass == null ? 'page' : o.mainClass;
@@ -14,7 +14,7 @@
@@ -14,7 +14,7 @@
"ajv-formats": "^3.0.1",
"ajv-formats": "^3.0.1",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
+ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0",
"pg": "^8.23.0"
"pg": "^8.23.0"
},
},
"engines": {
"engines": {
@@ -563,9 +563,9 @@
@@ -563,9 +563,9 @@
}
}
},
},
"node_modules/openvibe-shared": {
"node_modules/openvibe-shared": {
- "version": "4.179.0",
- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
- "integrity": "sha512-Fjffjq3gLINhiXTqQJwsKQT/QbV4TYvsmz6GTp5hBJ8xA6KUQgu0wDgCQ3BRxCZ0ehmn0HGVAHUI+5m0LtPQCQ==",
+ "version": "4.186.0",
+ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0",
+ "integrity": "sha512-wD4net+UjO0a6OG73W+RR1z5MIWtPgj407xLEWphiVWgLTQ4V1r76+DtLOfSf6RfEda/ALizRu1zmxbvuGGZOw==",
"dev": true,
"dev": true,
"license": "MIT",
"license": "MIT",
"dependencies": {
"dependencies": {
@@ -58,7 +58,7 @@
@@ -58,7 +58,7 @@
"ajv-formats": "^3.0.1",
"ajv-formats": "^3.0.1",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
+ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.186.0",
"pg": "^8.23.0"
"pg": "^8.23.0"
}
}
}
}
@@ -45,7 +45,7 @@ test('renderDocument composes one whole document through openvibe-shared/shell',
@@ -45,7 +45,7 @@ test('renderDocument composes one whole document through openvibe-shared/shell',
assert.match(out, /<a class="skip" href="#main">Skip to content<\/a>\n<div id="navbar-mount"><\/div>/);
assert.match(out, /<a class="skip" href="#main">Skip to content<\/a>\n<div id="navbar-mount"><\/div>/);
assert.match(out, /<noscript><div class="account-bar"[^>]*><a href="\/auth\/login">Sign in with OpenVibe<\/a><\/div><\/noscript>/);
assert.match(out, /<noscript><div class="account-bar"[^>]*><a href="\/auth\/login">Sign in with OpenVibe<\/a><\/div><\/noscript>/);
assert.match(out, /<main id="main" class="page">\n<h1>A story<\/h1>\n<\/main>/);
assert.match(out, /<main id="main" class="page">\n<h1>A story<\/h1>\n<\/main>/);
- assert.match(out, /<noscript><nav aria-label="Site"[^>]*><a href="\/"[^>]*>OpenVibe\.News<\/a><a href="\/">News<\/a><a href="\/topics">Topics<\/a>/);
+ assert.match(out, /<div id="navbar-mount"><nav class="openvibe-navbar"[^>]*data-ov-server-nav="true"[^>]*><a href="\/"[^>]*>OpenVibe\.News<\/a><a data-ov-nav-link="true" href="\/">News<\/a><a data-ov-nav-link="true" href="\/topics">Topics<\/a>/);
});
});
test('robots always comes from the decision, and a decision canonical wins over o.canonical', () => {
test('robots always comes from the decision, and a decision canonical wins over o.canonical', () => {