Skip to content

[desktop] Add Gitpod to Settings sync #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
10dc49b
Pick up TS 4.6.3 (#146127)
mjbvz Mar 27, 2022
aefb335
Fix #146161
sandy081 Mar 28, 2022
d8847c8
#146161 - consider settings editor config
sandy081 Mar 28, 2022
4599966
ci: update electron v17.2.0 (#146156)
deepak1556 Mar 28, 2022
8e98e74
proper fix
sandy081 Mar 28, 2022
4e20ea5
remove unnecessary comma
sandy081 Mar 28, 2022
4a7cd08
Add vscode.markdown-language-features to proposed API
dbaeumer Mar 28, 2022
ac7d722
Merge pull request #146176 from microsoft/dbaeumer/146172
dbaeumer Mar 28, 2022
e2e4067
actually foward cell content change events to extension host, https:/…
jrieken Mar 28, 2022
da0e0ae
Revert "Fixes microsoft/monaco-editor#2774: Emit content change event…
alexdima Mar 28, 2022
ca46ba0
Revert "Fixes #145872: Emit model events using the view model outgoin…
alexdima Mar 28, 2022
e76b009
Merge pull request #146187 from microsoft/alex/issue-146174
hediet Mar 28, 2022
0aad3c8
Copy tunnel information for context (#146186)
alexr00 Mar 28, 2022
660f140
Merge pull request #146163 from microsoft/sandy081/fix146161
sandy081 Mar 28, 2022
3dc701c
fix #142756.
rebornix Mar 28, 2022
3a5a169
Merge pull request #146213 from microsoft/rebornix/update-replace-all-nb
rebornix Mar 28, 2022
ede16c3
fix #146227.
rebornix Mar 29, 2022
521a3d8
Merge pull request #146181 from microsoft/joh/fix/145793
jrieken Mar 29, 2022
e18005f
Merge pull request #146228 from microsoft/rebornix/fix-output-limit
rebornix Mar 29, 2022
f3e87be
gitpod server initial commit
akosyakov Sep 2, 2020
c9ef633
switch workbench preferred color themes
Shulammite-Aso Nov 9, 2021
b18640e
[gitpod-shared] Use "waitForSnapshot" to avoid disconnects
geropl Nov 18, 2021
b1acac6
[gitpod] Add 'User-Agent' to API connection headers
geropl Dec 1, 2021
9de989f
Always enable proposed API
jeanp413 Dec 21, 2021
d677a73
support timeout of local-app
mustard-mh Dec 28, 2021
0cc83b1
Add notification telemetry
jeanp413 Dec 21, 2021
ef19a61
Add telemetry for user config and extensions
jeanp413 Dec 22, 2021
a728832
Add telemetry for getting started
jeanp413 Dec 27, 2021
4808fba
gitpod: bump `node-fetch` version in extensions
Pothulapati Feb 4, 2022
3125d4c
Remove vscode_session phase running end
mustard-mh Feb 23, 2022
76e0439
Add export logs contribution
jeanp413 Mar 17, 2022
754ebb2
Add Gitpod to Settings sync
filiptronicek Sep 17, 2021
7597be9
Remove strict null checking
filiptronicek Oct 13, 2021
f8ee95d
Grammar
filiptronicek Oct 13, 2021
5fd96f8
Typos, grammar, all that kind of awesome stuff!
filiptronicek Oct 13, 2021
99aff73
Don't cache base URL
filiptronicek Oct 13, 2021
5370b06
Rewrite session logic into a class
filiptronicek Oct 13, 2021
409b82a
Add code exchange code
filiptronicek Oct 14, 2021
1b9043b
Fix that damn bug
filiptronicek Oct 16, 2021
1d88940
Fix code exchange bad request
filiptronicek Oct 18, 2021
94cc6fc
Fix WS endpoint URL and some other things
filiptronicek Oct 19, 2021
914c571
fix JWT token parsing
akosyakov Oct 20, 2021
17814a3
invalidate sessions
akosyakov Oct 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@
}
]
}
},
{
"files": [
"build/gulpfile.gitpod.js",
"src/vs/gitpod/*",
"extensions/gitpod*/**"
],
"rules": {
"header/header": [
"off"
]
}
}
]
}
21 changes: 21 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM gitpod/workspace-full:latest

