openvibers/openvibe.coupons Commits
openvibe-shared v4.108.0 (was v4.107.4) (#217)
Changes
@@@ -498,6 +498,6 @@ 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- openvibe-publishing: v1.3.0<!-- versions:end -->@@@ -9,11 +9,11 @@"domain": "openvibe.coupons","contracts": "openvibe-contracts v0.222.0","sdk": "openvibe-sdk v0.82.0",-- "shared": "openvibe-shared v4.107.4",++ "shared": "openvibe-shared v4.108.0","packages": ["openvibe-publishing v1.3.0","openvibe-contracts v0.222.0",-- "openvibe-shared v4.107.4",++ "openvibe-shared v4.108.0","openvibe-sdk v0.82.0"],"capabilities": [@@@ -18,7 +18,7 @@"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0","openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.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"},"devDependencies": {@@@ -1210,9 +1210,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",@@@ -29,7 +29,7 @@"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0","openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.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"},"devDependencies": {@@@ -59,19 +59,27 @@ function createDiscoveryRoutes({ config, store, merchants, coupons, publicationname: 'OpenVibe.Coupons',summary: pages.SITE_SUMMARY,details: 'A code\'s status is exactly one of unknown, reported_working, reported_failed, expired or disabled. Only recent reports by people can make a code reported_working or reported_failed; a submission, a source or a model cannot. An expiry that nobody stated is "unknown" (null in JSON), and restrictions that were not stated are absent, not "none". Every shop page has a JSON twin at /m/<slug>.json and every code at /c/<id>.json with the same content. Expired and taken-down codes are not in lists, feeds or sitemaps.',++ markdown: true,++ base: config.baseUrl,sections: [{ title: 'Start here', links: [-- { title: 'All shops', url: abs('/'), note: 'with recently added codes' },++ { title: 'OpenVibe.Coupons', url: abs('/'), note: 'all shops with recently added codes' },{ title: 'How codes are labelled', url: abs('/about'), note: 'statuses, the confidence formula, expiry, privacy' },{ title: 'The OpenVibe Companion', url: abs('/companion'), note: 'the open-source browser extension: codes for the shop you are on, tried when you ask; never rewrites referral links' },-- { title: 'Sitemap', url: abs('/sitemap.xml') },] },-- { title: 'Feeds', links: [{ title: 'RSS', url: abs('/feed.xml') }, { title: 'Atom', url: abs('/atom.xml') }, { title: 'JSON Feed', url: abs('/feed.json') }] },++ // The API is a primary entry for an agent; a shop as JSON is named in its note (a link to "/" would read++ // as the home's Markdown twin).{ title: 'Data', links: [-- { title: 'Shop JSON', url: abs('/'), note: 'append .json to a shop URL (/m/<slug>.json)' },-- { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },++ { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'any shop as JSON: append .json to its URL (/m/<slug>.json). GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },] },],++ optional: [++ { title: 'Sitemap', url: abs('/sitemap.xml') },++ { title: 'RSS', url: abs('/feed.xml') },++ { title: 'Atom', url: abs('/atom.xml') },++ { title: 'JSON Feed', url: abs('/feed.json') },++ { title: 'Full text for language models', url: abs('/llms-full.txt') },++ ],}));});@@@ -105,6 +105,8 @@ const { boot, check, done } = require('./helpers/boot');const llms = await t.get('/llms.txt');assert.match(llms.text, /reported_working/);assert.match(llms.text, /\/m\/<slug>\.json/);++ assert.match(llms.text, /\n## Optional\n/);++ assert.match(llms.text, /\(https:\/\/openvibe\.coupons\/index\.md\)/);// Every URL the file lists has to answer when it is fetched as a link: a language model that// follows one and gets a 400 has learned nothing. The merchant lookup is a GET with one// required parameter, so its link carries the parameter; bare, it answers 400 by design.
@@ -498,6 +498,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
@@ -498,6 +498,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
<!-- versions:start -->
- openvibe-contracts: v0.222.0
- openvibe-contracts: v0.222.0
- openvibe-sdk: v0.82.0
- openvibe-sdk: v0.82.0
-- openvibe-shared: v4.107.4
+- openvibe-shared: v4.108.0
- openvibe-publishing: v1.3.0
- openvibe-publishing: v1.3.0
<!-- versions:end -->
<!-- versions:end -->
@@ -9,11 +9,11 @@
@@ -9,11 +9,11 @@
"domain": "openvibe.coupons",
"domain": "openvibe.coupons",
"contracts": "openvibe-contracts v0.222.0",
"contracts": "openvibe-contracts v0.222.0",
"sdk": "openvibe-sdk v0.82.0",
"sdk": "openvibe-sdk v0.82.0",
- "shared": "openvibe-shared v4.107.4",
+ "shared": "openvibe-shared v4.108.0",
"packages": [
"packages": [
"openvibe-publishing v1.3.0",
"openvibe-publishing v1.3.0",
"openvibe-contracts v0.222.0",
"openvibe-contracts v0.222.0",
- "openvibe-shared v4.107.4",
+ "openvibe-shared v4.108.0",
"openvibe-sdk v0.82.0"
"openvibe-sdk v0.82.0"
],
],
"capabilities": [
"capabilities": [
@@ -18,7 +18,7 @@
@@ -18,7 +18,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.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"
"pg": "^8.23.0"
},
},
"devDependencies": {
"devDependencies": {
@@ -1210,9 +1210,9 @@
@@ -1210,9 +1210,9 @@
}
}
},
},
"node_modules/openvibe-shared": {
"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",
"license": "MIT",
"dependencies": {
"dependencies": {
"jsonwebtoken": "^9.0.0",
"jsonwebtoken": "^9.0.0",
@@ -29,7 +29,7 @@
@@ -29,7 +29,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.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"
"pg": "^8.23.0"
},
},
"devDependencies": {
"devDependencies": {
@@ -59,19 +59,27 @@ function createDiscoveryRoutes({ config, store, merchants, coupons, publication
@@ -59,19 +59,27 @@ function createDiscoveryRoutes({ config, store, merchants, coupons, publication
name: 'OpenVibe.Coupons',
name: 'OpenVibe.Coupons',
summary: pages.SITE_SUMMARY,
summary: pages.SITE_SUMMARY,
details: 'A code\'s status is exactly one of unknown, reported_working, reported_failed, expired or disabled. Only recent reports by people can make a code reported_working or reported_failed; a submission, a source or a model cannot. An expiry that nobody stated is "unknown" (null in JSON), and restrictions that were not stated are absent, not "none". Every shop page has a JSON twin at /m/<slug>.json and every code at /c/<id>.json with the same content. Expired and taken-down codes are not in lists, feeds or sitemaps.',
details: 'A code\'s status is exactly one of unknown, reported_working, reported_failed, expired or disabled. Only recent reports by people can make a code reported_working or reported_failed; a submission, a source or a model cannot. An expiry that nobody stated is "unknown" (null in JSON), and restrictions that were not stated are absent, not "none". Every shop page has a JSON twin at /m/<slug>.json and every code at /c/<id>.json with the same content. Expired and taken-down codes are not in lists, feeds or sitemaps.',
+ markdown: true,
+ base: config.baseUrl,
sections: [
sections: [
{ title: 'Start here', links: [
{ title: 'Start here', links: [
- { title: 'All shops', url: abs('/'), note: 'with recently added codes' },
+ { title: 'OpenVibe.Coupons', url: abs('/'), note: 'all shops with recently added codes' },
{ title: 'How codes are labelled', url: abs('/about'), note: 'statuses, the confidence formula, expiry, privacy' },
{ title: 'How codes are labelled', url: abs('/about'), note: 'statuses, the confidence formula, expiry, privacy' },
{ title: 'The OpenVibe Companion', url: abs('/companion'), note: 'the open-source browser extension: codes for the shop you are on, tried when you ask; never rewrites referral links' },
{ title: 'The OpenVibe Companion', url: abs('/companion'), note: 'the open-source browser extension: codes for the shop you are on, tried when you ask; never rewrites referral links' },
- { title: 'Sitemap', url: abs('/sitemap.xml') },
] },
] },
- { title: 'Feeds', links: [{ title: 'RSS', url: abs('/feed.xml') }, { title: 'Atom', url: abs('/atom.xml') }, { title: 'JSON Feed', url: abs('/feed.json') }] },
+ // The API is a primary entry for an agent; a shop as JSON is named in its note (a link to "/" would read
+ // as the home's Markdown twin).
{ title: 'Data', links: [
{ title: 'Data', links: [
- { title: 'Shop JSON', url: abs('/'), note: 'append .json to a shop URL (/m/<slug>.json)' },
- { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },
+ { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'any shop as JSON: append .json to its URL (/m/<slug>.json). GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },
] },
] },
],
],
+ optional: [
+ { title: 'Sitemap', url: abs('/sitemap.xml') },
+ { title: 'RSS', url: abs('/feed.xml') },
+ { title: 'Atom', url: abs('/atom.xml') },
+ { title: 'JSON Feed', url: abs('/feed.json') },
+ { title: 'Full text for language models', url: abs('/llms-full.txt') },
+ ],
}));
}));
});
});
@@ -105,6 +105,8 @@ const { boot, check, done } = require('./helpers/boot');
@@ -105,6 +105,8 @@ const { boot, check, done } = require('./helpers/boot');
const llms = await t.get('/llms.txt');
const llms = await t.get('/llms.txt');
assert.match(llms.text, /reported_working/);
assert.match(llms.text, /reported_working/);
assert.match(llms.text, /\/m\/<slug>\.json/);
assert.match(llms.text, /\/m\/<slug>\.json/);
+ assert.match(llms.text, /\n## Optional\n/);
+ assert.match(llms.text, /\(https:\/\/openvibe\.coupons\/index\.md\)/);
// Every URL the file lists has to answer when it is fetched as a link: a language model that
// Every URL the file lists has to answer when it is fetched as a link: a language model that
// follows one and gets a 400 has learned nothing. The merchant lookup is a GET with one
// follows one and gets a 400 has learned nothing. The merchant lookup is a GET with one
// required parameter, so its link carries the parameter; bare, it answers 400 by design.
// required parameter, so its link carries the parameter; bare, it answers 400 by design.