mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-12 00:37:19 +10:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70082e0f0f | ||
|
|
e9ea41fcfa | ||
|
|
014d9a339d | ||
|
|
4855694fd6 | ||
|
|
e480df5b1f | ||
|
|
0932463dfb | ||
|
|
65e376786f | ||
|
|
afe72aba83 | ||
|
|
bff2e71e55 | ||
|
|
966ae12699 | ||
|
|
843ef66728 | ||
|
|
8336a4c7ad | ||
|
|
1eff01d6f0 | ||
|
|
db8d1e7a8d | ||
|
|
c741ae3347 | ||
|
|
becd52f518 | ||
|
|
7ee4f2f735 | ||
|
|
3208188249 | ||
|
|
be445bcba6 | ||
|
|
3277bd4fa1 | ||
|
|
08b0b1b3e5 | ||
|
|
c46abc14ee |
44
.github/workflows/linux.yml
vendored
44
.github/workflows/linux.yml
vendored
@@ -27,20 +27,20 @@ jobs:
|
||||
- vscode_arch: arm64
|
||||
npm_arch: arm64
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-arm64
|
||||
- vscode_arch: armhf
|
||||
npm_arch: armv7l
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||
# - vscode_arch: armhf
|
||||
# npm_arch: armv7l
|
||||
# image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install GH
|
||||
run: ./install_gh.sh
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
if: env.SHOULD_BUILD == 'yes'
|
||||
|
||||
- name: Cache yarn directory
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||
@@ -107,10 +107,10 @@ jobs:
|
||||
matrix:
|
||||
platform:
|
||||
- amd64
|
||||
- arm64
|
||||
# - arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check version
|
||||
run: ./stores/snapcraft/check_version.sh
|
||||
@@ -118,23 +118,27 @@ jobs:
|
||||
ARCHITECTURE: ${{ matrix.platform }}
|
||||
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
|
||||
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
|
||||
if: env.SHOULD_DEPLOY == 'yes'
|
||||
# - uses: docker/setup-qemu-action@v1
|
||||
# if: env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
- uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||
# - uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||
# with:
|
||||
# path: stores/snapcraft
|
||||
# architecture: ${{ matrix.platform }}
|
||||
# id: build
|
||||
# if: env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
# - uses: diddlesnaps/snapcraft-review-action@v1
|
||||
# with:
|
||||
# snap: ${{ steps.build.outputs.snap }}
|
||||
# isClassic: 'true'
|
||||
# if: env.SHOULD_DEPLOY == 'yes'
|
||||
- uses: snapcore/action-build@v1
|
||||
with:
|
||||
path: stores/snapcraft
|
||||
architecture: ${{ matrix.platform }}
|
||||
id: build
|
||||
if: env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
- uses: diddlesnaps/snapcraft-review-action@v1
|
||||
with:
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
isClassic: 'true'
|
||||
if: env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
- uses: snapcore/action-publish@v1
|
||||
with:
|
||||
|
||||
29
.github/workflows/macos.yml
vendored
29
.github/workflows/macos.yml
vendored
@@ -10,28 +10,28 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- vscode_arch: x64
|
||||
os: macOS-10.15
|
||||
# - vscode_arch: arm64
|
||||
# os: macOS-11
|
||||
- runner: macOS-10.15
|
||||
vscode_arch: x64
|
||||
- runner: [self-hosted, macOS, ARM64]
|
||||
vscode_arch: arm64
|
||||
|
||||
env:
|
||||
OS_NAME: "osx"
|
||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
|
||||
- name: Clone VSCode repo
|
||||
run: . get_repo.sh
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
if: env.SHOULD_BUILD == 'yes'
|
||||
|
||||
- name: Cache yarn directory
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||
export CERTIFICATE_P12=VSCodium.p12
|
||||
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
|
||||
export KEYCHAIN=build.keychain
|
||||
export KEYCHAIN=$RUNNER_TEMP/build.keychain
|
||||
security create-keychain -p mysecretpassword $KEYCHAIN
|
||||
security default-keychain -s $KEYCHAIN
|
||||
security unlock-keychain -p mysecretpassword $KEYCHAIN
|
||||
@@ -106,3 +106,12 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
||||
|
||||
- name: Clean up keychain
|
||||
if: always()
|
||||
run: |
|
||||
KEYCHAIN=$RUNNER_TEMP/build.keychain
|
||||
|
||||
if [ -f "$KEYCHAIN" ];
|
||||
then
|
||||
security delete-keychain $KEYCHAIN
|
||||
fi
|
||||
|
||||
21
.github/workflows/windows.yml
vendored
21
.github/workflows/windows.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2016
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@@ -20,23 +20,26 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vscode_arch: [x64, ia32, arm64]
|
||||
vscode_arch:
|
||||
- x64
|
||||
# - ia32
|
||||
- arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Setup Python 2
|
||||
uses: actions/setup-python@v2
|
||||
- name: Setup Python 3
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '2.x'
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Clone VSCode repo
|
||||
run: ./get_repo.sh
|
||||
@@ -61,7 +64,7 @@ jobs:
|
||||
if: env.SHOULD_BUILD == 'yes'
|
||||
|
||||
- name: Cache yarn directory
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ VS*/*
|
||||
build/linux/appimage/out
|
||||
build/linux/appimage/pkg2appimage.AppDir
|
||||
build/linux/appimage/pkg2appimage-*.AppImage
|
||||
build/linux/appimage/squashfs-root
|
||||
build/linux/appimage/VSCodium
|
||||
build/windows/msi/releasedir
|
||||
build/windows/rtf/Readme (Abridged).txt
|
||||
|
||||
@@ -2,45 +2,122 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at vscodium@protonmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
vscodium@protonmail.com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
|
||||
@@ -8,12 +8,15 @@
|
||||
<div id="badges" align="center">
|
||||
|
||||
[](https://github.com/vscodium/vscodium/releases)
|
||||
[](https://dev.azure.com/vscodium/VSCodium/_build?definitionId=1)
|
||||
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
||||
[](https://gitter.im/VSCodium/Lobby)
|
||||
[](https://snapcraft.io/codium)
|
||||
[](https://snapcraft.io/codium)
|
||||
|
||||
[](https://github.com/VSCodium/vscodium/actions/workflows/linux.yml?query=branch%3Amaster)
|
||||
[](https://github.com/VSCodium/vscodium/actions/workflows/macos.yml?query=branch%3Amaster)
|
||||
[](https://github.com/VSCodium/vscodium/actions/workflows/windows.yml?query=branch%3Amaster)
|
||||
|
||||
</div>
|
||||
|
||||
**This is not a fork. This is a repository of scripts to automatically build Microsoft's `vscode` repository into freely-licensed binaries with a community-driven default configuration.**
|
||||
|
||||
1
build.sh
1
build.sh
@@ -4,6 +4,7 @@ set -ex
|
||||
|
||||
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
npm config set scripts-prepend-node-path true
|
||||
npm config set node_gyp
|
||||
|
||||
echo "MS_COMMIT: ${MS_COMMIT}"
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ script:
|
||||
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
||||
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
||||
- rm -rf usr/lib/x86_64-linux-gnu
|
||||
- rm -f lib/x86_64-linux-gnu/libglib*
|
||||
- cat > AppRun <<\EOF
|
||||
- #!/bin/sh
|
||||
- HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
## <a id="dependencies"></a>Dependencies
|
||||
|
||||
- node 14
|
||||
- node 16
|
||||
- yarn
|
||||
- jq
|
||||
- git
|
||||
@@ -40,7 +40,7 @@
|
||||
- sed
|
||||
- 7z
|
||||
- [WiX Toolset](http://wixtoolset.org/releases/)
|
||||
- python2
|
||||
- python3
|
||||
- 'Tools for Native Modules' from official Node.js installer
|
||||
|
||||
## <a id="build-scripts"></a>Build Scripts
|
||||
@@ -62,7 +62,7 @@ docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-b
|
||||
|
||||
When inside the container, you can use the following commands to build:
|
||||
```
|
||||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs desktop-file-utils
|
||||
|
||||
npm install -g yarn
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
||||
index 1a73ae9..1b87189 100644
|
||||
index 81ba509..59041e2 100644
|
||||
--- a/build/gulpfile.vscode.win32.js
|
||||
+++ b/build/gulpfile.vscode.win32.js
|
||||
@@ -126,7 +126,7 @@ defineWin32SetupTasks('arm64', 'user');
|
||||
|
||||
@@ -137,7 +137,7 @@ defineWin32SetupTasks('arm64', 'user');
|
||||
*/
|
||||
function archiveWin32Setup(arch) {
|
||||
return cb => {
|
||||
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
||||
|
||||
36
patches/fix-build-rpm.patch
Normal file
36
patches/fix-build-rpm.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
diff --git a/build/linux/rpm/dependencies-generator.js b/build/linux/rpm/dependencies-generator.js
|
||||
index 1d91eb8..ed6b775 100644
|
||||
--- a/build/linux/rpm/dependencies-generator.js
|
||||
+++ b/build/linux/rpm/dependencies-generator.js
|
||||
@@ -16,7 +16,7 @@ const dep_lists_1 = require("./dep-lists");
|
||||
// If true, we fail the build if there are new dependencies found during that task.
|
||||
// The reference dependencies, which one has to update when the new dependencies
|
||||
// are valid, are in dep-lists.ts
|
||||
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
|
||||
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
|
||||
function getDependencies(buildDir, applicationName, arch) {
|
||||
// Get the files for which we want to find dependencies.
|
||||
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
|
||||
diff --git a/build/linux/rpm/dependencies-generator.ts b/build/linux/rpm/dependencies-generator.ts
|
||||
index 95953ec..f5ffc2e 100644
|
||||
--- a/build/linux/rpm/dependencies-generator.ts
|
||||
+++ b/build/linux/rpm/dependencies-generator.ts
|
||||
@@ -18,7 +18,7 @@ import { ArchString } from './types';
|
||||
// If true, we fail the build if there are new dependencies found during that task.
|
||||
// The reference dependencies, which one has to update when the new dependencies
|
||||
// are valid, are in dep-lists.ts
|
||||
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
|
||||
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;
|
||||
|
||||
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString): string[] {
|
||||
// Get the files for which we want to find dependencies.
|
||||
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
|
||||
index 5b7eadb..87c914d 100644
|
||||
--- a/resources/linux/rpm/code.spec.template
|
||||
+++ b/resources/linux/rpm/code.spec.template
|
||||
@@ -74,3 +74,5 @@ update-mime-database /usr/share/mime &> /dev/null || :
|
||||
/usr/share/pixmaps/@@ICON@@.png
|
||||
/usr/share/bash-completion/completions/@@NAME@@
|
||||
/usr/share/zsh/site-functions/_@@NAME@@
|
||||
+
|
||||
+%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json
|
||||
@@ -1,8 +0,0 @@
|
||||
--- vscode/resources/linux/rpm/code.spec.template 2021-03-02 19:26:53.000000000 +0100
|
||||
+++ vscode/resources/linux/rpm/code.spec.template.new 2021-03-02 19:28:12.000000000 +0100
|
||||
@@ -69,3 +69,5 @@
|
||||
/usr/share/pixmaps/@@ICON@@.png
|
||||
/usr/share/bash-completion/completions/@@NAME@@
|
||||
/usr/share/zsh/site-functions/_@@NAME@@
|
||||
+
|
||||
+%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
||||
index 92313d0..a69da37 100644
|
||||
index c366ff3..75f32da 100644
|
||||
--- a/extensions/github-authentication/src/githubServer.ts
|
||||
+++ b/extensions/github-authentication/src/githubServer.ts
|
||||
@@ -3,41 +3,13 @@
|
||||
@@ -3,27 +3,13 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -15,39 +15,27 @@ index 92313d0..a69da37 100644
|
||||
import { AuthProviderType } from './github';
|
||||
import { Log } from './common/logger';
|
||||
-import { isSupportedEnvironment } from './common/env';
|
||||
-import { LoopbackAuthServer } from './authServer';
|
||||
-import path = require('path');
|
||||
-
|
||||
-const localize = nls.loadMessageBundle();
|
||||
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
||||
-const GITHUB_AUTHORIZE_URL = 'https://github.com/login/oauth/authorize';
|
||||
-// TODO: change to stable when that happens
|
||||
-const GITHUB_TOKEN_URL = 'https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token';
|
||||
-const NETWORK_ERROR = 'network error';
|
||||
|
||||
const NETWORK_ERROR = 'network error';
|
||||
-const AUTH_RELAY_SERVER = 'vscode-auth.github.com';
|
||||
-// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com';
|
||||
-
|
||||
-class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
||||
- constructor(private readonly Logger: Log) {
|
||||
- super();
|
||||
- }
|
||||
-
|
||||
- public handleUri(uri: vscode.Uri) {
|
||||
- this.Logger.trace('Handling Uri...');
|
||||
- this.fire(uri);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-function parseQuery(uri: vscode.Uri) {
|
||||
- return uri.query.split('&').reduce((prev: any, current) => {
|
||||
- const queryString = current.split('=');
|
||||
- prev[queryString[0]] = queryString[1];
|
||||
- return prev;
|
||||
- }, {});
|
||||
-}
|
||||
-const REDIRECT_URL_STABLE = 'https://vscode.dev/redirect';
|
||||
-const REDIRECT_URL_INSIDERS = 'https://insiders.vscode.dev/redirect';
|
||||
+const NETWORK_ERROR = 'network error';
|
||||
|
||||
export interface IGitHubServer extends vscode.Disposable {
|
||||
login(scopes: string): Promise<string>;
|
||||
@@ -47,13 +19,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
||||
class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
||||
constructor(private readonly Logger: Log) {
|
||||
@@ -43,14 +29,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
||||
friendlyName: string;
|
||||
type: AuthProviderType;
|
||||
}
|
||||
|
||||
-
|
||||
-interface IGitHubDeviceCodeResponse {
|
||||
- device_code: string;
|
||||
- user_code: string;
|
||||
@@ -58,102 +46,182 @@ index 92313d0..a69da37 100644
|
||||
async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
|
||||
try {
|
||||
logger.info('Getting token scopes...');
|
||||
@@ -115,315 +80,49 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
||||
export class GitHubServer implements IGitHubServer {
|
||||
@@ -118,23 +96,11 @@ export class GitHubServer implements IGitHubServer {
|
||||
friendlyName = 'GitHub';
|
||||
type = AuthProviderType.github;
|
||||
- private _statusBarItem: vscode.StatusBarItem | undefined;
|
||||
- private _onDidManuallyProvideToken = new vscode.EventEmitter<string | undefined>();
|
||||
-
|
||||
- private _pendingStates = new Map<string, string[]>();
|
||||
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||
- private _statusBarCommandId = `${this.type}.provide-manually`;
|
||||
- private _disposable: vscode.Disposable;
|
||||
- private _uriHandler = new UriEventHandler(this._logger);
|
||||
|
||||
constructor(private readonly _supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||
- this._disposable = vscode.Disposable.from(
|
||||
- vscode.commands.registerCommand(this._statusBarCommandId, () => this.manuallyProvideUri()),
|
||||
- vscode.window.registerUriHandler(this._uriHandler));
|
||||
+ this._supportDeviceCodeFlow;
|
||||
- private _pendingNonces = new Map<string, string[]>();
|
||||
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||
private _disposable: vscode.Disposable;
|
||||
private _uriHandler = new UriEventHandler(this._logger);
|
||||
- private readonly getRedirectEndpoint: Thenable<string>;
|
||||
|
||||
- constructor(private readonly _supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||
+ constructor(_supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||
this._disposable = vscode.window.registerUriHandler(this._uriHandler);
|
||||
-
|
||||
- this.getRedirectEndpoint = vscode.commands.executeCommand<{ [providerId: string]: string } | undefined>('workbench.getCodeExchangeProxyEndpoints').then((proxyEndpoints) => {
|
||||
- // If we are running in insiders vscode.dev, then ensure we use the redirect route on that.
|
||||
- let redirectUri = REDIRECT_URL_STABLE;
|
||||
- if (proxyEndpoints?.github && new URL(proxyEndpoints.github).hostname === 'insiders.vscode.dev') {
|
||||
- redirectUri = REDIRECT_URL_INSIDERS;
|
||||
- }
|
||||
- return redirectUri;
|
||||
- });
|
||||
}
|
||||
|
||||
dispose() {
|
||||
- this._disposable.dispose();
|
||||
- }
|
||||
@@ -152,181 +118,17 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
// Used for showing a friendlier message to the user when the explicitly cancel a flow.
|
||||
let userCancelled: boolean | undefined;
|
||||
- const yes = localize('yes', "Yes");
|
||||
- const no = localize('no', "No");
|
||||
- const promptToContinue = async () => {
|
||||
- if (userCancelled === undefined) {
|
||||
- // We haven't had a failure yet so wait to prompt
|
||||
- return;
|
||||
- }
|
||||
- const message = userCancelled
|
||||
- ? localize('userCancelledMessage', "Having trouble logging in? Would you like to try a different way?")
|
||||
- : localize('otherReasonMessage', "You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?");
|
||||
- const result = await vscode.window.showWarningMessage(message, yes, no);
|
||||
- if (result !== yes) {
|
||||
- throw new Error('Cancelled');
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- // TODO@joaomoreno TODO@TylerLeonhardt
|
||||
- private async isNoCorsEnvironment(): Promise<boolean> {
|
||||
- const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
||||
- return (uri.scheme === 'https' && /^((insiders\.)?vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||
- const nonce = uuid();
|
||||
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate?nonce=${encodeURIComponent(nonce)}`));
|
||||
-
|
||||
- const supported = isSupportedEnvironment(callbackUri);
|
||||
- if (supported) {
|
||||
- try {
|
||||
- return await this.doLoginWithoutLocalServer(scopes, nonce, callbackUri);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Starting a local server isn't supported in web
|
||||
- if (vscode.env.uiKind === vscode.UIKind.Desktop) {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginWithLocalServer(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- }
|
||||
|
||||
- if (this._supportDeviceCodeFlow) {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginDeviceCodeFlow(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- } else if (!supported) {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginWithPat(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
+ try {
|
||||
+ return await this.doLoginWithPat(scopes);
|
||||
+ } catch (e) {
|
||||
+ this._logger.error(e);
|
||||
+ userCancelled = e.message ?? e === 'User Cancelled';
|
||||
}
|
||||
|
||||
throw new Error(userCancelled ? 'Cancelled' : 'No auth flow succeeded.');
|
||||
}
|
||||
|
||||
public async login(scopes: string): Promise<string> {
|
||||
this._logger.info(`Logging in for the following scopes: ${scopes}`);
|
||||
|
||||
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
|
||||
- private async doLoginWithoutLocalServer(scopes: string, nonce: string, callbackUri: vscode.Uri): Promise<string> {
|
||||
- this._logger.info(`Trying without local server... (${scopes})`);
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- title: localize('signingIn', "Signing in to github.com..."),
|
||||
- cancellable: true
|
||||
- }, async (_, token) => {
|
||||
- const existingNonces = this._pendingNonces.get(scopes) || [];
|
||||
- this._pendingNonces.set(scopes, [...existingNonces, nonce]);
|
||||
- const redirectUri = await this.getRedirectEndpoint;
|
||||
- const searchParams = new URLSearchParams([
|
||||
- ['client_id', CLIENT_ID],
|
||||
- ['redirect_uri', redirectUri],
|
||||
- ['scope', scopes],
|
||||
- ['state', encodeURIComponent(callbackUri.toString(true))]
|
||||
- ]);
|
||||
- const uri = vscode.Uri.parse(`${GITHUB_AUTHORIZE_URL}?${searchParams.toString()}`);
|
||||
- await vscode.env.openExternal(uri);
|
||||
-
|
||||
- if (!isSupportedEnvironment(callbackUri)) {
|
||||
- const token = this._supportDeviceCodeFlow
|
||||
- ? await this.doDeviceCodeFlow(scopes)
|
||||
- : await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
||||
-
|
||||
- if (!token) { throw new Error('No token provided'); }
|
||||
-
|
||||
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||
- if (!scopesList.every(scope => {
|
||||
- const included = tokenScopes.includes(scope);
|
||||
- if (included || !scope.includes(':')) {
|
||||
- return included;
|
||||
- }
|
||||
-
|
||||
- return scope.split(':').some(splitScopes => {
|
||||
- return tokenScopes.includes(splitScopes);
|
||||
- });
|
||||
- })) {
|
||||
- throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
||||
- // before completing it.
|
||||
- let codeExchangePromise = this._codeExchangePromises.get(scopes);
|
||||
- if (!codeExchangePromise) {
|
||||
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.handleUri(scopes));
|
||||
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
||||
- }
|
||||
-
|
||||
- return token;
|
||||
- }
|
||||
-
|
||||
- this.updateStatusBarItem(true);
|
||||
-
|
||||
- const state = uuid();
|
||||
- const existingStates = this._pendingStates.get(scopes) || [];
|
||||
- this._pendingStates.set(scopes, [...existingStates, state]);
|
||||
-
|
||||
- const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com`);
|
||||
- await vscode.env.openExternal(uri);
|
||||
-
|
||||
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
||||
- // before completing it.
|
||||
- let codeExchangePromise = this._codeExchangePromises.get(scopes);
|
||||
- if (!codeExchangePromise) {
|
||||
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.exchangeCodeForToken(scopes));
|
||||
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
||||
- }
|
||||
-
|
||||
- return Promise.race([
|
||||
- codeExchangePromise.promise,
|
||||
- promiseFromEvent<string | undefined, string>(this._onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => {
|
||||
- if (!token) {
|
||||
- reject('Cancelled');
|
||||
- } else {
|
||||
- resolve(token);
|
||||
- }
|
||||
- }).promise,
|
||||
- new Promise<string>((_, reject) => setTimeout(() => reject('Cancelled'), 60000))
|
||||
- ]).finally(() => {
|
||||
- this._pendingStates.delete(scopes);
|
||||
- codeExchangePromise?.cancel.fire();
|
||||
- this._codeExchangePromises.delete(scopes);
|
||||
- this.updateStatusBarItem(false);
|
||||
- try {
|
||||
- return await Promise.race([
|
||||
- codeExchangePromise.promise,
|
||||
- new Promise<string>((_, reject) => setTimeout(() => reject('Cancelled'), 60000)),
|
||||
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||
- ]);
|
||||
- } finally {
|
||||
- this._pendingNonces.delete(scopes);
|
||||
- codeExchangePromise?.cancel.fire();
|
||||
- this._codeExchangePromises.delete(scopes);
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private async doDeviceCodeFlow(scopes: string): Promise<string> {
|
||||
- private async doLoginWithLocalServer(scopes: string): Promise<string> {
|
||||
- this._logger.info(`Trying with local server... (${scopes})`);
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- title: localize('signingInAnotherWay', "Signing in to github.com..."),
|
||||
- cancellable: true
|
||||
- }, async (_, token) => {
|
||||
- const redirectUri = await this.getRedirectEndpoint;
|
||||
- const searchParams = new URLSearchParams([
|
||||
- ['client_id', CLIENT_ID],
|
||||
- ['redirect_uri', redirectUri],
|
||||
- ['scope', scopes],
|
||||
- ]);
|
||||
- const loginUrl = `${GITHUB_AUTHORIZE_URL}?${searchParams.toString()}`;
|
||||
- const server = new LoopbackAuthServer(path.join(__dirname, '../media'), loginUrl);
|
||||
- const port = await server.start();
|
||||
-
|
||||
- let codeToExchange;
|
||||
- try {
|
||||
- vscode.env.openExternal(vscode.Uri.parse(`http://127.0.0.1:${port}/signin?nonce=${encodeURIComponent(server.nonce)}`));
|
||||
- const { code } = await Promise.race([
|
||||
- server.waitForOAuthResponse(),
|
||||
- new Promise<any>((_, reject) => setTimeout(() => reject('Cancelled'), 60000)),
|
||||
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||
- ]);
|
||||
- codeToExchange = code;
|
||||
- } finally {
|
||||
- setTimeout(() => {
|
||||
- void server.stop();
|
||||
- }, 5000);
|
||||
- }
|
||||
-
|
||||
- const accessToken = await this.exchangeCodeForToken(codeToExchange);
|
||||
- return accessToken;
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private async doLoginDeviceCodeFlow(scopes: string): Promise<string> {
|
||||
- this._logger.info(`Trying device code flow... (${scopes})`);
|
||||
-
|
||||
- // Get initial device code
|
||||
- const uri = `https://github.com/login/device/code?client_id=${CLIENT_ID}&scope=${scopes}`;
|
||||
- const result = await fetch(uri, {
|
||||
@@ -177,7 +245,7 @@ index 92313d0..a69da37 100644
|
||||
- }, 'Copy & Continue to GitHub');
|
||||
-
|
||||
- if (modalResult !== 'Copy & Continue to GitHub') {
|
||||
- throw new Error('Cancelled');
|
||||
- throw new Error('User Cancelled');
|
||||
- }
|
||||
-
|
||||
- await vscode.env.clipboard.writeText(json.user_code);
|
||||
@@ -185,6 +253,18 @@ index 92313d0..a69da37 100644
|
||||
- const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
|
||||
- await vscode.env.openExternal(uriToOpen);
|
||||
-
|
||||
- return await this.waitForDeviceCodeAccessToken(json);
|
||||
- }
|
||||
|
||||
private async doLoginWithPat(scopes: string): Promise<string> {
|
||||
this._logger.info(`Trying to retrieve PAT... (${scopes})`);
|
||||
@@ -351,118 +153,6 @@ export class GitHubServer implements IGitHubServer {
|
||||
return token;
|
||||
}
|
||||
|
||||
- private async waitForDeviceCodeAccessToken(
|
||||
- json: IGitHubDeviceCodeResponse,
|
||||
- ): Promise<string> {
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- cancellable: true,
|
||||
@@ -194,199 +274,140 @@ index 92313d0..a69da37 100644
|
||||
- json.verification_uri,
|
||||
- json.user_code)
|
||||
- }, async (_, token) => {
|
||||
- return await this.waitForDeviceCodeAccessToken(json, token);
|
||||
- const refreshTokenUri = `https://github.com/login/oauth/access_token?client_id=${CLIENT_ID}&device_code=${json.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`;
|
||||
-
|
||||
- // Try for 2 minutes
|
||||
- const attempts = 120 / json.interval;
|
||||
- for (let i = 0; i < attempts; i++) {
|
||||
- await new Promise(resolve => setTimeout(resolve, json.interval * 1000));
|
||||
- if (token.isCancellationRequested) {
|
||||
- throw new Error('User Cancelled');
|
||||
- }
|
||||
- let accessTokenResult;
|
||||
- try {
|
||||
- accessTokenResult = await fetch(refreshTokenUri, {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json'
|
||||
- }
|
||||
- });
|
||||
- } catch {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (!accessTokenResult.ok) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- const accessTokenJson = await accessTokenResult.json();
|
||||
-
|
||||
- if (accessTokenJson.error === 'authorization_pending') {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (accessTokenJson.error) {
|
||||
- throw new Error(accessTokenJson.error_description);
|
||||
- }
|
||||
-
|
||||
- return accessTokenJson.access_token;
|
||||
- }
|
||||
-
|
||||
- throw new Error('Cancelled');
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private async waitForDeviceCodeAccessToken(
|
||||
- json: IGitHubDeviceCodeResponse,
|
||||
- token: vscode.CancellationToken
|
||||
- ): Promise<string> {
|
||||
-
|
||||
- const refreshTokenUri = `https://github.com/login/oauth/access_token?client_id=${CLIENT_ID}&device_code=${json.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`;
|
||||
-
|
||||
- // Try for 2 minutes
|
||||
- const attempts = 120 / json.interval;
|
||||
- for (let i = 0; i < attempts; i++) {
|
||||
- await new Promise(resolve => setTimeout(resolve, json.interval * 1000));
|
||||
- if (token.isCancellationRequested) {
|
||||
- throw new Error('Cancelled');
|
||||
- private handleUri: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
||||
- (scopes) => (uri, resolve, reject) => {
|
||||
- const query = new URLSearchParams(uri.query);
|
||||
- const code = query.get('code');
|
||||
- const nonce = query.get('nonce');
|
||||
- if (!code) {
|
||||
- reject(new Error('No code'));
|
||||
- return;
|
||||
- }
|
||||
- let accessTokenResult;
|
||||
- try {
|
||||
- accessTokenResult = await fetch(refreshTokenUri, {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json'
|
||||
- }
|
||||
- });
|
||||
- } catch {
|
||||
- continue;
|
||||
- if (!nonce) {
|
||||
- reject(new Error('No nonce'));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (!accessTokenResult.ok) {
|
||||
- continue;
|
||||
- }
|
||||
+ const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
||||
|
||||
- const accessTokenJson = await accessTokenResult.json();
|
||||
+ if (!token) { throw new Error('No token provided'); }
|
||||
|
||||
- if (accessTokenJson.error === 'authorization_pending') {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (accessTokenJson.error) {
|
||||
- throw new Error(accessTokenJson.error_description);
|
||||
+ const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||
+ if (!scopesList.every(scope => {
|
||||
+ const included = tokenScopes.includes(scope);
|
||||
+ if (included || !scope.includes(':')) {
|
||||
+ return included;
|
||||
}
|
||||
|
||||
- return accessTokenJson.access_token;
|
||||
+ return scope.split(':').some(splitScopes => {
|
||||
+ return tokenScopes.includes(splitScopes);
|
||||
+ });
|
||||
+ })) {
|
||||
+ throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||
}
|
||||
|
||||
- throw new Error('Cancelled');
|
||||
+ return token;
|
||||
}
|
||||
|
||||
- private exchangeCodeForToken: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
||||
- (scopes) => async (uri, resolve, reject) => {
|
||||
- const query = parseQuery(uri);
|
||||
- const code = query.code;
|
||||
-
|
||||
- const acceptedStates = this._pendingStates.get(scopes) || [];
|
||||
- if (!acceptedStates.includes(query.state)) {
|
||||
- const acceptedNonces = this._pendingNonces.get(scopes) || [];
|
||||
- if (!acceptedNonces.includes(nonce)) {
|
||||
- // A common scenario of this happening is if you:
|
||||
- // 1. Trigger a sign in with one set of scopes
|
||||
- // 2. Before finishing 1, you trigger a sign in with a different set of scopes
|
||||
- // In this scenario we should just return and wait for the next UriHandler event
|
||||
- // to run as we are probably still waiting on the user to hit 'Continue'
|
||||
- this._logger.info('State not found in accepted state. Skipping this execution...');
|
||||
- this._logger.info('Nonce not found in accepted nonces. Skipping this execution...');
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
|
||||
- this._logger.info('Exchanging code for token...');
|
||||
-
|
||||
- try {
|
||||
- const result = await fetch(url, {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json'
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- if (result.ok) {
|
||||
- const json = await result.json();
|
||||
- this._logger.info('Token exchange success!');
|
||||
- resolve(json.access_token);
|
||||
- } else {
|
||||
- reject(result.statusText);
|
||||
- }
|
||||
- } catch (ex) {
|
||||
- reject(ex);
|
||||
- }
|
||||
- resolve(this.exchangeCodeForToken(code));
|
||||
- };
|
||||
-
|
||||
- private async exchangeCodeForToken(code: string): Promise<string> {
|
||||
- this._logger.info('Exchanging code for token...');
|
||||
-
|
||||
- const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints');
|
||||
- const endpointUrl = proxyEndpoints?.github ? `${proxyEndpoints.github}login/oauth/access_token` : GITHUB_TOKEN_URL;
|
||||
-
|
||||
- const body = `code=${code}`;
|
||||
- const result = await fetch(endpointUrl, {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json',
|
||||
- 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
- 'Content-Length': body.toString()
|
||||
-
|
||||
- },
|
||||
- body
|
||||
- });
|
||||
-
|
||||
- if (result.ok) {
|
||||
- const json = await result.json();
|
||||
- this._logger.info('Token exchange success!');
|
||||
- return json.access_token;
|
||||
- } else {
|
||||
- const text = await result.text();
|
||||
- const error = new Error(text);
|
||||
- error.name = 'GitHubTokenExchangeError';
|
||||
- throw error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private getServerUri(path: string = '') {
|
||||
const apiUri = vscode.Uri.parse('https://api.github.com');
|
||||
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`);
|
||||
}
|
||||
diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
index 36647e6..55e722b 100644
|
||||
--- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
+++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
@@ -271,7 +271,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
|
||||
}
|
||||
});
|
||||
|
||||
- private updateStatusBarItem(isStart?: boolean) {
|
||||
- if (isStart && !this._statusBarItem) {
|
||||
- this._statusBarItem = vscode.window.createStatusBarItem('status.git.signIn', vscode.StatusBarAlignment.Left);
|
||||
- this._statusBarItem.name = localize('status.git.signIn.name', "GitHub Sign-in");
|
||||
- this._statusBarItem.text = localize('signingIn', "$(mark-github) Signing in to github.com...");
|
||||
- this._statusBarItem.command = this._statusBarCommandId;
|
||||
- this._statusBarItem.show();
|
||||
- }
|
||||
- if (providers.length && !menus.length) {
|
||||
+ if (!menus.length) {
|
||||
const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
|
||||
menus.push(noAccountsAvailableAction);
|
||||
}
|
||||
diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
index f543021..ad40bc3 100644
|
||||
--- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
+++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
@@ -272,16 +272,6 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
this.removeAccessRequest(id, extensionId);
|
||||
});
|
||||
}
|
||||
-
|
||||
- if (!isStart && this._statusBarItem) {
|
||||
- this._statusBarItem.dispose();
|
||||
- this._statusBarItem = undefined;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private async manuallyProvideUri() {
|
||||
- const uri = await vscode.window.showInputBox({
|
||||
- prompt: 'Uri',
|
||||
- ignoreFocusOut: true,
|
||||
- validateInput(value) {
|
||||
- if (!value) {
|
||||
- return undefined;
|
||||
- }
|
||||
- const error = localize('validUri', "Please enter a valid Uri from the GitHub login page.");
|
||||
- try {
|
||||
- const uri = vscode.Uri.parse(value.trim());
|
||||
- if (!uri.scheme || uri.scheme === 'file') {
|
||||
- return error;
|
||||
- }
|
||||
- } catch (e) {
|
||||
- return error;
|
||||
- }
|
||||
- return undefined;
|
||||
- }
|
||||
- });
|
||||
- if (!uri) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- this._uriHandler.handleUri(vscode.Uri.parse(uri.trim()));
|
||||
- }
|
||||
-
|
||||
public getUserInfo(token: string): Promise<{ id: string; accountName: string }> {
|
||||
return getUserInfo(token, this.getServerUri('/user'), this._logger);
|
||||
}
|
||||
|
||||
- public async sendAdditionalTelemetryInfo(token: string): Promise<void> {
|
||||
- if (!vscode.env.isTelemetryEnabled) {
|
||||
- return;
|
||||
- }
|
||||
- const nocors = await this.isNoCorsEnvironment();
|
||||
-
|
||||
- if (nocors) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- try {
|
||||
- const result = await fetch('https://education.github.com/api/user', {
|
||||
- headers: {
|
||||
- Authorization: `token ${token}`,
|
||||
- 'faculty-check-preview': 'true',
|
||||
- 'User-Agent': 'Visual-Studio-Code'
|
||||
- }
|
||||
- if (!this._authenticationProviders.size) {
|
||||
- this._placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
|
||||
- command: {
|
||||
- id: 'noAuthenticationProviders',
|
||||
- title: nls.localize('loading', "Loading..."),
|
||||
- precondition: ContextKeyExpr.false()
|
||||
- },
|
||||
- });
|
||||
-
|
||||
- if (result.ok) {
|
||||
- const json: { student: boolean; faculty: boolean } = await result.json();
|
||||
-
|
||||
- /* __GDPR__
|
||||
- "session" : {
|
||||
- "isEdu": { "classification": "NonIdentifiableDemographicInfo", "purpose": "FeatureInsight" }
|
||||
- }
|
||||
- */
|
||||
- this._telemetryReporter.sendTelemetryEvent('session', {
|
||||
- isEdu: json.student
|
||||
- ? 'student'
|
||||
- : json.faculty
|
||||
- ? 'faculty'
|
||||
- : 'none'
|
||||
- });
|
||||
- }
|
||||
- } catch (e) {
|
||||
- // No-op
|
||||
- }
|
||||
+ public async sendAdditionalTelemetryInfo(_: string): Promise<void> {
|
||||
}
|
||||
|
||||
public async checkEnterpriseVersion(token: string): Promise<void> {
|
||||
async sessionsUpdate(id: string, event: AuthenticationSessionsChangeEvent): Promise<void> {
|
||||
|
||||
@@ -50,7 +50,6 @@ twitterUrl='setpath(["twitterUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533
|
||||
requestFeatureUrl='setpath(["requestFeatureUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533482")'
|
||||
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
||||
introductoryVideosUrl='setpath(["introductoryVideosUrl"]; "https://go.microsoft.com/fwlink/?linkid=832146")'
|
||||
extensionAllowedBadgeProviders='setpath(["extensionAllowedBadgeProviders"]; ["api.bintray.com", "api.travis-ci.com", "api.travis-ci.org", "app.fossa.io", "badge.fury.io", "badge.waffle.io", "badgen.net", "badges.frapsoft.com", "badges.gitter.im", "badges.greenkeeper.io", "cdn.travis-ci.com", "cdn.travis-ci.org", "ci.appveyor.com", "circleci.com", "cla.opensource.microsoft.com", "codacy.com", "codeclimate.com", "codecov.io", "coveralls.io", "david-dm.org", "deepscan.io", "dev.azure.com", "flat.badgen.net", "gemnasium.com", "githost.io", "gitlab.com", "godoc.org", "goreportcard.com", "img.shields.io", "isitmaintained.com", "marketplace.visualstudio.com", "nodesecurity.io", "opencollective.com", "snyk.io", "travis-ci.com", "travis-ci.org", "visualstudio.com", "vsmarketplacebadge.apphb.com", "www.bithound.io", "www.versioneye.com"])'
|
||||
updateUrl='setpath(["updateUrl"]; "https://vscodium.now.sh")'
|
||||
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
||||
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
||||
@@ -71,13 +70,16 @@ win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
|
||||
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
|
||||
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
|
||||
urlProtocol='setpath(["urlProtocol"]; "vscodium")'
|
||||
extensionAllowedProposedApi='setpath(["extensionAllowedProposedApi"]; getpath(["extensionAllowedProposedApi"]) + ["ms-vscode.cpptools", "ms-azuretools.vscode-docker", "visualstudioexptteam.vscodeintellicode", "GitHub.codespaces", "GitHub.vscode-pull-request-github-insiders", "GitHub.vscode-pull-request-github", "Microsoft.vscode-nmake-tools", "ms-ai-tools.notebook-renderers", "ms-dotnettools.dotnet-interactive-vscode", "ms-python.gather", "ms-python.python", "ms-toolsai.jupyter", "ms-toolsai.vscode-ai", "ms-toolsai.vscode-ai-remote", "ms-vscode-remote.remote-containers-nightly", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh-edit-nightly", "ms-vscode-remote.remote-ssh-edit", "ms-vscode-remote.remote-ssh-nightly", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl-nightly", "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-wsl-recommender", "ms-vscode-remote.vscode-remote-extensionpack-nightly", "ms-vscode-remote.vscode-remote-extensionpack", "ms-vscode.azure-account", "ms-vscode.azure-sphere-tools-ui", "ms-vscode.azure-sphere-tools", "ms-vscode.github-browser", "ms-vscode.github-richnav", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", "ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.vscode-selfhost-test-provider", "ms-vsliveshare.cloudenv-explorer", "ms-vsliveshare.cloudenv", "ms-vsliveshare.vsliveshare", "ms-vsonline.vsonline", "dbaeumer.vscode-eslint"])'
|
||||
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscode-server-oss")'
|
||||
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new/choose")'
|
||||
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")'
|
||||
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")'
|
||||
|
||||
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${extensionAllowedBadgeProviders} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${extensionAllowedProposedApi} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
|
||||
cat product.json.bak | jq "${product_json_changes}" > product.json
|
||||
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
|
||||
cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
|
||||
|
||||
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
|
||||
rm -f product.json.tmp
|
||||
|
||||
cat product.json
|
||||
|
||||
../undo_telemetry.sh
|
||||
|
||||
427
product.json
Normal file
427
product.json
Normal file
@@ -0,0 +1,427 @@
|
||||
{
|
||||
"extensionAllowedBadgeProviders": [
|
||||
"api.bintray.com",
|
||||
"api.travis-ci.com",
|
||||
"api.travis-ci.org",
|
||||
"app.fossa.io",
|
||||
"badge.buildkite.com",
|
||||
"badge.fury.io",
|
||||
"badge.waffle.io",
|
||||
"badgen.net",
|
||||
"badges.frapsoft.com",
|
||||
"badges.gitter.im",
|
||||
"badges.greenkeeper.io",
|
||||
"cdn.travis-ci.com",
|
||||
"cdn.travis-ci.org",
|
||||
"ci.appveyor.com",
|
||||
"circleci.com",
|
||||
"cla.opensource.microsoft.com",
|
||||
"codacy.com",
|
||||
"codeclimate.com",
|
||||
"codecov.io",
|
||||
"coveralls.io",
|
||||
"david-dm.org",
|
||||
"deepscan.io",
|
||||
"dev.azure.com",
|
||||
"docs.rs",
|
||||
"flat.badgen.net",
|
||||
"gemnasium.com",
|
||||
"githost.io",
|
||||
"gitlab.com",
|
||||
"godoc.org",
|
||||
"goreportcard.com",
|
||||
"img.shields.io",
|
||||
"isitmaintained.com",
|
||||
"marketplace.visualstudio.com",
|
||||
"nodesecurity.io",
|
||||
"opencollective.com",
|
||||
"snyk.io",
|
||||
"travis-ci.com",
|
||||
"travis-ci.org",
|
||||
"visualstudio.com",
|
||||
"vsmarketplacebadge.apphb.com",
|
||||
"www.bithound.io",
|
||||
"www.versioneye.com"
|
||||
],
|
||||
"extensionAllowedBadgeProvidersRegex": [
|
||||
"^https:\\/\\/github\\.com\\/[^/]+\\/[^/]+\\/(actions\\/)?workflows\\/.*badge\\.svg"
|
||||
],
|
||||
"extensionEnabledApiProposals": {
|
||||
"ms-vscode.vscode-selfhost-test-provider": [
|
||||
"testObserver"
|
||||
],
|
||||
"VisualStudioExptTeam.vscodeintellicode-completions": [
|
||||
"inlineCompletions"
|
||||
],
|
||||
"ms-vsliveshare.vsliveshare": [
|
||||
"contribMenuBarHome",
|
||||
"diffCommand",
|
||||
"documentFiltersExclusive",
|
||||
"fileSearchProvider",
|
||||
"findTextInFiles",
|
||||
"notebookCellExecutionState",
|
||||
"notebookContentProvider",
|
||||
"notebookDocumentEvents",
|
||||
"notebookEditor",
|
||||
"notebookEditorEdit",
|
||||
"notebookLiveShare",
|
||||
"terminalDimensions",
|
||||
"terminalDataWriteEvent",
|
||||
"textDocumentNotebook",
|
||||
"textSearchProvider"
|
||||
],
|
||||
"ms-vscode.js-debug": [
|
||||
"portsAttributes",
|
||||
"findTextInFiles",
|
||||
"workspaceTrust",
|
||||
"resolvers"
|
||||
],
|
||||
"ms-toolsai.vscode-ai-remote": [
|
||||
"resolvers",
|
||||
"notebookEditor"
|
||||
],
|
||||
"ms-python.python": [
|
||||
"quickPickSortByLabel",
|
||||
"testObserver",
|
||||
"notebookEditor"
|
||||
],
|
||||
"ms-dotnettools.dotnet-interactive-vscode": [
|
||||
"notebookConcatTextDocument",
|
||||
"notebookContentProvider",
|
||||
"notebookCellExecutionState",
|
||||
"notebookControllerKind",
|
||||
"notebookDebugOptions",
|
||||
"notebookDeprecated",
|
||||
"notebookEditor",
|
||||
"notebookEditorDecorationType",
|
||||
"notebookEditorEdit",
|
||||
"notebookLiveShare",
|
||||
"notebookMessaging",
|
||||
"notebookMime",
|
||||
"textDocumentNotebook"
|
||||
],
|
||||
"GitHub.codespaces": [
|
||||
"contribMenuBarHome",
|
||||
"contribRemoteHelp",
|
||||
"contribViewsRemote",
|
||||
"notebookEditor",
|
||||
"resolvers",
|
||||
"terminalDataWriteEvent",
|
||||
"treeViewReveal"
|
||||
],
|
||||
"ms-vscode.azure-repos": [
|
||||
"extensionRuntime",
|
||||
"fileSearchProvider",
|
||||
"resolvers",
|
||||
"textSearchProvider"
|
||||
],
|
||||
"ms-vscode.remote-repositories": [
|
||||
"contribRemoteHelp",
|
||||
"contribMenuBarHome",
|
||||
"contribViewsRemote",
|
||||
"contribViewsWelcome",
|
||||
"documentFiltersExclusive",
|
||||
"extensionRuntime",
|
||||
"fileSearchProvider",
|
||||
"quickPickSortByLabel",
|
||||
"workspaceTrust",
|
||||
"scmSelectedProvider",
|
||||
"scmValidation",
|
||||
"textSearchProvider",
|
||||
"timeline",
|
||||
"notebookEditor"
|
||||
],
|
||||
"ms-vscode.vscode-github-issue-notebooks": [
|
||||
"notebookEditor"
|
||||
],
|
||||
"tanhakabir.rest-book": [
|
||||
"notebookEditor"
|
||||
],
|
||||
"ms-vscode-remote.remote-wsl": [
|
||||
"resolvers",
|
||||
"contribViewsRemote",
|
||||
"telemetry"
|
||||
],
|
||||
"ms-vscode-remote.remote-ssh": [
|
||||
"resolvers",
|
||||
"terminalDataWriteEvent",
|
||||
"contribViewsRemote",
|
||||
"telemetry"
|
||||
],
|
||||
"ms-vscode-remote.remote-containers": [
|
||||
"resolvers",
|
||||
"workspaceTrust",
|
||||
"terminalDimensions",
|
||||
"contribViewsRemote"
|
||||
],
|
||||
"ms-vscode.js-debug-nightly": [
|
||||
"portsAttributes",
|
||||
"findTextInFiles",
|
||||
"workspaceTrust",
|
||||
"resolvers"
|
||||
],
|
||||
"ms-vscode.lsif-browser": [
|
||||
"documentFiltersExclusive"
|
||||
],
|
||||
"GitHub.vscode-pull-request-github": [
|
||||
"tokenInformation"
|
||||
],
|
||||
"GitHub.copilot": [
|
||||
"inlineCompletions",
|
||||
"textDocumentNotebook"
|
||||
],
|
||||
"GitHub.copilot-nightly": [
|
||||
"inlineCompletions",
|
||||
"textDocumentNotebook"
|
||||
],
|
||||
"GitHub.remotehub": [
|
||||
"contribRemoteHelp",
|
||||
"contribMenuBarHome",
|
||||
"contribViewsRemote",
|
||||
"contribViewsWelcome",
|
||||
"documentFiltersExclusive",
|
||||
"extensionRuntime",
|
||||
"fileSearchProvider",
|
||||
"quickPickSortByLabel",
|
||||
"workspaceTrust",
|
||||
"resolvers",
|
||||
"scmSelectedProvider",
|
||||
"scmValidation",
|
||||
"textSearchProvider",
|
||||
"timeline",
|
||||
"notebookEditor"
|
||||
],
|
||||
"GitHub.remotehub-insiders": [
|
||||
"contribRemoteHelp",
|
||||
"contribMenuBarHome",
|
||||
"contribViewsRemote",
|
||||
"contribViewsWelcome",
|
||||
"documentFiltersExclusive",
|
||||
"extensionRuntime",
|
||||
"fileSearchProvider",
|
||||
"quickPickSortByLabel",
|
||||
"workspaceTrust",
|
||||
"resolvers",
|
||||
"scmSelectedProvider",
|
||||
"scmValidation",
|
||||
"textSearchProvider",
|
||||
"timeline",
|
||||
"notebookEditor"
|
||||
],
|
||||
"ms-python.gather": [
|
||||
"notebookEditor",
|
||||
"notebookCellExecutionState"
|
||||
],
|
||||
"ms-python.vscode-pylance": [
|
||||
"notebookDocumentEvents",
|
||||
"notebookEditor",
|
||||
"notebookCellExecutionState"
|
||||
],
|
||||
"ms-toolsai.jupyter": [
|
||||
"notebookConcatTextDocument",
|
||||
"notebookControllerKind",
|
||||
"notebookDebugOptions",
|
||||
"notebookDeprecated",
|
||||
"notebookEditor",
|
||||
"notebookDocumentEvents",
|
||||
"notebookEditorDecorationType",
|
||||
"notebookEditorEdit",
|
||||
"notebookMessaging",
|
||||
"notebookMime",
|
||||
"notebookCellExecutionState",
|
||||
"portsAttributes",
|
||||
"textDocumentNotebook",
|
||||
"quickPickSortByLabel"
|
||||
],
|
||||
"dbaeumer.vscode-eslint": [
|
||||
"tabs",
|
||||
"notebookDocumentEvents",
|
||||
"notebookEditor",
|
||||
"notebookCellExecutionState"
|
||||
],
|
||||
"ms-vscode.azure-sphere-tools-ui": [
|
||||
"resolvers"
|
||||
],
|
||||
"ms-azuretools.vscode-azureappservice": [
|
||||
"terminalDataWriteEvent"
|
||||
]
|
||||
},
|
||||
"extensionKind": {
|
||||
"Shan.code-settings-sync": [
|
||||
"ui"
|
||||
],
|
||||
"shalldie.background": [
|
||||
"ui"
|
||||
],
|
||||
"techer.open-in-browser": [
|
||||
"ui"
|
||||
],
|
||||
"CoenraadS.bracket-pair-colorizer-2": [
|
||||
"ui"
|
||||
],
|
||||
"CoenraadS.bracket-pair-colorizer": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"hiro-sun.vscode-emacs": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"hnw.vscode-auto-open-markdown-preview": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"wayou.vscode-todo-highlight": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"aaron-bond.better-comments": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"vscodevim.vim": [
|
||||
"ui"
|
||||
],
|
||||
"ollyhayes.colmak-vim": [
|
||||
"ui"
|
||||
]
|
||||
},
|
||||
"extensionPointExtensionKind": {
|
||||
"typescriptServerPlugins": [
|
||||
"workspace"
|
||||
]
|
||||
},
|
||||
"extensionSyncedKeys": {
|
||||
"ritwickdey.liveserver": [
|
||||
"liveServer.setup.version"
|
||||
]
|
||||
},
|
||||
"extensionVirtualWorkspacesSupport": {
|
||||
"esbenp.prettier-vscode": {
|
||||
"default": false
|
||||
},
|
||||
"msjsdiag.debugger-for-chrome": {
|
||||
"default": false
|
||||
},
|
||||
"redhat.java": {
|
||||
"default": false
|
||||
},
|
||||
"HookyQR.beautify": {
|
||||
"default": false
|
||||
},
|
||||
"ritwickdey.LiveServer": {
|
||||
"default": false
|
||||
},
|
||||
"VisualStudioExptTeam.vscodeintellicode": {
|
||||
"default": false
|
||||
},
|
||||
"octref.vetur": {
|
||||
"default": false
|
||||
},
|
||||
"formulahendry.code-runner": {
|
||||
"default": false
|
||||
},
|
||||
"xdebug.php-debug": {
|
||||
"default": false
|
||||
},
|
||||
"ms-mssql.mssql": {
|
||||
"default": false
|
||||
},
|
||||
"christian-kohler.path-intellisense": {
|
||||
"default": false
|
||||
},
|
||||
"eg2.tslint": {
|
||||
"default": false
|
||||
},
|
||||
"eg2.vscode-npm-script": {
|
||||
"default": false
|
||||
},
|
||||
"donjayamanne.githistory": {
|
||||
"default": false
|
||||
},
|
||||
"Zignd.html-css-class-completion": {
|
||||
"default": false
|
||||
},
|
||||
"christian-kohler.npm-intellisense": {
|
||||
"default": false
|
||||
},
|
||||
"EditorConfig.EditorConfig": {
|
||||
"default": false
|
||||
},
|
||||
"austin.code-gnu-global": {
|
||||
"default": false
|
||||
},
|
||||
"johnpapa.Angular2": {
|
||||
"default": false
|
||||
},
|
||||
"ms-vscode.vscode-typescript-tslint-plugin": {
|
||||
"default": false
|
||||
},
|
||||
"DotJoshJohnson.xml": {
|
||||
"default": false
|
||||
},
|
||||
"techer.open-in-browser": {
|
||||
"default": false
|
||||
},
|
||||
"tht13.python": {
|
||||
"default": false
|
||||
},
|
||||
"bmewburn.vscode-intelephense-client": {
|
||||
"default": false
|
||||
},
|
||||
"Angular.ng-template": {
|
||||
"default": false
|
||||
},
|
||||
"xdebug.php-pack": {
|
||||
"default": false
|
||||
},
|
||||
"dbaeumer.jshint": {
|
||||
"default": false
|
||||
},
|
||||
"yzhang.markdown-all-in-one": {
|
||||
"default": false
|
||||
},
|
||||
"Dart-Code.flutter": {
|
||||
"default": false
|
||||
},
|
||||
"streetsidesoftware.code-spell-checker": {
|
||||
"default": false
|
||||
},
|
||||
"rebornix.Ruby": {
|
||||
"default": false
|
||||
},
|
||||
"ms-vscode.sublime-keybindings": {
|
||||
"default": false
|
||||
},
|
||||
"mitaki28.vscode-clang": {
|
||||
"default": false
|
||||
},
|
||||
"steoates.autoimport": {
|
||||
"default": false
|
||||
},
|
||||
"donjayamanne.python-extension-pack": {
|
||||
"default": false
|
||||
},
|
||||
"shd101wyy.markdown-preview-enhanced": {
|
||||
"default": false
|
||||
},
|
||||
"mikestead.dotenv": {
|
||||
"default": false
|
||||
},
|
||||
"pranaygp.vscode-css-peek": {
|
||||
"default": false
|
||||
},
|
||||
"ikappas.phpcs": {
|
||||
"default": false
|
||||
},
|
||||
"platformio.platformio-ide": {
|
||||
"default": false
|
||||
},
|
||||
"jchannon.csharpextensions": {
|
||||
"default": false
|
||||
},
|
||||
"gruntfuggly.todo-tree": {
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,10 @@ OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
|
||||
REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
|
||||
REPOSITORY="${REPO_NAME:-"vscodium"}"
|
||||
|
||||
# git workaround
|
||||
git config --global --add safe.directory /__w/vscodium/vscodium
|
||||
|
||||
|
||||
for FILE in *
|
||||
do
|
||||
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 7.5 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -32,6 +32,9 @@ else
|
||||
export SHOULD_DEPLOY="no"
|
||||
else
|
||||
export SHOULD_DEPLOY="yes"
|
||||
|
||||
snap version
|
||||
snap info codium
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ base: core18
|
||||
grade: stable
|
||||
confinement: classic
|
||||
compression: lzo
|
||||
architectures:
|
||||
- build-on: amd64
|
||||
- build-on: arm64
|
||||
# architectures:
|
||||
# - build-on: amd64
|
||||
# - build-on: arm64
|
||||
|
||||
parts:
|
||||
codium:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# dc.services.visualstudio.com
|
||||
# mobile.events.data.microsoft.com
|
||||
# vortex.data.microsoft.com
|
||||
TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.data\.microsoft\.com)"
|
||||
TELEMETRY_URLS="[^/]+\.data\.microsoft\.com"
|
||||
REPLACEMENT="s/$TELEMETRY_URLS/0\.0\.0\.0/g"
|
||||
|
||||
#include common functions
|
||||
|
||||
@@ -2,7 +2,6 @@ DEFAULT_TRUE="'default': true"
|
||||
DEFAULT_FALSE="'default': false"
|
||||
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
||||
|
||||
@@ -39,13 +38,12 @@ update_setting () {
|
||||
# construct line-aware replacement string
|
||||
if [[ $line == *"$DEFAULT_TRUE"* ]]; then
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||
else
|
||||
else
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||
fi
|
||||
|
||||
|
||||
replace "$DEFAULT_TRUE_TO_FALSE" $FILENAME
|
||||
}
|
||||
|
||||
update_setting "$TELEMETRY_ENABLE" src/vs/platform/telemetry/common/telemetryService.ts
|
||||
update_setting "$TELEMETRY_CRASH_REPORTER" src/vs/workbench/electron-sandbox/desktop.contribution.ts
|
||||
update_setting "$TELEMETRY_CONFIGURATION" src/vs/platform/telemetry/common/telemetryService.ts
|
||||
|
||||
Reference in New Issue
Block a user