gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit641f3b54641f3b54Tracker: Apollo answermre641f3b54/tests/seed-mobile.hl

3.5 KB

  1. // tests/seed-mobile.hl — GATE FIXTURE for the mobile audit (mission MK, tests/mobile.mjs): written into the gate's storage AFTER
  2. // tests/seed-show.hl (it uses its 'Pager Movie NN' titles), before the server starts.
  3. // franchise 'Mobile Franchise' with one timeline 'Mobile Timeline Alpha' (Pager Movie 01, 02, 03) → a movie page's widget with the franchise link
  4. // series 'Mobile Soap' with ONE season of 160 episodes (the real data has one of 1,175) → its page starts with that season CLOSED
  5. // 100 timelines WITHOUT a franchise 'Mobile Collection 001' … '100' (one Pager Movie each) → /franchises: 40 per page = 3 pages
  6. // Self-assigned ids, one put() each (never update(), see seed-show.hl).
  7. import { MPackDB } from 'hl:mpackdb'
  8. import { env } from 'hl:proc'
  9. storageDir = env('TRACKER_STORAGE')
  10. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  11. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  12. seasonsTable = new MPackDB(file = storageDir + '/seasons.db', primaryKey = '@id', indexes = ['!oldId'])
  13. episodesTable = new MPackDB(file = storageDir + '/episodes.db', primaryKey = '@id', indexes = ['!oldId'])
  14. franchisesTable = new MPackDB(file = storageDir + '/franchises.db', primaryKey = '@id', indexes = ['!slug'])
  15. timelinesTable = new MPackDB(file = storageDir + '/timelines.db', primaryKey = '@id', indexes = ['!slug'])
  16. franchisesTable.put({ id = 'mb0000000000fr01' name = 'Mobile Franchise' slug = 'mobile-franchise' shortId = null summary = 'A franchise for the phone gate.' created = 1 })
  17. timelinesTable.put({ id = 'mb0000000000tl00' name = 'Mobile Timeline Alpha' slug = 'mobile-timeline-alpha' franchise = 'mb0000000000fr01'
  18. order = ['mv00000000000m01', 'mv00000000000m02', 'mv00000000000m03'] source = 'editor' tmdbCollection = null orderKind = 'in-universe' supersededBy = null created = 2 })
  19. let i = 1
  20. while (i <= 100) {
  21. let nn = i < 10 ? '00' + i : (i < 100 ? '0' + i : '' + i)
  22. let mv = 10 + (i % 20)
  23. timelinesTable.put({ id = 'mb0000000000t' + nn name = 'Mobile Collection ' + nn slug = 'mobile-collection-' + nn franchise = null
  24. order = ['mv00000000000m' + mv] source = 'tmdb' tmdbCollection = 7000 + i orderKind = null supersededBy = null created = 10 + i })
  25. i = i + 1
  26. }
  27. let eps = []
  28. let e = 1
  29. while (e <= 160) {
  30. let en = e < 10 ? '00' + e : (e < 100 ? '0' + e : '' + e)
  31. eps.push('mb000000000ep' + en)
  32. episodesTable.put({ id = 'mb000000000ep' + en episodeNumber = e seasonNumber = 1 title = 'Soap Day ' + e summary = null release = '2020-01-01' show = 'mb0000000000soap' season = 'mb0000000000ssn1' oldId = 'mb-ep' + en })
  33. e = e + 1
  34. }
  35. seasonsTable.put({ id = 'mb0000000000ssn1' seasonNumber = 1 title = null release = null summary = null show = 'mb0000000000soap' episodes = eps oldId = 'mb-s1' })
  36. showsTable.put({
  37. adult = false id = 'mb0000000000soap' title = 'Mobile Soap' summary = 'A soap with one very long season.' tmdbSummary = null tmdbId = null
  38. language = 'en' type = 'series' release = '2020-01-01' year = 2020 image = null urlSegment = 'mobile-soap'
  39. episodesCount = 160 homepage = null imdbId = null seasonsCount = 1 status = 'Returning Series' tagline = null
  40. tvdbId = null tvmzId = null genres = [] cast = [] seasons = ['mb0000000000ssn1'] oldId = 'mb-soap'
  41. })
  42. showsTable.persist()
  43. seasonsTable.persist()
  44. episodesTable.persist()
  45. franchisesTable.persist()
  46. timelinesTable.persist()
  47. console.log('seed-mobile: 1 franchise + 1 timeline + 100 loose timelines + a soap of 160 episodes')

Branches

Latest commits

  • 641f3b54Tracker: Apollo answermre
  • 8b3cbddaTracker: status, TR7 fix livemre
  • ec30162aTracker: TR7 fix livemre
  • 54cbec80compose: ignore SIGPIPE (TR7 crash loop, exit 141)mre
  • 3e164b63Tracker: status after CL1mre
  • 9d686bb3Tracker: CL1 reviewedmre
  • b8bba562CL1: crash loop report (SIGPIPE confirmed, trap wrapper option)mre
  • 298785f2Tracker: CL1 startedmre
  • 36b22710Tracker: port slot, CL1 briefmre
  • a401190fTracker: GO for the crash loopmre
  • e195d372Tracker: token pathsmre
  • 7f541d11Tracker conductor: CONDUCTOR.md, short STATUS.md, old status + decisions archive to archive/2026-10-31mre
  • 8dd423f7README: login.js stays by caramboleyo's explicit rulemre
  • d8df1493tracker: standby service on port 45018 and a gap-free hand-over in deploy.sh step 4mre
  • 36dd1686ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • ff9b838etracker: the Ended status pill uses the same red as layouts (pill danger); gate updatedmre
  • 40d9719eTP2: LOG line and report for the tracker pillsmre
  • ab3f2ba5tracker: status, genres, TMDB/IMDb/TVDB/TVmaze links and list kinds use the theme's pill; dense season list with the season check centred on its title line; gates for bothmre
  • 521061d6tracker header on phones: signed in, the brand fits whole at 360 and 390 px (tighter gaps and side paddings, slightly smaller brand, narrow screens and signed in only); mobile gate checks itmre
  • 18114a53tracker: franchises gate waits for the signed-out selector instead of the removed Log in buttonmre