mirror of https://github.com/coder/code-server.git
Compare commits
5 Commits
882993121a
...
77ba0e9908
Author | SHA1 | Date |
---|---|---|
dependabot[bot] | 77ba0e9908 | |
Asher | bea906f90b | |
Asher | 15752526bd | |
Asher | 7c298653f1 | |
Olivier Benz | fc6064dcd3 |
|
@ -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
|
|
|
@ -62,7 +62,7 @@ body:
|
||||||
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
|
render: shell
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|
|
@ -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)
|
|
|
@ -19,7 +19,7 @@ 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:
|
prettier:
|
||||||
|
@ -33,7 +33,7 @@ jobs:
|
||||||
- name: Run prettier with actionsx/prettier
|
- name: Run prettier with actionsx/prettier
|
||||||
uses: actionsx/prettier@v3
|
uses: actionsx/prettier@v3
|
||||||
with:
|
with:
|
||||||
args: --check --loglevel=warn .
|
args: --check --log-level=warn .
|
||||||
|
|
||||||
doctoc:
|
doctoc:
|
||||||
name: Doctoc markdown files
|
name: Doctoc markdown files
|
||||||
|
@ -55,14 +55,16 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Install doctoc
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: yarn global add doctoc@2.2.1
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
|
|
||||||
- name: Run doctoc
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
run: npm run doctoc
|
||||||
run: yarn doctoc
|
|
||||||
|
|
||||||
lint-helm:
|
lint-helm:
|
||||||
name: Lint Helm chart
|
name: Lint Helm chart
|
||||||
|
@ -87,12 +89,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Install helm kubeval plugin
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
run: helm plugin install https://github.com/instrumenta/helm-kubeval
|
run: helm plugin install https://github.com/instrumenta/helm-kubeval
|
||||||
|
|
||||||
- name: Lint Helm chart
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
run: helm kubeval ci/helm-chart
|
run: helm kubeval ci/helm-chart
|
||||||
|
|
||||||
lint-ts:
|
lint-ts:
|
||||||
|
@ -120,24 +120,17 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
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
|
- name: Lint TypeScript files
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: yarn lint:ts
|
run: npm run lint:ts
|
||||||
|
|
||||||
lint-actions:
|
lint-actions:
|
||||||
name: Lint GitHub Actions
|
name: Lint GitHub Actions
|
||||||
|
@ -175,24 +168,16 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
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'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
|
run: npm run test:unit
|
||||||
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Run unit tests
|
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
run: yarn test:unit
|
|
||||||
|
|
||||||
- name: Upload coverage report to Codecov
|
- name: Upload coverage report to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
|
@ -229,24 +214,16 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "**/node_modules"
|
|
||||||
key: yarn-build-code-server-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
yarn-build-code-server-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- env:
|
||||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
||||||
run: yarn --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build code-server
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: yarn build
|
run: npm run 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.
|
||||||
|
@ -269,17 +246,19 @@ jobs:
|
||||||
env:
|
env:
|
||||||
VERSION: "0.0.0"
|
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
|
||||||
|
npm ci
|
||||||
|
popd
|
||||||
|
npm run build:vscode
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
- name: Upload npm package artifact
|
- name: Upload npm package artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
@ -303,38 +282,28 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "**/node_modules"
|
|
||||||
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
yarn-build-
|
|
||||||
|
|
||||||
- name: Download npm package
|
- name: Download npm package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
|
|
||||||
- name: Decompress npm package
|
- run: tar -xzf package.tar.gz
|
||||||
run: tar -xzf package.tar.gz
|
|
||||||
|
|
||||||
- name: Install release package dependencies
|
- run: cd release && npm install --unsafe-perm --omit=dev
|
||||||
run: cd release && npm install --unsafe-perm --omit=dev
|
|
||||||
|
|
||||||
- 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: Run end-to-end tests
|
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e
|
||||||
run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e
|
|
||||||
|
|
||||||
- name: Upload test artifacts
|
- name: Upload test artifacts
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -362,30 +331,21 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "**/node_modules"
|
|
||||||
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
yarn-build-
|
|
||||||
|
|
||||||
- name: Download npm package
|
- name: Download npm package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
|
|
||||||
- name: Decompress npm package
|
- run: tar -xzf package.tar.gz
|
||||||
run: tar -xzf package.tar.gz
|
|
||||||
|
|
||||||
- name: Install release package dependencies
|
- run: cd release && npm install --unsafe-perm --omit=dev
|
||||||
run: cd release && npm install --unsafe-perm --omit=dev
|
|
||||||
|
|
||||||
- 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: |
|
||||||
|
@ -409,22 +369,15 @@ jobs:
|
||||||
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
|
||||||
|
|
||||||
- name: Start Caddy
|
- run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
|
||||||
run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile
|
|
||||||
|
|
||||||
- name: Run end-to-end tests
|
- run: CODE_SERVER_TEST_ENTRY=./release npm run test:e2e:proxy
|
||||||
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
|
run: sudo ~/.cache/caddy/caddy stop --config ./ci/Caddyfile
|
||||||
|
|
||||||
- name: Upload test artifacts
|
- if: always()
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
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
|
|
||||||
|
|
|
@ -21,8 +21,6 @@ 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:
|
||||||
|
@ -33,7 +31,6 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Download npm package from release artifacts
|
- name: Download npm package from release artifacts
|
||||||
uses: robinraju/release-downloader@v1.11
|
uses: robinraju/release-downloader@v1.11
|
||||||
|
@ -43,15 +40,13 @@ jobs:
|
||||||
fileName: "package.tar.gz"
|
fileName: "package.tar.gz"
|
||||||
out-file-path: "release-npm-package"
|
out-file-path: "release-npm-package"
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Publish npm package and tag with "latest"
|
- run: npm run publish:npm
|
||||||
run: yarn publish:npm
|
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -77,8 +72,7 @@ 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
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
||||||
|
@ -124,8 +118,7 @@ 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
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
||||||
|
@ -151,6 +144,7 @@ jobs:
|
||||||
git commit -m "chore: updating version to ${{ env.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 ${{ env.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-20.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -176,8 +170,7 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
TAG="${{ github.event.inputs.version || github.ref_name }}"
|
||||||
|
|
|
@ -19,9 +19,6 @@ concurrency:
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# TODO: cache building yarn --production
|
|
||||||
# possibly 2m30s of savings(?)
|
|
||||||
# this requires refactoring our release scripts
|
|
||||||
package-linux-amd64:
|
package-linux-amd64:
|
||||||
name: x86-64 Linux build
|
name: x86-64 Linux build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -39,6 +36,12 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
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 development tools
|
- name: Install development tools
|
||||||
run: |
|
run: |
|
||||||
|
@ -56,25 +59,16 @@ jobs:
|
||||||
mv envsubst ~/.local/bin
|
mv envsubst ~/.local/bin
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install yarn
|
|
||||||
run: npm install -g yarn
|
|
||||||
|
|
||||||
- name: Download npm package
|
- name: Download npm package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: npm-release-package
|
name: npm-release-package
|
||||||
|
|
||||||
- name: Decompress npm package
|
- run: tar -xzf package.tar.gz
|
||||||
run: tar -xzf package.tar.gz
|
|
||||||
|
|
||||||
- name: Build standalone release
|
- run: npm run release:standalone
|
||||||
run: npm run release:standalone
|
|
||||||
|
|
||||||
- name: Install test dependencies
|
- run: npm run test:integration
|
||||||
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
|
- name: Upload coverage report to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
|
@ -83,17 +77,15 @@ jobs:
|
||||||
if: success()
|
if: success()
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.version || github.ref_name }}"
|
TAG="${{ inputs.version || github.ref_name }}"
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build packages with nfpm
|
- env:
|
||||||
env:
|
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
run: yarn package
|
run: npm run package
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
@ -141,6 +133,10 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: |
|
||||||
|
package-lock.json
|
||||||
|
test/package-lock.json
|
||||||
|
|
||||||
- name: Install cross-compiler and system dependencies
|
- name: Install cross-compiler and system dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -153,7 +149,10 @@ jobs:
|
||||||
libsecret-1-dev:$TARGET_ARCH \
|
libsecret-1-dev:$TARGET_ARCH \
|
||||||
libkrb5-dev:$TARGET_ARCH \
|
libkrb5-dev:$TARGET_ARCH \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl wget rsync gettext-base
|
curl wget rsync gettext-base \
|
||||||
|
python3
|
||||||
|
|
||||||
|
- run: SKIP_SUBMODULE_DEPS=1 npm ci
|
||||||
|
|
||||||
- name: Install nfpm
|
- name: Install nfpm
|
||||||
run: |
|
run: |
|
||||||
|
@ -166,11 +165,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: npm-release-package
|
name: npm-release-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: npm run release:standalone
|
|
||||||
|
|
||||||
- name: Replace node with cross-compile equivalent
|
- name: Replace node with cross-compile equivalent
|
||||||
run: |
|
run: |
|
||||||
|
@ -179,15 +175,13 @@ jobs:
|
||||||
tar -xf node-${node_version}-linux-${npm_config_arch}.tar.xz node-${node_version}-linux-${npm_config_arch}/bin/node --strip-components=2
|
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
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.version || github.ref_name }}"
|
TAG="${{ inputs.version || github.ref_name }}"
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build packages with nfpm
|
- env:
|
||||||
env:
|
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
run: npm run package ${npm_config_arch}
|
run: npm run package ${npm_config_arch}
|
||||||
|
|
||||||
|
@ -210,6 +204,12 @@ jobs:
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
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: |
|
||||||
|
@ -221,28 +221,18 @@ jobs:
|
||||||
# in Python 3.12. It seems to be fixed in the latest node-gyp so when we
|
# 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
|
# next update Node we can probably remove this. For now, install
|
||||||
# setuptools since it contains distutils.
|
# setuptools since it contains distutils.
|
||||||
- name: Install Python utilities
|
- run: brew install python-setuptools
|
||||||
run: brew install python-setuptools
|
|
||||||
|
|
||||||
- name: Download npm package
|
- name: Download npm package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: npm-release-package
|
name: npm-release-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: npm run release:standalone
|
|
||||||
|
|
||||||
- name: Install test dependencies
|
|
||||||
run: SKIP_SUBMODULE_DEPS=1 yarn install
|
|
||||||
|
|
||||||
- name: Run native module tests on standalone release
|
|
||||||
run: yarn test:native
|
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.version || github.ref_name }}"
|
TAG="${{ inputs.version || github.ref_name }}"
|
||||||
|
@ -251,7 +241,7 @@ jobs:
|
||||||
- name: Build packages with nfpm
|
- name: Build packages with nfpm
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
run: yarn package
|
run: npm run package
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
@ -292,11 +282,9 @@ jobs:
|
||||||
check_artifacts: false
|
check_artifacts: false
|
||||||
if_no_artifact_found: fail
|
if_no_artifact_found: fail
|
||||||
|
|
||||||
- name: Decompress npm package
|
- run: tar -xzf package.tar.gz
|
||||||
run: tar -xzf package.tar.gz
|
|
||||||
|
|
||||||
# NOTE@jsjoeio - we do this so we can strip out the v
|
# Strip out the v (v4.9.1 -> 4.9.1).
|
||||||
# i.e. v4.9.1 -> 4.9.1
|
|
||||||
- name: Get and set VERSION
|
- name: Get and set VERSION
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.version || github.ref_name }}"
|
TAG="${{ inputs.version || github.ref_name }}"
|
||||||
|
@ -315,8 +303,7 @@ jobs:
|
||||||
# Ensure it has the same permissions as before
|
# Ensure it has the same permissions as before
|
||||||
chmod 644 release/lib/vscode/product.json
|
chmod 644 release/lib/vscode/product.json
|
||||||
|
|
||||||
- name: Compress release package
|
- run: tar -czf package.tar.gz release
|
||||||
run: tar -czf package.tar.gz release
|
|
||||||
|
|
||||||
- name: Upload npm package artifact
|
- name: Upload npm package artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
@ -34,12 +34,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
|
||||||
- name: Audit yarn for vulnerabilities
|
|
||||||
run: yarn audit
|
|
||||||
if: success()
|
|
||||||
|
|
||||||
- name: Audit npm for vulnerabilities
|
- name: Audit npm for vulnerabilities
|
||||||
run: npm shrinkwrap && npm audit
|
run: npm audit
|
||||||
if: success()
|
if: success()
|
||||||
|
|
||||||
trivy-scan-repo:
|
trivy-scan-repo:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
20.15.1
|
20.16.0
|
||||||
|
|
|
@ -7,3 +7,4 @@ helm-chart
|
||||||
test/scripts
|
test/scripts
|
||||||
test/e2e/extensions/test-extension
|
test/e2e/extensions/test-extension
|
||||||
.pc
|
.pc
|
||||||
|
package-lock.json
|
||||||
|
|
|
@ -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)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
40
ci/README.md
40
ci/README.md
|
@ -16,18 +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/watch.ts](./dev/watch.ts) (`yarn watch`)
|
- [./ci/dev/watch.ts](./dev/watch.ts) (`npm run 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](./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)
|
||||||
|
@ -37,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)
|
||||||
|
@ -59,15 +59,15 @@ 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
|
||||||
|
|
||||||
|
@ -87,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`.
|
||||||
|
|
|
@ -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}")/../.."
|
||||||
|
|
|
@ -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() {
|
||||||
|
@ -46,7 +49,7 @@ bundle_code_server() {
|
||||||
rsync typings/pluginapi.d.ts "$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)",
|
||||||
|
@ -88,49 +91,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"
|
||||||
mv "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
|
cp "$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"
|
||||||
mv "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
|
cp "$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 "$@"
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Once we have an NPM package, use this script to copy it to a separate
|
||||||
|
# directory (./release-standalone) and install the dependencies. This new
|
||||||
|
# directory can then be packaged as a platform-specific release.
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
cd "$(dirname "${0}")/../.."
|
cd "$(dirname "${0}")/../.."
|
||||||
|
|
||||||
|
@ -9,9 +13,8 @@ main() {
|
||||||
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
|
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
|
||||||
RELEASE_PATH+=-standalone
|
RELEASE_PATH+=-standalone
|
||||||
|
|
||||||
# We cannot get the path to Node from $PATH (for example via `which node`)
|
# Package managers may shim their own "node" wrapper into the PATH, so run
|
||||||
# because Yarn shims a script called `node` and we would end up just copying
|
# node and ask it for its true path.
|
||||||
# that script. Instead we run Node and have it print its actual path.
|
|
||||||
local node_path
|
local node_path
|
||||||
node_path="$(node <<< 'console.info(process.execPath)')"
|
node_path="$(node <<< 'console.info(process.execPath)')"
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ main() {
|
||||||
|
|
||||||
if [[ ! ${VERSION-} ]]; then
|
if [[ ! ${VERSION-} ]]; then
|
||||||
echo "VERSION not set. Please set before running this script:"
|
echo "VERSION not set. Please set before running this script:"
|
||||||
echo "VERSION='0.0.0' yarn build:vscode"
|
echo "VERSION='0.0.0' npm run build:vscode"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ 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}"
|
npm run gulp "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
|
||||||
|
|
|
@ -117,14 +117,11 @@ main() {
|
||||||
|
|
||||||
install_with_yarn_or_npm() {
|
install_with_yarn_or_npm() {
|
||||||
echo "User agent: ${npm_config_user_agent-none}"
|
echo "User agent: ${npm_config_user_agent-none}"
|
||||||
# NOTE@edvincent: We want to keep using the package manager that the end-user was using to install the package.
|
# For development we enforce npm, but for installing the package as an
|
||||||
# This also ensures that when *we* run `yarn` in the development process, the yarn.lock file is used.
|
# 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
|
||||||
npm*)
|
npm*)
|
||||||
# HACK: NPM's use of semver doesn't like resolving some peerDependencies that vscode (upstream) brings in the form of pre-releases.
|
if ! npm install --unsafe-perm --omit=dev; then
|
||||||
# The legacy behavior doesn't complain about pre-releases being used, falling back to that for now.
|
|
||||||
# See https://github.com//pull/5071
|
|
||||||
if ! npm install --unsafe-perm --legacy-peer-deps --omit=dev; then
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
if (process.env.npm_execpath.includes("yarn")) {
|
||||||
|
throw new Error("`yarn` is no longer supported; please use `npm install` instead")
|
||||||
|
}
|
|
@ -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 "$@"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -45,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> {
|
||||||
|
|
|
@ -53,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."
|
||||||
|
@ -86,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"
|
||||||
|
@ -94,7 +94,7 @@ 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"
|
PACKAGE_NAME="@coder/code-server-pr"
|
||||||
fi
|
fi
|
||||||
|
@ -105,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
|
||||||
|
|
||||||
|
@ -120,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.
|
||||||
|
@ -134,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
|
||||||
|
@ -144,10 +140,9 @@ 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
|
npm publish --non-interactive release --tag "$NPM_TAG" --access public
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
|
@ -35,7 +35,7 @@ Here is what is needed:
|
||||||
- `node` v20.x
|
- `node` v20.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
|
||||||
|
@ -70,8 +70,8 @@ for more information.
|
||||||
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
|
||||||
|
@ -102,7 +102,7 @@ commits first if you are doing this).
|
||||||
but the lines changed, update the patch with `quilt refresh`. If there are
|
but the lines changed, update the patch with `quilt refresh`. If there are
|
||||||
conflicts, then force apply with `quilt push -f`, manually add back the
|
conflicts, then force apply with `quilt push -f`, manually add back the
|
||||||
rejected code, then run `quilt refresh`.
|
rejected code, then run `quilt refresh`.
|
||||||
4. From the code-server **project root**, run `yarn install`.
|
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 our version of Node.js to match.
|
Code. If necessary, update our version of Node.js to match.
|
||||||
|
|
||||||
|
@ -127,14 +127,14 @@ You can build a full production as follows:
|
||||||
```shell
|
```shell
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
quilt push -a
|
quilt push -a
|
||||||
yarn install
|
npm install
|
||||||
yarn build
|
npm run build
|
||||||
VERSION=0.0.0 yarn build:vscode
|
VERSION=0.0.0 npm run build:vscode
|
||||||
yarn release
|
npm run release
|
||||||
```
|
```
|
||||||
|
|
||||||
This does not keep `node_modules`. If you want them to be kept, use
|
This does not keep `node_modules`. If you want them to be kept, use
|
||||||
`KEEP_MODULES=1 yarn release`
|
`KEEP_MODULES=1 npm run release`
|
||||||
|
|
||||||
Run your build:
|
Run your build:
|
||||||
|
|
||||||
|
@ -148,9 +148,9 @@ node .
|
||||||
Then, to build the release package:
|
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
|
||||||
|
@ -170,9 +170,9 @@ writing, we do this for the following platforms/architectures:
|
||||||
- Linux armhf.rpm
|
- Linux armhf.rpm
|
||||||
- macOS arm64.tar.gz
|
- macOS arm64.tar.gz
|
||||||
|
|
||||||
Currently, these are compiled in CI using the `yarn release:standalone` command
|
Currently, these are compiled in CI using the `npm run release:standalone`
|
||||||
in the `release.yaml` workflow. We then upload them to the draft release and
|
command in the `release.yaml` workflow. We then upload them to the draft release
|
||||||
distribute via GitHub Releases.
|
and distribute via GitHub Releases.
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ We use these to test anything related to our scripts (most of which live under
|
||||||
|
|
||||||
### Integration tests
|
### Integration tests
|
||||||
|
|
||||||
These are a work in progress. We build code-server and run tests with `yarn
|
These are a work in progress. We build code-server and run tests with `npm run
|
||||||
test:integration`, which ensures that code-server builds work on their
|
test:integration`, which ensures that code-server builds work on their
|
||||||
respective platforms.
|
respective platforms.
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ Our testing structure is laid out under our [Contributing docs](https://coder.co
|
||||||
|
|
||||||
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
|
- run `npm run test:unit` and look at the coverage chart. You'll see all the
|
||||||
uncovered lines. This is a good place to start.
|
uncovered lines. This is a good place to start.
|
||||||
- look at `test/scripts` to see which scripts are tested. We can always use more
|
- look at `test/scripts` to see which scripts are tested. We can always use more
|
||||||
tests there.
|
tests there.
|
||||||
|
|
|
@ -17,8 +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`)
|
||||||
- `yarn audit` and `npm audit`
|
- `npm audit`
|
||||||
- Audits Yarn/NPM dependencies.
|
- Audits NPM dependencies.
|
||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
14
flake.lock
14
flake.lock
|
@ -5,11 +5,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716137900,
|
"lastModified": 1724224976,
|
||||||
"narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
|
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
|
||||||
"path": "/nix/store/r8nhgnkxacbnf4kv8kdi8b6ks3k9b16i-source",
|
"path": "/nix/store/j8pbrsb3nybdap3hhg9kw0ffqd4rlbx6-source",
|
||||||
"rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
|
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -8,11 +8,19 @@
|
||||||
(system:
|
(system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
nodejs = pkgs.nodejs_20;
|
nodejs = pkgs.nodejs_20;
|
||||||
yarn' = pkgs.yarn.override { inherit nodejs; };
|
|
||||||
in {
|
in {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
nodejs yarn' python3 pkg-config git rsync jq moreutils quilt bats openssl
|
nodejs
|
||||||
|
python3
|
||||||
|
pkg-config
|
||||||
|
git
|
||||||
|
rsync
|
||||||
|
jq
|
||||||
|
moreutils
|
||||||
|
quilt
|
||||||
|
bats
|
||||||
|
openssl
|
||||||
];
|
];
|
||||||
buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret libkrb5 ]
|
buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret libkrb5 ]
|
||||||
++ (with xorg; [ libX11 libxkbfile ])
|
++ (with xorg; [ libX11 libxkbfile ])
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
|
Subproject commit 384ff7382de624fb94dbaf6da11977bba1ecd427
|
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
|
@ -23,22 +23,27 @@
|
||||||
"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",
|
||||||
"fmt": "yarn prettier && ./ci/dev/doctoc.sh",
|
"fmt": "npm run 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' | grep -v test-plugin)",
|
||||||
"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",
|
||||||
"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": {
|
||||||
|
"@eslint/compat": "^1.2.0",
|
||||||
|
"@eslint/eslintrc": "^3.1.0",
|
||||||
|
"@eslint/js": "^9.12.0",
|
||||||
"@schemastore/package": "^0.0.10",
|
"@schemastore/package": "^0.0.10",
|
||||||
"@types/compression": "^1.7.3",
|
"@types/compression": "^1.7.3",
|
||||||
"@types/cookie-parser": "^1.4.4",
|
"@types/cookie-parser": "^1.4.4",
|
||||||
|
"@types/eslint__js": "^8.42.3",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/http-proxy": "1.17.7",
|
"@types/http-proxy": "1.17.7",
|
||||||
"@types/js-yaml": "^4.0.6",
|
"@types/js-yaml": "^4.0.6",
|
||||||
|
@ -49,18 +54,18 @@
|
||||||
"@types/semver": "^7.5.2",
|
"@types/semver": "^7.5.2",
|
||||||
"@types/trusted-types": "^2.0.4",
|
"@types/trusted-types": "^2.0.4",
|
||||||
"@types/ws": "^8.5.5",
|
"@types/ws": "^8.5.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
||||||
"@typescript-eslint/parser": "^6.7.2",
|
|
||||||
"doctoc": "^2.2.1",
|
"doctoc": "^2.2.1",
|
||||||
"eslint": "^8.49.0",
|
"eslint": "^9.12.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-import-resolver-typescript": "^3.6.0",
|
"eslint-import-resolver-typescript": "^3.6.0",
|
||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
|
"globals": "^15.10.0",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"prettier-plugin-sh": "^0.14.0",
|
"prettier-plugin-sh": "^0.14.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.6.2",
|
||||||
|
"typescript-eslint": "^8.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coder/logger": "^3.0.1",
|
"@coder/logger": "^3.0.1",
|
||||||
|
@ -68,7 +73,7 @@
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"env-paths": "^2.2.1",
|
"env-paths": "^2.2.1",
|
||||||
"express": "5.0.0-beta.3",
|
"express": "5.0.1",
|
||||||
"http-proxy": "^1.18.1",
|
"http-proxy": "^1.18.1",
|
||||||
"httpolyglot": "^0.1.2",
|
"httpolyglot": "^0.1.2",
|
||||||
"i18next": "^23.5.1",
|
"i18next": "^23.5.1",
|
||||||
|
@ -100,8 +105,7 @@
|
||||||
"remote-development"
|
"remote-development"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20",
|
"node": "20"
|
||||||
"yarn": "1"
|
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"transform": {
|
"transform": {
|
||||||
|
|
|
@ -319,3 +319,73 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
|
||||||
|
===================================================================
|
||||||
|
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
|
||||||
|
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
|
||||||
|
@@ -11,7 +11,8 @@
|
||||||
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Code">
|
||||||
|
- <link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
|
||||||
|
+ <link rel="apple-touch-icon" sizes="192x192" href="{{BASE}}/_static/src/browser/media/pwa-icon-192.png" />
|
||||||
|
+ <link rel="apple-touch-icon" sizes="512x512" href="{{BASE}}/_static/src/browser/media/pwa-icon-512.png" />
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
@@ -26,8 +27,9 @@
|
||||||
|
<meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">
|
||||||
|
|
||||||
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
|
- <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="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="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
|
||||||
|
<style id="vscode-css-modules" type="text/css" media="screen"></style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
@@ -37,7 +39,7 @@
|
||||||
|
|
||||||
|
<!-- Startup (do not modify order of script tags!) -->
|
||||||
|
<script>
|
||||||
|
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
|
||||||
|
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
|
||||||
|
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
|
||||||
|
===================================================================
|
||||||
|
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
|
||||||
|
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
|
||||||
|
@@ -11,7 +11,8 @@
|
||||||
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Code">
|
||||||
|
- <link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
|
||||||
|
+ <link rel="apple-touch-icon" sizes="192x192" href="{{BASE}}/_static/src/browser/media/pwa-icon-192.png" />
|
||||||
|
+ <link rel="apple-touch-icon" sizes="512x512" href="{{BASE}}/_static/src/browser/media/pwa-icon-512.png" />
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
@@ -23,8 +24,9 @@
|
||||||
|
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
|
||||||
|
|
||||||
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
|
- <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="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="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
|
||||||
|
<link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
@@ -34,7 +36,7 @@
|
||||||
|
|
||||||
|
<!-- Startup (do not modify order of script tags!) -->
|
||||||
|
<script>
|
||||||
|
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
|
||||||
|
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
|
||||||
|
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
|
|
@ -2,14 +2,14 @@ Index: code-server/lib/vscode/src/vs/workbench/api/browser/mainThreadCLICommands
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.ts
|
||||||
@@ -8,6 +8,7 @@ import { isWeb } from 'vs/base/common/pl
|
@@ -8,6 +8,7 @@ import { isWeb } from '../../../base/com
|
||||||
import { isString } from 'vs/base/common/types';
|
import { isString } from '../../../base/common/types.js';
|
||||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
import { URI, UriComponents } from '../../../base/common/uri.js';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from '../../../nls.js';
|
||||||
+import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
+import { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';
|
||||||
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
|
import { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands.js';
|
||||||
import { IExtensionGalleryService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionGalleryService, IExtensionManagementService } from '../../../platform/extensionManagement/common/extensionManagement.js';
|
||||||
import { ExtensionManagementCLI } from 'vs/platform/extensionManagement/common/extensionManagementCLI';
|
import { ExtensionManagementCLI } from '../../../platform/extensionManagement/common/extensionManagementCLI.js';
|
||||||
@@ -89,6 +90,11 @@ CommandsRegistry.registerCommand('_remot
|
@@ -89,6 +90,11 @@ CommandsRegistry.registerCommand('_remot
|
||||||
return lines.join('\n');
|
return lines.join('\n');
|
||||||
});
|
});
|
||||||
|
|
|
@ -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
|
||||||
@@ -314,6 +314,10 @@ export class Extension implements IExten
|
@@ -315,6 +315,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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,15 @@ 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
|
||||||
@@ -12,7 +12,7 @@ import * as path from 'vs/base/common/pa
|
@@ -12,7 +12,7 @@ import * as path from '../../base/common
|
||||||
import { IURITransformer } from 'vs/base/common/uriIpc';
|
import { IURITransformer } from '../../base/common/uriIpc.js';
|
||||||
import { getMachineId, getSqmMachineId, getdevDeviceId } from 'vs/base/node/id';
|
import { getMachineId, getSqmMachineId, getdevDeviceId } from '../../base/node/id.js';
|
||||||
import { Promises } from 'vs/base/node/pfs';
|
import { Promises } from '../../base/node/pfs.js';
|
||||||
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from 'vs/base/parts/ipc/common/ipc';
|
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
||||||
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc';
|
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
||||||
import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net';
|
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
|
import { ConfigurationService } from '../../platform/configuration/common/configurationService.js';
|
||||||
@@ -243,6 +243,9 @@ export async function setupServerService
|
@@ -243,6 +243,9 @@ export async function setupServerService
|
||||||
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
||||||
socketServer.registerChannel('extensions', channel);
|
socketServer.registerChannel('extensions', channel);
|
||||||
|
@ -51,9 +51,9 @@ Index: code-server/lib/vscode/src/vs/server/node/remoteLanguagePacks.ts
|
||||||
|
|
||||||
+import { promises as fs } from 'fs';
|
+import { promises as fs } from 'fs';
|
||||||
+import * as path from 'path';
|
+import * as path from 'path';
|
||||||
import { FileAccess } from 'vs/base/common/network';
|
import { FileAccess } from '../../base/common/network.js';
|
||||||
import { join } from 'vs/base/common/path';
|
import { join } from '../../base/common/path.js';
|
||||||
import type { INLSConfiguration } from 'vs/nls';
|
import type { INLSConfiguration } from '../../nls.js';
|
||||||
@@ -33,7 +35,94 @@ export async function getNLSConfiguratio
|
@@ -33,7 +35,94 @@ export async function getNLSConfiguratio
|
||||||
if (!result) {
|
if (!result) {
|
||||||
result = resolveNLSConfiguration({ userLocale: language, osLocale: language, commit: product.commit, userDataPath, nlsMetadataPath });
|
result = resolveNLSConfiguration({ userLocale: language, osLocale: language, commit: product.commit, userDataPath, nlsMetadataPath });
|
||||||
|
@ -153,14 +153,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
|
||||||
@@ -26,6 +26,7 @@ import { URI } from 'vs/base/common/uri'
|
@@ -26,6 +26,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 } from '../../base/common/types.js';
|
||||||
+import { getLocaleFromConfig, getBrowserNLSConfiguration } 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 { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
|
import { IExtensionManifest } from '../../platform/extensions/common/extensions.js';
|
||||||
import { isESM } from 'vs/base/common/amd';
|
import { isESM } from '../../base/common/amd.js';
|
||||||
@@ -99,6 +100,7 @@ export class WebClientServer {
|
@@ -99,6 +100,7 @@ export class WebClientServer {
|
||||||
private readonly _webExtensionResourceUrlTemplate: URI | undefined;
|
private readonly _webExtensionResourceUrlTemplate: URI | undefined;
|
||||||
|
|
||||||
|
@ -222,46 +222,21 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
|
|
||||||
/* ----- 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
|
|
||||||
@@ -52,7 +52,7 @@ import 'vs/workbench/services/dialogs/br
|
|
||||||
import 'vs/workbench/services/host/browser/browserHostService';
|
|
||||||
import 'vs/workbench/services/lifecycle/browser/lifecycleService';
|
|
||||||
import 'vs/workbench/services/clipboard/browser/clipboardService';
|
|
||||||
-import 'vs/workbench/services/localization/browser/localeService';
|
|
||||||
+import 'vs/workbench/services/localization/electron-sandbox/localeService';
|
|
||||||
import 'vs/workbench/services/path/browser/pathService';
|
|
||||||
import 'vs/workbench/services/themes/browser/browserHostColorSchemeService';
|
|
||||||
import 'vs/workbench/services/encryption/browser/encryptionService';
|
|
||||||
@@ -118,8 +118,9 @@ registerSingleton(ILanguagePackService,
|
|
||||||
// Logs
|
|
||||||
import 'vs/workbench/contrib/logs/browser/logs.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
|
||||||
@@ -5,18 +5,24 @@
|
@@ -5,18 +5,24 @@
|
||||||
|
|
||||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
import { CancellationTokenSource } from '../../../base/common/cancellation.js';
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from '../../../base/common/uri.js';
|
||||||
+import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
|
+import { ProxyChannel } from '../../../base/parts/ipc/common/ipc.js';
|
||||||
import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionGalleryService } from '../../extensionManagement/common/extensionManagement.js';
|
||||||
import { IExtensionResourceLoaderService } from 'vs/platform/extensionResourceLoader/common/extensionResourceLoader';
|
import { IExtensionResourceLoaderService } from '../../extensionResourceLoader/common/extensionResourceLoader.js';
|
||||||
-import { ILanguagePackItem, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks';
|
-import { ILanguagePackItem, LanguagePackBaseService } from '../common/languagePacks.js';
|
||||||
+import { ILanguagePackItem, ILanguagePackService, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks';
|
+import { ILanguagePackItem, ILanguagePackService, LanguagePackBaseService } from '../common/languagePacks.js';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from '../../log/common/log.js';
|
||||||
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
+import { IRemoteAgentService } from '../../../workbench/services/remote/common/remoteAgentService.js';
|
||||||
|
|
||||||
export class WebLanguagePacksService extends LanguagePackBaseService {
|
export class WebLanguagePacksService extends LanguagePackBaseService {
|
||||||
+ private readonly languagePackService: ILanguagePackService;
|
+ private readonly languagePackService: ILanguagePackService;
|
||||||
|
@ -313,7 +288,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
||||||
@@ -411,9 +411,6 @@ export class InstallAction extends Exten
|
@@ -433,9 +433,6 @@ export class InstallAction extends Exten
|
||||||
if (this.extension.isBuiltin) {
|
if (this.extension.isBuiltin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -323,7 +298,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||||
if (this.extension.state !== ExtensionState.Uninstalled) {
|
if (this.extension.state !== ExtensionState.Uninstalled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -695,7 +692,7 @@ export abstract class InstallInOtherServ
|
@@ -740,7 +737,7 @@ export abstract class InstallInOtherServ
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLanguagePackExtension(this.extension.local.manifest)) {
|
if (isLanguagePackExtension(this.extension.local.manifest)) {
|
||||||
|
@ -332,7 +307,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prefers to run on UI
|
// Prefers to run on UI
|
||||||
@@ -1951,17 +1948,6 @@ export class SetLanguageAction extends E
|
@@ -2001,17 +1998,6 @@ export class SetLanguageAction extends E
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.class = SetLanguageAction.DisabledClass;
|
this.class = SetLanguageAction.DisabledClass;
|
||||||
|
@ -350,7 +325,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||||
}
|
}
|
||||||
|
|
||||||
override async run(): Promise<any> {
|
override async run(): Promise<any> {
|
||||||
@@ -1978,7 +1964,6 @@ export class ClearLanguageAction extends
|
@@ -2028,7 +2014,6 @@ export class ClearLanguageAction extends
|
||||||
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
|
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -358,7 +333,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||||
@ILocaleService private readonly localeService: ILocaleService,
|
@ILocaleService private readonly localeService: ILocaleService,
|
||||||
) {
|
) {
|
||||||
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
|
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
|
||||||
@@ -1988,17 +1973,6 @@ export class ClearLanguageAction extends
|
@@ -2038,17 +2023,6 @@ export class ClearLanguageAction extends
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.class = ClearLanguageAction.DisabledClass;
|
this.class = ClearLanguageAction.DisabledClass;
|
||||||
|
@ -388,3 +363,16 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
// Process monitor
|
// Process monitor
|
||||||
'out-build/vs/base/node/cpuUsage.sh',
|
'out-build/vs/base/node/cpuUsage.sh',
|
||||||
|
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
|
||||||
|
@@ -52,7 +52,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-sandbox/localeService.js';
|
||||||
|
import './services/path/browser/pathService.js';
|
||||||
|
import './services/themes/browser/browserHostColorSchemeService.js';
|
||||||
|
import './services/encryption/browser/encryptionService.js';
|
||||||
|
|
|
@ -125,20 +125,20 @@ 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,11 +7,11 @@ import { Event } from 'vs/base/common/ev
|
@@ -7,11 +7,11 @@ import { Event } from '../../base/common
|
||||||
import { Disposable } from 'vs/base/common/lifecycle';
|
import { Disposable } from '../../base/common/lifecycle.js';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } 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 { InputFocusedContext, 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 } 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 } 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, IsEnabledFileDownloads, IsEnabledFileUploads } 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, IsEnabledFileDownloads, IsEnabledFileUploads } from '../common/contextkeys.js';
|
||||||
import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow } from 'vs/base/browser/dom';
|
import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow, isEditableElement } from '../../base/browser/dom.js';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
-import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
-import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.js';
|
||||||
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
|
+import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
|
||||||
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from 'vs/platform/workspace/common/workspace';
|
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from '../../platform/workspace/common/workspace.js';
|
||||||
import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService';
|
import { IWorkbenchLayoutService, Parts, positionToString } from '../services/layout/browser/layoutService.js';
|
||||||
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts';
|
import { getRemoteName } from '../../platform/remote/common/remoteHosts.js';
|
||||||
@@ -70,7 +70,7 @@ export class WorkbenchContextKeysHandler
|
@@ -70,7 +70,7 @@ export class WorkbenchContextKeysHandler
|
||||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||||
|
@ -164,15 +164,15 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
|
||||||
@@ -20,7 +20,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
|
@@ -20,7 +20,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
|
||||||
import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
import { AutoSaveAfterShortDelayContext } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
|
||||||
import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService';
|
import { WorkbenchListDoubleSelection, WorkbenchTreeFindOpen } from '../../../../platform/list/browser/listService.js';
|
||||||
import { Schemas } from 'vs/base/common/network';
|
import { Schemas } from '../../../../base/common/network.js';
|
||||||
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from 'vs/workbench/common/contextkeys';
|
-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 'vs/workbench/common/contextkeys';
|
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
|
||||||
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
|
import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';
|
||||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
|
||||||
import { ThemeIcon } from 'vs/base/common/themables';
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
||||||
@@ -566,13 +566,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -572,13 +572,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
id: DOWNLOAD_COMMAND_ID,
|
id: DOWNLOAD_COMMAND_ID,
|
||||||
title: DOWNLOAD_LABEL
|
title: DOWNLOAD_LABEL
|
||||||
},
|
},
|
||||||
|
@ -196,7 +196,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
||||||
)
|
)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -584,6 +587,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -590,6 +593,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
title: UPLOAD_LABEL,
|
title: UPLOAD_LABEL,
|
||||||
},
|
},
|
||||||
when: ContextKeyExpr.and(
|
when: ContextKeyExpr.and(
|
||||||
|
@ -222,16 +222,16 @@ Index: code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFi
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
|
||||||
@@ -18,7 +18,7 @@ import { IModelService } from 'vs/editor
|
@@ -18,7 +18,7 @@ import { IModelService } from '../../../
|
||||||
import { ILanguageService } from 'vs/editor/common/languages/language';
|
import { ILanguageService } from '../../../../editor/common/languages/language.js';
|
||||||
import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
|
import { getIconClasses } from '../../../../editor/common/services/getIconClasses.js';
|
||||||
import { Schemas } from 'vs/base/common/network';
|
import { Schemas } from '../../../../base/common/network.js';
|
||||||
-import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
-import { IWorkbenchEnvironmentService } from '../../environment/common/environmentService.js';
|
||||||
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
|
+import { IBrowserWorkbenchEnvironmentService } from '../../environment/browser/environmentService.js';
|
||||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';
|
||||||
import { IContextKeyService, IContextKey, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
import { IContextKeyService, IContextKey, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
|
||||||
import { equalsIgnoreCase, format, startsWithIgnoreCase } from 'vs/base/common/strings';
|
import { equalsIgnoreCase, format, startsWithIgnoreCase } from '../../../../base/common/strings.js';
|
||||||
@@ -143,7 +143,7 @@ export class SimpleFileDialog implements
|
@@ -139,7 +139,7 @@ export class SimpleFileDialog extends Di
|
||||||
@IFileDialogService private readonly fileDialogService: IFileDialogService,
|
@IFileDialogService private readonly fileDialogService: IFileDialogService,
|
||||||
@IModelService private readonly modelService: IModelService,
|
@IModelService private readonly modelService: IModelService,
|
||||||
@ILanguageService private readonly languageService: ILanguageService,
|
@ILanguageService private readonly languageService: ILanguageService,
|
||||||
|
@ -240,7 +240,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFi
|
||||||
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService,
|
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService,
|
||||||
@IPathService protected readonly pathService: IPathService,
|
@IPathService protected readonly pathService: IPathService,
|
||||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||||
@@ -286,20 +286,22 @@ export class SimpleFileDialog implements
|
@@ -283,20 +283,22 @@ export class SimpleFileDialog extends Di
|
||||||
this.filePickBox.sortByLabel = false;
|
this.filePickBox.sortByLabel = false;
|
||||||
this.filePickBox.ignoreFocusOut = true;
|
this.filePickBox.ignoreFocusOut = true;
|
||||||
this.filePickBox.ok = true;
|
this.filePickBox.ok = true;
|
||||||
|
@ -281,15 +281,15 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
|
||||||
@@ -65,6 +65,7 @@ import { timeout } from 'vs/base/common/
|
@@ -65,6 +65,7 @@ import { timeout } from '../../../../../
|
||||||
import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
import { IFilesConfigurationService } from '../../../../services/filesConfiguration/common/filesConfigurationService.js';
|
||||||
import { mainWindow } from 'vs/base/browser/window';
|
import { mainWindow } from '../../../../../base/browser/window.js';
|
||||||
import { IExplorerFileContribution, explorerFileContribRegistry } from 'vs/workbench/contrib/files/browser/explorerFileContrib';
|
import { IExplorerFileContribution, explorerFileContribRegistry } from '../explorerFileContrib.js';
|
||||||
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
|
+import { IBrowserWorkbenchEnvironmentService } from '../../../../services/environment/browser/environmentService.js';
|
||||||
|
|
||||||
export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
|
export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
|
||||||
|
|
||||||
@@ -1005,7 +1006,8 @@ export class FileDragAndDrop implements
|
@@ -1030,7 +1031,8 @@ export class FileDragAndDrop implements
|
||||||
@IConfigurationService private configurationService: IConfigurationService,
|
@IConfigurationService private configurationService: IConfigurationService,
|
||||||
@IInstantiationService private instantiationService: IInstantiationService,
|
@IInstantiationService private instantiationService: IInstantiationService,
|
||||||
@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
|
@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
|
||||||
|
@ -299,7 +299,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo
|
||||||
) {
|
) {
|
||||||
const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => {
|
const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => {
|
||||||
if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) {
|
if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) {
|
||||||
@@ -1230,15 +1232,17 @@ export class FileDragAndDrop implements
|
@@ -1255,15 +1257,17 @@ export class FileDragAndDrop implements
|
||||||
|
|
||||||
// External file DND (Import/Upload file)
|
// External file DND (Import/Upload file)
|
||||||
if (data instanceof NativeDragAndDropData) {
|
if (data instanceof NativeDragAndDropData) {
|
||||||
|
|
|
@ -14,21 +14,21 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
-import { $, Dimension, addDisposableListener, append, clearNode, reset } from 'vs/base/browser/dom';
|
-import { $, Dimension, addDisposableListener, append, clearNode, reset } from '../../../../base/browser/dom.js';
|
||||||
+import { $, Dimension, addDisposableListener, append, clearNode, reset, prepend } from 'vs/base/browser/dom';
|
+import { $, Dimension, addDisposableListener, append, clearNode, reset, prepend } from '../../../../base/browser/dom.js';
|
||||||
import { renderFormattedText } from 'vs/base/browser/formattedTextRenderer';
|
import { renderFormattedText } from '../../../../base/browser/formattedTextRenderer.js';
|
||||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';
|
||||||
import { Button } from 'vs/base/browser/ui/button/button';
|
import { Button } from '../../../../base/browser/ui/button/button.js';
|
||||||
@@ -54,7 +54,7 @@ import { IRecentFolder, IRecentWorkspace
|
@@ -54,7 +54,7 @@ import { IRecentFolder, IRecentWorkspace
|
||||||
import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions';
|
import { OpenRecentAction } from '../../../browser/actions/windowActions.js';
|
||||||
import { OpenFileFolderAction, OpenFolderAction, OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions';
|
import { OpenFileFolderAction, OpenFolderAction, OpenFolderViaWorkspaceAction } from '../../../browser/actions/workspaceActions.js';
|
||||||
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
|
import { EditorPane } from '../../../browser/parts/editor/editorPane.js';
|
||||||
-import { WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
-import { WorkbenchStateContext } from '../../../common/contextkeys.js';
|
||||||
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from 'vs/workbench/common/contextkeys';
|
+import { IsEnabledCoderGettingStarted, WorkbenchStateContext } from '../../../common/contextkeys.js';
|
||||||
import { IEditorOpenContext, IEditorSerializer } from 'vs/workbench/common/editor';
|
import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js';
|
||||||
import { IWebviewElement, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
|
import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js';
|
||||||
import 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors';
|
import './gettingStartedColors.js';
|
||||||
@@ -804,6 +804,72 @@ export class GettingStartedPage extends
|
@@ -820,6 +820,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"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ 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', {},);
|
||||||
|
|
||||||
@@ -839,6 +905,9 @@ export class GettingStartedPage extends
|
@@ -855,6 +921,9 @@ export class GettingStartedPage extends
|
||||||
recentList.setLimit(5);
|
recentList.setLimit(5);
|
||||||
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||||
}
|
}
|
||||||
|
@ -213,15 +213,15 @@ 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
|
@@ -7,7 +7,7 @@ import { Event } from '../../base/common
|
||||||
import { Disposable } from 'vs/base/common/lifecycle';
|
import { Disposable } from '../../base/common/lifecycle.js';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } 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 { InputFocusedContext, 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, IsEnabledFileDownloads, IsEnabledFileUploads } 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, IsEnabledFileDownloads, IsEnabledFileUploads } 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, IsEnabledFileDownloads, IsEnabledFileUploads, 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, IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, } from '../common/contextkeys.js';
|
||||||
import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow } from 'vs/base/browser/dom';
|
import { trackFocus, addDisposableListener, EventType, onDidRegisterWindow, getActiveWindow, isEditableElement } from '../../base/browser/dom.js';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
@@ -200,6 +200,7 @@ export class WorkbenchContextKeysHandler
|
@@ -200,6 +200,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)
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
|
@ -14,13 +14,13 @@ 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,43 @@ const errorReporter: ErrorReporter = {
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ 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,14 +176,14 @@ 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
|
||||||
@@ -64,6 +64,7 @@ import { IOpenerService } from 'vs/platf
|
@@ -64,6 +64,7 @@ import { IOpenerService } from '../../pl
|
||||||
import { mixin, safeStringify } from 'vs/base/common/objects';
|
import { mixin, safeStringify } from '../../base/common/objects.js';
|
||||||
import { IndexedDB } from 'vs/base/browser/indexedDB';
|
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 { ITelemetryService } from '../../platform/telemetry/common/telemetry.js';
|
||||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
import { IProgressService } from '../../platform/progress/common/progress.js';
|
||||||
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
|
import { DelayedLogChannel } from '../services/output/common/delayedLogChannel.js';
|
||||||
@@ -131,6 +132,9 @@ export class BrowserMain extends Disposa
|
@@ -131,6 +132,9 @@ export class BrowserMain extends Disposa
|
||||||
// Startup
|
// Startup
|
||||||
const instantiationService = workbench.startup();
|
const instantiationService = workbench.startup();
|
||||||
|
@ -276,7 +276,7 @@ Index: code-server/lib/vscode/src/server-main.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/server-main.js
|
--- code-server.orig/lib/vscode/src/server-main.js
|
||||||
+++ code-server/lib/vscode/src/server-main.js
|
+++ code-server/lib/vscode/src/server-main.js
|
||||||
@@ -339,4 +339,9 @@ function prompt(question) {
|
@@ -339,4 +339,15 @@ function prompt(question) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,4 +286,10 @@ Index: code-server/lib/vscode/src/server-main.js
|
||||||
+ return loadCode(nlsConfiguration);
|
+ return loadCode(nlsConfiguration);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+module.exports.loadCodeWithNls = loadCodeWithNls;
|
+// This alias prevents the name getting mangled during obfuscation which would
|
||||||
|
+// make it difficult to import.
|
||||||
|
+export { loadCodeWithNls as loadCodeWithNls };
|
||||||
|
+
|
||||||
|
+if (!process.env.CODE_SERVER_PARENT_PID) {
|
||||||
|
+ start();
|
||||||
|
+}
|
||||||
|
|
|
@ -20,7 +20,7 @@ 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 @@ import { URI } from 'vs/base/common/uri'
|
@@ -15,6 +15,7 @@ import { URI } from '../../base/common/u
|
||||||
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check': { type: 'boolean' },
|
'disable-update-check': { type: 'boolean' },
|
||||||
|
@ -53,14 +53,14 @@ 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';
|
||||||
|
|
|
@ -69,12 +69,12 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
|
||||||
@@ -15,7 +15,6 @@ import { getServiceMachineId } from 'vs/
|
@@ -15,7 +15,6 @@ import { getServiceMachineId } from '../
|
||||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
import { IStorageService } from '../../storage/common/storage.js';
|
||||||
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
|
import { TelemetryLevel } from '../../telemetry/common/telemetry.js';
|
||||||
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
import { getTelemetryLevel, supportsTelemetry } from '../../telemetry/common/telemetryUtils.js';
|
||||||
-import { RemoteAuthorities } from 'vs/base/common/network';
|
-import { RemoteAuthorities } from '../../../base/common/network.js';
|
||||||
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
|
import { TargetPlatform } from '../../extensions/common/extensions.js';
|
||||||
|
|
||||||
const WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT = '/web-extension-resource/';
|
const WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT = '/web-extension-resource/';
|
||||||
@@ -140,9 +139,9 @@ export abstract class AbstractExtensionR
|
@@ -140,9 +139,9 @@ export abstract class AbstractExtensionR
|
||||||
|
@ -90,18 +90,3 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Index: code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionDownloader.ts
|
|
||||||
===================================================================
|
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/extensionManagement/node/extensionDownloader.ts
|
|
||||||
+++ code-server/lib/vscode/src/vs/platform/extensionManagement/node/extensionDownloader.ts
|
|
||||||
@@ -114,7 +114,10 @@ export class ExtensionsDownloader extend
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ return false
|
|
||||||
+ // @ts-expect-error
|
|
||||||
const value = this.configurationService.getValue('extensions.verifySignature');
|
|
||||||
+ // @ts-expect-error
|
|
||||||
return isBoolean(value) ? value : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -97,12 +97,12 @@ 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
|
||||||
@@ -19,6 +19,7 @@ import { ISecretStorageProvider } from '
|
@@ -19,6 +19,7 @@ import { ISecretStorageProvider } from '
|
||||||
import { isFolderToOpen, isWorkspaceToOpen } from 'vs/platform/window/common/window';
|
import { isFolderToOpen, isWorkspaceToOpen } from '../../../platform/window/common/window.js';
|
||||||
import type { IWorkbenchConstructionOptions, IWorkspace, IWorkspaceProvider } from 'vs/workbench/browser/web.api';
|
import type { IWorkbenchConstructionOptions, IWorkspace, IWorkspaceProvider } from '../../../workbench/browser/web.api.js';
|
||||||
import { AuthenticationSessionInfo } from 'vs/workbench/services/authentication/browser/authenticationService';
|
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 'vs/workbench/services/url/browser/urlService';
|
import type { IURLCallbackProvider } from '../../../workbench/services/url/browser/urlService.js';
|
||||||
import { create } from 'vs/workbench/workbench.web.main';
|
import { create } from '../../../workbench/workbench.web.main.internal.js';
|
||||||
|
|
||||||
@@ -571,6 +572,39 @@ class WorkspaceProvider implements IWork
|
@@ -571,6 +572,39 @@ class WorkspaceProvider implements IWork
|
||||||
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
||||||
|
@ -148,12 +148,14 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExpl
|
||||||
===================================================================
|
===================================================================
|
||||||
--- 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
|
||||||
@@ -77,7 +77,7 @@ export class ForwardedPortsView extends
|
@@ -77,8 +77,8 @@ export class ForwardedPortsView extends
|
||||||
private async enableForwardedPortsView() {
|
private async enableForwardedPortsFeatures() {
|
||||||
this.contextKeyListener.clear();
|
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 (viewEnabled) {
|
if (featuresEnabled || viewEnabled) {
|
||||||
const viewContainer = await this.getViewContainer();
|
// Also enable the view if it isn't already.
|
||||||
|
|
|
@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
||||||
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
@@ -288,8 +288,7 @@ function packageTask(type, platform, arc
|
@@ -289,8 +289,7 @@ function packageTask(type, platform, arc
|
||||||
|
|
||||||
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
||||||
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
||||||
|
@ -20,7 +20,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
||||||
const isUIExtension = (manifest) => {
|
const isUIExtension = (manifest) => {
|
||||||
@@ -328,9 +327,9 @@ function packageTask(type, platform, arc
|
@@ -329,9 +328,9 @@ function packageTask(type, platform, arc
|
||||||
.map(name => `.build/extensions/${name}/**`);
|
.map(name => `.build/extensions/${name}/**`);
|
||||||
|
|
||||||
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
||||||
|
@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
let version = packageJson.version;
|
let version = packageJson.version;
|
||||||
const quality = product.quality;
|
const quality = product.quality;
|
||||||
@@ -504,7 +503,7 @@ function tweakProductForServerWeb(produc
|
@@ -505,7 +504,7 @@ function tweakProductForServerWeb(produc
|
||||||
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
||||||
optimizeTask,
|
optimizeTask,
|
||||||
util.rimraf(`out-vscode-${type}-min`),
|
util.rimraf(`out-vscode-${type}-min`),
|
||||||
|
|
|
@ -15,24 +15,23 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.ts
|
||||||
@@ -2,7 +2,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
-
|
|
||||||
+import * as _http from 'http';
|
+import * as _http from 'http';
|
||||||
import * as performance from 'vs/base/common/performance';
|
import * as performance from '../../../base/common/performance.js';
|
||||||
import { createApiFactoryAndRegisterActors } from 'vs/workbench/api/common/extHost.api.impl';
|
import { createApiFactoryAndRegisterActors } from '../common/extHost.api.impl.js';
|
||||||
import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterceptor';
|
import { RequireInterceptor } from '../common/extHostRequireInterceptor.js';
|
||||||
@@ -17,6 +17,7 @@ import { ExtensionRuntime } from 'vs/wor
|
@@ -17,6 +18,7 @@ import { ExtensionRuntime } from '../com
|
||||||
import { CLIServer } from 'vs/workbench/api/node/extHostCLIServer';
|
import { CLIServer } from './extHostCLIServer.js';
|
||||||
import { realpathSync } from 'vs/base/node/extpath';
|
import { realpathSync } from '../../../base/node/extpath.js';
|
||||||
import { ExtHostConsoleForwarder } from 'vs/workbench/api/node/extHostConsoleForwarder';
|
import { ExtHostConsoleForwarder } from './extHostConsoleForwarder.js';
|
||||||
+import { IExtHostWorkspace } from '../common/extHostWorkspace';
|
+import { IExtHostWorkspace } from '../common/extHostWorkspace.js';
|
||||||
import { ExtHostDiskFileSystemProvider } from 'vs/workbench/api/node/extHostDiskFileSystemProvider';
|
import { ExtHostDiskFileSystemProvider } from './extHostDiskFileSystemProvider.js';
|
||||||
// ESM-uncomment-begin
|
// ESM-uncomment-begin
|
||||||
// import { createRequire } from 'node:module';
|
import { createRequire } from 'node:module';
|
||||||
@@ -87,6 +88,52 @@ export class ExtHostExtensionService ext
|
@@ -101,6 +103,52 @@ export class ExtHostExtensionService ext
|
||||||
await interceptor.install();
|
await interceptor.install();
|
||||||
performance.mark('code/extHost/didInitAPI');
|
performance.mark('code/extHost/didInitAPI');
|
||||||
|
|
||||||
|
@ -84,7 +83,7 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extHostExtensionService.
|
||||||
+
|
+
|
||||||
// Do this when extension service exists, but extensions are not being activated yet.
|
// Do this when extension service exists, but extensions are not being activated yet.
|
||||||
const configProvider = await this._extHostConfiguration.getConfigProvider();
|
const configProvider = await this._extHostConfiguration.getConfigProvider();
|
||||||
await connectProxyResolver(this._extHostWorkspace, configProvider, this, this._logService, this._mainThreadTelemetryProxy, this._initData);
|
await connectProxyResolver(this._extHostWorkspace, configProvider, this, this._logService, this._mainThreadTelemetryProxy, this._initData, this._store);
|
||||||
Index: code-server/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
Index: code-server/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
||||||
|
@ -97,7 +96,7 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
||||||
import minimist from 'minimist';
|
import minimist from 'minimist';
|
||||||
import * as nativeWatchdog from 'native-watchdog';
|
import * as nativeWatchdog from 'native-watchdog';
|
||||||
import * as net from 'net';
|
import * as net from 'net';
|
||||||
@@ -421,7 +422,28 @@ async function startExtensionHostProcess
|
@@ -424,7 +425,28 @@ async function startExtensionHostProcess
|
||||||
);
|
);
|
||||||
|
|
||||||
// rewrite onTerminate-function to be a proper shutdown
|
// rewrite onTerminate-function to be a proper shutdown
|
||||||
|
|
|
@ -17,19 +17,19 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
|
|
||||||
import { hostname, release } from 'os';
|
import { hostname, release } from 'os';
|
||||||
+import { promises as fs } from 'fs';
|
+import { promises as fs } from 'fs';
|
||||||
import { Emitter, Event } from 'vs/base/common/event';
|
import { Emitter, Event } from '../../base/common/event.js';
|
||||||
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
import { DisposableStore, toDisposable } from '../../base/common/lifecycle.js';
|
||||||
import { Schemas } from 'vs/base/common/network';
|
import { Schemas } from '../../base/common/network.js';
|
||||||
@@ -65,6 +66,7 @@ import { IExtensionsScannerService } fro
|
@@ -65,6 +66,7 @@ import { IExtensionsScannerService } fro
|
||||||
import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService';
|
import { ExtensionsScannerService } from './extensionsScannerService.js';
|
||||||
import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService';
|
import { IExtensionsProfileScannerService } from '../../platform/extensionManagement/common/extensionsProfileScannerService.js';
|
||||||
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
|
import { IUserDataProfilesService } from '../../platform/userDataProfile/common/userDataProfile.js';
|
||||||
+import { TelemetryClient } from 'vs/server/node/telemetryClient';
|
+import { TelemetryClient } from './telemetryClient.js';
|
||||||
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
import { NullPolicyService } from '../../platform/policy/common/policy.js';
|
||||||
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
|
||||||
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
import { LoggerService } from '../../platform/log/node/loggerService.js';
|
||||||
@@ -151,11 +153,23 @@ export async function setupServerService
|
@@ -151,11 +153,23 @@ export async function setupServerService
|
||||||
const requestService = new RequestService(configurationService, environmentService, logService, loggerService);
|
const requestService = new RequestService(configurationService, environmentService, logService);
|
||||||
services.set(IRequestService, requestService);
|
services.set(IRequestService, requestService);
|
||||||
|
|
||||||
+ let isContainer = undefined;
|
+ let isContainer = undefined;
|
||||||
|
|
|
@ -14,10 +14,10 @@ Index: code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageS
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
|
||||||
@@ -18,6 +18,7 @@ import { AbstractStorageService, isProfi
|
@@ -18,6 +18,7 @@ import { AbstractStorageService, isProfi
|
||||||
import { isUserDataProfile, IUserDataProfile } from 'vs/platform/userDataProfile/common/userDataProfile';
|
import { isUserDataProfile, IUserDataProfile } from '../../../../platform/userDataProfile/common/userDataProfile.js';
|
||||||
import { IAnyWorkspaceIdentifier } from 'vs/platform/workspace/common/workspace';
|
import { IAnyWorkspaceIdentifier } from '../../../../platform/workspace/common/workspace.js';
|
||||||
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
|
import { IUserDataProfileService } from '../../userDataProfile/common/userDataProfile.js';
|
||||||
+import { hash } from 'vs/base/common/hash';
|
+import { hash } from '../../../../base/common/hash.js';
|
||||||
|
|
||||||
export class BrowserStorageService extends AbstractStorageService {
|
export class BrowserStorageService extends AbstractStorageService {
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@ 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,10 +1,16 @@
|
@@ -1,10 +1,16 @@
|
||||||
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 { 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 {
|
||||||
constructor (
|
constructor (
|
||||||
|
@ -117,8 +117,8 @@ 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,8 @@ import { memoize } from 'vs/base/common/
|
@@ -13,6 +13,8 @@ import { memoize } from '../../base/comm
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from '../../base/common/uri.js';
|
||||||
|
|
||||||
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
||||||
+ /* ----- code-server ----- */
|
+ /* ----- code-server ----- */
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
||||||
|
|
||||||
self.addEventListener("install", () => {
|
self.addEventListener("install", () => {
|
||||||
console.debug("[Service Worker] installed")
|
console.debug("[Service Worker] installed")
|
||||||
})
|
})
|
||||||
|
|
|
@ -49,7 +49,9 @@ export interface OpenCommandPipeArgs {
|
||||||
export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
|
export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
|
||||||
logger.debug("Running Code CLI")
|
logger.debug("Running Code CLI")
|
||||||
try {
|
try {
|
||||||
const mod = require(path.join(vsRootPath, "out/server-main")) as VSCodeModule
|
// See vscode.loadVSCode for more on this jank.
|
||||||
|
const modPath = path.join(vsRootPath, "out/server-main.js")
|
||||||
|
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
|
||||||
const serverModule = await mod.loadCodeWithNls()
|
const serverModule = await mod.loadCodeWithNls()
|
||||||
await serverModule.spawnCli(await toCodeArgs(args))
|
await serverModule.spawnCli(await toCodeArgs(args))
|
||||||
// Rather than have the caller handle errors and exit, spawnCli will exit
|
// Rather than have the caller handle errors and exit, spawnCli will exit
|
||||||
|
|
|
@ -41,19 +41,25 @@ export interface IVSCodeServerAPI {
|
||||||
*/
|
*/
|
||||||
export type VSCodeModule = {
|
export type VSCodeModule = {
|
||||||
// See ../../../lib/vscode/src/server-main.js:339.
|
// See ../../../lib/vscode/src/server-main.js:339.
|
||||||
loadCodeWithNls(): {
|
loadCodeWithNls(): Promise<{
|
||||||
// See ../../../lib/vscode/src/vs/server/node/server.main.ts:72.
|
// See ../../../lib/vscode/src/vs/server/node/server.main.ts:72.
|
||||||
createServer(address: string | net.AddressInfo | null, args: CodeArgs): Promise<IVSCodeServerAPI>
|
createServer(address: string | net.AddressInfo | null, args: CodeArgs): Promise<IVSCodeServerAPI>
|
||||||
// See ../../../lib/vscode/src/vs/server/node/server.main.ts:65.
|
// See ../../../lib/vscode/src/vs/server/node/server.main.ts:65.
|
||||||
spawnCli(args: CodeArgs): Promise<void>
|
spawnCli(args: CodeArgs): Promise<void>
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load then create the VS Code server.
|
* Load then create the VS Code server.
|
||||||
*/
|
*/
|
||||||
async function loadVSCode(req: express.Request): Promise<IVSCodeServerAPI> {
|
async function loadVSCode(req: express.Request): Promise<IVSCodeServerAPI> {
|
||||||
const mod = require(path.join(vsRootPath, "out/server-main")) as VSCodeModule
|
// Since server-main.js is an ES module, we have to use `import`. However,
|
||||||
|
// tsc will transpile this to `require` unless we change our module type,
|
||||||
|
// which will also require that we switch to ESM, since a hybrid approach
|
||||||
|
// breaks importing `rotating-file-stream` for some reason. To work around
|
||||||
|
// this, use `eval` for now, but we should consider switching to ESM.
|
||||||
|
const modPath = path.join(vsRootPath, "out/server-main.js")
|
||||||
|
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
|
||||||
const serverModule = await mod.loadCodeWithNls()
|
const serverModule = await mod.loadCodeWithNls()
|
||||||
return serverModule.createServer(null, {
|
return serverModule.createServer(null, {
|
||||||
...(await toCodeArgs(req.args)),
|
...(await toCodeArgs(req.args)),
|
||||||
|
|
|
@ -47,7 +47,7 @@ export class SocketProxyProvider {
|
||||||
proxy.once("connect", () => proxy.write(id))
|
proxy.once("connect", () => proxy.write(id))
|
||||||
|
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
listener.dispose() // eslint-disable-line @typescript-eslint/no-use-before-define
|
listener.dispose()
|
||||||
socket.destroy()
|
socket.destroy()
|
||||||
proxy.destroy()
|
proxy.destroy()
|
||||||
reject(new Error("TLS socket proxy timed out"))
|
reject(new Error("TLS socket proxy timed out"))
|
||||||
|
|
|
@ -37,7 +37,6 @@ export async function makeEditorSessionManagerServer(
|
||||||
): Promise<http.Server> {
|
): Promise<http.Server> {
|
||||||
const router = express()
|
const router = express()
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-named-as-default-member
|
|
||||||
router.use(express.json())
|
router.use(express.json())
|
||||||
|
|
||||||
router.get<{}, GetSessionResponse | string | unknown, undefined, { filePath?: string }>(
|
router.get<{}, GetSessionResponse | string | unknown, undefined, { filePath?: string }>(
|
||||||
|
|
|
@ -54,5 +54,4 @@ export function Router(): WebsocketRouter {
|
||||||
return new WebsocketRouter()
|
return new WebsocketRouter()
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-named-as-default-member -- the typings are not updated correctly
|
|
||||||
export const wss = new Websocket.Server({ noServer: true })
|
export const wss = new Websocket.Server({ noServer: true })
|
||||||
|
|
|
@ -11,11 +11,9 @@ function runTestExtensionTests() {
|
||||||
await codeServerPage.waitForTestExtensionLoaded()
|
await codeServerPage.waitForTestExtensionLoaded()
|
||||||
await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI")
|
await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI")
|
||||||
|
|
||||||
await codeServerPage.page.waitForSelector("text=proxyUri", { timeout: 3000 })
|
// Remove end slash in address.
|
||||||
const text = await codeServerPage.page.locator("text=proxyUri").first().textContent()
|
|
||||||
// Remove end slash in address
|
|
||||||
const normalizedAddress = address.replace(/\/+$/, "")
|
const normalizedAddress = address.replace(/\/+$/, "")
|
||||||
expect(text).toBe(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}/`)
|
await codeServerPage.page.getByText(`Info: proxyUri: ${normalizedAddress}/proxy/{{port}}/`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"name": "code-server-extension",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "code-server-extension",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/vscode": "^1.56.0",
|
||||||
|
"typescript": "^5.6.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"vscode": "^1.56.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/vscode": {
|
||||||
|
"version": "1.94.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.94.0.tgz",
|
||||||
|
"integrity": "sha512-UyQOIUT0pb14XSqJskYnRwD2aG0QrPVefIfrW1djR+/J4KeFQ0i1+hjZoaAmeNf3Z2jleK+R2hv+EboG/m8ruw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/typescript": {
|
||||||
|
"version": "5.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
||||||
|
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.17"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,7 +27,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/vscode": "^1.56.0",
|
"@types/vscode": "^1.56.0",
|
||||||
"typescript": "^4.0.5"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@types/vscode@^1.56.0":
|
|
||||||
version "1.57.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.57.0.tgz#cc648e0573b92f725cd1baf2621f8da9f8bc689f"
|
|
||||||
integrity sha512-FeznBFtIDCWRluojTsi9c3LLcCHOXP5etQfBK42+ixo1CoEAchkw39tuui9zomjZuKfUVL33KZUDIwHZ/xvOkQ==
|
|
||||||
|
|
||||||
typescript@^4.0.5:
|
|
||||||
version "4.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
|
|
||||||
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
|
|
|
@ -18,11 +18,8 @@ describe("Webviews", ["--disable-workspace-trust"], {}, () => {
|
||||||
|
|
||||||
// It's an iframe within an iframe
|
// It's an iframe within an iframe
|
||||||
// so we have to do .frameLocator twice
|
// so we have to do .frameLocator twice
|
||||||
const renderedText = await codeServerPage.page
|
await expect(
|
||||||
.frameLocator("iframe.webview.ready")
|
codeServerPage.page.frameLocator("iframe.webview.ready").frameLocator("#active-frame").getByText("Hello world"),
|
||||||
.frameLocator("#active-frame")
|
).toBeVisible()
|
||||||
.locator("text=Hello world")
|
|
||||||
|
|
||||||
expect(renderedText).toBeVisible
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,12 +3,12 @@ import { PlaywrightTestConfig } from "@playwright/test"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
|
|
||||||
// The default configuration runs all tests in three browsers with workers equal
|
// The default configuration runs all tests in three browsers with workers equal
|
||||||
// to half the available threads. See 'yarn test:e2e --help' to customize from
|
// to half the available threads. See 'npm run test:e2e --help' to customize
|
||||||
// the command line. For example:
|
// from the command line. For example:
|
||||||
// yarn test:e2e --workers 1 # Run with one worker
|
// npm run test:e2e --workers 1 # Run with one worker
|
||||||
// yarn test:e2e --project Chromium # Only run on Chromium
|
// npm run test:e2e --project Chromium # Only run on Chromium
|
||||||
// yarn test:e2e --grep login # Run tests matching "login"
|
// npm run test:e2e --grep login # Run tests matching "login"
|
||||||
// PWDEBUG=1 yarn test:e2e # Run Playwright inspector
|
// PWDEBUG=1 npm run test:e2e # Run Playwright inspector
|
||||||
const config: PlaywrightTestConfig = {
|
const config: PlaywrightTestConfig = {
|
||||||
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
|
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
|
||||||
timeout: 60000, // Each test is given 60 seconds.
|
timeout: 60000, // Each test is given 60 seconds.
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe("SocketProxyProvider", () => {
|
||||||
resolved[type] = true
|
resolved[type] = true
|
||||||
if (resolved.client && resolved.server) {
|
if (resolved.client && resolved.server) {
|
||||||
// We don't need any more connections.
|
// We don't need any more connections.
|
||||||
main.close() // eslint-disable-line @typescript-eslint/no-use-before-define
|
main.close()
|
||||||
_resolve()
|
_resolve()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
out/index.js: src/index.ts
|
out/index.js: src/index.ts
|
||||||
# Typescript always emits, even on errors.
|
# Typescript always emits, even on errors.
|
||||||
yarn build || rm out/index.js
|
npm run build || rm out/index.js
|
||||||
|
|
||||||
node_modules: package.json yarn.lock
|
node_modules: package.json package-lock.json
|
||||||
yarn
|
npm install
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
"name": "test-plugin",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/body-parser": {
|
||||||
|
"version": "1.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz",
|
||||||
|
"integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/connect": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
},
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/connect": {
|
||||||
|
"version": "3.4.33",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz",
|
||||||
|
"integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
},
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/express": {
|
||||||
|
"version": "4.17.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.8.tgz",
|
||||||
|
"integrity": "sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/body-parser": "*",
|
||||||
|
"@types/express-serve-static-core": "*",
|
||||||
|
"@types/qs": "*",
|
||||||
|
"@types/serve-static": "*"
|
||||||
|
},
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/express-serve-static-core": {
|
||||||
|
"version": "4.17.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz",
|
||||||
|
"integrity": "sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"@types/qs": "*",
|
||||||
|
"@types/range-parser": "*"
|
||||||
|
},
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/mime": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "14.14.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz",
|
||||||
|
"integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/qs": {
|
||||||
|
"version": "6.9.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz",
|
||||||
|
"integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/range-parser": {
|
||||||
|
"version": "1.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz",
|
||||||
|
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/serve-static": {
|
||||||
|
"version": "1.13.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.6.tgz",
|
||||||
|
"integrity": "sha512-nuRJmv7jW7VmCVTn+IgYDkkbbDGyIINOeu/G0d74X3lm6E5KfMeQPJhxIt1ayQeQB3cSxvYs1RA/wipYoFB4EA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/mime": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
},
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "4.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz",
|
||||||
|
"integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,70 +0,0 @@
|
||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@types/body-parser@*":
|
|
||||||
version "1.19.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f"
|
|
||||||
integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==
|
|
||||||
dependencies:
|
|
||||||
"@types/connect" "*"
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/connect@*":
|
|
||||||
version "3.4.33"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546"
|
|
||||||
integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/express-serve-static-core@*":
|
|
||||||
version "4.17.13"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz#d9af025e925fc8b089be37423b8d1eac781be084"
|
|
||||||
integrity sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "*"
|
|
||||||
"@types/qs" "*"
|
|
||||||
"@types/range-parser" "*"
|
|
||||||
|
|
||||||
"@types/express@^4.17.8":
|
|
||||||
version "4.17.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.8.tgz#3df4293293317e61c60137d273a2e96cd8d5f27a"
|
|
||||||
integrity sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ==
|
|
||||||
dependencies:
|
|
||||||
"@types/body-parser" "*"
|
|
||||||
"@types/express-serve-static-core" "*"
|
|
||||||
"@types/qs" "*"
|
|
||||||
"@types/serve-static" "*"
|
|
||||||
|
|
||||||
"@types/mime@*":
|
|
||||||
version "2.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.3.tgz#c893b73721db73699943bfc3653b1deb7faa4a3a"
|
|
||||||
integrity sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==
|
|
||||||
|
|
||||||
"@types/node@*":
|
|
||||||
version "14.14.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.6.tgz#146d3da57b3c636cc0d1769396ce1cfa8991147f"
|
|
||||||
integrity sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==
|
|
||||||
|
|
||||||
"@types/qs@*":
|
|
||||||
version "6.9.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b"
|
|
||||||
integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==
|
|
||||||
|
|
||||||
"@types/range-parser@*":
|
|
||||||
version "1.2.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
|
|
||||||
integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
|
|
||||||
|
|
||||||
"@types/serve-static@*":
|
|
||||||
version "1.13.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.6.tgz#866b1b8dec41c36e28c7be40ac725b88be43c5c1"
|
|
||||||
integrity sha512-nuRJmv7jW7VmCVTn+IgYDkkbbDGyIINOeu/G0d74X3lm6E5KfMeQPJhxIt1ayQeQB3cSxvYs1RA/wipYoFB4EA==
|
|
||||||
dependencies:
|
|
||||||
"@types/mime" "*"
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
typescript@^4.0.5:
|
|
||||||
version "4.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
|
|
||||||
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==
|
|
3187
test/yarn.lock
3187
test/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue