ident
All repositories: gitoria
1.5 KB
// tools/dump-store.hl — every row of every ident table as ONE JSON object on stdout// ({ accounts: [...], identities: [...], ... }). hl:mpackdb rewrites a table's files when// it opens them (hybriel #40): ONLY EVER RUN IT ON A COPY —// cp -a storage/mpackdb /tmp/x && IDENT_STORAGE=/tmp/x bin/hybriel tools/dump-store.hl// The output holds apps' secret HASHES and API keys: keep it in .scratch, don't paste it.import { env } from 'hl:proc'import { dir, countOf } from '../lib/util.hl'import { accountsTable } from '../lib/accounts.hl'import { identitiesTable } from '../lib/identities.hl'import { otpTable, sendsTable, ipSendsTable } from '../lib/login.hl'import { appsTable, connectionsTable, requestsTable, grantsTable } from '../lib/apps.hl'import { kindsTable, settingsTable, notificationsTable } from '../lib/notify.hl'import { digestsTable } from '../lib/delivery.hl'if (env('IDENT_STORAGE') == null || !env('IDENT_STORAGE').startsWith('/')) { hlError('set IDENT_STORAGE to an ABSOLUTE copy of storage/mpackdb') }static rows = (t) => {out = []f = t.find(null, null)if (countOf(f) > 0) { for (r of f) { out.push(r) } }return out}console.log(JSON.stringify({ accounts = rows(accountsTable) identities = rows(identitiesTable) otp = rows(otpTable) sends = rows(sendsTable) ipsends = rows(ipSendsTable) apps = rows(appsTable) connections = rows(connectionsTable) requests = rows(requestsTable) grants = rows(grantsTable) kinds = rows(kindsTable) settings = rows(settingsTable) notifications = rows(notificationsTable) digests = rows(digestsTable) }))
Branches
Latest commits
- 443291d4ident mission 012: /start on its own shell (no account), browser gate 152/0, reportmre
- 021dd0fcident mission 012: browser gate waits cold start (IDENT_COLD_MS), header selectors, e2e checks; shell events from a page do not reach it (probe), current not marked, account-bar link 44 pxmre
- 97f77b07ident mission 012 (WIP): onto the layouts theme dbe3de7, shell on AppHeader/MainMenu/UserMenu/Sidebar + ContentFirst, styles cut, check-theme gatemre
- 8e4f435bpaths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- fa288f63ident mission 011: report wording (Intl zone names)mre
- 961fae01ident mission 011: report, LOG, STATUSmre
- 65348039ident#7: delivery gate — console check split at the gate's own server restart (49 checks)mre
- dfa7b783ident#7: README (Delivery, env, gate, files, data), deploy.sh runs tests/delivery.mjsmre
- ab6331f4ident#7: tests/delivery.mjs — fake clock gate: Vienna/New York/Tokyo/UTC 17:00, urgent, mail off, restart, DST days, zone changemre
- 7869f57bident#7: delivery — the daily mail at 17:00 in the user's zone (digests table, once per local day, test clock IDENT_TEST_CLOCK), urgent mailed at once, push hookmre
- 371ef1b5ident#7: lib/mail.hl sendNotificationMail (sink: <sink>.mail, one JSON line per mail)mre
- 39749e0bident#7: time zones through hl:time — server checks isZone, an account without a known zone reads as UTC, allAccountsmre
- 7a54fe72mission brief 011mre
- a6a874cdident mission 010: vendor hybriel 0f396652 (plugins + compose cache volume/tmpfs + deploy URL wait + report)mre
- 4e7cf78emission brief 010mre
- e8b2b0f7docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
- 5fdbb6b2ident mission 009: report — scratch folder notemre
- 74235815ident mission 009 (4/4): docs (README files map + same-output test, STATUS, LOG), report, tests/letcount.py + realdata-baseline/comparemre
- fe183516ident mission 009 (3/4): let only where reassigned — 293 never-reassigned lets are plain declarations; kept: reassigned, loop bodies, names of a file member, a name declared twice in one function; same outputmre
- d2e7f91bident mission 009 (2/4): one lib file per topic (login, accounts, identities, apps, invites, selector, notify + helpers, util), function routes as thin wrappers in lib/api.hl, project.hl = the map; same outputmre