heyquilt 0.3.138 → 0.3.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/RELEASES.md +10 -0
  2. package/bin/quilt.js +7 -143
  3. package/package.json +1 -1
  4. package/src/account.js +0 -29
  5. package/src/api/memory-store.js +0 -29
  6. package/src/api/routes/teams.js +0 -23
  7. package/src/api/server.js +5 -19
  8. package/src/api/supabase-store.js +0 -52
  9. package/src/branch-view.js +6 -131
  10. package/src/control.js +2 -33
  11. package/src/duties.js +1 -1
  12. package/src/github-commit.js +3 -315
  13. package/src/mcp.js +8 -157
  14. package/src/relay-ask.js +3 -66
  15. package/src/relay-cluster.js +3 -5
  16. package/src/relay-mcp.js +6 -418
  17. package/src/relay-prune.js +6 -145
  18. package/src/relay-turn-sync.js +1 -1
  19. package/src/server.js +33 -1331
  20. package/src/session-follow.js +18 -5
  21. package/src/session.js +58 -3526
  22. package/src/status.js +2 -58
  23. package/src/turn-sync.js +15 -2
  24. package/src/ui/changes.js +5 -14
  25. package/src/ui/chat.js +0 -1
  26. package/src/ui/common.js +0 -2
  27. package/src/ui/git-rule.js +2 -30
  28. package/src/ui/home.js +3 -76
  29. package/src/ui/session.js +34 -528
  30. package/src/ui/tree.js +2 -8
  31. package/src/ui/workspaces.js +2 -122
  32. package/src/ui-server.js +1 -38
  33. package/src/api/routes/github.js +0 -380
  34. package/src/branches.js +0 -194
  35. package/src/clash.js +0 -128
  36. package/src/commit-request.js +0 -59
  37. package/src/commit.js +0 -213
  38. package/src/git-hook.js +0 -48
  39. package/src/gitignore.js +0 -49
  40. package/src/gitstate.js +0 -1069
  41. package/src/relay-ci.js +0 -111
  42. package/src/relay-clash.js +0 -214
  43. package/src/relay-commit.js +0 -923
  44. package/src/relay-filekey.js +0 -46
  45. package/src/relay-git.js +0 -274
  46. package/src/relay-githttp.js +0 -166
  47. package/src/relay-github.js +0 -109
  48. package/src/relay-outbound.js +0 -1295
  49. package/src/relay-repo-moves.js +0 -43
  50. package/src/relay-sync.js +0 -795
  51. package/src/relay-upstream.js +0 -889
  52. package/src/sync-words.js +0 -42
  53. package/src/upstream.js +0 -192
@@ -1,43 +0,0 @@
1
- // Repositories that were renamed or moved to another owner on GitHub, as GitHub's `repository`
2
- // webhook says (the API passes it on: src/api/routes/github.js). The relay keeps them on its disk,
3
- // so a session that wasn't open when it happened follows the new name the next time it loads, and
4
- // a folder whose `origin` still names the old one is taken for the same repository, never as a
5
- // reason to switch back (relay-upstream.js noteFolders). Slugs are `github.com/<owner>/<name>`.
6
- import fs from 'node:fs'
7
- import path from 'node:path'
8
-
9
- const SLUG = /^github\.com\/[A-Za-z0-9_.-]{1,100}\/[A-Za-z0-9_.-]{1,100}$/
10
- const MAX = 2000
11
-
12
- /** The moves kept in `<dataDir>/repo-moves.json` (in memory only without a dataDir). */
13
- export function repoMoves ({ dataDir = null } = {}) {
14
- const file = dataDir ? path.join(dataDir, 'repo-moves.json') : null
15
- let moves = {} // lower-cased old slug -> new slug
16
- try { const m = JSON.parse(fs.readFileSync(file, 'utf8')); if (m && typeof m === 'object') moves = m } catch {}
17
- const save = () => {
18
- if (!file) return
19
- try {
20
- fs.mkdirSync(path.dirname(file), { recursive: true })
21
- fs.writeFileSync(`${file}.tmp`, JSON.stringify(moves))
22
- fs.renameSync(`${file}.tmp`, file)
23
- } catch {}
24
- }
25
- return {
26
- /** Records that `from` is now `to`. Returns false for anything that isn't two different GitHub slugs. */
27
- record (from, to) {
28
- if (!SLUG.test(String(from)) || !SLUG.test(String(to)) || from.toLowerCase() === to.toLowerCase()) return false
29
- moves[from.toLowerCase()] = to
30
- delete moves[to.toLowerCase()] // moved back: the newer name is current again
31
- const keys = Object.keys(moves)
32
- if (keys.length > MAX) for (const k of keys.slice(0, keys.length - MAX)) delete moves[k]
33
- save()
34
- return true
35
- },
36
- /** Where `slug` lives now (following renames one after another), or `slug` itself. */
37
- resolve (slug) {
38
- let at = String(slug || '')
39
- for (let i = 0; i < 10 && moves[at.toLowerCase()]; i++) at = moves[at.toLowerCase()]
40
- return at
41
- }
42
- }
43
- }