USER gitpod

# We use latest major version of Node.js distributed VS Code. (see about dialog in your local VS Code)
RUN bash -c ". .nvm/nvm.sh \
&& nvm install 16 \
&& nvm use 16 \
&& nvm alias default 16"

RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix

# Install dependencies
RUN sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
xvfb x11vnc fluxbox dbus-x11 x11-utils x11-xserver-utils xdg-utils \
fbautostart xterm eterm gnome-terminal gnome-keyring seahorse nautilus \
libx11-dev libxkbfile-dev libsecret-1-dev libnotify4 libnss3 libxss1 \
libasound2 libgbm1 xfonts-base xfonts-terminus fonts-noto fonts-wqy-microhei \
fonts-droid-fallback vim-tiny nano libgconf2-dev libgtk-3-dev twm \
&& sudo apt-get clean && sudo rm -rf /var/cache/apt/* && sudo rm -rf /var/lib/apt/lists/* && sudo rm -rf /tmp/*
35 changes: 35 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
image:
file: .gitpod.Dockerfile
ports:
- port: 9888
onOpen: open-browser
tasks:
- init: |
yarn
yarn server:init
command: |
gp sync-done init
export NODE_ENV=development
export VSCODE_DEV=1
yarn gulp watch-init
name: watch app
- command: |
export NODE_ENV=development
export VSCODE_DEV=1
gp sync-await init
cd ./extensions
yarn watch
name: watch extension
- command: |
export NODE_ENV=development
export VSCODE_DEV=1
gp sync-await init
./scripts/code-server.sh --without-connection-token
name: run app
openMode: split-right
github:
prebuilds:
pullRequestsFromForks: true
vscode:
extensions:
- dbaeumer.vscode-eslint
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Built-in Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}",
"--extensionDevelopmentPath=${workspaceRoot}/extensions/gitpod-web",
"--log=debug"
],
"outFiles": [
"${workspaceRoot}/extensions/gitpod-shared/out/**/*.js",
"${workspaceRoot}/extensions/gitpod-web/out/**/*.js",
]
},
{
"type": "node",
"request": "launch",
Expand Down
17 changes: 17 additions & 0 deletions BUILD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
packages:
- name: install
type: generic
srcs:
- "**"
config:
commands:
- ["yarn"]
- name: init
type: generic
deps:
- ":install"
config:
commands:
- ["yarn", "--cwd", "./install/build", "compile"]
- ["yarn", "--cwd", "./install", "compile"]
- ["yarn", "--cwd", "./install", "download-builtin-extensions"]
7 changes: 6 additions & 1 deletion build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,9 @@ xterm-addon-*/fixtures/**
xterm-addon-*/out/**
xterm-addon-*/out-test/**


# TODO: Remove this once gitpod-protocol package doesn't ship source code
@gitpod/gitpod-protocol/src/**
@gitpod/gitpod-protocol/data/**
@gitpod/gitpod-protocol/node_modules/**
@gitpod/gitpod-protocol/lib/*.d.ts
@gitpod/gitpod-protocol/lib/*.d.ts.map
14 changes: 13 additions & 1 deletion build/.webignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,16 @@ xterm-addon-webgl/out/**

@microsoft/applicationinsights*/**
@microsoft/dynamicproto-js/**
!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js
!@microsoft/applicationinsights-web/dist/applicationinsights-web.min.js

@improbable-eng/**
!@improbable-eng/grpc-web/dist/grpc-web-client.umd.js

@gitpod/**
!@gitpod/local-app-api-grpcweb/lib/localapp.js

browser-headers/**
google-protobuf/**

@zip.js/**
[email protected]/zip.js/dist/zip-no-worker-deflate.min.js
104 changes: 104 additions & 0 deletions build/gulpfile.gitpod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*!--------------------------------------------------------
* Copyright (C) Gitpod. All rights reserved.
*--------------------------------------------------------*/

'use strict';

const promisify = require('util').promisify;
const cp = require('child_process');
const argv = require('yargs').argv;
const vsce = require('vsce');
const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
const rename = require('gulp-rename');
const ext = require('./lib/extensions');

gulp.task(task.define('watch-init', require('./lib/compilation').watchTask('out', false)));

const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
const marketplaceExtensions = ['gitpod', 'gitpod-remote'];
const outMarketplaceExtensions = 'out-gitpod-marketplace';
const cleanMarketplaceExtensions = task.define('clean-gitpod-marketplace-extensions', util.rimraf(outMarketplaceExtensions));
const bumpMarketplaceExtensions = task.define('bump-marketplace-extensions', () => {
if ('new-version' in argv && argv['new-version']) {
const newVersion = argv['new-version'];
console.log(newVersion);
return Promise.allSettled(marketplaceExtensions.map(async extensionName => {
const { stderr } = await promisify(cp.exec)(`yarn version --new-version ${newVersion} --cwd ${path.join(extensionsPath, extensionName)} --no-git-tag-version`, { encoding: 'utf8' });
if (stderr) {
throw new Error('failed to bump up version: ' + stderr);
}
}));
}
});
const bundleMarketplaceExtensions = task.define('bundle-gitpod-marketplace-extensions', task.series(
cleanMarketplaceExtensions,
bumpMarketplaceExtensions,
() =>
ext.minifyExtensionResources(
es.merge(
...marketplaceExtensions.map(extensionName =>
ext.fromLocal(path.join(extensionsPath, extensionName), false)
.pipe(rename(p => p.dirname = `${extensionName}/${p.dirname}`))
)
)
).pipe(gulp.dest(outMarketplaceExtensions))
));
gulp.task(bundleMarketplaceExtensions);
const publishMarketplaceExtensions = task.define('publish-gitpod-marketplace-extensions', task.series(
bundleMarketplaceExtensions,
() => Promise.allSettled(marketplaceExtensions.map(extensionName => {
vsce.publish({
cwd: path.join(outMarketplaceExtensions, extensionName)
});
}))
));
gulp.task(publishMarketplaceExtensions);
const packageMarketplaceExtensions = task.define('package-gitpod-marketplace-extensions', task.series(
bundleMarketplaceExtensions,
() => Promise.allSettled(marketplaceExtensions.map(extensionName => {
vsce.createVSIX({
cwd: path.join(outMarketplaceExtensions, extensionName)
});
}))
));
gulp.task(packageMarketplaceExtensions);
for (const extensionName of marketplaceExtensions) {
const cleanExtension = task.define('gitpod:clean-extension:' + extensionName, util.rimraf(path.join(outMarketplaceExtensions, extensionName)));
const bumpExtension = task.define('gitpod:bump-extension:' + extensionName, async () => {
if ('new-version' in argv && argv['new-version']) {
const newVersion = argv['new-version'];
const { stderr } = await promisify(cp.exec)(`yarn version --new-version ${newVersion} --cwd ${path.join(extensionsPath, extensionName)} --no-git-tag-version`, { encoding: 'utf8' });
if (stderr) {
throw new Error('failed to bump up version: ' + stderr);
}
}
});
const bundleExtension = task.define('gitpod:bundle-extension:' + extensionName, task.series(
cleanExtension,
bumpExtension,
() =>
ext.minifyExtensionResources(
ext.fromLocal(path.join(extensionsPath, extensionName), false)
.pipe(rename(p => p.dirname = `${extensionName}/${p.dirname}`))
).pipe(gulp.dest(outMarketplaceExtensions))
));
gulp.task(bundleExtension);
const publishExtension = task.define('gitpod:publish-extension:' + extensionName, task.series(
bundleExtension,
() => vsce.publish({
cwd: path.join(outMarketplaceExtensions, extensionName)
})
));
gulp.task(publishExtension);
const packageExtension = task.define('gitpod:package-extension:' + extensionName, task.series(
bundleExtension,
() => vsce.createVSIX({
cwd: path.join(outMarketplaceExtensions, extensionName)
})
));
gulp.task(packageExtension);
}
7 changes: 6 additions & 1 deletion build/gulpfile.reh.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,12 @@ function tweakProductForServerWeb(product) {
out: `out-vscode-${type}`,
inlineAmdImages: true,
bundleInfo: undefined,
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product)
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product),
header: [
'/*!-----------------------------------------',
' * Copyright (c) Gitpod. All rights reserved.',
' *-----------------------------------------*/'
].join('\n')
})
));

