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.
- package/RELEASES.md +10 -0
- package/bin/quilt.js +7 -143
- package/package.json +1 -1
- package/src/account.js +0 -29
- package/src/api/memory-store.js +0 -29
- package/src/api/routes/teams.js +0 -23
- package/src/api/server.js +5 -19
- package/src/api/supabase-store.js +0 -52
- package/src/branch-view.js +6 -131
- package/src/control.js +2 -33
- package/src/duties.js +1 -1
- package/src/github-commit.js +3 -315
- package/src/mcp.js +8 -157
- package/src/relay-ask.js +3 -66
- package/src/relay-cluster.js +3 -5
- package/src/relay-mcp.js +6 -418
- package/src/relay-prune.js +6 -145
- package/src/relay-turn-sync.js +1 -1
- package/src/server.js +33 -1331
- package/src/session-follow.js +18 -5
- package/src/session.js +58 -3526
- package/src/status.js +2 -58
- package/src/turn-sync.js +15 -2
- package/src/ui/changes.js +5 -14
- package/src/ui/chat.js +0 -1
- package/src/ui/common.js +0 -2
- package/src/ui/git-rule.js +2 -30
- package/src/ui/home.js +3 -76
- package/src/ui/session.js +34 -528
- package/src/ui/tree.js +2 -8
- package/src/ui/workspaces.js +2 -122
- package/src/ui-server.js +1 -38
- package/src/api/routes/github.js +0 -380
- package/src/branches.js +0 -194
- package/src/clash.js +0 -128
- package/src/commit-request.js +0 -59
- package/src/commit.js +0 -213
- package/src/git-hook.js +0 -48
- package/src/gitignore.js +0 -49
- package/src/gitstate.js +0 -1069
- package/src/relay-ci.js +0 -111
- package/src/relay-clash.js +0 -214
- package/src/relay-commit.js +0 -923
- package/src/relay-filekey.js +0 -46
- package/src/relay-git.js +0 -274
- package/src/relay-githttp.js +0 -166
- package/src/relay-github.js +0 -109
- package/src/relay-outbound.js +0 -1295
- package/src/relay-repo-moves.js +0 -43
- package/src/relay-sync.js +0 -795
- package/src/relay-upstream.js +0 -889
- package/src/sync-words.js +0 -42
- package/src/upstream.js +0 -192
package/src/relay-repo-moves.js
DELETED
|
@@ -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
|
-
}
|