prometheus/scripts
Local Dev 916440fb31 prometheus: /submit becomes a 4-step publisher wizard
The submit page was a one-form upload tester that said "not wired yet"
on the three steps that would turn an upload into a published listing.
It now walks a publisher through the whole thing in-page.

Four client-side steps, state in one object (W = {file, upload, manifest,
message, signature}), scroll-to-top on each transition, back buttons
preserved so revisions are a correction not a restart:

  Step 1 — Upload
    File picker → POST /api/upload. Response rendered as a card showing
    name + size + short hash + the scan verdict chip ("scan ✓ clean
    (clamav, 2ms)"). Advance button only enabled when scan is clean;
    infected or error paths show the reason inline and stay on step 1.

  Step 2 — Describe
    Form fields for publisher BNS name, slug, display name, category
    (optgroup'd by top-level: Apps subs, then Games, then FinTech),
    version, description, download URL, homepage + icon (optional).
    Pattern + maxlength validation matches the server's rules in
    service/listings.js. Submit builds W.manifest and canonicalises
    the signing message.

  Step 3 — Sign
    Shows the canonical message to sign. If window.bitcoincash is
    injected (Theseus with Aegis), a one-click "Sign with Theseus
    wallet" button calls bitcoincash.signMessage(). Fallback paste
    textarea accepts a 86–88 char BIP-137 signature from any wallet
    (Electron Cash, Deviant, Cashonize). Both paths populate
    W.signature and enable the continue button.

  Step 4 — Publish
    POST /api/listing with the full body. On 201 shows the listing
    card + a "View your listing →" button pointing at
    /app/<pub>/<slug>. On error shows the server's reason inline and
    re-enables the Publish button for retry.

Canonical JSON in the client is a direct copy of service/listings.js's
canonicalJson — same bytes, same signature. A test that drifts them
apart would be nice; for now a comment on each copy flags the pairing.

scripts/test-listing-roundtrip.mjs's default category changed from the
old `utilities` slug (removed in the taxonomy change) to `productivity`.
2026-10-22 22:58:35 +03:00
..
migrate-taxonomy.mjs prometheus: taxonomy — Apps / Games / FinTech, with sub-chips inside Apps 2026-10-22 22:39:08 +03:00
seed-listings.json prometheus: taxonomy — Apps / Games / FinTech, with sub-chips inside Apps 2026-10-22 22:39:08 +03:00
seed.mjs prometheus: standalone identity + first-wave Silent Mode listings 2026-10-09 01:23:21 +02:00
snapshot.mjs prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
test-admin-roundtrip.mjs prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
test-listing-roundtrip.mjs prometheus: /submit becomes a 4-step publisher wizard 2026-10-22 22:58:35 +03:00