Skip to content

Commit

Permalink
Merge branch 'main' into tyriar/xterm3
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Oct 18, 2022
2 parents a6a64fb + 75cdec2 commit 0b1a83e
Show file tree
Hide file tree
Showing 400 changed files with 8,140 additions and 5,676 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you already have VS Code and Docker installed, you can click the badge above

1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.)

2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**.
2. **Important**: Docker needs at least **4 Cores and 8 GB of RAM** to run a full build with **9 GB of RAM** being recommended. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**.

> **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar.
Expand Down
22 changes: 13 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@
"overrideCommand": false,
"runArgs": [ "--init", "--security-opt", "seccomp=unconfined", "--shm-size=1g"],

"settings": {
"resmon.show.battery": false,
"resmon.show.cpufreq": false
// VS Code extensions and settings
"customizations": {
"vscode": {
"settings": {
"resmon.show.battery": false,
"resmon.show.cpufreq": false
},
"extensions": [
"dbaeumer.vscode-eslint",
"mutantdino.resourcemonitor"
]
}
},

// noVNC, VNC
Expand All @@ -24,17 +33,12 @@
}
},

"extensions": [
"dbaeumer.vscode-eslint",
"mutantdino.resourcemonitor"
],

// Optionally loads a cached yarn install for the repo
"postCreateCommand": ".devcontainer/cache/restore-diff.sh",

"remoteUser": "node",

"hostRequirements": {
"memory": "8gb"
"memory": "9gb"
}
}
25 changes: 25 additions & 0 deletions .vscode/cglicenses.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,31 @@
}
}
}
},
{
"type": "object",
"required": [
"name",
"fullLicenseTextUri"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the dependency"
},
"fullLicenseTextUri": {
"type": "string",
"description": "The URI to the license text of this repository",
"format": "uri"
},
"prependLicenseText": {
"type": "array",
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
"items": {
"type": "string"
}
}
}
}
]
}
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
},
"rust-analyzer.linkedProjects": [
"cli/Cargo.toml"
],
"typescript.tsc.autoDetect": "off",
"testing.autoRun.mode": "rerun",
"conventionalCommits.scopes": [
Expand Down
14 changes: 4 additions & 10 deletions build/azure-pipelines/cli/cli-compile-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,20 @@ parameters:
default: {}

steps:
- script: cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code-tunnel
- script: cargo build --release --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
displayName: Compile ${{ parameters.VSCODE_CLI_TARGET }}
workingDirectory: $(Build.SourcesDirectory)/cli
env:
VSCODE_CLI_VERSION: $(VSCODE_CLI_VERSION)
VSCODE_CLI_REMOTE_LICENSE_TEXT: $(VSCODE_CLI_REMOTE_LICENSE_TEXT)
VSCODE_CLI_REMOTE_LICENSE_PROMPT: $(VSCODE_CLI_REMOTE_LICENSE_PROMPT)
VSCODE_CLI_ASSET_NAME: ${{ parameters.VSCODE_CLI_ARTIFACT }}
VSCODE_CLI_AI_KEY: $(VSCODE_CLI_AI_KEY)
VSCODE_CLI_AI_ENDPOINT: $(VSCODE_CLI_AI_ENDPOINT)
${{ each pair in parameters.VSCODE_CLI_ENV }}:
${{ pair.key }}: ${{ pair.value }}

- ${{ if or(contains(parameters.VSCODE_CLI_TARGET, '-windows-'), contains(parameters.VSCODE_CLI_TARGET, '-darwin')) }}:
- task: ArchiveFiles@2
inputs:
${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel.exe
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe
${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
Expand All @@ -39,7 +33,7 @@ steps:
- ${{ else }}:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code-tunnel
rootFolderOrFile: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code
includeRootFolder: false
archiveType: tar
tarCompression: gz
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/cli/cli-win32-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}/code-tunnel.exe
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}/code.exe
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
Expand Down
4 changes: 2 additions & 2 deletions build/azure-pipelines/cli/install-rust-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ parameters:
steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
exec { curl -sSf -o rustup-init.exe https://win.rustup.rs }
exec { rustup-init.exe -y --profile minimal --default-toolchain %RUSTUP_TOOLCHAIN% --default-host x86_64-pc-windows-msvc }
Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
env:
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
Expand Down
16 changes: 14 additions & 2 deletions build/azure-pipelines/cli/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ const fs = require("fs");
const path = require("path");
const packageJson = require("../../../package.json");
const root = path.dirname(path.dirname(path.dirname(__dirname)));
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
let productJsonPath;
if (process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY) {
productJsonPath = path.join(root, 'product.json');
}
else {
productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY, 'product.json');
}
console.log('Loading product.json from', productJsonPath);
const product = JSON.parse(fs.readFileSync(productJsonPath, 'utf8'));
const commit = (0, getVersion_1.getVersion)(root);
/**
* Sets build environment variables for the CLI for current contextual info.
*/
const setLauncherEnvironmentVars = () => {
const vars = new Map([
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense],
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
['VSCODE_CLI_VERSION', packageJson.version],
['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
['VSCODE_CLI_QUALITY', product.quality],
['VSCODE_CLI_COMMIT', commit],
]);
for (const [key, value] of vars) {
Expand Down
17 changes: 15 additions & 2 deletions build/azure-pipelines/cli/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,30 @@ import * as path from 'path';
import * as packageJson from '../../../package.json';

const root = path.dirname(path.dirname(path.dirname(__dirname)));
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));

let productJsonPath: string;
if (process.env.VSCODE_QUALITY === 'oss' || !process.env.VSCODE_QUALITY) {
productJsonPath = path.join(root, 'product.json');
} else {
productJsonPath = path.join(root, 'quality', process.env.VSCODE_QUALITY, 'product.json');
}

console.log('Loading product.json from', productJsonPath);
const product = JSON.parse(fs.readFileSync(productJsonPath, 'utf8'));
const commit = getVersion(root);

/**
* Sets build environment variables for the CLI for current contextual info.
*/
const setLauncherEnvironmentVars = () => {
const vars = new Map([
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense],
['VSCODE_CLI_REMOTE_LICENSE_TEXT', product.serverLicense?.join('\\n')],
['VSCODE_CLI_REMOTE_LICENSE_PROMPT', product.serverLicensePrompt],
['VSCODE_CLI_AI_KEY', product.aiConfig?.cliKey],
['VSCODE_CLI_AI_ENDPOINT', product.aiConfig?.cliEndpoint],
['VSCODE_CLI_VERSION', packageJson.version],
['VSCODE_CLI_UPDATE_ENDPOINT', product.updateUrl],
['VSCODE_CLI_QUALITY', product.quality],
['VSCODE_CLI_COMMIT', commit],
]);

Expand Down
3 changes: 2 additions & 1 deletion build/azure-pipelines/darwin/cli-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ steps:

- template: ../mixin-distro-posix.yml
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}

