feat: add configurable base URL for self-hosted Overleaf instances#11
Open
Alice-space wants to merge 8 commits intoaloth:mainfrom
Open
feat: add configurable base URL for self-hosted Overleaf instances#11Alice-space wants to merge 8 commits intoaloth:mainfrom
Alice-space wants to merge 8 commits intoaloth:mainfrom
Conversation
…onfig Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…leaf instances Adds OVERLEAF_COOKIE_NAME env var, config set-cookie-name/get-cookie-name commands, and --cookie-name global option. Defaults to overleaf_session2; set to overleaf.sid for instances running older Overleaf versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ted instances Some self-hosted Overleaf versions expose a JSON API at POST /api/project instead of embedding projects in HTML meta tags. Try this endpoint first and fall back to HTML parsing for backward compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eX instances Implements project CRUD commands (create-project, delete-project, rename-project) tested against latex.ihep.ac.cn API based on T001 API findings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… resolution Uncomment delete and rename commands in cli.ts - these previously required entity _ids that weren't available via REST API, but client.ts now resolves them via socket.io joinProject (getProjectFileTreeFromSocket). Smoke tested on IHEP instance: upload, delete, rename all pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable
baseUrlandsessionCookieNamefor compatibility with self-hosted ShareLaTeX/Overleaf instances (tested against IHEP's instance at https://latex.ihep.ac.cn).Changes
src/config.tsgetBaseUrl()/setBaseUrl()/clearBaseUrl()— envOVERLEAF_BASE_URL, defaulthttps://www.overleaf.comgetSessionCookieName()/setSessionCookieName()— envOVERLEAF_COOKIE_NAME, defaultoverleaf_session2src/client.tsbaseUrlparameter; all API URLs derived from itlistProjects(): triesPOST /api/projectfirst (legacy ShareLaTeX JSON API), falls back to HTML scrapingcreateProject,renameProject,trashProject,deleteProjectfindEntityByPath()uses socket.iojoinProjectfor instances withoutol-projectHTML metasrc/cli.ts--base-urland--cookie-nameoptionsconfig set-url/get-url/set-cookie-name/get-cookie-namesubcommandscreate-project,delete-project(--permanent),rename-projectcommandsdelete/renamecommands re-enabledTested with
overleaf.sid)🤖 Generated with Claude Code