Back to Black Site
SOURCE / PINNED RELEASE

Made of little things.

Black Site

Release
666bc7c74ebd…
Author-recorded commit
05e95af79676…
License
LICENSE
Author’s source reference
nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-d2225ddc391

Archive hash verified: 1544e072e245c4a8…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

tests/game-authority.test.mjs
// The game code in src/game runs inside the napplet sandbox: no direct storage or network.
import assert from 'node:assert/strict';
import { readdir, readFile } from 'node:fs/promises';
import { dirname, join } from 'node:path';
import test from 'node:test';
import { fileURLToPath } from 'node:url';

const gameDir = join(dirname(dirname(fileURLToPath(import.meta.url))), 'src', 'game');
const BANNED = ['localStorage', 'sessionStorage', 'indexedDB', 'fetch(', 'XMLHttpRequest', 'WebSocket', 'EventSource', 'document.cookie'];

test('game code uses no direct browser storage or network APIs', async () => {
  const files = (await readdir(gameDir)).filter((f) => f.endsWith('.js'));
  assert.ok(files.length > 0);
  for (const file of files) {
    const code = await readFile(join(gameDir, file), 'utf8');
    for (const api of BANNED) assert.ok(!code.includes(api), `src/game/${file} uses ${api}, which is not allowed in a napplet`);
  }
});

test('saved data goes through the shell-backed store', async () => {
  const ui = await readFile(join(gameDir, 'ui.js'), 'utf8');
  assert.match(ui, /const store = globalThis\.BLACKSITE_STORE;/);
});