Expand Down
6 changes: 3 additions & 3 deletions build/gulpfile.vscode.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const version = (quality && quality !== 'stable') ? `${packageJson.version}-${qu
const vscodeWebResourceIncludes = [
// Workbench
'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,jpg}',
'out-build/vs/code/browser/workbench/*.html',
'out-build/vs/gitpod/browser/workbench/*.html',
'out-build/vs/base/browser/ui/codicons/codicon/**/*.ttf',
'out-build/vs/**/markdown.css',

Expand Down Expand Up @@ -170,7 +170,7 @@ const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
optimizeVSCodeWebTask,
util.rimraf('out-vscode-web-min'),
common.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
common.minifyTask('out-vscode-web')
));
gulp.task(minifyVSCodeWebTask);

Expand All @@ -186,7 +186,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
const extensions = gulp.src('.build/web/extensions/**', { base: '.build/web', dot: true });

const sources = es.merge(src, extensions)
.pipe(filter(['**', '!**/*.js.map'], { dot: true }));
.pipe(filter(['**'], { dot: true }));

const name = product.nameShort;
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })
Expand Down
16 changes: 9 additions & 7 deletions build/hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ function hygiene(some, linting = true) {
});

const copyrights = es.through(function (file) {
const lines = file.__lines;

for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
if (file.relative.indexOf('gitpod') === -1) {
const lines = file.__lines;

for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions build/lib/compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const os = require("os");
const File = require("vinyl");
const task = require("./task");
const watch = require('./watch');
const packageJson = require('../../package.json');
const productJson = require('../../product.json');
const replace = require('gulp-replace');
const reporter = (0, reporter_1.createReporter)();
function getTypeScriptCompilerOptions(src) {
const rootDir = path.join(__dirname, `../../${src}`);
Expand Down Expand Up @@ -48,8 +51,13 @@ function createCompile(src, build, emitError) {
const utf8Filter = util.filter(data => /(\/|\\)test(\/|\\).*utf8/.test(data.path));
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));
const productJsFilter = util.filter(data => !build && data.path.endsWith('vs/platform/product/common/product.ts'));
const productConfiguration = JSON.stringify(Object.assign(Object.assign({}, productJson), { version: `${packageJson.version}-dev`, nameShort: `${productJson.nameShort} Dev`, nameLong: `${productJson.nameLong} Dev`, dataFolderName: `${productJson.dataFolderName}-dev` }));
const input = es.through();
const output = input
.pipe(productJsFilter)
.pipe(replace(/{\s*\/\*BUILD->INSERT_PRODUCT_CONFIGURATION\*\/\s*}/, productConfiguration, { skipBinary: true }))
.pipe(productJsFilter.restore)
.pipe(utf8Filter)
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore)
Expand Down
15 changes: 15 additions & 0 deletions build/lib/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import * as File from 'vinyl';
import * as task from './task';

const watch = require('./watch');
const packageJson = require('../../package.json');
const productJson = require('../../product.json');
const replace = require('gulp-replace');

const reporter = createReporter();

Expand Down Expand Up @@ -59,8 +62,20 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
const tsFilter = util.filter(data => /\.ts$/.test(data.path));
const noDeclarationsFilter = util.filter(data => !(/\.d\.ts$/.test(data.path)));

const productJsFilter = util.filter(data => !build && data.path.endsWith('vs/platform/product/common/product.ts'));
const productConfiguration = JSON.stringify({
...productJson,
version: `${packageJson.version}-dev`,
nameShort: `${productJson.nameShort} Dev`,
nameLong: `${productJson.nameLong} Dev`,
dataFolderName: `${productJson.dataFolderName}-dev`
});

const input = es.through();
const output = input
.pipe(productJsFilter)
.pipe(replace(/{\s*\/\*BUILD->INSERT_PRODUCT_CONFIGURATION\*\/\s*}/, productConfiguration, { skipBinary: true }))
.pipe(productJsFilter.restore)
.pipe(utf8Filter)
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore)
Expand Down
Loading