Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/adapters/src/brisk.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ const FEED_URL = /\/comments\/|\/feeds?\/|\.(?:xml|rss|atom)(?:$|\?)/i;
/**
* brisk renders a card image on demand at its own `/api/screenshot`. Carrying
* that would point every image in this collection at another site's renderer.
* brisk now serves from brisk.pwa.pit.world and builds these URLs on its own
* host, so both the old and the current host are matched.
*/
const SCREENSHOT = /^https?:\/\/[^/]*brisk\.news\/api\/screenshot/i;
const SCREENSHOT = /^https?:\/\/[^/]*(?:brisk\.news|brisk\.pwa\.pit\.world)\/api\/screenshot/i;

/**
* Decoded, whitespace-collapsed, and null when nothing is left.
Expand Down
26 changes: 20 additions & 6 deletions test/house-aggregators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ describe('aiornot', () => {
{ config: { feeds: ['trending', 'latest'] } },
);
await adapterByName('aiornot').pull(c);
expect(seen).toEqual(['https://aiornot.pwa.pit.world/rss.xml', 'https://aiornot.pwa.pit.world/rss/trending.xml']);
expect(seen).toEqual([
'https://aiornot.pwa.pit.world/rss.xml',
'https://aiornot.pwa.pit.world/rss/trending.xml',
]);
});
});

Expand All @@ -361,7 +364,9 @@ describe('agenticjobs', () => {
expect(it.kind).toBe('job');
expect(it.externalId).toBe('3b0d293e-e2af-4609-af4d-1c4762a48a1e');
expect(it.title).toBe('promote us to your other communities — Profullstack, Inc.');
expect(it.url).toBe('https://agenticjobs.pwa.pit.world/jobs/promote-us-to-your-other-communities');
expect(it.url).toBe(
'https://agenticjobs.pwa.pit.world/jobs/promote-us-to-your-other-communities',
);
expect(it.publishedAt.toISOString()).toBe('2026-09-11T11:33:18.752Z');
expect(it.tags).toEqual([
'agenticjobs',
Expand All @@ -387,7 +392,9 @@ describe('agenticjobs', () => {

test('walks offset pages and stops at the total', async () => {
const page = await fixture('agenticjobs-jobs.json');
const { ctx: c, seen } = ctx('agenticjobs', { 'https://agenticjobs.pwa.pit.world/api/v1/jobs': page });
const { ctx: c, seen } = ctx('agenticjobs', {
'https://agenticjobs.pwa.pit.world/api/v1/jobs': page,
});
const out = await adapterByName('agenticjobs').pull(c);
expect(out.items.length).toBe(2);
// Two postings of a total of two: the first page is also the last.
Expand Down Expand Up @@ -431,7 +438,9 @@ describe('tsbb', () => {
'tsbb',
{
'https://tsbb.pwa.pit.world/api/v1/forums': await fixture('tsbb-forums.json'),
'https://tsbb.pwa.pit.world/f/announcements/feed.xml': await fixture('tsbb-feed-announcements.xml'),
'https://tsbb.pwa.pit.world/f/announcements/feed.xml': await fixture(
'tsbb-feed-announcements.xml',
),
'https://tsbb.pwa.pit.world/f/general/feed.xml': await fixture('tsbb-feed-general.xml'),
},
{ log: (m) => lines.push(m) },
Expand Down Expand Up @@ -532,7 +541,10 @@ describe('c0upons', () => {
const full = Array.from({ length: 200 }, (_, i) => ({ ...rows[2], id: 1000 + i }));
const { ctx: c, seen } = ctx('c0upons', {
'https://c0upons.pwa.pit.world/api/coupons?limit=200&offset=0': JSON.stringify(full),
'https://c0upons.pwa.pit.world/api/coupons?limit=200&offset=200': JSON.stringify([full[199], rows[0]]),
'https://c0upons.pwa.pit.world/api/coupons?limit=200&offset=200': JSON.stringify([
full[199],
rows[0],
]),
});
const out = await adapterByName('c0upons').pull(c);
expect(seen.length).toBe(2);
Expand Down Expand Up @@ -843,7 +855,9 @@ describe('weedforcrypto', () => {
batches.push(step.value);
step = await run.next();
}
expect(seen).toEqual(['https://weedforcrypto.pwa.pit.world/api/v1/dispensaries?limit=200&page=1']);
expect(seen).toEqual([
'https://weedforcrypto.pwa.pit.world/api/v1/dispensaries?limit=200&page=1',
]);
expect(batches).toHaveLength(1);
expect(batches[0].items).toHaveLength(2);
expect(batches[0].cursor).toEqual({});
Expand Down
4 changes: 3 additions & 1 deletion test/installmap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ describe('which rows, and where their servers are', () => {

test('the record id drops the endpoint name, as the spec derives it', () => {
expect(recordId('https://mcp.anakin.io/mcp', 'anakin.io')).toBe('mcp.anakin.io');
expect(recordId('https://agenticjobs.pwa.pit.world/api/mcp', 'x')).toBe('agenticjobs.work');
expect(recordId('https://agenticjobs.pwa.pit.world/api/mcp', 'x')).toBe(
'agenticjobs.pwa.pit.world',
);
expect(recordId('https://a.example/v1/mcp', 'x')).toBe('a.example');
expect(recordId('https://a.example/tenant/mcp', 'x')).toBe('a.example/tenant');
expect(recordId(null, 'Example.com')).toBe('example.com');
Expand Down
2 changes: 2 additions & 0 deletions test/news-directories.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ describe('brisk: the small web only', () => {
test('the on-demand screenshot placeholder is not carried as an image', () => {
const shot = 'https://brisk.pwa.pit.world/api/screenshot?url=https%3A%2F%2Fexample.com';
expect(brisk.toItem(row({ imageUrl: shot })).imageUrl).toBeNull();
const oldShot = 'https://brisk.news/api/screenshot?url=https%3A%2F%2Fexample.com';
expect(brisk.toItem(row({ imageUrl: oldShot })).imageUrl).toBeNull();
expect(brisk.toItem(row()).imageUrl).toBe('https://popcorn.cx/img/moc.jpg');
});

Expand Down
Loading