openvibers/openrestream Commits

openvibe-shared v4.108.0 (was v4.107.4) (#202)

OP OpenVibers committed 10 days ago · df597b424d · 6 files, +26 −9

* openvibe-shared v4.108.0 (was v4.107.4)

Opened by scripts/pin-bump.js in OpenVibers/OpenVibe.Shared after the v4.108.0 release.

* llms.txt links each page at its Markdown twin, with an ## Optional section (AGT-5)

Changes

ddiff --git a/README.md b/README.md
iindex d70c9b5..4693e73 100644
---- a/README.md
++++ b/README.md
@@@ -315,5 +315,5 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.222.0
- openvibe-sdk: v0.82.0
--- openvibe-shared: v4.107.4
++- openvibe-shared: v4.108.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex a749cfa..a6e70f2 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -10,7 +10,7 @@
"domain": "openre.stream",
"contracts": "openvibe-contracts v0.222.0",
"sdk": "openvibe-sdk v0.82.0",
-- "shared": "openvibe-shared v4.107.4",
++ "shared": "openvibe-shared v4.108.0",
"protocols": {
"rtmp": "ingest ported (openre-rtmp-ingest)",
"restream": "RTMP source to RTMP/RTMPS/SRT destinations ported (openre-restream-worker)",
ddiff --git a/package-lock.json b/package-lock.json
iindex ce43a28..3046342 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -17,7 +17,7 @@
"node-media-server": "2.7.4",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
"pg": "^8.23.0",
"sdp-transform": "^3.0.0",
"ws": "^8.18.0"
@@@ -1957,9 +1957,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.107.4",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
-- "integrity": "sha512-tThN0m3KMncEHVcBOvE+ysHjsZTlVIDLG1P+/i2Mulmxfc/AUpebAXhpWWrut50OChZ8o+HeePxsSrPI8mUQOQ==",
++ "version": "4.108.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
++ "integrity": "sha512-NPzwjxpzGIpFpIm4uw3+VwHfsxbJ2+cD9yuhRzSwolSwqv2kCmwaVtHJ0DA9gKO3K8PCBfIP3UpKzpuSbYEJ+g==",
"license": "MIT",
"dependencies": {
"jsonwebtoken": "^9.0.0",
ddiff --git a/package.json b/package.json
iindex 4a5914b..6d25f5b 100644
---- a/package.json
++++ b/package.json
@@@ -33,7 +33,7 @@
"node-media-server": "2.7.4",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
"pg": "^8.23.0",
"sdp-transform": "^3.0.0",
"ws": "^8.18.0"
ddiff --git a/server/discovery.js b/server/discovery.js
iindex c09648b..5b219f5 100644
---- a/server/discovery.js
++++ b/server/discovery.js
@@@ -60,8 +60,19 @@ function createDiscoveryRoutes({ config, releaseLastmod }) {
] },
],
});
-- router.get('/llms.txt', (_req, res) => res.type('text/plain').set('Cache-Control', cache.htmlHeaders()).send(
-- seo.llmsTxt(llmsSite())));
++ // AGT-5: the home and /updates link their Markdown twins (openvibe-shared 4.108.0's markdown mode); the sitemap and
++ // robots.txt are files and keep their URL. The machine-readable files are ## Optional, last.
++ router.get('/llms.txt', (_req, res) => {
++ const d = llmsSite();
++ const machine = (d.sections || []).find((x) => x.title === 'Machine-readable');
++ res.type('text/plain').set('Cache-Control', cache.htmlHeaders()).send(seo.llmsTxt({
++ ...d,
++ markdown: true,
++ base: config.baseUrl,
++ sections: (d.sections || []).filter((x) => x !== machine),
++ optional: [...(machine ? machine.links : []), { title: 'Full text for language models', url: abs('/llms-full.txt') }],
++ }));
++ });
// The same, in full (SEO-33): what the site is, then every page llms.txt lists with what it holds.
router.get('/llms-full.txt', (_req, res) => {
const d = llmsSite();
ddiff --git a/test/discovery.test.js b/test/discovery.test.js
iindex ab4105e..0247be3 100644
---- a/test/discovery.test.js
++++ b/test/discovery.test.js
@@@ -62,6 +62,12 @@ t('llms.txt is plain text, leads with open restreaming (OpenVibe Live on by defa
// Only the RTMP ingest and restream workers run in production: WHIP and JSMPEG are ported, not served yet.
assert.match(r.text, /WHIP \(RFC 9725\) to https:\/\/ingest\.openre\.stream\/whip\/<ingest key>, open to browsers/);
assert.doesNotMatch(r.text, /do not run in production yet/, 'the workers run');
++ // AGT-5: own pages at their Markdown twins, other sites and files as they are, ## Optional last.
++ assert.match(r.text, /\[OpenRestream home\]\(https?:\/\/[^)]*\/index\.md\)/);
++ assert.match(r.text, /\[What shipped\]\(https?:\/\/[^)]*\/updates\.md\)/);
++ assert.ok(r.text.includes('(https://github.com/OpenVibers/OpenRestream)'));
++ assert.match(r.text, /\(https?:\/\/[^)]*\/sitemap\.xml\)/);
++ assert.ok(r.text.includes('\n## Optional\n') && r.text.lastIndexOf('\n## ') === r.text.indexOf('\n## Optional\n'), 'Optional is last');
} finally {
await api.close();
}