* Merge setup and navigate functions
Whenever we navigate we probably want to make sure the editor is ready
so might as well just have one function.
* Add customizable entry and workspace directory
* Add test for state db migration
* Update Code
This contains the state migrations.
* refactor: remove folder/workspace from vsCodeCliArgs
Since we handle this in the vscode.ts route, we no longer need to pass it to VS
Code as a CLI arg since it's deprecated on that side.
* feat(vscode): redirect to folder from cli
* Update src/node/routes/vscode.ts
Co-authored-by: Asher <ash@coder.com>
* fixup!: update _: type
* fixup!: move vars to lower if block
* fixup!: share redirect block
* fixup!: mmove req.query.ew block into if
* fixup!: refactor vscode tests
* refactor: make vscode.ts logic easier to read
* fixup!: fix broken tests and clean up logic
* chore: upgrade vscode version
* fixup!: delete unnecessary if closed block
* Update src/node/routes/vscode.ts
Co-authored-by: Asher <ash@coder.com>
* fixup!: rename to FOLDER_OR_WORKSPACE_WAS_CLOSED
Co-authored-by: Asher <ash@coder.com>
* feat: github-auth flag
This will allow injecting credentials into code-server if you already
have them.
* Update Code
Contains the GitHub auth changes.
* Add e2e test for GitHub token
* Configure build jobs to cancel previous builds when new changes
are pushed to a pull request branch, and serialize builds when
running in a branch from a push event
* Reduce privileges of GitHub token for scripts workflow
Show the bundled version of Code OSS in the text-based output
for --version and --help, in addition to the JSON output
(--version --json)
Closes: #4874
* refactor(http): extract logic into constructRedirectPath
This allows us to easily test our redirect path construction logic where we get
the relative path, the query string and construct a redirect path.
By extracting this from `redirect`, we can easily test this logic in a unit
test.
I did this so we could test some logic where slashes in query strings should be
made human-friendly for users.
* feat(testing): add tests for constructRedirectPath
Co-authored-by: Asher <ash@coder.com>
Introduce helper functions for getting human- and machine-readable
version strings from the constants package, and cover it in unit
tests.
This is a first step to resolving #4874.
* Add helper for navigating the quick picker
This has problems similar to the menu except instead of closing it gets
re-created which interrupts the hover call and causes the test to fail.
Now it will keep trying just like the menu.
* Add a test for opening a file
* Add test for colliding state
* Update VS Code
This contains the colliding state fix.
* add support for imagePullSecrets
* Add doc and example value for imagePullSecrets
* simplify syntax for imagePullSecrets
Co-authored-by: Joe Previte <jjprevite@gmail.com>
* feat: add isAddressInfo helper function
* feat(update): add test for rejection UpdateProvider
* feat: add more tests for UpdateProvider
* fixup! move isAddressInfo, add .address check
* fixup! remove extra writeHead
* fixup! use -1 in redirect logic
* fixup! remove unnecessary String call
* fixup! use /latest for redirect
* fixup! use match group for regex
* fixup!: replace match/split logic
* feat: refactor npm workflows to use download-artifact
This refactors the npm workflows to use the download-artifact GitHub Action. We
had problems in the past with our download_artifact custom bash function. This
also fixes an issue where we weren't downloading the correct artifacts when
publishing beta and dev tags to npm.
* fixup: remove unused env var
* fixup! add download-artifcat to npm-brew"
* fixup! remove unnecessary code comment
* fixup! move NPM_ENVIRONMENT logic to script
* Update links in package.json
I will try checking the docs too
* docs: Update links in triage.md
* docs: Update links in npm.md
* docs: Update links in whatever files that have `cdr`
* Replace globally, thanks @bpmct!
* fix: coderer instead of coder
I should've used all three toggles in the Search/Replace tab in the GItHub.dev editor.
* Code Formatting
* Disable BROWSER env var
Right now the browser helper script does not actually work. It seems
safer to skip this until we can fix it.
* Bump to 4.0.2
* Update changelog for 4.0.2
This extracst the publish on npm workflow from ci.yaml and adds a new workflow
called `npm-beta.yaml`.
Now we have three workflows that publish to npm.
- `npm-beta.yaml` only runs on pushes and merges into `main`
- `npm-dev.yaml` only runs on PRs into `main` with approval from
code-server-reviewers team
- `npm-brew.yaml` only runs on releases
This should fix problems we had previously where anyone could open a PR and
publish under the code-server namespace. It also separates out the workflows
based on environment and when they should run.