mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-17 21:24:40 +10:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eff01d6f0 | ||
|
|
db8d1e7a8d | ||
|
|
c741ae3347 | ||
|
|
becd52f518 | ||
|
|
7ee4f2f735 | ||
|
|
3208188249 | ||
|
|
be445bcba6 | ||
|
|
3277bd4fa1 | ||
|
|
08b0b1b3e5 | ||
|
|
c46abc14ee | ||
|
|
5bd755a9cc | ||
|
|
1cbc6e55bf | ||
|
|
351460f992 | ||
|
|
f7e1c11ea7 | ||
|
|
50197bbeef |
36
.github/workflows/linux.yml
vendored
36
.github/workflows/linux.yml
vendored
@@ -32,13 +32,13 @@ jobs:
|
|||||||
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install GH
|
- name: Install GH
|
||||||
run: ./install_gh.sh
|
run: ./install_gh.sh
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||||
@@ -107,10 +107,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
# - arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Check version
|
- name: Check version
|
||||||
run: ./stores/snapcraft/check_version.sh
|
run: ./stores/snapcraft/check_version.sh
|
||||||
@@ -118,23 +118,27 @@ jobs:
|
|||||||
ARCHITECTURE: ${{ matrix.platform }}
|
ARCHITECTURE: ${{ matrix.platform }}
|
||||||
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
|
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v1
|
# - uses: docker/setup-qemu-action@v1
|
||||||
with:
|
# if: env.SHOULD_DEPLOY == 'yes'
|
||||||
image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
|
|
||||||
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:
|
with:
|
||||||
path: stores/snapcraft
|
path: stores/snapcraft
|
||||||
architecture: ${{ matrix.platform }}
|
|
||||||
id: build
|
id: build
|
||||||
if: env.SHOULD_DEPLOY == 'yes'
|
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
|
- uses: snapcore/action-publish@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
6
.github/workflows/macos.yml
vendored
6
.github/workflows/macos.yml
vendored
@@ -26,10 +26,10 @@ jobs:
|
|||||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||||
|
|||||||
10
.github/workflows/windows.yml
vendored
10
.github/workflows/windows.yml
vendored
@@ -10,7 +10,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2016
|
runs-on: windows-2019
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -23,10 +23,10 @@ jobs:
|
|||||||
vscode_arch: [x64, ia32, arm64]
|
vscode_arch: [x64, ia32, arm64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: Setup Python 2
|
- name: Setup Python 2
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '2.x'
|
python-version: '2.x'
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
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/out
|
||||||
build/linux/appimage/pkg2appimage.AppDir
|
build/linux/appimage/pkg2appimage.AppDir
|
||||||
build/linux/appimage/pkg2appimage-*.AppImage
|
build/linux/appimage/pkg2appimage-*.AppImage
|
||||||
|
build/linux/appimage/squashfs-root
|
||||||
build/linux/appimage/VSCodium
|
build/linux/appimage/VSCodium
|
||||||
build/windows/msi/releasedir
|
build/windows/msi/releasedir
|
||||||
build/windows/rtf/Readme (Abridged).txt
|
build/windows/rtf/Readme (Abridged).txt
|
||||||
|
|||||||
@@ -8,12 +8,15 @@
|
|||||||
<div id="badges" align="center">
|
<div id="badges" align="center">
|
||||||
|
|
||||||
[](https://github.com/vscodium/vscodium/releases)
|
[](https://github.com/vscodium/vscodium/releases)
|
||||||
[](https://dev.azure.com/vscodium/VSCodium/_build?definitionId=1)
|
|
||||||
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
||||||
[](https://gitter.im/VSCodium/Lobby)
|
[](https://gitter.im/VSCodium/Lobby)
|
||||||
[](https://snapcraft.io/codium)
|
[](https://snapcraft.io/codium)
|
||||||
[](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>
|
</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.**
|
**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.**
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ script:
|
|||||||
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
||||||
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
||||||
- rm -rf usr/lib/x86_64-linux-gnu
|
- rm -rf usr/lib/x86_64-linux-gnu
|
||||||
|
- rm -f lib/x86_64-linux-gnu/libglib*
|
||||||
- cat > AppRun <<\EOF
|
- cat > AppRun <<\EOF
|
||||||
- #!/bin/sh
|
- #!/bin/sh
|
||||||
- HERE="$(dirname "$(readlink -f "${0}")")"
|
- HERE="$(dirname "$(readlink -f "${0}")")"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||||
index df089a6..7aeb54b 100644
|
index 2f5a931..ac3d7e6 100644
|
||||||
--- a/build/gulpfile.vscode.js
|
--- a/build/gulpfile.vscode.js
|
||||||
+++ b/build/gulpfile.vscode.js
|
+++ b/build/gulpfile.vscode.js
|
||||||
@@ -286,7 +286,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||||
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
||||||
} else if (platform === 'darwin') {
|
} else if (platform === 'darwin') {
|
||||||
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
||||||
@@ -12,19 +12,19 @@ index df089a6..7aeb54b 100644
|
|||||||
all = es.merge(all, shortcut);
|
all = es.merge(all, shortcut);
|
||||||
}
|
}
|
||||||
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
index bd4dc01..02cbbc2 100644
|
index 3bd0c57..d921c60 100644
|
||||||
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
@@ -355,7 +355,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
@@ -353,7 +353,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> {
|
private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> {
|
||||||
- const target = resolve(this.environmentMainService.appRoot, 'bin', 'code');
|
- const target = resolve(this.environmentMainService.appRoot, 'bin', 'code');
|
||||||
+ const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName);
|
+ const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName);
|
||||||
const source = `/usr/local/bin/${this.productService.applicationName}`;
|
const source = `/usr/local/bin/${this.productService.applicationName}`;
|
||||||
|
|
||||||
// Ensure source exists
|
// Ensure source exists
|
||||||
@@ -565,7 +565,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
@@ -563,7 +563,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
||||||
|
|
||||||
// macOS
|
// macOS
|
||||||
if (this.environmentMainService.isBuilt) {
|
if (this.environmentMainService.isBuilt) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
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
|
--- a/build/gulpfile.vscode.win32.js
|
||||||
+++ b/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) {
|
function archiveWin32Setup(arch) {
|
||||||
return cb => {
|
return cb => {
|
||||||
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
||||||
index 657b9c9..9b9b12e 100644
|
index 1edc76f..4c0bf98 100644
|
||||||
--- a/src/vs/base/common/product.ts
|
--- a/src/vs/base/common/product.ts
|
||||||
+++ b/src/vs/base/common/product.ts
|
+++ b/src/vs/base/common/product.ts
|
||||||
@@ -70,6 +70,7 @@ export interface IProductConfiguration {
|
@@ -69,6 +69,7 @@ export interface IProductConfiguration {
|
||||||
|
|
||||||
readonly extensionsGallery?: {
|
readonly extensionsGallery?: {
|
||||||
readonly serviceUrl: string;
|
readonly serviceUrl: string;
|
||||||
@@ -11,7 +11,7 @@ index 657b9c9..9b9b12e 100644
|
|||||||
readonly resourceUrlTemplate: string;
|
readonly resourceUrlTemplate: string;
|
||||||
readonly controlUrl: string;
|
readonly controlUrl: string;
|
||||||
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||||
index 5e38d35..12bb161 100644
|
index e22b33e..98cec93 100644
|
||||||
--- a/src/vs/platform/product/common/product.ts
|
--- a/src/vs/platform/product/common/product.ts
|
||||||
+++ b/src/vs/platform/product/common/product.ts
|
+++ b/src/vs/platform/product/common/product.ts
|
||||||
@@ -4,11 +4,12 @@
|
@@ -4,11 +4,12 @@
|
||||||
@@ -30,7 +30,7 @@ index 5e38d35..12bb161 100644
|
|||||||
* @deprecated You MUST use `IProductService` if possible.
|
* @deprecated You MUST use `IProductService` if possible.
|
||||||
@@ -34,6 +35,32 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
@@ -34,6 +35,32 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
||||||
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
|
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
|
||||||
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; };
|
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
|
||||||
|
|
||||||
+ // Merge user-customized product.json
|
+ // Merge user-customized product.json
|
||||||
+ try {
|
+ try {
|
||||||
@@ -61,7 +61,7 @@ index 5e38d35..12bb161 100644
|
|||||||
// Running out of sources
|
// Running out of sources
|
||||||
if (env['VSCODE_DEV']) {
|
if (env['VSCODE_DEV']) {
|
||||||
Object.assign(product, {
|
Object.assign(product, {
|
||||||
@@ -43,6 +70,19 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
@@ -44,6 +71,19 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
||||||
index 3002e937c81..9674d8d2089 100644
|
index 49a523b..d68588e 100644
|
||||||
--- a/extensions/github-authentication/src/githubServer.ts
|
--- a/extensions/github-authentication/src/githubServer.ts
|
||||||
+++ b/extensions/github-authentication/src/githubServer.ts
|
+++ b/extensions/github-authentication/src/githubServer.ts
|
||||||
@@ -3,41 +3,13 @@
|
@@ -6,23 +6,14 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
import * as nls from 'vscode-nls';
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
-import * as nls from 'vscode-nls';
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import fetch, { Response } from 'node-fetch';
|
import fetch, { Response } from 'node-fetch';
|
||||||
-import { v4 as uuid } from 'uuid';
|
-import { v4 as uuid } from 'uuid';
|
||||||
@@ -15,91 +12,58 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
import { AuthProviderType } from './github';
|
import { AuthProviderType } from './github';
|
||||||
import { Log } from './common/logger';
|
import { Log } from './common/logger';
|
||||||
-import { isSupportedEnvironment } from './common/env';
|
-import { isSupportedEnvironment } from './common/env';
|
||||||
-
|
|
||||||
-const localize = nls.loadMessageBundle();
|
|
||||||
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
|
||||||
|
|
||||||
|
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;
|
|
||||||
- }, {});
|
|
||||||
-}
|
|
||||||
|
|
||||||
export interface IGitHubServer extends vscode.Disposable {
|
-const REDIRECT_URL_STABLE = 'https://vscode.dev/redirect';
|
||||||
login(scopes: string): Promise<string>;
|
-const REDIRECT_URL_INSIDERS = 'https://insiders.vscode.dev/redirect';
|
||||||
@@ -47,13 +19,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
|
||||||
type: AuthProviderType;
|
|
||||||
}
|
|
||||||
|
|
||||||
-interface IGitHubDeviceCodeResponse {
|
|
||||||
- device_code: string;
|
|
||||||
- user_code: string;
|
|
||||||
- verification_uri: string;
|
|
||||||
- interval: number;
|
|
||||||
-}
|
|
||||||
-
|
-
|
||||||
async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
|
class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
||||||
try {
|
constructor(private readonly Logger: Log) {
|
||||||
logger.info('Getting token scopes...');
|
super();
|
||||||
@@ -115,315 +80,49 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
@@ -110,10 +101,7 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
||||||
export class GitHubServer implements IGitHubServer {
|
export class GitHubServer implements IGitHubServer {
|
||||||
friendlyName = 'GitHub';
|
friendlyName = 'GitHub';
|
||||||
type = AuthProviderType.github;
|
type = AuthProviderType.github;
|
||||||
- private _statusBarItem: vscode.StatusBarItem | undefined;
|
|
||||||
- private _onDidManuallyProvideToken = new vscode.EventEmitter<string | 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) {
|
- private _pendingNonces = new Map<string, string[]>();
|
||||||
- this._disposable = vscode.Disposable.from(
|
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||||
- vscode.commands.registerCommand(this._statusBarCommandId, () => this.manuallyProvideUri()),
|
private _disposable: vscode.Disposable;
|
||||||
- vscode.window.registerUriHandler(this._uriHandler));
|
private _uriHandler = new UriEventHandler(this._logger);
|
||||||
+ this._supportDeviceCodeFlow;
|
|
||||||
|
@@ -125,87 +113,31 @@ export class GitHubServer implements IGitHubServer {
|
||||||
|
this._disposable.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose() {
|
|
||||||
- this._disposable.dispose();
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- // TODO@joaomoreno TODO@TylerLeonhardt
|
- // TODO@joaomoreno TODO@TylerLeonhardt
|
||||||
- private async isNoCorsEnvironment(): Promise<boolean> {
|
- private async isNoCorsEnvironment(): Promise<boolean> {
|
||||||
- const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
- 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));
|
- return (uri.scheme === 'https' && /^((insiders\.)?vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||||
}
|
- }
|
||||||
|
-
|
||||||
public async login(scopes: string): Promise<string> {
|
public async login(scopes: string): Promise<string> {
|
||||||
this._logger.info(`Logging in for the following scopes: ${scopes}`);
|
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`));
|
- const nonce = uuid();
|
||||||
|
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate?nonce=${encodeURIComponent(nonce)}`));
|
||||||
-
|
-
|
||||||
- if (!isSupportedEnvironment(callbackUri)) {
|
- if (!isSupportedEnvironment(callbackUri)) {
|
||||||
- const token = this._supportDeviceCodeFlow
|
- const token = this._supportDeviceCodeFlow
|
||||||
- ? await this.doDeviceCodeFlow(scopes)
|
- ? await this.doDeviceCodeFlow(scopes)
|
||||||
- : await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
- : await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
||||||
-
|
+ 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'); }
|
- if (!token) { throw new Error('No token provided'); }
|
||||||
-
|
+ if (!token) { throw new Error('No token provided'); }
|
||||||
|
|
||||||
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||||
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||||
- if (!scopesList.every(scope => {
|
- if (!scopesList.every(scope => {
|
||||||
@@ -113,131 +77,6 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
- });
|
- });
|
||||||
- })) {
|
- })) {
|
||||||
- throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
- throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||||
- }
|
|
||||||
-
|
|
||||||
- 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);
|
|
||||||
- });
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private async doDeviceCodeFlow(scopes: string): Promise<string> {
|
|
||||||
- // Get initial device code
|
|
||||||
- const uri = `https://github.com/login/device/code?client_id=${CLIENT_ID}&scope=${scopes}`;
|
|
||||||
- const result = await fetch(uri, {
|
|
||||||
- method: 'POST',
|
|
||||||
- headers: {
|
|
||||||
- Accept: 'application/json'
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
- if (!result.ok) {
|
|
||||||
- throw new Error(`Failed to get one-time code: ${await result.text()}`);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- const json = await result.json() as IGitHubDeviceCodeResponse;
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- const modalResult = await vscode.window.showInformationMessage(
|
|
||||||
- localize('code.title', "Your Code: {0}", json.user_code),
|
|
||||||
- {
|
|
||||||
- modal: true,
|
|
||||||
- detail: localize('code.detail', "To finish authenticating, navigate to GitHub and paste in the above one-time code.")
|
|
||||||
- }, 'Copy & Continue to GitHub');
|
|
||||||
-
|
|
||||||
- if (modalResult !== 'Copy & Continue to GitHub') {
|
|
||||||
- throw new Error('Cancelled');
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- await vscode.env.clipboard.writeText(json.user_code);
|
|
||||||
-
|
|
||||||
- const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
|
|
||||||
- await vscode.env.openExternal(uriToOpen);
|
|
||||||
-
|
|
||||||
- return await vscode.window.withProgress<string>({
|
|
||||||
- location: vscode.ProgressLocation.Notification,
|
|
||||||
- cancellable: true,
|
|
||||||
- title: localize(
|
|
||||||
- 'progress',
|
|
||||||
- "Open [{0}]({0}) in a new tab and paste your one-time code: {1}",
|
|
||||||
- json.verification_uri,
|
|
||||||
- json.user_code)
|
|
||||||
- }, async (_, token) => {
|
|
||||||
- return await this.waitForDeviceCodeAccessToken(json, token);
|
|
||||||
- });
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- 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');
|
|
||||||
- }
|
|
||||||
- let accessTokenResult;
|
|
||||||
- try {
|
|
||||||
- accessTokenResult = await fetch(refreshTokenUri, {
|
|
||||||
- method: 'POST',
|
|
||||||
- headers: {
|
|
||||||
- Accept: 'application/json'
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
- } catch {
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- 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 tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||||
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||||
+ if (!scopesList.every(scope => {
|
+ if (!scopesList.every(scope => {
|
||||||
@@ -246,7 +85,7 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
+ return included;
|
+ return included;
|
||||||
}
|
}
|
||||||
|
|
||||||
- return accessTokenJson.access_token;
|
- return token;
|
||||||
+ return scope.split(':').some(splitScopes => {
|
+ return scope.split(':').some(splitScopes => {
|
||||||
+ return tokenScopes.includes(splitScopes);
|
+ return tokenScopes.includes(splitScopes);
|
||||||
+ });
|
+ });
|
||||||
@@ -254,35 +93,95 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
+ throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
+ throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
- throw new Error('Cancelled');
|
- const existingNonces = this._pendingNonces.get(scopes) || [];
|
||||||
|
- this._pendingNonces.set(scopes, [...existingNonces, nonce]);
|
||||||
|
-
|
||||||
|
- const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints');
|
||||||
|
- // If we are running in insiders vscode.dev, then ensure we use the redirect route on that.
|
||||||
|
- const redirectUri = proxyEndpoints?.github?.includes('https://insiders.vscode.dev') ? REDIRECT_URL_INSIDERS : REDIRECT_URL_STABLE;
|
||||||
|
- 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()}`);
|
||||||
|
-
|
||||||
|
- return vscode.window.withProgress({
|
||||||
|
- location: vscode.ProgressLocation.Window,
|
||||||
|
- title: localize('signingIn', " $(mark-github) Signing in to github.com..."),
|
||||||
|
- }, async () => {
|
||||||
|
- 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._pendingNonces.delete(scopes);
|
||||||
|
- codeExchangePromise?.cancel.fire();
|
||||||
|
- this._codeExchangePromises.delete(scopes);
|
||||||
|
- });
|
||||||
|
- });
|
||||||
+ return token;
|
+ return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async doDeviceCodeFlow(scopes: string): Promise<string> {
|
||||||
|
@@ -299,57 +231,6 @@ export class GitHubServer implements IGitHubServer {
|
||||||
|
throw new Error('Cancelled');
|
||||||
|
}
|
||||||
|
|
||||||
- private exchangeCodeForToken: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
- private exchangeCodeForToken: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
||||||
- (scopes) => async (uri, resolve, reject) => {
|
- (scopes) => async (uri, resolve, reject) => {
|
||||||
- const query = parseQuery(uri);
|
- const query = new URLSearchParams(uri.query);
|
||||||
- const code = query.code;
|
- const code = query.get('code');
|
||||||
-
|
-
|
||||||
- const acceptedStates = this._pendingStates.get(scopes) || [];
|
- const acceptedNonces = this._pendingNonces.get(scopes) || [];
|
||||||
- if (!acceptedStates.includes(query.state)) {
|
- const nonce = query.get('nonce');
|
||||||
|
- if (!nonce) {
|
||||||
|
- this._logger.error('No nonce in response.');
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- if (!acceptedNonces.includes(nonce)) {
|
||||||
- // A common scenario of this happening is if you:
|
- // A common scenario of this happening is if you:
|
||||||
- // 1. Trigger a sign in with one set of scopes
|
- // 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
|
- // 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
|
- // 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'
|
- // 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;
|
- return;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
|
|
||||||
- this._logger.info('Exchanging code for token...');
|
- 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;
|
||||||
|
-
|
||||||
- try {
|
- try {
|
||||||
- const result = await fetch(url, {
|
- const body = `code=${code}`;
|
||||||
|
- const result = await fetch(endpointUrl, {
|
||||||
- method: 'POST',
|
- method: 'POST',
|
||||||
- headers: {
|
- headers: {
|
||||||
- Accept: 'application/json'
|
- Accept: 'application/json',
|
||||||
- }
|
- 'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
- 'Content-Length': body.toString()
|
||||||
|
-
|
||||||
|
- },
|
||||||
|
- body
|
||||||
- });
|
- });
|
||||||
-
|
-
|
||||||
- if (result.ok) {
|
- if (result.ok) {
|
||||||
@@ -300,51 +199,7 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
private getServerUri(path: string = '') {
|
private getServerUri(path: string = '') {
|
||||||
const apiUri = vscode.Uri.parse('https://api.github.com');
|
const apiUri = vscode.Uri.parse('https://api.github.com');
|
||||||
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`);
|
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`);
|
||||||
}
|
@@ -359,44 +240,7 @@ export class GitHubServer implements IGitHubServer {
|
||||||
|
|
||||||
- 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 (!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);
|
return getUserInfo(token, this.getServerUri('/user'), this._logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,7 +223,7 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
- });
|
- });
|
||||||
-
|
-
|
||||||
- if (result.ok) {
|
- if (result.ok) {
|
||||||
- const json: { student: boolean, faculty: boolean } = await result.json();
|
- const json: { student: boolean; faculty: boolean } = await result.json();
|
||||||
-
|
-
|
||||||
- /* __GDPR__
|
- /* __GDPR__
|
||||||
- "session" : {
|
- "session" : {
|
||||||
@@ -390,3 +245,59 @@ index 3002e937c81..9674d8d2089 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async checkEnterpriseVersion(token: string): Promise<void> {
|
public async checkEnterpriseVersion(token: string): Promise<void> {
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
- 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 5f7431d..278cd3d 100644
|
||||||
|
--- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||||
|
+++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||||
|
@@ -13,7 +13,6 @@ import { isString } from 'vs/base/common/types';
|
||||||
|
import * as nls from 'vs/nls';
|
||||||
|
import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
|
||||||
|
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||||
|
-import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||||
|
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
|
||||||
|
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||||
|
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||||
|
@@ -197,13 +196,6 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||||
|
@IQuickInputService private readonly quickInputService: IQuickInputService
|
||||||
|
) {
|
||||||
|
super();
|
||||||
|
- this._placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
|
||||||
|
- command: {
|
||||||
|
- id: 'noAuthenticationProviders',
|
||||||
|
- title: nls.localize('loading', "Loading..."),
|
||||||
|
- precondition: ContextKeyExpr.false()
|
||||||
|
- },
|
||||||
|
- });
|
||||||
|
|
||||||
|
authenticationExtPoint.setHandler((extensions, { added, removed }) => {
|
||||||
|
added.forEach(point => {
|
||||||
|
@@ -272,16 +264,6 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||||
|
this.removeAccessRequest(id, extensionId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (!this._authenticationProviders.size) {
|
||||||
|
- this._placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
|
||||||
|
- command: {
|
||||||
|
- id: 'noAuthenticationProviders',
|
||||||
|
- title: nls.localize('loading', "Loading..."),
|
||||||
|
- precondition: ContextKeyExpr.false()
|
||||||
|
- },
|
||||||
|
- });
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
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")'
|
requestFeatureUrl='setpath(["requestFeatureUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533482")'
|
||||||
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
||||||
introductoryVideosUrl='setpath(["introductoryVideosUrl"]; "https://go.microsoft.com/fwlink/?linkid=832146")'
|
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")'
|
updateUrl='setpath(["updateUrl"]; "https://vscodium.now.sh")'
|
||||||
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
||||||
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
||||||
@@ -71,13 +70,16 @@ win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
|
|||||||
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
|
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
|
||||||
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
|
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
|
||||||
urlProtocol='setpath(["urlProtocol"]; "vscodium")'
|
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")'
|
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/choose")'
|
||||||
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")'
|
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}"
|
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
|
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
|
cat product.json
|
||||||
|
|
||||||
../undo_telemetry.sh
|
../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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,6 +18,10 @@ cd artifacts
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
|
OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
|
||||||
|
REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
|
||||||
|
REPOSITORY="${REPO_NAME:-"vscodium"}"
|
||||||
|
|
||||||
for FILE in *
|
for FILE in *
|
||||||
do
|
do
|
||||||
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||||
@@ -30,7 +34,7 @@ do
|
|||||||
if (( $EXIT_STATUS )); then
|
if (( $EXIT_STATUS )); then
|
||||||
for (( i=0; i<10; i++ ))
|
for (( i=0; i<10; i++ ))
|
||||||
do
|
do
|
||||||
github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
sleep $(( 15 * (i + 1)))
|
sleep $(( 15 * (i + 1)))
|
||||||
|
|
||||||
@@ -49,7 +53,7 @@ do
|
|||||||
if (( $EXIT_STATUS )); then
|
if (( $EXIT_STATUS )); then
|
||||||
echo "'${FILE}' hasn't been uploaded!"
|
echo "'${FILE}' hasn't been uploaded!"
|
||||||
|
|
||||||
github-release delete --owner VSCodium --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ else
|
|||||||
export SHOULD_DEPLOY="no"
|
export SHOULD_DEPLOY="no"
|
||||||
else
|
else
|
||||||
export SHOULD_DEPLOY="yes"
|
export SHOULD_DEPLOY="yes"
|
||||||
|
|
||||||
|
snap version
|
||||||
|
snap info codium
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ base: core18
|
|||||||
grade: stable
|
grade: stable
|
||||||
confinement: classic
|
confinement: classic
|
||||||
compression: lzo
|
compression: lzo
|
||||||
architectures:
|
# architectures:
|
||||||
- build-on: amd64
|
# - build-on: amd64
|
||||||
- build-on: arm64
|
# - build-on: arm64
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
codium:
|
codium:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ DEFAULT_TRUE="'default': true"
|
|||||||
DEFAULT_FALSE="'default': false"
|
DEFAULT_FALSE="'default': false"
|
||||||
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||||
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
||||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
|
||||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||||
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
||||||
|
|
||||||
@@ -39,13 +38,12 @@ update_setting () {
|
|||||||
# construct line-aware replacement string
|
# construct line-aware replacement string
|
||||||
if [[ $line == *"$DEFAULT_TRUE"* ]]; then
|
if [[ $line == *"$DEFAULT_TRUE"* ]]; then
|
||||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
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}/"
|
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
replace "$DEFAULT_TRUE_TO_FALSE" $FILENAME
|
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_CRASH_REPORTER" src/vs/workbench/electron-sandbox/desktop.contribution.ts
|
||||||
update_setting "$TELEMETRY_CONFIGURATION" src/vs/platform/telemetry/common/telemetryService.ts
|
update_setting "$TELEMETRY_CONFIGURATION" src/vs/platform/telemetry/common/telemetryService.ts
|
||||||
|
|||||||
Reference in New Issue
Block a user