Feature: Added support for remote workspaces including code-server from Coder#3201
Open
diraneyya wants to merge 21 commits intoevidence-dev:mainfrom
Open
Feature: Added support for remote workspaces including code-server from Coder#3201diraneyya wants to merge 21 commits intoevidence-dev:mainfrom
code-server from Coder#3201diraneyya wants to merge 21 commits intoevidence-dev:mainfrom
Conversation
Add relative paths to Tailwind content scanning to support local Evidence package development using the file: protocol. Maintains full compatibility with published packages. (according to Claude)
disabling the watchers for sources and queries was not enough to prevent these from reloading
This allows me to use code-server's automatic port forwarding proxy which serves the dev website at: https://hostname/proxy/port by setting the env var to '/proxy/port' and in case of using a cloudflare tunnel, configuring the tunnel to use the same path
Author
|
Example usage (from "scripts": {
"build": "evidence build",
"build:strict": "evidence build:strict",
"dev": "EVIDENCE_ALLOWED_HOST=evidence.orwa.tech EVIDENCE_BASE_PATH=/proxy/3710 evidence dev --debug --port 3710 --host 0.0.0.0 --disable-watchers sources --disable-hmr sources /",
// ...
},From the CLI's >> npx evidence dev --help
Description
launch the local evidence development environment
Usage
$ evidence dev [options]
Options
--disable-hmr Disables hot-reloading of certain features [sources,queries]
--disable-watchers Disables watching certain directories [sources,queries]
--debug Enables verbose console logs
-h, --help Displays this message |
Fixes dual-use preview function by directly opening Evidence web app by the startServer function instead of routing through markdown preview logic. (which usually receives local file paths not web app URLs)
various issues related to how external urls are generated were corrected, and the preview implentation simplified. a few things became more robust though much work is needed to make the extension truly robust, especially in remote environments such as code-server
code-server from Coder
Author
Author
|
I discovered that my frustration fixing the breadcrumbs had to do with Cloudflare's caching. Someone might argue that this use of Cloudflare tunnels exposing a dev server is both insecure, and also trying to make these tunnels do something that they are not supposed to do. This is true, and I do have to pause to think about this. I am open to a discussion about this when you the have the time in the coming weeks. But for the time being I consider this PR complete for your review. |
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
This PR enhances Evidence's development experience and proxy support with several improvements to CLI options, configuration, and developer workflows.
Key changes
--disable-hmrCLI option anddisableHmr()/enableHmr()SDK functions mainly for disabling the auto building of sources by the dev server when so desired by the user. Another CLI option,--disable-watcherswas also added which disables the watchers created by the CLI script itself.packages.
Checklist