gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1997e77d1997e77dgitoria#40: stable PR numbers, refs/pull/N/head, ssh pushes reach the app (merge w40-pr-number)mre1997e77d/plugins/time/tests/parity.mjs

1.9 KB

  1. // plugins/time/tests/parity.mjs — client.js (the browser half) against the native plugin.
  2. // node plugins/time/tests/parity.mjs
  3. // Runs parity.hl natively and the same calls through client.js in Node (Intl), and compares line
  4. // for line: the DST gap and fold of Europe/Vienna and America/New_York in 2026, and 1970.
  5. import { spawnSync } from 'node:child_process';
  6. import { readFileSync } from 'node:fs';
  7. import { dirname, join, resolve } from 'node:path';
  8. import { fileURLToPath } from 'node:url';
  9. const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../../..');
  10. const BIN = process.env.HL_BIN || join(ROOT, 'native/zig-out/bin/hybriel');
  11. let failed = false;
  12. const ok = (c, m) => { if (!c) { failed = true; console.log('FAIL ' + m); } else console.log('ok ' + m); };
  13. ok(readFileSync(join(ROOT, 'plugins/time/client.js'), 'utf8') === readFileSync(join(ROOT, 'plugins/time/server.js'), 'utf8'), 'client.js is server.js, byte for byte (one implementation, two names)');
  14. const t = await import(join(ROOT, 'plugins/time/client.js'));
  15. const cases = [
  16. ['Europe/Vienna', 2026, 3, 29, 2, 30], ['Europe/Vienna', 2026, 10, 25, 2, 30],
  17. ['America/New_York', 2026, 3, 8, 2, 30], ['America/New_York', 2026, 11, 1, 1, 30],
  18. ['Europe/Vienna', 1970, 1, 1, 0, 0], ['America/New_York', 1970, 6, 1, 12, 0], ['Europe/Vienna', 2026, 7, 1, 12, 0],
  19. ];
  20. const mine = cases.map(([z, y, m, d, h, mi]) => {
  21. const ms = t.fromLocal({ year: y, month: m, day: d, hour: h, minute: mi }, z);
  22. return `${z} ${ms} ${t.offset(ms, z)} ${t.localTimestamp(ms, z)} ${t.timestamp(ms)} ${JSON.stringify(t.local(ms, z))} ${t.isZone(z)}`;
  23. });
  24. const r = spawnSync(BIN, [join(ROOT, 'plugins/time/tests/parity.hl')], { encoding: 'utf8' });
  25. const native = r.stdout.trim().split('\n');
  26. ok(r.status === 0 && native.length === mine.length, 'native run answered ' + mine.length + ' lines');
  27. mine.forEach((l, i) => ok(l === native[i], l.slice(0, 60) + (l === native[i] ? '' : '\n native: ' + native[i] + '\n client: ' + l)));
  28. process.exit(failed ? 1 : 0);

Branches

Latest commits

  • 1997e77dgitoria#40: stable PR numbers, refs/pull/N/head, ssh pushes reach the app (merge w40-pr-number)mre
  • 9364fb16gitoria#40: ssh pushes call /__git/pushed before and after (ensurePulls, notifyPush, syncPulls); gate over the sshd imagemre
  • fdb9ed28gitoria#41: repo owners can connect an app (merge w41-apps-connect)mre
  • 2ef23df0gitoria#40: the browser gate reads the title without the #Nmre
  • 9af07ecegitoria#41: connect an app to a repo (apps table, connect flow, manual add, allow-list, settings)mre
  • b9137ff0gitoria#40: pull requests are stored with a number, refs/pull/N/head, syncPulls and pullObject; /pulls shows #Nmre
  • 06d622daown image tag gitoria-runtime:debian12 for gitoria and standby (shared tag lost git)mre
  • 20caa33agitoria#37: media queries in the language's @media block (minWidth = '60rem') in list, codebrowser and repomre
  • c4175e6dgitoria: a startup error prints its message before exit 1 (hybriel#247)mre
  • c50d17efKeep function-route not-found style in shared stylesheetmre
  • e42d78d3Preserve ticket state CSS and document function-route style gapmre
  • c6b7154eWIP gitoria#26: move styles into nested component blocksmre
  • 77a2c31cgitoria#31: plain declarations instead of needless let in lib/ and tools/ (103 let removed, 137 kept because reassigned); no other changemre
  • 4b98ab62gitoria: an ident access key (idt_) works as the git password; read key clones only, bad key 401, ident down 503 (ident#27); gate tests/ident-access-gitoria.mjs in deploy.shmre
  • 1185f686gitoria#36: a failed return from tickets shows a note on the settings page and leaves one log line per outcome; no code is exchangedmre
  • 5d2c385agitoria: the sign-in callback keeps the session it finds and signs it in (same cookie, nothing signed out; ident#28); security gate 71+5 failing → 76 passed; deploy.sh runs tests/private.mjs toomre
  • 241ef3f9deploy.sh: rebuild the sshd image before up -d (GO34c)mre
  • 821cdbb1gitoria#34b: styles, create-repo tool, docs, push/ssh gates sign in through the selector, shots scriptmre
  • a81abdc9gitoria#34: org page via function route, member-reachable orgs, selects, reportmre
  • 17f031f0gitoria#34: private repos, organizations, members, move tool, gatemre