- script: |
set -e
node build/azure-pipelines/cli/prepare.js
displayName: Prepare CLI build
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
- template: ../cli/install-rust-posix.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:

- script: |
set -e
npx https://aka.ms/enablesecurefeed standAlone
npm install https://aka.ms/enablesecurefeed --global && npm exec terrapinadotask -- standAlone
timeoutInMinutes: 5
retryCountOnTaskFailure: 3
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
Expand All @@ -40,6 +40,6 @@ steps:
parameters:
VSCODE_CLI_ARTIFACTS:
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
- unsigned_vscode_cli_darwin_x64_cli
- unsigned_vscode_cli_darwin_x64_cli
- ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
- unsigned_vscode_cli_darwin_arm64_cli
- unsigned_vscode_cli_darwin_arm64_cli
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ steps:
- script: |
set -e
npx https://aka.ms/enablesecurefeed standAlone
npm install https://aka.ms/enablesecurefeed --global && npm exec terrapinadotask -- standAlone
timeoutInMinutes: 5
retryCountOnTaskFailure: 3
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ steps:
- script: |
set -e
npx https://aka.ms/enablesecurefeed standAlone
npm install https://aka.ms/enablesecurefeed --global && npm exec terrapinadotask -- standAlone
timeoutInMinutes: 5
retryCountOnTaskFailure: 3
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
Expand Down

0 comments on commit 0b1a83e

Please sign in to comment.