YourProgramBuilder go-live (Marty GO 2026-11-17): partner ypb (saved IDs become tracked links, the dh wiring, sub-id ypb<packet>), catalog template yourprogrambuilder + NET_SRC ypb, network link nwypb, netsites CODES nwypb

qa/netsrc.test.mjs counts the eleven network links (it still said nine after nwvas): 19/19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 11:30:41 -06:00
parent bd5ed4e370
commit b5df8a2820
6 changed files with 38 additions and 6 deletions
+30
View File
@@ -171,6 +171,36 @@
"verified": true,
"source": "network"
},
{
"key": "yourprogrambuilder",
"name": "YourProgramBuilder",
"site": "yourprogrambuilder.com",
"costModel": "",
"params": [
{
"key": "clickid",
"token": "{clickid}",
"label": "Click id",
"role": "externalId"
},
{
"key": "placement",
"token": "{packet}",
"label": "Program",
"role": "param"
},
{
"key": "s1",
"token": "{packet}",
"label": "Program (sub-id)",
"role": "param"
}
],
"postbackUrl": "",
"notes": "Crypto Team Build Network program directory (the Seed Bed). Clicks that arrive from YourProgramBuilder (its footer, its promo kit) carry ?src=yourprogrambuilder and are counted under this source automatically. Your saved referral IDs there go out as LinkSpin links: every click carries the program as placement and s1.",
"verified": true,
"source": "network"
},
{
"key": "5xyourteam",
"name": "5xYourTeam",
+1
View File
@@ -13,6 +13,7 @@ const SITES = [
{ id: 'vbb', code: 'nwvbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com/{s2}?ref={s1}' },
{ id: 'viraladblitz', code: 'nwvab', name: 'ViralAdBlitz', url: 'https://viraladblitz.com/{s2}?ref={s1}' },
{ id: 'viraladsource', code: 'nwvas', name: 'ViralAdSource', url: 'https://viraladsource.com/{s2}?ref={s1}' },
{ id: 'yourprogrambuilder', code: 'nwypb', name: 'YourProgramBuilder', url: 'https://yourprogrambuilder.com/{s2}?ref={s1}' },
{ id: 'fivex', code: 'nw5x', name: '5xYourTeam', url: 'https://5xyourteam.com/{s2}?ref={s1}' },
{ id: 'downlinehydra', code: 'nwdh', name: 'DownlineHydra', url: 'https://downlinehydra.com/{s2}?ref={s1}' },
{ id: 'stackpol', code: 'nwsp', name: 'Stack POL', url: 'https://stackpol.com/{s2}?ref={s1}' },
+1 -1
View File
@@ -36,7 +36,7 @@ function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list;
// entry also gets go = the LinkSpin network link for that site with ?src=<this site>, so a click shows in LinkSpin Reports under the
// site that sent it (LinkSpin netlinks.js: fixed codes on the admin account). This site = NETWORK_SITE_ID, else the request host.
// No go for this site itself, or when this site cannot be told (a test host): the page then uses the plain url.
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', viraladsource: 'nwvas', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' };
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', viraladsource: 'nwvas', yourprogrambuilder: 'nwypb', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' };
const linksBase = () => String(process.env.NETWORK_LINKS_BASE || 'https://linkspin.app').trim().replace(/\/+$/, '');
const hostOf = u => { try { return new URL(u).hostname.toLowerCase().replace(/^www\./, ''); } catch (e) { return ''; } };
function selfId(req, l) {
+3 -3
View File
@@ -28,9 +28,9 @@ const srcOf = (owner, tpl) => read('sources.json').items.find(x => x.owner === o
try {
await boot();
const rots = read('rotator.json').rotations.filter(r => r.owner === ADMIN);
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nw5x', 'nwdh', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 9, 'the admin account has the nine network links', rots.map(r => r.code));
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nwvas', 'nwypb', 'nw5x', 'nwdh', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 11, 'the admin account has the eleven network links', rots.map(r => r.code));
const mineSrc = read('sources.json').items.filter(x => x.owner === ADMIN);
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', '5xyourteam', 'downlinehydra', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 9, 'and one source per network site', mineSrc.map(x => x.template));
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', 'viraladsource', 'yourprogrambuilder', '5xyourteam', 'downlinehydra', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 11, 'and one source per network site', mineSrc.map(x => x.template));
let r = await go('/r/nwdlb?src=iap&s1=bob&s2=how');
ok(r.status === 302 && /^https:\/\/downlinebanners\.com\/how\?ref=bob$/.test(r.loc), 'nwdlb: lands on /how with ?ref=bob', r);
@@ -64,7 +64,7 @@ try {
ok(read('sources.json').items.filter(x => x.owner === MEM).length === 2, 'an unknown src makes no source');
await stop(); await boot();
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 9 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 9, 'a reboot makes nothing twice');
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 11 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 11, 'a reboot makes nothing twice');
} catch (e) { fail++; console.error(e); }
finally { await stop(); try { fs.rmSync(DATA, { recursive: true, force: true }); } catch (e) {} }
console.log('\n' + pass + ' passed, ' + fail + ' failed'); process.exit(fail ? 1 : 0);
+2 -1
View File
@@ -1451,7 +1451,8 @@ function curtained(req, res, u) {
// partner sites allowed on /api/partner/<site>/links (2026-11-15): network catalog template + the name the member sees on the link
const PARTNER_LINKS = { dh: { template: 'downlinehydra', name: 'DownlineHydra' }, vab: { template: 'viraladblitz', name: 'ViralAdBlitz' },
vas: { template: 'viraladsource', name: 'ViralAdSource' } }; // vas = ViralAdSource text ads (Marty 2026-11-17), the vab wiring
vas: { template: 'viraladsource', name: 'ViralAdSource' }, // vas = ViralAdSource text ads (Marty 2026-11-17), the vab wiring
ypb: { template: 'yourprogrambuilder', name: 'YourProgramBuilder' } }; // ypb = YourProgramBuilder saved IDs (go-live 2026-11-17), the dh wiring (sub-id ypb<packet>)
const server = http.createServer(async (req, res) => {
{ const t0 = Date.now(); res.on('finish', () => { const ms = Date.now() - t0; if (ms > 3000) console.warn('slow request', req.method, String(req.url || '').split('?')[0].slice(0, 80), ms + 'ms', res.statusCode); }); } // visibility for member-felt delays (2026-10-12)
try {
+1 -1
View File
@@ -143,7 +143,7 @@ function meta(owner) { const m = {}; for (const s of mine(owner)) m[s.id] = { na
// source for that site, made from the network catalog template the first time it is needed. Only network templates qualify.
const NET_SRC = { iap: 'instantadpay', instantadpay: 'instantadpay', linkspin: 'linkspin', dlb: 'downlinebanners', downlinebanners: 'downlinebanners',
vbb: 'viralbannerblitz', viralbannerblitz: 'viralbannerblitz', stackpol: 'stackpol', earnerscorner: 'earnerscorner',
dh: 'downlinehydra', downlinehydra: 'downlinehydra', vab: 'viraladblitz', viraladblitz: 'viraladblitz', vas: 'viraladsource', viraladsource: 'viraladsource', fivex: '5xyourteam', '5xyourteam': '5xyourteam' };
dh: 'downlinehydra', downlinehydra: 'downlinehydra', vab: 'viraladblitz', viraladblitz: 'viraladblitz', vas: 'viraladsource', viraladsource: 'viraladsource', ypb: 'yourprogrambuilder', yourprogrambuilder: 'yourprogrambuilder', fivex: '5xyourteam', '5xyourteam': '5xyourteam' };
function networkTemplate(src) { const k = NET_SRC[String(src || '').trim().toLowerCase()]; const t = k ? template(k) : null; return t && t.source === 'network' ? t : null; }
function networkSource(owner, src) {
const t = networkTemplate(src); if (!t || !owner) return null;