gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit47a3cae647a3cae6STATUS: mission 053 merge commit idsmre47a3cae6/plugins/mpackdb/testdata/compat/write_a.mjs

1.5 KB

  1. // Cross-compat phase A step 1: the REAL JS mpackdb v1.0.7 writes a db that
  2. // the Zig port (compat_driver.zig verify_a / mutate_a) then reads and mutates.
  3. //
  4. // Setup (mpackdb source + its msgpackr dep live OUTSIDE the repo):
  5. // cp -r /media/STORAGE/projects/mpackdb-reference /tmp/mpackdb-run
  6. // cd /tmp/mpackdb-run && npm install
  7. // Run:
  8. // MPACKDB=/tmp/mpackdb-run node write_a.mjs /tmp/compat/users_a
  9. import { pathToFileURL } from 'url';
  10. const MOD = process.env.MPACKDB || '/tmp/mpackdb-run';
  11. const { default: MPackDB } = await import(pathToFileURL(MOD + '/src/MPackDB.js'));
  12. const dbfile = process.argv[2];
  13. if (!dbfile) throw new Error('usage: write_a.mjs <dbfile>');
  14. const db = new MPackDB(dbfile, { primaryKey: '*id', indexes: ['email', '*age'] });
  15. const id0 = await db.insert({
  16. name: 'Alice Ünicode ✓',
  17. email: '[email protected]',
  18. age: 30,
  19. balance: 1234.56,
  20. tags: ['admin', 'staff'],
  21. profile: { lang: 'de', theme: null },
  22. created: new Date(1721996422123),
  23. });
  24. const id1 = await db.insert({ name: 'Bob', email: '[email protected]', age: 25, big: 5000000000 });
  25. const id2 = await db.insert({ name: 'Carol', email: '[email protected]', age: 35 });
  26. const id3 = await db.insert({ name: 'Dave', email: '[email protected]', age: 40 });
  27. const id4 = await db.insert({ name: 'Eva Müller', email: '[email protected]', age: 28 });
  28. console.log('inserted ids:', id0, id1, id2, id3, id4);
  29. const deleted = await db.delete(id2);
  30. console.log('deleted id=2 (Carol):', deleted.length, 'record(s)');
  31. await db.close();
  32. console.log('JS write_a done');

Branches

Latest commits

  • 47a3cae6STATUS: mission 053 merge commit idsmre
  • dcc5eecaMerge branch 't14-search'mre
  • 03edc783Merge branch 't15-tvmaze'mre
  • 71b46345tracker#15: numbering check by date or title, placeholder titles in other languages, docs + real-data proofmre
  • 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
  • b8bd1157tracker#14: README + STATUS (search, real-data numbers, gate, merge notes)mre
  • 65c694a8tracker#14: search — header magnifier, /search/<text> (in-memory word-prefix index over titles + people), Fetch from web (TMDB search/multi, ours left out), Add = import via syncShow; gate +25 checks, real-data scriptmre
  • 34f2c15btracker#15: TVmaze merge in the sync (gaps only: new episodes/seasons, empty titles/air dates; numbering check), fake TVmaze episodes + gatemre
  • cbdc4ea7tracker#12: link icons TMDB/IMDb/TVDB/TVmaze; sync fills missing ids (TVmaze lookup); movies fetched via /movie/mre
  • b105bcd8tracker#11: Hybriel master ff51cf46 (checks no longer vanish), mobile-first styles, carets, follow button, sign-in modal, inverted check, orange castmre
  • 31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre
  • 2fa9d997tracker#9: TMDB sync (followed shows: seasons, episodes, posters), tools/sync-tmdb.hl + daily run 04:00 UTC, fake TMDB in gatemre
  • 49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • 54070a4etracker#8: /my/unwatched + /my/schedule (301 from old), S01E01, title (year), 1 episode, watched-set lookup (unwatched 15s -> 1s)mre
  • 3251488atracker#7: /my/shows (followed shows, newest follow first, poster, title, last watched SxxEyy); gate can take screenshots (TRACKER_GATE_SHOTS)mre
  • 44b7d9f9tracker#6: /schedule — upcoming episodes of followed shows, soonest firstmre
  • 91c9fc8ctracker#5: /unwatched — unwatched released episodes of followed shows, newest firstmre
  • a97c0295tracker#4: show page /shows/:slug (header, seasons, episodes, watch checks) + tools/relink-episode-seasons.hlmre
  • 05f407c5tracker: no border on any button except inverted ones (Log out, ident status and identities too); header brand weight 100mre
  • 17375427tracker#2: tools/migrate.hl + tools/verify.hl — old MongoDB data into mpackdb with new idsmre