@aloth/olcli 0.6.0 → 0.8.0
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/README.md +107 -438
- package/dist/cli.js +14 -9
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +10 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +23 -18
- package/dist/client.js.map +1 -1
- package/dist/mcp.js +22 -9
- package/dist/mcp.js.map +1 -1
- package/dist/paths.d.ts +28 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +64 -0
- package/dist/paths.js.map +1 -0
- package/dist/remote-helper.d.ts +16 -0
- package/dist/remote-helper.d.ts.map +1 -0
- package/dist/remote-helper.js +431 -0
- package/dist/remote-helper.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* git-remote-overleaf — Git remote helper for Overleaf projects.
|
|
4
|
+
*
|
|
5
|
+
* Allows native git commands against Overleaf:
|
|
6
|
+
* git clone overleaf::https://www.overleaf.com/project/<id>
|
|
7
|
+
* git pull
|
|
8
|
+
* git push
|
|
9
|
+
*
|
|
10
|
+
* Protocol reference: gitremote-helpers(7)
|
|
11
|
+
*
|
|
12
|
+
* Capabilities: import + export with refspec.
|
|
13
|
+
* State stored in .git/overleaf/ (manifest).
|
|
14
|
+
*/
|
|
15
|
+
import { createInterface } from 'node:readline';
|
|
16
|
+
import { execSync } from 'node:child_process';
|
|
17
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
18
|
+
import { join, resolve } from 'node:path';
|
|
19
|
+
import { OverleafClient } from './client.js';
|
|
20
|
+
import { getSessionCookie, getBaseUrl, getSessionCookieName, getTimeout, getPasswordCredentials, } from './config.js';
|
|
21
|
+
import { loadIgnore, shouldIgnore } from './ignore.js';
|
|
22
|
+
// ─── Logging (stderr only — stdout is the git protocol channel) ───
|
|
23
|
+
function debug(msg) {
|
|
24
|
+
if (process.env.GIT_REMOTE_OVERLEAF_DEBUG) {
|
|
25
|
+
process.stderr.write(`[git-remote-overleaf] ${msg}\n`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function fatal(msg) {
|
|
29
|
+
process.stderr.write(`fatal: ${msg}\n`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parse an Overleaf project URL into base URL and project ID.
|
|
34
|
+
*
|
|
35
|
+
* Supported formats:
|
|
36
|
+
* https://www.overleaf.com/project/abc123
|
|
37
|
+
* overleaf::https://www.overleaf.com/project/abc123
|
|
38
|
+
* https://custom.overleaf.example.com/project/abc123
|
|
39
|
+
* abc123 (bare project ID, uses configured base URL)
|
|
40
|
+
*/
|
|
41
|
+
function parseRemoteUrl(url) {
|
|
42
|
+
// Strip the overleaf:: prefix if present (git passes the raw URL part)
|
|
43
|
+
const cleaned = url.replace(/^overleaf::/, '');
|
|
44
|
+
// Try parsing as URL with /project/<id> path
|
|
45
|
+
const projectPathMatch = cleaned.match(/^(https?:\/\/[^/]+)\/project\/([a-f0-9]{24})$/i);
|
|
46
|
+
if (projectPathMatch) {
|
|
47
|
+
return { baseUrl: projectPathMatch[1], projectId: projectPathMatch[2] };
|
|
48
|
+
}
|
|
49
|
+
// Bare 24-char hex ID
|
|
50
|
+
if (/^[a-f0-9]{24}$/i.test(cleaned)) {
|
|
51
|
+
return { baseUrl: getBaseUrl(), projectId: cleaned };
|
|
52
|
+
}
|
|
53
|
+
fatal(`Cannot parse Overleaf URL: ${url}\n Expected: https://<host>/project/<24-char-id>`);
|
|
54
|
+
}
|
|
55
|
+
function getGitDir() {
|
|
56
|
+
const gitDir = process.env.GIT_DIR;
|
|
57
|
+
if (!gitDir)
|
|
58
|
+
fatal('GIT_DIR not set — are you running inside git?');
|
|
59
|
+
return resolve(gitDir); // Always return absolute path
|
|
60
|
+
}
|
|
61
|
+
function stateDir() {
|
|
62
|
+
return join(getGitDir(), 'overleaf');
|
|
63
|
+
}
|
|
64
|
+
function ensureStateDir() {
|
|
65
|
+
const dir = stateDir();
|
|
66
|
+
if (!existsSync(dir))
|
|
67
|
+
mkdirSync(dir, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
function loadState() {
|
|
70
|
+
const path = join(stateDir(), 'state.json');
|
|
71
|
+
if (!existsSync(path))
|
|
72
|
+
return { manifest: [], lastMark: 0 };
|
|
73
|
+
try {
|
|
74
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return { manifest: [], lastMark: 0 };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function saveState(state) {
|
|
81
|
+
ensureStateDir();
|
|
82
|
+
writeFileSync(join(stateDir(), 'state.json'), JSON.stringify(state, null, 2));
|
|
83
|
+
}
|
|
84
|
+
// ─── Authentication (reuses olcli's config chain) ───
|
|
85
|
+
async function getClient(baseUrl) {
|
|
86
|
+
const cookieName = getSessionCookieName();
|
|
87
|
+
const cookie = getSessionCookie();
|
|
88
|
+
const passwordCredentials = getPasswordCredentials();
|
|
89
|
+
if (cookie) {
|
|
90
|
+
try {
|
|
91
|
+
const client = await OverleafClient.fromSessionCookie(cookie, baseUrl, cookieName);
|
|
92
|
+
client.setGlobalTimeout(getTimeout());
|
|
93
|
+
return client;
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
if (!passwordCredentials) {
|
|
97
|
+
fatal(`Authentication failed: ${err.message}\nRun 'olcli login' first.`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (passwordCredentials) {
|
|
102
|
+
const client = await OverleafClient.fromPasswordLogin(passwordCredentials.email, passwordCredentials.password, baseUrl);
|
|
103
|
+
client.setGlobalTimeout(getTimeout());
|
|
104
|
+
return client;
|
|
105
|
+
}
|
|
106
|
+
fatal('No Overleaf credentials found. Run \'olcli login\' or set OVERLEAF_SESSION.');
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Read fast-export stream from stdin and extract file modifications/deletions.
|
|
110
|
+
*
|
|
111
|
+
* The stream comes after we respond to the "export" command. Git sends
|
|
112
|
+
* fast-export data terminated by "done\n".
|
|
113
|
+
*/
|
|
114
|
+
async function parseFastExport(rl) {
|
|
115
|
+
const files = [];
|
|
116
|
+
const deletes = [];
|
|
117
|
+
const blobData = new Map(); // mark → data
|
|
118
|
+
let currentMark = '';
|
|
119
|
+
let dataBuffer = Buffer.alloc(0);
|
|
120
|
+
// State machine for parsing the fast-export stream.
|
|
121
|
+
// readline gives us lines; for binary `data <N>` sections we accumulate bytes.
|
|
122
|
+
let state = 'command';
|
|
123
|
+
let pendingDataBytes = 0;
|
|
124
|
+
let pendingMark = '';
|
|
125
|
+
let commitSection = false;
|
|
126
|
+
for await (const line of rl) {
|
|
127
|
+
if (state === 'data') {
|
|
128
|
+
// Accumulate data — readline splits on \n so we rejoin
|
|
129
|
+
const lineBytes = Buffer.from(line + '\n', 'binary');
|
|
130
|
+
dataBuffer = Buffer.concat([dataBuffer, lineBytes]);
|
|
131
|
+
if (dataBuffer.length >= pendingDataBytes) {
|
|
132
|
+
// Trim to exact length
|
|
133
|
+
const finalData = dataBuffer.subarray(0, pendingDataBytes);
|
|
134
|
+
if (pendingMark) {
|
|
135
|
+
blobData.set(pendingMark, finalData);
|
|
136
|
+
}
|
|
137
|
+
state = 'command';
|
|
138
|
+
dataBuffer = Buffer.alloc(0);
|
|
139
|
+
pendingMark = '';
|
|
140
|
+
}
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
// Command mode
|
|
144
|
+
if (line === 'done' || line === '') {
|
|
145
|
+
if (line === 'done')
|
|
146
|
+
break;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (line.startsWith('blob')) {
|
|
150
|
+
commitSection = false;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (line.startsWith('mark :')) {
|
|
154
|
+
currentMark = line.slice(6);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (line.startsWith('data ')) {
|
|
158
|
+
pendingDataBytes = parseInt(line.slice(5), 10);
|
|
159
|
+
pendingMark = commitSection ? '' : currentMark;
|
|
160
|
+
state = 'data';
|
|
161
|
+
dataBuffer = Buffer.alloc(0);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (line.startsWith('commit ')) {
|
|
165
|
+
commitSection = true;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (line.startsWith('committer ') || line.startsWith('author ')) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (line.startsWith('from ') || line.startsWith('merge ')) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
// File modification: M <mode> <dataref> <path>
|
|
175
|
+
const mMatch = line.match(/^M \d+ :(\S+) (.+)$/);
|
|
176
|
+
if (mMatch) {
|
|
177
|
+
const [, markRef, path] = mMatch;
|
|
178
|
+
const content = blobData.get(markRef);
|
|
179
|
+
if (content) {
|
|
180
|
+
files.push({ path, content });
|
|
181
|
+
}
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
// Inline modification: M <mode> inline <path>
|
|
185
|
+
const mInline = line.match(/^M \d+ inline (.+)$/);
|
|
186
|
+
if (mInline) {
|
|
187
|
+
// Next will be a data line
|
|
188
|
+
currentMark = `__inline_${mInline[1]}`;
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
// Deletion: D <path>
|
|
192
|
+
const dMatch = line.match(/^D (.+)$/);
|
|
193
|
+
if (dMatch) {
|
|
194
|
+
deletes.push({ path: dMatch[1] });
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Resolve any inline blobs
|
|
199
|
+
for (const [mark, data] of blobData) {
|
|
200
|
+
if (mark.startsWith('__inline_')) {
|
|
201
|
+
const path = mark.slice(9);
|
|
202
|
+
files.push({ path, content: data });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return { files, deletes };
|
|
206
|
+
}
|
|
207
|
+
// ─── Push logic ───
|
|
208
|
+
async function pushChanges(client, projectId, parsed, _state) {
|
|
209
|
+
const ignoreCtx = loadIgnore(process.cwd(), {});
|
|
210
|
+
// Upload modified/new files
|
|
211
|
+
for (const file of parsed.files) {
|
|
212
|
+
if (shouldIgnore(file.path, ignoreCtx)) {
|
|
213
|
+
debug(`Skipping ignored file: ${file.path}`);
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
debug(`Uploading: ${file.path}`);
|
|
217
|
+
await client.uploadFile(projectId, null, file.path, file.content);
|
|
218
|
+
}
|
|
219
|
+
// Delete removed files
|
|
220
|
+
for (const del of parsed.deletes) {
|
|
221
|
+
debug(`Deleting: ${del.path}`);
|
|
222
|
+
try {
|
|
223
|
+
await client.deleteByPath(projectId, del.path);
|
|
224
|
+
}
|
|
225
|
+
catch (err) {
|
|
226
|
+
// File might already be gone on remote
|
|
227
|
+
debug(`Warning: Could not delete ${del.path}: ${err.message}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// ─── Protocol handler ───
|
|
232
|
+
async function main() {
|
|
233
|
+
// Args: git-remote-overleaf <remote-name> <url>
|
|
234
|
+
const args = process.argv.slice(2);
|
|
235
|
+
if (args.length < 1) {
|
|
236
|
+
fatal('Usage: git-remote-overleaf <remote> [<url>]');
|
|
237
|
+
}
|
|
238
|
+
// The URL is usually the second arg; if only one arg, it IS the URL
|
|
239
|
+
const rawUrl = args[1] || args[0];
|
|
240
|
+
const { projectId, baseUrl } = parseRemoteUrl(rawUrl);
|
|
241
|
+
debug(`Project ID: ${projectId}, Base URL: ${baseUrl}`);
|
|
242
|
+
ensureStateDir();
|
|
243
|
+
let state = loadState();
|
|
244
|
+
const rl = createInterface({
|
|
245
|
+
input: process.stdin,
|
|
246
|
+
terminal: false,
|
|
247
|
+
});
|
|
248
|
+
const iterator = rl[Symbol.asyncIterator]();
|
|
249
|
+
for await (const line of rl) {
|
|
250
|
+
const trimmed = line.trim();
|
|
251
|
+
debug(`< ${trimmed}`);
|
|
252
|
+
if (trimmed === '') {
|
|
253
|
+
// Empty line = end of command batch (for list/import/export batches)
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
if (trimmed === 'capabilities') {
|
|
257
|
+
// Declare what we support.
|
|
258
|
+
ensureStateDir();
|
|
259
|
+
// Create empty marks file if it doesn't exist (fast-export --import-marks
|
|
260
|
+
// fails if file is missing; empty file = nothing previously exported).
|
|
261
|
+
const marks = join(stateDir(), 'marks');
|
|
262
|
+
if (!existsSync(marks)) {
|
|
263
|
+
writeFileSync(marks, '');
|
|
264
|
+
}
|
|
265
|
+
const caps = [
|
|
266
|
+
'import',
|
|
267
|
+
'export',
|
|
268
|
+
// Map remote refs/heads/* to a private namespace refs/overleaf/<remote>/*
|
|
269
|
+
// This is critical: git uses the private namespace to track what the remote has.
|
|
270
|
+
// Without a separate namespace, git can't compute the push delta.
|
|
271
|
+
'refspec refs/heads/*:refs/overleaf/*',
|
|
272
|
+
// import-marks/export-marks = passed to fast-export on push.
|
|
273
|
+
`import-marks ${marks}`,
|
|
274
|
+
`export-marks ${marks}`,
|
|
275
|
+
'', // blank line terminates capabilities
|
|
276
|
+
].join('\n');
|
|
277
|
+
process.stdout.write(caps + '\n');
|
|
278
|
+
debug(`> capabilities response sent (marks=${marks})`);
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
if (trimmed === 'list' || trimmed === 'list for-push') {
|
|
282
|
+
// Report what SHA the remote currently has.
|
|
283
|
+
// Read from refs/overleaf/main (our private namespace ref updated by
|
|
284
|
+
// git after import/export via the refspec mapping).
|
|
285
|
+
let remoteSha;
|
|
286
|
+
try {
|
|
287
|
+
const sha = execSync('git rev-parse --verify refs/overleaf/main 2>/dev/null', { encoding: 'utf-8', env: { ...process.env, GIT_DIR: getGitDir() } }).trim();
|
|
288
|
+
if (/^[a-f0-9]{40}$/.test(sha))
|
|
289
|
+
remoteSha = sha;
|
|
290
|
+
}
|
|
291
|
+
catch { /* not yet created */ }
|
|
292
|
+
if (remoteSha) {
|
|
293
|
+
process.stdout.write(`${remoteSha} refs/heads/main\n`);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
process.stdout.write('? refs/heads/main\n');
|
|
297
|
+
}
|
|
298
|
+
process.stdout.write('@refs/heads/main HEAD\n');
|
|
299
|
+
process.stdout.write('\n'); // blank line terminates
|
|
300
|
+
debug(`> list response sent (sha=${remoteSha || '?'})`);
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
if (trimmed.startsWith('import ')) {
|
|
304
|
+
// import refs/heads/main
|
|
305
|
+
// May be followed by more "import" lines, terminated by blank line
|
|
306
|
+
const refs = [trimmed.slice(7)];
|
|
307
|
+
// Consume additional import lines until blank
|
|
308
|
+
for await (const nextLine of rl) {
|
|
309
|
+
const next = nextLine.trim();
|
|
310
|
+
if (next === '')
|
|
311
|
+
break;
|
|
312
|
+
if (next.startsWith('import ')) {
|
|
313
|
+
refs.push(next.slice(7));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
debug(`Import requested for: ${refs.join(', ')}`);
|
|
317
|
+
// Authenticate and fetch
|
|
318
|
+
const client = await getClient(baseUrl);
|
|
319
|
+
debug('Generating fast-import stream...');
|
|
320
|
+
const zipBuffer = await client.downloadProject(projectId);
|
|
321
|
+
const AdmZip = (await import('adm-zip')).default;
|
|
322
|
+
const zip = new AdmZip(zipBuffer);
|
|
323
|
+
const entries = zip.getEntries();
|
|
324
|
+
let mark = state.lastMark;
|
|
325
|
+
const newManifest = [];
|
|
326
|
+
const fileMarks = [];
|
|
327
|
+
// Emit feature lines so fast-import writes/reads marks.
|
|
328
|
+
// This enables incremental import and allows fast-export to know
|
|
329
|
+
// which objects were already imported.
|
|
330
|
+
const marks = join(stateDir(), 'marks');
|
|
331
|
+
process.stdout.write(`feature import-marks-if-exists=${marks}\n`);
|
|
332
|
+
process.stdout.write(`feature export-marks=${marks}\n`);
|
|
333
|
+
// feature done tells fast-import to expect "done" as terminator
|
|
334
|
+
process.stdout.write('feature done\n');
|
|
335
|
+
// Write blobs
|
|
336
|
+
for (const entry of entries) {
|
|
337
|
+
if (entry.isDirectory)
|
|
338
|
+
continue;
|
|
339
|
+
const path = entry.entryName;
|
|
340
|
+
newManifest.push(path);
|
|
341
|
+
mark++;
|
|
342
|
+
const data = entry.getData();
|
|
343
|
+
process.stdout.write(`blob\nmark :${mark}\ndata ${data.length}\n`);
|
|
344
|
+
process.stdout.write(data);
|
|
345
|
+
process.stdout.write('\n');
|
|
346
|
+
fileMarks.push({ path, mark });
|
|
347
|
+
}
|
|
348
|
+
// Write commit
|
|
349
|
+
mark++;
|
|
350
|
+
const now = Math.floor(Date.now() / 1000);
|
|
351
|
+
// Write to private namespace per refspec: refs/heads/* → refs/overleaf/*
|
|
352
|
+
process.stdout.write(`commit refs/overleaf/main\n`);
|
|
353
|
+
process.stdout.write(`mark :${mark}\n`);
|
|
354
|
+
process.stdout.write(`committer Overleaf <overleaf@localhost> ${now} +0000\n`);
|
|
355
|
+
const msg = 'Import from Overleaf';
|
|
356
|
+
process.stdout.write(`data ${Buffer.byteLength(msg)}\n`);
|
|
357
|
+
process.stdout.write(`${msg}\n`);
|
|
358
|
+
// Parent: reference previous state if any
|
|
359
|
+
if (state.manifest.length > 0) {
|
|
360
|
+
process.stdout.write(`from refs/overleaf/main^0\n`);
|
|
361
|
+
}
|
|
362
|
+
// Deletions (files removed on Overleaf since last import)
|
|
363
|
+
const removedFiles = state.manifest.filter(f => !newManifest.includes(f));
|
|
364
|
+
for (const f of removedFiles) {
|
|
365
|
+
process.stdout.write(`D ${f}\n`);
|
|
366
|
+
}
|
|
367
|
+
// Modifications (all current files)
|
|
368
|
+
for (const fm of fileMarks) {
|
|
369
|
+
process.stdout.write(`M 100644 :${fm.mark} ${fm.path}\n`);
|
|
370
|
+
}
|
|
371
|
+
process.stdout.write('\n'); // end of commit
|
|
372
|
+
process.stdout.write('done\n');
|
|
373
|
+
// Update state
|
|
374
|
+
state.manifest = newManifest;
|
|
375
|
+
state.lastMark = mark;
|
|
376
|
+
saveState(state);
|
|
377
|
+
debug(`Import complete: ${fileMarks.length} files, ${removedFiles.length} deletions`);
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
if (trimmed.startsWith('export')) {
|
|
381
|
+
// Push: git sends a fast-export stream on stdin
|
|
382
|
+
debug('Export (push) starting — reading fast-export stream...');
|
|
383
|
+
const client = await getClient(baseUrl);
|
|
384
|
+
const parsed = await parseFastExport(iterator);
|
|
385
|
+
debug(`Parsed export: ${parsed.files.length} modifications, ${parsed.deletes.length} deletions`);
|
|
386
|
+
if (parsed.files.length === 0 && parsed.deletes.length === 0) {
|
|
387
|
+
debug('Nothing to push.');
|
|
388
|
+
// Don't report ok — nothing was actually pushed.
|
|
389
|
+
// This prevents git from advancing the remote tracking ref.
|
|
390
|
+
process.stdout.write('\n');
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
await pushChanges(client, projectId, parsed, state);
|
|
394
|
+
// Report success for each ref that was pushed
|
|
395
|
+
process.stdout.write('ok refs/heads/main\n');
|
|
396
|
+
process.stdout.write('\n');
|
|
397
|
+
// Update state with new manifest
|
|
398
|
+
const currentManifest = new Set(state.manifest);
|
|
399
|
+
for (const del of parsed.deletes) {
|
|
400
|
+
currentManifest.delete(del.path);
|
|
401
|
+
}
|
|
402
|
+
for (const file of parsed.files) {
|
|
403
|
+
currentManifest.add(file.path);
|
|
404
|
+
}
|
|
405
|
+
state.manifest = [...currentManifest];
|
|
406
|
+
saveState(state);
|
|
407
|
+
}
|
|
408
|
+
debug('Export complete.');
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
if (trimmed.startsWith('option ')) {
|
|
412
|
+
// We don't support any options currently
|
|
413
|
+
process.stdout.write('unsupported\n');
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
// Unknown command
|
|
417
|
+
debug(`Unknown command: ${trimmed}`);
|
|
418
|
+
fatal(`Unsupported command: ${trimmed}`);
|
|
419
|
+
}
|
|
420
|
+
rl.close();
|
|
421
|
+
}
|
|
422
|
+
// Gracefully handle EPIPE (git closed the pipe before we finished writing)
|
|
423
|
+
process.stdout.on('error', (err) => {
|
|
424
|
+
if (err.code === 'EPIPE')
|
|
425
|
+
process.exit(0);
|
|
426
|
+
throw err;
|
|
427
|
+
});
|
|
428
|
+
main().catch((err) => {
|
|
429
|
+
fatal(err.message || String(err));
|
|
430
|
+
});
|
|
431
|
+
//# sourceMappingURL=remote-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-helper.js","sourceRoot":"","sources":["../src/remote-helper.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvD,qEAAqE;AAErE,SAAS,KAAK,CAAC,GAAW;IACxB,IAAI,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAC;QAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,SAAS,KAA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AAG,eAAe,CAAC,CAAC;gBACtC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;YAED,KAAK,CAAC,kBAAkB,CAAC,CAAC;YAC1B,SAAS;QACX,CAAC;QAED,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAClC,yCAAyC;YACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YACtC,SAAS;QACX,CAAC;QAED,kBAAkB;QAClB,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QACrC,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,EAAE,CAAC,KAAK,EAAE,CAAC;AACb,CAAC;AAED,2EAA2E;AAC3E,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAA0B,EAAE,EAAE;IACxD,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,GAAG,CAAC;AACZ,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,KAAK,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aloth/olcli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Command-line interface for Overleaf — Sync, manage, and compile LaTeX projects from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
16
|
"olcli": "dist/cli.js",
|
|
17
|
-
"olcli-mcp": "dist/mcp.js"
|
|
17
|
+
"olcli-mcp": "dist/mcp.js",
|
|
18
|
+
"git-remote-overleaf": "dist/remote-helper.js"
|
|
18
19
|
},
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "tsc",
|