Compare commits

...

587 commits
v4.8.3 ... main

Author SHA1 Message Date
Asher
ac7322ce56
Update changelog 2025-12-11 16:33:07 -09:00
Timon Fiedler
68ac95b84e
Add cookie-suffix flag (#7590) 2025-12-11 16:23:09 -09:00
Vladimir Mladenovic
0de7cf5679
Add configurable authorization header to marketplace API calls (#7596) 2025-12-11 16:02:42 -09:00
Olivier Benz
ea9a3a5ab2
Update Code to 1.107.0 (#7599) 2025-12-11 16:02:11 -09:00
Asher
472bf8a5fa
Remove homebrew step
It has been broken for a long time (No available formula with the name
"code-server") but it looks like they have their own bot publishing
updates anyway.
2025-12-02 13:38:27 -09:00
dependabot[bot]
eccb1eb537
chore: bump actions/setup-node from 4 to 6 (#7550) 2025-12-02 13:04:45 -09:00
Asher
f128a7ac11
Update actionlint to 1.7.9 2025-12-01 12:55:13 -09:00
Asher
80996d2e08
Add VS Code web to the bug template 2025-12-01 12:49:28 -09:00
dependabot[bot]
9819b91c74
chore: bump actions/checkout from 5 to 6 (#7585) 2025-12-01 12:47:25 -09:00
Olivier Benz
2ed1098c1e
Update Code to 1.106.3 (#7583) 2025-12-01 11:52:45 -09:00
Asher
85042e2910
Note settings change from VS Code web and Codespaces 2025-11-25 14:39:16 -09:00
Asher
904942a194
Increase build timeout 2025-11-19 14:02:53 -09:00
Olivier Benz
9a24e467b2
Update Code to 1.106.2 (#7571) 2025-11-19 12:54:38 -09:00
Olivier Benz
24a777491b
Update Code to 1.106.1 (#7570) 2025-11-19 09:09:30 -09:00
Asher
93c1f4f10c
Update macOS runner
Seems macos-13 is being deprecated.
2025-11-18 13:25:39 -09:00
Olivier Benz
339c3926c2
Update Code to 1.106.0 (#7569) 2025-11-18 11:21:41 -09:00
dependabot[bot]
897b5f13bc
chore: bump playwright and @playwright/test in /test (#7534) 2025-10-28 16:14:42 -08:00
SuitDeer
282f74d9f5
Update Node.js version in Android docs from 18 to 22 (#7542) 2025-10-28 16:14:17 -08:00
dependabot[bot]
7a2a5eb055
chore: bump eslint from 9.32.0 to 9.36.0 (#7513) 2025-10-28 16:13:34 -08:00
dependabot[bot]
af397f71e2
chore: bump globals from 16.1.0 to 16.4.0 (#7511) 2025-10-28 16:13:15 -08:00
dependabot[bot]
9d89b17fd7
chore: bump express and @types/express (#7510) 2025-10-28 16:12:45 -08:00
dependabot[bot]
35e7b09a85
chore: bump actions/checkout from 4 to 5 (#7508) 2025-10-28 16:12:00 -08:00
dependabot[bot]
7beb05d04f
chore: bump aquasecurity/trivy-action from 0.32.0 to 0.33.1 (#7507) 2025-10-28 16:11:42 -08:00
dependabot[bot]
add51d5c5b
chore: bump actions/download-artifact from 4 to 5 (#7506) 2025-10-28 16:11:23 -08:00
Andrew Baldwin
db8a41bce1
Add idle timeout (#7539) 2025-10-28 16:10:56 -08:00
Olivier Benz
811ec6c1d6
Update Code to 1.105.1 (#7531) 2025-10-17 14:32:32 -08:00
Olivier Benz
30321abfcd
Update Code to 1.105.0 (#7523) 2025-10-14 13:26:57 -08:00
Olivier Benz
cd40509fbb
Update Code to 1.104.3 (#7515) 2025-10-03 10:48:01 -08:00
Asher
9fd98d58e7
Release v4.104.1 and v4.104.2 2025-10-01 14:15:07 -08:00
Olivier Benz
b0992ddb3e
Update Code to 1.104.2 (#7503) 2025-09-26 10:36:08 -08:00
Olivier Benz
af19dedfa9
Update Code to 1.104.1 (#7495) 2025-09-19 10:01:30 -08:00
Asher
d1066af558
Release v4.104.0 2025-09-15 14:36:47 -08:00
Olivier Benz
ba774d989b
Update Code to 1.104.0 (#7488) 2025-09-12 12:41:54 -08:00
Jinvien
1a7b770f5b
Fix installing extensions from the Open VSX marketplace (#7479)
Open VSX uses a non-standard format for the `/latest` URL which must be added to the gallery config.
2025-09-11 14:26:49 -08:00
Anthony
626145cf66
Allow custom annotation to deployment (#7481) 2025-09-11 14:24:57 -08:00
Asher
b59a4f7366
Release v4.103.1 and v4.103.2 2025-08-28 11:55:58 -08:00
Olexandr88
54b33a75e0
Add Discord link to readme (#7465) 2025-08-25 10:32:11 -08:00
Olivier Benz
3c5deac16d
Update Code to 1.103.2 (#7463) 2025-08-25 09:32:20 -08:00
Olivier Benz
fbaadbcfbc
Update Code to 1.103.1 (#7459) 2025-08-15 12:31:17 -08:00
Asher
2bbb6e8cca
Release v4.103.0 2025-08-12 14:31:17 -08:00
Olivier Benz
f1236d80b9
Update Code to 1.103.0 (#7458) 2025-08-08 17:10:23 -08:00
dependabot[bot]
b27d982c67
chore: bump prettier from 3.4.2 to 3.6.2 (#7407) 2025-08-04 12:46:32 -08:00
Asher
3f23840756 Remove import from express-serve-static-core
Mostly because express-serve-static-core is an implicit dependency.  We
could make it explicit, but the type we imported from it is just an
alias for qs.ParsedQs anyway.
2025-08-04 12:26:46 -08:00
Asher
e54467fb85 Run npm audit fix 2025-08-04 12:26:46 -08:00
Asher
8f738d29f2 Remove unused supertest dependency 2025-08-04 12:26:46 -08:00
Asher
5c0ff5013f Remove direct safe-buffer dependency
We do not use it directly.
2025-08-04 12:26:46 -08:00
dependabot[bot]
8a378df6e5
chore: bump eslint-import-resolver-typescript from 3.8.3 to 4.4.4 (#7404) 2025-08-04 11:37:04 -08:00
dependabot[bot]
a7e77ce4af
chore: bump dawidd6/action-download-artifact from 10 to 11 (#7409)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 10 to 11.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v10...v11)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '11'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 11:35:59 -08:00
dependabot[bot]
794def9a77
chore: bump on-headers and compression (#7427)
Bumps [on-headers](https://github.com/jshttp/on-headers) to 1.1.0 and updates ancestor dependency [compression](https://github.com/expressjs/compression). These dependencies need to be updated together.


Updates `on-headers` from 1.0.2 to 1.1.0
- [Release notes](https://github.com/jshttp/on-headers/releases)
- [Changelog](https://github.com/jshttp/on-headers/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/on-headers/compare/v1.0.2...v1.1.0)

Updates `compression` from 1.8.0 to 1.8.1
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 11:33:51 -08:00
Asher
b5a2ce2522
Use error handler in session server (#7455) 2025-08-04 11:05:48 -08:00
dependabot[bot]
bc15fa461c
chore: bump form-data in /test (#7430)
---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 10:31:50 -08:00
dependabot[bot]
1805daed07
chore: bump aquasecurity/trivy-action from 0.31.0 to 0.32.0 (#7450)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](76071ef0d7...dc5a429b52)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 10:31:21 -08:00
Olivier Benz
6f3d0a7e5a
Update Code to 1.102.3 (#7444) 2025-07-30 11:28:34 -08:00
Asher
b1ad6ffcb9
Release v4.102.2 2025-07-24 14:08:12 -08:00
Olivier Benz
9f6d18ea26
Update Code to 1.102.2 (#7436) 2025-07-24 12:07:27 -08:00
Sheldon Tsen
fe7db4900a
Update values.yaml to better support dind (#7431) 2025-07-22 09:17:44 -08:00
Asher
84728f0b21
Release v4.102.1 2025-07-17 13:25:16 -08:00
Asher
aaf2d91a21
Deleted unused and outdated afdesign file 2025-07-17 13:25:15 -08:00
Olivier Benz
47e9d43922
Update Code to 1.102.1 (#7424) 2025-07-17 10:55:37 -08:00
Asher
f26309a23c
Release v4.102.0 2025-07-16 18:56:42 -08:00
Asher
0f9a0e8fb3
Revert escaping for i18n strings
Looks like the library already escapes, so we were getting double
escaping.
2025-07-16 18:10:11 -08:00
Asher
4029c1ec8f
Use Debian archives
Looks like buster has reached the end of its life, but updating to
bullseye would increase the glibc version.
2025-07-15 15:03:43 -08:00
dependabot[bot]
bbe1b7fecb
chore: bump i18next from 23.16.4 to 25.3.0 (#7406)
Bumps [i18next](https://github.com/i18next/i18next) from 23.16.4 to 25.3.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.16.4...v25.3.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 25.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 12:40:04 -08:00
dependabot[bot]
740a2d3aa3
chore: bump aquasecurity/trivy-action from 0.30.0 to 0.31.0 (#7408)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](6c175e9c40...76071ef0d7)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-version: 0.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 12:39:08 -08:00
Alex Strick van Linschoten
92fca0dcc3
Add language customization flag (#7374)
This allows you to customize any string (that has a translation) or add your own translations.
2025-07-15 12:38:27 -08:00
Frank Lemanschik
8b3d9b9e0a
Use native node -p to get exec path (#7420) 2025-07-15 12:08:37 -08:00
Olivier Benz
cdac5bff64
Update Code to 1.102.0 (#7418)
* Update Code to 1.102.0
* Increase maximum memory for building
2025-07-15 12:04:46 -08:00
Asher
70be9fe541
Add non-maskable PWA icons
It seems Chromium cannot use maskable icons.  It complains that the
"purpose" must contain "any", however maskable icons are not suitable
for the "any" purpose.

So, add pre-masked icons to be used for the "any" purpose.
2025-07-07 14:40:01 -08:00
Asher
729456b10d
Release v4.101.2 2025-07-07 14:20:38 -08:00
Asher
aff005e196
Update Code to 1.101.2 2025-06-25 11:43:13 -08:00
Asher
53dccbb5ca
Report if using hashed-password from config 2025-06-25 11:20:25 -08:00
Asher
1b1440ffd2
Update logo 2025-06-25 10:32:43 -08:00
Asher
c5c764d78f
Do not use module type for service worker
It seems that this causes browser to not send cookies, which can result
in a 401.

Fixes #7389.
2025-06-25 10:32:35 -08:00
Asher
3a8fbeb4da
Release v4.101.0 and v4.101.1 2025-06-25 10:32:09 -08:00
Olivier Benz
bd34cd510f
Update Code to 1.101.1 (#7383) 2025-06-20 16:08:36 -08:00
Asher
27a112c3a7
Upgrade brace-expansion sub-dependency
Courtesy of `npm audit fix`.
2025-06-16 17:00:51 -08:00
dependabot[bot]
74cc50d5e6
chore: bump qs from 6.13.0 to 6.14.0 (#7363)
Bumps [qs](https://github.com/ljharb/qs) from 6.13.0 to 6.14.0.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.13.0...v6.14.0)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 15:32:23 -08:00
dependabot[bot]
85ee441006
chore: bump typescript from 5.6.2 to 5.8.3 (#7335)
* chore: bump typescript from 5.6.2 to 5.8.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.2 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.8.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* as T

* Update JSON error

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asher <ash@coder.com>
2025-06-16 15:32:00 -08:00
dependabot[bot]
a56769b2c3
chore: bump heyhusen/archlinux-package-action from 2.2.1 to 2.4.0 (#7362)
Bumps [heyhusen/archlinux-package-action](https://github.com/heyhusen/archlinux-package-action) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/heyhusen/archlinux-package-action/releases)
- [Changelog](https://github.com/heyhusen/archlinux-package-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heyhusen/archlinux-package-action/compare/v2.2.1...v2.4.0)

---
updated-dependencies:
- dependency-name: heyhusen/archlinux-package-action
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 13:07:03 -08:00
dependabot[bot]
05d8904ec5
chore: bump dawidd6/action-download-artifact from 9 to 10 (#7361)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 9 to 10.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v9...v10)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 13:06:23 -08:00
dependabot[bot]
3669c96c9c
chore: bump @types/compression from 1.7.5 to 1.8.0 (#7364)
Bumps [@types/compression](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/compression) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/compression)

---
updated-dependencies:
- dependency-name: "@types/compression"
  dependency-version: 1.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 13:05:03 -08:00
dependabot[bot]
37357b0142
chore: bump typescript-eslint from 8.29.0 to 8.33.0 (#7365)
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.29.0 to 8.33.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.33.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 13:04:33 -08:00
Olivier Benz
405eb0f511
Update Code to 1.101.0 (#7376) 2025-06-16 13:03:47 -08:00
Jakub Domeracki
6e26dad1b1
fix: update GitHub Actions Runner images (#7379) 2025-06-16 12:04:57 -08:00
Asher
1671bf1c18
Release v4.100.3 2025-06-03 13:10:14 -08:00
Asher
1face85ad9
Sort some imports 2025-06-03 13:10:13 -08:00
Asher
9ec786b62a
Ask not to put "latest" in bug report
Maybe this will help...
2025-06-03 13:10:11 -08:00
Olivier Benz
409c64e0df
Update Code to 1.100.3 (#7367) 2025-06-03 11:06:54 -08:00
dependabot[bot]
35e78fe35b
chore: bump globals from 15.14.0 to 16.0.0 (#7333)
Bumps [globals](https://github.com/sindresorhus/globals) from 15.14.0 to 16.0.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.14.0...v16.0.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 12:09:04 -08:00
Asher
cade03e321
Release v4.100.1 and v4.100.2 2025-05-19 10:34:54 -08:00
Olivier Benz
9dd999ba78
Update Code to 1.100.2 (#7348) 2025-05-15 11:00:20 -08:00
Olivier Benz
1aca01f8d8
Update Code to 1.101 (#7347) 2025-05-13 14:07:46 -08:00
Asher
e05219d9c0
Release v4.100.0 2025-05-12 11:35:42 -08:00
Asher
d0e20d514d
Update devcontainer feature link
I think we meant to link to the feature readme rather than the general
repo readme.
2025-05-08 14:24:05 -08:00
Asher
9bd3b83ef5
Fix port parseInt error handling
parseInt returns NaN rather than throwing.
2025-05-08 14:21:17 -08:00
Olivier Benz
2c9b4e7fd5
Update Code to 1.100.0 (#7343) 2025-05-08 14:19:03 -08:00
Bartek Gatz
7af90ea623
Mention code-server devcontainer feature (#7342) 2025-05-06 14:49:38 -08:00
dependabot[bot]
8b55b5003d
chore: bump eslint from 9.23.0 to 9.25.1 (#7332)
Bumps [eslint](https://github.com/eslint/eslint) from 9.23.0 to 9.25.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.25.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.25.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 11:34:30 -08:00
dependabot[bot]
e5b8d447e5
chore: bump @types/semver from 7.5.8 to 7.7.0 2025-05-06 11:34:09 -08:00
Asher
c8257a3074 Fix repeatable flags in config
Fixes #6149.
2025-05-06 11:28:45 -08:00
Asher
0c72b20fa7 Place locale and abs-proxy-base-path in correct interfaces 2025-05-06 11:28:45 -08:00
Asher
ea2caf00ac Allow setting trusted domains for links at run-time
It can be set either:

1. In the product.json (normally the product.json is embedded during the
   build and not read at run-time).
2. With the --link-protection-trusted-domains flag.
2025-05-06 11:28:45 -08:00
Asher
3f2e3340d8
Release v4.99.4 2025-05-05 11:56:00 -08:00
Kyle Carberry
47d6d3ada5
fix: parse part in path proxy (#7337) 2025-05-02 10:08:18 -08:00
Asher
dded82bb47
Release v4.99.3 2025-04-28 14:28:51 -08:00
Asher
5d5b7b1944
Use ubuntu-latest in Docker publish step
Seems 20.04 has been removed.
2025-04-17 10:46:50 -08:00
Olivier Benz
c36b2d3edd
Update Code to 1.99.3 (#7314) 2025-04-16 14:18:00 -08:00
dependabot[bot]
3b7634c578
chore: bump @babel/runtime from 7.25.7 to 7.27.0 (#7312)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.7 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 12:03:25 -08:00
partev
ec0899a81b
Remove extra closing parentheses from docs (#7309) 2025-04-14 11:27:44 -08:00
helgehatt
bbf2e24648
Add skip-auth-preflight flag to allow OPTIONS requests through proxy (#7284) 2025-04-14 11:27:02 -08:00
dependabot[bot]
9045919d2b
chore: bump robinraju/release-downloader from 1.11 to 1.12 (#7289)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.11 to 1.12.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.11...v1.12)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 11:01:03 -08:00
dependabot[bot]
cb29e65982
chore: bump proxy-agent from 6.4.0 to 6.5.0 (#7294)
Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.5.0/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 11:00:47 -08:00
dependabot[bot]
7eb8f4be87
chore: bump @eslint/eslintrc from 3.2.0 to 3.3.1 (#7292)
Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.2.0 to 3.3.1.
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/v3.2.0...v3.3.1)

---
updated-dependencies:
- dependency-name: "@eslint/eslintrc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 10:58:54 -08:00
dependabot[bot]
cd4d1b614d
chore: bump eslint from 9.13.0 to 9.23.0 (#7291)
Bumps [eslint](https://github.com/eslint/eslint) from 9.13.0 to 9.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.13.0...v9.23.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 10:58:42 -08:00
dependabot[bot]
5051c0f9e4
chore: bump typescript-eslint from 8.12.2 to 8.29.0 (#7290)
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.12.2 to 8.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 10:58:33 -08:00
dependabot[bot]
b07335a0f1
chore: bump aquasecurity/trivy-action from 0.29.0 to 0.30.0 (#7288)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](18f2510ee3...6c175e9c40)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 10:57:40 -08:00
Asher
e3c09efcbc
Release v4.99.2 2025-04-11 11:42:17 -08:00
Olivier Benz
e0c960b30e
Update Code to 1.99.2 (#7306) 2025-04-10 11:13:29 -08:00
Asher
55b311a954
Release v4.99.1 2025-04-08 13:36:03 -08:00
Olivier Benz
0a92b76304
Update Code to 1.99.1 (#7304) 2025-04-08 10:51:30 -08:00
Asher
400ac7b8d0
Release v4.99.0 2025-04-07 16:52:11 -08:00
Olivier Benz
53722c5361
Update Code to 1.99.0 (#7300) 2025-04-04 10:22:23 -08:00
Olivier Benz
e2c489dd00 Update Code to 1.98.2 2025-03-14 10:58:50 -08:00
Olivier Benz
e1c84998d7 Update Code to 1.98.1 2025-03-12 10:30:45 -08:00
Asher
cc3c22deee
Build with newer version of Python
We are getting an issue importing __future__ from annotations in one
case and "invalid syntax" in another with `if CC :=`.

There does not seem to be a reason to maintain a separate step for the
amd64 build since the glibc version is the same.
2025-03-07 12:25:35 -09:00
Asher
727555b414
Skip e2e when only changing workflows 2025-03-07 12:13:12 -09:00
Asher
4b7bca38e2 Fix routing for Express 5 2025-03-06 15:28:07 -09:00
Asher
50c3e4bb1b Add 4.97.2 to the changelog 2025-03-06 15:28:07 -09:00
Asher
2809245dda Remove long-unused internal plugin system
We are trying to update Express to fix a vulnerability.

We would have to update the plugins as well, but since we are no longer
using the plugin system, we can just delete it instead.
2025-03-06 15:28:07 -09:00
dependabot[bot]
949aed1cef Update to Express 5 2025-03-06 15:28:07 -09:00
dependabot[bot]
db5f99dc78
chore: bump dawidd6/action-download-artifact from 8 to 9 (#7241)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 8 to 9.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v8...v9)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 11:34:15 -09:00
dependabot[bot]
fd761b4e8b
chore: bump eslint-import-resolver-typescript from 3.6.3 to 3.8.3 (#7240)
Bumps [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) from 3.6.3 to 3.8.3.
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.6.3...v3.8.3)

---
updated-dependencies:
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 11:34:04 -09:00
dependabot[bot]
611798650f
chore: bump compression from 1.7.4 to 1.8.0 (#7236)
Bumps [compression](https://github.com/expressjs/compression) from 1.7.4 to 1.8.0.
- [Release notes](https://github.com/expressjs/compression/releases)
- [Changelog](https://github.com/expressjs/compression/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/compression/compare/1.7.4...1.8.0)

---
updated-dependencies:
- dependency-name: compression
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 11:32:55 -09:00
dependabot[bot]
0db3cbe4e7
chore: bump semver from 7.6.3 to 7.7.1 (#7238)
Bumps [semver](https://github.com/npm/node-semver) from 7.6.3 to 7.7.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.3...v7.7.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 11:32:37 -09:00
Olivier Benz
31c211aded
Update Code to 1.98.0 (#7249)
* Update Code to 1.98.0

* Avoid sudo when launching caddy

It is erroring about needing a password, but also do we even need to run
this as root considering we are not binding to privileged ports?

---------

Co-authored-by: Asher <ash@coder.com>
2025-03-06 11:32:11 -09:00
Olivier Benz
6f8493ebc6
Delete user 1000 in Docker before adding coder user (#7235)
- Resolve https://github.com/coder/code-server/issues/7232
2025-03-06 11:16:42 -09:00
Olivier Benz
34b8d2ed69
Update Code to 1.97.2 (#7205) 2025-02-13 15:27:27 -09:00
Olivier Benz
3172cb16b8
Update Code to 1.97.1 (#7202) 2025-02-13 01:01:51 -09:00
SXX
9b89774ff6
Add back macOS amd64 release (#7196) 2025-02-12 15:17:19 -09:00
dependabot[bot]
626d2cf1c3
chore: bump @types/node from 20.16.10 to 20.17.17 (#7201)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.16.10 to 20.17.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 15:15:32 -09:00
dependabot[bot]
ebf2df63f5
chore: bump dawidd6/action-download-artifact from 6 to 8 (#7191)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 8.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v6...v8)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 15:12:31 -09:00
mickkael
ac65db2c88
fix replicas and existingSecret. bump to 3.25.3 (#7187) 2025-02-12 15:10:08 -09:00
bilogic
33aa21fd0f
Softer dark mode (#7178) 2025-02-12 15:08:39 -09:00
Olivier Benz
d23d1a9541
Update Code to 1.97.0 (#7199)
* Update Code to 1.97.0
* Update flake
This is to get a newer version of Node since we need > 20.18.1.
* Hijack new base path var
* Update test path matchers
2025-02-12 14:34:05 -09:00
Jan Larwig
a6fad66e5e
doc: update upstream documentation urls (#7165) 2025-02-11 11:24:31 -09:00
ChenPi11
18cd97dc12
fix: invalid ESM module path on Windows (#7162) 2025-02-11 11:16:40 -09:00
dependabot[bot]
ef713bde58
chore: bump globals from 15.10.0 to 15.14.0 (#7146)
Bumps [globals](https://github.com/sindresorhus/globals) from 15.10.0 to 15.14.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.10.0...v15.14.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:12:36 -09:00
dependabot[bot]
1c3fcf2a83
chore: bump @eslint/eslintrc from 3.1.0 to 3.2.0 (#7100)
Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: "@eslint/eslintrc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:12:14 -09:00
dependabot[bot]
96800cc521
chore: bump aquasecurity/trivy-action from 0.28.0 to 0.29.0 (#7097)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](915b19bbe7...18f2510ee3)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:11:50 -09:00
dependabot[bot]
0b7c044857
chore: bump codecov/codecov-action from 4 to 5 (#7096)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:11:21 -09:00
Asher
7cc61ab1f4
Release v4.96.4 2025-01-20 15:33:32 -09:00
Olivier Benz
b7ef8f9bd7
Update Code to 1.96.4 (#7170) 2025-01-17 13:46:30 -09:00
Olivier Benz
b60985e53b
Update Code to 1.96.3 (#7164) 2025-01-13 11:37:17 -09:00
Jérôme Petazzoni
b18a647d0a
Update Alpine instructions (#7156)
While trying to set up code-server on Alpine, I ran into build errors. To solve them, I had to add Kerberos development libs. Also, it looks like npm config doesn't work in recent version of Node and doesn't seem to be necessary. These instructions were tested in the Docker `node:20-alpine` image.
2025-01-13 11:18:53 -09:00
Asher
f4f02655a1
Release v4.96.2 2024-12-20 14:52:05 -09:00
Olivier Benz
08cbdfbdf1
Update Code to 1.96.2 (#7133) 2024-12-19 12:19:11 -09:00
Asher
339a448471
Release v4.96.1 2024-12-18 14:25:18 -09:00
Asher
272e28abc6
Set GITHUB_TOKEN on macOS job
Trying to see if this will help with the 403s trying to download
ripgrep.
2024-12-18 13:42:37 -09:00
Asher
c187e5e782
Release v4.95.3 2024-12-18 13:42:36 -09:00
qupig
318c582043
style: add dark theme color scheme (#7118)
hen the user's browser does not support `light-dark`, fall back to the light theme color scheme.
2024-12-18 12:37:53 -09:00
Olivier Benz
db311e6ff5
Update Code to 1.96.1 (#7130) 2024-12-18 11:35:24 -09:00
Olivier Benz
ccd2a30dfc
Update Code to 1.96.0 (#7112) 2024-12-13 09:13:59 -09:00
Asher
99e1f63d76
chore: pin prettier to version 3.4.2 2024-12-13 09:05:30 -09:00
qupig
25c2183be0 ci: fix prettier check job
Use prettier version specified in `package.json` instead of fixed versions from third-party workflows.
2024-12-12 20:13:22 +00:00
qupig
8f00c2e289 chore: ignore prettier 3.4.2 code format commit 2024-12-12 19:01:09 +00:00
qupig
9b0340a092 chore: format code to prettier 3.4.2 2024-12-12 18:44:10 +00:00
qupig
ccded68cd4 chore: update and fixed prettier to 3.4.2 2024-12-12 18:41:49 +00:00
Theodore Herzfeld
4af06de4c3
Fix extraInitContainers conditional (#7085) 2024-11-22 22:38:56 +00:00
Asher
b0c935a6e0
Fix v4.59 changelog links 2024-11-15 10:32:14 -09:00
Olivier Benz
912a7a9d89
Update Code to 1.95.3 (#7078) 2024-11-15 10:30:56 -09:00
Asher
9a5726f250
Release v4.95.2 and v4.95.1 2024-11-12 09:35:12 -09:00
dependabot[bot]
fc97e248c3
chore: bump aquasecurity/trivy-action from 0.24.0 to 0.28.0 (#7060)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.24.0 to 0.28.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](6e7b7d1fd3...915b19bbe7)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 10:12:29 -09:00
Olivier Benz
fff3b896de
Update Code to 1.95.2 (#7072) 2024-11-08 10:12:02 -09:00
Asher
578b5f22c4
Remove AUR dependency on npm
It pulls a release from GitHub, not npm.
2024-11-06 13:00:40 -09:00
Asher
2c1981bfb9
Fix npm publish
Unlike yarn publish, there is no --non-interactive and you cannot
specify a directory, you have to move into it first.
2024-11-06 12:57:57 -09:00
Asher
344df3875f
Fix cli being ran twice
server-main.js runs itself outside a code-server context, which is
determined using the CODE_SERVER_PARENT_PID environment variable.  This
is set by the wrapper, but there is no wrapper when running the
cli (only for the server), so this resulting in the cli running
twice (one self-run on initial import, again when we run spawnCli).

This might fix https://github.com/coder/code-server/issues/7042
2024-11-04 14:59:07 -09:00
Asher
952523f288
Revert accidental newline removal in patch
It makes the patch needlessly noisy.  I am not sure how the line got
deleted in the first place.
2024-11-01 13:03:12 -08:00
Asher
8789dec68b
Update Code version in changelog
We ended up with 1.95.1, not 1.95.0.
2024-11-01 13:01:08 -08:00
dependabot[bot]
b7398bad11
chore: bump i18next from 23.15.1 to 23.16.4 (#7061)
Bumps [i18next](https://github.com/i18next/i18next) from 23.15.1 to 23.16.4.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.15.1...v23.16.4)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 12:37:40 -08:00
dependabot[bot]
8194dbf5bc
chore: bump typescript-eslint from 8.8.0 to 8.12.2 (#7062)
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.8.0 to 8.12.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.12.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 12:37:24 -08:00
dependabot[bot]
2ade2afdc7
chore: bump eslint from 9.12.0 to 9.13.0 (#7063)
Bumps [eslint](https://github.com/eslint/eslint) from 9.12.0 to 9.13.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.12.0...v9.13.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 12:37:09 -08:00
Asher
494a3e0c2b
Update Code to 1.95.1 (#7059)
* Update Code to 1.95.1
* Update Node to 20.18.0
* Update build.yaml to use Ubuntu 22.04
  This is to resolve a gcc error.  Might have to address
  the release step later as well.
* Fix --stdin-to-clipboard
  With the switch to esm, the fs require is failing.  fs is already
  imported, so we can just use it anyway.
* Fix mangled exports
* Update CSP hashes
2024-11-01 12:35:53 -08:00
xfl12345
dd2e9fce27
Fix user rename when restarting container (#7012) 2024-10-18 14:57:08 -08:00
Asher
bea906f90b
Install python before npm ci 2024-10-18 11:36:40 -08:00
Asher
15752526bd
Install python3 in cross-compile container
Unsure why this is suddenly missing.
2024-10-18 10:38:44 -08:00
Asher
7c298653f1
Fix import of server-main.js from main
Neglected to update this import when fixing the other.
2024-10-18 10:07:05 -08:00
Olivier Benz
fc6064dcd3
Update Code to 1.94.2 (#7026)
* Update Code to 1.94.2

* Convert from yarn to npm

This is to match VS Code.  We were already partially using npm for the
releases so this is some nice alignment.

* Update caniuse-lite

This was complaining on every unit test.

* Update eslint

I was having a bunch of dependency conflicts and eslint seemed to be the
culprit so I just removed it and set it up again, since it seems things
have changed quite a bit.

* Update test dependencies

I was getting oom when running the unit tests...updating seems to work.

* Remove package.json `scripts` property in release

The new pre-install script was being included, which is dev-only.

This was always the intent; did not realize jq's merge was recursive.

* Remove jest and devDependencies in release as well

* Update test extension dependencies

This appears to be conflicting with the root dependencies.

* Fix playwright exec

npm does not let you run binaries like yarn does, as far as I know.

* Fix import of server-main.js

* Fix several tests by waiting for selectors
2024-10-17 20:32:21 -08:00
Asher
6b4b3e0c89
v4.93.1 2024-10-04 15:31:14 -08:00
dependabot[bot]
13d4cd6489
chore: bump @types/node from 20.14.2 to 20.16.10 (#7020)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.2 to 20.16.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-03 00:13:46 +00:00
dependabot[bot]
a0c2780c50
chore: bump typescript from 5.5.2 to 5.6.2 (#7021)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.2 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.2...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-03 00:09:25 +00:00
dependabot[bot]
aea7ba2a51
chore: bump i18next from 23.14.0 to 23.15.1 (#7019)
Bumps [i18next](https://github.com/i18next/i18next) from 23.14.0 to 23.15.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.14.0...v23.15.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 16:05:13 -08:00
Asher
69df01185c
Revert "chore: bump softprops/action-gh-release from 1 to 2 (#6740)"
This reverts commit 1abb2ee567.

Trying to see if this fixes the release making separate drafts instead
of a single draft.
2024-09-19 12:08:43 -08:00
Olivier Benz
3542bd157b
Update Code to 1.93.1 (#6984) 2024-09-19 02:10:46 -08:00
dependabot[bot]
50c6abf3a8
chore: bump micromatch from 4.0.4 to 4.0.8 in /test (#6963)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 10:25:50 -08:00
Yuchen Shi
9286e0002d
Fix install.sh refusing to download macos-arm64 standalone. (#6968)
* Fix install.sh refusing to download macos-arm64 standalone.

* Update tests for macos-arm64 and amd64.
2024-09-03 10:25:06 -08:00
dependabot[bot]
90f8135c68
chore: bump tj-actions/changed-files from 44 to 45 (#6972)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 44 to 45.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 10:24:27 -08:00
dependabot[bot]
8dbfe2273b
chore: bump i18next from 23.12.2 to 23.14.0 (#6974)
Bumps [i18next](https://github.com/i18next/i18next) from 23.12.2 to 23.14.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.12.2...v23.14.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 10:22:35 -08:00
dependabot[bot]
e05a3f4ce2
chore: bump qs from 6.12.1 to 6.13.0 (#6973)
Bumps [qs](https://github.com/ljharb/qs) from 6.12.1 to 6.13.0.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.12.1...v6.13.0)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 10:21:42 -08:00
dependabot[bot]
e05d88007f
chore: bump ws and @types/ws (#6925)
Bumps [ws](https://github.com/websockets/ws) and [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws). These dependencies needed to be updated together.

Updates `ws` from 8.17.1 to 8.18.0
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.1...8.18.0)

Updates `@types/ws` from 8.5.10 to 8.5.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 22:40:31 +00:00
dependabot[bot]
534a1866e5
chore: bump micromatch from 4.0.5 to 4.0.8 (#6962)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 21:53:43 +00:00
dependabot[bot]
907e583309
chore: bump i18next from 23.11.3 to 23.12.2 (#6926)
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.3 to 23.12.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.3...v23.12.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 13:09:42 -08:00
dependabot[bot]
639a005867
chore: bump eslint-plugin-prettier from 5.1.3 to 5.2.1 (#6927)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.3 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 13:09:24 -08:00
Rafael Ferreira
4a703893b0
Add --abs-proxy-base-path for when code-server is not at the root (#6958) 2024-08-26 20:19:55 +00:00
Asher
39ce82a44d
Add 4.92.2 release date 2024-08-19 15:30:25 -08:00
Asher
7f893234ab
Update Helm version 2024-08-19 15:30:21 -08:00
Asher
de65bfc947
Update changelog with correct Code version 2024-08-16 01:50:10 -08:00
Asher
34c6751bf8
Update VS Code to 1.92.2 (#6941)
* Update VS Code to 1.92.2

* Use server-main.js to load VS Code

It looks like the bootstrap files are now bundled so we can no longer
require them.  We could make them included again, but maybe it is better
to go through the main entrypoint anyway because it includes some nls
stuff which is maybe necessary.

This also fixes what looks like a bug where we could create two servers
if two requests came in.  I am not sure what the practical consequences
of that would be, but it will no longer do that.

* Drop es2020 patch

Unfortunately, VS Code will not load with this.  It seems to be because
`this` is being used in static properties, and it becomes `void 0` for
some reason under the es2020 target.  For example:

  static PREFIX_BY_CATEGORY = `${this.PREFIX}${this.SCOPE_PREFIX}`;

becomes

  AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${(void 0).PREFIX}${(void 0).SCOPE_PREFIX}`;

Which, obviously, will not work.

Older versions of Safari (and maybe other browsers) are likely affected.

* Fix display language

* Update Playwright

I think maybe because of the dropped es2020 patch that Webkit is now
failing because it is too old.

* Do not wait for networkidle in e2e tests

I am not sure what is going on but some tests on Webkit are timing out
and it seems the page is loaded but something is still trying to
download.  Not good, but for now try to at least get the tests passing.
2024-08-15 21:33:21 -08:00
Asher
461d4cba59
Update script tests
Installing from npm now tells you the version.
2024-08-01 11:31:44 -08:00
Asher
31bc0c6b1a
Fix dangling links in standalone release
The fix will now run both to the GitHub and npm release instead of only
for the npm releases.

Closes #5157.
2024-07-25 09:16:15 -08:00
Asher
0f9436e7b9
Remove Ranger for now
- We have a labeling bot that is marking issues as upstream (so far
  correctly) now Ranger is closing them right away and it felt too
  aggressive to me.
- It keeps posting its comment twice.  Not sure how to fix that.
2024-07-19 10:51:31 -08:00
Olivier Benz
1962f48b7f
Update Code to 1.91.1 (#6900) 2024-07-15 09:57:32 -08:00
Asher
6467c60166
Remove section about VS Code Remote
It has nothing to do with code-server and will not connect to or use
code-server in any way.

Closes #5613.
2024-07-12 17:02:40 -08:00
Asher
d9812a5970
Use version in npm install
Closes #4832.
2024-07-12 16:23:29 -08:00
Asher
f2c326147d
Fix login page assets over proxy domain 2024-07-12 15:06:44 -08:00
Asher
37a72ce63b
Enforce yarn version
Closes https://github.com/coder/code-server/issues/6695.
2024-07-12 14:49:10 -08:00
Asher
6a14070664
Add faq entry about web views
Closes #5671.
2024-07-11 11:52:23 -08:00
Asher
a9eb923790
Remove unused audit-ci dependency
There is a `yarn ci` script which was using audit-ci but this does not
appear to be called anywhere.

The security worflow uses `yarn audit` and `npm audit` which seem fine
enough anyway.
2024-07-10 13:23:24 -08:00
dependabot[bot]
2b33ca8a3f
chore: bump aquasecurity/trivy-action from 0.21.0 to 0.24.0 (#6894)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.21.0 to 0.24.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](fd25fed697...6e7b7d1fd3)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:10:01 -08:00
dependabot[bot]
8accfcc8ec
chore: bump prettier from 3.2.4 to 3.3.2 (#6878)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.4 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.4...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:09:41 -08:00
dependabot[bot]
2e098a2b90
chore: bump typescript from 5.4.3 to 5.5.2 (#6873)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:09:11 -08:00
dependabot[bot]
97bcc3b934
chore: bump robinraju/release-downloader from 1.10 to 1.11 (#6875)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.10 to 1.11.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.10...v1.11)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 13:08:52 -08:00
dependabot[bot]
c86c4e8bb6
chore: bump dawidd6/action-download-artifact from 3 to 6 (#6876)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 19:26:02 +00:00
Muhammad Atif Ali
3031f8599c
ci: updates actionlint to 1.7.1 version (#6887) 2024-07-10 18:39:03 +00:00
Asher
d83ba4b46f
Release v4.91.0 2024-07-09 23:23:16 -08:00
Asher
fb3e3e1546
Log custom extensions gallery 2024-07-09 12:47:24 -08:00
Asher
901191e0f9
Update changelog 2024-07-08 17:51:47 -08:00
Asher
dd79446b00
Remove display language test
It is not working.  I test this manually anyway so for now just remove
the test, but I think maybe we have to watch for code-server to extract
the language files, and then reload the page, or maybe we have to
install the language from the UI.

Ideally we can drop our patch in the future anyway...
2024-07-08 17:50:08 -08:00
Asher
090e0fad76
Update to Code 1.91.0 (#6885) 2024-07-08 14:10:34 -08:00
Asher
6514ba4bf3
Update contributing docs 2024-07-03 13:33:02 -08:00
dependabot[bot]
250281d071
chore: bump braces from 3.0.2 to 3.0.3 (#6843)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:28:34 -08:00
dependabot[bot]
93f31e6a74
chore: bump ws from 7.5.6 to 7.5.10 in /test (#6845)
Bumps [ws](https://github.com/websockets/ws) from 7.5.6 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.6...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:27:58 -08:00
dependabot[bot]
603e467f38
chore: bump ws from 8.17.0 to 8.17.1 (#6851)
Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 13:27:36 -08:00
Asher
c7d88abf9f
v4.90.3 2024-06-21 11:01:16 -08:00
Asher
26c763485b
Update JSON parse error matcher
Looks like this text changed?
2024-06-21 09:52:42 -08:00
Asher
d431c9cd9d
Fix log file path
The first argument is a file name, not a path.  When the log gets
rotated it prepends the date which ends up creating a path in the
current working directory.
2024-06-21 09:47:44 -08:00
Olivier Benz
c26ac35b25
Update Code to 1.90.2 (#6853) 2024-06-20 14:14:21 -08:00
dependabot[bot]
d449729e18
chore: bump braces from 3.0.2 to 3.0.3 in /test (#6844)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 10:43:23 -08:00
Asher
ed069310a4
v4.90.2 2024-06-17 10:42:09 -08:00
Olivier Benz
dce1d6e172
Update Code to 1.90.1 (#6840) 2024-06-14 11:31:58 -08:00
Asher
a73549539b
Cache unchanging telemetry data
Might make sense to cache the rest as well, and evict from the cache
periodically.  For now this is enough to fix a hang I often see in our
deployment of Coder.  Might only be surfacing now because new telemetry
calls were added to startup.
2024-06-12 15:09:45 -08:00
Asher
e7ca9cd6ac
Fix changelog heading indentation 2024-06-12 13:05:41 -08:00
Asher
9da9f2029c
v4.90.0 2024-06-12 13:03:51 -08:00
Asher
0c802ba165
Remove node-gyp install (#6831)
Seems to install fine without it now.
2024-06-08 20:07:51 -08:00
Asher
1bd2b9cf08
Fix segfault in CI (#6830)
Setting DISABLE_V8_COMPILE_CACHE=1 seems to fix it.
2024-06-08 20:07:24 -08:00
Asher
3b467dec95
Update changelog for 1.90.0 2024-06-06 15:05:12 -08:00
Olivier Benz
6d9530aa6b
Update Code to 1.90.0 (#6824)
Additionally:

- Update Node to 20.11.1
- Update documentation
- Disable extension signature verification

This works around an issue where the Open VSX is not returning the
expected zip.  Verification is skipped later anyway because
@vscode/vsce-sign is missing in the OSS version.
2024-06-06 15:02:13 -08:00
dependabot[bot]
fc47b4f1c5
chore: bump aquasecurity/trivy-action from 0.19.0 to 0.21.0 (#6819)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.19.0 to 0.21.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d710430a67...fd25fed697)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 10:44:54 -08:00
dependabot[bot]
479eb5bfa5
chore: bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 (#6818)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 10:44:33 -08:00
Paweł Wiśniewski
095c072a43
Add Ubuntu Noble image (#6812) 2024-05-24 20:02:32 +00:00
XiaoZhang
4ff509d8db
Allow emptyDir type volume mounts (#6803) 2024-05-22 10:52:42 -08:00
Simon Merschjohann
efc6edf536
Support copying to clipboard from CLI (#6807)
Use --stdin-to-clipboard or -c to pass stdin to clipboard
2024-05-21 10:39:36 -08:00
Asher
3b6ad479a6
Release v4.89.1 and v4.89.0 2024-05-14 10:17:35 -08:00
Olivier Benz
effc6e95b4
Update Code to 1.89.1 (#6796) 2024-05-13 10:41:25 -08:00
Asher
ab4b36f573
Fix setuptools install on macOS
This is erroring now with "This environment is externally managed".
2024-05-07 13:41:21 -08:00
Asher
0f4791b816
Add remote machine ID to telemetry 2024-05-07 11:35:01 -08:00
Asher
97653152dd
Flush telemetry appender on dispose 2024-05-06 19:36:52 -08:00
Asher
2633bca30b
Move telemetry endpoint to product service
This will let us use it in the client.
2024-05-06 18:39:39 -08:00
Asher
125a972c81
Do not add extra args in toCodeArgs
It should only convert the args that are passed in.
2024-05-06 18:39:22 -08:00
Asher
7050002fb6
Add missing semicolon 2024-05-06 18:39:21 -08:00
Asher
4563517d90
Add isContainer property to telemetry 2024-05-06 18:37:41 -08:00
dependabot[bot]
b8cdab2184
chore: bump ws and @types/ws (#6775)
Bumps [ws](https://github.com/websockets/ws) and [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws). These dependencies needed to be updated together.

Updates `ws` from 8.14.2 to 8.17.0
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.14.2...8.17.0)

Updates `@types/ws` from 8.5.5 to 8.5.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:49 -08:00
dependabot[bot]
264e023ab8
chore: bump eslint from 8.53.0 to 8.57.0 (#6776)
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:30 -08:00
dependabot[bot]
ea815df22d
chore: bump semver and @types/semver (#6777)
Bumps [semver](https://github.com/npm/node-semver) and [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver). These dependencies needed to be updated together.

Updates `semver` from 7.5.4 to 7.6.0
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

Updates `@types/semver` from 7.5.2 to 7.5.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:17:15 -08:00
dependabot[bot]
6757907c8b
chore: bump i18next from 23.10.1 to 23.11.3 (#6778)
Bumps [i18next](https://github.com/i18next/i18next) from 23.10.1 to 23.11.3.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.10.1...v23.11.3)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:54 -08:00
dependabot[bot]
2adb215d03
chore: bump robinraju/release-downloader from 1.9 to 1.10 (#6779)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.9 to 1.10.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.9...v1.10)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:27 -08:00
dependabot[bot]
1a7265b392
chore: bump azure/setup-helm from 3.5 to 4 (#6780)
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3.5 to 4.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/v3.5...v4)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 14:16:06 -08:00
Olivier Benz
e6dd7fe228
Update Code to 1.89.0 (#6783) 2024-05-06 14:14:53 -08:00
Asher
fb2afbd9d6
Handle undefined body
In the latest Express it seems the body is undefined when no data is
passed (instead of being empty).
2024-04-16 11:29:12 -08:00
Asher
3d8d544f89
Refactor VS Code routes to match others 2024-04-16 11:00:33 -08:00
Asher
323a1f3234
Only require unsafe-perm if you are root
Remove it from the docs, as the error message should be sufficient and
it seems weird to recommend unsafe-perm by default.
2024-04-16 10:48:46 -08:00
Asher
b8d830b826
Update path syntax for Express
It seems that * matches a literal * now, so we have to use a regular
expression.

Parentheses around a parameter no longer works (it causes it to match on
the parameter name literally) and I am not sure why we had it anyway as
it had no effect previously.

Matching with a leading / does not appear to work either, but we do not
need the leading / anyway since the proxy logic was changed to use the
whole path.  Consequently it will never be / anymore from what I can
tell but I left that check in just in case.  I turned it into a named
parameter as well, because that seems better.
2024-04-16 09:54:33 -08:00
Asher
417c1f36cb
Release 4.23.1 2024-04-15 16:37:01 -08:00
Asher
3eb9cf7a08
Update express and qs
It does not appear we have to pin qs anymore.
2024-04-15 16:32:52 -08:00
dependabot[bot]
f81fe3030a
chore: bump tar from 6.2.0 to 6.2.1 (#6753)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 16:25:27 -08:00
dependabot[bot]
4bc9956537
chore: bump tar from 6.1.11 to 6.2.1 in /test (#6752)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.11 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.11...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 16:25:04 -08:00
Olivier Benz
9a28bc29db
Update Code to 1.88.1 (#6754)
* Update Code to 1.88.1
* Install node-gyp

---------

Co-authored-by: Asher <ash@coder.com>
2024-04-15 15:00:21 -08:00
Asher
deebb21345
Release 4.23.0 2024-04-08 13:24:39 -08:00
Asher
73e615da4e
Fix extension installation test
This throws now that the exit is non-zero.
2024-04-05 17:39:21 -08:00
Asher
bec6ab2678
Fix masking exit code
Addresses the part of #6367 that we can fix.
2024-04-05 16:31:58 -08:00
dependabot[bot]
ebd79ed958
chore: bump aquasecurity/trivy-action from 0.18.0 to 0.19.0 (#6739)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](062f259268...d710430a67)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:24:18 -08:00
dependabot[bot]
30d343c0bd
chore: bump follow-redirects from 1.15.4 to 1.15.6 (#6725)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:50 -08:00
dependabot[bot]
71780f6f00
chore: bump typescript from 5.3.3 to 5.4.3 (#6736)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:30 -08:00
dependabot[bot]
93f9dfcb1d
chore: bump i18next from 23.8.2 to 23.10.1 (#6738)
Bumps [i18next](https://github.com/i18next/i18next) from 23.8.2 to 23.10.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.8.2...v23.10.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:22:07 -08:00
dependabot[bot]
1abb2ee567
chore: bump softprops/action-gh-release from 1 to 2 (#6740)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:21:48 -08:00
dependabot[bot]
1c5bfeeb99
chore: bump tj-actions/changed-files from 42 to 44 (#6741)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42 to 44.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42...v44)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:21:27 -08:00
Puneeth Rai
bae68548d0
Update Node to 18.18.2 (#6676) 2024-04-05 14:21:01 -08:00
Olivier Benz
0cca7c67a4
Update Code to 1.88.0 (#6745) 2024-04-05 14:20:28 -08:00
Asher
45e96ec3b0
Shorten bug dropdown descriptions 2024-03-14 12:19:13 -08:00
Asher
66364429e3
Release 4.22.1 2024-03-14 12:16:35 -08:00
Asher
0e384d5442
Tweak issue templates
- Remove the redundant title prefix.
- Remove outdated assignees.
- Improve reproduction step description (trying to get folks to submit
  more specific/detailed reproductions).
- Render logs with shell (not sure if this actually changes anything).
- Use dropdowns for testing in VS Code and Codespaces.  I think the
  existing checkboxes are still confusing so hopefully this sorts it.
2024-03-14 12:16:33 -08:00
Olivier Benz
760d1318e9
Update Code to 1.87.2 (#6721) 2024-03-12 19:30:02 +00:00
Asher
c65b1f2870
Continue release drafting on Codecov failure 2024-03-12 09:41:21 -08:00
Asher
132f7d1470
Default keepAlive to true for proxy agent 2024-03-11 14:13:21 -08:00
Olivier Benz
8c65ff8d0d
Update Code to 1.87.1 (#6714) 2024-03-11 12:51:08 -08:00
dependabot[bot]
f9c0624f85
chore: bump @typescript-eslint/eslint-plugin from 6.20.0 to 6.21.0 (#6701)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.20.0 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 11:04:03 -09:00
dependabot[bot]
4c4c566d86
chore: bump proxy-agent from 6.3.1 to 6.4.0 (#6702)
Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.4.0/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 11:03:16 -09:00
dependabot[bot]
720d14db3e
chore: bump rotating-file-stream from 3.1.1 to 3.2.1 (#6704)
Bumps [rotating-file-stream](https://github.com/iccicci/rotating-file-stream) from 3.1.1 to 3.2.1.
- [Changelog](https://github.com/iccicci/rotating-file-stream/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iccicci/rotating-file-stream/compare/v3.1.1...v3.2.1)

---
updated-dependencies:
- dependency-name: rotating-file-stream
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:32:06 -09:00
dependabot[bot]
5453d02872
chore: bump aquasecurity/trivy-action from 0.16.1 to 0.18.0 (#6705)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.1 to 0.18.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d43c1f16c0...062f259268)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:20:04 -09:00
dependabot[bot]
9f2c776a77
chore: bump prettier-plugin-sh from 0.13.1 to 0.14.0 (#6700)
Bumps [prettier-plugin-sh](https://github.com/un-ts/prettier) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/un-ts/prettier/releases)
- [Changelog](https://github.com/un-ts/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/un-ts/prettier/compare/prettier-plugin-sh@0.13.1...prettier-plugin-sh@0.14.0)

---
updated-dependencies:
- dependency-name: prettier-plugin-sh
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:18:02 -09:00
dependabot[bot]
66c7f7d8b1
chore: bump @typescript-eslint/parser from 6.17.0 to 6.21.0 (#6703)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.17.0 to 6.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:17:25 -09:00
dependabot[bot]
107a3fd410
chore: bump codecov/codecov-action from 3 to 4 (#6706)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 10:15:42 -09:00
Asher
56b5992280
Pin Arch Linux action version
We are still getting the old one, I think?
2024-03-06 14:10:57 -09:00
Asher
275c130845
Update Arch Linux action username
This broke due to the username being changed, and GitHub does not appear
to put any redirects in place.
2024-03-06 14:04:32 -09:00
Asher
223ecf7c30
Release v4.22.0 2024-03-04 06:52:54 -09:00
Olivier Benz
e5d145fdf3
Update Code to 1.87.0 (#6697)
Fixes https://github.com/coder/code-server/issues/6694
2024-02-29 12:30:03 -09:00
Asher
2248c8bdd4
Correct changelog link 2024-02-28 14:56:38 -09:00
Asher
d2dfeedb2f
Release v4.21.2 2024-02-28 14:22:31 -09:00
Asher
460a4564c3
Revert "chore: bump codecov/codecov-action from 3 to 4 (#6652)"
This reverts commit 63beaaabd7.

It appears to be no longer capable of finding git.
2024-02-28 14:04:55 -09:00
Muhammad Atif Ali
963fcfc3a5
docs: add coder module as an installation method (#6692)
Co-authored-by: Asher <ash@coder.com>
2024-02-28 22:06:49 +00:00
dependabot[bot]
75611411b4
chore: bump ip from 1.1.5 to 1.1.9 in /test (#6682)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.5...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 13:50:59 -09:00
dependabot[bot]
1e5666b68e
chore: bump ip from 1.1.8 to 1.1.9 (#6681)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 13:50:49 -09:00
Olivier Benz
9d70cbc8b2
Update Code to 1.86.2 (#6677) 2024-02-15 22:12:56 +00:00
ckesc
853ab407de
Update FAQ: clarify about hashed pass and compose file (#6671) 2024-02-12 22:11:45 +00:00
Asher
c31d2a0e37
Release v4.21.1 2024-02-09 13:02:44 -09:00
Dmitry Sharshakov
45164bf749
Use rpm to install in Fedora image (#6670)
Dnf will pull caches if invoked for local file install and is also unnecessary
2024-02-09 12:56:57 -09:00
Dmitry Sharshakov
a2d35ad815
docker: add Fedora 39 and openSUSE Tumbleweed based images (#6669) 2024-02-08 12:31:50 -09:00
Olivier Benz
76e6f75758
Update Code to 1.86.1 (#6668) 2024-02-08 11:10:43 -09:00
Asher
413c47a86d
Update Node to 18.17.1
For https://github.com/coder/code-server/issues/6666.
2024-02-07 21:11:27 -09:00
Asher
5b62943216
Release v4.21.0 2024-02-05 09:41:51 -09:00
dependabot[bot]
84ca27278b
chore: bump eslint-config-prettier from 9.0.0 to 9.1.0 (#6648)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.0.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-02 02:14:33 +00:00
dependabot[bot]
1471a152ff
chore: bump i18next from 23.7.6 to 23.8.2 (#6645)
Bumps [i18next](https://github.com/i18next/i18next) from 23.7.6 to 23.8.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.7.6...v23.8.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:31 -09:00
dependabot[bot]
6adbfc461b
chore: bump @typescript-eslint/eslint-plugin from 6.16.0 to 6.20.0 (#6646)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.16.0 to 6.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.20.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:14 -09:00
dependabot[bot]
2a55212027
chore: bump prettier from 3.1.1 to 3.2.4 (#6647)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:39:00 -09:00
dependabot[bot]
b63fda4bf7
chore: bump eslint-plugin-prettier from 5.0.0 to 5.1.3 (#6649)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.0.0 to 5.1.3.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.0.0...v5.1.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:38:45 -09:00
dependabot[bot]
ab17495e3a
chore: bump actions/cache from 3 to 4 (#6650)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:38:25 -09:00
dependabot[bot]
53b0fda510
chore: bump robinraju/release-downloader from 1.8 to 1.9 (#6651)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.8 to 1.9.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.8...v1.9)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:57 -09:00
dependabot[bot]
63beaaabd7
chore: bump codecov/codecov-action from 3 to 4 (#6652)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:42 -09:00
dependabot[bot]
2db0184c4a
chore: bump github/codeql-action from 2 to 3 (#6653)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:33 -09:00
dependabot[bot]
dd9cefab66
chore: bump tj-actions/changed-files from 41 to 42 (#6654)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 42.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v41...v42)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 16:37:09 -09:00
Olivier Benz
1d774d01bf
Update Code to 1.86.0 (#6655) 2024-02-01 16:36:47 -09:00
Asher
d6ef385de2
Release v4.20.1 2024-01-22 08:34:02 -09:00
Olivier Benz
e76afa4a2b
Update Code to 1.85.2 (#6631) 2024-01-19 22:30:16 +00:00
Asher
fdb46d3fe5
Exit with 1 when VS Code CLI errors
Addresses part of #6367.  The script bundled with VS Code still has the
same problem but it would be better to fix that one upstream.
2024-01-11 12:46:09 -09:00
Asher
d49b3bf159
Fix query string being double-encoding over path proxy
Instead of trying to piece together the original URL and re-encode what
needs to be re-encoded, strip out the base from the original URL.

Fixes #6307.
2024-01-11 12:26:06 -09:00
dependabot[bot]
e87499c301
chore: bump follow-redirects from 1.15.3 to 1.15.4 (#6624)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 02:32:57 +00:00
dependabot[bot]
cc68c0fb0f
chore: bump @typescript-eslint/parser from 6.9.1 to 6.17.0 (#6622)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.1 to 6.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.17.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:46:28 -09:00
dependabot[bot]
749e105cd9
chore: bump @types/node from 18.18.1 to 18.19.4 (#6613)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.18.1 to 18.19.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:33:10 -09:00
dependabot[bot]
94f759a53c
chore: bump actions/download-artifact from 3 to 4 (#6609)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:32:33 -09:00
dependabot[bot]
2786f60752
chore: bump actions/upload-artifact from 3 to 4 (#6610)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:32:10 -09:00
dependabot[bot]
aea28cb499
chore: bump dawidd6/action-download-artifact from 2 to 3 (#6612)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2 to 3.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:29:50 -09:00
dependabot[bot]
2cabe799e2
chore: bump @typescript-eslint/parser from 6.9.1 to 6.16.0 (#6614)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.9.1 to 6.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:30 -09:00
dependabot[bot]
c1be39abc7
chore: bump prettier from 3.0.3 to 3.1.1 (#6615)
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.1.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:15 -09:00
dependabot[bot]
21e798ccdf
chore: bump aquasecurity/trivy-action from 0.14.0 to 0.16.1 (#6621)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.14.0 to 0.16.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](2b6a709cf9...d43c1f16c0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:28:00 -09:00
dependabot[bot]
871030e997
chore: bump typescript from 5.2.2 to 5.3.3 (#6616)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:42 -09:00
dependabot[bot]
a143dcf111
chore: bump @typescript-eslint/eslint-plugin from 6.11.0 to 6.16.0 (#6617)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.11.0 to 6.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:25 -09:00
dependabot[bot]
5214555683
chore: bump tj-actions/changed-files from 40 to 41 in /.github/workflows (#6618)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 13:27:05 -09:00
Merith
ff0fcf6cde
Fix non-functional Docker Hub link (#6595)
registry.hub.docker.com leads to an blank white page
removing "registry' from the URL fixes it and takes the user to the correct page
2024-01-05 11:22:33 -09:00
Asher
07901026a0
Release v4.20.0 2023-12-21 12:53:25 -09:00
Asher
d0215eca88
Tweak bug report template
These checkboxes keep getting checked despite the submitter using an
insecure context or not having tested upstream.  I think two things are
at play here:

1. Folks might be interpreting "cannot reproduce" as "did not
   reproduce" or "did not have time to reproduce".
2. The checkboxes are required to submit the issue so folks might be
   marking them just so they can get their issue submitted; maybe they
   are not even reading the checkboxes and are just seeing the error
   that they need to be marked and blindly marking them because while
   in some cases folks will add "I had to check this but it is not
   true", usually they say nothing.

In any case, hopefully these changes make the checkboxes more accurate,
and then if they are unchecked we can ask them to go reproduce in VS
Code or use a secure context or whatever the case may be.
2023-12-18 13:56:35 -09:00
Dov Benyomin Sohacheski
d6c5a4af9c
Add Debian bookworm config to bakefile (#6590) 2023-12-18 21:30:16 +00:00
Olivier Benz
0b84523121
Update Code to 1.85.1 (#6588) 2023-12-18 20:18:44 +00:00
Olivier Benz
45694d38c4
Update Code to 1.85.0 (#6573) 2023-12-15 12:38:01 -09:00
Dov Benyomin Sohacheski
d9fe46a6be
Update and organize release image packages, add wget (#6581) 2023-12-15 20:32:14 +00:00
Ammar Bandukwala
6f078a48a6
Improve README callout to coder/coder (#6579) 2023-12-12 14:23:54 -09:00
Dov Benyomin Sohacheski
7649b6e6ca
Update base release image to Debian:12 (#6574) 2023-12-12 11:37:17 -09:00
Jeff Miller
9622830518
Disable "Show Local" button, add --disable-file-uploads option and add file operation trace level logs (#6557) 2023-12-07 12:10:22 -09:00
Asher
26a3437849
Use debug instead of trace
Trace outputs stack traces which is entirely unnecessary for these two
log entries and makes the logs noisier than they need to be.
2023-12-06 13:19:36 -09:00
Evan Rush
1fac50d6f6
Fix Helm boolean environment variable (#6563) 2023-12-04 19:32:16 +00:00
Asher
3e8100b70e
Release v4.19.1 2023-11-29 12:23:25 -09:00
Asher
0c98611e6b
Ensure we only ever set workspace initialized to true
This is just a guard in case there are paths where the workspace is
already marked as initialized but the workspace configuration is not and
we end up actually un-initializing it.
2023-11-27 17:36:26 -09:00
Asher
73cb236535
Add back local storage patch
And fix the workspace bug.  It is caused by an issue with how some
global variables are being used asynchronously and is exacerbated by the
delay reading settings from the remote introduces.

1. The workspace is created and is marked as not initialized.
2. The configuration's change handler is triggered, and now
   initialization is complete.
3. The handler tries to set the global workspace variable to initialized
   but the workspace has not been set yet so we get an undefined error.
4. The workspace global is now set, but it is set to the old value with
   initialized still set to false.
5. Workspace is never marked as initialized until something else
   triggers the on change handler again.

Fixes #3061, and closes #6546.

My guess is this logic changed in one of the VS Code updates,
introducing this async bug but never getting caught probably because for
them the settings are always local thus minimal delay.
2023-11-27 17:25:38 -09:00
Asher
9ba66ec468
Use machine settings for e2e tests
User settings are browser-based so use machine settings instead.
2023-11-20 15:42:34 -09:00
Asher
09dd5fe44d
Delete local storage patch
The main goal of this patch was to make user settings stored on disk
instead of in the browser, but this stopped working some time ago.  Not
only that but it is causing a bug where a workspace will not fully open.

A secondary goal was to fix the Vim extension but the extension appears
to work just fine without this change now (both the server and browser
versions).

This patch is not useful anymore anyway because there are remote-level
settings that *do* get stored on disk and can be used instead of
user-level settings when necessary.

Fixes #3061, and possibly #6153.
2023-11-20 13:32:59 -09:00
Quentin Quaadgras
958c5203ec
Update Termux docs on how to enable keyboard shortcuts and tab key (#6539) 2023-11-20 08:16:17 -09:00
Asher
edf078d1d2
Release v4.19.0 2023-11-20 07:29:25 -09:00
Asher
984fb135dc
Fix node-gyp failure on macOS (#6537) 2023-11-16 10:10:36 -09:00
Olivier Benz
9658969084
Update Code to 1.84.2 (#6524) 2023-11-14 13:44:21 -09:00
Asher
da254c39ee
Set Node version in a single place (#6534)
This should make it much easier to update.  Also use 18.15.0
specifically since that is what VS Code ships with.

Additionally, it fixes the post-install script being skipped due to
a Yarn v1 bug that happens when Yarn installs node-gyp, which
it does because 18.18 onward stopped bundling node-gyp.
2023-11-14 12:45:56 -09:00
dependabot[bot]
239df56634
chore: bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.11.0 (#6533)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.7.2 to 6.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.11.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:38:31 -09:00
dependabot[bot]
c285b99c74
chore: bump eslint from 8.49.0 to 8.53.0 (#6532)
Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.53.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.53.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:36:26 -09:00
dependabot[bot]
f64bc022e9
chore: bump i18next from 23.5.1 to 23.7.6 (#6531)
Bumps [i18next](https://github.com/i18next/i18next) from 23.5.1 to 23.7.6.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.5.1...v23.7.6)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:27:30 -09:00
dependabot[bot]
22c54c3b2e
chore: bump eslint-plugin-import from 2.28.1 to 2.29.0 (#6507)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.1 to 2.29.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:27:10 -09:00
dependabot[bot]
ae75f76e30
chore: bump aquasecurity/trivy-action from 0.13.1 to 0.14.0 (#6530)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](f78e9ecf42...2b6a709cf9)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:26:40 -09:00
dependabot[bot]
53d856d3c6
chore: bump @babel/traverse from 7.16.8 to 7.23.2 in /test (#6495)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.16.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:26:04 -09:00
dependabot[bot]
4e4d510238
chore: bump docker/setup-qemu-action from 2 to 3 (#6464)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:25:33 -09:00
dependabot[bot]
3a0f4a2773
chore: bump i18next from 23.5.1 to 23.6.0 (#6508)
Bumps [i18next](https://github.com/i18next/i18next) from 23.5.1 to 23.6.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.5.1...v23.6.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:24:53 -09:00
dependabot[bot]
cbc17516fd
chore: bump @typescript-eslint/parser from 6.7.2 to 6.9.1 (#6511)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.7.2 to 6.9.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:23:33 -09:00
dependabot[bot]
c4efcaf079
chore: bump actions/setup-node from 3 to 4 (#6512)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:23:05 -09:00
dependabot[bot]
f44b57393c
chore: bump docker/login-action from 2 to 3 (#6513)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:21:54 -09:00
dependabot[bot]
3fc30cae3e
chore: bump aquasecurity/trivy-action from 0.12.0 to 0.13.1 (#6514)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](fbd16365eb...f78e9ecf42)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:21:03 -09:00
dependabot[bot]
91f8ec6295
chore: bump tj-actions/changed-files from 39 to 40 (#6515)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39 to 40.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v39...v40)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 09:20:36 -09:00
Asher
11e6e656c0
Release v4.18.0 2023-10-20 12:03:13 -08:00
Olivier Benz
d7a2b4936a
Update Code to 1.83.1 (#6488)
* Update Code to 1.83.1

* Patch out lookbehind for Safari support

Not sure why it needs a lookbehind unless a number followed by a capital
letter is not supposed to be considered a new word, which seems wrong to
me.  The tests do not contain any numbers so I can only guess.

---------

Co-authored-by: Asher <ash@coder.com>
2023-10-19 00:50:21 +00:00
Asher
c2d79d94f9
Use secure context in bug report template
Some folks run over localhost, which will work just fine for service
workers.
2023-10-11 17:19:19 -08:00
dependabot[bot]
9fec2d7cad
chore: bump docker/setup-buildx-action from 2 to 3 (#6463)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 15:51:24 -08:00
dependabot[bot]
80dfb2b2a9
chore: bump actions/checkout from 3 to 4 (#6462)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 15:50:11 -08:00
Asher
27e7b931e7
Remove mention of legacy extension API
We would like to shut this down.
2023-10-04 15:44:54 -08:00
liuxhit
db9f678477
Update default nginx config in guide.md (#6471)
update nginx config to avoid wss error when expose code-server using a custom domain and a custom port via nginx.

see also: 
[issue of code-server](https://github.com/coder/code-server/issues/4443)
[different between `$host` and `$http_host`](https://stackoverflow.com/a/76875724)
2023-10-04 10:41:35 -08:00
Olivier Benz
c095c26dbc
Update Code to 1.82.3 (#6472) 2023-10-04 17:17:27 +00:00
dependabot[bot]
262f66abf6
chore: bump @types/node from 18.17.18 to 18.18.1 (#6467)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.17.18 to 18.18.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:25:52 -08:00
dependabot[bot]
8ee45686b0
chore: bump aquasecurity/trivy-action from 0.11.2 to 0.12.0 (#6461)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.11.2 to 0.12.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](41f05d9ecf...fbd16365eb)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:24:45 -08:00
dependabot[bot]
512d97f22f
chore: bump tj-actions/changed-files from 38 to 39 (#6460)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 38 to 39.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v38...v39)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 13:24:15 -08:00
Daniel T. Lee
897e0ae1da
Modify manifest for window control overlay support (#6468)
Since the release of code-server v4.17.0 (Code 1.82), "Command Center" has become a default option. However, the current code-server PWA app lacks support for the Windows control overlay, resulting in an untidy appearance of the title bar. This commit introduces modifications to the manifest file to enable support for the window control overlay.
2023-10-02 18:03:37 +00:00
Asher
f4bf492051
Release v4.17.1 2023-09-29 15:21:48 -08:00
Asher
2eba7af117
Use code-server commit in product.json
Also remove github.com from the trusted domains.  This causes the
browser to block the popup instead (probably because the space between
interaction and popup is too great), which is difficult to notice in
Chromium.  Even in Firefox with the extra bar they add at the top it can
be easy to miss.
2023-09-29 13:58:01 -08:00
Asher
0dc59c0da2
Add trusted extension list
Also trust github.com to make the auth flow smoother.
2023-09-29 10:39:00 -08:00
Asher
6275520348
Fix incorrect argon2 target in arm builds (#6453)
* Fix building from source on arm

Not building from source causes argon2 to pull the wrong arch, so we
have to build from source.

But building from source is causing the new Kerberos module to fail on
arm64 and keytar to fail on both.

The latter has been very difficult to debug because the GitHub image
provides a different result to containers based on Ubuntu 20.04.
Because of this, use a container instead.

Use debian:buster as the container because it is easier to set up the
architecture sources (no need to modify the sources) and because it
seems to come with glibc 2.28 rather than 2.31.

Also use the exact version of Node (18.15.0) for reproducibility.

* Set owner and group during tar to zero

Otherwise you get IDs that can cause (benign) errors while extracting,
which might be confusing.  At the very least, I did not see these errors
from previous tars (although they seem to use 1001).

There is no guarantee what IDs might exist so 0 seems the most
reasonable.
2023-09-27 19:17:47 -08:00
Asher
2bb51a25a9
Refresh proxy URI patch 2023-09-26 12:19:13 -08:00
Asher
7a213161f2
Build from source on cross-compile step
The comment said the issue with argon2 was related to CentOS 7 but the
cross-compile steps never used CentOS 7 so maybe the real issue is with
the architecture.
2023-09-26 09:58:53 -08:00
Asher
a1131fadf2
Enable secret storage (#6450)
* Remove unused dependency patch

* Enable secret storage based on local storage

* Remove unnecessary GitHub auth patch

It works now without the patch.
2023-09-26 08:35:41 -08:00
Asher
468cf5c6ce
Update npm publish workflow to use v18 2023-09-22 17:53:56 -08:00
Asher
800bf364d6
Release v4.17.0 2023-09-22 17:49:40 -08:00
DevMirza
5428442628
feat(lang): Add Urdu Locale (#6444) 2023-09-22 17:16:51 -08:00
Dov Benyomin Sohacheski
020f280458
Add .local mount to example Docker command (#6419) 2023-09-22 17:07:07 -08:00
Asher
58f6e24a07
Fix installation of kerberos module on armv7l (#6442)
Also build with the same version of Node we will release with.
2023-09-22 00:54:14 -08:00
Asher
7868f4db23
Fix cross-compilation (#6441)
* Avoid packaging yarn.lock

Since the shrinkwrap is what we want everything to use.

* Build with npm

It seems we stuck with yarn because npm was giving us errors but I will try
sorting it out now so we can build with npm as originally intended.

* Remove build from source

Not using CentOS 7 anymore so based on the comment we no longer need
this.  Keytar seems to install fine now.

* Update missed Node version

These numbers are all over the place.

* npm_config_arch must be lowercase

* Patch out Kerberos

I am not sure exactly how it is used but I think it is not a path code-server
worries about, at least not right now.  Just going to patch it out rather than
figure out how to build it on armv7l but we can revisit later.
2023-09-21 23:21:01 -08:00
Asher
acc50a5d36
Update dependencies and force-update qs (#6440)
* Update dependencies and force-update qs

This is mainly an attempt to get rid of as many resolutions as possible
since it seems they are unnecessary except for qs (according to yarn/npm
audit).

For qs use 6.9.7 since Express is using 6.9.6 and that matches the most
closely.

Also add overrides since this is npm's version of yarn's resolutions and
we need it for the shrinkwrap to generate with the right dependencies.

Decided to keep pinning @types/node as well although I am not sure it is
necessary.  Express is pulling in v20 types.  Since this is
development-only we only need it in resolutions.

* Run formatter

Some rules seem to have changed with the dependency updates.

* Replace deprecated bodyParser.json() usage

* Audit npm shrinkwrap as well

* Skip installing dependencies in audit

It seems the tools only require the lock files.

* Fix tests when using ipv6

* Add missing openssl dependency to flake
2023-09-21 16:13:34 -08:00
Asher
47ee7ae670
Bump minimum glibc to 2.28 (#6439)
At least, for the standalone and for anyone running on default Node 18.

If support for 2.17 is needed then one would need to build Node 18 with 2.17 and then build code-server with that version (specifically, the native npm modules).
2023-09-21 13:42:17 -08:00
Asher
70d0c603cc
Update to VS Code 1.82.2 (#6436)
* Update VS Code to 1.82.2

* Add new libkrb5 dependency

* Update patches

The only changes were to context except:

- The URL callback provider uses a new _callbackRoute argument and moved
  locations.
- The telemetry provider gets passed the request service as the first
  argument now.
- CSP hash changed, as usual.

* Update Node to v18

* Revert back to es2020

es2022 is breaking Safari.
2023-09-20 15:33:28 -08:00
dependabot[bot]
2e29c233ea
chore: bump tj-actions/changed-files from 37 to 38 (#6417)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 37 to 38.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v37...v38)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:54:56 -08:00
dependabot[bot]
331a017309
chore: bump argon2 from 0.30.3 to 0.31.0 (#6415)
Bumps [argon2](https://github.com/ranisalt/node-argon2) from 0.30.3 to 0.31.0.
- [Release notes](https://github.com/ranisalt/node-argon2/releases)
- [Commits](https://github.com/ranisalt/node-argon2/compare/v0.30.3...v0.31.0)

---
updated-dependencies:
- dependency-name: argon2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:53:31 -08:00
dependabot[bot]
f915d1e2c8
chore: bump eslint from 8.44.0 to 8.48.0 (#6414)
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 11:52:54 -08:00
Kaoru Yamamoto
95bcf101d7
Add Japanese locale (#6433) 2023-09-18 17:23:03 +00:00
James MacDonald
d80568df20
Add pod annotations (#6432) 2023-09-16 00:31:05 +00:00
Asher
03dc8cd808
Propagate post-installation failures
pipefail might be ideal here but not sure how wide the support is yet
considering this may run on plain sh.
2023-09-11 09:27:29 -08:00
Asher
3e1c00e017
Run formatter
Not sure why CI missed these, will have to look into it.
2023-09-11 09:27:28 -08:00
Cyanoure
a76e5241b6
Add "CODE_SERVER_HOST" environment variable (#6423) 2023-09-08 22:50:11 +00:00
Asher
913fc30866
Upgrade @coder/logger (#6409)
This gets rid of the unused peer dependency that was pulling in
protobufjs.
2023-08-30 12:10:34 -08:00
Asher
eb498b0d6d
Remove humanPath (#6404)
The tilde is ambiguous and it can be helpful to know exactly what paths
code-server is trying to use, especially if it is running as a different
user than you expected.
2023-08-29 14:25:24 -08:00
Antoine
eb8099ff89
feat(helm): Don't create Secret if existingSecret is provided (#6397) 2023-08-28 11:01:11 -08:00
Efren
56d3548fa2
Add braces to Caddyfile example (#6382) 2023-08-10 00:44:23 +00:00
jothi prasath
2d335bd1ea
Update screenshots (#6372) 2023-08-07 19:02:54 +00:00
dependabot[bot]
291682e1c0
chore: bump i18next from 23.2.11 to 23.4.1 (#6362)
Bumps [i18next](https://github.com/i18next/i18next) from 23.2.11 to 23.4.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.2.11...v23.4.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:17:13 -08:00
dependabot[bot]
97aeb77abe
chore: bump eslint-plugin-import from 2.27.5 to 2.28.0 (#6363)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.28.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.27.5...v2.28.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:16:13 -08:00
dependabot[bot]
76fd2389e4
chore: bump proxy-agent from 6.2.1 to 6.3.0 (#6361)
Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.3.0/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 09:51:46 -08:00
Asher
3cb92edc76
Release v4.16.1 2023-07-31 11:21:45 -08:00
Olivier Benz
94ef3776ad
Update Code to 1.80.2 (#6357) 2023-07-31 09:14:29 -08:00
Asher
a82f1ceaa5
Add missing FAQ table of contents entry 2023-07-28 17:46:36 -08:00
Asher
25254214fb
Release v4.16.0 2023-07-28 17:32:57 -08:00
Asher
feb5e6770c
Add entry for location of configuration
Closes #6324.
2023-07-28 17:32:48 -08:00
Asher
e37b35278d
Account for disabled proxy in startup logs 2023-07-27 09:26:11 -08:00
Asher
2ffbcfdfcb
Release v4.15.0 2023-07-21 15:30:03 -08:00
Ryan Brainard
74da5167a2
Add --disable-proxy option (#6349) 2023-07-21 15:23:21 -08:00
dependabot[bot]
daac46b3cf
chore: bump i18next from 22.5.1 to 23.2.11 (#6326)
Bumps [i18next](https://github.com/i18next/i18next) from 22.5.1 to 23.2.11.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v22.5.1...v23.2.11)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 14:03:21 -05:00
dependabot[bot]
ea3c79ffd1
chore: bump @typescript-eslint/eslint-plugin from 5.59.1 to 5.62.0 (#6327)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.1 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 13:31:37 -05:00
Alex Thillen
93e60f7b0e
add trusted-origins cli argument (#6319) 2023-07-19 14:04:03 -08:00
dependabot[bot]
7926647058
chore: bump tough-cookie from 4.0.0 to 4.1.3 in /test (#6318)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:02:19 -08:00
dependabot[bot]
d27cd43dce
chore: bump @typescript-eslint/parser from 5.61.0 to 5.62.0 (#6328)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.61.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:01:32 -08:00
dependabot[bot]
1befd37310
chore: bump word-wrap from 1.2.3 to 1.2.4 (#6342)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:01:14 -08:00
dependabot[bot]
2b3b5e7051
chore: bump word-wrap from 1.2.3 to 1.2.4 in /test (#6343)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:00:56 -08:00
Olivier Benz
788da5d495
Update Code to 1.80.1 (#6340)
* Update Code to 1.80.1 (#6340)
* Give build workflow more time to run
2023-07-19 14:00:31 -08:00
dependabot[bot]
070a5a3179
chore: bump semver from 6.3.0 to 6.3.1 in /test (#6320)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-14 13:52:42 -08:00
Michael Thomas
7cbb6a8b09
Add Svelte to guide (#6269)
Added a guide on proxying to a Svelte app since there wasn't one already. Used the vue and angular guides as a template and included a link to an issue post on sveltekits website which adds some context.
2023-07-13 16:17:25 -05:00
dependabot[bot]
7fb54073db
chore: bump @typescript-eslint/parser from 5.59.11 to 5.61.0 (#6312)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.11 to 5.61.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.61.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:04:32 -05:00
dependabot[bot]
e72e8bb6b5
chore: bump aquasecurity/trivy-action from 0.10.0 to 0.11.2 (#6303)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.10.0 to 0.11.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](e5f43133f6...41f05d9ecf)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:04:18 -05:00
dependabot[bot]
411846528b
chore: bump eslint from 8.39.0 to 8.44.0 (#6299)
Bumps [eslint](https://github.com/eslint/eslint) from 8.39.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.39.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 16:03:55 -05:00
dependabot[bot]
7f024eda6e
chore: bump typescript from 5.0.4 to 5.1.6 (#6297)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.4 to 5.1.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:59:24 -05:00
dependabot[bot]
2617623ed6
chore: bump tj-actions/changed-files from 36 to 37 (#6302)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 36 to 37.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v36...v37)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:59:01 -05:00
Asher
70aa1b7722
Release v4.14.1 2023-06-26 10:21:35 -08:00
dependabot[bot]
90a4147381
chore: bump semver from 7.3.8 to 7.5.2 (#6287)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 12:12:45 -05:00
Asher
5c19962930
Set session socket into environment variable (#6282)
* Avoid spawning code-server with --reuse-window and --new-window

These flags mean the user explicitly wants to open in an existing
instance so if the socket is down it should error rather than try to
spawn code-server normally.

* Set session socket into environment variable

While I was at it I added a CLI flag to override the default.  I also
swapped the default to --user-data-dir.

The value is set on an environment variable so it can be used by the
extension host similar to VSCODE_IPC_HOOK_CLI.

* Add e2e test for opening files externally
2023-06-21 22:47:01 -08:00
Asher
56d10d82bf
Enforce Node binary permissions
In some cases it may have extra write permissions.
2023-06-21 11:23:40 -08:00
Asher
cef2aa22dc
Move session server log after HTTP server logs
The indented logs technically apply to the HTTP server so move the
session server log afterward to avoid making them look like they apply
to the session server.
2023-06-21 10:59:02 -08:00
Sean Lee
b5a9ef80e7
Use unique socket per user for managing editor sessions (#6278)
Also warn if editor session manager socket cannot be created rather than failing.
2023-06-21 13:39:25 -05:00
Asher
5d3c9edce4
Release v4.14.0 2023-06-16 13:38:21 -08:00
Asher
9955cd91a4
Update Code to 1.79.1 (#6264)
Mostly just the usual shifting or changing of the surrounding context
but I did refactor the getting started block we insert because it keeps
getting mangled on each update.  Instead of shifting things around the
columns I just prepend it to the right column.

Getting 404s on some vsda module but everything seems to work 
without it and I do not see it referenced in the package.json nor a
nywhere on npmjs.com so it seems to be optional.
2023-06-15 08:00:03 -08:00
dependabot[bot]
fdeaba9581
chore: bump proxy-agent from 5.0.0 to 6.2.1 (#6247)
* chore: bump proxy-agent from 5.0.0 to 6.2.1

Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 5.0.0 to 6.2.1.
- [Release notes](https://github.com/TooTallNate/proxy-agents/releases)
- [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md)
- [Commits](https://github.com/TooTallNate/proxy-agents/commits/proxy-agent@6.2.1/packages/proxy-agent)

---
updated-dependencies:
- dependency-name: proxy-agent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update proxy-agent usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asher <ash@coder.com>
2023-06-14 14:27:15 -08:00
dependabot[bot]
40ff2e6049
chore: bump @typescript-eslint/parser from 5.57.1 to 5.59.11 (#6262)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.1 to 5.59.11.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.11/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 14:08:39 -08:00
dependabot[bot]
73d42f7ea0
chore: bump i18next from 22.4.6 to 22.5.1 (#6261)
Bumps [i18next](https://github.com/i18next/i18next) from 22.4.6 to 22.5.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v22.4.6...v22.5.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 13:33:51 -08:00
Sean Lee
fb73742b2b
Prefer matching editor sessions when opening files. (#6191)
Signed-off-by: Sean Lee <freshdried@gmail.com>
2023-06-14 13:32:07 -08:00
Asher
ccb0d3a34f
Remove unused dependency split2
This was used with now-removed `--link`.
2023-06-13 10:38:13 -08:00
dependabot[bot]
4a121edd16
chore: bump tj-actions/changed-files from 35 to 36 (#6246)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 35 to 36.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v35...v36)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 18:28:24 +00:00
dependabot[bot]
f6db985712
chore: bump robinraju/release-downloader from 1.7 to 1.8 (#6245)
Bumps [robinraju/release-downloader](https://github.com/robinraju/release-downloader) from 1.7 to 1.8.
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.7...v1.8)

---
updated-dependencies:
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:47:40 -05:00
dependabot[bot]
6d00fc7f46
chore: bump typescript from 4.6.4 to 5.0.4 (#6182)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 5.0.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v5.0.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:45:49 -05:00
Jonas
ee024f3f2d
docs: mention Termux extension workarounds (#6227) 2023-05-31 15:00:58 -08:00
Simon Merschjohann
0703ef008c
Allow {{host}} and {{port}} in domain proxy (#6225) 2023-05-31 16:31:30 -05:00
Asher
2109d1cf6a
Add new unreleased section to changelog 2023-05-22 12:21:30 -08:00
Asher
74af05dfbe
Release v4.13.0 2023-05-19 13:14:29 -08:00
dependabot[bot]
2798322b03
chore: bump vm2 from 3.9.17 to 3.9.19 (#6216)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.17 to 3.9.19.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.17...3.9.19)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 12:38:38 -08:00
Asher
b3b971480f
Support X-Forwarded-Host with multiple hosts
Closes #6215.
2023-05-17 11:51:05 -08:00
Asher
6745a46034
Fix extension install test
This is not a valid ID (to install a specific version you use @) and,
quite strangely, Code is now returning an "extension not found" error if
the ID is invalid, breaking the test since we expect it to error about
the marketplace not existing.
2023-05-15 20:54:37 -08:00
Asher
43ef50b404
Update to 1.78.2 (#6201)
* Update to 1.78.1

No changes needed in the patches other than moving some lines around and
updating the CSP hash as usual.

The flake had to be updated as it was using Node 16.16 and 16.17 is
required at minimum now.  Also python seems to install python2 which is
marked as deprecated so explicitly install python3.

* Update to 1.78.2

Patches applied without any conflicts.

* Update commit environment variable

This was causing the commit not to be set.  It broke display languages
since that has a hard dependency on the commit for directory names.
Possibly broke other things.
2023-05-15 15:44:03 -08:00
dependabot[bot]
45c89856fd
chore: bump eslint-config-prettier from 8.6.0 to 8.8.0 (#6179)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.6.0 to 8.8.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.6.0...v8.8.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 12:43:37 -08:00
Jim van Abkoude
5f4ae75431
Add nix-on-droid as an Android installation method (#6196) 2023-05-08 12:42:43 -08:00
易良
521ff44aed
fix: relative path in markdown (#6188)
Co-authored-by: jinjing.zzj <jinjing.zzj@alibaba-inc.com>
2023-05-08 12:38:52 -08:00
Asher
5708e6ce32
Format redacted arg lines
Pushing straight to main again.
2023-05-05 14:44:40 -08:00
Asher
3f7db15fde
Redact sensitive args from handshake debug log 2023-05-04 10:54:41 -08:00
Asher
8c99f41b90
Fix parent process log level 2023-05-04 10:48:32 -08:00
Asher
e02d56dbfd
Do not trace child process messages
All this does is add a stack trace which is not helpful here.
2023-05-04 10:48:31 -08:00
Asher
aac5efa046
Do not log < 500 on web sockets as errors
For example if someone spams a web socket without authentication we
should not log "forbidden".  Forbidden is normal/expected operation, not
an error.
2023-05-04 10:48:30 -08:00
dependabot[bot]
ff2764f7b1
chore: bump rotating-file-stream from 3.0.0 to 3.1.0 (#6183)
Bumps [rotating-file-stream](https://github.com/iccicci/rotating-file-stream) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/iccicci/rotating-file-stream/releases)
- [Changelog](https://github.com/iccicci/rotating-file-stream/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iccicci/rotating-file-stream/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: rotating-file-stream
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 08:33:32 -08:00
dependabot[bot]
bda6b631ab
chore: bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.1 (#6180)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.57.1 to 5.59.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 16:49:48 -08:00
dependabot[bot]
9bac70ea0d
chore: bump eslint from 8.26.0 to 8.39.0 (#6181)
Bumps [eslint](https://github.com/eslint/eslint) from 8.26.0 to 8.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.26.0...v8.39.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 16:49:18 -08:00
dependabot[bot]
7722ef1437
chore: bump aquasecurity/trivy-action from 0.9.2 to 0.10.0 (#6178)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](1f0aa582c8...e5f43133f6)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 11:17:06 -05:00
smalllady
951d8ac45e
Fix proxying non-ASCII (#6154)
This only affects the path proxy since `req.originalUrl` is in escaped format.
2023-04-25 11:41:33 -08:00
Asher
2e17735795
Release v4.12.0 (#6157) 2023-04-21 14:04:07 -05:00
dependabot[bot]
1da7cda39e
chore: bump vm2 from 3.9.15 to 3.9.17 (#6155)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.17.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.15...3.9.17)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 10:58:58 -08:00
Asher
c829d74203
Update to Code 1.77.3 (#6148) 2023-04-13 10:34:33 -08:00
Asher
39075b2cf3
Update to Code 1.77.2 (#6142)
No changes necessary.
2023-04-12 08:52:16 -08:00
dependabot[bot]
aed1fc0119
chore: bump cross-fetch from 3.1.4 to 3.1.5 in /test (#6087)
Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/lquixada/cross-fetch/releases)
- [Commits](https://github.com/lquixada/cross-fetch/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: cross-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 14:17:03 -05:00
Asher
6e411adb01
Update Code to 1.77.1 (#6135) 2023-04-10 10:28:13 -08:00
dependabot[bot]
36ba646bcb
chore: bump json5 from 2.2.0 to 2.2.3 in /test (#6085)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 09:45:09 -08:00
dependabot[bot]
278d0f2184
chore: bump vm2 from 3.9.11 to 3.9.15 (#6134)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.11...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 22:01:25 +00:00
dependabot[bot]
b954250018
chore: bump eslint-plugin-import from 2.26.0 to 2.27.5 (#6123)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.26.0 to 2.27.5.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.27.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 21:40:43 +00:00
dependabot[bot]
2b72da22e6
chore: bump @typescript-eslint/parser from 5.41.0 to 5.57.1 (#6132)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.41.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 21:21:36 +00:00
dependabot[bot]
3c838e2d02
chore: bump @typescript-eslint/eslint-plugin from 5.56.0 to 5.57.1 (#6133)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.56.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 20:55:02 +00:00
dependabot[bot]
f8d563c49b
chore: bump split2 from 4.1.0 to 4.2.0 (#6121)
Bumps [split2](https://github.com/mcollina/split2) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/mcollina/split2/releases)
- [Commits](https://github.com/mcollina/split2/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: split2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 20:36:33 +00:00
dependabot[bot]
39e63af359
chore: bump ts-node from 10.1.0 to 10.9.1 (#6125)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.1.0 to 10.9.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Changelog](https://github.com/TypeStrong/ts-node/blob/main/development-docs/release-template.md)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.1.0...v10.9.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 12:17:22 -08:00
Asher
c995988b70
Set proxy URI to domain proxy when possible (#6115)
This will make the ports panel use it instead of the default path-based
proxy.
2023-03-30 12:01:49 -08:00
watchakorn-18k
a44bd71043
Add thai language i18n (#6103) 2023-03-30 13:00:58 -05:00
Asher
19bcd043d7
Add debug log for origin check (#6096)
Extracted host detection into a separate function to avoid multiple log
lines on each return and went with a thrown error to consolidate the
common log text.
2023-03-30 12:24:33 -05:00
dependabot[bot]
c32a31d802
chore: bump ws from 8.2.0 to 8.13.0 (#6100)
Bumps [ws](https://github.com/websockets/ws) from 8.2.0 to 8.13.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.2.0...8.13.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:08:53 -05:00
dependabot[bot]
45ca68c362
chore: bump jpeg-js from 0.4.3 to 0.4.4 in /test (#6086)
Bumps [jpeg-js](https://github.com/eugeneware/jpeg-js) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/eugeneware/jpeg-js/releases)
- [Commits](https://github.com/eugeneware/jpeg-js/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: jpeg-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:03:39 -05:00
dependabot[bot]
8f1a70339d
chore: bump node-fetch from 2.6.6 to 2.6.7 in /test (#6084)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:03:09 -05:00
dependabot[bot]
35209aa5b5
chore: bump minimatch from 3.0.4 to 3.1.2 in /test (#6083)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:52 -05:00
dependabot[bot]
87f44599e5
chore: bump audit-ci from 6.0.0 to 6.6.1 (#6040)
Bumps [audit-ci](https://github.com/IBM/audit-ci) from 6.0.0 to 6.6.1.
- [Release notes](https://github.com/IBM/audit-ci/releases)
- [Commits](https://github.com/IBM/audit-ci/compare/v6.0.0...v6.6.1)

---
updated-dependencies:
- dependency-name: audit-ci
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:41 -05:00
dependabot[bot]
71f01ec0f0
chore: bump @types/node from 16.11.41 to 16.18.18 (#6099)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.41 to 16.18.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:22 -05:00
dependabot[bot]
f8e2d00099
chore: bump @typescript-eslint/eslint-plugin from 5.51.0 to 5.56.0 (#6102)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.51.0 to 5.56.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.56.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 14:02:00 -05:00
dependabot[bot]
a485fec27c
chore: bump minimist from 1.2.5 to 1.2.8 in /test (#6095)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 18:58:55 +00:00
dependabot[bot]
aa2276293a
chore: bump cookiejar from 2.1.3 to 2.1.4 in /test (#6094)
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 18:11:42 +00:00
Felix K
72eae01684
Add information on using PWA with desktop Firefox (#6098)
Co-authored-by: Felix Kuhlmann <felix-kuhlmann@gmx.de>
2023-03-22 17:52:35 +00:00
Ahmed El-Sharnoby
bca733de3d
Allow app-name configuration to change the name of the PWA (#6093) 2023-03-22 01:02:31 +00:00
Asher
78282a1fd6
Make random formatting change to security.yaml
This is an attempt to set myself as the notification target.

Closes #6090.
2023-03-21 12:24:10 -08:00
Asher
dbdd2edb62
Fix proxy error on web sockets
Fixes #6088.
2023-03-21 12:24:09 -08:00
Asher
a9d61daa91
Release v4.11.0 2023-03-16 10:04:57 -08:00
Initial-heart
6c08466b05
Correct default shell docs for npm on Windows (#6078) 2023-03-16 12:46:11 -05:00
dependabot[bot]
85e083580d
chore: bump aquasecurity/trivy-action from 0.9.0 to 0.9.2 (#6075)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.0 to 0.9.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](cff3e9a7f6...1f0aa582c8)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 16:49:25 -05:00
Asher
b0431069a1
Replace CI deprecations (#6072)
* Replace deprecated set-output usage in CI

* Update tj-actions/changed-files

CI is saying it uses Node 12 and that Node 12 actions are deprecated.
2023-03-14 15:52:53 -05:00
Asher
f9cc07926b
Update Code to 1.76.1 (#6070)
* Update Code to 1.76.1

- worker-src already contains blob so we can avoid patching that.
- localeService moved.
- Remaining changes were just line changes.

* Make language extensions installable again

Still might want to look into making the native language support work
but for now it seems better not to break backwards compatibility since
the native implementation is quite different.

* Avoid "install in browser" for language packs

It will not work.

* Import correct locale service

I believe before the contributions imported this but now we have to do
it here.
2023-03-14 15:03:53 -05:00
Asher
be40eca5d9
Release v4.10.1 2023-03-03 22:24:54 -09:00
Asher
9ba08907da
Fix Node version failure in publish workflow
Looks like the images got updated to v18 so they started failing.  For
npm install v16 and for Docker just run the script directly, it seems
silly to waste time installing v16 just to run a script through yarn.
2023-03-03 22:23:21 -09:00
Asher
d477972c68
Add origin checks to web sockets (#6048)
* Move splitOnFirstEquals to util

I will be making use of this to parse the forwarded header.

* Type splitOnFirstEquals with two items

Also add some test cases.

* Check origin header on web sockets

* Update changelog with origin check

* Fix web sockets not closing with error code
2023-03-03 03:12:34 -06:00
Asher
a47cd81d8c
Update FAQ: code-server is not using a direct fork
Also the wrapper process is another major difference along with the
update notifications.
2023-02-27 14:29:55 -09:00
Asher
c9fbcffd53
Rewrite differences in FAQ
- Move differences to the Codespaces section since they apply to both
  Codespaces and OpenVSCode-Server
- Add some important missing differences
- Exclude settings sync (not being worked on)
- Exclude the plugin API (deprecated)
- Exclude certificate support (browsers these days are starting to
  require trusted certs so better not to recommend using this)
2023-02-27 14:21:11 -09:00
Michael Tinsley
befa76d09d
Fix extra prefix dashes in install.sh (#6028) 2023-02-27 22:57:57 +00:00
Asher
e0ece195c1
Update changelog and chart with new version 2023-02-15 11:16:09 -09:00
Asher
ac1fba8bde
Remove deprecated --link (#6018) 2023-02-13 16:52:48 -06:00
Blue
6d8ed77fb0
feat(helm-chart): Add support for extraSecretMounts subPath in helm-chart (#5961) 2023-02-13 13:01:32 -06:00
Samuel Walker
4fb87f920f
feature: add ability to attach ports to code server (#6015) 2023-02-13 12:56:05 -06:00
Asher
36daac3031
Update to 1.75.1 2023-02-13 07:45:24 -09:00
Asher
45aef719d3
Make sure heartbeat isActive resolves
This does not seem to actually cause an issue (not resolving ends up
with the same behavior as resolving with false) but I am not sure if the
hanging promises would be a memory leak so seems best to fix.
2023-02-08 11:43:40 -09:00
Asher
6d6c5e18d1
Fix watch script ignoring stdout
This was lost due to the change from fork to spawn.
2023-02-08 11:42:28 -09:00
Asher
17bca521af
Update changelog 2023-02-07 13:57:53 -09:00
Asher
82073743b1
Update release guide 2023-02-07 13:57:52 -09:00
Asher
71ff747c48
Update Code to 1.75.0 (#6004)
* Update Code to 1.75.0

- getting-started.diff: The way to get an icon's class changed
- proxy-uri.diff: The product service is passed in so we can get the
  proxy URI from that now instead of passing it in separately.

* Remove workspace trust test

Something in how/when Code displays the trust dialog appears to have
changed, failing the test.  I am not sure it makes sense for us to be
testing upstream code anyway.

* Use regular Node for watch

Since we spawn the watch script with ts-node it was using ts-node for
the web server spawn as well.  With latest Code there are for some
reason type errors (it cannot find @types/node) but this is already
compiled code which already passed type checks; any type errors here are
useless.  To fix spawn with regular Node.

* Fix some workers not loading
2023-02-07 16:22:06 -06:00
dependabot[bot]
e5a2537aee
chore: bump limiter from 1.1.5 to 2.1.0 (#6001)
* chore: bump limiter from 1.1.5 to 2.1.0

Bumps [limiter](https://github.com/jhurliman/node-rate-limiter) from 1.1.5 to 2.1.0.
- [Release notes](https://github.com/jhurliman/node-rate-limiter/releases)
- [Commits](https://github.com/jhurliman/node-rate-limiter/commits)

---
updated-dependencies:
- dependency-name: limiter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update limiter usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asher <ash@coder.com>
2023-02-06 13:12:57 -06:00
dependabot[bot]
bce6239801
chore: bump @typescript-eslint/eslint-plugin from 5.41.0 to 5.51.0 (#6002)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.41.0 to 5.51.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.51.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 18:59:24 +00:00
dependabot[bot]
93589edb61
chore: bump eslint-config-prettier from 8.5.0 to 8.6.0 (#6003)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.5.0...v8.6.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 12:41:05 -06:00
Asher
bfcca5fcc0
Remove docs preview
This is failing CI on Dependabot PRs.  Opted to just remove it since
most (all?) PRs will be from forks and this workflow will not run
anyway.  If we figure out the secret situation we can add it back.
2023-02-06 09:07:34 -09:00
Asher
a76c0c5742
Remove PR npm package
It is causing CI to fail for Dependabot (no access to the token) and it
does not work with forks and currently there is no one who pushes
straight to the repo so this will never be used.

Can always add it back if we figure out how to make the secrets work.
2023-02-06 08:56:47 -09:00
renovate[bot]
6e1b9131e9
chore(deps): update aquasecurity/trivy-action digest to cff3e9a (#5994)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-06 11:36:05 -06:00
Dean Sheather
776d57b12b
chore: enable dependabot (#5997) 2023-02-06 11:32:52 -06:00
Asher
026879b78c
Update Code to 1.74.3 (#5989) 2023-02-06 10:24:37 -06:00
Joe Previte
401d423dfd
docs: add usage in Coder (#5975)
* docs: add difference between Coder

Add a short block explaining the difference between code-server and
Coder.

* docs: add new doc coder.md under Install

This adds a new doc explaining how to install code-server in a Coder
workspace using Terraform.
2023-01-27 17:14:54 +00:00
Joe Previte
96d9c5eb0f
docs: add port-forwarding (#5979) 2023-01-27 16:41:27 +00:00
Kyle Carberry
134e9b40b7
chore: fix requirements so it navigates to docs (#5973)
This was navigating to the relative markdown file,
which is confusing when some links go to the docs.
2023-01-17 17:09:24 +00:00
zhaozhiming
7c2aa8c417
feat: add i18n in login page (#5947)
* feat: add i18n in login page

* fix: add word space and put the app name into the title

* fix: remove duplicate replace title

* fix: prettier format code

* fix: fix typescript check warning

* fix: add zh-cn locale file code owner

* fix: use existing flag locale to the login page

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2023-01-13 17:42:49 +00:00
Joe Previte
d40a9742c0
feat(ci): add lint-actions step to build.yaml (#5957)
* feat(ci): add lint-actions step to build.yaml

This adds a new job to the Build CI pipeline to lint our GitHub Actions.

By doing this, we can prevent typos from slipping in.

Fixes #5776

* fix: disable shellcheck in actionlint

I don't think we want to enable this for now.

* fix: ignore set-output warnings for now

It's deprecated but there isn't a reason to move away from using it yet.
2023-01-13 17:21:56 +00:00
renovate[bot]
67416b7b79
fix(deps): update dependency argon2 to v0.30.3 (#5937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-05 08:27:11 -07:00
Joe Previte
9e266db379
chore: use matchUpdateTypes (#5942) 2023-01-04 23:08:39 +00:00
Joe Previte
834d16df2a
docs(CONTRIBUTING): add standalone release section (#5946)
* docs: update section in troubleshooting

* docs: add section on standalone release
2023-01-04 15:47:34 -07:00
Joe Previte
d835cb9865
docs: add new termux installation method (#5938)
* docs: add new termux installation method

* fixup: formatting
2023-01-04 17:16:23 +00:00
Joe Previte
9e9cbd846d
chore: update renovate to include peer deps (#5940) 2023-01-03 15:14:21 -07:00
Joe Previte
077a8f6a6b
chore: pin json5 to 1.0.2 (#5936)
* chore: pin json5 to 1.0.2

* fixup: formatting
2023-01-03 20:57:16 +00:00
Joe Previte
4e280811f9
chore: update renovate and deps (#5914)
* chore: update renovate.json ignoreDeps

ansi-regex, env-paths and limiter all switch to ESM which we can't
support at the moment so ignore updates for now.

* chore: update actions/cache@v3

* chore: update minor deps

* chore: add pretteir to renovate.json
2023-01-03 17:28:58 +00:00
Joe Previte
3eb35979f0
chore: update aur job in publish.yaml (#5915)
This uses the `env.VERSION` which should fix the issue with version being blank.
2022-12-22 13:58:20 -06:00
Joe Previte
8377bd23df
chore: upgrade Code to 1.74.1 (#5909)
* chore: upgrade Code to 1.74.1

* chore: remove require in integration.diff

I don't know what the impact of this is but in 192c67db71
they removed the usage of `require` in `server.main.ts`.

More details in PR: https://github.com/microsoft/vscode/pull/165831

* chore: update marketplace.diff

* chore: update sha hash in webview.diff

* chore: update disable-builtin-ext-update.diff

If my logic is right, then this patch is now simplified thanks to this:
https://github.com/microsoft/vscode/blob/1.74.1/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts#L1238

* chore: refresh proxy-uri patch

* chore: refresh local-storage.diff

* chore: refresh sourcemaps.diff

* chore: refresh disable-downloads.diff

* chore: refresh display-language.diff

* chore: refresh getting-started.diff

* docs: update testing notes for cli-window-open

* docs: update telemetry testing instructions

* fix: add GITHUB_TOKEN to build code-server job

Downloading @vscode/ripgrep is failing only in CI so adding this
environment variable to see if it increases the rate limit.

Ref: https://github.com/microsoft/vscode-ripgrep#github-api-limit-note

* refactor: use own cache key build code-server job

* temp: disable vscode test

* refactor: delete wrapper test

* Revert "refactor: delete wrapper test"

This reverts commit 3999279b73.

* refactor: move vscode tests to e2e (#5911)

* wip: migrate vscode tests to e2e

* feat: add codeWorkspace to global setup

* refactor: only use dir in spawn when we should

* wip: migrate more tests

* refactor: move all vscode tests to e2e

* refactor(ci): move unit to own job

* fixup: add codecov to unit test step

* Update test/e2e/models/CodeServer.ts

* Update test/e2e/models/CodeServer.ts

* docs: add note about intercept requests

* refactor: rm unused clean() calls

* refactor: delete duplicate test

* refactor: update 'should not redirect' test

* refactor: rm unused imports

* refactor: rm unnecessary navigate call in test

* fixup: formatting

* wip: update test

* refactor: modify assertion for proxy

* fixup: use REVERSE_PROXY_BASE_PATH

* refactor: add helper fn getMaybeProxiedPathname

* fixup: formatting

* fixup: rm unused import

* chore: increase playwright timeout

* Revert "chore: increase playwright timeout"

This reverts commit a059129252.

* chore: rm timeout
2022-12-22 10:25:28 -07:00
Toby Cm
930791d249
Added how to disable file downloads in faq (#5907) 2022-12-19 16:00:42 +00:00
Joe Previte
5c21015dbe
release: v4.9.1 (#5893)
* chore: add 4.9.1 to changelog

* chore: bump Helm to 4.9.1
2022-12-16 12:07:36 -07:00
Joe Previte
fa39d4761a
fix: dst path in nfpm (#5875)
* fix: dst path in nfpm

* trigger ci

* Update ci/README.md
2022-12-16 11:35:13 -07:00
Joe Previte
87f606db2a
chore(ci): update linux cross-compile runner 20.04 (#5896) 2022-12-16 08:54:23 -07:00
Joe Previte
06483bc59d
refactor: rm node_mods caching in release workflow (#5895) 2022-12-15 14:24:59 -07:00
Joe Previte
9012ddfe79
refactor: use separate cache key in release, run standalone after caching (#5859)
* refactor: remove keytar dep in cross-compile

* refactor: try other keytar package

* refactor: remove keytar step in cross-compile

* fix: manually remove keytar

* try this first

* I think this is it

* Revert "I think this is it"

This reverts commit 5c566b0c01.

* okay this is it

* fixup

* try legacy peer

* remove keytar before standalone

* wrong path

* maybe

* revert: change *npm* back to npm*

* revert: don't uninstall keytar

* fix: use npm run standalone-release

* fixup formatting

* Revert "refactor: remove yarn.lock steps (#5850)"

This reverts commit 907747d394.

* fixup: remove the --exclude

* refactor: remove yarn.lock check

* try ddd in postinstall

* refactor: cache before release:standalone

* refactor: add os to cache key in release

* chore: formatting

* Update ci/build/npm-postinstall.sh

* fixup: formatting
2022-12-12 22:03:07 +00:00
Joe Previte
1efc5f104e
fix: use npm and yarn consistently in build and release (#5852)
* refactor: remove keytar dep in cross-compile

* refactor: try other keytar package

* refactor: remove keytar step in cross-compile

* fix: manually remove keytar

* try this first

* I think this is it

* Revert "I think this is it"

This reverts commit 5c566b0c01.

* okay this is it

* fixup

* try legacy peer

* remove keytar before standalone

* wrong path

* maybe

* revert: change *npm* back to npm*

* revert: don't uninstall keytar

* fix: use npm run standalone-release

* fixup formatting

* Revert "refactor: remove yarn.lock steps (#5850)"

This reverts commit 907747d394.

* fixup: remove the --exclude

* refactor: remove yarn.lock check

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-12 21:41:29 +00:00
Joe Previte
ef5865f506
fix: add VERSION to env in publish.yaml (#5868)
When I did the last release, `VERSION` wasn't defined which lead to a
blank string in the PR title and the commit message here:

https://github.com/coder/code-server-aur/pull/24

This should fix that.
2022-12-12 21:24:06 +00:00
Joe Previte
48588ee542
chore: update download artifacts in release (#5841) 2022-12-12 17:47:27 +00:00
Geoffrey Huntley
ac6b5bd4e6
chore(nfpm): bump to latest version (#5860) 2022-12-12 08:52:33 -07:00
Joe Previte
0ca6620ee6
fix: add missing keytar deps (#5851)
* fix: add missing keytar deps

* fixup
2022-12-08 11:30:08 -07:00
Joe Previte
907747d394
refactor: remove yarn.lock steps (#5850) 2022-12-08 10:44:27 -07:00
Joe Previte
d8995ec0b8
refactor: use npm in build.yaml (#5849) 2022-12-08 10:37:42 -07:00
Joe Previte
c088e73063
fix: use proper npm casing postinstall (#5848)
* fix: use proper npm casing postinstall

* chore: add log for npm config user agent

* fixup
2022-12-08 10:22:40 -07:00
Joe Previte
83c3453f50
fix: quote VERSION in jq command in release (#5845) 2022-12-07 22:19:20 +00:00
Joe Previte
3182be634e
refactor: use npm in build steps and postinstall.sh (#5844)
* refactor: default to npm in postinstall.sh

yarn has a bug where it will try to update dependencies even if
`yarn.lock` is present. Therefore we're defaulting to `npm` to prevent
further issues.

* refactor: exclude yarn.lock in standalone

By excluding `yarn.lock`, we prevent issues where the user must use
`yarn` instead of `npm` to install code-server.
2022-12-07 15:04:50 -07:00
Joe Previte
1297e9ac88
chore: update qs version (#5840) 2022-12-07 14:57:08 -06:00
Joe Previte
1484bee621
release: 4.9.0 (#5772)
* wip: changelog

* fixup

* fix: add +x to product.json in build-vscode

While testing a pre-release, there seems to be a bug with the file
permissions for `product.json`. Adding `chmod +x` to see if that fixes
it.

* chore: increase timeout

* fix: keep product.json file permissions in release

When we added the change to modify the `package.json` version using `mv`
and `jq` we didn't account for lost file permissions.

This caused a bug only happening in CI.

This should fix it by giving it 755 via `chmod`.

* trigger ci

* chore: update package.json bust cache

* fixup!: fix: keep product.json file permissions in release

* Revert "fix: add +x to product.json in build-vscode"

This reverts commit fc4d2b532f.

* chore: pin ubuntu runner in build code-server

* chore: update prettierignore

* chore: add notes to changelog

* chore: use ubuntu-22.04 for e2e

* chore: pin all jobs in build to ubuntu 20.04

* feat(wrapper): add tests for isChild

* fixup: include description ts-expect-error comment

* chore: update CHANGELOG

* chore: update Helm chart

* fixup: use our childProcess

* Update CHANGELOG.md

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
2022-12-06 13:28:27 -07:00
Pfau, Sascha
f43082e142
fix installing code-server on manjaro image (#5834)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-12-05 15:43:22 -07:00
Geoffrey Huntley
b6adcf50c6
feat(securitytxt): add security.txt (#5827) 2022-12-05 15:43:00 -07:00
Joe Previte
df49838739
chore: add VERSION check in build-vscode.sh (#5823) 2022-12-01 11:51:07 -05:00
renovate[bot]
2cbb1135e1
chore(deps): update minor dependency updates (#5787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 09:51:03 -07:00
Geoffrey Huntley
43e8c439bf
housekeeping(branding): update coder/coder branding (#5781) 2022-11-14 12:28:42 -06:00
Joe Previte
74edfe7c43
chore: fix typo in release.yaml (#5774) 2022-11-10 13:48:56 -07:00
Joe Previte
69d469b714
chore: update Code to 1.73.1 (#5769) 2022-11-10 12:46:21 -07:00
Joe Previte
e2f585f368
docs: add --edge to install section (#5767)
This adds documentation for the flag `--edge` which we've had for a
while but forgot to document.

Fixes #5717

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-11-10 11:50:37 -07:00
Joe Previte
3367e1ad4e
chore: upgrade Code to 1.73.0 (#5751)
* chore: upgrade Code to 1.73.0

This upgrades Code to 1.73.0 via the tag.

* chore: refresh integration patch

* chore: clean up base-path patch

Only change here was they moved
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts

so I had to update it. Code still looks the same though.

* chore: refresh proposed-api patch

* chore: update marketplace patch

Simlar to a previous patch, the location of
lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
changed so I had to update this patch.

No changes to code itself.

* chore: update hash in webview patch

I believe there was only one to update but I may have missed one.

* chore: refresh disable-builtin-ext-update.diff

* chore: refresh update-check

quilt couldn't apply it so I had to add one change in manually to
lib/vscode/src/vs/server/node/serverEnvironmentService.ts

* chore: refresh logout patch

* chore: refresh proxy-uri patch

* chore: refresh local-storage patch

* chore: refresh sourcemaps patch

* chore: refresh disable-downloads patch

* chore: refresh telemetry patch

* refactor: re-apply display-language patch

This kinda got removed but I added it back in.

* refactor: drop exec-argv patch

This was accepted upstream! :tada

* chore: refresh getting-started patch

* fixup: add missing slash in marketplace

* fixup: update notes proposed-api patch

* fixup: support this.args.log as string

Seems like upstream now uses a string[] for this. For now, support
string.

See
2b50ab06b1

* Revert "fixup: support this.args.log as string"

This reverts commit 78c02a1f13.

* fixup!: add log to toCodeArgs

This was changed upstream from `string` to `string[]` so now we convert
to an array in `toCodeArgs`.

See 78c02a1f13

* fixup: update telemetry description
2022-11-09 22:10:03 +00:00
renovate[bot]
c885c96644
chore(deps): update minor dependency updates (#5720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 14:03:07 -07:00
Joe Previte
b978655c07
refactor: get version dynamically (#5753)
* refactor: get version dynamically

* chore: remove version

* fixup: missing quotes

* refactor: drop global VERSION

* wip: updating ersion in publish

* refactor: update publish.yaml with version changes

* refactor: release.yaml with new version changes

* refactor: update build.yaml with version changes

* chore: update maintainer

* fixup: update version in build-vscode

* fixup: fix github env version

* try macos only

* try again

* last resort

* joe again

* this oneee

* fixup: this should work

* try using inputs

* docs: update release notes

* fixup!: use env.VERSION in docker step

* fixup!: comment get and set version

* fixup!: remove compress release package comment

* fixup!: use $VERSION in npm-version

* refactor: set VERSION in build VS Code step

* refactor: use 0.0.0 in package.json version

* refactor: delete release-prep script

* Update ci/build/build-vscode.sh

* fixup!: remove extra VERSION set in aur
2022-11-08 22:45:01 +00:00
Joe Previte
5a8bb2b8e8
release: v4.8.3 (#5762)
* chore: update version to 4.8.3

* chore: update CHANGELOG

* fixup!: update chart version

* fixup: update changelog
2022-11-07 19:47:40 +00:00
209 changed files with 19567 additions and 12184 deletions

View file

@ -1,43 +0,0 @@
parser: "@typescript-eslint/parser"
env:
browser: true
es6: true # Map, etc.
jest: true
node: true
parserOptions:
ecmaVersion: 2018
sourceType: module
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:import/recommended
- plugin:import/typescript
- plugin:prettier/recommended
# Prettier should always be last
# Removes eslint rules that conflict with prettier.
- prettier
rules:
# Sometimes you need to add args to implement a function signature even
# if they are unused.
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }]
# For overloads.
no-dupe-class-members: off
"@typescript-eslint/no-use-before-define": off
"@typescript-eslint/no-non-null-assertion": off
"@typescript-eslint/ban-types": off
"@typescript-eslint/no-var-requires": off
"@typescript-eslint/explicit-module-boundary-types": off
"@typescript-eslint/no-explicit-any": off
"@typescript-eslint/no-extra-semi": off
eqeqeq: error
import/order:
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
no-async-promise-executor: off
settings:
import/resolver:
typescript:
alwaysTryTypes: true

2
.git-blame-ignore-revs Normal file
View file

@ -0,0 +1,2 @@
# Prettier 3.4.2
9b0340a09276f93c054d705d1b9a5f24cc5dbc97

2
.github/CODEOWNERS vendored
View file

@ -3,3 +3,5 @@
ci/helm-chart/ @Matthew-Beckett @alexgorbatchev ci/helm-chart/ @Matthew-Beckett @alexgorbatchev
docs/install.md @GNUxeava docs/install.md @GNUxeava
src/node/i18n/locales/zh-cn.json @zhaozhiming

View file

@ -1,6 +1,5 @@
name: Bug report name: Bug report
description: File a bug report description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"] labels: ["bug", "triage"]
body: body:
- type: checkboxes - type: checkboxes
@ -10,6 +9,7 @@ body:
options: options:
- label: I have searched the existing issues - label: I have searched the existing issues
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: OS/Web Information label: OS/Web Information
@ -20,6 +20,8 @@ body:
- **Remote OS**: Ubuntu - **Remote OS**: Ubuntu
- **Remote Architecture**: amd64 - **Remote Architecture**: amd64
- **`code-server --version`**: 4.0.1 - **`code-server --version`**: 4.0.1
Please do not just put "latest" for the version.
value: | value: |
- Web Browser: - Web Browser:
- Local OS: - Local OS:
@ -28,58 +30,94 @@ body:
- `code-server --version`: - `code-server --version`:
validations: validations:
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: Steps to Reproduce label: Steps to Reproduce
description: | description: |
1. open code-server Please describe exactly how to reproduce the bug. For example:
2. install extension 1. Open code-server in Firefox
3. run command 2. Install extension `foo.bar` from the extensions sidebar
3. Run command `foo.bar.baz`
value: | value: |
1. 1.
2. 2.
3. 3.
validations: validations:
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: Expected label: Expected
description: What should happen? description: What should happen?
validations: validations:
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: Actual label: Actual
description: What actually happens? description: What actually happens?
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: logs id: logs
attributes: attributes:
label: Logs label: Logs
description: Run code-server with the --verbose flag and then paste any relevant logs from the server, from the browser console and/or the browser network tab. For issues with installation, include installation logs (i.e. output of `yarn global add code-server`). description: Run code-server with the --verbose flag and then paste any relevant logs from the server, from the browser console and/or the browser network tab. For issues with installation, include installation logs (i.e. output of `npm install -g code-server`).
render: shell
- type: textarea - type: textarea
attributes: attributes:
label: Screenshot/Video label: Screenshot/Video
description: Please include a screenshot, gif or screen recording of your issue. description: Please include a screenshot, gif or screen recording of your issue.
validations: validations:
required: false required: false
- type: dropdown
attributes:
label: Does this bug reproduce in native VS Code?
description: If the bug reproduces in native VS Code, submit the issue upstream instead (https://github.com/microsoft/vscode).
options:
- Yes, this is also broken in native VS Code
- No, this works as expected in native VS Code
- This cannot be tested in native VS Code
- I did not test native VS Code
validations:
required: true
- type: dropdown
attributes:
label: Does this bug reproduce in VS Code web?
description: If the bug reproduces in VS Code web, submit the issue upstream instead (https://github.com/microsoft/vscode). You can run VS Code web with `code serve-web`.
options:
- Yes, this is also broken in VS Code web
- No, this works as expected in VS Code web
- This cannot be tested in VS Code web
- I did not test VS Code web
validations:
required: true
- type: dropdown
attributes:
label: Does this bug reproduce in GitHub Codespaces?
description: If the bug reproduces in GitHub Codespaces, submit the issue upstream instead (https://github.com/microsoft/vscode).
options:
- Yes, this is also broken in GitHub Codespaces
- No, this works as expected in GitHub Codespaces
- This cannot be tested in GitHub Codespaces
- I did not test GitHub Codespaces
validations:
required: true
- type: checkboxes - type: checkboxes
attributes: attributes:
label: Does this issue happen in VS Code or GitHub Codespaces? label: Are you accessing code-server over a secure context?
description: Please try reproducing this issue in VS Code or GitHub Codespaces description: code-server relies on service workers (which only work in secure contexts) for many features. Double-check that you are using a secure context like HTTPS or localhost.
options: options:
- label: I cannot reproduce this in VS Code. - label: I am using a secure context.
required: true required: false
- label: I cannot reproduce this in GitHub Codespaces.
required: true
- type: checkboxes
attributes:
label: Are you accessing code-server over HTTPS?
description: code-server relies on service workers for many features. Double-check that you are using HTTPS.
options:
- label: I am using HTTPS.
required: true
- type: textarea - type: textarea
attributes: attributes:
label: Notes label: Notes

View file

@ -1,9 +1,7 @@
--- ---
name: Documentation improvement name: Documentation improvement
about: Suggest a documentation improvement about: Suggest a documentation improvement
title: "[Docs]: "
labels: "docs" labels: "docs"
assignees: "@jsjoeio"
--- ---
## What is your suggestion? ## What is your suggestion?

View file

@ -1,9 +1,7 @@
--- ---
name: Feature request name: Feature request
about: Suggest an idea to improve code-server about: Suggest an idea to improve code-server
title: "[Feat]: "
labels: enhancement labels: enhancement
assignees: ""
--- ---
## What is your suggestion? ## What is your suggestion?

View file

@ -1,17 +0,0 @@
<!-- Note: this variable $CODE_SERVER_VERSION_TO_UPDATE will be set when you run the release-prep.sh script with `yarn release:prep` -->
This PR is to generate a new release of `code-server` at `$CODE_SERVER_VERSION_TO_UPDATE`
## Screenshot
TODO
## TODOs
Follow "Publishing a release" steps in `ci/README.md`
<!-- Note some of these steps below are redundant since they're listed in the "Publishing a release" docs -->
- [ ] update `CHANGELOG.md`
- [ ] manually run "Draft release" workflow after merging this PR
- [ ] merge PR opened in [code-server-aur](https://github.com/coder/code-server-aur)

31
.github/dependabot.yaml vendored Normal file
View file

@ -0,0 +1,31 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
time: "06:00"
timezone: "America/Chicago"
labels: []
commit-message:
prefix: "chore"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
time: "06:00"
timezone: "America/Chicago"
commit-message:
prefix: "chore"
labels: []
ignore:
# Ignore patch updates for all dependencies
- dependency-name: "*"
update-types:
- version-update:semver-patch
# Ignore major updates to Node.js types, because they need to
# correspond to the Node.js engine version
- dependency-name: "@types/node"
update-types:
- version-update:semver-major

29
.github/ranger.yml vendored
View file

@ -1,29 +0,0 @@
# Configuration for the repo ranger bot
# See docs: https://www.notion.so/Documentation-8d7627bb1f3c42b7b1820e8d6f157a57#9879d1374fab4d1f9c607c230fd5123d
default:
close:
# Default time to wait before closing the label. Can either be a number in milliseconds
# or a string specified by the `ms` package (https://www.npmjs.com/package/ms)
delay: "2 days"
# Default comment to post when an issue is first marked with a closing label
comment: "⚠️ This issue has been marked $LABEL and will be closed in $DELAY."
labels:
duplicate: close
wontfix: close
"squash when passing": merge
"rebase when passing": merge
"merge when passing": merge
"new contributor":
action: comment
delay: 5s
message: "Thanks for making your first contribution! :slightly_smiling_face:"
"upstream:vscode":
action: close
delay: 5s
comment: >
This issue has been marked as 'upstream:vscode'.
Please file this upstream: [link to open issue](https://github.com/microsoft/vscode/issues/new/choose)
This issue will automatically close in $DELAY.

View file

@ -19,382 +19,278 @@ concurrency:
# this ensures that it only executes if all previous jobs succeeded. # this ensures that it only executes if all previous jobs succeeded.
# if: steps.cache-node-modules.outputs.cache-hit != 'true' # if: steps.cache-node-modules.outputs.cache-hit != 'true'
# will skip running `yarn install` if it successfully fetched from cache # will skip running `npm install` if it successfully fetched from cache
jobs: jobs:
prettier: changes:
name: Format with Prettier
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5 outputs:
ci: ${{ steps.filter.outputs.ci }}
code: ${{ steps.filter.outputs.code }}
deps: ${{ steps.filter.outputs.deps }}
docs: ${{ steps.filter.outputs.docs }}
helm: ${{ steps.filter.outputs.helm }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Check changed files
- name: Run prettier with actionsx/prettier uses: dorny/paths-filter@v3
uses: actionsx/prettier@v2 id: filter
with: with:
args: --check --loglevel=warn . filters: |
ci:
- ".github/**"
- "ci/**"
docs:
- "docs/**"
- "README.md"
- "CHANGELOG.md"
helm:
- "ci/helm-chart/**"
code:
- "src/**"
- "test/**"
deps:
- "lib/**"
- "patches/**"
- "package-lock.json"
- "test/package-lock.json"
- id: debug
run: |
echo "${{ toJSON(steps.filter )}}"
prettier:
name: Run prettier check
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npx prettier --check .
doctoc: doctoc:
name: Doctoc markdown files name: Doctoc markdown files
runs-on: ubuntu-latest runs-on: ubuntu-22.04
timeout-minutes: 5 timeout-minutes: 5
needs: changes
if: needs.changes.outputs.docs == 'true'
steps: steps:
- name: Checkout repo - uses: actions/checkout@v6
uses: actions/checkout@v3 - uses: actions/setup-node@v6
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v26.1
with: with:
files: | node-version-file: .node-version
docs/** cache: npm
cache-dependency-path: |
- name: Install Node.js v16 package-lock.json
if: steps.changed-files.outputs.any_changed == 'true' test/package-lock.json
uses: actions/setup-node@v3 - run: SKIP_SUBMODULE_DEPS=1 npm ci
with: - run: npm run doctoc
node-version: "16"
cache: "yarn"
- name: Install doctoc
run: yarn global add doctoc@2.2.1
- name: Run doctoc
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn doctoc
lint-helm: lint-helm:
name: Lint Helm chart name: Lint Helm chart
runs-on: ubuntu-latest runs-on: ubuntu-22.04
timeout-minutes: 5 timeout-minutes: 5
needs: changes
if: needs.changes.outputs.helm == 'true'
steps: steps:
- name: Checkout repo - uses: actions/checkout@v6
uses: actions/checkout@v3 - uses: azure/setup-helm@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v26.1
with:
files: |
ci/helm-chart/**
- name: Install helm
if: steps.changed-files.outputs.any_changed == 'true'
uses: azure/setup-helm@v3.4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- run: helm plugin install https://github.com/instrumenta/helm-kubeval
- name: Install helm kubeval plugin - run: helm kubeval ci/helm-chart
if: steps.changed-files.outputs.any_changed == 'true'
run: helm plugin install https://github.com/instrumenta/helm-kubeval
- name: Lint Helm chart
if: steps.changed-files.outputs.any_changed == 'true'
run: helm kubeval ci/helm-chart
lint-ts: lint-ts:
name: Lint TypeScript files name: Lint TypeScript files
runs-on: ubuntu-latest runs-on: ubuntu-22.04
timeout-minutes: 5 timeout-minutes: 5
needs: changes
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run lint:ts
lint-actions:
name: Lint GitHub Actions
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.ci == 'true'
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.9
./actionlint -color -shellcheck= -ignore "softprops/action-gh-release"
shell: bash
test-unit:
name: Run unit tests
runs-on: ubuntu-22.04
timeout-minutes: 5
needs: changes
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with: with:
fetch-depth: 2 node-version-file: .node-version
cache: npm
- name: Get changed files cache-dependency-path: |
id: changed-files package-lock.json
uses: tj-actions/changed-files@v26.1 test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- run: npm run test:unit
- uses: codecov/codecov-action@v5
if: success()
with: with:
files: | token: ${{ secrets.CODECOV_TOKEN }}
**/*.ts
**/*.js
files_ignore: |
lib/vscode/**
- name: Install Node.js v16
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Lint TypeScript files
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn lint:ts
build: build:
name: Build code-server name: Build code-server
runs-on: ubuntu-latest runs-on: ubuntu-22.04
timeout-minutes: 30 timeout-minutes: 70
env: env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
DISABLE_V8_COMPILE_CACHE: 1
steps: steps:
- name: Checkout repo - uses: actions/checkout@v6
uses: actions/checkout@v3
with: with:
submodules: true submodules: true
- run: sudo apt update && sudo apt install -y libkrb5-dev
- name: Install quilt - uses: awalsh128/cache-apt-pkgs-action@latest
uses: awalsh128/cache-apt-pkgs-action@latest
with: with:
packages: quilt packages: quilt
version: 1.0 version: 1.0
- run: quilt push -a
- name: Patch Code - uses: actions/setup-node@v6
run: quilt push -a
- name: Install Node.js v16
uses: actions/setup-node@v3
with: with:
node-version: "16" node-version-file: .node-version
cache: npm
- name: Fetch dependencies from cache cache-dependency-path: |
id: cache-node-modules package-lock.json
uses: actions/cache@v3 test/package-lock.json
with: - run: SKIP_SUBMODULE_DEPS=1 npm ci
path: "**/node_modules" - run: npm run build
key: yarn-build-${{ hashFiles('**/yarn.lock') }} env:
restore-keys: | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
yarn-build-
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Build code-server
run: yarn build
# Get Code's git hash. When this changes it means the content is # Get Code's git hash. When this changes it means the content is
# different and we need to rebuild. # different and we need to rebuild.
- name: Get latest lib/vscode rev - name: Get latest lib/vscode rev
id: vscode-rev id: vscode-rev
run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)" run: echo "rev=$(git rev-parse HEAD:./lib/vscode)" >> $GITHUB_OUTPUT
- name: Get version
id: version
run: echo "::set-output name=version::$(jq -r .version package.json)"
# We need to rebuild when we have a new version of Code, when any of # We need to rebuild when we have a new version of Code, when any of
# the patches changed, or when the code-server version changes (since # the patches changed, or when the code-server version changes (since
# it gets embedded into the code). Use VSCODE_CACHE_VERSION to # it gets embedded into the code). Use VSCODE_CACHE_VERSION to
# force a rebuild. # force a rebuild.
- name: Fetch prebuilt Code package from cache - name: Fetch prebuilt Code package from cache
id: cache-vscode id: cache-vscode
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: lib/vscode-reh-web-* path: lib/vscode-reh-web-*
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ steps.version.outputs.version }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }} key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
- name: Build vscode - name: Build vscode
env:
VERSION: "0.0.0"
if: steps.cache-vscode.outputs.cache-hit != 'true' if: steps.cache-vscode.outputs.cache-hit != 'true'
run: yarn build:vscode run: |
pushd lib/vscode
# Our code imports code from VS Code's `out` directory meaning VS Code npm ci
# must be built before running these tests. popd
# TODO: Move to its own step? npm run build:vscode
- name: Run code-server unit tests
run: yarn test:unit
if: success()
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
# The release package does not contain any native modules # The release package does not contain any native modules
# and is neutral to architecture/os/libc version. # and is neutral to architecture/os/libc version.
- name: Create release package - run: npm run release
run: yarn release
if: success() if: success()
# https://github.com/actions/upload-artifact/issues/38 # https://github.com/actions/upload-artifact/issues/38
- name: Compress release package - run: tar -czf package.tar.gz release
run: tar -czf package.tar.gz release - uses: actions/upload-artifact@v4
- name: Upload npm package artifact
uses: actions/upload-artifact@v3
with: with:
name: npm-package name: npm-package
path: ./package.tar.gz path: ./package.tar.gz
npm:
name: Publish npm package
# the npm-package gets uploaded as an artifact in Build
# so we need that to complete before this runs
needs: build
# This environment "npm" requires someone from
# coder/code-server-reviewers to approve the PR before this job runs.
environment: npm
# Only run if PR comes from base repo or event is not a PR
# Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
id: download
with:
name: "npm-package"
path: release-npm-package
- name: Run ./ci/steps/publish-npm.sh
run: yarn publish:npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# NOTE@jsjoeio
# NPM_ENVIRONMENT intentionally not set here.
# Instead, itis determined in publish-npm.sh script
# using GITHUB environment variables
- name: Comment npm information
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ github.token }}
header: npm-dev-build
message: |
✨ code-server dev build published to npm for PR #${{ github.event.number }}!
* _Last publish status_: success
* _Commit_: ${{ github.event.pull_request.head.sha }}
To install in a local project, run:
```shell-session
npm install @coder/code-server-pr@${{ github.event.number }}
```
To install globally, run:
```shell-session
npm install -g @coder/code-server-pr@${{ github.event.number }}
```
test-e2e: test-e2e:
name: Run e2e tests name: Run e2e tests
needs: build runs-on: ubuntu-22.04
runs-on: ubuntu-latest timeout-minutes: 25
timeout-minutes: 15 needs: [changes, build]
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true'
steps: steps:
- name: Checkout repo - uses: actions/checkout@v6
uses: actions/checkout@v3 - run: sudo apt update && sudo apt install -y libkrb5-dev
- uses: actions/setup-node@v6
- name: Install Node.js v16
uses: actions/setup-node@v3
with: with:
node-version: "16" node-version-file: .node-version
cache: npm
- name: Fetch dependencies from cache cache-dependency-path: |
id: cache-node-modules package-lock.json
uses: actions/cache@v3 test/package-lock.json
with: - run: SKIP_SUBMODULE_DEPS=1 npm ci
path: "**/node_modules" - uses: actions/download-artifact@v5
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Download npm package
uses: actions/download-artifact@v3
with: with:
name: npm-package name: npm-package
- run: tar -xzf package.tar.gz
- name: Decompress npm package - run: cd release && npm install --unsafe-perm --omit=dev
run: tar -xzf package.tar.gz
- name: Install release package dependencies
run: cd release && yarn install
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Install Playwright OS dependencies - name: Install Playwright OS dependencies
run: | run: |
./test/node_modules/.bin/playwright install-deps ./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install ./test/node_modules/.bin/playwright install
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
- name: Run end-to-end tests - uses: actions/upload-artifact@v4
run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e --global-timeout 840000
- name: Upload test artifacts
if: always() if: always()
uses: actions/upload-artifact@v3
with: with:
name: failed-test-videos name: failed-test-videos
path: ./test/test-results path: ./test/test-results
- run: rm -rf ./release ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release ./test/test-results
test-e2e-proxy: test-e2e-proxy:
name: Run e2e tests behind proxy name: Run e2e tests behind proxy
needs: build runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 25 timeout-minutes: 25
needs: [changes, build]
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true'
steps: steps:
- name: Checkout repo - uses: actions/checkout@v6
uses: actions/checkout@v3 - run: sudo apt update && sudo apt install -y libkrb5-dev
- uses: actions/setup-node@v6
- name: Install Node.js v16
uses: actions/setup-node@v3
with: with:
node-version: "16" node-version-file: .node-version
cache: npm
- name: Fetch dependencies from cache cache-dependency-path: |
id: cache-node-modules package-lock.json
uses: actions/cache@v3 test/package-lock.json
with: - run: SKIP_SUBMODULE_DEPS=1 npm ci
path: "**/node_modules" - uses: actions/download-artifact@v5
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Download npm package
uses: actions/download-artifact@v3
with: with:
name: npm-package name: npm-package
- run: tar -xzf package.tar.gz
- name: Decompress npm package - run: cd release && npm install --unsafe-perm --omit=dev
run: tar -xzf package.tar.gz
- name: Install release package dependencies
run: cd release && yarn install
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Install Playwright OS dependencies - name: Install Playwright OS dependencies
run: | run: |
./test/node_modules/.bin/playwright install-deps ./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install ./test/node_modules/.bin/playwright install
- name: Cache Caddy - name: Cache Caddy
uses: actions/cache@v2 uses: actions/cache@v4
id: caddy-cache id: caddy-cache
with: with:
path: | path: |
~/.cache/caddy ~/.cache/caddy
key: cache-caddy-2.5.2 key: cache-caddy-2.5.2
- name: Install Caddy - name: Install Caddy
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -403,23 +299,13 @@ jobs:
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz" gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
mkdir -p ~/.cache/caddy mkdir -p ~/.cache/caddy
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
- run: ~/.cache/caddy/caddy start --config ./ci/Caddyfile
- name: Start Caddy - run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile - run: ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
- name: Run end-to-end tests
run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e:proxy --global-timeout 840000
- name: Stop Caddy
if: always() if: always()
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
- name: Upload test artifacts - uses: actions/upload-artifact@v4
if: always() if: always()
uses: actions/upload-artifact@v3
with: with:
name: failed-test-videos-proxy name: failed-test-videos-proxy
path: ./test/test-results path: ./test/test-results
- name: Remove release packages and test artifacts
run: rm -rf ./release ./test/test-results

View file

@ -1,46 +0,0 @@
name: Docs preview
on:
pull_request:
branches:
- main
paths:
- "docs/**"
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pull-requests: write
repository-projects: none
security-events: none
statuses: none
jobs:
preview:
name: Docs preview
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Comment Credentials
uses: marocchino/sticky-pull-request-comment@v2
# Only run if PR comes from base repo
# Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository
with:
GITHUB_TOKEN: ${{ github.token }}
header: codercom-preview-docs
message: |
✨ code-server docs for PR #${{ github.event.number }} is ready! It will be updated on every commit.
* _Host_: https://coder.com/docs/code-server/${{ steps.vars.outputs.sha_short }}
* _Last deploy status_: success
* _Commit_: ${{ github.event.pull_request.head.sha }}
* _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

View file

@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install code-server - name: Install code-server
run: ./install.sh run: ./install.sh
@ -41,10 +41,10 @@ jobs:
alpine: alpine:
name: Test installer on Alpine name: Test installer on Alpine
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: "alpine:3.16" container: "alpine:3.17"
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install curl - name: Install curl
run: apk add curl run: apk add curl
@ -67,7 +67,7 @@ jobs:
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install code-server - name: Install code-server
run: ./install.sh run: ./install.sh

View file

@ -4,6 +4,11 @@ on:
# Shows the manual trigger in GitHub UI # Shows the manual trigger in GitHub UI
# helpful as a back-up in case the GitHub Actions Workflow fails # helpful as a back-up in case the GitHub Actions Workflow fails
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: The version to publish (include "v", i.e. "v4.9.1").
type: string
required: true
release: release:
types: [released] types: [released]
@ -16,80 +21,54 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
# NOTE: this job requires curl, jq and yarn
# All of them are included in ubuntu-latest.
npm: npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code-server - name: Checkout code-server
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Get version - name: Install Node.js
id: version uses: actions/setup-node@v6
run: echo "::set-output name=version::$(jq -r .version package.json)" with:
node-version-file: .node-version
- name: Download npm package from release artifacts - name: Download npm package from release artifacts
uses: robinraju/release-downloader@v1.5 uses: robinraju/release-downloader@v1.12
with: with:
repository: "coder/code-server" repository: "coder/code-server"
tag: v${{ steps.version.outputs.version }} tag: ${{ github.event.inputs.version || github.ref_name }}
fileName: "package.tar.gz" fileName: "package.tar.gz"
out-file-path: "release-npm-package" out-file-path: "release-npm-package"
- name: Publish npm package and tag with "latest" # Strip out the v (v4.9.1 -> 4.9.1).
run: yarn publish:npm - name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- run: npm run publish:npm
env: env:
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_ENVIRONMENT: "production" NPM_ENVIRONMENT: "production"
homebrew:
needs: npm
runs-on: ubuntu-latest
steps:
# Ensure things are up to date
# Suggested by homebrew maintainers
# https://github.com/Homebrew/discussions/discussions/1532#discussioncomment-782633
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Checkout code-server
uses: actions/checkout@v3
- name: Configure git
run: |
git config --global user.name cdrci
git config --global user.email opensource@coder.com
- name: Bump code-server homebrew version
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: ./ci/steps/brew-bump.sh
aur: aur:
needs: npm
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
env: env:
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
steps: steps:
# We need to checkout code-server so we can get the version # We need to checkout code-server so we can get the version
- name: Checkout code-server - name: Checkout code-server
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
path: "./code-server" path: "./code-server"
- name: Get code-server version
id: version
run: |
pushd code-server
echo "::set-output name=version::$(jq -r .version package.json)"
popd
- name: Checkout code-server-aur repo - name: Checkout code-server-aur repo
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
repository: "cdrci/code-server-aur" repository: "cdrci/code-server-aur"
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
@ -106,60 +85,82 @@ jobs:
git config --global user.name cdrci git config --global user.name cdrci
git config --global user.email opensource@coder.com git config --global user.email opensource@coder.com
# Strip out the v (v4.9.1 -> 4.9.1).
- name: Get and set VERSION
run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Validate package - name: Validate package
uses: hapakaien/archlinux-package-action@v2 uses: heyhusen/archlinux-package-action@v2.4.0
env:
VERSION: ${{ env.VERSION }}
with: with:
pkgver: ${{ steps.version.outputs.version }} pkgver: ${{ env.VERSION }}
updpkgsums: true updpkgsums: true
srcinfo: true srcinfo: true
- name: Open PR - name: Open PR
# We need to git push -u otherwise gh will prompt # We need to git push -u otherwise gh will prompt
# asking where to push the branch. # asking where to push the branch.
env:
VERSION: ${{ env.VERSION }}
run: | run: |
git checkout -b update-version-${{ steps.version.outputs.version }} git checkout -b update-version-${{ env.VERSION }}
git add . git add .
git commit -m "chore: updating version to ${{ steps.version.outputs.version }}" git commit -m "chore: updating version to ${{ env.VERSION }}"
git push -u origin $(git branch --show) git push -u origin $(git branch --show)
gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ steps.version.outputs.version }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ env.VERSION }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR
docker: docker:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
- name: Checkout code-server - name: Checkout code-server
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR - name: Login to GHCR
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Get version # Strip out the v (v4.9.1 -> 4.9.1).
id: version - name: Get and set VERSION
run: echo "::set-output name=version::$(jq -r .version package.json)" run: |
TAG="${{ github.event.inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Download release artifacts - name: Download deb artifacts
uses: robinraju/release-downloader@v1.5 uses: robinraju/release-downloader@v1.12
with: with:
repository: "coder/code-server" repository: "coder/code-server"
tag: v${{ steps.version.outputs.version }} tag: v${{ env.VERSION }}
fileName: "*.deb" fileName: "*.deb"
out-file-path: "release-packages" out-file-path: "release-packages"
- name: Download rpm artifacts
uses: robinraju/release-downloader@v1.12
with:
repository: "coder/code-server"
tag: v${{ env.VERSION }}
fileName: "*.rpm"
out-file-path: "release-packages"
- name: Publish to Docker - name: Publish to Docker
run: yarn publish:docker run: ./ci/steps/docker-buildx-push.sh
env: env:
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}

View file

@ -2,6 +2,11 @@ name: Draft release
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: The version to publish (include "v", i.e. "v4.9.1").
type: string
required: true
permissions: permissions:
contents: write # For creating releases. contents: write # For creating releases.
@ -14,139 +19,73 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
# TODO: cache building yarn --production package-linux-cross:
# possibly 2m30s of savings(?) name: ${{ matrix.prefix }}
# this requires refactoring our release scripts
package-linux-amd64:
name: x86-64 Linux build
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
container: "centos:7" needs: npm-version
env: container: "python:3.8-slim-buster"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Node.js v16
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install development tools
run: |
yum install -y epel-release centos-release-scl make
yum install -y devtoolset-9-{make,gcc,gcc-c++} jq rsync python3
- name: Install nfpm and envsubst
run: |
mkdir -p ~/.local/bin
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
curl -sSfL https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m` -o envsubst
chmod +x envsubst
mv envsubst ~/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install yarn
run: npm install -g yarn
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
id: download
with:
branch: ${{ github.ref }}
workflow: build.yaml
workflow_conclusion: completed
check_artifacts: true
name: npm-package
- name: Decompress npm package
run: tar -xzf package.tar.gz
# NOTE: && here is deliberate - GitHub puts each line in its own `.sh`
# file when running inside a docker container.
- name: Build standalone release
run: source scl_source enable devtoolset-9 && yarn release:standalone
- name: Fetch dependencies from cache
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install test dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Run integration tests on standalone release
run: yarn test:integration
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
- name: Build packages with nfpm
run: yarn package
- uses: softprops/action-gh-release@v1
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
# NOTE@oxy:
# We use Ubuntu 16.04 here, so that our build is more compatible
# with older libc versions. We used to (Q1'20) use CentOS 7 here,
# but it has a full update EOL of Q4'20 and a 'critical security'
# update EOL of 2024. We're dropping full support a few years before
# the final EOL, but I don't believe CentOS 7 has a large arm64 userbase.
# It is not feasible to cross-compile with CentOS.
# Cross-compile notes: To compile native dependencies for arm64,
# we install the aarch64/armv7l cross toolchain and then set it as the default
# compiler/linker/etc. with the AR/CC/CXX/LINK environment variables.
# qemu-user-static on ubuntu-16.04 currently doesn't run Node correctly,
# so we just build with "native"/x86_64 node, then download arm64/armv7l node
# and then put it in our release. We can't smoke test the cross build this way,
# but this means we don't need to maintain a self-hosted runner!
# NOTE@jsjoeio:
# We used to use 16.04 until GitHub deprecated it on September 20, 2021
# See here: https://github.com/actions/virtual-environments/pull/3862/files
package-linux-cross:
name: Linux cross-compile builds
runs-on: ubuntu-18.04
timeout-minutes: 15
strategy: strategy:
matrix: matrix:
include: include:
- prefix: x86_64-linux-gnu
npm_arch: x64
apt_arch: amd64
package_arch: amd64
- prefix: aarch64-linux-gnu - prefix: aarch64-linux-gnu
arch: arm64 npm_arch: arm64
apt_arch: arm64
package_arch: arm64
- prefix: arm-linux-gnueabihf - prefix: arm-linux-gnueabihf
arch: armv7l npm_arch: armv7l
apt_arch: armhf
package_arch: armv7l
env: env:
AR: ${{ format('{0}-ar', matrix.prefix) }} AR: ${{ format('{0}-ar', matrix.prefix) }}
AS: ${{ format('{0}-as', matrix.prefix) }}
CC: ${{ format('{0}-gcc', matrix.prefix) }} CC: ${{ format('{0}-gcc', matrix.prefix) }}
CPP: ${{ format('{0}-cpp', matrix.prefix) }}
CXX: ${{ format('{0}-g++', matrix.prefix) }} CXX: ${{ format('{0}-g++', matrix.prefix) }}
LINK: ${{ format('{0}-g++', matrix.prefix) }} FC: ${{ format('{0}-gfortran', matrix.prefix) }}
NPM_CONFIG_ARCH: ${{ matrix.arch }} LD: ${{ format('{0}-ld', matrix.prefix) }}
NODE_VERSION: v16.13.0 STRIP: ${{ format('{0}-strip', matrix.prefix) }}
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
TARGET_ARCH: ${{ matrix.apt_arch }}
npm_config_arch: ${{ matrix.npm_arch }}
PKG_ARCH: ${{ matrix.package_arch }}
# Not building from source results in an x86_64 argon2, as if
# npm_config_arch is being ignored.
npm_config_build_from_source: true
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install Node.js v16 - name: Install Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v6
with: with:
node-version: "16" node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- name: Install cross-compiler and system dependencies
run: |
sed -i 's/deb\.debian\.org/archive.debian.org/g' /etc/apt/sources.list
dpkg --add-architecture $TARGET_ARCH
apt update && apt install -y --no-install-recommends \
crossbuild-essential-$TARGET_ARCH \
libx11-dev:$TARGET_ARCH \
libx11-xcb-dev:$TARGET_ARCH \
libxkbfile-dev:$TARGET_ARCH \
libsecret-1-dev:$TARGET_ARCH \
libkrb5-dev:$TARGET_ARCH \
ca-certificates \
curl wget rsync gettext-base
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Install nfpm - name: Install nfpm
run: | run: |
@ -154,35 +93,30 @@ jobs:
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install cross-compiler - name: Download npm package
run: sudo apt update && sudo apt install $PACKAGE uses: actions/download-artifact@v5
env:
PACKAGE: ${{ format('g++-{0}', matrix.prefix) }}
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
id: download
with: with:
branch: ${{ github.ref }} name: npm-release-package
workflow: build.yaml
workflow_conclusion: completed
check_artifacts: true
name: npm-package
- name: Decompress npm package - run: tar -xzf package.tar.gz
run: tar -xzf package.tar.gz - run: npm run release:standalone
- name: Build standalone release
run: yarn release:standalone
- name: Replace node with cross-compile equivalent - name: Replace node with cross-compile equivalent
run: | run: |
wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}.tar.xz node_version=$(node --version)
tar -xf node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}.tar.xz node-${NODE_VERSION}-linux-${NPM_CONFIG_ARCH}/bin/node --strip-components=2 wget https://nodejs.org/dist/${node_version}/node-${node_version}-linux-${npm_config_arch}.tar.xz
tar -xf node-${node_version}-linux-${npm_config_arch}.tar.xz node-${node_version}-linux-${npm_config_arch}/bin/node --strip-components=2
mv ./node ./release-standalone/lib/node mv ./node ./release-standalone/lib/node
- name: Build packages with nfpm # Strip out the v (v4.9.1 -> 4.9.1).
run: yarn package ${NPM_CONFIG_ARCH} - name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- env:
VERSION: ${{ env.VERSION }}
run: npm run package $PKG_ARCH
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v1
with: with:
@ -192,16 +126,26 @@ jobs:
package-macos-amd64: package-macos-amd64:
name: x86-64 macOS build name: x86-64 macOS build
runs-on: macos-latest runs-on: macos-15-intel
timeout-minutes: 15 timeout-minutes: 15
needs: npm-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install Node.js v16 - name: Install Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v6
with: with:
node-version: "16" node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Install nfpm - name: Install nfpm
run: | run: |
@ -209,40 +153,92 @@ jobs:
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Download artifacts # The version of node-gyp we use depends on distutils but it was removed
uses: dawidd6/action-download-artifact@v2 # in Python 3.12. It seems to be fixed in the latest node-gyp so when we
id: download # next update Node we can probably remove this. For now, install
# setuptools since it contains distutils.
- run: brew install python-setuptools
- name: Download npm package
uses: actions/download-artifact@v5
with: with:
branch: ${{ github.ref }} name: npm-release-package
workflow: build.yaml
workflow_conclusion: completed
check_artifacts: true
name: npm-package
- name: Decompress npm package - run: tar -xzf package.tar.gz
run: tar -xzf package.tar.gz - run: npm run release:standalone
- run: npm run test:native
- name: Build standalone release # Strip out the v (v4.9.1 -> 4.9.1).
run: yarn release:standalone - name: Get and set VERSION
run: |
- name: Fetch dependencies from cache TAG="${{ inputs.version || github.ref_name }}"
id: cache-node-modules echo "VERSION=${TAG#v}" >> $GITHUB_ENV
uses: actions/cache@v3
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install test dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn install
- name: Run native module tests on standalone release
run: yarn test:native
- name: Build packages with nfpm - name: Build packages with nfpm
run: yarn package env:
VERSION: ${{ env.VERSION }}
run: npm run package
- uses: softprops/action-gh-release@v1
with:
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
package-macos-arm64:
name: arm64 macOS build
runs-on: macos-latest
timeout-minutes: 15
needs: npm-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: |
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Install nfpm
run: |
mkdir -p ~/.local/bin
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
echo "$HOME/.local/bin" >> $GITHUB_PATH
# The version of node-gyp we use depends on distutils but it was removed
# in Python 3.12. It seems to be fixed in the latest node-gyp so when we
# next update Node we can probably remove this. For now, install
# setuptools since it contains distutils.
- run: brew install python-setuptools
- name: Download npm package
uses: actions/download-artifact@v5
with:
name: npm-release-package
- run: tar -xzf package.tar.gz
- run: npm run release:standalone
- run: npm run test:native
# Strip out the v (v4.9.1 -> 4.9.1).
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build packages with nfpm
env:
VERSION: ${{ env.VERSION }}
run: npm run package
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v1
with: with:
@ -254,19 +250,60 @@ jobs:
name: Upload npm package name: Upload npm package
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
needs: npm-version
steps: steps:
- name: Download artifacts - name: Download npm package
uses: dawidd6/action-download-artifact@v2 uses: actions/download-artifact@v5
id: download
with: with:
branch: ${{ github.ref }} name: npm-release-package
workflow: build.yaml
workflow_conclusion: completed
check_artifacts: true
name: npm-package
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v1
with: with:
draft: true draft: true
discussion_category_name: "📣 Announcements" discussion_category_name: "📣 Announcements"
files: ./package.tar.gz files: ./package.tar.gz
npm-version:
name: Modify package.json version
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v11
id: download
with:
branch: ${{ github.ref }}
workflow: build.yaml
workflow_conclusion: completed
name: npm-package
check_artifacts: false
if_no_artifact_found: fail
- run: tar -xzf package.tar.gz
# Strip out the v (v4.9.1 -> 4.9.1).
- name: Get and set VERSION
run: |
TAG="${{ inputs.version || github.ref_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Modify version
env:
VERSION: ${{ env.VERSION }}
run: |
echo "Updating version in root package.json"
npm version --prefix release "$VERSION"
echo "Updating version in lib/vscode/product.json"
tmp=$(mktemp)
jq ".codeServerVersion = \"$VERSION\"" release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
# Ensure it has the same permissions as before
chmod 644 release/lib/vscode/product.json
- run: tar -czf package.tar.gz release
- name: Upload npm package artifact
uses: actions/upload-artifact@v4
with:
name: npm-release-package
path: ./package.tar.gz

View file

@ -38,10 +38,10 @@ jobs:
name: Run script unit tests name: Run script unit tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
# This runs on Alpine to make sure we're testing with actual sh. # This runs on Alpine to make sure we're testing with actual sh.
container: "alpine:3.16" container: "alpine:3.17"
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install test utilities - name: Install test utilities
run: apk add bats checkbashisms run: apk add bats checkbashisms
@ -58,7 +58,7 @@ jobs:
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Install lint utilities - name: Install lint utilities
run: sudo apt install shellcheck run: sudo apt install shellcheck

View file

@ -12,44 +12,30 @@ on:
# Runs every Monday morning PST # Runs every Monday morning PST
- cron: "17 15 * * 1" - cron: "17 15 * * 1"
# Cancel in-progress runs for pull requests when developers push # Cancel in-progress runs for pull requests when developers push additional
# additional changes, and serialize builds in branches. # changes, and serialize builds in branches.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs: jobs:
audit-ci: audit:
name: Audit node modules name: Audit node modules
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Node.js v16 - name: Install Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v6
with: with:
node-version: "16" node-version-file: .node-version
- name: Fetch dependencies from cache - name: Audit npm for vulnerabilities
id: cache-yarn run: npm audit
uses: actions/cache@v3
with:
path: "**/node_modules"
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-build-
- name: Install dependencies
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
- name: Audit for vulnerabilities
run: yarn _audit
if: success() if: success()
trivy-scan-repo: trivy-scan-repo:
@ -57,15 +43,15 @@ jobs:
permissions: permissions:
contents: read # for actions/checkout to fetch code contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Run Trivy vulnerability scanner in repo mode - name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@e55de85beea5fcec743de6bb6bc56943a0af3c33 uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
with: with:
scan-type: "fs" scan-type: "fs"
scan-ref: "." scan-ref: "."
@ -76,7 +62,7 @@ jobs:
severity: "HIGH,CRITICAL" severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab - name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2 uses: github/codeql-action/upload-sarif@v3
with: with:
sarif_file: "trivy-repo-results.sarif" sarif_file: "trivy-repo-results.sarif"
@ -86,21 +72,21 @@ jobs:
contents: read # for actions/checkout to fetch code contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze with CodeQL name: Analyze with CodeQL
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v3
with: with:
config-file: ./.github/codeql-config.yml config-file: ./.github/codeql-config.yml
languages: javascript languages: javascript
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v2 uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v3

View file

@ -44,14 +44,14 @@ concurrency:
jobs: jobs:
trivy-scan-image: trivy-scan-image:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v6
- name: Run Trivy vulnerability scanner in image mode - name: Run Trivy vulnerability scanner in image mode
uses: aquasecurity/trivy-action@e55de85beea5fcec743de6bb6bc56943a0af3c33 uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
with: with:
image-ref: "docker.io/codercom/code-server:latest" image-ref: "docker.io/codercom/code-server:latest"
ignore-unfixed: true ignore-unfixed: true
@ -60,6 +60,6 @@ jobs:
severity: "HIGH,CRITICAL" severity: "HIGH,CRITICAL"
- name: Upload Trivy scan results to GitHub Security tab - name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2 uses: github/codeql-action/upload-sarif@v3
with: with:
sarif_file: "trivy-image-results.sarif" sarif_file: "trivy-image-results.sarif"

View file

@ -1 +1 @@
16 22.21.1

View file

@ -1,8 +1,10 @@
lib/vscode lib/vscode
lib/vscode-reh-web-linux-x64 lib/vscode-reh-web-linux-x64
release-standalone release-standalone
release-packages
release release
helm-chart helm-chart
test/scripts test/scripts
test/e2e/extensions/test-extension test/e2e/extensions/test-extension
.pc .pc
package-lock.json

View file

@ -5,7 +5,7 @@
{ {
"file": "package.json", "file": "package.json",
"line": 31, "line": 31,
"description": "## Commands\n\nTo start developing, make sure you have Node 16+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch" "description": "## Commands\n\nTo start developing, make sure you have Node 16+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> npm\n\n3. Start development mode (and watch for changes):\n>> npm run watch"
}, },
{ {
"file": "src/node/app.ts", "file": "src/node/app.ts",
@ -20,7 +20,7 @@
{ {
"file": "src/node/app.ts", "file": "src/node/app.ts",
"line": 62, "line": 62,
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\"])\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/main/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)" "description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `npm run watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\"])\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/main/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
} }
] ]
} }

View file

@ -20,6 +20,791 @@ Code v99.99.999
--> -->
## Unreleased
Code v1.107.0
### Changed
- Update to Code 1.107.0
### Added
- New `--cookie-suffix` flag that can be used to add a suffix to the cookie when
using the built-in password authentication. You can use this to avoid
collisions with other instances of code-server.
- Support a new property `authorizationHeaderToken` on the extension gallery
configuration. This will be added to marketplace requests as a bearer token
using the `Authorization` header.
## [4.106.3](https://github.com/coder/code-server/releases/tag/v4.106.3) - 2025-12-01
Code v1.106.3
### Changed
- Update to Code 1.106.3
## [4.106.2](https://github.com/coder/code-server/releases/tag/v4.106.2) - 2025-11-19
Code v1.106.2
### Changed
- Update to Code 1.106.2
## [4.106.0](https://github.com/coder/code-server/releases/tag/v4.106.0) - 2025-11-19
Code v1.106.0
### Changed
- Update to Code 1.106.0
## [4.105.1](https://github.com/coder/code-server/releases/tag/v4.105.1) - 2025-10-20
Code v1.105.1
### Changed
- Update to Code 1.105.1
## [4.105.0](https://github.com/coder/code-server/releases/tag/v4.105.0) - 2025-10-17
Code v1.105.0
### Changed
- Update to Code 1.105.0
## [4.104.3](https://github.com/coder/code-server/releases/tag/v4.104.3) - 2025-10-07
Code v1.104.3
### Changed
- Update to Code 1.104.3.
## [4.104.2](https://github.com/coder/code-server/releases/tag/v4.104.2) - 2025-09-26
Code v1.104.2
### Changed
- Update to Code 1.104.2.
## [4.104.1](https://github.com/coder/code-server/releases/tag/v4.104.1) - 2025-09-19
Code v1.104.1
### Changed
- Update to Code 1.104.1.
## [4.104.0](https://github.com/coder/code-server/releases/tag/v4.104.0) - 2025-09-15
Code v1.104.0
### Fixed
- Fix "extension not found" errors from Open VSX when trying to install the
latest version of an extension.
### Changed
- Update to Code 1.104.0.
## [4.103.2](https://github.com/coder/code-server/releases/tag/v4.103.2) - 2025-08-25
Code v1.103.2
### Changed
- Update to Code 1.103.2.
## [4.103.1](https://github.com/coder/code-server/releases/tag/v4.103.1) - 2025-08-15
Code v1.103.1
### Changed
- Update to Code 1.103.1.
## [4.103.0](https://github.com/coder/code-server/releases/tag/v4.103.0) - 2025-08-12
Code v1.103.0
### Changed
- Update to Code 1.103.0.
## [4.102.2](https://github.com/coder/code-server/releases/tag/v4.102.2) - 2025-07-24
Code v1.102.2
### Changed
- Update to Code 1.102.2.
## [4.102.1](https://github.com/coder/code-server/releases/tag/v4.102.1) - 2025-07-17
Code v1.102.1
### Changed
- Update to Code 1.102.1.
## [4.102.0](https://github.com/coder/code-server/releases/tag/v4.102.0) - 2025-07-16
Code v1.102.0
### Changed
- Update to Code 1.102.0.
### Added
- Custom strings can be configured using the `--i18n` flag set to a JSON
file. This can be used for either translation (and can be used alongside
`--locale`) or for customizing the strings. See
[./src/node/i18n/locales/en.json](./src/node/i18n/locales/en.json) for the
available keys.
## [4.101.2](https://github.com/coder/code-server/releases/tag/v4.101.2) - 2025-06-25
Code v1.101.2
### Changed
- Update to Code 1.101.2.
### Fixed
- Fix web views not loading due to 401 when requesting the service worker.
## [4.101.1](https://github.com/coder/code-server/releases/tag/v4.101.1) - 2025-06-20
Code v1.101.1
### Changed
- Update to Code 1.101.1.
## [4.101.0](https://github.com/coder/code-server/releases/tag/v4.101.0) - 2025-06-20
Code v1.101.0
### Changed
- Update to Code 1.101.0.
## [4.100.3](https://github.com/coder/code-server/releases/tag/v4.100.3) - 2025-06-03
Code v1.100.3
### Changed
- Update to Code 1.100.3.
## [4.100.2](https://github.com/coder/code-server/releases/tag/v4.100.2) - 2025-05-15
Code v1.100.2
### Changed
- Update to Code 1.100.2.
## [4.100.1](https://github.com/coder/code-server/releases/tag/v4.100.1) - 2025-05-13
Code v1.100.1
### Changed
- Update to Code 1.100.1.
## [4.100.0](https://github.com/coder/code-server/releases/tag/v4.100.0) - 2025-05-12
Code v1.100.0
### Added
- Trusted domains for links can now be set at run-time by configuring
`linkProtectionTrustedDomains` in the `lib/vscode/product.json` file or via
the `--link-protection-trusted-domains` flag.
### Changed
- Update to Code 1.100.0.
- Disable extension signature verification, which previously was skipped by
default (the package used for verification is not available to OSS builds of
VS Code) but now reportedly throws hard errors making it impossible to install
extensions.
### Fixed
- Flags with repeatable options now work via the config file.
## [4.99.4](https://github.com/coder/code-server/releases/tag/v4.99.4) - 2025-05-02
Code v1.99.3
### Security
- Validate that ports in the path proxy are numbers, to prevent proxying to
arbitrary domains.
## [4.99.3](https://github.com/coder/code-server/releases/tag/v4.99.3) - 2025-04-17
Code v1.99.3
### Added
- Added `--skip-auth-preflight` flag to let preflight requests through the
proxy.
### Changed
- Update to Code 1.99.3.
## [4.99.2](https://github.com/coder/code-server/releases/tag/v4.99.2) - 2025-04-10
Code v1.99.2
### Changed
- Update to Code 1.99.2.
## [4.99.1](https://github.com/coder/code-server/releases/tag/v4.99.1) - 2025-04-08
Code v1.99.1
### Changed
- Update to Code 1.99.1.
## [4.99.0](https://github.com/coder/code-server/releases/tag/v4.99.0) - 2025-04-07
Code v1.99.0
### Changed
- Update to Code 1.99.0.
## [4.98.0](https://github.com/coder/code-server/releases/tag/v4.98.0) - 2025-03-07
Code v1.98.0
### Changed
- Update to Code 1.98.0.
## [4.97.2](https://github.com/coder/code-server/releases/tag/v4.96.4) - 2025-02-18
Code v1.97.2
### Added
- Added back macOS amd64 builds.
### Changed
- Update to Code 1.97.2.
- Softened dark mode login page colors.
## [4.96.4](https://github.com/coder/code-server/releases/tag/v4.96.4) - 2025-01-20
Code v1.96.4
### Changed
- Update to Code 1.96.4.
## [4.96.2](https://github.com/coder/code-server/releases/tag/v4.96.2) - 2024-12-20
Code v1.96.2
### Changed
- Update to Code 1.96.2.
## [4.96.1](https://github.com/coder/code-server/releases/tag/v4.96.1) - 2024-12-18
Code v1.96.1
### Added
- Dark color scheme for login and error pages.
### Changed
- Update to Code 1.96.1.
## [4.95.3](https://github.com/coder/code-server/releases/tag/v4.95.3) - 2024-11-18
Code v1.95.3
### Changed
- Update to Code 1.95.3.
## [4.95.2](https://github.com/coder/code-server/releases/tag/v4.95.2) - 2024-11-12
Code v1.95.2
### Changed
- Update to Code 1.95.2.
## [4.95.1](https://github.com/coder/code-server/releases/tag/v4.95.1) - 2024-11-06
Code v1.95.1
### Changed
- Update to Code 1.95.1.
## [4.93.1](https://github.com/coder/code-server/releases/tag/v4.93.1) - 2024-09-23
Code v1.93.1
### Changed
- Updated to Code 1.93.1.
### Added
- Added `--abs-proxy-base-path` flag for when code-server is not at the root.
## [4.92.2](https://github.com/coder/code-server/releases/tag/v4.92.2) - 2024-08-19
Code v1.92.2
### Breaking changes
- Dropped a patch that changed the compile target from es2022 to es2020 because
it no longer works with the way VS Code uses static properties. This may break
older browsers, so those browsers will either have to be updated or use an
older version of code-server.
### Changed
- Updated to Code 1.92.2.
## [4.91.0](https://github.com/coder/code-server/releases/tag/v4.91.0) - 2024-07-10
Code v1.91.0
### Changed
- Updated to Code 1.91.0.
## [4.90.3](https://github.com/coder/code-server/releases/tag/v4.90.3) - 2024-06-21
Code v1.90.2
### Changed
- Updated to Code 1.90.2.
### Fixed
- When the log gets rotated it will no longer incorrectly be moved to a new
directory created in the current working directory named with a date.
Instead, the file itself is prepended with the date and kept in the same
directory, as originally intended.
## [4.90.2](https://github.com/coder/code-server/releases/tag/v4.90.2) - 2024-06-14
Code v1.90.1
### Changed
- Updated to Code 1.90.1.
## [4.90.1](https://github.com/coder/code-server/releases/tag/v4.90.1) - 2024-06-12
Code v1.90.0
### Fixed
- Cache a call to get CPU information used in telemetry that could result in a
lack responsiveness if it was particularly slow.
## [4.90.0](https://github.com/coder/code-server/releases/tag/v4.90.0) - 2024-06-11
Code v1.90.0
### Changed
- Updated to Code 1.90.0.
- Updated Node to 20.11.1.
### Added
- Send contents to the clipboard in the integrated terminal by piping to
`code-server --stdin-to-clipboard` or `code-server -c`.
You may want to make this an alias:
```
alias xclip="code-server --stdin-to-clipboard"
echo -n "hello world" | xclip
```
## [4.89.1](https://github.com/coder/code-server/releases/tag/v4.89.1) - 2024-04-14
Code v1.89.1
### Changed
- Updated to Code 1.89.1.
## [4.89.0](https://github.com/coder/code-server/releases/tag/v4.89.0) - 2024-04-08
Code v1.89.0
### Changed
- Updated to Code 1.89.0.
## [4.23.1](https://github.com/coder/code-server/releases/tag/v4.23.1) - 2024-04-15
Code v1.88.1
### Changed
- Updated to Code 1.88.1.
## [4.23.0](https://github.com/coder/code-server/releases/tag/v4.23.0) - 2024-04-08
Code v1.88.0
### Changed
- Updated to Code 1.88.0.
- Updated Node to 18.18.2.
### Fixed
- Fix masking the exit code when failing to install extensions on the command
line outside the integrated terminal. Installing extensions inside the
integrated terminal still masks the exit code and is an upstream bug.
## [4.22.1](https://github.com/coder/code-server/releases/tag/v4.22.1) - 2024-03-14
Code v1.87.2
### Changed
- Updated to Code 1.87.2.
- Enable keep-alive for proxy agent.
## [4.22.0](https://github.com/coder/code-server/releases/tag/v4.22.0) - 2024-03-03
Code v1.87.0
### Changed
- Updated to Code 1.87.0.
## [4.21.2](https://github.com/coder/code-server/releases/tag/v4.21.2) - 2024-02-28
Code v1.86.2
### Changed
- Updated to Code 1.86.2.
## [4.21.1](https://github.com/coder/code-server/releases/tag/v4.21.1) - 2024-02-09
Code v1.86.1
### Changed
- Updated to Code 1.86.1.
- Updated to Node 18.17.1.
### Added
- Docker images for Fedora and openSUSE.
## [4.21.0](https://github.com/coder/code-server/releases/tag/v4.21.0) - 2024-02-05
Code v1.86.0
### Changed
- Updated to Code 1.86.0.
## [4.20.1](https://github.com/coder/code-server/releases/tag/v4.20.1) - 2024-01-22
Code v1.85.2
### Changed
- Updated to Code 1.85.2.
### Fixed
- Query variables are no longer double-encoded when going over the path proxy.
## [4.20.0](https://github.com/coder/code-server/releases/tag/v4.20.0) - 2023-12-21
Code v1.85.1
### Added
- New flag `--disable-file-uploads` to disable uploading files to the remote by
drag and drop and to disable opening local files via the "show local" button
in the file open prompt. Note that you can still open local files by drag and
dropping the file onto the editor pane.
- Added `wget` to the release image.
### Changed
- Updated to Code 1.85.1.
- The `--disable-file-downloads` flag will now disable the "show local" button
in the file save prompt as well.
- Debian release image updated to use Bookworm.
## [4.19.1](https://github.com/coder/code-server/releases/tag/v4.19.1) - 2023-11-29
Code v1.84.2
### Fixed
- Fixed an issue where parts of the editor would not load (like the file
explorer, source control, etc) when using a workspace file.
## [4.19.0](https://github.com/coder/code-server/releases/tag/v4.19.0) - 2023-11-18
Code v1.84.2
### Changed
- Updated to Code 1.84.2.
## [4.18.0](https://github.com/coder/code-server/releases/tag/v4.18.0) - 2023-10-20
Code v1.83.1
### Changed
- Updated to Code 1.83.1.
## [4.17.1](https://github.com/coder/code-server/releases/tag/v4.17.1) - 2023-09-29
Code v1.82.2
### Fixed
- Make secret storage persistent. For example, logging in with GitHub should
persist between browser refreshes and code-server restarts.
- Issues with argon2 on arm builds should be fixed now.
## [4.17.0](https://github.com/coder/code-server/releases/tag/v4.17.0) - 2023-09-22
Code v1.82.2
### Added
- Japanese locale.
- `CODE_SERVER_HOST` environment variable.
### Changed
- Update to Code 1.82.2. This includes an update to Node 18, which also means
that the minimum glibc is now 2.28. If you need to maintain a lower glibc then
you can take a version of Node 18 that is compiled with a lower glibc and use
that to build code-server (or at a minimum rebuild the native modules).
- Display paths to config files in full rather than abbreviated. If you have
trouble with the password not working please update and make sure the
displayed config paths are what you expect.
### Fixed
- Fix some dependency issues for the standalone arm64 and armv7l releases. If
you had issues with missing or failing modules please try these new builds.
## [4.16.1](https://github.com/coder/code-server/releases/tag/v4.16.1) - 2023-07-31
Code v1.80.2
### Changed
- Updated to Code 1.80.2.
## [4.16.0](https://github.com/coder/code-server/releases/tag/v4.16.0) - 2023-07-28
Code v1.80.1
### Added
- `--disable-proxy` flag. This disables the domain and path proxies but it does
not disable the ports panel in Code. That can be disabled by using
`remote.autoForwardPorts=false` in your settings.
## [4.15.0](https://github.com/coder/code-server/releases/tag/v4.15.0) - 2023-07-21
Code v1.80.1
### Changed
- Updated to Code 1.80.1.
### Added
- `--trusted-origin` flag for specifying origins that you trust but do not
control (for example a reverse proxy).
Code v1.79.2
## [4.14.1](https://github.com/coder/code-server/releases/tag/v4.14.1) - 2023-06-26
Code v1.79.2
### Security
- Remove extra write permissions on the Node binary bundled with the linux-amd64
tarball. If you extract the tar without a umask this could mean the Node
binary would be unexpectedly writable.
### Fixed
- Inability to launch multiple instances of code-server for different users.
### Added
- `--session-socket` CLI flag to configure the location of the session socket.
By default it will be placed in `<user data dir>/code-server-ipc.sock`.
## [4.14.0](https://github.com/coder/code-server/releases/tag/v4.14.0) - 2023-06-16
Code v1.79.2
### Added
- `--domain-proxy` now supports `{{port}}` and `{{host}}` template variables.
### Changed
- Updated to Code 1.79.2
- Files opened from an external terminal will now open in the most closely
related window rather than in the last opened window.
## [4.13.0](https://github.com/coder/code-server/releases/tag/v4.13.0) - 2023-05-19
Code v1.78.2
### Changed
- Updated to Code 1.78.2.
### Fixed
- Proxying files that contain non-ASCII characters.
- Origin check when X-Forwarded-Host contains comma-separated hosts.
## [4.12.0](https://github.com/coder/code-server/releases/tag/v4.12.0) - 2023-04-21
Code v1.77.3
### Changed
- Updated to Code 1.77.3
- Ports panel will use domain-based proxy (instead of the default path-based
proxy) when set via --proxy-domain.
- Apply --app-name to the PWA title.
### Added
- Thai translation for login page.
- Debug logs around the origin security check. If you are getting forbidden
errors on web sockets please run code-server with `--log debug` to see why the
requests are being blocked.
## [4.11.0](https://github.com/coder/code-server/releases/tag/v4.11.0) - 2023-03-16
Code v1.76.1
### Changed
- Updated to Code 1.76.1
## [4.10.1](https://github.com/coder/code-server/releases/tag/v4.10.1) - 2023-03-04
Code v1.75.1
### Security
Added an origin check to web sockets to prevent cross-site hijacking attacks on
users using older or niche browser that do not support SameSite cookies and
attacks across sub-domains that share the same root domain.
The check requires the host header to be set so if you use a reverse proxy
ensure it forwards that information otherwise web sockets will be blocked.
## [4.10.0](https://github.com/coder/code-server/releases/tag/v4.10.0) - 2023-02-15
Code v1.75.1
### Changed
- Updated to Code 1.75.1
### Removed
- Removed `--link` (was deprecated over thirteen months ago in 4.0.1).
## [4.9.1](https://github.com/coder/code-server/releases/tag/v4.9.1) - 2022-12-15
Code v1.73.1
### Changed
- Updated a couple steps in the build and release process to ensure we're using
`npm` and `yarn` consistently depending on the step.
### Fixed
- Fixed an issue with code-server version not displaying in the Help > About window.
- Fixed terminal not loading on macOS clients.
## [4.9.0](https://github.com/coder/code-server/releases/tag/v4.9.0) - 2022-12-06
Code v1.73.1
### Changed
- Upgraded to Code 1.73.1
### Added
- `/security.txt` added as a route with info on our security policy information thanks to @ghuntley
### Fixed
- Installing on majaro images should now work thanks to @MrPeacockNLB for
adding the `--noconfirm` flag in `install.sh`
### Known Issues
- `--cert` on Ubuntu 22.04: OpenSSL v3 is used which breaks `pem` meaning the
`--cert` feature will not work. [Reference](https://github.com/adobe/fetch/pull/318#issuecomment-1306070259)
## [4.8.3](https://github.com/coder/code-server/releases/tag/v4.8.3) - 2022-11-07
Code v1.72.1
### Added
- install script now supports arch-like (i.e. manjaro, endeavourous, etc.)
architectures
### Changed
- Updated text in the Getting Started page.
## [4.8.2](https://github.com/coder/code-server/releases/tag/v4.8.2) - 2022-11-02 ## [4.8.2](https://github.com/coder/code-server/releases/tag/v4.8.2) - 2022-11-02
Code v1.72.1 Code v1.72.1
@ -93,7 +878,7 @@ Code v1.71.0
### Fixed ### Fixed
- Add flags --unsafe-perm --legacy-peer-deps in `npm-postinstsall.sh` which ensures installing with npm works correctly - Add flags --unsafe-perm --legacy-peer-deps in `npm-postinstall.sh` which ensures installing with npm works correctly
## [4.6.1](https://github.com/coder/code-server/releases/tag/v4.6.1) - 2022-09-31 ## [4.6.1](https://github.com/coder/code-server/releases/tag/v4.6.1) - 2022-09-31
@ -141,7 +926,6 @@ Code v1.68.1
would be accessible at `my.domain/proxy/8000/` without any authentication. would be accessible at `my.domain/proxy/8000/` without any authentication.
If all of the following apply to you please update as soon as possible: If all of the following apply to you please update as soon as possible:
- You run code-server with the built-in password authentication. - You run code-server with the built-in password authentication.
- You run unprotected HTTP services on ports accessible by code-server. - You run unprotected HTTP services on ports accessible by code-server.

View file

@ -16,20 +16,18 @@ This directory contains scripts used for the development of code-server.
- [./ci/dev/image](./dev/image) - [./ci/dev/image](./dev/image)
- See [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md) for docs on the development container. - See [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md) for docs on the development container.
- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`) - [./ci/dev/fmt.sh](./dev/fmt.sh) (`npm run fmt`)
- Runs formatters. - Runs formatters.
- [./ci/dev/lint.sh](./dev/lint.sh) (`yarn lint`) - [./ci/dev/lint.sh](./dev/lint.sh) (`npm run lint`)
- Runs linters. - Runs linters.
- [./ci/dev/test-unit.sh](./dev/test-unit.sh) (`yarn test:unit`) - [./ci/dev/test-unit.sh](./dev/test-unit.sh) (`npm run test:unit`)
- Runs unit tests. - Runs unit tests.
- [./ci/dev/test-e2e.sh](./dev/test-e2e.sh) (`yarn test:e2e`) - [./ci/dev/test-e2e.sh](./dev/test-e2e.sh) (`npm run test:e2e`)
- Runs end-to-end tests. - Runs end-to-end tests.
- [./ci/dev/ci.sh](./dev/ci.sh) (`yarn ci`) - [./ci/dev/watch.ts](./dev/watch.ts) (`npm run watch`)
- Runs `yarn fmt`, `yarn lint` and `yarn test`.
- [./ci/dev/watch.ts](./dev/watch.ts) (`yarn watch`)
- Starts a process to build and launch code-server and restart on any code changes. - Starts a process to build and launch code-server and restart on any code changes.
- Example usage in [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md). - Example usage in [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md).
- [./ci/dev/gen_icons.sh](./ci/dev/gen_icons.sh) (`yarn icons`) - [./ci/dev/gen_icons.sh](./dev/gen_icons.sh) (`npm run icons`)
- Generates the various icons from a single `.svg` favicon in - Generates the various icons from a single `.svg` favicon in
`src/browser/media/favicon.svg`. `src/browser/media/favicon.svg`.
- Requires [imagemagick](https://imagemagick.org/index.php) - Requires [imagemagick](https://imagemagick.org/index.php)
@ -39,20 +37,20 @@ This directory contains scripts used for the development of code-server.
This directory contains the scripts used to build and release code-server. This directory contains the scripts used to build and release code-server.
You can disable minification by setting `MINIFY=`. You can disable minification by setting `MINIFY=`.
- [./ci/build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`) - [./ci/build/build-code-server.sh](./build/build-code-server.sh) (`npm run build`)
- Builds code-server into `./out` and bundles the frontend into `./dist`. - Builds code-server into `./out` and bundles the frontend into `./dist`.
- [./ci/build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`) - [./ci/build/build-vscode.sh](./build/build-vscode.sh) (`npm run build:vscode`)
- Builds vscode into `./lib/vscode/out-vscode`. - Builds vscode into `./lib/vscode/out-vscode`.
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`) - [./ci/build/build-release.sh](./build/build-release.sh) (`npm run release`)
- Bundles the output of the above two scripts into a single node module at `./release`. - Bundles the output of the above two scripts into a single node module at `./release`.
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`) - [./ci/build/clean.sh](./build/clean.sh) (`npm run clean`)
- Removes all build artifacts. - Removes all build artifacts.
- Useful to do a clean build. - Useful to do a clean build.
- [./ci/build/code-server.sh](./build/code-server.sh) - [./ci/build/code-server.sh](./build/code-server.sh)
- Copied into standalone releases to run code-server with the bundled node binary. - Copied into standalone releases to run code-server with the bundled node binary.
- [./ci/build/test-standalone-release.sh](./build/test-standalone-release.sh) (`yarn test:standalone-release`) - [./ci/build/test-standalone-release.sh](./build/test-standalone-release.sh) (`npm run test:standalone-release`)
- Ensures code-server in the `./release-standalone` directory works by installing an extension. - Ensures code-server in the `./release-standalone` directory works by installing an extension.
- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`) - [./ci/build/build-packages.sh](./build/build-packages.sh) (`npm run package`)
- Packages `./release-standalone` into a `.tar.gz` archive in `./release-packages`. - Packages `./release-standalone` into a `.tar.gz` archive in `./release-packages`.
- If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`. - If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`.
- [./ci/build/nfpm.yaml](./build/nfpm.yaml) - [./ci/build/nfpm.yaml](./build/nfpm.yaml)
@ -61,21 +59,21 @@ You can disable minification by setting `MINIFY=`.
- Entrypoint script for code-server for `.deb` and `.rpm`. - Entrypoint script for code-server for `.deb` and `.rpm`.
- [./ci/build/code-server.service](./build/code-server.service) - [./ci/build/code-server.service](./build/code-server.service)
- systemd user service packaged into the `.deb` and `.rpm`. - systemd user service packaged into the `.deb` and `.rpm`.
- [./ci/build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`) - [./ci/build/release-github-draft.sh](./build/release-github-draft.sh) (`npm run release:github-draft`)
- Uses [gh](https://github.com/cli/cli) to create a draft release with a template description. - Uses [gh](https://github.com/cli/cli) to create a draft release with a template description.
- [./ci/build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`) - [./ci/build/release-github-assets.sh](./build/release-github-assets.sh) (`npm run release:github-assets`)
- Downloads the release-package artifacts for the current commit from CI. - Downloads the release-package artifacts for the current commit from CI.
- Uses [gh](https://github.com/cli/cli) to upload the artifacts to the release - Uses [gh](https://github.com/cli/cli) to upload the artifacts to the release
specified in `package.json`. specified in `package.json`.
- [./ci/build/npm-postinstall.sh](./build/npm-postinstall.sh) - [./ci/build/npm-postinstall.sh](./build/npm-postinstall.sh)
- Post install script for the npm package. - Post install script for the npm package.
- Bundled by`yarn release`. - Bundled by`npm run release`.
## release-image ## release-image
This directory contains the release docker container image. This directory contains the release docker container image.
- [./ci/steps/build-docker-buildx-push.sh](./ci/steps/docker-buildx-push.sh) - [./ci/steps/build-docker-buildx-push.sh](./steps/docker-buildx-push.sh)
- Builds the release containers with tags `codercom/code-server-$ARCH:$VERSION` for amd64 and arm64 with `docker buildx` and pushes them. - Builds the release containers with tags `codercom/code-server-$ARCH:$VERSION` for amd64 and arm64 with `docker buildx` and pushes them.
- Assumes debian releases are ready in `./release-packages`. - Assumes debian releases are ready in `./release-packages`.
@ -89,15 +87,15 @@ This directory contains the scripts used in CI.
Helps avoid clobbering the CI configuration. Helps avoid clobbering the CI configuration.
- [./steps/fmt.sh](./steps/fmt.sh) - [./steps/fmt.sh](./steps/fmt.sh)
- Runs `yarn fmt`. - Runs `npm run fmt`.
- [./steps/lint.sh](./steps/lint.sh) - [./steps/lint.sh](./steps/lint.sh)
- Runs `yarn lint`. - Runs `npm run lint`.
- [./steps/test-unit.sh](./steps/test-unit.sh) - [./steps/test-unit.sh](./steps/test-unit.sh)
- Runs `yarn test:unit`. - Runs `npm run test:unit`.
- [./steps/test-integration.sh](./steps/test-integration.sh) - [./steps/test-integration.sh](./steps/test-integration.sh)
- Runs `yarn test:integration`. - Runs `npm run test:integration`.
- [./steps/test-e2e.sh](./steps/test-e2e.sh) - [./steps/test-e2e.sh](./steps/test-e2e.sh)
- Runs `yarn test:e2e`. - Runs `npm run test:e2e`.
- [./steps/release.sh](./steps/release.sh) - [./steps/release.sh](./steps/release.sh)
- Runs the release process. - Runs the release process.
- Generates the npm package at `./release`. - Generates the npm package at `./release`.

View file

@ -14,22 +14,6 @@ main() {
sed -i.bak "1s;^;#!/usr/bin/env node\n;" out/node/entry.js && rm out/node/entry.js.bak sed -i.bak "1s;^;#!/usr/bin/env node\n;" out/node/entry.js && rm out/node/entry.js.bak
chmod +x out/node/entry.js chmod +x out/node/entry.js
fi fi
# for arch; we do not use OS from lib.sh and get our own.
# lib.sh normalizes macos to darwin - but cloud-agent's binaries do not
source ./ci/lib.sh
OS="$(uname | tr '[:upper:]' '[:lower:]')"
mkdir -p ./lib
if ! [ -f ./lib/coder-cloud-agent ]; then
echo "Downloading the cloud agent..."
set +e
curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent
chmod +x ./lib/coder-cloud-agent
set -e
fi
} }
main "$@" main "$@"

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# Packages code-server for the current OS and architecture into ./release-packages. # Given a platform-specific release found in ./release-standalone, generate an
# This script assumes that a standalone release is built already into ./release-standalone # compressed archives and bundles (as appropriate for the platform) named after
# the platform's architecture and OS and place them in ./release-packages and
# ./release-gcp.
main() { main() {
cd "$(dirname "${0}")/../.." cd "$(dirname "${0}")/../.."
@ -27,7 +29,7 @@ main() {
release_archive() { release_archive() {
local release_name="code-server-$VERSION-$OS-$ARCH" local release_name="code-server-$VERSION-$OS-$ARCH"
if [[ $OS == "linux" ]]; then if [[ $OS == "linux" ]]; then
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
else else
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone
fi fi
@ -50,11 +52,6 @@ release_nfpm() {
export NFPM_ARCH export NFPM_ARCH
# Code deletes some files from the extension node_modules directory which
# leaves broken symlinks in the corresponding .bin directory. nfpm will fail
# on these broken symlinks so clean them up.
rm -fr "./release-standalone/lib/vscode/extensions/node_modules/.bin"
PKG_FORMAT="deb" PKG_FORMAT="deb"
NFPM_ARCH="$(get_nfpm_arch $PKG_FORMAT "$ARCH")" NFPM_ARCH="$(get_nfpm_arch $PKG_FORMAT "$ARCH")"
nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)" nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)"

View file

@ -1,13 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# This script requires vscode to be built with matching MINIFY. # Once both code-server and VS Code have been built, use this script to copy
# them into a single directory (./release), prepare the package.json and
# product.json, and add shrinkwraps. This results in a generic NPM package that
# we published to NPM and also use to compile platform-specific packages.
# MINIFY controls whether minified vscode is bundled. # MINIFY controls whether minified VS Code is bundled. It must match the value
# used when VS Code was built.
MINIFY="${MINIFY-true}" MINIFY="${MINIFY-true}"
# KEEP_MODULES controls whether the script cleans all node_modules requiring a yarn install # node_modules are not copied by default. Set KEEP_MODULES=1 to copy them.
# to run first.
KEEP_MODULES="${KEEP_MODULES-0}" KEEP_MODULES="${KEEP_MODULES-0}"
main() { main() {
@ -41,12 +44,8 @@ bundle_code_server() {
rsync src/browser/pages/*.css "$RELEASE_PATH/src/browser/pages" rsync src/browser/pages/*.css "$RELEASE_PATH/src/browser/pages"
rsync src/browser/robots.txt "$RELEASE_PATH/src/browser" rsync src/browser/robots.txt "$RELEASE_PATH/src/browser"
# Add typings for plugins
mkdir -p "$RELEASE_PATH/typings"
rsync typings/pluginapi.d.ts "$RELEASE_PATH/typings"
# Adds the commit to package.json # Adds the commit to package.json
jq --slurp '.[0] * .[1]' package.json <( jq --slurp '(.[0] | del(.scripts,.jest,.devDependencies)) * .[1]' package.json <(
cat << EOF cat << EOF
{ {
"commit": "$(git rev-parse HEAD)", "commit": "$(git rev-parse HEAD)",
@ -56,15 +55,12 @@ bundle_code_server() {
} }
EOF EOF
) > "$RELEASE_PATH/package.json" ) > "$RELEASE_PATH/package.json"
rsync yarn.lock "$RELEASE_PATH"
mv npm-shrinkwrap.json "$RELEASE_PATH" mv npm-shrinkwrap.json "$RELEASE_PATH"
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh" rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
if [ "$KEEP_MODULES" = 1 ]; then if [ "$KEEP_MODULES" = 1 ]; then
rsync node_modules/ "$RELEASE_PATH/node_modules" rsync node_modules/ "$RELEASE_PATH/node_modules"
mkdir -p "$RELEASE_PATH/lib"
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
fi fi
} }
@ -91,51 +87,50 @@ bundle_vscode() {
rsync "${rsync_opts[@]}" ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH" rsync "${rsync_opts[@]}" ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH"
# Use the package.json for the web/remote server. It does not have the right # Merge the package.json for the web/remote server so we can include
# version though so pull that from the main package.json. # dependencies, since we want to ship this via NPM.
jq --slurp '.[0] * {version: .[1].version}' \ jq --slurp '.[0] * .[1]' \
"$VSCODE_SRC_PATH/remote/package.json" \ "$VSCODE_SRC_PATH/remote/package.json" \
"$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json" "$VSCODE_OUT_PATH/package.json" > "$VSCODE_OUT_PATH/package.json.merged"
mv "$VSCODE_OUT_PATH/package.json.merged" "$VSCODE_OUT_PATH/package.json"
rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock" cp "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
mv "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
# Include global extension dependencies as well. # Include global extension dependencies as well.
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json" rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json"
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions/yarn.lock" cp "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
mv "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
rsync "$VSCODE_SRC_PATH/extensions/postinstall.mjs" "$VSCODE_OUT_PATH/extensions/postinstall.mjs" rsync "$VSCODE_SRC_PATH/extensions/postinstall.mjs" "$VSCODE_OUT_PATH/extensions/postinstall.mjs"
} }
create_shrinkwraps() { create_shrinkwraps() {
# yarn.lock or package-lock.json files (used to ensure deterministic versions of dependencies) are # package-lock.json files (used to ensure deterministic versions of
# not packaged when publishing to the NPM registry. # dependencies) are not packaged when publishing to the NPM registry.
# To ensure deterministic dependency versions (even when code-server is installed with NPM), we create #
# an npm-shrinkwrap.json file from the currently installed node_modules. This ensures the versions used # To ensure deterministic dependency versions (even when code-server is
# from development (that the yarn.lock guarantees) are also the ones installed by end-users. # installed with NPM), we create an npm-shrinkwrap.json file from the
# These will include devDependencies, but those will be ignored when installing globally (for code-server), and # currently installed node_modules. This ensures the versions used from
# because we use --omit=dev when installing vscode. # development (that the package-lock.json guarantees) are also the ones
# installed by end-users. These will include devDependencies, but those will
# be ignored when installing globally (for code-server), and because we use
# --omit=dev (for VS Code).
# We first generate the shrinkwrap file for code-server itself - which is the current directory # We first generate the shrinkwrap file for code-server itself - which is the
create_shrinkwrap_keeping_yarn_lock # current directory.
cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json
# Then the shrinkwrap files for the bundled VSCode # Then the shrinkwrap files for the bundled VS Code.
pushd "$VSCODE_SRC_PATH/remote/" pushd "$VSCODE_SRC_PATH/remote/"
create_shrinkwrap_keeping_yarn_lock cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json
popd popd
pushd "$VSCODE_SRC_PATH/extensions/" pushd "$VSCODE_SRC_PATH/extensions/"
create_shrinkwrap_keeping_yarn_lock cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json
popd popd
} }
create_shrinkwrap_keeping_yarn_lock() {
# HACK@edvincent: Generating a shrinkwrap alters the yarn.lock which we don't want (with NPM URLs rather than the Yarn URLs)
# But to generate a valid shrinkwrap, it has to exist... So we copy it to then restore it
cp yarn.lock yarn.lock.temp
npm shrinkwrap
cp yarn.lock.temp yarn.lock
rm yarn.lock.temp
}
main "$@" main "$@"

View file

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 # Once we have an NPM package, use this script to copy it to a separate
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 # directory (./release-standalone) and install the dependencies. This new
export npm_config_build_from_source=true # directory can then be packaged as a platform-specific release.
main() { main() {
cd "$(dirname "${0}")/../.." cd "$(dirname "${0}")/../.."
@ -13,19 +13,24 @@ main() {
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone" rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
RELEASE_PATH+=-standalone RELEASE_PATH+=-standalone
# We cannot find the path to node from $PATH because yarn shims a script to ensure # Package managers may shim their own "node" wrapper into the PATH, so run
# we use the same version it's using so we instead run a script with yarn that # node and ask it for its true path.
# will print the path to node.
local node_path local node_path
node_path="$(yarn -s node <<< 'console.info(process.execPath)')" node_path="$(node -p process.execPath)"
mkdir -p "$RELEASE_PATH/bin" mkdir -p "$RELEASE_PATH/bin"
mkdir -p "$RELEASE_PATH/lib" mkdir -p "$RELEASE_PATH/lib"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server" rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
rsync "$node_path" "$RELEASE_PATH/lib/node" rsync "$node_path" "$RELEASE_PATH/lib/node"
chmod 755 "$RELEASE_PATH/lib/node"
pushd "$RELEASE_PATH" pushd "$RELEASE_PATH"
npm install --unsafe-perm --omit=dev npm install --unsafe-perm --omit=dev
# Code deletes some files from the extension node_modules directory which
# leaves broken symlinks in the corresponding .bin directory. nfpm will fail
# on these broken symlinks so clean them up.
rm -fr "./lib/vscode/extensions/node_modules/.bin"
popd popd
} }

View file

@ -15,7 +15,7 @@ copy-bin-script() {
local dest="lib/vscode-reh-web-linux-x64/bin/$script" local dest="lib/vscode-reh-web-linux-x64/bin/$script"
cp "lib/vscode/resources/server/bin/$script" "$dest" cp "lib/vscode/resources/server/bin/$script" "$dest"
sed -i.bak "s/@@VERSION@@/$(vscode_version)/g" "$dest" sed -i.bak "s/@@VERSION@@/$(vscode_version)/g" "$dest"
sed -i.bak "s/@@COMMIT@@/$VSCODE_DISTRO_COMMIT/g" "$dest" sed -i.bak "s/@@COMMIT@@/$BUILD_SOURCEVERSION/g" "$dest"
sed -i.bak "s/@@APPNAME@@/code-server/g" "$dest" sed -i.bak "s/@@APPNAME@@/code-server/g" "$dest"
# Fix Node path on Darwin and Linux. # Fix Node path on Darwin and Linux.
@ -40,16 +40,29 @@ main() {
source ./ci/lib.sh source ./ci/lib.sh
pushd lib/vscode
# Set the commit Code will embed into the product.json. We need to do this # Set the commit Code will embed into the product.json. We need to do this
# since Code tries to get the commit from the `.git` directory which will fail # since Code tries to get the commit from the `.git` directory which will fail
# as it is a submodule. # as it is a submodule.
export VSCODE_DISTRO_COMMIT #
VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD) # Also, we use code-server's commit rather than VS Code's otherwise it would
# not update when only our patch files change, and that will cause caching
# issues where the browser keeps using outdated code.
export BUILD_SOURCEVERSION
BUILD_SOURCEVERSION=$(git rev-parse HEAD)
# Add the date, our name, links, and enable telemetry (this just makes pushd lib/vscode
# telemetry available; telemetry can still be disabled by flag or setting).
if [[ ! ${VERSION-} ]]; then
echo "VERSION not set. Please set before running this script:"
echo "VERSION='0.0.0' npm run build:vscode"
exit 1
fi
# Add the date, our name, links, enable telemetry (this just makes telemetry
# available; telemetry can still be disabled by flag or setting), and
# configure trusted extensions (since some, like github.copilot-chat, never
# ask to be trusted and this is the only way to get auth working).
#
# This needs to be done before building as Code will read this file and embed # This needs to be done before building as Code will read this file and embed
# it into the client-side code. # it into the client-side code.
git checkout product.json # Reset in case the script exited early. git checkout product.json # Reset in case the script exited early.
@ -83,6 +96,11 @@ main() {
"linkProtectionTrustedDomains": [ "linkProtectionTrustedDomains": [
"https://open-vsx.org" "https://open-vsx.org"
], ],
"trustedExtensionAuthAccess": [
"vscode.git", "vscode.github",
"github.vscode-pull-request-github",
"github.copilot", "github.copilot-chat"
],
"aiConfig": { "aiConfig": {
"ariaKey": "code-server" "ariaKey": "code-server"
} }
@ -94,7 +112,9 @@ EOF
# this because we have an NPM package that could be installed on any platform. # this because we have an NPM package that could be installed on any platform.
# The correct platform dependencies and scripts will be installed as part of # The correct platform dependencies and scripts will be installed as part of
# the post-install during `npm install` or when building a standalone release. # the post-install during `npm install` or when building a standalone release.
yarn gulp "vscode-reh-web-linux-x64${MINIFY:+-min}" node --max-old-space-size=16384 --optimize-for-size \
./node_modules/gulp/bin/gulp.js \
"vscode-reh-web-linux-x64${MINIFY:+-min}"
# Reset so if you develop after building you will not be stuck with the wrong # Reset so if you develop after building you will not be stuck with the wrong
# commit (the dev client will use `oss-dev` but the dev server will still use # commit (the dev client will use `oss-dev` but the dev server will still use
@ -103,6 +123,15 @@ EOF
popd popd
pushd lib/vscode-reh-web-linux-x64
# Make sure Code took the version we set in the environment variable. Not
# having a version will break display languages.
if ! jq -e .commit product.json; then
echo "'commit' is missing from product.json"
exit 1
fi
popd
# These provide a `code-server` command in the integrated terminal to open # These provide a `code-server` command in the integrated terminal to open
# files in the current instance. # files in the current instance.
delete-bin-script remote-cli/code-server delete-bin-script remote-cli/code-server

View file

@ -4,7 +4,7 @@ platform: "linux"
version: "v${VERSION}" version: "v${VERSION}"
section: "devel" section: "devel"
priority: "optional" priority: "optional"
maintainer: "Anmol Sethi <hi@nhooyr.io>" maintainer: "Joe Previte <joe@coder.com>"
description: | description: |
Run VS Code in the browser. Run VS Code in the browser.
vendor: "Coder" vendor: "Coder"
@ -22,4 +22,4 @@ contents:
dst: /usr/lib/systemd/user/code-server.service dst: /usr/lib/systemd/user/code-server.service
- src: ./release-standalone/* - src: ./release-standalone/*
dst: /usr/lib/code-server/ dst: /usr/lib/code-server

View file

@ -1,18 +1,8 @@
#!/usr/bin/env sh #!/usr/bin/env sh
set -eu set -eu
# Copied from ../lib.sh. # Copied from ../lib.sh except we do not rename Darwin and we do not need to
arch() { # detect Alpine.
cpu="$(uname -m)"
case "$cpu" in
aarch64) cpu=arm64 ;;
x86_64) cpu=amd64 ;;
esac
echo "$cpu"
}
# Copied from ../lib.sh except we do not rename Darwin since the cloud agent
# uses "darwin" in the release names and we do not need to detect Alpine.
os() { os() {
osname=$(uname | tr '[:upper:]' '[:lower:]') osname=$(uname | tr '[:upper:]' '[:lower:]')
case $osname in case $osname in
@ -61,12 +51,19 @@ symlink_bin_script() {
cd "$oldpwd" cd "$oldpwd"
} }
ARCH="${NPM_CONFIG_ARCH:-$(arch)}" command_exists() {
OS="$(os)" if [ ! "$1" ]; then return 1; fi
command -v "$@" > /dev/null
}
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 is_root() {
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 if command_exists id && [ "$(id -u)" = 0 ]; then
export npm_config_build_from_source=true return 0
fi
return 1
}
OS="$(os)"
main() { main() {
# Grabs the major version of node from $npm_config_user_agent which looks like # Grabs the major version of node from $npm_config_user_agent which looks like
@ -79,8 +76,8 @@ main() {
echo "USE AT YOUR OWN RISK!" echo "USE AT YOUR OWN RISK!"
fi fi
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-16}" ]; then if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-22}" ]; then
echo "ERROR: code-server currently requires node v16." echo "ERROR: code-server currently requires node v22."
if [ -n "$FORCE_NODE_VERSION" ]; then if [ -n "$FORCE_NODE_VERSION" ]; then
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION." echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
fi fi
@ -90,24 +87,19 @@ main() {
exit 1 exit 1
fi fi
case "${npm_config_user_agent-}" in npm*) # Under npm, if we are running as root, we need --unsafe-perm otherwise
# We are running under npm. # post-install scripts will not have sufficient permissions to do their thing.
if [ "${npm_config_unsafe_perm-}" != "true" ]; then if is_root; then
echo "Please pass --unsafe-perm to npm to install code-server" case "${npm_config_user_agent-}" in npm*)
echo "Otherwise the postinstall script does not have permissions to run" if [ "${npm_config_unsafe_perm-}" != "true" ]; then
echo "See https://docs.npmjs.com/misc/config#unsafe-perm" echo "Please pass --unsafe-perm to npm to install code-server"
echo "See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm" echo "Otherwise post-install scripts will not have permissions to run"
exit 1 echo "See https://docs.npmjs.com/misc/config#unsafe-perm"
fi echo "See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm"
;; exit 1
esac fi
;;
mkdir -p ./lib esac
if curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then
chmod +x ./lib/coder-cloud-agent
else
echo "Failed to download cloud agent; --link will not work"
fi fi
if ! vscode_install; then if ! vscode_install; then
@ -124,26 +116,18 @@ main() {
} }
install_with_yarn_or_npm() { install_with_yarn_or_npm() {
# NOTE@edvincent: We want to keep using the package manager that the end-user was using to install the package. echo "User agent: ${npm_config_user_agent-none}"
# This also ensures that when *we* run `yarn` in the development process, the yarn.lock file is used. # For development we enforce npm, but for installing the package as an
# end-user we want to keep using whatever package manager is in use.
case "${npm_config_user_agent-}" in case "${npm_config_user_agent-}" in
yarn*) npm*)
if [ -f "yarn.lock" ]; then if ! npm install --unsafe-perm --omit=dev; then
yarn --production --frozen-lockfile --no-default-rc return 1
else
echo "yarn.lock file not present, not running in development mode. use npm to install code-server!"
exit 1
fi fi
;; ;;
npm*) yarn*)
if [ -f "yarn.lock" ]; then if ! yarn --production --frozen-lockfile --no-default-rc; then
echo "yarn.lock file present, running in development mode. use yarn to install code-server!" return 1
exit 1
else
# HACK: NPM's use of semver doesn't like resolving some peerDependencies that vscode (upstream) brings in the form of pre-releases.
# The legacy behavior doesn't complain about pre-releases being used, falling back to that for now.
# See https://github.com//pull/5071
npm install --unsafe-perm --legacy-peer-deps --omit=dev
fi fi
;; ;;
*) *)
@ -151,19 +135,26 @@ install_with_yarn_or_npm() {
exit 1 exit 1
;; ;;
esac esac
return 0
} }
vscode_install() { vscode_install() {
echo 'Installing Code dependencies...' echo 'Installing Code dependencies...'
cd lib/vscode cd lib/vscode
install_with_yarn_or_npm if ! install_with_yarn_or_npm; then
return 1
fi
symlink_asar symlink_asar
symlink_bin_script remote-cli code code-server symlink_bin_script remote-cli code code-server
symlink_bin_script helpers browser browser .sh symlink_bin_script helpers browser browser .sh
cd extensions cd extensions
install_with_yarn_or_npm if ! install_with_yarn_or_npm; then
return 1
fi
return 0
} }
main "$@" main "$@"

View file

@ -1,103 +0,0 @@
#!/usr/bin/env bash
# Description: This is a script to make the release process easier
# Run it with `yarn release:prep` and it will do the following:
# 1. Check that you have gh installed and that you're signed in
# 2. Update the version of code-server (package.json, docs, etc.)
# 3. Update the code coverage badge in the README
# 4. Open a draft PR using the release_template.md and view in browser
# If you want to perform a dry run of this script run DRY_RUN=1 yarn release:prep
set -euo pipefail
CHECKMARK="\xE2\x9C\x94"
DASH="-"
main() {
if [ "${DRY_RUN-}" = 1 ]; then
echo "Performing a dry run..."
CMD="echo"
else
CMD=''
fi
cd "$(dirname "$0")/../.."
# Check that gh is installed
if ! command -v gh &> /dev/null; then
echo "gh could not be found."
echo "We use this with the release-github-draft.sh and release-github-assets.sh scripts."
echo -e "See docs here: https://github.com/cli/cli#installation"
exit
fi
# Check that they have jq installed
if ! command -v jq &> /dev/null; then
echo "jq could not be found."
echo "We use this to parse the package.json and grab the current version of code-server."
echo -e "See docs here: https://stedolan.github.io/jq/download/"
exit
fi
# Check that they have rg installed
if ! command -v rg &> /dev/null; then
echo "rg could not be found."
echo "We use this when updating files across the codebase."
echo -e "See docs here: https://github.com/BurntSushi/ripgrep#installation"
exit
fi
# Check that they have node installed
if ! command -v node &> /dev/null; then
echo "node could not be found."
echo "That's surprising..."
echo "We use it in this script for getting the package.json version"
echo -e "See docs here: https://nodejs.org/en/download/"
exit
fi
# Check that gh is authenticated
if ! gh auth status -h github.com &> /dev/null; then
echo "gh isn't authenticated to github.com."
echo "This is needed for our scripts that use gh."
echo -e "See docs regarding authentication: https://cli.github.com/manual/gh_auth_login"
exit
fi
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-)
if [[ -z $(git config "branch.${CURRENT_BRANCH}.remote") ]]; then
echo "Doesn't look like you've pushed this branch to remote"
# Note: we need to set upstream as well or the gh pr create step will fail
# See: https://github.com/cli/cli/issues/575
echo "Please set the upstream and then run the script"
exit 1
fi
# credit to jakwuh for this solution
# https://gist.github.com/DarrenN/8c6a5b969481725a4413#gistcomment-1971123
CODE_SERVER_CURRENT_VERSION=$(node -pe "require('./package.json').version")
# Ask which version we should update to
# In the future, we'll automate this and determine the latest version automatically
echo -e "$DASH Current version: ${CODE_SERVER_CURRENT_VERSION}"
# The $'\n' adds a line break. See: https://stackoverflow.com/a/39581815/3015595
CODE_SERVER_VERSION_TO_UPDATE=$(git rev-parse --abbrev-ref HEAD | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')
echo -e "$CHECKMARK Version in branch name"
echo -e "$CHECKMARK Updating to: $CODE_SERVER_VERSION_TO_UPDATE"
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' -g '!lib/vscode/**' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
$CMD git commit --no-verify -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
# This runs from the root so that's why we use this path vs. ../../
RELEASE_TEMPLATE_STRING=$(cat ./.github/PULL_REQUEST_TEMPLATE/release_template.md)
echo -e "\nOpening a draft PR on GitHub"
# To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create
$CMD gh pr create --base main --title "release: $CODE_SERVER_VERSION_TO_UPDATE" --body "$RELEASE_TEMPLATE_STRING" --reviewer @coder/code-server --repo coder/code-server --draft --assignee "@me"
# Open PR in browser
$CMD gh pr view --web
}
main "$@"

View file

@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
# Prevents integration with moderate or higher vulnerabilities
# Docs: https://github.com/IBM/audit-ci#options
yarn audit-ci --moderate
}
main "$@"

View file

@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
yarn fmt
yarn lint
yarn _audit
yarn test:unit
}
main "$@"

View file

@ -18,7 +18,7 @@ main() {
echo "Files need generation or are formatted incorrectly:" echo "Files need generation or are formatted incorrectly:"
git -c color.ui=always status | grep --color=no '\[31m' git -c color.ui=always status | grep --color=no '\[31m'
echo "Please run the following locally:" echo "Please run the following locally:"
echo " yarn doctoc" echo " npm run doctoc"
exit 1 exit 1
fi fi
} }

View file

@ -1,44 +1,50 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
# Generate icons from a single favicon.svg. favicon.svg should have no fill
# colors set.
main() { main() {
cd src/browser/media cd src/browser/media
# We need .ico for backwards compatibility. # We need .ico for backwards compatibility. The other two are the only icon
# The other two are the only icon sizes required by Chrome and # sizes required by Chrome and we use them for stuff like apple-touch-icon as
# we use them for stuff like apple-touch-icon as well. # well. https://web.dev/add-manifest/
# https://web.dev/add-manifest/
# #
# This should be enough and we can always add more if there are problems. # This should be enough and we can always add more if there are problems.
#
# -quiet to avoid https://github.com/ImageMagick/ImageMagick/issues/884
# -background defaults to white but we want it transparent. # -background defaults to white but we want it transparent.
# -density somehow makes the image both sharper and smaller in file size.
#
# https://imagemagick.org/script/command-line-options.php#background # https://imagemagick.org/script/command-line-options.php#background
convert -quiet -background transparent -resize 256x256 favicon.svg favicon.ico convert -quiet -background transparent \
# We do not generate the pwa-icon from the favicon as they are slightly different -resize 256x256 -density 256x256 \
# designs and sizes. favicon.svg favicon.ico
# See favicon.afdesign and #2401 for details on the differences.
convert -quiet -background transparent -resize 192x192 pwa-icon.png pwa-icon-192.png
convert -quiet -background transparent -resize 512x512 pwa-icon.png pwa-icon-512.png
# We use -quiet above to avoid https://github.com/ImageMagick/ImageMagick/issues/884 # Generate PWA icons. There should be enough padding to support masking.
convert -quiet -border 60x60 -bordercolor white -background white \
-resize 192x192 -density 192x192 \
favicon.svg pwa-icon-maskable-192.png
convert -quiet -border 160x160 -bordercolor white -background white \
-resize 512x512 -density 512x512 \
favicon.svg pwa-icon-maskable-512.png
# The following adds dark mode support for the favicon as favicon-dark-support.svg # Generate non-maskable PWA icons.
# There is no similar capability for pwas or .ico so we can only add support to the svg. magick pwa-icon-maskable-192.png \
favicon_dark_style="<style> \( +clone -threshold 101% -fill white -draw "roundRectangle 0,0 %[fx:int(w)],%[fx:int(h)] 50,50" \) \
@media (prefers-color-scheme: dark) { -channel-fx "| gray=>alpha" \
* { pwa-icon-192.png
fill: white; magick pwa-icon-maskable-512.png \
} \( +clone -threshold 101% -fill white -draw "roundRectangle 0,0 %[fx:int(w)],%[fx:int(h)] 100,100" \) \
} -channel-fx "| gray=>alpha" \
</style>" pwa-icon-512.png
# See https://stackoverflow.com/a/22901380/4283659
# This escapes all newlines so that sed will accept them. # The following adds dark mode support for the favicon as
favicon_dark_style="$(printf "%s\n" "$favicon_dark_style" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g')" # favicon-dark-support.svg There is no similar capability for pwas or .ico so
sed "$( # we can only add support to the svg.
cat -n << EOF favicon_dark_style="<style>@media (prefers-color-scheme: dark) {* { fill: white; }}</style>"
s%<rect id="favicon"%$favicon_dark_style<rect id="favicon"% cp favicon.svg favicon-dark-support.svg
EOF sed "s%<path%$favicon_dark_style\n <path%" favicon.svg > favicon-dark-support.svg
)" favicon.svg > favicon-dark-support.svg
} }
main "$@" main "$@"

View file

@ -3,14 +3,13 @@ set -euo pipefail
# Install dependencies in $1. # Install dependencies in $1.
install-deps() { install-deps() {
local args=(install) local args=()
if [[ ${CI-} ]]; then if [[ ${CI-} ]]; then
args+=(--frozen-lockfile) args+=(ci)
else
args+=(install)
fi fi
if [[ "$1" == "lib/vscode" ]]; then # If there is no package.json then npm will look upward and end up installing
args+=(--no-default-rc)
fi
# If there is no package.json then yarn will look upward and end up installing
# from the root resulting in an infinite loop (this can happen if you have not # from the root resulting in an infinite loop (this can happen if you have not
# checked out the submodule yet for example). # checked out the submodule yet for example).
if [[ ! -f "$1/package.json" ]]; then if [[ ! -f "$1/package.json" ]]; then
@ -19,7 +18,7 @@ install-deps() {
fi fi
pushd "$1" pushd "$1"
echo "Installing dependencies for $PWD" echo "Installing dependencies for $PWD"
yarn "${args[@]}" npm "${args[@]}"
popd popd
} }

3
ci/dev/preinstall.js Normal file
View file

@ -0,0 +1,3 @@
if (process.env.npm_execpath.includes("yarn")) {
throw new Error("`yarn` is no longer supported; please use `npm install` instead")
}

View file

@ -2,9 +2,9 @@
set -euo pipefail set -euo pipefail
help() { help() {
echo >&2 " You can build with 'yarn watch' or you can build a release" echo >&2 " You can build with 'npm run watch' or you can build a release"
echo >&2 " For example: 'yarn build && yarn build:vscode && KEEP_MODULES=1 yarn release'" echo >&2 " For example: 'npm run build && npm run build:vscode && KEEP_MODULES=1 npm run release'"
echo >&2 " Then 'CODE_SERVER_TEST_ENTRY=./release yarn test:e2e'" echo >&2 " Then 'CODE_SERVER_TEST_ENTRY=./release npm run test:e2e'"
echo >&2 " You can manually run that release with 'node ./release'" echo >&2 " You can manually run that release with 'node ./release'"
} }
@ -15,7 +15,7 @@ main() {
pushd test/e2e/extensions/test-extension pushd test/e2e/extensions/test-extension
echo "Building test extension" echo "Building test extension"
yarn build npm run build
popd popd
local dir="$PWD" local dir="$PWD"
@ -44,7 +44,7 @@ main() {
fi fi
cd test cd test
yarn playwright test "$@" ./node_modules/.bin/playwright test "$@"
} }
main "$@" main "$@"

View file

@ -2,9 +2,9 @@
set -euo pipefail set -euo pipefail
help() { help() {
echo >&2 " You can build the standalone release with 'yarn release:standalone'" echo >&2 " You can build the standalone release with 'npm run release:standalone'"
echo >&2 " Or you can pass in a custom path." echo >&2 " Or you can pass in a custom path."
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration" echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
} }
# Make sure a code-server release works. You can pass in the path otherwise it # Make sure a code-server release works. You can pass in the path otherwise it
@ -33,7 +33,7 @@ main() {
exit 1 exit 1
fi fi
CODE_SERVER_PATH="$path" CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures" CODE_SERVER_PATH="$path" ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration" --testPathIgnorePatterns "./test/integration/fixtures"
} }
main "$@" main "$@"

View file

@ -2,9 +2,9 @@
set -euo pipefail set -euo pipefail
help() { help() {
echo >&2 " You can build the standalone release with 'yarn release:standalone'" echo >&2 " You can build the standalone release with 'npm run release:standalone'"
echo >&2 " Or you can pass in a custom path." echo >&2 " Or you can pass in a custom path."
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration" echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
} }
# Make sure a code-server release works. You can pass in the path otherwise it # Make sure a code-server release works. You can pass in the path otherwise it

View file

@ -6,31 +6,10 @@ main() {
source ./ci/lib.sh source ./ci/lib.sh
echo "Building test plugin"
pushd test/unit/node/test-plugin
make -s out/index.js
popd
# Our code imports from `out` in order to work during development but if you
# have only built for production you will have not have this directory. In
# that case symlink `out` to a production build directory.
if [[ ! -e lib/vscode/out ]]; then
pushd lib
local out=(vscode-reh-web-*)
if [[ -d "${out[0]}" ]]; then
ln -s "../${out[0]}/out" ./vscode/out
else
echo "Could not find lib/vscode/out or lib/vscode-reh-web-*"
echo "Code must be built before running unit tests"
exit 1
fi
popd
fi
# We must keep jest in a sub-directory. See ../../test/package.json for more # We must keep jest in a sub-directory. See ../../test/package.json for more
# information. We must also run it from the root otherwise coverage will not # information. We must also run it from the root otherwise coverage will not
# include our source files. # include our source files.
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts" --testPathIgnorePatterns "./test/unit/node/test-plugin" ./test/node_modules/.bin/jest "$@" --testRegex "./test/unit/.*ts"
} }
main "$@" main "$@"

View file

@ -1,4 +1,4 @@
import { spawn, fork, ChildProcess } from "child_process" import { spawn, ChildProcess } from "child_process"
import * as path from "path" import * as path from "path"
import { onLine, OnLineCallback } from "../../src/node/util" import { onLine, OnLineCallback } from "../../src/node/util"
@ -30,12 +30,13 @@ class Watcher {
// Pass CLI args, save for `node` and the initial script name. // Pass CLI args, save for `node` and the initial script name.
const args = process.argv.slice(2) const args = process.argv.slice(2)
this.webServer = fork(path.join(this.rootPath, "out/node/entry.js"), args) this.webServer = spawn("node", [path.join(this.rootPath, "out/node/entry.js"), ...args])
onLine(this.webServer, (line) => console.log("[code-server]", line))
const { pid } = this.webServer const { pid } = this.webServer
this.webServer.on("exit", () => console.log("[Code Server]", `Web process ${pid} exited`)) this.webServer.on("exit", () => console.log("[code-server]", `Web process ${pid} exited`))
console.log("\n[Code Server]", `Spawned web server process ${pid}`) console.log("\n[code-server]", `Spawned web server process ${pid}`)
} }
//#endregion //#endregion
@ -44,9 +45,11 @@ class Watcher {
private readonly compilers: DevelopmentCompilers = { private readonly compilers: DevelopmentCompilers = {
codeServer: spawn("tsc", ["--watch", "--pretty", "--preserveWatchOutput"], { cwd: this.rootPath }), codeServer: spawn("tsc", ["--watch", "--pretty", "--preserveWatchOutput"], { cwd: this.rootPath }),
vscode: spawn("yarn", ["watch"], { cwd: this.paths.vscodeDir }), vscode: spawn("npm", ["run", "watch"], { cwd: this.paths.vscodeDir }),
vscodeWebExtensions: spawn("yarn", ["watch-web"], { cwd: this.paths.vscodeDir }), vscodeWebExtensions: spawn("npm", ["run", "watch-web"], { cwd: this.paths.vscodeDir }),
plugins: this.paths.pluginDir ? spawn("yarn", ["build", "--watch"], { cwd: this.paths.pluginDir }) : undefined, plugins: this.paths.pluginDir
? spawn("npm", ["run", "build", "--watch"], { cwd: this.paths.pluginDir })
: undefined,
} }
public async initialize(): Promise<void> { public async initialize(): Promise<void> {
@ -82,10 +85,10 @@ class Watcher {
private parseVSCodeLine: OnLineCallback = (strippedLine, originalLine) => { private parseVSCodeLine: OnLineCallback = (strippedLine, originalLine) => {
if (!strippedLine.length) return if (!strippedLine.length) return
console.log("[VS Code]", originalLine) console.log("[Code OSS]", originalLine)
if (strippedLine.includes("Finished compilation with")) { if (strippedLine.includes("Finished compilation with")) {
console.log("[VS Code] ✨ Finished compiling! ✨", "(Refresh your web browser ♻️)") console.log("[Code OSS] ✨ Finished compiling! ✨", "(Refresh your web browser ♻️)")
this.reloadWebServer() this.reloadWebServer()
} }
} }
@ -93,10 +96,10 @@ class Watcher {
private parseCodeServerLine: OnLineCallback = (strippedLine, originalLine) => { private parseCodeServerLine: OnLineCallback = (strippedLine, originalLine) => {
if (!strippedLine.length) return if (!strippedLine.length) return
console.log("[Compiler][Code Server]", originalLine) console.log("[Compiler][code-server]", originalLine)
if (strippedLine.includes("Watching for file changes")) { if (strippedLine.includes("Watching for file changes")) {
console.log("[Compiler][Code Server]", "Finished compiling!", "(Refresh your web browser ♻️)") console.log("[Compiler][code-server]", "Finished compiling!", "(Refresh your web browser ♻️)")
this.reloadWebServer() this.reloadWebServer()
} }
} }

View file

@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.3.2 version: 3.31.2
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.8.2 appVersion: 4.104.2

View file

@ -7,8 +7,11 @@ metadata:
helm.sh/chart: {{ include "code-server.chart" . }} helm.sh/chart: {{ include "code-server.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.annotations }}
annotations: {{- toYaml .Values.annotations | nindent 4 }}
{{- end }}
spec: spec:
replicas: 1 replicas: {{ .Values.replicaCount | default 1 }}
strategy: strategy:
type: Recreate type: Recreate
selector: selector:
@ -20,6 +23,9 @@ spec:
labels: labels:
app.kubernetes.io/name: {{ include "code-server.name" . }} app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec: spec:
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- if .Values.hostnameOverride }} {{- if .Values.hostnameOverride }}
@ -32,8 +38,9 @@ spec:
securityContext: securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }} fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }} {{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} {{- if or (and .Values.volumePermissions.enabled .Values.persistence.enabled) .Values.extraInitContainers }}
initContainers: initContainers:
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: init-chmod-data - name: init-chmod-data
image: busybox:latest image: busybox:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
@ -47,6 +54,7 @@ spec:
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /home/coder mountPath: /home/coder
{{- end }}
{{- if .Values.extraInitContainers }} {{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6}} {{ tpl .Values.extraInitContainers . | indent 6}}
{{- end }} {{- end }}
@ -102,6 +110,7 @@ spec:
{{- range .Values.extraSecretMounts }} {{- range .Values.extraSecretMounts }}
- name: {{ .name }} - name: {{ .name }}
mountPath: {{ .mountPath }} mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }} readOnly: {{ .readOnly }}
{{- end }} {{- end }}
{{- range .Values.extraVolumeMounts }} {{- range .Values.extraVolumeMounts }}
@ -114,6 +123,11 @@ spec:
- name: http - name: http
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: TCP
{{- range .Values.extraPorts }}
- name: {{ .name }}
containerPort: {{ .port }}
protocol: {{ .protocol }}
{{- end }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: / path: /
@ -168,9 +182,12 @@ spec:
{{- if .existingClaim }} {{- if .existingClaim }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ .existingClaim }} claimName: {{ .existingClaim }}
{{- else }} {{- else if .hostPath }}
hostPath: hostPath:
path: {{ .hostPath }} path: {{ .hostPath }}
type: Directory type: Directory
{{- else }}
emptyDir:
{{- toYaml .emptyDir | nindent 10 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -1,3 +1,4 @@
{{- if not .Values.existingSecret }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@ -11,8 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque type: Opaque
data: data:
{{ if .Values.password }} {{- if .Values.password }}
password: "{{ .Values.password | b64enc }}" password: "{{ .Values.password | b64enc }}"
{{ else }} {{- else }}
password: "{{ randAlphaNum 24 | b64enc }}" password: "{{ randAlphaNum 24 | b64enc }}"
{{ end }} {{- end }}
{{- end }}

View file

@ -14,6 +14,12 @@ spec:
targetPort: http targetPort: http
protocol: TCP protocol: TCP
name: http name: http
{{- range .Values.extraPorts }}
- port: {{ .port }}
targetPort: {{ .port }}
protocol: {{ .protocol }}
name: {{ .name }}
{{- end }}
selector: selector:
app.kubernetes.io/name: {{ include "code-server.name" . }} app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}

View file

@ -6,7 +6,7 @@ replicaCount: 1
image: image:
repository: codercom/code-server repository: codercom/code-server
tag: '4.8.2' tag: '4.104.2'
pullPolicy: Always pullPolicy: Always
# Specifies one or more secrets to be used when pulling images from a # Specifies one or more secrets to be used when pulling images from a
@ -19,6 +19,9 @@ nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
hostnameOverride: "" hostnameOverride: ""
# The existing secret to use for code-server authentication in the frontend. the password is stored in the secret under the key `password`
# existingSecret: ""
serviceAccount: serviceAccount:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: true create: true
@ -28,6 +31,9 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
# Specifies annotations for deployment
annotations: {}
podAnnotations: {} podAnnotations: {}
podSecurityContext: {} podSecurityContext: {}
@ -71,9 +77,10 @@ extraArgs: []
# Optional additional environment variables # Optional additional environment variables
extraVars: [] extraVars: []
# - name: DISABLE_TELEMETRY # - name: DISABLE_TELEMETRY
# value: true # value: "true"
# if dind is desired:
# - name: DOCKER_HOST # - name: DOCKER_HOST
# value: "tcp://localhost:2375" # value: "tcp://localhost:2376"
## ##
## Init containers parameters: ## Init containers parameters:
@ -136,25 +143,39 @@ lifecycle:
# - -c # - -c
# - curl -s -L SOME_SCRIPT | bash # - curl -s -L SOME_SCRIPT | bash
# for dind, the following may be helpful
# postStart:
# exec:
# command:
# - /bin/sh
# - -c
# - |
# sudo apt-get update \
# && sudo apt-get install -y docker.io
## Enable an Specify container in extraContainers. ## Enable an Specify container in extraContainers.
## This is meant to allow adding code-server dependencies, like docker-dind. ## This is meant to allow adding code-server dependencies, like docker-dind.
extraContainers: | extraContainers: |
# If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars" # If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars"
#- name: docker-dind # - name: docker-dind
# image: docker:19.03-dind # image: docker:28.3.2-dind
# imagePullPolicy: IfNotPresent # imagePullPolicy: IfNotPresent
# resources: # resources:
# requests: # requests:
# cpu: 250m # cpu: 1
# memory: 256M # ephemeral-storage: "50Gi"
# securityContext: # memory: 10Gi
# privileged: true # securityContext:
# procMount: Default # privileged: true
# env: # procMount: Default
# - name: DOCKER_TLS_CERTDIR # env:
# value: "" # - name: DOCKER_TLS_CERTDIR
# - name: DOCKER_DRIVER # value: "" # disable TLS setup
# value: "overlay2" # command:
# - dockerd
# - --host=unix:///var/run/docker.sock
# - --host=tcp://0.0.0.0:2376
extraInitContainers: | extraInitContainers: |
# - name: customization # - name: customization
@ -179,6 +200,7 @@ extraInitContainers: |
extraSecretMounts: [] extraSecretMounts: []
# - name: secret-files # - name: secret-files
# mountPath: /etc/secrets # mountPath: /etc/secrets
# subPath: private.key # (optional)
# secretName: code-server-secret-files # secretName: code-server-secret-files
# readOnly: true # readOnly: true
@ -189,6 +211,7 @@ extraVolumeMounts: []
# readOnly: true # readOnly: true
# existingClaim: volume-claim # existingClaim: volume-claim
# hostPath: "" # hostPath: ""
# emptyDir: {}
extraConfigmapMounts: [] extraConfigmapMounts: []
# - name: certs-configmap # - name: certs-configmap
@ -196,3 +219,8 @@ extraConfigmapMounts: []
# subPath: certificates.crt # (optional) # subPath: certificates.crt # (optional)
# configMap: certs-configmap # configMap: certs-configmap
# readOnly: true # readOnly: true
extraPorts: []
# - name: minecraft
# port: 25565
# protocol: tcp

View file

@ -9,10 +9,6 @@ popd() {
builtin popd > /dev/null builtin popd > /dev/null
} }
pkg_json_version() {
jq -r .version package.json
}
vscode_version() { vscode_version() {
jq -r .version lib/vscode/package.json jq -r .version lib/vscode/package.json
} }
@ -48,8 +44,6 @@ rsync() {
command rsync -a --del "$@" command rsync -a --del "$@"
} }
VERSION="$(pkg_json_version)"
export VERSION
ARCH="$(arch)" ARCH="$(arch)"
export ARCH export ARCH
OS=$(os) OS=$(os)

View file

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:experimental # syntax=docker/dockerfile:experimental
ARG BASE=debian:11 ARG BASE=debian:12
FROM scratch AS packages FROM scratch AS packages
COPY release-packages/code-server*.deb /tmp/ COPY release-packages/code-server*.deb /tmp/
@ -10,18 +10,19 @@ RUN apt-get update \
&& apt-get install -y \ && apt-get install -y \
curl \ curl \
dumb-init \ dumb-init \
zsh \
htop \
locales \
man \
nano \
git \ git \
git-lfs \ git-lfs \
procps \ htop \
openssh-client \ locales \
sudo \
vim.tiny \
lsb-release \ lsb-release \
man-db \
nano \
openssh-client \
procps \
sudo \
vim-tiny \
wget \
zsh \
&& git lfs install \ && git lfs install \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@ -30,11 +31,14 @@ RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
&& locale-gen && locale-gen
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8
RUN adduser --gecos '' --disabled-password coder \ RUN if grep -q 1000 /etc/passwd; then \
userdel -r "$(id -un 1000)"; \
fi \
&& adduser --gecos '' --disabled-password coder \
&& echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(dpkg --print-architecture)" \ RUN ARCH="$(dpkg --print-architecture)" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.5/fixuid-0.5-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \ && curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \ && chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \ && chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \ && mkdir -p /etc/fixuid \

View file

@ -0,0 +1,51 @@
# syntax=docker/dockerfile:experimental
ARG BASE=fedora:39
FROM scratch AS packages
COPY release-packages/code-server*.rpm /tmp/
FROM $BASE
RUN dnf update -y \
&& dnf install -y \
curl \
git \
git-lfs \
htop \
nano \
openssh-clients \
procps \
wget \
zsh \
dumb-init \
glibc-langpack-en \
&& rm -rf /var/cache/dnf
RUN git lfs install
ENV LANG=en_US.UTF-8
RUN echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
RUN useradd -u 1000 coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages rpm -i /tmp/packages/code-server*$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').rpm
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
ENV ENTRYPOINTD=${HOME}/entrypoint.d
EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
# the uid will remain the same. note: only relevant if -u isn't passed to
# docker-run.
USER 1000
ENV USER=coder
WORKDIR /home/coder
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]

View file

@ -0,0 +1,51 @@
# syntax=docker/dockerfile:experimental
ARG BASE=opensuse/tumbleweed
FROM scratch AS packages
COPY release-packages/code-server*.rpm /tmp/
FROM $BASE
RUN zypper dup -y \
&& zypper in -y \
curl \
git \
git-lfs \
htop \
nano \
openssh-clients \
procps \
wget \
zsh \
sudo \
catatonit \
&& rm -rf /var/cache/zypp /var/cache/zypper
RUN git lfs install
ENV LANG=en_US.UTF-8
RUN echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
RUN useradd -u 1000 coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')" \
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
COPY ci/release-image/entrypoint-catatonit.sh /usr/bin/entrypoint-catatonit.sh
RUN --mount=from=packages,src=/tmp,dst=/tmp/packages rpm -i /tmp/packages/code-server*$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').rpm
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
ENV ENTRYPOINTD=${HOME}/entrypoint.d
EXPOSE 8080
# This way, if someone sets $DOCKER_USER, docker-exec will still work as
# the uid will remain the same. note: only relevant if -u isn't passed to
# docker-run.
USER 1000
ENV USER=coder
WORKDIR /home/coder
ENTRYPOINT ["/usr/bin/entrypoint-catatonit.sh", "--bind-addr", "0.0.0.0:8080", "."]

View file

@ -16,8 +16,11 @@ variable "GITHUB_REGISTRY" {
group "default" { group "default" {
targets = [ targets = [
"code-server-debian-11", "code-server-debian-12",
"code-server-ubuntu-focal", "code-server-ubuntu-focal",
"code-server-ubuntu-noble",
"code-server-fedora-39",
"code-server-opensuse-tumbleweed",
] ]
} }
@ -45,12 +48,12 @@ function "gen_tags_for_docker_and_ghcr" {
) )
} }
target "code-server-debian-11" { target "code-server-debian-12" {
dockerfile = "ci/release-image/Dockerfile" dockerfile = "ci/release-image/Dockerfile"
tags = concat( tags = concat(
gen_tags_for_docker_and_ghcr(""), gen_tags_for_docker_and_ghcr(""),
gen_tags_for_docker_and_ghcr("debian"), gen_tags_for_docker_and_ghcr("debian"),
gen_tags_for_docker_and_ghcr("bullseye"), gen_tags_for_docker_and_ghcr("bookworm"),
) )
platforms = ["linux/amd64", "linux/arm64"] platforms = ["linux/amd64", "linux/arm64"]
} }
@ -66,3 +69,38 @@ target "code-server-ubuntu-focal" {
} }
platforms = ["linux/amd64", "linux/arm64"] platforms = ["linux/amd64", "linux/arm64"]
} }
target "code-server-ubuntu-noble" {
dockerfile = "ci/release-image/Dockerfile"
tags = concat(
gen_tags_for_docker_and_ghcr("noble"),
)
args = {
BASE = "ubuntu:noble"
}
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-fedora-39" {
dockerfile = "ci/release-image/Dockerfile.fedora"
tags = concat(
gen_tags_for_docker_and_ghcr("fedora"),
gen_tags_for_docker_and_ghcr("39"),
)
args = {
BASE = "fedora:39"
}
platforms = ["linux/amd64", "linux/arm64"]
}
target "code-server-opensuse-tumbleweed" {
dockerfile = "ci/release-image/Dockerfile.opensuse"
tags = concat(
gen_tags_for_docker_and_ghcr("opensuse"),
gen_tags_for_docker_and_ghcr("tumbleweed"),
)
args = {
BASE = "opensuse/tumbleweed"
}
platforms = ["linux/amd64", "linux/arm64"]
}

View file

@ -0,0 +1,27 @@
#!/bin/sh
set -eu
# We do this first to ensure sudo works below when renaming the user.
# Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)"
if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container.
sudo usermod --login "$DOCKER_USER" coder
sudo groupmod -n "$DOCKER_USER" coder
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
fi
fi
# Allow users to have scripts run on container startup to prepare workspace.
# https://github.com/coder/code-server/issues/5177
if [ -d "${ENTRYPOINTD}" ]; then
find "${ENTRYPOINTD}" -type f -executable -print -exec {} \;
fi
exec catatonit -- /usr/bin/code-server "$@"

View file

@ -7,7 +7,7 @@ eval "$(fixuid -q)"
if [ "${DOCKER_USER-}" ]; then if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER" USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then if [ -z "$(id -u "$DOCKER_USER" 2>/dev/null)" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Unfortunately we cannot change $HOME as we cannot move any bind mounts # Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container. # nor can we bind mount $HOME into a new home as that requires a privileged container.

View file

@ -3,9 +3,8 @@ set -euo pipefail
main() { main() {
cd "$(dirname "$0")/../.." cd "$(dirname "$0")/../.."
# ci/lib.sh sets VERSION so it's available to ci/release-image/docker-bake.hcl # NOTE@jsjoeio - this script assumes VERSION exists as an
# to push the VERSION tag. # environment variable.
source ./ci/lib.sh
# NOTE@jsjoeio - this script assumes that you've downloaded # NOTE@jsjoeio - this script assumes that you've downloaded
# the release-packages artifact to ./release-packages before # the release-packages artifact to ./release-packages before

View file

@ -19,12 +19,6 @@ main() {
# This is because npm won't publish your package unless it's a new version. # This is because npm won't publish your package unless it's a new version.
# i.e. for development, we bump the version to <current version>-<pr number>-<commit sha> # i.e. for development, we bump the version to <current version>-<pr number>-<commit sha>
# example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040" # example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040"
# We need the current package.json VERSION
if ! is_env_var_set "VERSION"; then
echo "VERSION is not set. Cannot publish to npm without VERSION."
exit 1
fi
# We use this to grab the PR_NUMBER # We use this to grab the PR_NUMBER
if ! is_env_var_set "GITHUB_REF"; then if ! is_env_var_set "GITHUB_REF"; then
echo "GITHUB_REF is not set. Are you running this locally? We rely on values provided by GitHub." echo "GITHUB_REF is not set. Are you running this locally? We rely on values provided by GitHub."
@ -59,11 +53,11 @@ main() {
# This string is used to determine how we should tag the npm release. # This string is used to determine how we should tag the npm release.
# Environment can be one of three choices: # Environment can be one of three choices:
# "development" - this means we tag with the PR number, allowing # "development" - this means we tag with the PR number, allowing
# a developer to install this version with `yarn add code-server@<pr-number>` # a developer to install this version with `npm install code-server@<pr-number>`
# "staging" - this means we tag with `beta`, allowing # "staging" - this means we tag with `beta`, allowing
# a developer to install this version with `yarn add code-server@beta` # a developer to install this version with `npm install code-server@beta`
# "production" - this means we tag with `latest` (default), allowing # "production" - this means we tag with `latest` (default), allowing
# a developer to install this version with `yarn add code-server@latest` # a developer to install this version with `npm install code-server@latest`
if ! is_env_var_set "NPM_ENVIRONMENT"; then if ! is_env_var_set "NPM_ENVIRONMENT"; then
echo "NPM_ENVIRONMENT is not set." echo "NPM_ENVIRONMENT is not set."
echo "Determining in script based on GITHUB environment variables." echo "Determining in script based on GITHUB environment variables."
@ -92,7 +86,7 @@ main() {
if [[ "$NPM_ENVIRONMENT" == "production" ]]; then if [[ "$NPM_ENVIRONMENT" == "production" ]]; then
NPM_VERSION="$VERSION" NPM_VERSION="$VERSION"
# This means the npm version will be published as "stable" # This means the npm version will be published as "stable"
# and installed when a user runs `yarn install code-server` # and installed when a user runs `npm install code-server`
NPM_TAG="latest" NPM_TAG="latest"
else else
COMMIT_SHA="$GITHUB_SHA" COMMIT_SHA="$GITHUB_SHA"
@ -100,8 +94,9 @@ main() {
if [[ "$NPM_ENVIRONMENT" == "staging" ]]; then if [[ "$NPM_ENVIRONMENT" == "staging" ]]; then
NPM_VERSION="$VERSION-beta-$COMMIT_SHA" NPM_VERSION="$VERSION-beta-$COMMIT_SHA"
# This means the npm version will be tagged with "beta" # This means the npm version will be tagged with "beta"
# and installed when a user runs `yarn install code-server@beta` # and installed when a user runs `npm install code-server@beta`
NPM_TAG="beta" NPM_TAG="beta"
PACKAGE_NAME="@coder/code-server-pr"
fi fi
if [[ "$NPM_ENVIRONMENT" == "development" ]]; then if [[ "$NPM_ENVIRONMENT" == "development" ]]; then
@ -110,7 +105,7 @@ main() {
NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA" NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA"
PACKAGE_NAME="@coder/code-server-pr" PACKAGE_NAME="@coder/code-server-pr"
# This means the npm version will be tagged with "<pr number>" # This means the npm version will be tagged with "<pr number>"
# and installed when a user runs `yarn install code-server@<pr number>` # and installed when a user runs `npm install code-server@<pr number>`
NPM_TAG="$PR_NUMBER" NPM_TAG="$PR_NUMBER"
fi fi
@ -125,10 +120,7 @@ main() {
# Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040" # Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040"
# Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040" # Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040"
pushd release pushd release
# NOTE@jsjoeio
# I originally tried to use `yarn version` but ran into issues and abandoned it.
npm version "$NPM_VERSION" npm version "$NPM_VERSION"
# NOTE@jsjoeio
# Use the development package name # Use the development package name
# This is so we don't clutter the code-server versions on npm # This is so we don't clutter the code-server versions on npm
# with development versions. # with development versions.
@ -139,7 +131,6 @@ main() {
popd popd
fi fi
# NOTE@jsjoeio
# We need to make sure we haven't already published the version. # We need to make sure we haven't already published the version.
# If we get error, continue with script because we want to publish # If we get error, continue with script because we want to publish
# If version is valid, we check if we're publishing the same one # If version is valid, we check if we're publishing the same one
@ -149,10 +140,10 @@ main() {
return return
fi fi
# NOTE@jsjoeio
# Since the dev builds are scoped to @coder # Since the dev builds are scoped to @coder
# We pass --access public to ensure npm knows it's not private. # We pass --access public to ensure npm knows it's not private.
yarn publish --non-interactive release --tag "$NPM_TAG" --access public cd release
npm publish --tag "$NPM_TAG" --access public
} }
main "$@" main "$@"

View file

@ -5,15 +5,14 @@
- [Requirements](#requirements) - [Requirements](#requirements)
- [Linux-specific requirements](#linux-specific-requirements) - [Linux-specific requirements](#linux-specific-requirements)
- [Creating pull requests](#creating-pull-requests)
- [Commits and commit history](#commits-and-commit-history)
- [Development workflow](#development-workflow) - [Development workflow](#development-workflow)
- [Version updates to Code](#version-updates-to-code) - [Version updates to Code](#version-updates-to-code)
- [Patching Code](#patching-code) - [Patching Code](#patching-code)
- [Build](#build) - [Build](#build)
- [Creating a Standalone Release](#creating-a-standalone-release)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
- [I see "Forbidden access" when I load code-server in the browser](#i-see-forbidden-access-when-i-load-code-server-in-the-browser) - [I see "Forbidden access" when I load code-server in the browser](#i-see-forbidden-access-when-i-load-code-server-in-the-browser)
- ["Can only have one anonymous define call per script"](#can-only-have-one-anonymous-define-call-per-script) - ["Can only have one anonymous define call per script"](#can-only-have-one-anonymous-define-call-per-script)
- [Help](#help) - [Help](#help)
- [Test](#test) - [Test](#test)
- [Unit tests](#unit-tests) - [Unit tests](#unit-tests)
@ -27,19 +26,16 @@
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
- [Detailed CI and build process docs](../ci)
## Requirements ## Requirements
The prerequisites for contributing to code-server are almost the same as those The prerequisites for contributing to code-server are almost the same as those
for [VS for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
Here is what is needed: Here is what is needed:
- `node` v16.x - `node` v22.x
- `git` v2.x or greater - `git` v2.x or greater
- [`git-lfs`](https://git-lfs.github.com) - [`git-lfs`](https://git-lfs.github.com)
- [`yarn`](https://classic.yarnpkg.com/en/) - [`npm`](https://www.npmjs.com/)
- Used to install JS packages and run scripts - Used to install JS packages and run scripts
- [`nfpm`](https://nfpm.goreleaser.com/) - [`nfpm`](https://nfpm.goreleaser.com/)
- Used to build `.deb` and `.rpm` packages - Used to build `.deb` and `.rpm` packages
@ -59,38 +55,23 @@ Here is what is needed:
### Linux-specific requirements ### Linux-specific requirements
If you're developing code-server on Linux, make sure you have installed or install the following dependencies: If you're developing code-server on Linux, make sure you have installed or
install the following dependencies:
```shell ```shell
sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev python-is-python3
``` ```
These are required by Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for more information. These are required by Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)
for more information.
## Creating pull requests
Please create a [GitHub Issue](https://github.com/coder/code-server/issues) that
includes context for issues that you see. You can skip this if the proposed fix
is minor.
In your pull requests (PR), link to the issue that the PR solves.
Please ensure that the base of your PR is the **main** branch.
### Commits and commit history
We prefer a clean commit history. This means you should squash all fixups and
fixup-type commits before asking for a review (e.g., clean up, squash, then force
push). If you need help with this, feel free to leave a comment in your PR, and
we'll guide you.
## Development workflow ## Development workflow
1. `git clone https://github.com/coder/code-server.git` - Clone `code-server` 1. `git clone https://github.com/coder/code-server.git` - Clone `code-server`
2. `git submodule update --init` - Clone `vscode` submodule 2. `git submodule update --init` - Clone `vscode` submodule
3. `quilt push -a` - Apply patches to the `vscode` submodule. 3. `quilt push -a` - Apply patches to the `vscode` submodule.
4. `yarn` - Install dependencies 4. `npm install` - Install dependencies
5. `yarn watch` - Launch code-server localhost:8080. code-server will be live 5. `npm run watch` - Launch code-server localhost:8080. code-server will be live
reloaded when changes are made; the browser needs to be refreshed manually. reloaded when changes are made; the browser needs to be refreshed manually.
When pulling down changes that include modifications to the patches you will When pulling down changes that include modifications to the patches you will
@ -98,55 +79,62 @@ need to apply them with `quilt`. If you pull down changes that update the
`vscode` submodule you will need to run `git submodule update --init` and `vscode` submodule you will need to run `git submodule update --init` and
re-apply the patches. re-apply the patches.
When you make a change that affects people deploying the marketplace please
update the changelog as part of your PR.
Note that building code-server takes a very, very long time, and loading it in
the browser in development mode also takes a very, very long time.
Display language (Spanish, etc) support only works in a full build; it will not
work in development mode.
Generally we prefer that PRs be squashed into `main` but you can rebase or merge
if it is important to keep the individual commits (make sure to clean up the
commits first if you are doing this).
### Version updates to Code ### Version updates to Code
1. Update the `lib/vscode` submodule to the desired upstream version branch. 1. Remove any patches with `quilt pop -a`.
2. Update the `lib/vscode` submodule to the desired upstream version branch.
1. `cd lib/vscode && git checkout release/1.66 && cd ../..` 1. `cd lib/vscode && git checkout release/1.66 && cd ../..`
2. `git add lib && git commit -m "chore: update Code"` 2. `git add lib && git commit -m "chore: update to Code <version>"`
2. Apply the patches (`quilt push -a`) or restore your stashed changes. At this 3. Apply the patches one at a time (`quilt push`). If the application succeeds
stage you may need to resolve conflicts. For example use `quilt push -f`, but the lines changed, update the patch with `quilt refresh`. If there are
manually apply the rejected portions, then `quilt refresh`. conflicts, then force apply with `quilt push -f`, manually add back the
3. From the code-server **project root**, run `yarn install`. rejected code, then run `quilt refresh`.
4. Test code-server locally to make sure everything works. 4. From the code-server **project root**, run `npm install`.
5. Check the Node.js version that's used by Electron (which is shipped with VS 5. Check the Node.js version that's used by Electron (which is shipped with VS
Code. If necessary, update your version of Node.js to match. Code. If necessary, update our version of Node.js to match.
6. Commit the updated submodule and patches to `code-server`.
7. Open a PR.
Tip: if you're certain all patches are applied correctly and you simply need to
refresh, you can use this trick:
```shell
while quilt push; do quilt refresh; done
```
[Source](https://raphaelhertzog.com/2012/08/08/how-to-use-quilt-to-manage-patches-in-debian-packages/)
### Patching Code ### Patching Code
0. You can go through the patch stack with `quilt push` and `quilt pop`. 1. You can go through the patch stack with `quilt push` and `quilt pop`.
1. Create a new patch (`quilt new {name}.diff`) or use an existing patch. 2. Create a new patch (`quilt new {name}.diff`) or use an existing patch.
2. Add the file(s) you are patching (`quilt add [-P patch] {file}`). A file 3. Add the file(s) you are patching (`quilt add [-P patch] {file}`). A file
**must** be added before you make changes to it. **must** be added before you make changes to it.
3. Make your changes. Patches do not need to be independent of each other but 4. Make your changes. Patches do not need to be independent of each other but
each patch must result in a working code-server without any broken in-between each patch must result in a working code-server without any broken in-between
states otherwise they are difficult to test and modify. states otherwise they are difficult to test and modify.
4. Add your changes to the patch (`quilt refresh`) 5. Add your changes to the patch (`quilt refresh`)
5. Add a comment in the patch about the reason for the patch and how to 6. Add a comment in the patch about the reason for the patch and how to
reproduce the behavior it fixes or adds. Every patch should have an e2e test reproduce the behavior it fixes or adds. Every patch should have an e2e test
as well. as well.
### Build ### Build
You can build as follows: You can build a full production as follows:
```shell ```shell
yarn build git submodule update --init
yarn build:vscode quilt push -a
yarn release npm install
npm run build
VERSION=0.0.0 npm run build:vscode
npm run release
``` ```
_NOTE: this does not keep `node_modules`. If you want them to be kept, use `KEEP_MODULES=1 yarn release` (if you're testing in Coder, you'll want to do this)_ This does not keep `node_modules`. If you want them to be kept, use
`KEEP_MODULES=1 npm run release`
Run your build: Run your build:
@ -157,34 +145,55 @@ npm install --omit=dev # Skip if you used KEEP_MODULES=1
node . node .
``` ```
Build the release packages (make sure that you run `yarn release` first): Then, to build the release package:
```shell ```shell
yarn release:standalone npm run release:standalone
yarn test:integration npm run test:integration
yarn package npm run package
``` ```
> On Linux, the currently running distro will become the minimum supported > On Linux, the currently running distro will become the minimum supported
> version. In our GitHub Actions CI, we use CentOS 7 for maximum compatibility. > version. In our GitHub Actions CI, we use CentOS 8 for maximum compatibility.
> If you need your builds to support older distros, run the build commands > If you need your builds to support older distros, run the build commands
> inside a Docker container with all the build requirements installed. > inside a Docker container with all the build requirements installed.
#### Creating a Standalone Release
Part of the build process involves creating standalone releases. At the time of
writing, we do this for the following platforms/architectures:
- Linux amd64 (.tar.gz, .deb, and .rpm)
- Linux arm64 (.tar.gz, .deb, and .rpm)
- Linux arm7l (.tar.gz)
- Linux armhf.deb
- Linux armhf.rpm
- macOS arm64.tar.gz
Currently, these are compiled in CI using the `npm run release:standalone`
command in the `release.yaml` workflow. We then upload them to the draft release
and distribute via GitHub Releases.
### Troubleshooting ### Troubleshooting
#### I see "Forbidden access" when I load code-server in the browser #### I see "Forbidden access" when I load code-server in the browser
This means your patches didn't apply correctly. We have a patch to remove the auth from vanilla Code because we use our own. This means your patches didn't apply correctly. We have a patch to remove the
auth from vanilla Code because we use our own.
Try popping off the patches with `quilt pop -a` and reapplying with `quilt push -a`. Try popping off the patches with `quilt pop -a` and reapplying with `quilt push
-a`.
### "Can only have one anonymous define call per script" #### "Can only have one anonymous define call per script"
Code might be trying to use a dev or prod HTML in the wrong context. You can try re-running code-server and setting `VSCODE_DEV=1`. Code might be trying to use a dev or prod HTML in the wrong context. You can try
re-running code-server and setting `VSCODE_DEV=1`.
### Help ### Help
If you get stuck or need help, you can always start a new GitHub Discussion [here](https://github.com/coder/code-server/discussions). One of the maintainers will respond and help you out. If you get stuck or need help, you can always start a new GitHub Discussion
[here](https://github.com/coder/code-server/discussions). One of the maintainers
will respond and help you out.
## Test ## Test
@ -202,7 +211,9 @@ Our unit tests are written in TypeScript and run using
These live under [test/unit](../test/unit). These live under [test/unit](../test/unit).
We use unit tests for functions and things that can be tested in isolation. The file structure is modeled closely after `/src` so it's easy for people to know where test files should live. We use unit tests for functions and things that can be tested in isolation. The
file structure is modeled closely after `/src` so it's easy for people to know
where test files should live.
### Script tests ### Script tests
@ -210,12 +221,14 @@ Our script tests are written in bash and run using [bats](https://github.com/bat
These tests live under `test/scripts`. These tests live under `test/scripts`.
We use these to test anything related to our scripts (most of which live under `ci`). We use these to test anything related to our scripts (most of which live under
`ci`).
### Integration tests ### Integration tests
These are a work in progress. We build code-server and run tests with `yarn test:integration`, which ensures that code-server builds work on their respective These are a work in progress. We build code-server and run tests with `npm run
platforms. test:integration`, which ensures that code-server builds work on their
respective platforms.
Our integration tests look at components that rely on one another. For example, Our integration tests look at components that rely on one another. For example,
testing the CLI requires us to build and package code-server. testing the CLI requires us to build and package code-server.
@ -236,15 +249,10 @@ Take a look at `codeServer.test.ts` to see how you would use it (see
We also have a model where you can create helpers to use within tests. See We also have a model where you can create helpers to use within tests. See
[models/CodeServer.ts](../test/e2e/models/CodeServer.ts) for an example. [models/CodeServer.ts](../test/e2e/models/CodeServer.ts) for an example.
Generally speaking, e2e means testing code-server while running in the browser
and interacting with it in a way that's similar to how a user would interact
with it. When running these tests with `yarn test:e2e`, you must have
code-server running locally. In CI, this is taken care of for you.
## Structure ## Structure
The `code-server` script serves as an HTTP API for login and starting a remote code-server essentially serves as an HTTP API for logging in and starting a
Code process. remote Code process.
The CLI code is in [src/node](../src/node) and the HTTP routes are implemented The CLI code is in [src/node](../src/node) and the HTTP routes are implemented
in [src/node/routes](../src/node/routes). in [src/node/routes](../src/node/routes).

View file

@ -14,6 +14,7 @@
- [How do I install an extension manually?](#how-do-i-install-an-extension-manually) - [How do I install an extension manually?](#how-do-i-install-an-extension-manually)
- [How do I use my own extensions marketplace?](#how-do-i-use-my-own-extensions-marketplace) - [How do I use my own extensions marketplace?](#how-do-i-use-my-own-extensions-marketplace)
- [Where are extensions stored?](#where-are-extensions-stored) - [Where are extensions stored?](#where-are-extensions-stored)
- [Where is VS Code configuration stored?](#where-is-vs-code-configuration-stored)
- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration) - [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration)
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open) - [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
- [How do I access my Documents/Downloads/Desktop folders in code-server on macOS?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-macos) - [How do I access my Documents/Downloads/Desktop folders in code-server on macOS?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-macos)
@ -26,13 +27,18 @@
- [Is multi-tenancy possible?](#is-multi-tenancy-possible) - [Is multi-tenancy possible?](#is-multi-tenancy-possible)
- [Can I use Docker in a code-server container?](#can-i-use-docker-in-a-code-server-container) - [Can I use Docker in a code-server container?](#can-i-use-docker-in-a-code-server-container)
- [How do I disable telemetry?](#how-do-i-disable-telemetry) - [How do I disable telemetry?](#how-do-i-disable-telemetry)
- [What's the difference between code-server and Coder?](#whats-the-difference-between-code-server-and-coder)
- [What's the difference between code-server and Theia?](#whats-the-difference-between-code-server-and-theia) - [What's the difference between code-server and Theia?](#whats-the-difference-between-code-server-and-theia)
- [What's the difference between code-server and OpenVSCode-Server?](#whats-the-difference-between-code-server-and-openvscode-server) - [What's the difference between code-server and OpenVSCode-Server?](#whats-the-difference-between-code-server-and-openvscode-server)
- [What's the difference between code-server and GitHub Codespaces?](#whats-the-difference-between-code-server-and-github-codespaces) - [What's the difference between code-server and GitHub Codespaces?](#whats-the-difference-between-code-server-and-github-codespaces)
- [What's the difference between code-server and VS Code web?](#whats-the-difference-between-code-server-and-vs-code-web)
- [Does code-server have any security login validation?](#does-code-server-have-any-security-login-validation) - [Does code-server have any security login validation?](#does-code-server-have-any-security-login-validation)
- [Are there community projects involving code-server?](#are-there-community-projects-involving-code-server) - [Are there community projects involving code-server?](#are-there-community-projects-involving-code-server)
- [How do I change the port?](#how-do-i-change-the-port) - [How do I change the port?](#how-do-i-change-the-port)
- [How do I hide the coder/coder promotion in Help: Getting Started?](#how-do-i-hide-the-codercoder-promotion-in-help-getting-started) - [How do I hide the coder/coder promotion in Help: Getting Started?](#how-do-i-hide-the-codercoder-promotion-in-help-getting-started)
- [How do I disable the proxy?](#how-do-i-disable-the-proxy)
- [How do I disable file download?](#how-do-i-disable-file-download)
- [Why do web views not work?](#why-do-web-views-not-work)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -86,6 +92,12 @@ app (PWA):
1. Start the editor 1. Start the editor
2. Click the **plus** icon in the URL toolbar to install the PWA 2. Click the **plus** icon in the URL toolbar to install the PWA
If you use Firefox, you can use the appropriate extension to install PWA.
1. Go to the installation [website](https://addons.mozilla.org/en-US/firefox/addon/pwas-for-firefox/) of the add-on
2. Add the add-on to Firefox
3. Follow the os-specific instructions on how to install the runtime counterpart
For other browsers, you'll have to remap keybindings for shortcuts to work. For other browsers, you'll have to remap keybindings for shortcuts to work.
## Why can't code-server use Microsoft's extension marketplace? ## Why can't code-server use Microsoft's extension marketplace?
@ -167,10 +179,10 @@ If you own a marketplace that implements the VS Code Extension Gallery API, you
can point code-server to it by setting `$EXTENSIONS_GALLERY`. can point code-server to it by setting `$EXTENSIONS_GALLERY`.
This corresponds directly with the `extensionsGallery` entry in in VS Code's `product.json`. This corresponds directly with the `extensionsGallery` entry in in VS Code's `product.json`.
For example, to use the legacy Coder extensions marketplace: For example:
```bash ```bash
export EXTENSIONS_GALLERY='{"serviceUrl": "https://extensions.coder.com/api"}' export EXTENSIONS_GALLERY='{"serviceUrl": "https://my-extensions/api"}'
``` ```
Though you can technically use Microsoft's marketplace in this manner, we Though you can technically use Microsoft's marketplace in this manner, we
@ -183,10 +195,20 @@ docs](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions--marke
## Where are extensions stored? ## Where are extensions stored?
Extensions are store, by default, to `~/.local/share/code-server/extensions`. Extensions are stored in `~/.local/share/code-server/extensions` by default.
If you set the `XDG_DATA_HOME` environment variable, the data directory will be On Linux and macOS if you set the `XDG_DATA_HOME` environment variable, the
`$XDG_DATA_HOME/code-server/extensions`. In general, we try to follow the XDG directory spec. extensions directory will be `$XDG_DATA_HOME/code-server/extensions`. In
general, we try to follow the XDG directory spec.
## Where is VS Code configuration stored?
VS Code configuration such as settings and keybindings are stored in
`~/.local/share/code-server` by default.
On Linux and macOS if you set the `XDG_DATA_HOME` environment variable, the data
directory will be `$XDG_DATA_HOME/code-server`. In general, we try to follow the
XDG directory spec.
## How can I reuse my VS Code configuration? ## How can I reuse my VS Code configuration?
@ -301,12 +323,8 @@ As long as there is an active browser connection, code-server touches
`~/.local/share/code-server/heartbeat` once a minute. `~/.local/share/code-server/heartbeat` once a minute.
If you want to shutdown code-server if there hasn't been an active connection If you want to shutdown code-server if there hasn't been an active connection
after a predetermined amount of time, you can do so by checking continuously for after a predetermined amount of time, you can use the --idle-timeout-seconds flag
the last modified time on the heartbeat file. If it is older than X minutes (or or set an `CODE_SERVER_IDLE_TIMEOUT_SECONDS` environment variable.
whatever amount of time you'd like), you can kill code-server.
Eventually, [#1636](https://github.com/coder/code-server/issues/1636) will make
this process better.
## How do I change the password? ## How do I change the password?
@ -336,6 +354,12 @@ hashed-password: "$argon2i$v=19$m=4096,t=3,p=1$wST5QhBgk2lu1ih4DMuxvg$LS1alrVdIW
The `hashed-password` field takes precedence over `password`. The `hashed-password` field takes precedence over `password`.
If you're using Docker Compose file, in order to make this work, you need to change all the single $ to $$. For example:
```yaml
- HASHED_PASSWORD=$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4
```
## Is multi-tenancy possible? ## Is multi-tenancy possible?
If you want to run multiple code-servers on shared infrastructure, we recommend If you want to run multiple code-servers on shared infrastructure, we recommend
@ -356,12 +380,24 @@ mount into `/home/coder/myproject` from inside the `code-server` container. You
need to make sure the Docker daemon's `/home/coder/myproject` is the same as the need to make sure the Docker daemon's `/home/coder/myproject` is the same as the
one mounted inside the `code-server` container, and the mount will work. one mounted inside the `code-server` container, and the mount will work.
If you want Docker enabled when deploying on Kubernetes, look at the `values.yaml`
file for the 3 fields: `extraVars`, `lifecycle.postStart`, and `extraContainers`.
## How do I disable telemetry? ## How do I disable telemetry?
Use the `--disable-telemetry` flag to disable telemetry. Use the `--disable-telemetry` flag to disable telemetry.
> We use the data collected only to improve code-server. > We use the data collected only to improve code-server.
## What's the difference between code-server and Coder?
code-server and Coder are both applications that can be installed on any
machine. The main difference is who they serve. Out of the box, code-server is
simply VS Code in the browser while Coder is a tool for provisioning remote
development environments via Terraform.
code-server was built for individuals while Coder was built for teams. In Coder, you create Workspaces which can have applications like code-server. If you're looking for a team solution, you should reach for [Coder](https://github.com/coder/coder).
## What's the difference between code-server and Theia? ## What's the difference between code-server and Theia?
At a high level, code-server is a patched fork of VS Code that runs in the At a high level, code-server is a patched fork of VS Code that runs in the
@ -379,19 +415,13 @@ Theia doesn't allow you to reuse your existing VS Code config.
## What's the difference between code-server and OpenVSCode-Server? ## What's the difference between code-server and OpenVSCode-Server?
code-server and OpenVSCode-Server both allow you to access VS Code via a code-server and OpenVSCode-Server both allow you to access VS Code via a
browser. The two projects also use their own [forks of VS Code](https://github.com/coder/vscode) to browser. OpenVSCode-Server is a direct fork of VS Code with changes comitted
leverage modern VS Code APIs and stay up to date with the upsteam version. directly while code-server pulls VS Code in via a submodule and makes changes
via patch files.
However, OpenVSCode-Server is scoped at only making VS Code available in the web browser. However, OpenVSCode-Server is scoped at only making VS Code available as-is in
code-server includes some other features: the web browser. code-server contains additional changes to make the self-hosted
experience better (see the next section for details).
- password auth
- proxy web ports
- certificate support
- plugin API
- settings sync (coming soon)
For more details, see [this discussion post](https://github.com/coder/code-server/discussions/4267#discussioncomment-1411583).
## What's the difference between code-server and GitHub Codespaces? ## What's the difference between code-server and GitHub Codespaces?
@ -399,8 +429,32 @@ Both code-server and GitHub Codespaces allow you to access VS Code via a
browser. GitHub Codespaces, however, is a closed-source, paid service offered by browser. GitHub Codespaces, however, is a closed-source, paid service offered by
GitHub and Microsoft. GitHub and Microsoft.
On the other hand, code-server is self-hosted, free, open-source, and On the other hand, code-server is self-hosted, free, open-source, and can be run
can be run on any machine with few limitations. on any machine with few limitations.
Specific changes include:
- Password authentication
- The ability to host at sub-paths
- Self-contained web views that do not call out to Microsoft's servers
- The ability to use your own marketplace and collect your own telemetry
- Built-in proxy for accessing ports on the remote machine integrated into
VS Code's ports panel
- Settings are stored on disk like desktop VS Code, instead of in browser
storage (note that state is still stored in browser storage).
- Wrapper process that spawns VS Code on-demand and has a separate CLI
- Notification when updates are available
- [Some other things](https://github.com/coder/code-server/tree/main/patches)
Some of these changes appear very unlikely to ever be adopted by Microsoft.
Some may make their way upstream, further closing the gap, but at the moment it
looks like there will always be some subtle differences.
## What's the difference between code-server and VS Code web?
VS Code web (which can be ran using `code serve-web`) has the same differences
as the Codespaces section above. VS Code web can be a better choice if you need
access to the official Microsoft marketplace.
## Does code-server have any security login validation? ## Does code-server have any security login validation?
@ -425,3 +479,39 @@ There are two ways to change the port on which code-server runs:
You can pass the flag `--disable-getting-started-override` to `code-server` or You can pass the flag `--disable-getting-started-override` to `code-server` or
you can set the environment variable `CS_DISABLE_GETTING_STARTED_OVERRIDE=1` or you can set the environment variable `CS_DISABLE_GETTING_STARTED_OVERRIDE=1` or
`CS_DISABLE_GETTING_STARTED_OVERRIDE=true`. `CS_DISABLE_GETTING_STARTED_OVERRIDE=true`.
## How do I disable the proxy?
You can pass the flag `--disable-proxy` to `code-server` or
you can set the environment variable `CS_DISABLE_PROXY=1` or
`CS_DISABLE_PROXY=true`.
Note, this option currently only disables the proxy routes to forwarded ports, including
the domain and path proxy routes over HTTP and WebSocket; however, it does not
disable the automatic port forwarding in the VS Code workbench itself. In other words,
user will still see the Ports tab and notifications, but will not be able to actually
use access the ports. It is recommended to set `remote.autoForwardPorts` to `false`
when using the option.
## How do I disable file download?
You can pass the flag `--disable-file-downloads` to `code-server`
## Why do web views not work?
Web views rely on service workers, and service workers are only available in a
secure context, so most likely the answer is that you are using an insecure
context (for example an IP address).
If this happens, in the browser log you will see something like:
> Error loading webview: Error: Could not register service workers: SecurityError: Failed to register a ServiceWorker for scope with script: An SSL certificate error occurred when fetching the script..
To fix this, you must either:
- Access over localhost/127.0.0.1 which is always considered secure.
- Use a domain with a real certificate (for example with Let's Encrypt).
- Use a trusted self-signed certificate with [mkcert](https://mkcert.dev) (or
create and trust a certificate manually).
- Disable security if your browser allows it. For example, in Chromium see
`chrome://flags/#unsafely-treat-insecure-origin-as-secure`

View file

@ -3,24 +3,13 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Maintaining # Maintaining
- [Team](#team) - [Releasing](#releasing)
- [Onboarding](#onboarding)
- [Offboarding](#offboarding)
- [Workflow](#workflow)
- [Milestones](#milestones)
- [Triage](#triage)
- [Versioning](#versioning)
- [Pull requests](#pull-requests)
- [Merge strategies](#merge-strategies)
- [Changelog](#changelog)
- [Releases](#releases)
- [Publishing a release](#publishing-a-release)
- [Release Candidates](#release-candidates) - [Release Candidates](#release-candidates)
- [AUR](#aur) - [AUR](#aur)
- [Docker](#docker) - [Docker](#docker)
- [Homebrew](#homebrew) - [Homebrew](#homebrew)
- [nixpkgs](#nixpkgs)
- [npm](#npm) - [npm](#npm)
- [Syncing with upstream Code](#syncing-with-upstream-code)
- [Testing](#testing) - [Testing](#testing)
- [Documentation](#documentation) - [Documentation](#documentation)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
@ -28,138 +17,41 @@
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
This document is meant to serve current and future maintainers of code-server, We keep code-server up to date with VS Code releases (there are usually two or
as well as share our workflow for maintaining the project. three a month) but we are not generally actively developing code-server aside
from fixing regressions.
## Team Most of the work is keeping on top of issues and discussions.
Current maintainers: ## Releasing
- @code-asher 1. Check that the changelog lists all the important changes.
- @jsjoeio 2. Make sure the changelog entry lists the current version of VS Code.
3. Update the changelog with the release date.
Occasionally, other Coder employees may step in time to time to assist with code-server. 4. Go to GitHub Actions > Draft release > Run workflow on the commit you want to
release. Make sure CI has finished the build workflow on that commit or this
### Onboarding will fail. For the version we match VS Code's minor and patch version. The
patch number may become temporarily out of sync if we need to put out a
To onboard a new maintainer to the project, please make sure to do the following: patch, but if we make our own minor change then we will not release it until
the next minor VS Code release.
- [ ] Add to [coder/code-server](https://github.com/orgs/coder/teams/code-server) 5. CI will automatically grab the build artifact on that commit (which is why CI
- [ ] Add as Admin under [Repository Settings > Access](https://github.com/coder/code-server/settings/access) has to have completed), inject the provided version into the `package.json`,
- [ ] Add to [npm Coder org](https://www.npmjs.com/org/coder) put together platform-specific packages, and upload those packages to a draft
- [ ] Add as [AUR maintainer](https://aur.archlinux.org/packages/code-server/) (talk to Colin) release.
- [ ] Introduce to community via Discussion (see [example](https://github.com/coder/code-server/discussions/3955)) 6. Update the resulting draft release with the changelog contents.
7. Publish the draft release after validating it.
### Offboarding 8. Bump the Helm chart version once the Docker images have published.
Very similar to Onboarding but Remove maintainer from all teams and revoke access. Please also do the following:
- [ ] Write farewell post via Discussion (see [example](https://github.com/coder/code-server/discussions/3933))
## Workflow
The workflow used by code-server maintainers aims to be easy to understood by
the community and easy enough for new maintainers to jump in and start
contributing on day one.
### Milestones
We operate mainly using
[milestones](https://github.com/coder/code-server/milestones). This was heavily
inspired by our friends over at [vscode](https://github.com/microsoft/vscode).
Here are the milestones we use and how we use them:
- "Backlog" -> Work not yet planned for a specific release.
- "On Deck" -> Work under consideration for upcoming milestones.
- "Backlog Candidates" -> Work that is not yet accepted for the backlog. We wait
for the community to weigh in.
- "<Month>" -> Work to be done for said month.
With this flow, any un-assigned issues are essentially in triage state. Once
triaged, issues are either "Backlog" or "Backlog Candidates". They will
eventually move to "On Deck" (or be closed). Lastly, they will end up on a
version milestone where they will be worked on.
### Triage
We use the following process for triaging GitHub issues:
1. Create an issue
1. Add appropriate labels to the issue (including "needs-investigation" if we
should look into it further)
1. Add the issue to a milestone
1. If it should be fixed soon, add to version milestone or "On Deck"
2. If not urgent, add to "Backlog"
3. Otherwise, add to "Backlog Candidate" for future consideration
## Versioning
`<major.minor.patch>`
The code-server project follows traditional [semantic
versioning](https://semver.org/), with the objective of minimizing major changes
that break backward compatibility. We increment the patch level for all
releases, except when the upstream Visual Studio Code project increments its
minor version or we change the plugin API in a backward-compatible manner. In
those cases, we increment the minor version rather than the patch level.
## Pull requests
Ideally, every PR should fix an issue. If it doesn't, make sure it's associated
with a version milestone.
If a PR does fix an issue, don't add it to the version milestone. Otherwise, the
version milestone will have duplicate information: the issue and the PR fixing
the issue.
### Merge strategies
For most things, we recommend the **squash and merge** strategy. There
may be times where **creating a merge commit** makes sense as well. Use your
best judgment. If you're unsure, you can always discuss in the PR with the team.
### Changelog
To save time when creating a new release for code-server, we keep a running
changelog at `CHANGELOG.md`.
If either the author or reviewer of a PR believes the change should be mentioned
in the changelog, then it should be added.
If there is not a **Next Version** when you modify `CHANGELOG.md`, please add it
using the template you see near the top of the changelog.
When writing your changelog item, ask yourself:
1. How do these changes affect code-server users?
2. What actions do they need to take (if any)?
If you need inspiration, we suggest looking at the [Emacs
changelog](https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS).
## Releases
### Publishing a release
1. Create a new branch called `release/v0.0.0` (replace 0s with actual version aka v4.5.0)
1. Run `yarn release:prep`
1. Bump chart version in `Chart.yaml`.
1. Summarize the major changes in the `CHANGELOG.md`
1. Download CI artifacts and make sure code-server works locally.
1. Merge PR and wait for CI build on `main` to finish.
1. Go to GitHub Actions > Draft release > Run workflow off `main`. CI will automatically upload the artifacts to the release.
1. Add the release notes from the `CHANGELOG.md` and publish release. CI will automatically grab the
artifacts, publish the NPM package from `npm-package`, and publish the Docker
Hub image from `release-images`.
#### Release Candidates #### Release Candidates
We prefer to do release candidates so the community can test things before a full-blown release. To do this follow the same steps as above but: We prefer to do release candidates so the community can test things before a
full-blown release. To do this follow the same steps as above but:
1. Only bump version in `package.json` 1. Add a `-rc.<number>` suffix to the version.
1. use `0.0.0-rc.0` 2. When you publish the release select "pre-release". CI will not automatically
1. When you publish the release, select "pre-release" publish pre-releases.
3. Do not update the chart version or merge in the changelog until the final
release.
#### AUR #### AUR
@ -167,7 +59,7 @@ We publish to AUR as a package [here](https://aur.archlinux.org/packages/code-se
#### Docker #### Docker
We publish code-server as a Docker image [here](https://registry.hub.docker.com/r/codercom/code-server), tagging it both with the version and latest. We publish code-server as a Docker image [here](https://hub.docker.com/r/codercom/code-server), tagging it both with the version and latest.
This is currently automated with the release process. This is currently automated with the release process.
@ -182,37 +74,44 @@ This is currently automated with the release process (but may fail occasionally)
brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit
``` ```
#### nixpkgs
We publish code-server in nixpkgs but it must be updated manually.
#### npm #### npm
We publish code-server as a npm package [here](https://www.npmjs.com/package/code-server/v/latest). We publish code-server as a npm package [here](https://www.npmjs.com/package/code-server/v/latest).
This is currently automated with the release process. This is currently automated with the release process.
## Syncing with upstream Code
Refer to the [contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#version-updates-to-code) for information on how to update Code within code-server.
## Testing ## Testing
Our testing structure is laid out under our [Contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#test). Our testing structure is laid out under our [Contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#test).
We hope to eventually hit 100% test coverage with our unit tests, and maybe one day our scripts (coverage not tracked currently).
If you're ever looking to add more tests, here are a few ways to get started: If you're ever looking to add more tests, here are a few ways to get started:
- run `yarn test:unit` and look at the coverage chart. You'll see all the uncovered lines. This is a good place to start. - run `npm run test:unit` and look at the coverage chart. You'll see all the
- look at `test/scripts` to see which scripts are tested. We can always use more tests there. uncovered lines. This is a good place to start.
- look at `test/scripts` to see which scripts are tested. We can always use more
tests there.
- look at `test/e2e`. We can always use more end-to-end tests. - look at `test/e2e`. We can always use more end-to-end tests.
Otherwise, talk to a current maintainer and ask which part of the codebase is lacking most when it comes to tests. Otherwise, talk to a current maintainer and ask which part of the codebase is
lacking most when it comes to tests.
## Documentation ## Documentation
### Troubleshooting ### Troubleshooting
Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it. Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in
realtime, which means you need to have the logs open in one tab and reproduce
your error in another tab. Since our logs are private to Coder the organization,
you can only follow these steps if you're a Coder employee. Ask a maintainer for
help if you need it.
Taking a real scenario, let's say you wanted to troubleshoot [this docs change](https://github.com/coder/code-server/pull/4042). Here is how you would do it: Taking a real scenario, let's say you wanted to troubleshoot [this docs
change](https://github.com/coder/code-server/pull/4042). Here is how you would
do it:
1. Go to https://vercel.com/codercom/codercom 1. Go to https://vercel.com/codercom/codercom
2. Click "View Function Logs" 2. Click "View Function Logs"

View file

@ -1,11 +1,12 @@
# code-server # code-server
[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See latest](https://img.shields.io/static/v1?label=Docs&message=see%20latest&color=blue)](https://coder.com/docs/code-server/latest) [!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![Discord](https://img.shields.io/discord/747933592273027093)](https://discord.com/invite/coder) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See latest](https://img.shields.io/static/v1?label=Docs&message=see%20latest&color=blue)](https://coder.com/docs/code-server/latest)
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and
access it in the browser. access it in the browser.
![Screenshot](./assets/screenshot.png) ![Screenshot](./assets/screenshot-1.png)
![Screenshot](./assets/screenshot-2.png)
## Highlights ## Highlights
@ -16,14 +17,14 @@ access it in the browser.
## Requirements ## Requirements
See [requirements](requirements.md) for minimum specs, as well as instructions See [requirements](https://coder.com/docs/code-server/latest/requirements) for minimum specs, as well as instructions
on how to set up a Google VM on which you can install code-server. on how to set up a Google VM on which you can install code-server.
**TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 vCPUs **TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 vCPUs
## Getting started ## Getting started
There are four ways to get started: There are five ways to get started:
1. Using the [install 1. Using the [install
script](https://github.com/coder/code-server/blob/main/install.sh), which script](https://github.com/coder/code-server/blob/main/install.sh), which
@ -34,6 +35,9 @@ There are four ways to get started:
3. Deploy code-server to your team with [coder/coder](https://cdr.co/coder-github) 3. Deploy code-server to your team with [coder/coder](https://cdr.co/coder-github)
4. Using our one-click buttons and guides to [deploy code-server to a cloud 4. Using our one-click buttons and guides to [deploy code-server to a cloud
provider](https://github.com/coder/deploy-code-server) ⚡ provider](https://github.com/coder/deploy-code-server) ⚡
5. Using the [code-server feature for
devcontainers](https://github.com/coder/devcontainer-features/blob/main/src/code-server/README.md),
if you already use devcontainers in your project.
If you use the install script, you can preview what occurs during the install If you use the install script, you can preview what occurs during the install
process: process:
@ -72,7 +76,7 @@ details.
Interested in [working at Coder](https://coder.com/careers)? Check out [our open Interested in [working at Coder](https://coder.com/careers)? Check out [our open
positions](https://coder.com/careers#openings)! positions](https://coder.com/careers#openings)!
## For Organizations ## For Teams
Want remote development for your organization or enterprise? Visit [our We develop [coder/coder](https://cdr.co/coder-github) to help teams to
website](https://coder.com) to learn more about Coder. adopt remote development.

View file

@ -17,10 +17,8 @@ We use the following tools to help us stay on top of vulnerability mitigation.
- Comprehensive vulnerability scanner that runs on PRs into the default - Comprehensive vulnerability scanner that runs on PRs into the default
branch and scans both our container image and repository code (see branch and scans both our container image and repository code (see
`trivy-scan-repo` and `trivy-scan-image` jobs in `build.yaml`) `trivy-scan-repo` and `trivy-scan-image` jobs in `build.yaml`)
- [`audit-ci`](https://github.com/IBM/audit-ci) - `npm audit`
- Audits npm and Yarn dependencies in CI (see `Audit for vulnerabilities` step - Audits NPM dependencies.
in `build.yaml`) on PRs into the default branch and fails CI if moderate or
higher vulnerabilities (see the `audit.sh` script) are present.
## Supported Versions ## Supported Versions

View file

@ -11,13 +11,21 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
``` ```
6. Exit the terminal using `exit` and then reopen the terminal 6. Exit the terminal using `exit` and then reopen the terminal
7. Install and use Node.js 16: 7. Install and use Node.js 22:
```shell ```shell
nvm install 16 nvm install 22
nvm use 16 nvm use 22
``` ```
8. Install code-server globally on device with: `npm install --global code-server --unsafe-perm` 8. Install code-server globally on device with: `npm install --global code-server`
9. Run code-server with `code-server` 9. Run code-server with `code-server`
10. Access on localhost:8080 in your browser 10. Access on localhost:8080 in your browser
# Running code-server using Nix-on-Droid
1. Install Nix-on-Droid from [F-Droid](https://f-droid.org/packages/com.termux.nix/)
2. Start app
3. Spawn a shell with code-server by running `nix-shell -p code-server`
4. Run code-server with `code-server`
5. Access on localhost:8080 in your browser

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 KiB

48
docs/coder.md Normal file
View file

@ -0,0 +1,48 @@
# Coder
To install and run code-server in a Coder workspace, we suggest using the `install.sh`
script in your template like so:
```terraform
resource "coder_agent" "dev" {
arch = "amd64"
os = "linux"
startup_script = <<EOF
#!/bin/sh
set -x
# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
code-server --auth none --port 13337 &
EOF
}
resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "code-server"
url = "http://localhost:13337/"
icon = "/icon/code.svg"
subdomain = false
share = "owner"
healthcheck {
url = "http://localhost:13337/healthz"
interval = 3
threshold = 10
}
}
```
Or use our official [`code-server`](https://registry.coder.com/modules/code-server) module from the Coder [module registry](htpps://registry.coder.com/modules):
```terraform
module "code-server" {
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.5"
agent_id = coder_agent.example.id
extensions = ["dracula-theme.theme-dracula", "ms-azuretools.vscode-docker"]
}
```
If you run into issues, ask for help on the `coder/coder` [Discussions
here](https://github.com/coder/coder/discussions).

View file

@ -14,13 +14,17 @@
- [Accessing web services](#accessing-web-services) - [Accessing web services](#accessing-web-services)
- [Using a subdomain](#using-a-subdomain) - [Using a subdomain](#using-a-subdomain)
- [Using a subpath](#using-a-subpath) - [Using a subpath](#using-a-subpath)
- [Using your own proxy](#using-your-own-proxy)
- [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path) - [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path)
- [Proxying to create a React app](#proxying-to-create-a-react-app) - [Proxying to create a React app](#proxying-to-create-a-react-app)
- [Proxying to a Vue app](#proxying-to-a-vue-app) - [Proxying to a Vue app](#proxying-to-a-vue-app)
- [Proxying to an Angular app](#proxying-to-an-angular-app) - [Proxying to an Angular app](#proxying-to-an-angular-app)
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code) - [Proxying to a Svelte app](#proxying-to-a-svelte-app)
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel) - [Prefixing `/absproxy/<port>` with a path](#prefixing-absproxyport-with-a-path)
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel) - [Preflight requests](#preflight-requests)
- [Internationalization and customization](#internationalization-and-customization)
- [Available keys and placeholders](#available-keys-and-placeholders)
- [Legacy flag](#legacy-flag)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -119,27 +123,27 @@ access code-server on an iPad or do not want to use SSH port forwarding.
1. This option requires that the remote machine be exposed to the internet. Make sure that your instance allows HTTP/HTTPS traffic. 1. This option requires that the remote machine be exposed to the internet. Make sure that your instance allows HTTP/HTTPS traffic.
1. You'll need a domain name (if you don't have one, you can purchase one from 2. You'll need a domain name (if you don't have one, you can purchase one from
[Google Domains](https://domains.google.com) or the domain service of your [Google Domains](https://domains.google.com) or the domain service of your
choice)). Once you have a domain name, add an A record to your domain that contains your choice). Once you have a domain name, add an A record to your domain that contains your
instance's IP address. instance's IP address.
1. Install [Caddy](https://caddyserver.com/docs/download#debian-ubuntu-raspbian): 3. Install [Caddy](https://caddyserver.com/docs/download#debian-ubuntu-raspbian):
```console ```console
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update sudo apt update
sudo apt install caddy sudo apt install caddy
``` ```
1. Replace `/etc/caddy/Caddyfile` using `sudo` so that the file looks like this: 4. Replace `/etc/caddy/Caddyfile` using `sudo` so that the file looks like this:
```text ```text
mydomain.com mydomain.com {
reverse_proxy 127.0.0.1:8080
reverse_proxy 127.0.0.1:8080 }
``` ```
If you want to serve code-server from a sub-path, you can do so as follows: If you want to serve code-server from a sub-path, you can do so as follows:
@ -153,7 +157,7 @@ sudo apt install caddy
Remember to replace `mydomain.com` with your domain name! Remember to replace `mydomain.com` with your domain name!
1. Reload Caddy: 5. Reload Caddy:
```console ```console
sudo systemctl reload caddy sudo systemctl reload caddy
@ -164,21 +168,22 @@ At this point, you should be able to access code-server via
### Using Let's Encrypt with NGINX ### Using Let's Encrypt with NGINX
1. This option requires that the remote machine be exposed to the internet. Make sure that your instance allows HTTP/HTTPS traffic. 1. This option requires that the remote machine be exposed to the internet. Make
sure that your instance allows HTTP/HTTPS traffic.
1. You'll need a domain name (if you don't have one, you can purchase one from 2. You'll need a domain name (if you don't have one, you can purchase one from
[Google Domains](https://domains.google.com) or the domain service of your [Google Domains](https://domains.google.com) or the domain service of your
choice)). Once you have a domain name, add an A record to your domain that contains your choice). Once you have a domain name, add an A record to your domain that contains your
instance's IP address. instance's IP address.
1. Install NGINX: 3. Install NGINX:
```bash ```bash
sudo apt update sudo apt update
sudo apt install -y nginx certbot python3-certbot-nginx sudo apt install -y nginx certbot python3-certbot-nginx
``` ```
1. Update `/etc/nginx/sites-available/code-server` using sudo with the following 4. Update `/etc/nginx/sites-available/code-server` using sudo with the following
configuration: configuration:
```text ```text
@ -189,7 +194,7 @@ At this point, you should be able to access code-server via
location / { location / {
proxy_pass http://localhost:8080/; proxy_pass http://localhost:8080/;
proxy_set_header Host $host; proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade; proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip; proxy_set_header Accept-Encoding gzip;
@ -199,13 +204,11 @@ At this point, you should be able to access code-server via
Be sure to replace `mydomain.com` with your domain name! Be sure to replace `mydomain.com` with your domain name!
1. Enable the config: 5. Enable the config:
```console ```console
sudo ln -s ../sites-available/code-server /etc/nginx/sites-enabled/code-server sudo ln -s ../sites-available/code-server /etc/nginx/sites-enabled/code-server
sudo certbot --non-interactive --redirect --agree-tos --nginx -d mydomain.com -m me@example.com sudo certbot --non-interactive --redirect --agree-tos --nginx -d mydomain.com -m me@example.com
``` ```
Be sure to replace `me@example.com` with your actual email. Be sure to replace `me@example.com` with your actual email.
At this point, you should be able to access code-server via At this point, you should be able to access code-server via
@ -271,9 +274,9 @@ should see OSSStatus: 9836 in the browser console.
If you want to use external authentication mechanism (e.g., Sign in with If you want to use external authentication mechanism (e.g., Sign in with
Google), you can do this with a reverse proxy such as: Google), you can do this with a reverse proxy such as:
- [Pomerium](https://www.pomerium.io/guides/code-server.html) - [Pomerium](https://www.pomerium.com/docs/guides/code-server.html)
- [oauth2_proxy](https://github.com/pusher/oauth2_proxy) - [oauth2-proxy](https://oauth2-proxy.github.io/oauth2-proxy/)
- [Cloudflare Access](https://teams.cloudflare.com/access) - [Cloudflare Access](https://www.cloudflare.com/zero-trust/products/access/)
## HTTPS and self-signed certificates ## HTTPS and self-signed certificates
@ -292,7 +295,9 @@ redirect all HTTP requests to HTTPS.
> You can use [Let's Encrypt](https://letsencrypt.org/) to get a TLS certificate > You can use [Let's Encrypt](https://letsencrypt.org/) to get a TLS certificate
> for free. > for free.
Note: if you set `proxy_set_header Host $host;` in your reverse proxy config, it will change the address displayed in the green section of code-server in the bottom left to show the correct address. Note: if you set `proxy_set_header Host $host;` in your reverse proxy config, it
will change the address displayed in the green section of code-server in the
bottom left to show the correct address.
## Accessing web services ## Accessing web services
@ -316,12 +321,32 @@ To set your domain, start code-server with the `--proxy-domain` flag:
code-server --proxy-domain <domain> code-server --proxy-domain <domain>
``` ```
Now you can browse to `<port>.<domain>`. Note that this uses the host header, so For instance, if you have code-server exposed on `domain.tld` and a Python
ensure your reverse proxy (if you're using one) forwards that information. server running on port 8080 of the same machine code-server is running on, you
could run code-server with `--proxy-domain domain.tld` and access the Python
server via `8080.domain.tld`.
Note that this uses the host header, so ensure your reverse proxy (if you're
using one) forwards that information.
### Using a subpath ### Using a subpath
Simply browse to `/proxy/<port>/`. Simply browse to `/proxy/<port>/`. For instance, if you have code-server
exposed on `domain.tld` and a Python server running on port 8080 of the same
machine code-server is running on, you could access the Python server via
`domain.tld/proxy/8000`.
### Using your own proxy
You can make extensions and the ports panel use your own proxy by setting
`VSCODE_PROXY_URI`. For example if you set
`VSCODE_PROXY_URI=https://{{port}}.kyle.dev` when an application is detected
running on port 3000 of the same machine code-server is running on the ports
panel will create a link to https://3000.kyle.dev instead of pointing to the
built-in subpath-based proxy.
Note: relative paths are also supported i.e.
`VSCODE_PROXY_URI=./proxy/{{port}}`
### Stripping `/proxy/<port>` from the request path ### Stripping `/proxy/<port>` from the request path
@ -358,14 +383,16 @@ PUBLIC_URL=/absproxy/3000 \
BROWSER=none yarn start BROWSER=none yarn start
``` ```
You should then be able to visit `https://my-code-server-address.io/absproxy/3000` to see your app exposed through You should then be able to visit
code-server! `https://my-code-server-address.io/absproxy/3000` to see your app exposed
through code-server.
> We highly recommend using the subdomain approach instead to avoid this class of issue. > We highly recommend using the subdomain approach instead to avoid this class of issue.
### Proxying to a Vue app ### Proxying to a Vue app
Similar to the situation with React apps, you have to make a few modifications to proxy a Vue app. Similar to the situation with React apps, you have to make a few modifications
to proxy a Vue app.
1. add `vue.config.js` 1. add `vue.config.js`
2. update the values to match this (you can use any free port): 2. update the values to match this (you can use any free port):
@ -386,99 +413,100 @@ Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#
### Proxying to an Angular app ### Proxying to an Angular app
In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app: In order to use code-server's built-in proxy with Angular, you need to make the
following changes in your app:
1. use `<base href="./.">` in `src/index.html` 1. use `<base href="./.">` in `src/index.html`
2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json` 2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983). For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
## SSH into code-server on VS Code ### Proxying to a Svelte app
[![SSH](https://img.shields.io/badge/SSH-363636?style=for-the-badge&logo=GNU+Bash&logoColor=ffffff)](https://ohmyz.sh/) [![Terminal](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff)](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [![Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-007ACC?style=for-the-badge&logo=Visual+Studio+Code&logoColor=ffffff)](vscode:extension/ms-vscode-remote.remote-ssh) In order to use code-server's built-in proxy with Svelte, you need to make the
following changes in your app:
Follow these steps where code-server is running: 1. Add `svelte.config.js` if you don't already have one
2. Update the values to match this (you can use any free port):
1. Install `openssh-server`, `wget`, and `unzip`. ```js
const config = {
```bash kit: {
# example for Debian and Ubuntu operating systems paths: {
sudo apt update base: "/absproxy/5173",
sudo apt install wget unzip openssh-server },
},
}
``` ```
2. Start the SSH server and set the password for your user, if you haven't already. If you use [deploy-code-server](https://github.com/coder/deploy-code-server), 3. Access app at `<code-server-root>/absproxy/5173/` e.g. `http://localhost:8080/absproxy/5173/
```bash For additional context, see [this Github Issue](https://github.com/sveltejs/kit/issues/2958)
sudo service ssh start
sudo passwd {user} # replace user with your code-server user ### Prefixing `/absproxy/<port>` with a path
This is a case where you need to serve an application via `absproxy` as
explained above while serving code-server itself from a path other than the root
in your domain.
For example: `http://my-code-server.com/user/123/workspace/my-app`. To achieve
this result:
1. Start code-server with the switch `--abs-proxy-base-path=/user/123/workspace`
2. Follow one of the instructions above for your framework.
### Preflight requests
By default, if you have auth enabled, code-server will authenticate all proxied
requests including preflight requests. This can cause issues because preflight
requests do not typically include credentials. To allow all preflight requests
through the proxy without authentication, use `--skip-auth-preflight`.
## Internationalization and customization
code-server allows you to provide a JSON file to configure certain strings. This
can be used for both internationalization and customization.
Create a JSON file with your custom strings:
```json
{
"WELCOME": "Welcome to {{app}}",
"LOGIN_TITLE": "{{app}} Access Portal",
"LOGIN_BELOW": "Please log in to continue",
"PASSWORD_PLACEHOLDER": "Enter Password"
}
``` ```
### Option 1: cloudflared tunnel Then reference the file:
[![Cloudflared](https://img.shields.io/badge/Cloudflared-E4863B?style=for-the-badge&logo=cloudflare&logoColor=ffffff)](https://github.com/cloudflare/cloudflared)
1. Install [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared) on your local computer and remote server
2. Then go to `~/.ssh/config` and add the following on your local computer:
```shell ```shell
Host *.trycloudflare.com code-server --i18n /path/to/custom-strings.json
HostName %h
User user
Port 22
ProxyCommand "cloudflared location" access ssh --hostname %h
``` ```
3. Run `cloudflared tunnel --url ssh://localhost:22` on the remote server Or this can be done in the config file:
4. Finally on VS Code or any IDE that supports SSH, run `ssh user@https://your-link.trycloudflare.com` or `ssh user@your-link.trycloudflare.com` ```yaml
i18n: /path/to/custom-strings.json
### Option 2: ngrok tunnel
[![Ngrok](https://img.shields.io/badge/Ngrok-1F1E37?style=for-the-badge&logo=ngrok&logoColor=ffffff)](https://ngrok.com/)
1. Make a new account for ngrok [here](https://dashboard.ngrok.com/login)
2. Now, get the ngrok binary with `wget` and unzip it with `unzip`:
```bash
wget "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip"
unzip "ngrok-stable-linux-amd64.zip"
``` ```
5. Then, go to [dashboard.ngrok.com](https://dashboard.ngrok.com) and go to the `Your Authtoken` section. You can combine this with the `--locale` flag to configure language support for
6. Copy the Authtoken shown there. both code-server and VS Code in cases where code-server has no support but VS
7. Now, go to the folder where you unzipped ngrok and store the Authtoken from the ngrok Dashboard. Code does. If you are using this for internationalization, please consider
sending us a pull request to contribute it to `src/node/i18n/locales`.
```bash ### Available keys and placeholders
./ngrok authtoken YOUR_AUTHTOKEN # replace YOUR_AUTHTOKEN with the ngrok authtoken.
```
8. Now, forward port 22, which is the SSH port with this command: Refer to [../src/node/i18n/locales/en.json](../src/node/i18n/locales/en.json)
for a full list of the available keys for translations. Note that the only
placeholders supported for each key are the ones used in the default string.
```bash The `--app-name` flag controls the `{{app}}` placeholder in templates. If you
./ngrok tcp 22 want to change the name, you can either:
```
Now, you get a screen in the terminal like this: 1. Set `--app-name` (potentially alongside `--i18n`)
2. Use `--i18n` and hardcode the name in your strings
```console ### Legacy flag
ngrok by @inconshreveable(Ctrl+C to quit)
Session Status online The `--welcome-text` flag is now deprecated. Use the `WELCOME` key instead.
Account {Your name} (Plan: Free)
Version 2.3.40
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding tcp://0.tcp.ngrok.io:19028 -> localhost:22
```
In this case, copy the forwarded link `0.tcp.ngrok.io` and remember the port number `19028`. Type this on your local Visual Studio Code:
```bash
ssh user@0.tcp.ngrok.io -p 19028
```
The port redirects you to the default SSH port 22, and you can then successfully connect to code-server by entering the password you set for the user.
Note: the port and the url provided by ngrok will change each time you run it so modify as needed.

View file

@ -59,6 +59,7 @@ following flags:
- `--prefix=/usr/local`: install a standalone release archive system-wide. - `--prefix=/usr/local`: install a standalone release archive system-wide.
- `--version=X.X.X`: install version `X.X.X` instead of latest version. - `--version=X.X.X`: install version `X.X.X` instead of latest version.
- `--help`: see usage docs. - `--help`: see usage docs.
- `--edge`: install the latest edge version (i.e. pre-release)
When done, the install script prints out instructions for running and starting When done, the install script prints out instructions for running and starting
code-server. code-server.
@ -81,13 +82,11 @@ _exact_ same commands presented in the rest of this document.
- For Arch Linux, code-server will install the AUR package. - For Arch Linux, code-server will install the AUR package.
- For any unrecognized Linux operating system, code-server will install the - For any unrecognized Linux operating system, code-server will install the
latest standalone release into `~/.local`. latest standalone release into `~/.local`.
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server. - Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
- For macOS, code-server will install the Homebrew package (if you don't have - For macOS, code-server will install the Homebrew package (if you don't have
Homebrew installed, code-server will install the latest standalone release Homebrew installed, code-server will install the latest standalone release
into `~/.local`). into `~/.local`).
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server. - Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
- For FreeBSD, code-server will install the [npm package](#npm) with `npm` - For FreeBSD, code-server will install the [npm package](#npm) with `npm`
@ -102,10 +101,9 @@ _exact_ same commands presented in the rest of this document.
We recommend installing with `npm` when: We recommend installing with `npm` when:
1. You aren't using a machine with `amd64` or `arm64`. 1. You aren't using a machine with `amd64` or `arm64`.
1. You are installing code-server on Windows 2. You are installing code-server on Windows.
1. You're on Linux with `glibc` < v2.17, `glibcxx` < v3.4.18 on `amd64`, `glibc` 3. You're on Linux with `glibc` < v2.28 or `glibcxx` < v3.4.21.
< v2.23, or `glibcxx` < v3.4.21 on `arm64`. 4. You're running Alpine Linux or are using a non-glibc libc. See
1. You're running Alpine Linux or are using a non-glibc libc. See
[#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198) [#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198)
for more information. for more information.
@ -122,8 +120,8 @@ node binary and node modules.
We create the standalone releases using the [npm package](#npm), and we We create the standalone releases using the [npm package](#npm), and we
then create the remaining releases using the standalone version. then create the remaining releases using the standalone version.
The only requirement to use the standalone release is `glibc` >= 2.17 and The only requirement to use the standalone release is `glibc` >= 2.28 and
`glibcxx` >= v3.4.18 on Linux (for macOS, there is no minimum system `glibcxx` >= v3.4.21 on Linux (for macOS, there is no minimum system
requirement). requirement).
To use a standalone release: To use a standalone release:
@ -279,6 +277,7 @@ brew services start code-server
# outside the container. # outside the container.
mkdir -p ~/.config mkdir -p ~/.config
docker run -it --name code-server -p 127.0.0.1:8080:8080 \ docker run -it --name code-server -p 127.0.0.1:8080:8080 \
-v "$HOME/.local:/home/coder/.local" \
-v "$HOME/.config:/home/coder/.config" \ -v "$HOME/.config:/home/coder/.config" \
-v "$PWD:/home/coder/project" \ -v "$PWD:/home/coder/project" \
-u "$(id -u):$(id -g)" \ -u "$(id -u):$(id -g)" \
@ -296,9 +295,9 @@ You can install code-server using the [Helm package manager](https://coder.com/d
## Windows ## Windows
We currently [do not publish Windows releases](https://github.com/coder/code-server/issues/1397). We recommend installing code-server onto Windows with [`npm`](#npm). We currently [do not publish Windows
releases](https://github.com/coder/code-server/issues/1397). We recommend
> Note: You will also need to [build coder/cloud-agent manually](https://github.com/coder/cloud-agent/issues/17) if you would like to use `code-server --link` on Windows. installing code-server onto Windows with [`npm`](#npm).
## Raspberry Pi ## Raspberry Pi

View file

@ -1,11 +0,0 @@
# code-server --link
> Note: This feature is no longer recommended due to instability. Stay tuned for a revised version.
Run code-server with the flag `--link` and you'll get TLS, authentication, and a dedicated URL
for accessing your IDE out of the box.
```console
$ code-server --link
Proxying code-server, you can access your IDE at https://example.coder.co
```

View file

@ -38,9 +38,9 @@
"path": "./guide.md", "path": "./guide.md",
"children": [ "children": [
{ {
"title": "--link", "title": "Coder",
"description": "How to run code-server --link", "description": "How to run code-server in Coder",
"path": "./link.md" "path": "./coder.md"
}, },
{ {
"title": "iPad", "title": "iPad",

View file

@ -30,7 +30,7 @@ includes installing instructions based on your operating system.
## Node.js version ## Node.js version
We use the same major version of Node.js shipped with Code's remote, which is We use the same major version of Node.js shipped with Code's remote, which is
currently `16.x`. VS Code also [lists Node.js currently `22.x`. VS Code also [lists Node.js
requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites). requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites).
Using other versions of Node.js [may lead to unexpected Using other versions of Node.js [may lead to unexpected
@ -62,8 +62,7 @@ Proceed to [installing](#installing)
## Alpine ## Alpine
```bash ```bash
apk add alpine-sdk bash libstdc++ libc6-compat apk add alpine-sdk bash libstdc++ libc6-compat python3 krb5-dev
npm config set python python3
``` ```
Proceed to [installing](#installing) Proceed to [installing](#installing)
@ -79,7 +78,7 @@ Proceed to [installing](#installing)
## FreeBSD ## FreeBSD
```sh ```sh
pkg install -y git python npm-node16 pkgconf pkg install -y git python npm-node22 pkgconf
pkg install -y libinotify pkg install -y libinotify
``` ```
@ -92,12 +91,12 @@ Installing code-server requires all of the [prerequisites for VS Code developmen
Next, install code-server with: Next, install code-server with:
```bash ```bash
npm install --global code-server --unsafe-perm npm install --global code-server
code-server code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
``` ```
A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git bash) as the default application for `.sh` files. If an additional dialog does not appear, run the install command again. A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git bash) as the default shell for npm run-scripts. If an additional dialog does not appear, run the install command again.
If the `code-server` command is not found, you'll need to [add a directory to your PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). To find the directory, use the following command: If the `code-server` command is not found, you'll need to [add a directory to your PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). To find the directory, use the following command:
@ -112,7 +111,7 @@ For help and additional troubleshooting, see [#1397](https://github.com/coder/co
After adding the dependencies for your OS, install the code-server package globally: After adding the dependencies for your OS, install the code-server package globally:
```bash ```bash
npm install --global code-server --unsafe-perm npm install --global code-server
code-server code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
``` ```
@ -144,8 +143,8 @@ To debug installation issues, install with `npm`:
```shell ```shell
# Uninstall # Uninstall
npm uninstall --global --unsafe-perm code-server > /dev/null 2>&1 npm uninstall --global code-server > /dev/null 2>&1
# Install with logging # Install with logging
npm install --loglevel verbose --global --unsafe-perm code-server npm install --loglevel verbose --global code-server
``` ```

View file

@ -22,7 +22,7 @@ The following steps walk you through setting up a VM running Debian using Google
Cloud (though you are welcome to use any machine or VM provider). Cloud (though you are welcome to use any machine or VM provider).
If you're [signing up with Google](https://console.cloud.google.com/getting-started) for the first time, you should get a 3-month trial with If you're [signing up with Google](https://console.cloud.google.com/getting-started) for the first time, you should get a 3-month trial with
$300 of credits. \$300 of credits.
After you sign up and create a new Google Cloud Provider (GCP) project, create a After you sign up and create a new Google Cloud Provider (GCP) project, create a
new Compute Engine VM instance: new Compute Engine VM instance:

View file

@ -8,11 +8,12 @@
- [Upgrade](#upgrade) - [Upgrade](#upgrade)
- [Known Issues](#known-issues) - [Known Issues](#known-issues)
- [Git won't work in `/sdcard`](#git-wont-work-in-sdcard) - [Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
- [Many extensions including language packs fail to install](#many-extensions-including-language-packs-fail-to-install)
- [Extra](#extra) - [Extra](#extra)
- [Keyboard Shortcuts and Tab Key](#keyboard-shortcuts-and-tab-key)
- [Create a new user](#create-a-new-user) - [Create a new user](#create-a-new-user)
- [Install Go](#install-go) - [Install Go](#install-go)
- [Install Python](#install-python) - [Install Python](#install-python)
- [Working with PRoot](#working-with-proot)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@ -20,53 +21,9 @@
## Install ## Install
1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**. 1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**.
2. Install Debian by running the following: 2. Run `pkg install tur-repo`
- Run `termux-setup-storage` to allow storage access, or else code-server won't be able to read from `/sdcard`.\ 3. Run `pkg install code-server`
> The following command is from [proot-distro](https://github.com/termux/proot-distro), but you can also use [Andronix](https://andronix.app/). 4. You can now start code server by simply running `code-server`.
> After Debian is installed the `~ $` will change to `root@localhost`.
```bash
pkg update -y && pkg install proot-distro -y && proot-distro install debian && proot-distro login debian
```
3. Run the following commands to setup Debian:
```bash
apt update && apt upgrade -y && apt-get install sudo vim git -y
```
4. Install [NVM](https://github.com/nvm-sh/nvm#install--update-script) by following the install guide in the README, just a curl/wget command.
5. Set up NVM for multi-user. After installing NVM it automatically adds the necessary commands for it to work, but it will only work if you are logged in as root:
- Copy the lines NVM asks you to run after running the install script.
- Run `nano /root/.bashrc` and comment out those lines by adding a `#` at the start.
- Run `nano /etc/profile` and paste those lines at the end of the file. Make sure to replace `$HOME` with `/root` on the first line.
- Now run `exit`
- Start Debian again `proot-distro login debian`
6. After following the instructions and setting up NVM you can now install the [required node version](https://coder.com/docs/code-server/latest/npm#nodejs-version) by running:
```bash
nvm install v<major_version_here>
```
7. To install `code-server` run the following:
> To check the install process (Will not actually install code-server)
> If it all looks good, you can install code-server by running the second command
```bash
curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
```
```bash
curl -fsSL https://code-server.dev/install.sh | sh
```
8. You can now start code server by simply running `code-server`.
> Consider using a new user instead of root, read [here](https://www.howtogeek.com/124950/htg-explains-why-you-shouldnt-log-into-your-linux-system-as-root/) why using root is not recommended.\
> Learn how to add a user [here](#create-a-new-user).
## NPM Installation ## NPM Installation
@ -100,7 +57,7 @@ npm config set python python3
node -v node -v
``` ```
you will get node version `v16.15.0` you will get Node version `v22`
5. Now install code-server following our guide on [installing with npm](./npm.md) 5. Now install code-server following our guide on [installing with npm](./npm.md)
@ -113,7 +70,7 @@ code-server --auth none
7. If already installed then use the following command for upgradation. 7. If already installed then use the following command for upgradation.
``` ```
npm update --global code-server --unsafe-perm npm update --global code-server
``` ```
## Upgrade ## Upgrade
@ -132,8 +89,50 @@ Potential Workaround :
1. Create a soft-link from the debian-fs to your folder in `/sdcard` 1. Create a soft-link from the debian-fs to your folder in `/sdcard`
2. Use git from termux (preferred) 2. Use git from termux (preferred)
### Many extensions including language packs fail to install
Issue: Android is not seen as a Linux environment but as a separate, unsupported platform, so code-server only allows [Web Extensions](https://code.visualstudio.com/api/extension-guides/web-extensions), refusing to download extensions that run on the server.\
Fix: None\
Potential workarounds :
Either
- Manually download extensions as `.vsix` file and install them via `Extensions: Install from VSIX...` in the Command Palette.
- Use an override to pretend the platform is Linux:
Create a JS script that patches `process.platform`:
```js
// android-as-linux.js
Object.defineProperty(process, "platform", {
get() {
return "linux"
},
})
```
Then use Node's `--require` option to make sure it is loaded before `code-server` starts:
```sh
NODE_OPTIONS="--require /path/to/android-as-linux.js" code-server
```
⚠️ Note that Android and Linux are not 100% compatible, so use these workarounds at your own risk. Extensions that have native dependencies other than Node or that directly interact with the OS might cause issues.
## Extra ## Extra
### Keyboard Shortcuts and Tab Key
In order to support the tab key and use keyboard shortcuts, add this to your
settings.json:
```json
{
"keyboard.dispatch": "keyCode"
}
```
### Create a new user ### Create a new user
To create a new user follow these simple steps - To create a new user follow these simple steps -
@ -202,35 +201,3 @@ eval "$(pyenv virtualenv-init -)"
7. Run `touch /root/.pyenv/version && echo "your_version_here" > /root/.pyenv/version` 7. Run `touch /root/.pyenv/version && echo "your_version_here" > /root/.pyenv/version`
8. (You may have to start Debian again) Run `python3 -V` to verify if PATH works or not. 8. (You may have to start Debian again) Run `python3 -V` to verify if PATH works or not.
> If `python3` doesn't work but pyenv says that the install was successful in step 6 then try running `$PYENV_ROOT/versions/your_version/bin/python3`. > If `python3` doesn't work but pyenv says that the install was successful in step 6 then try running `$PYENV_ROOT/versions/your_version/bin/python3`.
### Working with PRoot
Debian PRoot Distro Dev Environment
- Since Node and code-server are installed in the Debian PRoot distro, your `~/.ssh/` configuration, `~/.bashrc`, git, npm packages, etc. should be setup in PRoot as well.
- The terminal accessible in code-server will bring up the filesystem and `~/.bashrc` in the Debian PRoot distro.
Accessing files in the Debian PRoot Distro
- The `/data/data/com.termux/files/home` directory in PRoot accesses the termux home directory (`~`)
- The `/sdcard` directory in PRoot accesses the Android storage directory, though there are [known issues with git and files in the `/sdcard` path](#git-wont-work-in-sdcard)
Accessing the Debian PRoot distro/Starting code-server
- Run the following command to access the Debian PRoot distro, from the termux shell:
```bash
proot-distro login debian
```
- Run the following command to start code-server directly in the Debian PRoot distro, from the termux shell:
```bash
proot-distro login debian -- code-server
```
- If you [created a new user](#create-a-new-user), you'll need to insert the `--user <username>` option between `login` and `debian` in the commands above to run as the user instead of root in PRoot.
Additional information on PRoot and Termux
- Additional information on using your Debian PRoot Distro can be [found here](https://github.com/termux/proot-distro#functionality-overview).

84
eslint.config.mjs Normal file
View file

@ -0,0 +1,84 @@
import { fixupConfigRules } from "@eslint/compat"
import globals from "globals"
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
export default [
...fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier",
),
),
{
languageOptions: {
globals: {
...globals.browser,
...globals.jest,
...globals.node,
},
parser: tsParser,
ecmaVersion: 2018,
sourceType: "module",
},
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "none",
},
],
"no-dupe-class-members": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-vars": "off", // TODO: Fix these.
"@typescript-eslint/no-empty-object-type": "off",
eqeqeq: "error",
"import/order": [
"error",
{
alphabetize: {
order: "asc",
},
groups: [["builtin", "external", "internal"], "parent", "sibling"],
},
],
"no-async-promise-executor": "off",
},
},
]

View file

@ -1,12 +1,15 @@
{ {
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1731533236,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,16 +20,18 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1660639432, "lastModified": 1739303263,
"narHash": "sha256-2WDiboOCfB0LhvnDVMXOAr8ZLDfm3WdO54CkoDPwN1A=", "narHash": "sha256-c/Z/6gZLN8BIpYh1B3qMzEn0TArjf4F2lmy59lDLVBM=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6c6409e965a6c883677be7b9d87a95fab6c3472e", "rev": "6cc4213488e886db863878a1e3dc26cc932d38b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "nixos",
"type": "indirect" "ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
@ -34,6 +39,21 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,20 +1,32 @@
{ {
description = "code-server"; description = "code-server";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem flake-utils.lib.eachDefaultSystem
(system: (system:
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
nodejs = pkgs.nodejs-16_x; nodejs = pkgs.nodejs_22;
yarn' = pkgs.yarn.override { inherit nodejs; };
in { in {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
nodejs yarn' python pkg-config git rsync jq moreutils quilt bats imagemagick
nodejs
python3
pkg-config
git
rsync
jq
moreutils
quilt
bats
openssl
]; ];
buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret ] buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret libkrb5 ]
++ (with xorg; [ libX11 libxkbfile ]) ++ (with xorg; [ libX11 libxkbfile ])
++ lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ ++ lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
AppKit Cocoa CoreServices Security xcbuild AppKit Cocoa CoreServices Security xcbuild

View file

@ -46,7 +46,7 @@ Usage:
Sets the prefix used by standalone release archives. Defaults to ~/.local Sets the prefix used by standalone release archives. Defaults to ~/.local
The release is unarchived into ~/.local/lib/code-server-X.X.X The release is unarchived into ~/.local/lib/code-server-X.X.X
and the binary symlinked into ~/.local/bin/code-server and the binary symlinked into ~/.local/bin/code-server
To install system wide pass ---prefix=/usr/local To install system wide pass --prefix=/usr/local
--rsh <bin> --rsh <bin>
Specifies the remote shell for remote installation. Defaults to ssh. Specifies the remote shell for remote installation. Defaults to ssh.
@ -387,7 +387,7 @@ install_aur() {
if [ ! "${DRY_RUN-}" ]; then if [ ! "${DRY_RUN-}" ]; then
cd "$CACHE_DIR/code-server-aur" cd "$CACHE_DIR/code-server-aur"
fi fi
sh_c makepkg -si sh_c makepkg -si --noconfirm
echo_systemd_postinstall AUR echo_systemd_postinstall AUR
} }
@ -424,7 +424,7 @@ install_standalone() {
} }
install_npm() { install_npm() {
echoh "Installing latest from npm." echoh "Installing v$VERSION from npm."
echoh echoh
NPM_PATH="${YARN_PATH-npm}" NPM_PATH="${YARN_PATH-npm}"
@ -436,12 +436,12 @@ install_npm() {
fi fi
echoh "Installing with npm." echoh "Installing with npm."
echoh echoh
"$sh_c" "$NPM_PATH" install -g code-server --unsafe-perm "$sh_c" "$NPM_PATH" install -g "code-server@$VERSION" --unsafe-perm
NPM_BIN_DIR="\$($NPM_PATH bin -g)" echo_npm_postinstall NPM_BIN_DIR="\$($NPM_PATH bin -g)" echo_npm_postinstall
return return
fi fi
echoerr "Please install npm to install code-server!" echoerr "Please install npm to install code-server!"
echoerr "You will need at least node v12 and a few C dependencies." echoerr "You will need at least node v20 and a few C dependencies."
echoerr "See the docs https://coder.com/docs/code-server/latest/install#npm" echoerr "See the docs https://coder.com/docs/code-server/latest/install#npm"
exit 1 exit 1
@ -461,9 +461,9 @@ npm_fallback() {
# Determine if we have standalone releases on GitHub for the system's arch. # Determine if we have standalone releases on GitHub for the system's arch.
has_standalone() { has_standalone() {
case $ARCH in case $ARCH in
amd64) return 0 ;; arm64) return 0 ;;
# We only have amd64 for macOS. # We only have arm64 for macOS.
arm64) amd64)
[ "$(distro)" != macos ] [ "$(distro)" != macos ]
return return
;; ;;

@ -1 +1 @@
Subproject commit 129500ee4c8ab7263461ffe327268ba56b9f210d Subproject commit 302ff6a2e235c95b88e587d4a4b6eeb1b6613297

6750
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{ {
"name": "code-server", "name": "code-server",
"license": "MIT", "license": "MIT",
"version": "4.8.2", "version": "0.0.0",
"description": "Run VS Code on a remote server.", "description": "Run VS Code on a remote server.",
"homepage": "https://github.com/coder/code-server", "homepage": "https://github.com/coder/code-server",
"bugs": { "bugs": {
@ -23,90 +23,74 @@
"test:native": "./ci/dev/test-native.sh", "test:native": "./ci/dev/test-native.sh",
"test:scripts": "./ci/dev/test-scripts.sh", "test:scripts": "./ci/dev/test-scripts.sh",
"package": "./ci/build/build-packages.sh", "package": "./ci/build/build-packages.sh",
"prettier": "prettier --write --loglevel=warn --cache .", "prettier": "prettier --write --log-level=warn --cache .",
"preinstall": "node ./ci/dev/preinstall.js",
"postinstall": "./ci/dev/postinstall.sh", "postinstall": "./ci/dev/postinstall.sh",
"publish:npm": "./ci/steps/publish-npm.sh", "publish:npm": "./ci/steps/publish-npm.sh",
"publish:docker": "./ci/steps/docker-buildx-push.sh", "publish:docker": "./ci/steps/docker-buildx-push.sh",
"_audit": "./ci/dev/audit.sh", "fmt": "npm run prettier && ./ci/dev/doctoc.sh",
"fmt": "yarn prettier && ./ci/dev/doctoc.sh",
"lint:scripts": "./ci/dev/lint-scripts.sh", "lint:scripts": "./ci/dev/lint-scripts.sh",
"lint:ts": "eslint --max-warnings=0 --fix $(git ls-files '*.ts' '*.js' | grep -v 'lib/vscode')", "lint:ts": "eslint --max-warnings=0 --fix $(git ls-files '*.ts' '*.js' | grep -v 'lib/vscode')",
"test": "echo 'Run yarn test:unit or yarn test:e2e' && exit 1", "test": "echo 'Run npm run test:unit or npm run test:e2e' && exit 1",
"ci": "./ci/dev/ci.sh",
"watch": "VSCODE_DEV=1 VSCODE_IPC_HOOK_CLI= NODE_OPTIONS='--max_old_space_size=32384 --trace-warnings' ts-node ./ci/dev/watch.ts", "watch": "VSCODE_DEV=1 VSCODE_IPC_HOOK_CLI= NODE_OPTIONS='--max_old_space_size=32384 --trace-warnings' ts-node ./ci/dev/watch.ts",
"icons": "./ci/dev/gen_icons.sh" "icons": "./ci/dev/gen_icons.sh"
}, },
"main": "out/node/entry.js", "main": "out/node/entry.js",
"devDependencies": { "devDependencies": {
"@schemastore/package": "^0.0.6", "@eslint/compat": "^1.2.0",
"@types/compression": "^1.7.0", "@eslint/eslintrc": "^3.1.0",
"@types/cookie-parser": "^1.4.2", "@eslint/js": "^9.12.0",
"@types/express": "^4.17.8", "@schemastore/package": "^0.0.10",
"@types/http-proxy": "^1.17.4", "@types/compression": "^1.7.3",
"@types/js-yaml": "^4.0.0", "@types/cookie-parser": "^1.4.4",
"@types/node": "^16.0.0", "@types/eslint__js": "^8.42.3",
"@types/pem": "^1.9.5", "@types/express": "^5.0.0",
"@types/http-proxy": "1.17.7",
"@types/js-yaml": "^4.0.6",
"@types/node": "22.x",
"@types/pem": "^1.14.1",
"@types/proxy-from-env": "^1.0.1", "@types/proxy-from-env": "^1.0.1",
"@types/safe-compare": "^1.1.0", "@types/safe-compare": "^1.1.0",
"@types/semver": "^7.1.0", "@types/semver": "^7.5.2",
"@types/split2": "^3.2.0", "@types/trusted-types": "^2.0.4",
"@types/trusted-types": "^2.0.2", "@types/ws": "^8.5.5",
"@types/ws": "^8.5.3", "doctoc": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^5.41.0", "eslint": "^9.12.0",
"@typescript-eslint/parser": "^5.41.0", "eslint-config-prettier": "^9.0.0",
"audit-ci": "^6.0.0", "eslint-import-resolver-typescript": "^4.4.4",
"doctoc": "2.2.1", "eslint-plugin-import": "^2.28.1",
"eslint": "^8.26.0", "eslint-plugin-prettier": "^5.0.0",
"eslint-config-prettier": "^8.5.0", "globals": "^16.1.0",
"eslint-import-resolver-typescript": "^3.5.2", "prettier": "3.6.2",
"eslint-plugin-import": "^2.26.0", "prettier-plugin-sh": "^0.14.0",
"eslint-plugin-prettier": "^4.2.1", "ts-node": "^10.9.1",
"prettier": "2.7.1", "typescript": "^5.6.2",
"prettier-plugin-sh": "^0.12.8", "typescript-eslint": "^8.8.0"
"ts-node": "^10.0.0",
"typescript": "^4.6.2"
},
"resolutions": {
"ansi-regex": "^5.0.1",
"normalize-package-data": "^5.0.0",
"doctoc/underscore": "^1.13.1",
"doctoc/**/trim": "^1.0.0",
"postcss": "^8.2.1",
"browserslist": "^4.16.5",
"safe-buffer": "^5.1.1",
"vfile-message": "^2.0.2",
"tar": "^6.1.9",
"path-parse": "^1.0.7",
"vm2": "^3.9.11",
"follow-redirects": "^1.14.8",
"node-fetch": "^2.6.7",
"nanoid": "^3.1.31",
"minimist": "npm:minimist-lite@2.2.1",
"glob-parent": "^6.0.1",
"@types/node": "^16.0.0"
}, },
"dependencies": { "dependencies": {
"@coder/logger": "^3.0.0", "@coder/logger": "^3.0.1",
"argon2": "0.29.0", "argon2": "^0.31.1",
"compression": "^1.7.4", "compression": "^1.7.4",
"cookie-parser": "^1.4.5", "cookie-parser": "^1.4.6",
"env-paths": "^2.2.0", "env-paths": "^2.2.1",
"express": "5.0.0-alpha.8", "express": "^5.0.1",
"http-proxy": "^1.18.0", "http-proxy": "^1.18.1",
"httpolyglot": "^0.1.2", "httpolyglot": "^0.1.2",
"js-yaml": "^4.0.0", "i18next": "^25.3.0",
"limiter": "^1.1.5", "js-yaml": "^4.1.0",
"pem": "^1.14.2", "limiter": "^2.1.0",
"proxy-agent": "^5.0.0", "pem": "^1.14.8",
"qs": "6.11.0", "proxy-agent": "^6.3.1",
"rotating-file-stream": "^3.0.0", "qs": "6.14.0",
"safe-buffer": "^5.1.1", "rotating-file-stream": "^3.1.1",
"safe-compare": "^1.1.4", "safe-compare": "^1.1.4",
"semver": "^7.1.3", "semver": "^7.5.4",
"split2": "^4.0.0", "ws": "^8.14.2",
"ws": "^8.0.0",
"xdg-basedir": "^4.0.0" "xdg-basedir": "^4.0.0"
}, },
"resolutions": {
"@types/node": "22.x"
},
"bin": { "bin": {
"code-server": "out/node/entry.js" "code-server": "out/node/entry.js"
}, },
@ -116,10 +100,11 @@
"ide", "ide",
"coder", "coder",
"vscode-remote", "vscode-remote",
"browser-ide" "browser-ide",
"remote-development"
], ],
"engines": { "engines": {
"node": "16" "node": "22"
}, },
"jest": { "jest": {
"transform": { "transform": {

View file

@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/network.ts --- code-server.orig/lib/vscode/src/vs/base/common/network.ts
+++ code-server/lib/vscode/src/vs/base/common/network.ts +++ code-server/lib/vscode/src/vs/base/common/network.ts
@@ -162,7 +162,9 @@ class RemoteAuthoritiesImpl { @@ -237,7 +237,9 @@ class RemoteAuthoritiesImpl {
return URI.from({ return URI.from({
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource, scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
authority: `${host}:${port}`, authority: `${host}:${port}`,
@ -46,18 +46,18 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
+ <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" /> + <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
+ <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" /> + <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
+ <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" /> + <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
</head> <style id="vscode-css-modules" type="text/css" media="screen"></style>
<body aria-label=""> </head>
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></script> <!-- Startup (do not modify order of script tags!) -->
<script> <script>
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString(); - const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString(); + const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
Object.keys(self.webPackagePaths).map(function (key, index) { globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
self.webPackagePaths[key] = `${baseUrl}/remote/web/node_modules/${key}/${self.webPackagePaths[key]}`; </script>
}); <script>
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
@ -83,100 +83,91 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
+ <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" /> + <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
+ <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" /> + <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
+ <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" /> + <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
<link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.main.css"> <link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
</head> </head>
@@ -38,7 +38,7 @@ @@ -36,7 +36,7 @@
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
<script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></script> <!-- Startup (do not modify order of script tags!) -->
<script> <script>
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString(); - const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString(); + const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
Object.keys(self.webPackagePaths).map(function (key, index) { globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
self.webPackagePaths[key] = `${baseUrl}/node_modules/${key}/${self.webPackagePaths[key]}`; </script>
}); <script>
Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts --- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
+++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts +++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
@@ -274,6 +274,7 @@ export class BrowserSocketFactory implem @@ -282,6 +282,7 @@ export class BrowserSocketFactory implem
connect({ host, port }: WebSocketRemoteConnection, path: string, query: string, debugLabel: string): Promise<ISocket> {
connect(host: string, port: number, path: string, query: string, debugLabel: string, callback: IConnectCallback): void { return new Promise<ISocket>((resolve, reject) => {
const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws'); const webSocketSchema = (/^https:/.test(mainWindow.location.href) ? 'wss' : 'ws');
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/") + path = (mainWindow.location.pathname + "/" + path).replace(/\/\/+/g, "/")
const socket = this._webSocketFactory.create(`${webSocketSchema}://${(/:/.test(host) && !/\[/.test(host)) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel); const socket = this._webSocketFactory.create(`${webSocketSchema}://${(/:/.test(host) && !/\[/.test(host)) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel);
const errorListener = socket.onError((err) => callback(err, undefined)); const disposables = new DisposableStore();
socket.onOpen(() => { disposables.add(socket.onError(reject));
@@ -282,6 +283,3 @@ export class BrowserSocketFactory implem
});
}
}
-
-
-
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -267,12 +267,11 @@ export class WebClientServer { @@ -245,7 +245,9 @@ export class WebClientServer {
return res.end(); };
}
- const getFirstHeader = (headerName: string) => { // Prefix routes with basePath for clients
- const val = req.headers[headerName]; - const basePath = getFirstHeader('x-forwarded-prefix') || this._basePath;
- return Array.isArray(val) ? val[0] : val; + const rootBase = relativeRoot(getOriginalUrl(req))
- }; + const vscodeBase = relativePath(getOriginalUrl(req))
- + const basePath = vscodeBase || getFirstHeader('x-forwarded-prefix') || this._basePath;
- const remoteAuthority = getFirstHeader('x-original-host') || getFirstHeader('x-forwarded-host') || req.headers.host;
const queryConnectionToken = parsedUrl.query[connectionTokenQueryName];
if (typeof queryConnectionToken === 'string') {
@@ -284,10 +286,14 @@ export class WebClientServer {
};
const useTestResolver = (!this._environmentService.isBuilt && this._environmentService.args['use-test-resolver']);
+ // For now we are getting the remote authority from the client to avoid + // For now we are getting the remote authority from the client to avoid
+ // needing specific configuration for reverse proxies to work. Set this to + // needing specific configuration for reverse proxies to work. Set this to
+ // something invalid to make sure we catch code that is using this value + // something invalid to make sure we catch code that is using this value
+ // from the backend when it should not. + // from the backend when it should not.
+ const remoteAuthority = 'remote'; let remoteAuthority = (
useTestResolver
? 'test+test'
- : (getFirstHeader('x-original-host') || getFirstHeader('x-forwarded-host') || req.headers.host)
+ : 'remote'
);
if (!remoteAuthority) { if (!remoteAuthority) {
return serveError(req, res, 400, `Bad request.`); return serveError(req, res, 400, `Bad request.`);
} @@ -334,6 +340,7 @@ export class WebClientServer {
@@ -298,6 +297,8 @@ export class WebClientServer {
scopes: [['user:email'], ['repo']]
} : undefined;
+ const base = relativeRoot(getOriginalUrl(req)) const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
+ const vscodeBase = relativePath(getOriginalUrl(req)) codeServerVersion: this._productService.codeServerVersion,
+ rootEndpoint: rootBase,
const workbenchWebConfiguration = { embedderIdentifier: 'server-distro',
remoteAuthority, extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
@@ -309,6 +310,7 @@ export class WebClientServer { ...this._productService.extensionsGallery,
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']), @@ -387,7 +394,9 @@ export class WebClientServer {
productConfiguration: <Partial<IProductConfiguration>>{
codeServerVersion: this._productService.codeServerVersion,
+ rootEndpoint: base,
embedderIdentifier: 'server-distro',
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
...this._productService.extensionsGallery,
@@ -326,8 +328,10 @@ export class WebClientServer {
const values: { [key: string]: string } = {
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '', WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
- WORKBENCH_WEB_BASE_URL: this._staticRoute, WORKBENCH_WEB_BASE_URL: staticRoute,
- WORKBENCH_NLS_BASE_URL: nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : '', WORKBENCH_NLS_URL,
+ WORKBENCH_WEB_BASE_URL: vscodeBase + this._staticRoute, - WORKBENCH_NLS_FALLBACK_URL: `${staticRoute}/out/nls.messages.js`
+ WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : ''), + WORKBENCH_NLS_FALLBACK_URL: `${staticRoute}/out/nls.messages.js`,
+ BASE: base, + BASE: rootBase,
+ VS_BASE: vscodeBase, + VS_BASE: basePath,
}; };
// DEV ---------------------------------------------------------------------------------------
@@ -344,7 +348,7 @@ export class WebClientServer { @@ -424,7 +433,7 @@ export class WebClientServer {
'default-src \'self\';', 'default-src \'self\';',
'img-src \'self\' https: data: blob:;', 'img-src \'self\' https: data: blob:;',
'media-src \'self\';', 'media-src \'self\';',
- `script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://${remoteAuthority};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html - `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} blob: 'nonce-1nline-m4p' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
+ `script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=';`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html + `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} blob: 'nonce-1nline-m4p' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : ``};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
'child-src \'self\';', 'child-src \'self\';',
`frame-src 'self' https://*.vscode-cdn.net data:;`, `frame-src 'self' https://*.vscode-cdn.net data:;`,
'worker-src \'self\' data:;', 'worker-src \'self\' data: blob:;',
@@ -417,3 +421,70 @@ export class WebClientServer { @@ -497,3 +506,70 @@ export class WebClientServer {
return res.end(data); return void res.end(data);
} }
} }
+ +
@ -250,7 +241,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
+++ code-server/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts
@@ -32,6 +32,7 @@ export type ExtensionVirtualWorkspaceSup @@ -66,6 +66,7 @@ export type ExtensionVirtualWorkspaceSup
export interface IProductConfiguration { export interface IProductConfiguration {
readonly codeServerVersion?: string readonly codeServerVersion?: string
@ -262,39 +253,53 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
@@ -489,6 +489,7 @@ function doCreateUri(path: string, query @@ -339,7 +339,8 @@ class LocalStorageURLCallbackProvider ex
}); this.startListening();
}
- return URI.parse(mainWindow.location.href).with({ path: this._callbackRoute, query: queryParams.join('&') });
+ const path = (mainWindow.location.pathname + "/" + this._callbackRoute).replace(/\/\/+/g, "/");
+ return URI.parse(mainWindow.location.href).with({ path: path, query: queryParams.join('&') });
} }
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/") private startListening(): void {
return URI.parse(window.location.href).with({ path, query }); @@ -584,17 +585,6 @@ class WorkspaceProvider implements IWork
}
} }
@@ -500,7 +501,7 @@ function doCreateUri(path: string, query -function readCookie(name: string): string | undefined {
- const cookies = document.cookie.split('; ');
- for (const cookie of cookies) {
- if (cookie.startsWith(name + '=')) {
- return cookie.substring(name.length + 1);
- }
- }
-
- return undefined;
-}
-
(function () {
// Find config by checking for DOM
@@ -604,8 +594,8 @@ function readCookie(name: string): strin
if (!configElement || !configElementAttribute) { if (!configElement || !configElementAttribute) {
throw new Error('Missing web configuration element'); throw new Error('Missing web configuration element');
} }
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute); - const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute);
- const secretStorageKeyPath = readCookie('vscode-secret-key-path');
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host } + const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host }
+ const secretStorageKeyPath = (window.location.pathname + "/mint-key").replace(/\/\/+/g, "/");
const secretStorageCrypto = secretStorageKeyPath && ServerKeyedAESCrypto.supported()
? new ServerKeyedAESCrypto(secretStorageKeyPath) : new TransparentCrypto();
// Create workbench Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
create(document.body, {
Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts --- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
+++ code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/ @@ -120,7 +120,7 @@ export abstract class AbstractExtensionR
import { IStorageService } from 'vs/platform/storage/common/storage'; : version,
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; path: 'extension'
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; }));
-import { RemoteAuthorities } from 'vs/base/common/network';
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
export const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
@@ -75,7 +74,7 @@ export abstract class AbstractExtensionR
public getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined {
if (this._extensionGalleryResourceUrlTemplate) {
const uri = URI.parse(format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' }));
- return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri; - return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
+ return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri; + return this._isWebExtensionResourceEndPoint(uri) ? URI.joinPath(URI.parse(window.location.href), uri.path) : uri;
} }

View file

@ -8,7 +8,7 @@ To test:
2. Open code-server 2. Open code-server
3. Open terminal 3. Open terminal
4. Open another code-server window 4. Open another code-server window
5. Run code-server with a file or directory argument 5. Run node ./out/node/entry.js with a file or directory argument
The file or directory should only open from the instance attached to that The file or directory should only open from the instance attached to that
terminal. terminal.
@ -17,7 +17,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTe
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts --- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
@@ -100,10 +100,14 @@ class RemoteTerminalBackend extends Base @@ -107,10 +107,14 @@ class RemoteTerminalBackend extends Base
} }
const reqId = e.reqId; const reqId = e.reqId;
const commandId = e.commandId; const commandId = e.commandId;

135
patches/clipboard.diff Normal file
View file

@ -0,0 +1,135 @@
Index: code-server/lib/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.ts
+++ code-server/lib/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.ts
@@ -8,6 +8,7 @@ import { isWeb } from '../../../base/com
import { isString } from '../../../base/common/types.js';
import { URI, UriComponents } from '../../../base/common/uri.js';
import { localize } from '../../../nls.js';
+import { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';
import { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands.js';
import { IExtensionGalleryService, IExtensionManagementService } from '../../../platform/extensionManagement/common/extensionManagement.js';
import { ExtensionManagementCLI } from '../../../platform/extensionManagement/common/extensionManagementCLI.js';
@@ -95,6 +96,11 @@ CommandsRegistry.registerCommand('_remot
});
+CommandsRegistry.registerCommand('_remoteCLI.setClipboard', function (accessor: ServicesAccessor, content: string) {
+ const clipboardService = accessor.get(IClipboardService);
+ clipboardService.writeText(content);
+})
+
class RemoteExtensionManagementCLI extends ExtensionManagementCLI {
private _location: string | undefined;
Index: code-server/lib/vscode/src/vs/workbench/api/node/extHostCLIServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/api/node/extHostCLIServer.ts
+++ code-server/lib/vscode/src/vs/workbench/api/node/extHostCLIServer.ts
@@ -44,7 +44,12 @@ export interface ExtensionManagementPipe
force?: boolean;
}
-export type PipeCommand = OpenCommandPipeArgs | StatusPipeArgs | OpenExternalCommandPipeArgs | ExtensionManagementPipeArgs;
+export interface ClipboardPipeArgs {
+ type: 'clipboard';
+ content: string;
+}
+
+export type PipeCommand = OpenCommandPipeArgs | StatusPipeArgs | OpenExternalCommandPipeArgs | ExtensionManagementPipeArgs | ClipboardPipeArgs;
export interface ICommandsExecuter {
executeCommand<T>(id: string, ...args: any[]): Promise<T>;
@@ -106,6 +111,9 @@ export class CLIServerBase {
case 'extensionManagement':
returnObj = await this.manageExtensions(data);
break;
+ case 'clipboard':
+ returnObj = await this.clipboard(data);
+ break;
default:
sendResponse(404, `Unknown message type: ${data.type}`);
break;
@@ -173,6 +181,10 @@ export class CLIServerBase {
return await this._commands.executeCommand<string | undefined>('_remoteCLI.getSystemStatus');
}
+ private async clipboard(data: ClipboardPipeArgs): Promise<undefined> {
+ return await this._commands.executeCommand('_remoteCLI.setClipboard', data.content);
+ }
+
dispose(): void {
this._server.close();
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
@@ -98,7 +98,7 @@ class RemoteTerminalBackend extends Base
}
});
- const allowedCommands = ['_remoteCLI.openExternal', '_remoteCLI.windowOpen', '_remoteCLI.getSystemStatus', '_remoteCLI.manageExtensions'];
+ const allowedCommands = ['_remoteCLI.openExternal', '_remoteCLI.windowOpen', '_remoteCLI.getSystemStatus', '_remoteCLI.manageExtensions', '_remoteCLI.setClipboard'];
this._remoteTerminalChannel.onExecuteCommand(async e => {
// Ensure this request for for this window
const pty = this._ptys.get(e.persistentProcessId);
Index: code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/argv.ts
+++ code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
@@ -137,6 +137,7 @@ export interface NativeParsedArgs {
'disable-chromium-sandbox'?: boolean;
sandbox?: boolean;
'enable-coi'?: boolean;
+ 'stdin-to-clipboard'?: boolean;
'unresponsive-sample-interval'?: string;
'unresponsive-sample-period'?: string;
'enable-rdp-display-tracking'?: boolean;
Index: code-server/lib/vscode/src/vs/platform/environment/node/argv.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/environment/node/argv.ts
+++ code-server/lib/vscode/src/vs/platform/environment/node/argv.ts
@@ -105,6 +105,7 @@ export const OPTIONS: OptionDescriptions
'user-data-dir': { type: 'string', cat: 'o', args: 'dir', description: localize('userDataDir', "Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.") },
'profile': { type: 'string', 'cat': 'o', args: 'profileName', description: localize('profileName', "Opens the provided folder or workspace with the given profile and associates the profile with the workspace. If the profile does not exist, a new empty one is created.") },
'help': { type: 'boolean', cat: 'o', alias: 'h', description: localize('help', "Print usage.") },
+ 'stdin-to-clipboard': { type: 'boolean', cat: 'o', alias: 'c', description: localize('clipboard', "copies the STDIN to the clipboard") },
'extensions-dir': { type: 'string', deprecates: ['extensionHomePath'], cat: 'e', args: 'dir', description: localize('extensionHomePath', "Set the root path for extensions.") },
'extensions-download-dir': { type: 'string' },
Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/server.cli.ts
+++ code-server/lib/vscode/src/vs/server/node/server.cli.ts
@@ -77,6 +77,7 @@ const isSupportedForPipe = (optionId: ke
case 'verbose':
case 'remote':
case 'locate-shell-integration-path':
+ case 'stdin-to-clipboard':
return true;
default:
return false;
@@ -300,6 +301,22 @@ export async function main(desc: Product
}
}
} else {
+ if (parsedArgs['stdin-to-clipboard']) {
+ if(!hasStdinWithoutTty()) {
+ console.error("stdin has a tty.");
+ return;
+ }
+ const stdinBuffer = fs.readFileSync(0); // STDIN_FILENO = 0
+ const clipboardContent = stdinBuffer.toString();
+ sendToPipe({
+ type: 'clipboard',
+ content: clipboardContent
+ }, verbose).catch(e => {
+ console.error('Error when requesting status:', e);
+ });
+ return;
+ }
+
if (parsedArgs.status) {
await sendToPipe({
type: 'status'

View file

@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
@@ -237,6 +237,10 @@ export class Extension implements IExten @@ -341,6 +341,10 @@ export class Extension implements IExten
if (this.type === ExtensionType.System && this.productService.quality === 'stable') { if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
return false; return false;
} }
@ -18,14 +18,3 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
return false; return false;
} }
@@ -1234,6 +1238,10 @@ export class ExtensionsWorkbenchService
// Skip if check updates only for builtin extensions and current extension is not builtin.
continue;
}
+ if (installed.type !== ExtensionType.User) {
+ // Never update builtin extensions.
+ continue;
+ }
if (installed.isBuiltin && (!installed.local?.identifier.uuid || (!isWeb && this.productService.quality === 'stable'))) {
// Skip checking updates for a builtin extension if it does not has Marketplace identifier or the current product is VS Code Desktop stable.
continue;

View file

@ -1,183 +0,0 @@
Add option to disable file downloads via CLI
This patch adds support for a new CLI flag called `--disable-file-downloads`
which allows a user to remove the "Download..." option that shows up when you
right-click files in Code. The default value for this is `false`.
To test this, start code-server with `--disable-file-downloads`, open editor,
right-click on a file (not a folder) and you should **not** see the
"Download..." option.
Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
@@ -271,6 +271,11 @@ export interface IWorkbenchConstructionO
*/
readonly userDataPath?: string
+ /**
+ * Whether the "Download..." option is enabled for files.
+ */
+ readonly isEnabledFileDownloads?: boolean
+
//#endregion
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -31,6 +31,11 @@ export interface IBrowserWorkbenchEnviro
* Options used to configure the workbench.
*/
readonly options?: IWorkbenchConstructionOptions;
+
+ /**
+ * Enable downloading files via menu actions.
+ */
+ readonly isEnabledFileDownloads?: boolean;
}
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
@@ -62,6 +67,13 @@ export class BrowserWorkbenchEnvironment
return this.options.userDataPath;
}
+ get isEnabledFileDownloads(): boolean {
+ if (typeof this.options.isEnabledFileDownloads === "undefined") {
+ throw new Error('isEnabledFileDownloads was not provided to the browser');
+ }
+ return this.options.isEnabledFileDownloads;
+ }
+
@memoize
get argvResource(): URI { return joinPath(this.userRoamingDataHome, 'argv.json'); }
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -14,6 +14,7 @@ export const serverOptions: OptionDescri
/* ----- code-server ----- */
'disable-update-check': { type: 'boolean' },
'auth': { type: 'string' },
+ 'disable-file-downloads': { type: 'boolean' },
/* ----- server setup ----- */
@@ -94,6 +95,7 @@ export interface ServerParsedArgs {
/* ----- code-server ----- */
'disable-update-check'?: boolean;
'auth'?: string
+ 'disable-file-downloads'?: boolean;
/* ----- server setup ----- */
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -304,6 +304,7 @@ export class WebClientServer {
remoteAuthority,
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
userDataPath: this._environmentService.userDataPath,
+ isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
_wrapWebWorkerExtHostInIframe,
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
@@ -7,12 +7,11 @@ import { Event } from 'vs/base/common/ev
import { Disposable } from 'vs/base/common/lifecycle';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys';
-import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext } from 'vs/workbench/common/contextkeys';
+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys';
import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor';
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
-import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from 'vs/platform/workspace/common/workspace';
import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService';
@@ -25,6 +24,7 @@ import { IPaneCompositePartService } fro
import { Schemas } from 'vs/base/common/network';
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
import { IProductService } from 'vs/platform/product/common/productService';
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
export class WorkbenchContextKeysHandler extends Disposable {
private inputFocusedContext: IContextKey<boolean>;
@@ -77,7 +77,7 @@ export class WorkbenchContextKeysHandler
@IContextKeyService private readonly contextKeyService: IContextKeyService,
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
@IConfigurationService private readonly configurationService: IConfigurationService,
- @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
+ @IBrowserWorkbenchEnvironmentService private readonly environmentService: IBrowserWorkbenchEnvironmentService,
@IProductService private readonly productService: IProductService,
@IEditorService private readonly editorService: IEditorService,
@IEditorResolverService private readonly editorResolverService: IEditorResolverService,
@@ -202,6 +202,9 @@ export class WorkbenchContextKeysHandler
this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
+ // code-server
+ IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
+
this.registerListeners();
}
Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
@@ -22,7 +22,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService';
import { Schemas } from 'vs/base/common/network';
-import { DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey } from 'vs/workbench/common/contextkeys';
+import { DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys';
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
@@ -477,13 +477,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
id: DOWNLOAD_COMMAND_ID,
title: DOWNLOAD_LABEL
},
- when: ContextKeyExpr.or(
- // native: for any remote resource
- ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.notEqualsTo(Schemas.file)),
- // web: for any files
- ContextKeyExpr.and(IsWebContext, ExplorerFolderContext.toNegated(), ExplorerRootContext.toNegated()),
- // web: for any folders if file system API support is provided
- ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)
+ when: ContextKeyExpr.and(
+ IsEnabledFileDownloads,
+ ContextKeyExpr.or(
+ // native: for any remote resource
+ ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.notEqualsTo(Schemas.file)),
+ // web: for any files
+ ContextKeyExpr.and(IsWebContext, ExplorerFolderContext.toNegated(), ExplorerRootContext.toNegated()),
+ // web: for any folders if file system API support is provided
+ ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)
+ )
)
}));
Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
@@ -32,6 +32,8 @@ export const IsFullscreenContext = new R
export const HasWebFileSystemAccess = new RawContextKey<boolean>('hasWebFileSystemAccess', false, true); // Support for FileSystemAccess web APIs (https://wicg.github.io/file-system-access)
+export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
+
//#endregion

View file

@ -1,131 +1,38 @@
Add display language support Add display language support
We can remove this once upstream supports all language packs. VS Code web appears to implement language support by setting a cookie and
downloading language packs from a URL configured in the product.json. This patch
1. Proxies language packs to the service on the backend. supports language pack extensions and uses files on the remote to set the
2. NLS configuration is embedded into the HTML for the browser to pick up. This language instead, so it works like the desktop version.
code to generate this configuration is copied from the native portion.
3. Remove configuredLocale since we have our own thing.
4. Move the argv.json file to the server instead of in-browser storage. This is
where the current locale is stored and currently the server needs to be able
to read it.
5. Add the locale flag.
6. Remove the redundant locale verification. It does the same as the existing
one but is worse because it does not handle non-existent or empty files.
7. Replace some caching and Node requires because code-server does not restart
when changing the language unlike native Code.
Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
@@ -209,6 +209,9 @@ export async function setupServerService @@ -12,7 +12,7 @@ import * as path from '../../base/common
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); import { IURITransformer } from '../../base/common/uriIpc.js';
socketServer.registerChannel('extensions', channel); import { getMachineId, getSqmMachineId, getDevDeviceId } from '../../base/node/id.js';
import { Promises } from '../../base/node/pfs.js';
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
import { ConfigurationService } from '../../platform/configuration/common/configurationService.js';
@@ -272,6 +272,9 @@ export async function setupServerService
+ const languagePackChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(ILanguagePackService)); socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));
+ const languagePackChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(ILanguagePackService), disposables);
+ socketServer.registerChannel('languagePacks', languagePackChannel); + socketServer.registerChannel('languagePacks', languagePackChannel);
+ +
const encryptionChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(IEncryptionMainService)); // clean up extensions folder
socketServer.registerChannel('encryption', encryptionChannel); remoteExtensionsScanner.whenExtensionsReady().then(() => extensionManagementService.cleanUp());
Index: code-server/lib/vscode/src/vs/base/common/platform.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/platform.ts
+++ code-server/lib/vscode/src/vs/base/common/platform.ts
@@ -2,8 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-import * as nls from 'vs/nls';
-
export const LANGUAGE_DEFAULT = 'en';
let _isWindows = false;
@@ -83,17 +81,19 @@ if (typeof navigator === 'object' && !is
_isMobile = _userAgent?.indexOf('Mobi') >= 0;
_isWeb = true;
- const configuredLocale = nls.getConfiguredDefaultLocale(
- // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale`
- // to ensure that the NLS AMD Loader plugin has been loaded and configured.
- // This is because the loader plugin decides what the default locale is based on
- // how it's able to resolve the strings.
- nls.localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_')
- );
-
- _locale = configuredLocale || LANGUAGE_DEFAULT;
+ _locale = LANGUAGE_DEFAULT;
_language = _locale;
+ const el = typeof document !== 'undefined' && document.getElementById('vscode-remote-nls-configuration');
+ const rawNlsConfig = el && el.getAttribute('data-settings');
+ if (rawNlsConfig) {
+ try {
+ const nlsConfig: NLSConfig = JSON.parse(rawNlsConfig);
+ _locale = nlsConfig.locale;
+ _translationsConfigFile = nlsConfig._translationsConfigFile;
+ _language = nlsConfig.availableLanguages['*'] || LANGUAGE_DEFAULT;
+ } catch (error) { /* Oh well. */ }
+ }
}
// Native environment
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
@@ -23,6 +23,9 @@
<!-- Workbench Auth Session -->
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
+ <!-- NLS Configuration -->
+ <meta id="vscode-remote-nls-configuration" data-settings="{{NLS_CONFIGURATION}}">
+
<!-- Workbench Icon/Manifest/CSS -->
<link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
<link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
@@ -46,15 +49,26 @@
// Set up nls if the user is not using the default language (English)
const nlsConfig = {};
const locale = window.localStorage.getItem('vscode.nls.locale') || navigator.language;
- if (!locale.startsWith('en')) {
- nlsConfig['vs/nls'] = {
- availableLanguages: {
- '*': locale
- },
- translationServiceUrl: '{{WORKBENCH_NLS_BASE_URL}}'
- };
- }
-
+ try {
+ nlsConfig['vs/nls'] = JSON.parse(document.getElementById("vscode-remote-nls-configuration").getAttribute("data-settings"))
+ if (nlsConfig['vs/nls']._resolvedLanguagePackCoreLocation) {
+ const bundles = Object.create(null)
+ nlsConfig['vs/nls'].loadBundle = (bundle, _language, cb) => {
+ const result = bundles[bundle]
+ if (result) {
+ return cb(undefined, result)
+ }
+ const path = nlsConfig['vs/nls']._resolvedLanguagePackCoreLocation + "/" + bundle.replace(/\//g, "!") + ".nls.json"
+ fetch(`{{WORKBENCH_WEB_BASE_URL}}/../vscode-remote-resource?path=${encodeURIComponent(path)}`)
+ .then((response) => response.json())
+ .then((json) => {
+ bundles[bundle] = json
+ cb(undefined, json)
+ })
+ .catch(cb)
+ }
+ }
+ } catch (error) { /* Probably fine. */ }
require.config({
baseUrl: `${baseUrl}/out`,
recordStats: true,
Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts --- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts
+++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts +++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
@@ -105,7 +105,7 @@ export abstract class AbstractNativeEnvi @@ -98,7 +98,7 @@ export abstract class AbstractNativeEnvi
return URI.file(join(vscodePortable, 'argv.json')); return URI.file(join(vscodePortable, 'argv.json'));
} }
@ -138,31 +45,37 @@ Index: code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts --- code-server.orig/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
+++ code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts +++ code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
@@ -30,6 +30,12 @@ export function getNLSConfiguration(lang @@ -3,6 +3,8 @@
if (InternalNLSConfiguration.is(value)) { * Licensed under the MIT License. See License.txt in the project root for license information.
value._languagePackSupport = true; *--------------------------------------------------------------------------------------------*/
}
+ // If the configuration has no results keep trying since code-server +import { promises as fs } from 'fs';
+ // doesn't restart when a language is installed so this result would +import * as path from 'path';
+ // persist (the plugin might not be installed yet for example). import { FileAccess } from '../../base/common/network.js';
+ if (value.locale !== 'en' && value.locale !== 'en-us' && Object.keys(value.availableLanguages).length === 0) { import { join } from '../../base/common/path.js';
+ _cache.delete(key); import type { INLSConfiguration } from '../../nls.js';
+ } @@ -33,7 +35,94 @@ export async function getNLSConfiguratio
return value; if (!result) {
}); result = resolveNLSConfiguration({ userLocale: language, osLocale: language, commit: product.commit, userDataPath, nlsMetadataPath });
_cache.set(key, result); nlsConfigurationCache.set(cacheKey, result);
@@ -44,3 +50,43 @@ export namespace InternalNLSConfiguratio + // If the language pack does not yet exist, it defaults to English, which is
return candidate && typeof candidate._languagePackId === 'string'; + // then cached and you have to restart even if you then install the pack.
+ result.then((r) => {
+ if (!language.startsWith('en') && r.resolvedLanguage.startsWith('en')) {
+ nlsConfigurationCache.delete(cacheKey);
+ }
+ })
} }
return result;
} }
+ +
+/** +/**
+ * The code below is copied from from src/main.js. + * Copied from from src/main.js.
+ */ + */
+
+export const getLocaleFromConfig = async (argvResource: string): Promise<string> => { +export const getLocaleFromConfig = async (argvResource: string): Promise<string> => {
+ try { + try {
+ const content = stripComments(await fs.promises.readFile(argvResource, 'utf8')); + const content = stripComments(await fs.readFile(argvResource, 'utf8'));
+ return JSON.parse(content).locale; + return JSON.parse(content).locale;
+ } catch (error) { + } catch (error) {
+ if (error.code !== "ENOENT") { + if (error.code !== "ENOENT") {
@ -172,6 +85,9 @@ Index: code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
+ } + }
+}; +};
+ +
+/**
+ * Copied from from src/main.js.
+ */
+const stripComments = (content: string): string => { +const stripComments = (content: string): string => {
+ const regexp = /('(?:[^\\']*(?:\\.)?)*')|('(?:[^\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + const regexp = /('(?:[^\\']*(?:\\.)?)*')|('(?:[^\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g;
+ +
@ -195,106 +111,144 @@ Index: code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
+ } + }
+ }); + });
+}; +};
+
+/**
+ * Generate translations then return a path to a JavaScript file that sets the
+ * translations into global variables. This file is loaded by the browser to
+ * set global variables that the loader uses when looking for translations.
+ *
+ * Normally, VS Code pulls these files from a CDN but we want them to be local.
+ */
+export async function getBrowserNLSConfiguration(locale: string, userDataPath: string): Promise<string> {
+ if (locale.startsWith('en')) {
+ return ''; // Use fallback translations.
+ }
+
+ const nlsConfig = await getNLSConfiguration(locale, userDataPath);
+ const messagesFile = nlsConfig?.languagePack?.messagesFile;
+ const resolvedLanguage = nlsConfig?.resolvedLanguage;
+ if (!messagesFile || !resolvedLanguage) {
+ return ''; // Use fallback translations.
+ }
+
+ const nlsFile = path.join(path.dirname(messagesFile), "nls.messages.js");
+ try {
+ await fs.stat(nlsFile);
+ return nlsFile; // We already generated the file.
+ } catch (error) {
+ // ENOENT is fine, that just means we need to generate the file.
+ if (error.code !== 'ENOENT') {
+ throw error;
+ }
+ }
+
+ const messages = (await fs.readFile(messagesFile)).toString();
+ const content = `globalThis._VSCODE_NLS_MESSAGES=${messages};
+globalThis._VSCODE_NLS_LANGUAGE=${JSON.stringify(resolvedLanguage)};`
+ await fs.writeFile(nlsFile, content, "utf-8");
+
+ return nlsFile;
+}
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -26,6 +26,7 @@ import { URI } from 'vs/base/common/uri' @@ -25,6 +25,7 @@ import { URI } from '../../base/common/u
import { streamToBuffer } from 'vs/base/common/buffer'; import { streamToBuffer } from '../../base/common/buffer.js';
import { IProductConfiguration } from 'vs/base/common/product'; import { IProductConfiguration } from '../../base/common/product.js';
import { isString } from 'vs/base/common/types'; import { isString, Mutable } from '../../base/common/types.js';
+import { getLocaleFromConfig, getNLSConfiguration } from 'vs/server/node/remoteLanguagePacks'; +import { getLocaleFromConfig, getBrowserNLSConfiguration } from './remoteLanguagePacks.js';
import { CharCode } from 'vs/base/common/charCode'; import { CharCode } from '../../base/common/charCode.js';
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts'; import { IExtensionManifest } from '../../platform/extensions/common/extensions.js';
import { ICSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
@@ -299,6 +300,8 @@ export class WebClientServer { @@ -385,14 +386,22 @@ export class WebClientServer {
const base = relativeRoot(getOriginalUrl(req))
const vscodeBase = relativePath(getOriginalUrl(req))
+ const locale = this._environmentService.args.locale || await getLocaleFromConfig(this._environmentService.argvResource.fsPath);
+ const nlsConfiguration = await getNLSConfiguration(locale, this._environmentService.userDataPath)
const workbenchWebConfiguration = {
remoteAuthority,
@@ -336,6 +339,7 @@ export class WebClientServer {
WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : ''),
BASE: base,
VS_BASE: vscodeBase,
+ NLS_CONFIGURATION: asJSON(nlsConfiguration),
}; };
const cookies = cookie.parse(req.headers.cookie || '');
- const locale = cookies['vscode.nls.locale'] || req.headers['accept-language']?.split(',')[0]?.toLowerCase() || 'en';
+ const locale = this._environmentService.args.locale || await getLocaleFromConfig(this._environmentService.argvResource.fsPath) || cookies['vscode.nls.locale'] || req.headers['accept-language']?.split(',')[0]?.toLowerCase() || 'en';
let WORKBENCH_NLS_BASE_URL: string | undefined;
let WORKBENCH_NLS_URL: string;
if (!locale.startsWith('en') && this._productService.nlsCoreBaseUrl) {
WORKBENCH_NLS_BASE_URL = this._productService.nlsCoreBaseUrl;
WORKBENCH_NLS_URL = `${WORKBENCH_NLS_BASE_URL}${this._productService.commit}/${this._productService.version}/${locale}/nls.messages.js`;
} else {
- WORKBENCH_NLS_URL = ''; // fallback will apply
+ try {
+ const nlsFile = await getBrowserNLSConfiguration(locale, this._environmentService.userDataPath);
+ WORKBENCH_NLS_URL = nlsFile
+ ? `${vscodeBase}/vscode-remote-resource?path=${encodeURIComponent(nlsFile)}`
+ : '';
+ } catch (error) {
+ console.error("Failed to generate translations", error);
+ WORKBENCH_NLS_URL = '';
+ }
}
const values: { [key: string]: string } = {
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -15,6 +15,7 @@ export const serverOptions: OptionDescri @@ -22,6 +22,7 @@ export const serverOptions: OptionDescri
'disable-update-check': { type: 'boolean' },
'auth': { type: 'string' },
'disable-file-downloads': { type: 'boolean' }, 'disable-file-downloads': { type: 'boolean' },
'disable-file-uploads': { type: 'boolean' },
'disable-getting-started-override': { type: 'boolean' },
+ 'locale': { type: 'string' }, + 'locale': { type: 'string' },
/* ----- server setup ----- */ /* ----- server setup ----- */
@@ -96,6 +97,7 @@ export interface ServerParsedArgs { @@ -113,6 +114,7 @@ export interface ServerParsedArgs {
'disable-update-check'?: boolean;
'auth'?: string
'disable-file-downloads'?: boolean; 'disable-file-downloads'?: boolean;
'disable-file-uploads'?: boolean;
'disable-getting-started-override'?: boolean,
+ 'locale'?: string + 'locale'?: string
/* ----- server setup ----- */ /* ----- server setup ----- */
Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
@@ -123,8 +123,9 @@ import 'vs/workbench/contrib/logs/browse
// Explorer
import 'vs/workbench/contrib/files/browser/files.web.contribution';
-// Localization
-import 'vs/workbench/contrib/localization/browser/localization.contribution';
+// Localization. This does not actually import anything specific to Electron so
+// it should be safe.
+import 'vs/workbench/contrib/localization/electron-sandbox/localization.contribution';
// Performance
import 'vs/workbench/contrib/performance/browser/performance.web.contribution';
Index: code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts Index: code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts --- code-server.orig/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts
+++ code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts +++ code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts
@@ -4,10 +4,23 @@ @@ -5,18 +5,24 @@
*--------------------------------------------------------------------------------------------*/
import { ILanguagePackItem, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks'; import { CancellationTokenSource } from '../../../base/common/cancellation.js';
+import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc'; import { URI } from '../../../base/common/uri.js';
+import { ILanguagePackService } from 'vs/platform/languagePacks/common/languagePacks'; +import { ProxyChannel } from '../../../base/parts/ipc/common/ipc.js';
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IExtensionGalleryService } from '../../extensionManagement/common/extensionManagement.js';
+import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IExtensionResourceLoaderService } from '../../extensionResourceLoader/common/extensionResourceLoader.js';
-import { ILanguagePackItem, LanguagePackBaseService } from '../common/languagePacks.js';
+import { ILanguagePackItem, ILanguagePackService, LanguagePackBaseService } from '../common/languagePacks.js';
import { ILogService } from '../../log/common/log.js';
+import { IRemoteAgentService } from '../../../workbench/services/remote/common/remoteAgentService.js';
export class WebLanguagePacksService extends LanguagePackBaseService { export class WebLanguagePacksService extends LanguagePackBaseService {
- // Web doesn't have a concept of language packs, so we just return an empty array
+ private readonly languagePackService: ILanguagePackService; + private readonly languagePackService: ILanguagePackService;
+ +
+ constructor( constructor(
+ @IRemoteAgentService remoteAgentService: IRemoteAgentService, + @IRemoteAgentService remoteAgentService: IRemoteAgentService,
+ @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService @IExtensionResourceLoaderService private readonly extensionResourceLoaderService: IExtensionResourceLoaderService,
+ ) { @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService,
+ super(extensionGalleryService) @ILogService private readonly logService: ILogService
+ this.languagePackService = ProxyChannel.toService<ILanguagePackService>(remoteAgentService.getConnection()!.getChannel('languagePacks')); ) {
+ } super(extensionGalleryService);
+ + this.languagePackService = ProxyChannel.toService<ILanguagePackService>(remoteAgentService.getConnection()!.getChannel('languagePacks'))
}
async getBuiltInExtensionTranslationsUri(id: string, language: string): Promise<URI | undefined> {
@@ -72,6 +78,6 @@ export class WebLanguagePacksService ext
// Web doesn't have a concept of language packs, so we just return an empty array
getInstalledLanguages(): Promise<ILanguagePackItem[]> { getInstalledLanguages(): Promise<ILanguagePackItem[]> {
- return Promise.resolve([]); - return Promise.resolve([]);
+ return this.languagePackService.getInstalledLanguages() + return this.languagePackService.getInstalledLanguages()
} }
} }
Index: code-server/lib/vscode/src/vs/workbench/contrib/localization/electron-sandbox/localeService.ts Index: code-server/lib/vscode/src/vs/workbench/services/localization/electron-browser/localeService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/localization/electron-sandbox/localeService.ts --- code-server.orig/lib/vscode/src/vs/workbench/services/localization/electron-browser/localeService.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/localization/electron-sandbox/localeService.ts +++ code-server/lib/vscode/src/vs/workbench/services/localization/electron-browser/localeService.ts
@@ -41,7 +41,8 @@ export class NativeLocaleService impleme @@ -51,7 +51,8 @@ class NativeLocaleService implements ILo
@IProductService private readonly productService: IProductService @IProductService private readonly productService: IProductService
) { } ) { }
@ -304,7 +258,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/localization/electron-san
try { try {
const content = await this.textFileService.read(this.environmentService.argvResource, { encoding: 'utf8' }); const content = await this.textFileService.read(this.environmentService.argvResource, { encoding: 'utf8' });
@@ -68,9 +69,6 @@ export class NativeLocaleService impleme @@ -78,9 +79,6 @@ class NativeLocaleService implements ILo
} }
private async writeLocaleValue(locale: string | undefined): Promise<boolean> { private async writeLocaleValue(locale: string | undefined): Promise<boolean> {
@ -314,3 +268,83 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/localization/electron-san
await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true); await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true);
return true; return true;
} }
Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
@@ -475,9 +475,6 @@ export class InstallAction extends Exten
if (this.extension.isBuiltin) {
return;
}
- if (this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
- return;
- }
if (this.extension.state !== ExtensionState.Uninstalled) {
return;
}
@@ -782,7 +779,7 @@ export abstract class InstallInOtherServ
}
if (isLanguagePackExtension(this.extension.local.manifest)) {
- return true;
+ return false;
}
// Prefers to run on UI
@@ -2073,17 +2070,6 @@ export class SetLanguageAction extends E
update(): void {
this.enabled = false;
this.class = SetLanguageAction.DisabledClass;
- if (!this.extension) {
- return;
- }
- if (!this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
- return;
- }
- if (this.extension.gallery && language === getLocale(this.extension.gallery)) {
- return;
- }
- this.enabled = true;
- this.class = SetLanguageAction.EnabledClass;
}
override async run(): Promise<any> {
@@ -2100,7 +2086,6 @@ export class ClearLanguageAction extends
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
constructor(
- @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
@ILocaleService private readonly localeService: ILocaleService,
) {
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
@@ -2110,17 +2095,6 @@ export class ClearLanguageAction extends
update(): void {
this.enabled = false;
this.class = ClearLanguageAction.DisabledClass;
- if (!this.extension) {
- return;
- }
- if (!this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
- return;
- }
- if (this.extension.gallery && language !== getLocale(this.extension.gallery)) {
- return;
- }
- this.enabled = true;
- this.class = ClearLanguageAction.EnabledClass;
}
override async run(): Promise<any> {
Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.internal.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.internal.ts
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.internal.ts
@@ -54,7 +54,7 @@ import './services/dialogs/browser/fileD
import './services/host/browser/browserHostService.js';
import './services/lifecycle/browser/lifecycleService.js';
import './services/clipboard/browser/clipboardService.js';
-import './services/localization/browser/localeService.js';
+import './services/localization/electron-browser/localeService.js';
import './services/path/browser/pathService.js';
import './services/themes/browser/browserHostColorSchemeService.js';
import './services/encryption/browser/encryptionService.js';

View file

@ -1,24 +0,0 @@
Preserve process.execArgv
This ensures flags like `--prof` are passed down to the code-server process so
we can profile everything.
To test this:
1. run `./lib/node --prof .`
2. in another terminal, run `ps -ejww`
You should see `--prof` next to every code-server process.
Index: code-server/lib/vscode/src/vs/server/node/extensionHostConnection.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/extensionHostConnection.ts
+++ code-server/lib/vscode/src/vs/server/node/extensionHostConnection.ts
@@ -228,7 +228,7 @@ export class ExtensionHostConnection {
public async start(startParams: IRemoteExtensionHostStartParams): Promise<void> {
try {
- let execArgv: string[] = [];
+ let execArgv: string[] = process.execArgv ? process.execArgv.filter(a => !/^--inspect(-brk)?=/.test(a)) : [];
if (startParams.port && !(<any>process).pkg) {
execArgv = [`--inspect${startParams.break ? '-brk' : ''}=${startParams.port}`];
}

View file

@ -0,0 +1,356 @@
Add option to disable file downloads and uploads via cli
This patch adds support for a new CLI flag called `--disable-file-downloads`
which allows a user to remove the "Download..." option that shows up when you
right-click files in Code. It also disables the "Show Local" button on the dialog
for Save, Save-As and Save Workspace. The default value for this is `false`.
This patch also add support for a new CLI flag called `--disable-file-uploads`
which disables the drag to upload functionality and the "Upload..." option when you
right-click folders in Code. It also disables the "Show Local" button on the dialog
for opening a file. The default value for this is `false`.
This patch also adds trace log statements for when a file is read and written to disk.
To test disabling downloads, start code-server with `--disable-file-downloads`, open editor,
right-click on a file (not a folder) and you should **not** see the
"Download..." option. When saving a file or workspace, the "Show Local" button
should **not** appear on the dialog that comes on screen.
To test disabling uploads, start code-server with `--disable-file-uploads`, open editor,
right-click on a folder (not a file) and you should **not** see the
"Upload..." option. If you drag a file into the file navigator, the file should **not** upload
and appear in the file navigator. When opening a file, the "Show Local" button
should **not** appear on the dialog that comes on screen.
Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
@@ -303,6 +303,16 @@ export interface IWorkbenchConstructionO
*/
readonly userDataPath?: string
+ /**
+ * Whether the "Download..." option is enabled for files.
+ */
+ readonly isEnabledFileDownloads?: boolean
+
+ /**
+ * Whether the "Upload..." button is enabled.
+ */
+ readonly isEnabledFileUploads?: boolean
+
//#endregion
//#region Profile options
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -34,6 +34,16 @@ export interface IBrowserWorkbenchEnviro
readonly options?: IWorkbenchConstructionOptions;
/**
+ * Enable downloading files via menu actions.
+ */
+ readonly isEnabledFileDownloads?: boolean;
+
+ /**
+ * Enable uploading files via menu actions.
+ */
+ readonly isEnabledFileUploads?: boolean;
+
+ /**
* Gets whether a resolver extension is expected for the environment.
*/
readonly expectsResolverExtension: boolean;
@@ -111,6 +121,20 @@ export class BrowserWorkbenchEnvironment
return this.options.userDataPath;
}
+ get isEnabledFileDownloads(): boolean {
+ if (typeof this.options.isEnabledFileDownloads === "undefined") {
+ throw new Error('isEnabledFileDownloads was not provided to the browser');
+ }
+ return this.options.isEnabledFileDownloads;
+ }
+
+ get isEnabledFileUploads(): boolean {
+ if (typeof this.options.isEnabledFileUploads === "undefined") {
+ throw new Error('isEnabledFileUploads was not provided to the browser');
+ }
+ return this.options.isEnabledFileUploads;
+ }
+
@memoize
get argvResource(): URI { return joinPath(this.userRoamingDataHome, 'argv.json'); }
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -19,6 +19,8 @@ export const serverOptions: OptionDescri
/* ----- code-server ----- */
'disable-update-check': { type: 'boolean' },
'auth': { type: 'string' },
+ 'disable-file-downloads': { type: 'boolean' },
+ 'disable-file-uploads': { type: 'boolean' },
/* ----- server setup ----- */
@@ -107,6 +109,8 @@ export interface ServerParsedArgs {
/* ----- code-server ----- */
'disable-update-check'?: boolean;
'auth'?: string;
+ 'disable-file-downloads'?: boolean;
+ 'disable-file-uploads'?: boolean;
/* ----- server setup ----- */
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -369,6 +369,8 @@ export class WebClientServer {
serverBasePath: basePath,
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
userDataPath: this._environmentService.userDataPath,
+ isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
+ isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'],
_wrapWebWorkerExtHostInIframe,
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
@@ -6,10 +6,10 @@
import { Disposable } from '../../base/common/lifecycle.js';
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext } from '../common/contextkeys.js';
+import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsEnabledFileDownloads, IsEnabledFileUploads } from '../common/contextkeys.js';
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
-import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.js';
+import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from '../../platform/workspace/common/workspace.js';
import { IWorkbenchLayoutService, Parts, positionToString } from '../services/layout/browser/layoutService.js';
import { getRemoteName } from '../../platform/remote/common/remoteHosts.js';
@@ -69,7 +69,7 @@ export class WorkbenchContextKeysHandler
@IContextKeyService private readonly contextKeyService: IContextKeyService,
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
@IConfigurationService private readonly configurationService: IConfigurationService,
- @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
+ @IBrowserWorkbenchEnvironmentService private readonly environmentService: IBrowserWorkbenchEnvironmentService,
@IProductService private readonly productService: IProductService,
@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
@IEditorService private readonly editorService: IEditorService,
@@ -199,6 +199,10 @@ export class WorkbenchContextKeysHandler
this.auxiliaryBarMaximizedContext = AuxiliaryBarMaximizedContext.bindTo(this.contextKeyService);
this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized());
+ // code-server
+ IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
+ IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true)
+
this.registerListeners();
}
Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
@@ -20,7 +20,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
import { AutoSaveAfterShortDelayContext } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
import { WorkbenchListDoubleSelection } from '../../../../platform/list/browser/listService.js';
import { Schemas } from '../../../../base/common/network.js';
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
import { ThemeIcon } from '../../../../base/common/themables.js';
@@ -571,13 +571,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
id: DOWNLOAD_COMMAND_ID,
title: DOWNLOAD_LABEL
},
- when: ContextKeyExpr.or(
- // native: for any remote resource
- ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.notEqualsTo(Schemas.file)),
- // web: for any files
- ContextKeyExpr.and(IsWebContext, ExplorerFolderContext.toNegated(), ExplorerRootContext.toNegated()),
- // web: for any folders if file system API support is provided
- ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)
+ when: ContextKeyExpr.and(
+ IsEnabledFileDownloads,
+ ContextKeyExpr.or(
+ // native: for any remote resource
+ ContextKeyExpr.and(IsWebContext.toNegated(), ResourceContextKey.Scheme.notEqualsTo(Schemas.file)),
+ // web: for any files
+ ContextKeyExpr.and(IsWebContext, ExplorerFolderContext.toNegated(), ExplorerRootContext.toNegated()),
+ // web: for any folders if file system API support is provided
+ ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)
+ )
)
}));
@@ -589,6 +592,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
title: UPLOAD_LABEL,
},
when: ContextKeyExpr.and(
+ IsEnabledFileUploads,
// only in web
IsWebContext,
// only on folders
Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
@@ -39,6 +39,9 @@ export const EmbedderIdentifierContext =
export const InAutomationContext = new RawContextKey<boolean>('inAutomation', false, localize('inAutomation', "Whether VS Code is running under automation/smoke test"));
+export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
+export const IsEnabledFileUploads = new RawContextKey<boolean>('isEnabledFileUploads', true, true);
+
//#endregion
//#region < --- Window --- >
Index: code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
+++ code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
@@ -18,7 +18,7 @@ import { IModelService } from '../../../
import { ILanguageService } from '../../../../editor/common/languages/language.js';
import { getIconClasses } from '../../../../editor/common/services/getIconClasses.js';
import { Schemas } from '../../../../base/common/network.js';
-import { IWorkbenchEnvironmentService } from '../../environment/common/environmentService.js';
+import { IBrowserWorkbenchEnvironmentService } from '../../environment/browser/environmentService.js';
import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';
import { IContextKeyService, IContextKey, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
import { equalsIgnoreCase, format, startsWithIgnoreCase } from '../../../../base/common/strings.js';
@@ -144,7 +144,7 @@ export class SimpleFileDialog extends Di
@IFileDialogService private readonly fileDialogService: IFileDialogService,
@IModelService private readonly modelService: IModelService,
@ILanguageService private readonly languageService: ILanguageService,
- @IWorkbenchEnvironmentService protected readonly environmentService: IWorkbenchEnvironmentService,
+ @IBrowserWorkbenchEnvironmentService protected readonly environmentService: IBrowserWorkbenchEnvironmentService,
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService,
@IPathService protected readonly pathService: IPathService,
@IKeybindingService private readonly keybindingService: IKeybindingService,
@@ -311,20 +311,22 @@ export class SimpleFileDialog extends Di
this.filePickBox.placeholder = nls.localize('remoteFileDialog.placeholder', "Folder path");
this.filePickBox.ok = true;
this.filePickBox.okLabel = typeof this.options.openLabel === 'string' ? this.options.openLabel : this.options.openLabel?.withoutMnemonic;
- if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
- this.filePickBox.customButton = true;
- this.filePickBox.customLabel = nls.localize('remoteFileDialog.local', 'Show Local');
- let action;
- if (isSave) {
- action = SaveLocalFileCommand;
- } else {
- action = this.allowFileSelection ? (this.allowFolderSelection ? OpenLocalFileFolderCommand : OpenLocalFileCommand) : OpenLocalFolderCommand;
- }
- const keybinding = this.keybindingService.lookupKeybinding(action.ID);
- if (keybinding) {
- const label = keybinding.getLabel();
- if (label) {
- this.filePickBox.customHover = format('{0} ({1})', action.LABEL, label);
+ if ((isSave && this.environmentService.isEnabledFileDownloads) || (!isSave && this.environmentService.isEnabledFileUploads)) {
+ if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
+ this.filePickBox.customButton = true;
+ this.filePickBox.customLabel = nls.localize('remoteFileDialog.local', 'Show Local');
+ let action;
+ if (isSave) {
+ action = SaveLocalFileCommand;
+ } else {
+ action = this.allowFileSelection ? (this.allowFolderSelection ? OpenLocalFileFolderCommand : OpenLocalFileCommand) : OpenLocalFolderCommand;
+ }
+ const keybinding = this.keybindingService.lookupKeybinding(action.ID);
+ if (keybinding) {
+ const label = keybinding.getLabel();
+ if (label) {
+ this.filePickBox.customHover = format('{0} ({1})', action.LABEL, label);
+ }
}
}
}
Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
@@ -65,6 +65,7 @@ import { timeout } from '../../../../../
import { IFilesConfigurationService } from '../../../../services/filesConfiguration/common/filesConfigurationService.js';
import { mainWindow } from '../../../../../base/browser/window.js';
import { IExplorerFileContribution, explorerFileContribRegistry } from '../explorerFileContrib.js';
+import { IBrowserWorkbenchEnvironmentService } from '../../../../services/environment/browser/environmentService.js';
import { WorkbenchCompressibleAsyncDataTree } from '../../../../../platform/list/browser/listService.js';
import { ISearchService, QueryType, getExcludes, ISearchConfiguration, ISearchComplete, IFileQuery } from '../../../../services/search/common/search.js';
import { CancellationToken } from '../../../../../base/common/cancellation.js';
@@ -1594,7 +1595,8 @@ export class FileDragAndDrop implements
@IConfigurationService private configurationService: IConfigurationService,
@IInstantiationService private instantiationService: IInstantiationService,
@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
- @IUriIdentityService private readonly uriIdentityService: IUriIdentityService
+ @IUriIdentityService private readonly uriIdentityService: IUriIdentityService,
+ @IBrowserWorkbenchEnvironmentService protected readonly environmentService: IBrowserWorkbenchEnvironmentService
) {
const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => {
if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) {
@@ -1819,15 +1821,17 @@ export class FileDragAndDrop implements
// External file DND (Import/Upload file)
if (data instanceof NativeDragAndDropData) {
- // Use local file import when supported
- if (!isWeb || (isTemporaryWorkspace(this.contextService.getWorkspace()) && WebFileSystemAccess.supported(mainWindow))) {
- const fileImport = this.instantiationService.createInstance(ExternalFileImport);
- await fileImport.import(resolvedTarget, originalEvent, mainWindow);
- }
- // Otherwise fallback to browser based file upload
- else {
- const browserUpload = this.instantiationService.createInstance(BrowserFileUpload);
- await browserUpload.upload(target, originalEvent);
+ if (this.environmentService.isEnabledFileUploads) {
+ // Use local file import when supported
+ if (!isWeb || (isTemporaryWorkspace(this.contextService.getWorkspace()) && WebFileSystemAccess.supported(mainWindow))) {
+ const fileImport = this.instantiationService.createInstance(ExternalFileImport);
+ await fileImport.import(resolvedTarget, originalEvent, mainWindow);
+ }
+ // Otherwise fallback to browser based file upload
+ else {
+ const browserUpload = this.instantiationService.createInstance(BrowserFileUpload);
+ await browserUpload.upload(target, originalEvent);
+ }
}
}
Index: code-server/lib/vscode/src/vs/platform/files/node/diskFileSystemProviderServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/files/node/diskFileSystemProviderServer.ts
+++ code-server/lib/vscode/src/vs/platform/files/node/diskFileSystemProviderServer.ts
@@ -99,6 +99,7 @@ export abstract class AbstractDiskFileSy
private async readFile(uriTransformer: IURITransformer, _resource: UriComponents, opts?: IFileAtomicReadOptions): Promise<VSBuffer> {
const resource = this.transformIncoming(uriTransformer, _resource, true);
+ this.logService.trace(`File action: readFile ${resource.path}`);
const buffer = await this.provider.readFile(resource, opts);
return VSBuffer.wrap(buffer);
@@ -117,6 +118,7 @@ export abstract class AbstractDiskFileSy
}
});
+ this.logService.trace(`File action: readFileStream ${resource.path}`);
const fileStream = this.provider.readFileStream(resource, opts, cts.token);
listenStream(fileStream, {
onData: chunk => emitter.fire(VSBuffer.wrap(chunk)),
@@ -137,7 +139,7 @@ export abstract class AbstractDiskFileSy
private writeFile(uriTransformer: IURITransformer, _resource: UriComponents, content: VSBuffer, opts: IFileWriteOptions): Promise<void> {
const resource = this.transformIncoming(uriTransformer, _resource);
-
+ this.logService.trace(`File action: writeFile ${resource.path}`);
return this.provider.writeFile(resource, content.buffer, opts);
}

View file

@ -10,16 +10,25 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts --- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
@@ -62,7 +62,7 @@ import { GettingStartedIndexList } from @@ -3,7 +3,7 @@
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; * Licensed under the MIT License. See License.txt in the project root for license information.
import { KeyCode } from 'vs/base/common/keyCodes'; *--------------------------------------------------------------------------------------------*/
import { getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
-import { WorkbenchStateContext } from 'vs/workbench/common/contextkeys'; -import { $, Dimension, addDisposableListener, append, clearNode, reset } from '../../../../base/browser/dom.js';
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from 'vs/workbench/common/contextkeys'; +import { $, Dimension, addDisposableListener, append, clearNode, reset, prepend } from '../../../../base/browser/dom.js';
import { OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions'; import { renderFormattedText } from '../../../../base/browser/formattedTextRenderer.js';
import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions'; import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';
import { Toggle } from 'vs/base/browser/ui/toggle/toggle'; import { Button } from '../../../../base/browser/ui/button/button.js';
@@ -758,6 +758,72 @@ export class GettingStartedPage extends @@ -53,7 +53,7 @@ import { IRecentFolder, IRecentWorkspace
import { OpenRecentAction } from '../../../browser/actions/windowActions.js';
import { OpenFileFolderAction, OpenFolderAction, OpenFolderViaWorkspaceAction } from '../../../browser/actions/workspaceActions.js';
import { EditorPane } from '../../../browser/parts/editor/editorPane.js';
-import { WorkbenchStateContext } from '../../../common/contextkeys.js';
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from '../../../common/contextkeys.js';
import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js';
import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js';
import './gettingStartedColors.js';
@@ -916,6 +916,72 @@ export class GettingStartedPage extends
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved")) $('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
); );
@ -55,7 +64,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
+ 'font-size: 13px', + 'font-size: 13px',
+ 'color: #dcdee2', + 'color: #dcdee2',
+ ].join(';'), + ].join(';'),
+ }, 'Provision remote development environments on your infrastructure with Coder.'), + }, 'Provision software development environments on your infrastructure with Coder.'),
+ $('p', { + $('p', {
+ style: [ + style: [
+ 'margin-top: 8px', + 'margin-top: 8px',
@ -72,7 +81,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
+ 'align-items: center', + 'align-items: center',
+ ].join(';'), + ].join(';'),
+ }, 'Get started ', $('span', { + }, 'Get started ', $('span', {
+ class: Codicon.arrowRight.classNames, + class: ThemeIcon.asClassName(Codicon.arrowRight),
+ style: [ + style: [
+ 'color: white', + 'color: white',
+ 'margin-left: 8px', + 'margin-left: 8px',
@ -87,38 +96,21 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
+ ), + ),
+ ), + ),
+ ); + );
+ } + }
+ +
const leftColumn = $('.categories-column.categories-column-left', {},); const leftColumn = $('.categories-column.categories-column-left', {},);
const rightColumn = $('.categories-column.categories-column-right', {},); const rightColumn = $('.categories-column.categories-column-right', {},);
@@ -775,13 +841,23 @@ export class GettingStartedPage extends
const layoutLists = () => { @@ -951,6 +1017,9 @@ export class GettingStartedPage extends
if (gettingStartedList.itemCount) {
this.container.classList.remove('noWalkthroughs');
- reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
- reset(rightColumn, gettingStartedList.getDomElement());
+ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) {
+ reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), gettingStartedList.getDomElement());
+ reset(rightColumn, gettingStartedCoder);
+ } else {
+ reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
+ reset(rightColumn, gettingStartedList.getDomElement());
+ }
+
recentList.setLimit(5); recentList.setLimit(5);
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
} }
else { + if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) {
this.container.classList.add('noWalkthroughs'); + prepend(rightColumn, gettingStartedCoder)
- reset(leftColumn, startList.getDomElement()); + }
+ if (this.contextService.contextMatchesRules(IsEnabledCoderGettingStarted)) { };
+ reset(leftColumn, startList.getDomElement(), gettingStartedCoder);
+ } else { gettingStartedList.onDidChange(layoutLists);
+ reset(leftColumn, startList.getDomElement());
+ }
reset(rightColumn, recentList.getDomElement());
recentList.setLimit(10);
}
Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css --- code-server.orig/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css
@ -131,21 +123,21 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
+ margin-bottom: 0.2em; + margin-bottom: 0.2em;
+} +}
+ +
+.monaco-workbench .part.editor>.content .gettingStartedContainer .coder-coder { +.monaco-workbench .part.editor > .content .gettingStartedContainer .coder-coder {
+ font-size: 1em; + font-size: 1em;
+ margin-top: 0.2em; + margin-top: 0.2em;
+} +}
+ +
.monaco-workbench.hc-black .part.editor>.content .gettingStartedContainer .subtitle, .monaco-workbench.hc-black .part.editor > .content .gettingStartedContainer .subtitle,
.monaco-workbench.hc-light .part.editor>.content .gettingStartedContainer .subtitle { .monaco-workbench.hc-light .part.editor > .content .gettingStartedContainer .subtitle {
font-weight: 200; font-weight: 200;
Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
@@ -276,6 +276,11 @@ export interface IWorkbenchConstructionO @@ -313,6 +313,11 @@ export interface IWorkbenchConstructionO
*/ */
readonly isEnabledFileDownloads?: boolean readonly isEnabledFileUploads?: boolean
+ /** + /**
+ * Whether to use Coder's custom Getting Started text. + * Whether to use Coder's custom Getting Started text.
@ -154,25 +146,25 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
+ +
//#endregion //#endregion
//#region Profile options
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -36,6 +36,11 @@ export interface IBrowserWorkbenchEnviro @@ -44,6 +44,11 @@ export interface IBrowserWorkbenchEnviro
* Enable downloading files via menu actions. readonly isEnabledFileUploads?: boolean;
*/
readonly isEnabledFileDownloads?: boolean; /**
+
+ /**
+ * Enable Coder's custom getting started text. + * Enable Coder's custom getting started text.
+ */ + */
+ readonly isEnabledCoderGettingStarted?: boolean; + readonly isEnabledCoderGettingStarted?: boolean;
} +
+ /**
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { * Gets whether a resolver extension is expected for the environment.
@@ -74,6 +79,13 @@ export class BrowserWorkbenchEnvironment */
return this.options.isEnabledFileDownloads; readonly expectsResolverExtension: boolean;
@@ -135,6 +140,13 @@ export class BrowserWorkbenchEnvironment
return this.options.isEnabledFileUploads;
} }
+ get isEnabledCoderGettingStarted(): boolean { + get isEnabledCoderGettingStarted(): boolean {
@ -189,19 +181,19 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -16,6 +16,7 @@ export const serverOptions: OptionDescri @@ -21,6 +21,7 @@ export const serverOptions: OptionDescri
'auth': { type: 'string' }, 'auth': { type: 'string' },
'disable-file-downloads': { type: 'boolean' }, 'disable-file-downloads': { type: 'boolean' },
'locale': { type: 'string' }, 'disable-file-uploads': { type: 'boolean' },
+ 'disable-getting-started-override': { type: 'boolean' }, + 'disable-getting-started-override': { type: 'boolean' },
/* ----- server setup ----- */ /* ----- server setup ----- */
@@ -98,6 +99,7 @@ export interface ServerParsedArgs { @@ -111,6 +112,7 @@ export interface ServerParsedArgs {
'auth'?: string 'auth'?: string;
'disable-file-downloads'?: boolean; 'disable-file-downloads'?: boolean;
'locale'?: string 'disable-file-uploads'?: boolean;
+ 'disable-getting-started-override'?: boolean; + 'disable-getting-started-override'?: boolean,
/* ----- server setup ----- */ /* ----- server setup ----- */
@ -209,10 +201,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -308,6 +308,7 @@ export class WebClientServer { @@ -373,6 +373,7 @@ export class WebClientServer {
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
userDataPath: this._environmentService.userDataPath, userDataPath: this._environmentService.userDataPath,
isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'], isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'],
+ isEnabledCoderGettingStarted: !this._environmentService.args['disable-getting-started-override'], + isEnabledCoderGettingStarted: !this._environmentService.args['disable-getting-started-override'],
_wrapWebWorkerExtHostInIframe, _wrapWebWorkerExtHostInIframe,
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() }, developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
@ -221,19 +213,19 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
@@ -7,7 +7,7 @@ import { Event } from 'vs/base/common/ev @@ -6,7 +6,7 @@
import { Disposable } from 'vs/base/common/lifecycle'; import { Disposable } from '../../base/common/lifecycle.js';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from 'vs/platform/contextkey/common/contextkeys'; import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
-import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; -import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsEnabledFileDownloads, IsEnabledFileUploads } from '../common/contextkeys.js';
+import { SplitEditorsVertically, InEditorZenModeContext, ActiveEditorCanRevertContext, ActiveEditorGroupLockedContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, ActiveEditorContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, EditorTabsVisibleContext, IsCenteredLayoutContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorReadonlyContext, EditorAreaVisibleContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, IsEnabledFileDownloads, IsEnabledCoderGettingStarted } from 'vs/workbench/common/contextkeys'; +import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, } from '../common/contextkeys.js';
import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor'; import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom'; import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
@@ -204,6 +204,7 @@ export class WorkbenchContextKeysHandler @@ -202,6 +202,7 @@ export class WorkbenchContextKeysHandler
// code-server // code-server
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true) IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true)
+ IsEnabledCoderGettingStarted.bindTo(this.contextKeyService).set(this.environmentService.isEnabledCoderGettingStarted ?? true) + IsEnabledCoderGettingStarted.bindTo(this.contextKeyService).set(this.environmentService.isEnabledCoderGettingStarted ?? true)
this.registerListeners(); this.registerListeners();
@ -242,10 +234,10 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts --- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts +++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
@@ -33,6 +33,7 @@ export const IsFullscreenContext = new R @@ -41,6 +41,7 @@ export const InAutomationContext = new R
export const HasWebFileSystemAccess = new RawContextKey<boolean>('hasWebFileSystemAccess', false, true); // Support for FileSystemAccess web APIs (https://wicg.github.io/file-system-access)
export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true); export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
export const IsEnabledFileUploads = new RawContextKey<boolean>('isEnabledFileUploads', true, true);
+export const IsEnabledCoderGettingStarted = new RawContextKey<boolean>('isEnabledCoderGettingStarted', true, true); +export const IsEnabledCoderGettingStarted = new RawContextKey<boolean>('isEnabledCoderGettingStarted', true, true);
//#endregion //#endregion

View file

@ -1,106 +0,0 @@
Add the ability to provide a GitHub token
To test install the GitHub PR extension and start code-server with GITHUB_TOKEN
or set github-auth in the config file. The extension should be authenticated.
Index: code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
+++ code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
@@ -5,9 +5,18 @@
import { InMemoryCredentialsProvider } from 'vs/platform/credentials/common/credentials';
import { ILogService } from 'vs/platform/log/common/log';
-import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
+import { IServerEnvironmentService } from 'vs/server/node/serverEnvironmentService';
import { IProductService } from 'vs/platform/product/common/productService';
import { BaseCredentialsMainService, KeytarModule } from 'vs/platform/credentials/common/credentialsMainService';
+import { generateUuid } from 'vs/base/common/uuid';
+import { equals as arrayEquals } from 'vs/base/common/arrays';
+
+interface IToken {
+ accessToken: string
+ account?: { label: string }
+ id: string
+ scopes: string[]
+}
export class CredentialsWebMainService extends BaseCredentialsMainService {
// Since we fallback to the in-memory credentials provider, we do not need to surface any Keytar load errors
@@ -16,10 +25,15 @@ export class CredentialsWebMainService e
constructor(
@ILogService logService: ILogService,
- @INativeEnvironmentService private readonly environmentMainService: INativeEnvironmentService,
+ @IServerEnvironmentService private readonly environmentMainService: IServerEnvironmentService,
@IProductService private readonly productService: IProductService,
) {
super(logService);
+ if (this.environmentMainService.args["github-auth"]) {
+ this.storeGitHubToken(this.environmentMainService.args["github-auth"]).catch((error) => {
+ this.logService.error('Failed to store provided GitHub token', error)
+ })
+ }
}
// If the credentials service is running on the server, we add a suffix -server to differentiate from the location that the
@@ -48,4 +62,59 @@ export class CredentialsWebMainService e
}
return this._keytarCache;
}
+
+ private async storeGitHubToken(githubToken: string): Promise<void> {
+ const extensionId = 'vscode.github-authentication';
+ const service = `${await this.getSecretStoragePrefix()}${extensionId}`;
+ const account = 'github.auth';
+ const scopes = [['read:user', 'user:email', 'repo']]
+
+ // Oddly the scopes need to match exactly so we cannot just have one token
+ // with all the scopes, instead we have to duplicate the token for each
+ // expected set of scopes.
+ const tokens: IToken[] = scopes.map((scopes) => ({
+ id: generateUuid(),
+ scopes: scopes.sort(), // Sort for comparing later.
+ accessToken: githubToken,
+ }));
+
+ const raw = await this.getPassword(service, account)
+
+ let existing: {
+ content: IToken[]
+ } | undefined;
+
+ if (raw) {
+ try {
+ const json = JSON.parse(raw);
+ json.content = JSON.parse(json.content);
+ existing = json;
+ } catch (error) {
+ this.logService.error('Failed to parse existing GitHub credentials', error)
+ }
+ }
+
+ // Keep tokens for account and scope combinations we do not have in case
+ // there is an extension that uses scopes we have not accounted for (in
+ // these cases the user will need to manually authenticate the extension
+ // through the UI) or the user has tokens for other accounts.
+ if (existing?.content) {
+ existing.content = existing.content.filter((existingToken) => {
+ const scopes = existingToken.scopes.sort();
+ return !(tokens.find((token) => {
+ return arrayEquals(scopes, token.scopes)
+ && token.account?.label === existingToken.account?.label;
+ }))
+ })
+ }
+
+ return this.setPassword(service, account, JSON.stringify({
+ extensionId,
+ ...(existing || {}),
+ content: JSON.stringify([
+ ...tokens,
+ ...(existing?.content || []),
+ ])
+ }));
+ }
}

View file

@ -17,9 +17,9 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/client.ts +++ code-server/lib/vscode/src/vs/workbench/browser/client.ts
@@ -1,7 +1,10 @@ @@ -1,7 +1,10 @@
import { Disposable } from 'vs/base/common/lifecycle'; import { Disposable } from "../../base/common/lifecycle.js";
+import { localize } from 'vs/nls'; +import { localize } from '../../nls.js';
+import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; +import { INotificationService, Severity } from '../../platform/notification/common/notification.js';
export class CodeServerClient extends Disposable { export class CodeServerClient extends Disposable {
constructor ( constructor (

View file

@ -3,26 +3,28 @@ Prepare Code for integration with code-server
1. We already have the arguments so allow passing them in. There is also a 1. We already have the arguments so allow passing them in. There is also a
slight change in a few directories to preserve the directory structure we slight change in a few directories to preserve the directory structure we
have been using and to not override passed-in arguments. have been using and to not override passed-in arguments.
2. Modify the terminal environment to filter out code-server environment variables. 2. Modify the entry point to allow importing the code, instead of just running
3. Add the code-server version to the help dialog. the server immediately.
4. Add ready events for use in an iframe. 3. Modify the terminal environment to filter out code-server environment variables.
5. Add our icons. 4. Add the code-server version to the help dialog.
6. Use our own manifest. 5. Add ready events for use in an iframe.
6. Add our icons and remove the existing ones.
7. Use our own manifest.
Index: code-server/lib/vscode/src/vs/server/node/server.main.ts Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/server.main.ts --- code-server.orig/lib/vscode/src/vs/server/node/server.main.ts
+++ code-server/lib/vscode/src/vs/server/node/server.main.ts +++ code-server/lib/vscode/src/vs/server/node/server.main.ts
@@ -12,7 +12,7 @@ import { createServer as doCreateServer, @@ -12,7 +12,7 @@ import { createServer as doCreateServer,
import { parseArgs, ErrorReporter } from 'vs/platform/environment/node/argv'; import { parseArgs, ErrorReporter } from '../../platform/environment/node/argv.js';
import { join, dirname } from 'vs/base/common/path'; import { join, dirname } from '../../base/common/path.js';
import { performance } from 'perf_hooks'; import { performance } from 'perf_hooks';
-import { serverOptions } from 'vs/server/node/serverEnvironmentService'; -import { serverOptions } from './serverEnvironmentService.js';
+import { serverOptions, ServerParsedArgs } from 'vs/server/node/serverEnvironmentService'; +import { serverOptions, ServerParsedArgs } from './serverEnvironmentService.js';
import product from 'vs/platform/product/common/product'; import product from '../../platform/product/common/product.js';
import * as perf from 'vs/base/common/performance'; import * as perf from '../../base/common/performance.js';
@@ -34,38 +34,43 @@ const errorReporter: ErrorReporter = { @@ -34,38 +34,47 @@ const errorReporter: ErrorReporter = {
} }
}; };
@ -38,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
-const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History'); -const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History');
-const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine'); -const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine');
-args['user-data-dir'] = USER_DATA_PATH; -args['user-data-dir'] = USER_DATA_PATH;
-const APP_ROOT = dirname(FileAccess.asFileUri('', require).fsPath); -const APP_ROOT = dirname(FileAccess.asFileUri('').fsPath);
-const BUILTIN_EXTENSIONS_FOLDER_PATH = join(APP_ROOT, 'extensions'); -const BUILTIN_EXTENSIONS_FOLDER_PATH = join(APP_ROOT, 'extensions');
-args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH; -args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH;
-args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions'); -args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions');
@ -58,7 +60,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
+ const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History'); + const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History');
+ const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine'); + const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine');
+ args['user-data-dir'] = USER_DATA_PATH; + args['user-data-dir'] = USER_DATA_PATH;
+ const APP_ROOT = dirname(FileAccess.asFileUri('', require).fsPath); + const APP_ROOT = dirname(FileAccess.asFileUri('').fsPath);
+ const BUILTIN_EXTENSIONS_FOLDER_PATH = args['builtin-extensions-dir'] || join(APP_ROOT, 'extensions'); + const BUILTIN_EXTENSIONS_FOLDER_PATH = args['builtin-extensions-dir'] || join(APP_ROOT, 'extensions');
+ args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH; + args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH;
+ args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions'); + args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions');
@ -78,7 +80,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
*/ */
-export function spawnCli() { -export function spawnCli() {
- runCli(args, REMOTE_DATA_FOLDER, serverOptions); - runCli(args, REMOTE_DATA_FOLDER, serverOptions);
+export function spawnCli(args = parse()): Promise<void> { +function spawnCli(args = parse()): Promise<void> {
+ return runCli(args, createDirs(args), serverOptions); + return runCli(args, createDirs(args), serverOptions);
} }
@ -87,15 +89,19 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
*/ */
-export function createServer(address: string | net.AddressInfo | null): Promise<IServerAPI> { -export function createServer(address: string | net.AddressInfo | null): Promise<IServerAPI> {
- return doCreateServer(address, args, REMOTE_DATA_FOLDER); - return doCreateServer(address, args, REMOTE_DATA_FOLDER);
+export function createServer(address: string | net.AddressInfo | null, args = parse()): Promise<IServerAPI> { +function createServer(address: string | net.AddressInfo | null, args = parse()): Promise<IServerAPI> {
+ return doCreateServer(address, args, createDirs(args)); + return doCreateServer(address, args, createDirs(args));
} }
+
+// The aliases prevent the names getting mangled during minification which would
+// make it difficult to import.
+export { spawnCli as spawnCli, createServer as createServer };
Index: code-server/lib/vscode/src/vs/base/common/processes.ts Index: code-server/lib/vscode/src/vs/base/common/processes.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/processes.ts --- code-server.orig/lib/vscode/src/vs/base/common/processes.ts
+++ code-server/lib/vscode/src/vs/base/common/processes.ts +++ code-server/lib/vscode/src/vs/base/common/processes.ts
@@ -111,6 +111,8 @@ export function sanitizeProcessEnvironme @@ -111,6 +111,8 @@ export function sanitizeProcessEnvironme
/^VSCODE_(?!SHELL_LOGIN).+$/, /^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,
/^SNAP(|_.*)$/, /^SNAP(|_.*)$/,
/^GDK_PIXBUF_.+$/, /^GDK_PIXBUF_.+$/,
+ /^CODE_SERVER_.+$/, + /^CODE_SERVER_.+$/,
@ -103,30 +109,12 @@ Index: code-server/lib/vscode/src/vs/base/common/processes.ts
]; ];
const envKeys = Object.keys(env); const envKeys = Object.keys(env);
envKeys envKeys
Index: code-server/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
@@ -143,8 +143,11 @@ export class BrowserDialogHandler implem
async about(): Promise<void> {
const detailString = (useAgo: boolean): string => {
- return localize('aboutDetail',
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
+ return localize('aboutCodeServerDetail',
+ "code-server: {0}",
+ this.productService.codeServerVersion ? `v${this.productService.codeServerVersion}` : 'Unknown'
+ ) + '\n' + localize('aboutDetail',
+ "Code: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
this.productService.version || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ code-server/lib/vscode/src/vs/workbench/browser/client.ts +++ code-server/lib/vscode/src/vs/workbench/browser/client.ts
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
+import { Disposable } from 'vs/base/common/lifecycle'; +import { Disposable } from "../../base/common/lifecycle.js";
+ +
+export class CodeServerClient extends Disposable { +export class CodeServerClient extends Disposable {
+ constructor ( + constructor (
@ -176,15 +164,15 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
@@ -69,6 +69,7 @@ import { IndexedDB } from 'vs/base/brows @@ -64,6 +64,7 @@ import { IOpenerService } from '../../pl
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService'; import { mixin, safeStringify } from '../../base/common/objects.js';
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService'; import { IndexedDB } from '../../base/browser/indexedDB.js';
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess'; import { WebFileSystemAccess } from '../../platform/files/browser/webFileSystemAccess.js';
+import { CodeServerClient } from 'vs/workbench/browser/client'; +import { CodeServerClient } from '../../workbench/browser/client.js';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from '../../platform/progress/common/progress.js';
import { IProgressService } from 'vs/platform/progress/common/progress'; import { DelayedLogChannel } from '../services/output/common/delayedLogChannel.js';
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel'; import { dirname, joinPath } from '../../base/common/resources.js';
@@ -116,6 +117,9 @@ export class BrowserMain extends Disposa @@ -133,6 +134,9 @@ export class BrowserMain extends Disposa
// Startup // Startup
const instantiationService = workbench.startup(); const instantiationService = workbench.startup();
@ -198,7 +186,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
+++ code-server/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts
@@ -31,6 +31,8 @@ export type ExtensionVirtualWorkspaceSup @@ -65,6 +65,8 @@ export type ExtensionVirtualWorkspaceSup
}; };
export interface IProductConfiguration { export interface IProductConfiguration {
@ -221,19 +209,18 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
<!-- Disable pinch zooming --> <!-- Disable pinch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
@@ -26,9 +27,9 @@ @@ -26,8 +27,9 @@
<meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}"> <meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">
<!-- Workbench Icon/Manifest/CSS --> <!-- Workbench Icon/Manifest/CSS -->
- <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" /> - <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
- <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/manifest.json" crossorigin="use-credentials" /> - <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/manifest.json" crossorigin="use-credentials" />
-
+ <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" /> + <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" />
+ <link rel="alternate icon" href="/_static/src/browser/media/favicon.ico" type="image/x-icon" /> + <link rel="alternate icon" href="/_static/src/browser/media/favicon.ico" type="image/x-icon" />
+ <link rel="manifest" href="/manifest.json" crossorigin="use-credentials" /> + <link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
</head> <style id="vscode-css-modules" type="text/css" media="screen"></style>
<body aria-label=""> </head>
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
@ -257,18 +244,81 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
+ <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" /> + <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" />
+ <link rel="alternate icon" href="/_static/src/browser/media/favicon.ico" type="image/x-icon" /> + <link rel="alternate icon" href="/_static/src/browser/media/favicon.ico" type="image/x-icon" />
+ <link rel="manifest" href="/manifest.json" crossorigin="use-credentials" /> + <link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
<link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.main.css"> <link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
</head> </head>
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -308,6 +308,7 @@ export class WebClientServer { @@ -333,6 +333,7 @@ export class WebClientServer {
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']), } : undefined;
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
productConfiguration: <Partial<IProductConfiguration>>{ const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
+ codeServerVersion: this._productService.codeServerVersion, + codeServerVersion: this._productService.codeServerVersion,
embedderIdentifier: 'server-distro', embedderIdentifier: 'server-distro',
extensionsGallery: this._webExtensionResourceUrlTemplate ? { extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
...this._productService.extensionsGallery, ...this._productService.extensionsGallery,
Index: code-server/lib/vscode/src/server-main.ts
===================================================================
--- code-server.orig/lib/vscode/src/server-main.ts
+++ code-server/lib/vscode/src/server-main.ts
@@ -22,6 +22,9 @@ import { IServerAPI } from './vs/server/
perf.mark('code/server/start');
(globalThis as { vscodeServerStartTime?: number }).vscodeServerStartTime = performance.now();
+// This is not indented to make the diff less noisy. We need to move this out
+// of the top-level so it will not run immediately and we can control the start.
+async function start() {
// Do a quick parse to determine if a server or the cli needs to be started
const parsedArgs = minimist(process.argv.slice(2), {
boolean: ['start-server', 'list-extensions', 'print-ip-address', 'help', 'version', 'accept-server-license-terms', 'update-extensions'],
@@ -150,6 +153,7 @@ if (shouldSpawnCli) {
}
});
}
+}
function sanitizeStringArg(val: unknown): string | undefined {
if (Array.isArray(val)) { // if an argument is passed multiple times, minimist creates an array
@@ -283,3 +287,22 @@ function prompt(question: string): Promi
});
});
}
+
+async function loadCodeWithNls() {
+ const nlsConfiguration = await resolveNLSConfiguration({
+ userLocale: 'en',
+ osLocale: 'en',
+ commit: product.commit,
+ userDataPath: '',
+ nlsMetadataPath: import.meta.dirname,
+ });
+ return loadCode(nlsConfiguration);
+}
+
+// This alias prevents the name getting mangled during minification which would
+// make it difficult to import.
+export { loadCodeWithNls as loadCodeWithNls };
+
+if (!process.env.CODE_SERVER_PARENT_PID) {
+ start();
+}
Index: code-server/lib/vscode/src/vs/platform/dialogs/browser/dialog.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/dialogs/browser/dialog.ts
+++ code-server/lib/vscode/src/vs/platform/dialogs/browser/dialog.ts
@@ -45,8 +45,11 @@ export function createWorkbenchDialogOpt
export function createBrowserAboutDialogDetails(productService: IProductService): { title: string; details: string; detailsToCopy: string } {
const detailString = (useAgo: boolean): string => {
- return localize('aboutDetail',
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
+ return localize('aboutCodeServerDetail',
+ "code-server: {0}",
+ productService.codeServerVersion ? `v${productService.codeServerVersion}` : 'Unknown'
+ ) + '\n' + localize('aboutDetail',
+ "Code: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
productService.version || 'Unknown',
productService.commit || 'Unknown',
productService.date ? `${productService.date}${useAgo ? ' (' + fromNow(new Date(productService.date), true) + ')' : ''}` : 'Unknown',

15
patches/keepalive.diff Normal file
View file

@ -0,0 +1,15 @@
This can be removed after upgrading to Node >= 19 as keepAlive is defaulted to
true after 19.
Index: code-server/lib/vscode/src/vs/platform/request/node/proxy.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/request/node/proxy.ts
+++ code-server/lib/vscode/src/vs/platform/request/node/proxy.ts
@@ -42,6 +42,7 @@ export async function getProxyAgent(rawR
port: (proxyEndpoint.port ? +proxyEndpoint.port : 0) || (proxyEndpoint.protocol === 'https' ? 443 : 80),
auth: proxyEndpoint.auth,
rejectUnauthorized: isBoolean(options.strictSSL) ? options.strictSSL : true,
+ keepAlive: true,
};
if (requestURL.protocol === 'http:') {

View file

@ -1,29 +1,27 @@
Make storage local to the remote server Make storage local to the remote server
This solves two problems: This makes user settings will be stored in the file system instead of in browser
1. Extensions running in the browser (like Vim) might use these paths storage. Using browser storage makes sharing or seeding settings between
directly instead of using the file service and most likely can't write browsers difficult and remote settings is not a sufficient replacement because
to `/User` on disk. some settings are only allowed to be set on the user level.
2. Settings will be stored in the file system instead of in browser
storage. Using browser storage makes sharing or seeding settings
between browsers difficult. We may want to revisit this once/if we get
settings sync.
Unfortunately this does not affect state which uses a separate method with Unfortunately this does not affect state which uses a separate method with
IndexedDB and does not appear nearly as easy to redirect to disk. IndexedDB and does not appear nearly as easy to redirect to disk.
To test install the Vim extension and make sure something that uses file storage To test change settings from the UI and on disk while making sure they appear on
works (history recall for example) and change settings from the UI and on disk the other side.
while making sure they appear on the other side.
This patch also resolves a bug where a global value for workspace initialization
is used in a non async-safe way.
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -303,6 +303,7 @@ export class WebClientServer { @@ -364,6 +364,7 @@ export class WebClientServer {
const workbenchWebConfiguration = {
remoteAuthority, remoteAuthority,
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', serverBasePath: basePath,
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
+ userDataPath: this._environmentService.userDataPath, + userDataPath: this._environmentService.userDataPath,
_wrapWebWorkerExtHostInIframe, _wrapWebWorkerExtHostInIframe,
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() }, developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
@ -32,9 +30,9 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
@@ -266,6 +266,11 @@ export interface IWorkbenchConstructionO @@ -298,6 +298,11 @@ export interface IWorkbenchConstructionO
*/ */
readonly configurationDefaults?: Record<string, any>; readonly configurationDefaults?: Record<string, unknown>;
+ /** + /**
+ * Path to the user data directory. + * Path to the user data directory.
@ -43,13 +41,13 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
+ +
//#endregion //#endregion
//#region Profile options
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -53,7 +53,14 @@ export class BrowserWorkbenchEnvironment @@ -102,7 +102,14 @@ export class BrowserWorkbenchEnvironment
get logFile(): URI { return joinPath(this.logsHome, 'window.log'); } get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); }
@memoize @memoize
- get userRoamingDataHome(): URI { return URI.file('/User').with({ scheme: Schemas.vscodeUserData }); } - get userRoamingDataHome(): URI { return URI.file('/User').with({ scheme: Schemas.vscodeUserData }); }
@ -64,3 +62,33 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
@memoize @memoize
get argvResource(): URI { return joinPath(this.userRoamingDataHome, 'argv.json'); } get argvResource(): URI { return joinPath(this.userRoamingDataHome, 'argv.json'); }
Index: code-server/lib/vscode/src/vs/workbench/services/configuration/browser/configurationService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/configuration/browser/configurationService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/configuration/browser/configurationService.ts
@@ -147,8 +147,10 @@ export class WorkspaceService extends Di
this.workspaceConfiguration = this._register(new WorkspaceConfiguration(configurationCache, fileService, uriIdentityService, logService));
this._register(this.workspaceConfiguration.onDidUpdateConfiguration(fromCache => {
this.onWorkspaceConfigurationChanged(fromCache).then(() => {
- this.workspace.initialized = this.workspaceConfiguration.initialized;
- this.checkAndMarkWorkspaceComplete(fromCache);
+ if (this.workspace) { // The workspace may not have been created yet.
+ this.workspace.initialized = this.workspaceConfiguration.initialized;
+ this.checkAndMarkWorkspaceComplete(fromCache);
+ }
});
}));
@@ -556,6 +558,12 @@ export class WorkspaceService extends Di
previousFolders = this.workspace.folders;
this.workspace.update(workspace);
} else {
+ // It is possible for the configuration to become initialized in between
+ // when the workspace was created and this function was called, so check
+ // the configuration again now.
+ if (!workspace.initialized && this.workspaceConfiguration.initialized) {
+ workspace.initialized = true;
+ }
this.workspace = workspace;
}

View file

@ -8,7 +8,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
+++ code-server/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts
@@ -34,6 +34,7 @@ export interface IProductConfiguration { @@ -68,6 +68,7 @@ export interface IProductConfiguration {
readonly codeServerVersion?: string readonly codeServerVersion?: string
readonly rootEndpoint?: string readonly rootEndpoint?: string
readonly updateEndpoint?: string readonly updateEndpoint?: string
@ -20,19 +20,19 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -13,6 +13,7 @@ import { IEnvironmentService, INativeEnv @@ -18,6 +18,7 @@ import { ProtocolConstants } from '../..
export const serverOptions: OptionDescriptions<ServerParsedArgs> = { export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
/* ----- code-server ----- */ /* ----- code-server ----- */
'disable-update-check': { type: 'boolean' }, 'disable-update-check': { type: 'boolean' },
+ 'auth': { type: 'string' }, + 'auth': { type: 'string' },
/* ----- server setup ----- */ /* ----- server setup ----- */
@@ -92,6 +93,7 @@ export const serverOptions: OptionDescri @@ -105,6 +106,7 @@ export const serverOptions: OptionDescri
export interface ServerParsedArgs { export interface ServerParsedArgs {
/* ----- code-server ----- */ /* ----- code-server ----- */
'disable-update-check'?: boolean; 'disable-update-check'?: boolean;
+ 'auth'?: string + 'auth'?: string;
/* ----- server setup ----- */ /* ----- server setup ----- */
@ -40,27 +40,27 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -313,6 +313,7 @@ export class WebClientServer { @@ -341,6 +341,7 @@ export class WebClientServer {
codeServerVersion: this._productService.codeServerVersion, codeServerVersion: this._productService.codeServerVersion,
rootEndpoint: base, rootEndpoint: rootBase,
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
+ logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, + logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
embedderIdentifier: 'server-distro', embedderIdentifier: 'server-distro',
extensionsGallery: this._productService.extensionsGallery, extensionsGallery: this._productService.extensionsGallery,
}, };
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts --- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/client.ts +++ code-server/lib/vscode/src/vs/workbench/browser/client.ts
@@ -1,11 +1,15 @@ @@ -1,11 +1,15 @@
import { Disposable } from 'vs/base/common/lifecycle'; import { Disposable } from "../../base/common/lifecycle.js";
import { localize } from 'vs/nls'; import { localize } from '../../nls.js';
+import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; +import { MenuId, MenuRegistry } from '../../platform/actions/common/actions.js';
+import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { CommandsRegistry } from '../../platform/commands/common/commands.js';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from '../../platform/log/common/log.js';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { INotificationService, Severity } from '../../platform/notification/common/notification.js';
import { IProductService } from 'vs/platform/product/common/productService'; import { IProductService } from '../../platform/product/common/productService.js';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IStorageService, StorageScope, StorageTarget } from '../../platform/storage/common/storage.js';
export class CodeServerClient extends Disposable { export class CodeServerClient extends Disposable {
+ static LOGOUT_COMMAND_ID = 'code-server.logout'; + static LOGOUT_COMMAND_ID = 'code-server.logout';

View file

@ -12,14 +12,14 @@ in-between and has web extensions install directly from the marketplace.
This can be tested by setting EXTENSIONS_GALLERY set to: This can be tested by setting EXTENSIONS_GALLERY set to:
'{"serviceUrl": "https://extensions.coder.com/api"}' '{"serviceUrl": "https://my-extensions/api"}'
Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts --- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts +++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
@@ -53,6 +53,16 @@ else if (typeof require?.__$__nodeRequir @@ -49,6 +49,17 @@ else if (globalThis._VSCODE_PRODUCT_JSON
version: pkg.version version: pkg.version
}); });
} }
@ -28,6 +28,7 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
+ extensionsGallery: env.EXTENSIONS_GALLERY ? JSON.parse(env.EXTENSIONS_GALLERY) : (product.extensionsGallery || { + extensionsGallery: env.EXTENSIONS_GALLERY ? JSON.parse(env.EXTENSIONS_GALLERY) : (product.extensionsGallery || {
+ serviceUrl: "https://open-vsx.org/vscode/gallery", + serviceUrl: "https://open-vsx.org/vscode/gallery",
+ itemUrl: "https://open-vsx.org/vscode/item", + itemUrl: "https://open-vsx.org/vscode/item",
+ extensionUrlTemplate: "https://open-vsx.org/vscode/gallery/{publisher}/{name}/latest",
+ resourceUrlTemplate: "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}", + resourceUrlTemplate: "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}",
+ controlUrl: "", + controlUrl: "",
+ recommendationsUrl: "", + recommendationsUrl: "",
@ -40,49 +41,67 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -111,7 +111,7 @@ export class WebClientServer { @@ -326,7 +326,6 @@ export class WebClientServer {
const serverRootPath = getRemoteServerRootPath(_productService);
this._staticRoute = `${serverRootPath}/static`; const staticRoute = posix.join(basePath, this._productPath, STATIC_PATH);
this._callbackRoute = `${serverRootPath}/callback`; const callbackRoute = posix.join(basePath, this._productPath, CALLBACK_PATH);
- this._webExtensionRoute = `${serverRootPath}/web-extension-resource`; - const webExtensionRoute = posix.join(basePath, this._productPath, WEB_EXTENSION_PATH);
+ this._webExtensionRoute = `/web-extension-resource`;
const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority });
@@ -342,14 +341,7 @@ export class WebClientServer {
codeServerVersion: this._productService.codeServerVersion,
rootEndpoint: rootBase,
embedderIdentifier: 'server-distro',
- extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
- ...this._productService.extensionsGallery,
- resourceUrlTemplate: this._webExtensionResourceUrlTemplate.with({
- scheme: 'http',
- authority: remoteAuthority,
- path: `${webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}`
- }).toString(true)
- } : undefined
+ extensionsGallery: this._productService.extensionsGallery,
};
const proposedApi = this._environmentService.args['enable-proposed-api'];
Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
+++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
@@ -15,7 +15,6 @@ import { getServiceMachineId } from '../
import { IStorageService } from '../../storage/common/storage.js';
import { TelemetryLevel } from '../../telemetry/common/telemetry.js';
import { getTelemetryLevel, supportsTelemetry } from '../../telemetry/common/telemetryUtils.js';
-import { RemoteAuthorities } from '../../../base/common/network.js';
import { TargetPlatform } from '../../extensions/common/extensions.js';
import { ExtensionGalleryResourceType, getExtensionGalleryManifestResourceUri, IExtensionGalleryManifest, IExtensionGalleryManifestService } from '../../extensionManagement/common/extensionGalleryManifest.js';
import { ILogService } from '../../log/common/log.js';
@@ -163,9 +162,9 @@ export abstract class AbstractExtensionR
} }
/** protected _isWebExtensionResourceEndPoint(uri: URI): boolean {
@@ -312,14 +312,7 @@ export class WebClientServer { - const uriPath = uri.path, serverRootPath = RemoteAuthorities.getServerRootPath();
codeServerVersion: this._productService.codeServerVersion, - // test if the path starts with the server root path followed by the web extension resource end point segment
rootEndpoint: base, - return uriPath.startsWith(serverRootPath) && uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT, serverRootPath.length);
embedderIdentifier: 'server-distro', + const uriPath = uri.path;
- extensionsGallery: this._webExtensionResourceUrlTemplate ? { + // test if the path starts with the web extension resource end point segment
- ...this._productService.extensionsGallery, + return uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT);
- 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({ }
- scheme: 'http',
- authority: remoteAuthority, }
- path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}` Index: code-server/lib/vscode/src/vs/platform/externalServices/common/marketplace.ts
- }).toString(true)
- } : undefined
+ extensionsGallery: this._productService.extensionsGallery,
},
callbackRoute: this._callbackRoute
};
Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts --- code-server.orig/lib/vscode/src/vs/platform/externalServices/common/marketplace.ts
+++ code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +++ code-server/lib/vscode/src/vs/platform/externalServices/common/marketplace.ts
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/ @@ -26,6 +26,10 @@ export async function resolveMarketplace
import { IStorageService } from 'vs/platform/storage/common/storage'; 'User-Agent': `VSCode ${version} (${productService.nameShort})`
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; };
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
-import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
export const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource'; + if (productService.extensionsGallery?.authorizationHeaderToken) {
+ headers['Authorization'] = `Bearer ${productService.extensionsGallery.authorizationHeaderToken}`;
@@ -60,7 +59,7 @@ export abstract class AbstractExtensionR + }
private readonly _environmentService: IEnvironmentService, +
private readonly _configurationService: IConfigurationService, if (supportsTelemetry(productService, environmentService) && getTelemetryLevel(configurationService) === TelemetryLevel.USAGE) {
) { const serviceMachineId = await getServiceMachineId(environmentService, fileService, storageService);
- this._webExtensionResourceEndPoint = `${getRemoteServerRootPath(_productService)}/${WEB_EXTENSION_RESOURCE_END_POINT}/`; headers['X-Market-User-Id'] = serviceMachineId;
+ this._webExtensionResourceEndPoint = `/${WEB_EXTENSION_RESOURCE_END_POINT}/`;
if (_productService.extensionsGallery) {
this._extensionGalleryResourceUrlTemplate = _productService.extensionsGallery.resourceUrlTemplate;
this._extensionGalleryAuthority = this._extensionGalleryResourceUrlTemplate ? this._getExtensionGalleryAuthority(URI.parse(this._extensionGalleryResourceUrlTemplate)) : undefined;

View file

@ -1,28 +1,16 @@
Unconditionally enable the proposed API Unconditionally enable the proposed API
To test run an extension that uses the proposed API. To test run an extension that uses the proposed API (i.e.
https://github.com/microsoft/vscode-extension-samples/tree/ddae6c0c9ff203b4ed6f6b43bfacdd0834215f83/proposed-api-sample)
We also override isProposedApiEnabled in case an extension does not declare the We also override isProposedApiEnabled in case an extension does not declare the
APIs it needs correctly (the Jupyter extension had this issue). APIs it needs correctly (the Jupyter extension had this issue).
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
@@ -1462,7 +1462,7 @@ class ProposedApiController {
this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)));
- this._envEnablesProposedApiForAll =
+ this._envEnablesProposedApiForAll = true ||
!_environmentService.isBuilt || // always allow proposed API when running out of sources
(_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension
(this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts --- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts +++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
@@ -359,10 +359,7 @@ function extensionDescriptionArrayToMap( @@ -321,10 +321,7 @@ function extensionDescriptionArrayToMap(
} }
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean { export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
@ -34,3 +22,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
} }
export function checkProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): void { export function checkProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): void {
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
@@ -31,7 +31,7 @@ export class ExtensionsProposedApi {
this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)));
- this._envEnablesProposedApiForAll =
+ this._envEnablesProposedApiForAll = true ||
!_environmentService.isBuilt || // always allow proposed API when running out of sources
(_environmentService.isExtensionDevelopment && productService.quality !== 'stable') || // do not allow proposed API against stable builds when developing an extension
(this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi)); // always allow proposed API if --enable-proposed-api is provided without extension ID

View file

@ -30,7 +30,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
+++ code-server/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts
@@ -35,6 +35,7 @@ export interface IProductConfiguration { @@ -69,6 +69,7 @@ export interface IProductConfiguration {
readonly rootEndpoint?: string readonly rootEndpoint?: string
readonly updateEndpoint?: string readonly updateEndpoint?: string
readonly logoutEndpoint?: string readonly logoutEndpoint?: string
@ -42,70 +42,48 @@ Index: code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityReso
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts --- code-server.orig/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
+++ code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts +++ code-server/lib/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts
@@ -8,7 +8,7 @@ import { Disposable } from 'vs/base/comm @@ -35,7 +35,7 @@ export class RemoteAuthorityResolverServ
import { RemoteAuthorities } from 'vs/base/common/network'; connectionToken: Promise<string> | string | undefined,
import { URI } from 'vs/base/common/uri'; resourceUriProvider: ((uri: URI) => URI) | undefined,
import { IProductService } from 'vs/platform/product/common/productService'; serverBasePath: string | undefined,
-import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; - @IProductService productService: IProductService,
+import { IRemoteAuthorityResolverService, IRemoteConnectionData, ResolvedAuthority, ResolvedOptions, ResolverResult } from 'vs/platform/remote/common/remoteAuthorityResolver'; + @IProductService private readonly productService: IProductService,
import { getRemoteServerRootPath, parseAuthorityWithOptionalPort } from 'vs/platform/remote/common/remoteHosts'; @ILogService private readonly _logService: ILogService,
) {
export class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService {
@@ -23,7 +23,7 @@ export class RemoteAuthorityResolverServ
private readonly _connectionToken: Promise<string> | string | undefined;
private readonly _connectionTokens: Map<string, string>;
- constructor(@IProductService productService: IProductService, connectionToken: Promise<string> | string | undefined, resourceUriProvider: ((uri: URI) => URI) | undefined) {
+ constructor(@IProductService productService: IProductService, connectionToken: Promise<string> | string | undefined, resourceUriProvider: ((uri: URI) => URI) | undefined, private readonly proxyEndpointTemplate?: string) {
super(); super();
this._connectionToken = connectionToken; @@ -86,9 +86,14 @@ export class RemoteAuthorityResolverServ
this._connectionTokens = new Map<string, string>();
@@ -61,9 +61,14 @@ export class RemoteAuthorityResolverServ
private async _doResolveAuthority(authority: string): Promise<ResolverResult> {
const connectionToken = await Promise.resolve(this._connectionTokens.get(authority) || this._connectionToken); const connectionToken = await Promise.resolve(this._connectionTokens.get(authority) || this._connectionToken);
performance.mark(`code/didResolveConnectionToken/${authorityPrefix}`);
this._logService.info(`Resolved connection token (${authorityPrefix}) after ${sw.elapsed()} ms`);
+ let options: ResolvedOptions | undefined; + let options: ResolvedOptions | undefined;
+ if (this.proxyEndpointTemplate) { + if (this.productService.proxyEndpointTemplate) {
+ const proxyUrl = new URL(this.proxyEndpointTemplate, window.location.href); + const proxyUrl = new URL(this.productService.proxyEndpointTemplate, mainWindow.location.href);
+ options = { extensionHostEnv: { VSCODE_PROXY_URI: decodeURIComponent(proxyUrl.toString()) }} + options = { extensionHostEnv: { VSCODE_PROXY_URI: decodeURIComponent(proxyUrl.toString()) }}
+ } + }
const defaultPort = (/^https:/.test(window.location.href) ? 443 : 80); const defaultPort = (/^https:/.test(mainWindow.location.href) ? 443 : 80);
const { host, port } = parseAuthorityWithOptionalPort(authority, defaultPort); const { host, port } = parseAuthorityWithOptionalPort(authority, defaultPort);
- const result: ResolverResult = { authority: { authority, host: host, port: port, connectionToken } }; - const result: ResolverResult = { authority: { authority, connectTo: new WebSocketRemoteConnection(host, port), connectionToken } };
+ const result: ResolverResult = { authority: { authority, host: host, port: port, connectionToken }, options }; + const result: ResolverResult = { authority: { authority, connectTo: new WebSocketRemoteConnection(host, port), connectionToken }, options };
RemoteAuthorities.set(authority, result.authority.host, result.authority.port); RemoteAuthorities.set(authority, host, port);
this._cache.set(authority, result); this._cache.set(authority, result);
this._onDidChangeConnectionData.fire(); this._onDidChangeConnectionData.fire();
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -314,6 +314,7 @@ export class WebClientServer { @@ -342,6 +342,7 @@ export class WebClientServer {
rootEndpoint: base, rootEndpoint: rootBase,
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
+ proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/', + proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/',
embedderIdentifier: 'server-distro', embedderIdentifier: 'server-distro',
extensionsGallery: this._productService.extensionsGallery, extensionsGallery: this._productService.extensionsGallery,
}, };
Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
@@ -247,7 +247,7 @@ export class BrowserMain extends Disposa
// Remote
const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName);
- const remoteAuthorityResolverService = new RemoteAuthorityResolverService(productService, connectionToken, this.configuration.resourceUriProvider);
+ const remoteAuthorityResolverService = new RemoteAuthorityResolverService(productService, connectionToken, this.configuration.resourceUriProvider, this.configuration.productConfiguration?.proxyEndpointTemplate);
serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService);
// Signing
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts --- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
@@ -392,7 +392,7 @@ export async function createTerminalEnvi @@ -292,7 +292,7 @@ export async function createTerminalEnvi
// Sanitize the environment, removing any undesirable VS Code and Electron environment // Sanitize the environment, removing any undesirable VS Code and Electron environment
// variables // variables
@ -118,33 +96,32 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
@@ -21,6 +21,7 @@ import type { ICredentialsProvider } fro @@ -20,6 +20,7 @@ import { ISecretStorageProvider } from '
import type { IURLCallbackProvider } from 'vs/workbench/services/url/browser/urlService'; import { isFolderToOpen, isWorkspaceToOpen } from '../../../platform/window/common/window.js';
import type { IWorkbenchConstructionOptions } from 'vs/workbench/browser/web.api'; import type { IWorkbenchConstructionOptions, IWorkspace, IWorkspaceProvider } from '../../../workbench/browser/web.api.js';
import type { IWorkspace, IWorkspaceProvider } from 'vs/workbench/services/host/browser/browserHostService'; import { AuthenticationSessionInfo } from '../../../workbench/services/authentication/browser/authenticationService.js';
+import { extractLocalHostUriMetaDataForPortMapping, TunnelOptions, TunnelCreationOptions } from 'vs/platform/tunnel/common/tunnel'; +import { extractLocalHostUriMetaDataForPortMapping, TunnelOptions, TunnelCreationOptions } from '../../../platform/tunnel/common/tunnel.js';
import type { IURLCallbackProvider } from '../../../workbench/services/url/browser/urlService.js';
import { create } from '../../../workbench/workbench.web.main.internal.js';
interface ICredential { @@ -606,6 +607,39 @@ class WorkspaceProvider implements IWork
service: string; settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
@@ -511,6 +512,38 @@ function doCreateUri(path: string, query
} : undefined,
workspaceProvider: WorkspaceProvider.create(config), workspaceProvider: WorkspaceProvider.create(config),
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute), urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
- credentialsProvider: config.remoteAuthority ? undefined : new LocalStorageCredentialsProvider() // with a remote, we don't use a local credentials provider
+ credentialsProvider: config.remoteAuthority ? undefined : new LocalStorageCredentialsProvider(), // with a remote, we don't use a local credentials provider
+ resolveExternalUri: (uri: URI): Promise<URI> => { + resolveExternalUri: (uri: URI): Promise<URI> => {
+ let resolvedUri = uri + let resolvedUri = uri
+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri) + const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
+
+ if (localhostMatch && resolvedUri.authority !== location.host) { + if (localhostMatch && resolvedUri.authority !== location.host) {
+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) { + if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
+ resolvedUri = URI.parse(new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString()) + const renderedTemplate = config.productConfiguration.proxyEndpointTemplate
+ .replace('{{port}}', localhostMatch.port.toString())
+ .replace('{{host}}', window.location.host)
+ resolvedUri = URI.parse(new URL(renderedTemplate, window.location.href).toString())
+ } else { + } else {
+ throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`) + throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)
+ } + }
+ } + }
+ + // If not localhost, return unmodified.
+ // If not localhost, return unmodified
+ return Promise.resolve(resolvedUri) + return Promise.resolve(resolvedUri)
+ }, + },
+ tunnelProvider: { + tunnelProvider: {
@ -163,19 +140,22 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
+ } + }
+ }) + })
+ } + }
+ } + },
}); secretStorageProvider: config.remoteAuthority && !secretStorageKeyPath
})(); ? undefined /* with a remote without embedder-preferred storage, store on the remote */
: new LocalStorageSecretStorageProvider(secretStorageCrypto),
Index: code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts Index: code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts --- code-server.orig/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
@@ -73,7 +73,7 @@ export class ForwardedPortsView extends @@ -83,8 +83,8 @@ export class ForwardedPortsView extends
this.contextKeyListener = undefined; private async enableForwardedPortsFeatures() {
} this.contextKeyListener.clear();
- const featuresEnabled: boolean = !!forwardedPortsFeaturesEnabled.getValue(this.contextKeyService);
- const viewEnabled: boolean = !!forwardedPortsViewEnabled.getValue(this.contextKeyService); - const viewEnabled: boolean = !!forwardedPortsViewEnabled.getValue(this.contextKeyService);
+ const featuresEnabled: boolean = true;
+ const viewEnabled: boolean = true; + const viewEnabled: boolean = true;
if (this.environmentService.remoteAuthority && viewEnabled) { if (featuresEnabled || viewEnabled) {
const viewContainer = await this.getViewContainer(); // Also enable the view if it isn't already.

View file

@ -9,14 +9,16 @@ update-check.diff
logout.diff logout.diff
store-socket.diff store-socket.diff
proxy-uri.diff proxy-uri.diff
github-auth.diff
unique-db.diff unique-db.diff
local-storage.diff local-storage.diff
service-worker.diff service-worker.diff
sourcemaps.diff sourcemaps.diff
disable-downloads.diff external-file-actions.diff
telemetry.diff telemetry.diff
display-language.diff
cli-window-open.diff cli-window-open.diff
exec-argv.diff
getting-started.diff getting-started.diff
keepalive.diff
clipboard.diff
display-language.diff
trusted-domains.diff
signature-verification.diff

View file

@ -6,7 +6,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
+++ code-server/lib/vscode/src/vs/base/common/product.ts +++ code-server/lib/vscode/src/vs/base/common/product.ts
@@ -36,6 +36,10 @@ export interface IProductConfiguration { @@ -70,6 +70,10 @@ export interface IProductConfiguration {
readonly updateEndpoint?: string readonly updateEndpoint?: string
readonly logoutEndpoint?: string readonly logoutEndpoint?: string
readonly proxyEndpointTemplate?: string readonly proxyEndpointTemplate?: string
@ -54,14 +54,14 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -316,6 +316,10 @@ export class WebClientServer { @@ -343,6 +343,10 @@ export class WebClientServer {
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/', proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/',
+ serviceWorker: { + serviceWorker: {
+ scope: vscodeBase + '/', + scope: vscodeBase + '/',
+ path: base + '/_static/out/browser/serviceWorker.js', + path: rootBase + '/_static/out/browser/serviceWorker.js',
+ }, + },
embedderIdentifier: 'server-distro', embedderIdentifier: 'server-distro',
extensionsGallery: this._productService.extensionsGallery, extensionsGallery: this._productService.extensionsGallery,
}, };

View file

@ -0,0 +1,34 @@
Disable signature verification.
Extension signature verification is now mandatory for all platforms and needs to be disabled.
Index: code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
+++ code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionManagementService.ts
@@ -34,6 +34,7 @@ import {
ExtensionSignatureVerificationCode,
computeSize,
IAllowedExtensionsService,
+ // @ts-expect-error no-unused-variable
VerifyExtensionSignatureConfigKey,
shouldRequireRepositorySignatureFor,
} from '../common/extensionManagement.js';
@@ -87,6 +88,7 @@ export class ExtensionManagementService
@IDownloadService private downloadService: IDownloadService,
@IInstantiationService private readonly instantiationService: IInstantiationService,
@IFileService private readonly fileService: IFileService,
+ // @ts-expect-error no-unused-variable
@IConfigurationService private readonly configurationService: IConfigurationService,
@IExtensionGalleryManifestService protected readonly extensionGalleryManifestService: IExtensionGalleryManifestService,
@IProductService productService: IProductService,
@@ -339,8 +341,7 @@ export class ExtensionManagementService
private async downloadExtension(extension: IGalleryExtension, operation: InstallOperation, verifySignature: boolean, clientTargetPlatform?: TargetPlatform): Promise<{ readonly location: URI; readonly verificationStatus: ExtensionSignatureVerificationCode | undefined }> {
if (verifySignature) {
- const value = this.configurationService.getValue(VerifyExtensionSignatureConfigKey);
- verifySignature = isBoolean(value) ? value : true;
+ verifySignature = false;
}
const { location, verificationStatus } = await this.extensionsDownloader.download(extension, operation, verifySignature, clientTargetPlatform);
const shouldRequireSignature = shouldRequireRepositorySignatureFor(extension.private, await this.extensionGalleryManifestService.getExtensionGalleryManifest());

Some files were not shown because too many files have changed in this diff Show more